@openmeter/sdk 1.0.0-beta-8daddaa2afed → 1.0.0-beta-30c15d4607cf
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/entitlements.d.cts +2 -28
- package/dist/cjs/src/client/schemas.d.cts +2290 -1755
- package/dist/cjs/src/zod/index.cjs +1533 -1370
- package/dist/cjs/src/zod/index.d.cts +1690 -1577
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.0f5cb85e.tsbuildinfo → tsconfig.a9e178c1.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.5bdc0a71.tsbuildinfo → tsconfig.b3e27f1b.tsbuildinfo} +1 -1
- package/dist/src/client/entitlements.d.ts +2 -28
- package/dist/src/client/schemas.d.ts +2290 -1755
- package/dist/src/zod/index.d.ts +1690 -1577
- package/dist/src/zod/index.js +1516 -1354
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -9,22 +9,23 @@ exports.getInvoiceParams = exports.getInvoicePathInvoiceIdRegExp = exports.invoi
|
|
|
9
9
|
exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPricePaymentTermDefault = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyLinesItemRateCardFeatureKeyRegExp = exports.updateInvoiceBodyLinesItemRateCardFeatureKeyMax = exports.updateInvoiceBodyLinesItemFeatureKeyRegExp = exports.updateInvoiceBodyLinesItemFeatureKeyMax = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemPriceQuantityPerPackageRegExpOne = exports.updateInvoiceBodyLinesItemPriceAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMultiplierDefault = exports.updateInvoiceBodyLinesItemPriceMultiplierRegExpOne = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpThree = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpThree = exports.updateInvoiceBodyLinesItemPriceTiersItemUnitPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceTiersItemFlatPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceTiersItemUpToAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceAmountRegExpThree = exports.updateInvoiceBodyLinesItemPricePaymentTermDefault = exports.updateInvoiceBodyLinesItemPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyLinesItemDescriptionMax = exports.updateInvoiceBodyLinesItemNameMax = exports.updateInvoiceBodyCustomerAddressesMax = exports.updateInvoiceBodyCustomerAddressesItemCountryRegExpOne = exports.updateInvoiceBodyCustomerAddressesItemCountryMaxOne = exports.updateInvoiceBodyCustomerAddressesItemCountryMinOne = exports.updateInvoiceBodyCustomerTaxIdCodeMaxOne = exports.updateInvoiceBodyCustomerKeyMax = exports.updateInvoiceBodySupplierAddressesMax = exports.updateInvoiceBodySupplierAddressesItemCountryRegExpOne = exports.updateInvoiceBodySupplierAddressesItemCountryMaxOne = exports.updateInvoiceBodySupplierAddressesItemCountryMinOne = exports.updateInvoiceBodySupplierTaxIdCodeMaxOne = exports.updateInvoiceBodySupplierKeyMax = exports.updateInvoiceBodyDescriptionMax = exports.updateInvoiceParams = exports.updateInvoicePathInvoiceIdRegExp = exports.deleteInvoiceParams = exports.deleteInvoicePathInvoiceIdRegExp = exports.getInvoiceQueryParams = exports.getInvoiceQueryIncludeDeletedLinesDefault = exports.getInvoiceQueryExpandDefault = void 0;
|
|
10
10
|
exports.createBillingProfileBodySupplierAddressesItemCountryRegExpOne = exports.createBillingProfileBodySupplierAddressesItemCountryMaxOne = exports.createBillingProfileBodySupplierAddressesItemCountryMinOne = exports.createBillingProfileBodySupplierTaxIdCodeMaxOne = exports.createBillingProfileBodySupplierKeyMax = exports.createBillingProfileBodyDescriptionMax = exports.createBillingProfileBodyNameMax = exports.listBillingProfilesQueryParams = exports.listBillingProfilesQueryPageSizeMax = exports.listBillingProfilesQueryPageSizeDefault = exports.listBillingProfilesQueryPageDefault = exports.listBillingProfilesQueryIncludeArchivedDefault = exports.voidInvoiceActionBody = exports.voidInvoiceActionBodyOverridesItemLineIdRegExp = exports.voidInvoiceActionParams = exports.voidInvoiceActionPathInvoiceIdRegExp = exports.recalculateInvoiceTaxActionParams = exports.recalculateInvoiceTaxActionPathInvoiceIdRegExp = exports.snapshotQuantitiesInvoiceActionParams = exports.snapshotQuantitiesInvoiceActionPathInvoiceIdRegExp = exports.retryInvoiceActionParams = exports.retryInvoiceActionPathInvoiceIdRegExp = exports.approveInvoiceActionParams = exports.approveInvoiceActionPathInvoiceIdRegExp = exports.advanceInvoiceActionParams = exports.advanceInvoiceActionPathInvoiceIdRegExp = exports.updateInvoiceBody = exports.updateInvoiceBodyWorkflowWorkflowPaymentCollectionMethodDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDueAfterDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDraftPeriodDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingAutoAdvanceDefault = exports.updateInvoiceBodyLinesItemIdRegExp = exports.updateInvoiceBodyLinesItemRateCardDiscountsUsageCorrelationIdRegExp = exports.updateInvoiceBodyLinesItemRateCardDiscountsUsageQuantityRegExpOne = exports.updateInvoiceBodyLinesItemRateCardDiscountsPercentageCorrelationIdRegExp = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemRateCardPriceQuantityPerPackageRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMultiplierDefault = exports.updateInvoiceBodyLinesItemRateCardPriceMultiplierRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemUnitPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemFlatPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemUpToAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpOne = void 0;
|
|
11
11
|
exports.createCustomerBodyBillingAddressCountryMaxOne = exports.createCustomerBodyBillingAddressCountryMinOne = exports.createCustomerBodyCurrencyRegExpOne = exports.createCustomerBodyCurrencyMaxOne = exports.createCustomerBodyCurrencyMinOne = exports.createCustomerBodyUsageAttributionSubjectKeysMax = exports.createCustomerBodyKeyMax = exports.createCustomerBodyDescriptionMax = exports.createCustomerBodyNameMax = exports.updateBillingProfileBody = exports.updateBillingProfileBodyWorkflowTaxEnforcedDefault = exports.updateBillingProfileBodyWorkflowTaxEnabledDefault = exports.updateBillingProfileBodyWorkflowPaymentCollectionMethodDefault = exports.updateBillingProfileBodyWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.updateBillingProfileBodyWorkflowInvoicingProgressiveBillingDefault = exports.updateBillingProfileBodyWorkflowInvoicingDueAfterDefault = exports.updateBillingProfileBodyWorkflowInvoicingDraftPeriodDefault = exports.updateBillingProfileBodyWorkflowInvoicingAutoAdvanceDefault = exports.updateBillingProfileBodyWorkflowCollectionIntervalDefault = exports.updateBillingProfileBodyWorkflowCollectionAlignmentDefault = exports.updateBillingProfileBodySupplierAddressesMax = exports.updateBillingProfileBodySupplierAddressesItemCountryRegExpOne = exports.updateBillingProfileBodySupplierAddressesItemCountryMaxOne = exports.updateBillingProfileBodySupplierAddressesItemCountryMinOne = exports.updateBillingProfileBodySupplierTaxIdCodeMaxOne = exports.updateBillingProfileBodySupplierKeyMax = exports.updateBillingProfileBodyDescriptionMax = exports.updateBillingProfileBodyNameMax = exports.updateBillingProfileParams = exports.updateBillingProfilePathIdRegExp = exports.getBillingProfileQueryParams = exports.getBillingProfileParams = exports.getBillingProfilePathIdRegExp = exports.deleteBillingProfileParams = exports.deleteBillingProfilePathIdRegExp = exports.createBillingProfileBody = exports.createBillingProfileBodyAppsPaymentRegExp = exports.createBillingProfileBodyAppsInvoicingRegExp = exports.createBillingProfileBodyAppsTaxRegExp = exports.createBillingProfileBodyWorkflowTaxEnforcedDefault = exports.createBillingProfileBodyWorkflowTaxEnabledDefault = exports.createBillingProfileBodyWorkflowPaymentCollectionMethodDefault = exports.createBillingProfileBodyWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.createBillingProfileBodyWorkflowInvoicingProgressiveBillingDefault = exports.createBillingProfileBodyWorkflowInvoicingDueAfterDefault = exports.createBillingProfileBodyWorkflowInvoicingDraftPeriodDefault = exports.createBillingProfileBodyWorkflowInvoicingAutoAdvanceDefault = exports.createBillingProfileBodyWorkflowCollectionIntervalDefault = exports.createBillingProfileBodyWorkflowCollectionAlignmentDefault = exports.createBillingProfileBodySupplierAddressesMax = void 0;
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
12
|
+
exports.getCustomerEntitlementValueQueryParams = exports.getCustomerEntitlementValueParams = exports.getCustomerEntitlementValuePathFeatureKeyRegExp = exports.getCustomerEntitlementValuePathFeatureKeyMax = exports.deleteCustomerAppDataParams = exports.deleteCustomerAppDataPathAppIdRegExp = exports.upsertCustomerAppDataBody = exports.upsertCustomerAppDataBodyItem = exports.upsertCustomerAppDataBodyIdRegExpTwo = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyRegExpOne = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyMaxOne = exports.upsertCustomerAppDataBodyAppDescriptionMaxOne = exports.upsertCustomerAppDataBodyAppNameMaxOne = exports.upsertCustomerAppDataBodyAppIdRegExpOne = exports.upsertCustomerAppDataBodyIdRegExpOne = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyRegExp = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyMax = exports.upsertCustomerAppDataBodyAppDescriptionMax = exports.upsertCustomerAppDataBodyAppNameMax = exports.upsertCustomerAppDataBodyAppIdRegExp = exports.upsertCustomerAppDataBodyIdRegExp = exports.upsertCustomerAppDataParams = exports.listCustomerAppDataQueryParams = exports.listCustomerAppDataQueryPageSizeMax = exports.listCustomerAppDataQueryPageSizeDefault = exports.listCustomerAppDataQueryPageDefault = exports.listCustomerAppDataParams = exports.getCustomerAccessParams = exports.deleteCustomerParams = exports.updateCustomerBody = exports.updateCustomerBodyBillingAddressCountryRegExpOne = exports.updateCustomerBodyBillingAddressCountryMaxOne = exports.updateCustomerBodyBillingAddressCountryMinOne = exports.updateCustomerBodyCurrencyRegExpOne = exports.updateCustomerBodyCurrencyMaxOne = exports.updateCustomerBodyCurrencyMinOne = exports.updateCustomerBodyUsageAttributionSubjectKeysMax = exports.updateCustomerBodyKeyMax = exports.updateCustomerBodyDescriptionMax = exports.updateCustomerBodyNameMax = exports.updateCustomerParams = exports.getCustomerQueryParams = exports.getCustomerParams = exports.listCustomersQueryParams = exports.listCustomersQueryIncludeDeletedDefault = exports.listCustomersQueryPageSizeMax = exports.listCustomersQueryPageSizeDefault = exports.listCustomersQueryPageDefault = exports.createCustomerBody = exports.createCustomerBodyBillingAddressCountryRegExpOne = void 0;
|
|
13
|
+
exports.listGrantsQueryOffsetDefault = exports.listGrantsQueryPageSizeMax = exports.listGrantsQueryPageSizeDefault = exports.listGrantsQueryPageDefault = exports.listGrantsQueryIncludeDeletedDefault = exports.deleteFeatureParams = exports.getFeatureParams = exports.createFeatureBody = exports.createFeatureBodyMeterSlugRegExp = exports.createFeatureBodyMeterSlugMax = exports.createFeatureBodyKeyRegExp = exports.createFeatureBodyKeyMax = exports.listFeaturesQueryParams = exports.listFeaturesQueryLimitMax = exports.listFeaturesQueryLimitDefault = exports.listFeaturesQueryOffsetMin = exports.listFeaturesQueryOffsetDefault = exports.listFeaturesQueryPageSizeMax = exports.listFeaturesQueryPageSizeDefault = exports.listFeaturesQueryPageDefault = exports.listFeaturesQueryIncludeArchivedDefault = exports.ingestEventsBody = exports.ingestEventsBodyItemSpecversionDefault = exports.ingestEventsBodySpecversionDefault = exports.listEventsQueryParams = exports.listEventsQueryLimitMax = exports.listEventsQueryLimitDefault = exports.listEventsQueryCustomerIdItemRegExp = exports.listEventsQueryClientIdMax = exports.getEntitlementByIdParams = exports.getEntitlementByIdPathEntitlementIdRegExp = exports.listEntitlementsQueryParams = exports.listEntitlementsQueryLimitMax = exports.listEntitlementsQueryLimitDefault = exports.listEntitlementsQueryOffsetMin = exports.listEntitlementsQueryOffsetDefault = exports.listEntitlementsQueryPageSizeMax = exports.listEntitlementsQueryPageSizeDefault = exports.listEntitlementsQueryPageDefault = exports.listEntitlementsQueryExcludeInactiveDefault = exports.listCustomerSubscriptionsQueryParams = exports.listCustomerSubscriptionsQueryPageSizeMax = exports.listCustomerSubscriptionsQueryPageSizeDefault = exports.listCustomerSubscriptionsQueryPageDefault = exports.listCustomerSubscriptionsParams = exports.createCustomerStripePortalSessionBody = exports.createCustomerStripePortalSessionParams = exports.upsertCustomerStripeAppDataBody = exports.upsertCustomerStripeAppDataParams = exports.getCustomerStripeAppDataParams = void 0;
|
|
14
|
+
exports.queryMeterPostPathMeterIdOrSlugMax = exports.queryMeterQueryParams = exports.queryMeterQueryFilterCustomerIdMax = exports.queryMeterQueryWindowTimeZoneDefault = exports.queryMeterQueryClientIdMax = exports.queryMeterParams = exports.queryMeterPathMeterIdOrSlugRegExp = exports.queryMeterPathMeterIdOrSlugMax = exports.deleteMeterParams = exports.deleteMeterPathMeterIdOrSlugRegExp = exports.deleteMeterPathMeterIdOrSlugMax = exports.updateMeterBody = exports.updateMeterBodyNameMax = exports.updateMeterBodyDescriptionMax = exports.updateMeterParams = exports.updateMeterPathMeterIdOrSlugRegExp = exports.updateMeterPathMeterIdOrSlugMax = exports.getMeterParams = exports.getMeterPathMeterIdOrSlugRegExp = exports.getMeterPathMeterIdOrSlugMax = exports.createMeterBody = exports.createMeterBodySlugRegExp = exports.createMeterBodySlugMax = exports.createMeterBodyNameMax = exports.createMeterBodyDescriptionMax = exports.listMetersQueryParams = exports.listMetersQueryIncludeDeletedDefault = exports.listMetersQueryPageSizeMax = exports.listMetersQueryPageSizeDefault = exports.listMetersQueryPageDefault = exports.marketplaceOAuth2InstallAuthorizeQueryParams = exports.marketplaceOAuth2InstallAuthorizeParams = exports.marketplaceOAuth2InstallGetURLParams = exports.marketplaceAppAPIKeyInstallBody = exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault = exports.marketplaceAppAPIKeyInstallParams = exports.marketplaceAppInstallBody = exports.marketplaceAppInstallBodyCreateBillingProfileDefault = exports.marketplaceAppInstallParams = exports.getMarketplaceListingParams = exports.listMarketplaceListingsQueryParams = exports.listMarketplaceListingsQueryPageSizeMax = exports.listMarketplaceListingsQueryPageSizeDefault = exports.listMarketplaceListingsQueryPageDefault = exports.getProgressParams = exports.voidGrantParams = exports.listGrantsQueryParams = exports.listGrantsQueryLimitMax = exports.listGrantsQueryLimitDefault = exports.listGrantsQueryOffsetMin = void 0;
|
|
15
|
+
exports.createNotificationRuleBodyDisabledDefaultOne = exports.createNotificationRuleBodyFeaturesItemRegExp = exports.createNotificationRuleBodyFeaturesItemMax = exports.createNotificationRuleBodyChannelsItemRegExp = exports.createNotificationRuleBodyThresholdsMax = exports.createNotificationRuleBodyDisabledDefault = exports.listNotificationRulesQueryParams = exports.listNotificationRulesQueryPageSizeMax = exports.listNotificationRulesQueryPageSizeDefault = exports.listNotificationRulesQueryPageDefault = exports.listNotificationRulesQueryFeatureItemRegExp = exports.listNotificationRulesQueryFeatureItemMax = exports.listNotificationRulesQueryIncludeDisabledDefault = exports.listNotificationRulesQueryIncludeDeletedDefault = exports.getNotificationEventParams = exports.listNotificationEventsQueryParams = exports.listNotificationEventsQueryPageSizeMax = exports.listNotificationEventsQueryPageSizeDefault = exports.listNotificationEventsQueryPageDefault = exports.listNotificationEventsQueryChannelItemRegExp = exports.listNotificationEventsQueryRuleItemRegExp = exports.deleteNotificationChannelParams = exports.deleteNotificationChannelPathChannelIdRegExp = exports.getNotificationChannelParams = exports.getNotificationChannelPathChannelIdRegExp = exports.updateNotificationChannelBody = exports.updateNotificationChannelBodySigningSecretRegExp = exports.updateNotificationChannelBodyDisabledDefault = exports.updateNotificationChannelParams = exports.updateNotificationChannelPathChannelIdRegExp = exports.createNotificationChannelBody = exports.createNotificationChannelBodySigningSecretRegExp = exports.createNotificationChannelBodyDisabledDefault = exports.listNotificationChannelsQueryParams = exports.listNotificationChannelsQueryPageSizeMax = exports.listNotificationChannelsQueryPageSizeDefault = exports.listNotificationChannelsQueryPageDefault = exports.listNotificationChannelsQueryIncludeDisabledDefault = exports.listNotificationChannelsQueryIncludeDeletedDefault = exports.listMeterSubjectsParams = exports.listMeterSubjectsPathMeterIdOrSlugRegExp = exports.listMeterSubjectsPathMeterIdOrSlugMax = exports.queryMeterPostBody = exports.queryMeterPostBodyGroupByMax = exports.queryMeterPostBodyFilterCustomerIdMax = exports.queryMeterPostBodySubjectMax = exports.queryMeterPostBodyWindowTimeZoneDefault = exports.queryMeterPostBodyClientIdMax = exports.queryMeterPostParams = exports.queryMeterPostPathMeterIdOrSlugRegExp = void 0;
|
|
16
|
+
exports.createPlanBodyProRatingConfigEnabledDefault = exports.createPlanBodyCurrencyDefault = exports.createPlanBodyCurrencyRegExpOne = exports.createPlanBodyCurrencyMaxOne = exports.createPlanBodyCurrencyMinOne = exports.createPlanBodyKeyRegExp = exports.createPlanBodyKeyMax = exports.createPlanBodyDescriptionMax = exports.createPlanBodyNameMax = exports.listPlansQueryParams = exports.listPlansQueryPageSizeMax = exports.listPlansQueryPageSizeDefault = exports.listPlansQueryPageDefault = exports.listPlansQueryCurrencyItemRegExp = exports.listPlansQueryCurrencyItemMax = exports.listPlansQueryCurrencyItemMin = exports.listPlansQueryKeyItemRegExp = exports.listPlansQueryKeyItemMax = exports.listPlansQueryIdItemRegExp = exports.listPlansQueryIncludeDeletedDefault = exports.testNotificationRuleParams = exports.testNotificationRulePathRuleIdRegExp = exports.deleteNotificationRuleParams = exports.deleteNotificationRulePathRuleIdRegExp = exports.getNotificationRuleParams = exports.getNotificationRulePathRuleIdRegExp = exports.updateNotificationRuleBody = exports.updateNotificationRuleBodyChannelsItemRegExpThree = exports.updateNotificationRuleBodyDisabledDefaultThree = exports.updateNotificationRuleBodyChannelsItemRegExpTwo = exports.updateNotificationRuleBodyDisabledDefaultTwo = exports.updateNotificationRuleBodyFeaturesItemRegExpOne = exports.updateNotificationRuleBodyFeaturesItemMaxOne = exports.updateNotificationRuleBodyChannelsItemRegExpOne = exports.updateNotificationRuleBodyDisabledDefaultOne = exports.updateNotificationRuleBodyFeaturesItemRegExp = exports.updateNotificationRuleBodyFeaturesItemMax = exports.updateNotificationRuleBodyChannelsItemRegExp = exports.updateNotificationRuleBodyThresholdsMax = exports.updateNotificationRuleBodyDisabledDefault = exports.updateNotificationRuleParams = exports.updateNotificationRulePathRuleIdRegExp = exports.createNotificationRuleBody = exports.createNotificationRuleBodyChannelsItemRegExpThree = exports.createNotificationRuleBodyDisabledDefaultThree = exports.createNotificationRuleBodyChannelsItemRegExpTwo = exports.createNotificationRuleBodyDisabledDefaultTwo = exports.createNotificationRuleBodyFeaturesItemRegExpOne = exports.createNotificationRuleBodyFeaturesItemMaxOne = exports.createNotificationRuleBodyChannelsItemRegExpOne = void 0;
|
|
17
|
+
exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.createPlanBodyPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPriceMultiplierDefault = exports.createPlanBodyPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyMaxOne = exports.createPlanBodyPhasesItemRateCardsItemDescriptionMaxOne = exports.createPlanBodyPhasesItemRateCardsItemNameMaxOne = exports.createPlanBodyPhasesItemRateCardsItemKeyRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemKeyMaxOne = exports.createPlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPricePaymentTermDefault = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyRegExp = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyMax = exports.createPlanBodyPhasesItemRateCardsItemDescriptionMax = exports.createPlanBodyPhasesItemRateCardsItemNameMax = exports.createPlanBodyPhasesItemRateCardsItemKeyRegExp = exports.createPlanBodyPhasesItemRateCardsItemKeyMax = exports.createPlanBodyPhasesItemDescriptionMax = exports.createPlanBodyPhasesItemNameMax = exports.createPlanBodyPhasesItemKeyRegExp = exports.createPlanBodyPhasesItemKeyMax = exports.createPlanBodyProRatingConfigDefault = exports.createPlanBodyProRatingConfigModeDefault = void 0;
|
|
18
|
+
exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemDescriptionMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemNameMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemKeyRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemKeyMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPricePaymentTermDefault = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyRegExp = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyMax = exports.updatePlanBodyPhasesItemRateCardsItemDescriptionMax = exports.updatePlanBodyPhasesItemRateCardsItemNameMax = exports.updatePlanBodyPhasesItemRateCardsItemKeyRegExp = exports.updatePlanBodyPhasesItemRateCardsItemKeyMax = exports.updatePlanBodyPhasesItemDescriptionMax = exports.updatePlanBodyPhasesItemNameMax = exports.updatePlanBodyPhasesItemKeyRegExp = exports.updatePlanBodyPhasesItemKeyMax = exports.updatePlanBodyProRatingConfigDefault = exports.updatePlanBodyProRatingConfigModeDefault = exports.updatePlanBodyProRatingConfigEnabledDefault = exports.updatePlanBodyDescriptionMax = exports.updatePlanBodyNameMax = exports.updatePlanParams = exports.updatePlanPathPlanIdRegExp = exports.nextPlanParams = exports.nextPlanPathPlanIdOrKeyRegExp = exports.nextPlanPathPlanIdOrKeyMax = exports.createPlanBody = exports.createPlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = void 0;
|
|
19
|
+
exports.archivePlanParams = exports.archivePlanPathPlanIdRegExp = exports.deletePlanAddonParams = exports.deletePlanAddonPathPlanAddonIdRegExp = exports.deletePlanAddonPathPlanIdRegExp = exports.getPlanAddonParams = exports.getPlanAddonPathPlanAddonIdRegExp = exports.getPlanAddonPathPlanAddonIdMax = exports.getPlanAddonPathPlanIdRegExp = exports.getPlanAddonPathPlanIdMax = exports.updatePlanAddonBody = exports.updatePlanAddonParams = exports.updatePlanAddonPathPlanAddonIdRegExp = exports.updatePlanAddonPathPlanIdRegExp = exports.createPlanAddonBody = exports.createPlanAddonBodyAddonIdRegExp = exports.createPlanAddonParams = exports.createPlanAddonPathPlanIdRegExp = exports.listPlanAddonsQueryParams = exports.listPlanAddonsQueryPageSizeMax = exports.listPlanAddonsQueryPageSizeDefault = exports.listPlanAddonsQueryPageDefault = exports.listPlanAddonsQueryKeyItemRegExp = exports.listPlanAddonsQueryKeyItemMax = exports.listPlanAddonsQueryIdItemRegExp = exports.listPlanAddonsQueryIncludeDeletedDefault = exports.listPlanAddonsParams = exports.listPlanAddonsPathPlanIdRegExp = exports.listPlanAddonsPathPlanIdMax = exports.deletePlanParams = exports.deletePlanPathPlanIdRegExp = exports.getPlanQueryParams = exports.getPlanQueryIncludeLatestDefault = exports.getPlanParams = exports.getPlanPathPlanIdRegExp = exports.getPlanPathPlanIdMax = exports.updatePlanBody = exports.updatePlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPriceMultiplierDefault = exports.updatePlanBodyPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = void 0;
|
|
20
|
+
exports.createEntitlementBodyFeatureKeyRegExpOne = exports.createEntitlementBodyFeatureKeyMaxOne = exports.createEntitlementBodyPreserveOverageAtResetDefault = exports.createEntitlementBodyIssueAfterResetPriorityMax = exports.createEntitlementBodyIssueAfterResetPriorityDefault = exports.createEntitlementBodyIssueAfterResetMin = exports.createEntitlementBodyIsUnlimitedDefault = exports.createEntitlementBodyIsSoftLimitDefault = exports.createEntitlementBodyFeatureIdRegExp = exports.createEntitlementBodyFeatureKeyRegExp = exports.createEntitlementBodyFeatureKeyMax = exports.createEntitlementParams = exports.deleteSubjectParams = exports.getSubjectParams = exports.upsertSubjectBody = exports.upsertSubjectBodyItem = exports.createStripeCheckoutSessionBody = exports.createStripeCheckoutSessionBodyOptionsCustomTextTermsOfServiceAcceptanceMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextSubmitMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextShippingAddressMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextAfterSubmitMessageMax = exports.createStripeCheckoutSessionBodyOptionsCurrencyRegExpOne = exports.createStripeCheckoutSessionBodyOptionsCurrencyMaxOne = exports.createStripeCheckoutSessionBodyOptionsCurrencyMinOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryRegExpOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryMaxOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryMinOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyRegExpOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyMaxOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyMinOne = exports.createStripeCheckoutSessionBodyCustomerUsageAttributionSubjectKeysMax = exports.createStripeCheckoutSessionBodyCustomerKeyMaxOne = exports.createStripeCheckoutSessionBodyCustomerDescriptionMax = exports.createStripeCheckoutSessionBodyCustomerNameMax = exports.createStripeCheckoutSessionBodyCustomerIdRegExp = exports.createStripeCheckoutSessionBodyAppIdRegExp = exports.invalidatePortalTokensBody = exports.listPortalTokensQueryParams = exports.listPortalTokensQueryLimitMax = exports.listPortalTokensQueryLimitDefault = exports.createPortalTokenBody = exports.queryPortalMeterQueryParams = exports.queryPortalMeterQueryFilterCustomerIdMax = exports.queryPortalMeterQueryWindowTimeZoneDefault = exports.queryPortalMeterQueryClientIdMax = exports.queryPortalMeterParams = exports.queryPortalMeterPathMeterSlugRegExp = exports.queryPortalMeterPathMeterSlugMax = exports.publishPlanParams = exports.publishPlanPathPlanIdRegExp = void 0;
|
|
21
|
+
exports.createSubscriptionBodyCustomPlanNameMax = exports.createSubscriptionBodyCustomerKeyMax = exports.createSubscriptionBodyCustomerIdRegExp = exports.createSubscriptionBodyTimingDefault = exports.createSubscriptionBodyPlanKeyRegExp = exports.createSubscriptionBodyPlanKeyMax = exports.resetEntitlementUsageBody = exports.resetEntitlementUsageParams = exports.getEntitlementHistoryQueryParams = exports.getEntitlementHistoryQueryWindowTimeZoneDefault = exports.getEntitlementHistoryParams = exports.deleteEntitlementParams = exports.getEntitlementParams = exports.getEntitlementValueQueryParams = exports.getEntitlementValueParams = exports.overrideEntitlementBody = exports.overrideEntitlementBodyFeatureIdRegExpTwo = exports.overrideEntitlementBodyFeatureKeyRegExpTwo = exports.overrideEntitlementBodyFeatureKeyMaxTwo = exports.overrideEntitlementBodyFeatureIdRegExpOne = exports.overrideEntitlementBodyFeatureKeyRegExpOne = exports.overrideEntitlementBodyFeatureKeyMaxOne = exports.overrideEntitlementBodyPreserveOverageAtResetDefault = exports.overrideEntitlementBodyIssueAfterResetPriorityMax = exports.overrideEntitlementBodyIssueAfterResetPriorityDefault = exports.overrideEntitlementBodyIssueAfterResetMin = exports.overrideEntitlementBodyIsUnlimitedDefault = exports.overrideEntitlementBodyIsSoftLimitDefault = exports.overrideEntitlementBodyFeatureIdRegExp = exports.overrideEntitlementBodyFeatureKeyRegExp = exports.overrideEntitlementBodyFeatureKeyMax = exports.overrideEntitlementParams = exports.createGrantBody = exports.createGrantBodyMinRolloverAmountDefault = exports.createGrantBodyMaxRolloverAmountDefault = exports.createGrantBodyExpirationCountMax = exports.createGrantBodyPriorityMax = exports.createGrantBodyAmountMin = exports.createGrantParams = exports.listEntitlementGrantsQueryParams = exports.listEntitlementGrantsQueryIncludeDeletedDefault = exports.listEntitlementGrantsParams = exports.listSubjectEntitlementsQueryParams = exports.listSubjectEntitlementsQueryIncludeDeletedDefault = exports.listSubjectEntitlementsParams = exports.createEntitlementBody = exports.createEntitlementBodyFeatureIdRegExpTwo = exports.createEntitlementBodyFeatureKeyRegExpTwo = exports.createEntitlementBodyFeatureKeyMaxTwo = exports.createEntitlementBodyFeatureIdRegExpOne = void 0;
|
|
22
|
+
exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMax = exports.createSubscriptionBodyCustomPlanPhasesItemDescriptionMax = exports.createSubscriptionBodyCustomPlanPhasesItemNameMax = exports.createSubscriptionBodyCustomPlanPhasesItemKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemKeyMax = exports.createSubscriptionBodyCustomPlanProRatingConfigDefault = exports.createSubscriptionBodyCustomPlanProRatingConfigModeDefault = exports.createSubscriptionBodyCustomPlanProRatingConfigEnabledDefault = exports.createSubscriptionBodyCustomPlanCurrencyDefault = exports.createSubscriptionBodyCustomPlanCurrencyRegExpOne = exports.createSubscriptionBodyCustomPlanCurrencyMaxOne = exports.createSubscriptionBodyCustomPlanCurrencyMinOne = exports.createSubscriptionBodyCustomPlanDescriptionMax = void 0;
|
|
23
|
+
exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemUpToAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPricePaymentTermDefaultTwo = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardTaxConfigStripeCodeRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetMinOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIsSoftLimitDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardDescriptionMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardNameMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardKeyRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardKeyMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardDiscountsUsageQuantityRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPricePaymentTermDefault = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardTaxConfigStripeCodeRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplatePreserveOverageAtResetDefault = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityMax = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityDefault = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetMin = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIsSoftLimitDefault = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyMax = exports.editSubscriptionBodyCustomizationsItemRateCardDescriptionMax = exports.editSubscriptionBodyCustomizationsItemRateCardNameMax = exports.editSubscriptionBodyCustomizationsItemRateCardKeyRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardKeyMax = exports.editSubscriptionParams = exports.editSubscriptionPathSubscriptionIdRegExp = exports.getSubscriptionQueryParams = exports.getSubscriptionParams = exports.getSubscriptionPathSubscriptionIdRegExp = exports.createSubscriptionBody = exports.createSubscriptionBodyCustomerKeyMaxOne = exports.createSubscriptionBodyCustomerIdRegExpOne = exports.createSubscriptionBodyTimingDefaultFour = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierDefault = void 0;
|
|
24
|
+
exports.changeSubscriptionBodyCustomPlanCurrencyMaxOne = exports.changeSubscriptionBodyCustomPlanCurrencyMinOne = exports.changeSubscriptionBodyCustomPlanDescriptionMax = exports.changeSubscriptionBodyCustomPlanNameMax = exports.changeSubscriptionBodyPlanKeyRegExp = exports.changeSubscriptionBodyPlanKeyMax = exports.changeSubscriptionParams = exports.changeSubscriptionPathSubscriptionIdRegExp = exports.cancelSubscriptionBody = exports.cancelSubscriptionParams = exports.cancelSubscriptionPathSubscriptionIdRegExp = exports.updateSubscriptionAddonBody = exports.updateSubscriptionAddonBodyQuantityMin = exports.updateSubscriptionAddonBodyDescriptionMax = exports.updateSubscriptionAddonBodyNameMax = exports.updateSubscriptionAddonParams = exports.updateSubscriptionAddonPathSubscriptionAddonIdRegExp = exports.updateSubscriptionAddonPathSubscriptionIdRegExp = exports.getSubscriptionAddonParams = exports.getSubscriptionAddonPathSubscriptionAddonIdRegExp = exports.getSubscriptionAddonPathSubscriptionIdRegExp = exports.listSubscriptionAddonsParams = exports.listSubscriptionAddonsPathSubscriptionIdRegExp = exports.createSubscriptionAddonBody = exports.createSubscriptionAddonBodyAddonIdRegExp = exports.createSubscriptionAddonBodyQuantityMin = exports.createSubscriptionAddonBodyDescriptionMax = exports.createSubscriptionAddonBodyNameMax = exports.createSubscriptionAddonParams = exports.createSubscriptionAddonPathSubscriptionIdRegExp = exports.deleteSubscriptionParams = exports.deleteSubscriptionPathSubscriptionIdRegExp = exports.editSubscriptionBody = exports.editSubscriptionBodyCustomizationsMax = exports.editSubscriptionBodyCustomizationsItemPhaseKeyRegExpTwo = exports.editSubscriptionBodyCustomizationsItemPhaseKeyMaxTwo = exports.editSubscriptionBodyCustomizationsItemPhaseDiscountsUsageQuantityRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardDiscountsUsageQuantityRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceQuantityPerPackageRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMultiplierDefault = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMultiplierRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemUnitPriceAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemFlatPriceAmountRegExpOne = void 0;
|
|
25
|
+
exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMax = exports.changeSubscriptionBodyCustomPlanPhasesItemDescriptionMax = exports.changeSubscriptionBodyCustomPlanPhasesItemNameMax = exports.changeSubscriptionBodyCustomPlanPhasesItemKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemKeyMax = exports.changeSubscriptionBodyCustomPlanProRatingConfigDefault = exports.changeSubscriptionBodyCustomPlanProRatingConfigModeDefault = exports.changeSubscriptionBodyCustomPlanProRatingConfigEnabledDefault = exports.changeSubscriptionBodyCustomPlanCurrencyDefault = exports.changeSubscriptionBodyCustomPlanCurrencyRegExpOne = void 0;
|
|
26
|
+
exports.listCustomerEntitlementGrantsV2Params = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = exports.deleteCustomerEntitlementV2Params = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.getCustomerEntitlementV2Params = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.listCustomerEntitlementsV2QueryParams = exports.listCustomerEntitlementsV2QueryLimitMax = exports.listCustomerEntitlementsV2QueryLimitDefault = exports.listCustomerEntitlementsV2QueryOffsetMin = exports.listCustomerEntitlementsV2QueryOffsetDefault = exports.listCustomerEntitlementsV2QueryPageSizeMax = exports.listCustomerEntitlementsV2QueryPageSizeDefault = exports.listCustomerEntitlementsV2QueryPageDefault = exports.listCustomerEntitlementsV2QueryIncludeDeletedDefault = exports.listCustomerEntitlementsV2Params = exports.createCustomerEntitlementV2Body = exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo = exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo = exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo = exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne = exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne = exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne = exports.createCustomerEntitlementV2BodyPreserveOverageAtResetDefault = exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax = exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = exports.createCustomerEntitlementV2BodyIssueAfterResetMin = exports.createCustomerEntitlementV2BodyIsUnlimitedDefault = exports.createCustomerEntitlementV2BodyIsSoftLimitDefault = exports.createCustomerEntitlementV2BodyFeatureIdRegExp = exports.createCustomerEntitlementV2BodyFeatureKeyRegExp = exports.createCustomerEntitlementV2BodyFeatureKeyMax = exports.createCustomerEntitlementV2Params = exports.unscheduleCancelationParams = exports.unscheduleCancelationPathSubscriptionIdRegExp = exports.restoreSubscriptionParams = exports.restoreSubscriptionPathSubscriptionIdRegExp = exports.migrateSubscriptionBody = exports.migrateSubscriptionBodyTimingDefault = exports.migrateSubscriptionParams = exports.migrateSubscriptionPathSubscriptionIdRegExp = exports.changeSubscriptionBody = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpSeven = void 0;
|
|
27
|
+
exports.listEventsV2QueryLimitMax = exports.listEventsV2QueryLimitDefault = exports.getCustomerEntitlementValueV2QueryParams = exports.getCustomerEntitlementValueV2Params = exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax = exports.resetCustomerEntitlementUsageV2Body = exports.resetCustomerEntitlementUsageV2Params = exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp = exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax = exports.overrideCustomerEntitlementV2Body = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo = exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne = exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne = exports.overrideCustomerEntitlementV2BodyPreserveOverageAtResetDefault = exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax = exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin = exports.overrideCustomerEntitlementV2BodyIsUnlimitedDefault = exports.overrideCustomerEntitlementV2BodyIsSoftLimitDefault = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp = exports.overrideCustomerEntitlementV2BodyFeatureKeyMax = exports.overrideCustomerEntitlementV2Params = exports.getCustomerEntitlementHistoryV2QueryParams = exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault = exports.getCustomerEntitlementHistoryV2Params = exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax = exports.createCustomerEntitlementGrantV2Body = exports.createCustomerEntitlementGrantV2BodyMinRolloverAmountDefault = exports.createCustomerEntitlementGrantV2BodyMaxRolloverAmountDefault = exports.createCustomerEntitlementGrantV2BodyExpirationCountMax = exports.createCustomerEntitlementGrantV2BodyPriorityMax = exports.createCustomerEntitlementGrantV2BodyAmountMin = exports.createCustomerEntitlementGrantV2Params = exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp = exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax = exports.listCustomerEntitlementGrantsV2QueryParams = exports.listCustomerEntitlementGrantsV2QueryLimitMax = exports.listCustomerEntitlementGrantsV2QueryLimitDefault = exports.listCustomerEntitlementGrantsV2QueryOffsetMin = exports.listCustomerEntitlementGrantsV2QueryOffsetDefault = exports.listCustomerEntitlementGrantsV2QueryPageSizeMax = exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = exports.listCustomerEntitlementGrantsV2QueryPageDefault = exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = void 0;
|
|
28
|
+
exports.listGrantsV2QueryParams = exports.listGrantsV2QueryLimitMax = exports.listGrantsV2QueryLimitDefault = exports.listGrantsV2QueryOffsetMin = exports.listGrantsV2QueryOffsetDefault = exports.listGrantsV2QueryPageSizeMax = exports.listGrantsV2QueryPageSizeDefault = exports.listGrantsV2QueryPageDefault = exports.listGrantsV2QueryIncludeDeletedDefault = exports.listEventsV2QueryParams = exports.listEventsV2QueryClientIdMax = 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
|
-
});
|
|
5338
|
-
exports.listCustomerEntitlementGrantsQueryIncludeDeletedDefault = false;
|
|
5339
|
-
exports.listCustomerEntitlementGrantsQueryParams = zod_1.z.object({
|
|
5340
|
-
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
5341
|
-
orderBy: zod_1.z.enum(['id', 'createdAt', 'updatedAt']).optional(),
|
|
5342
5166
|
});
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
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,619 +5550,311 @@ 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
|
-
|
|
5969
|
-
.
|
|
5970
|
-
.
|
|
5971
|
-
.
|
|
5972
|
-
.describe('
|
|
5578
|
+
.default(exports.listMarketplaceListingsQueryPageDefault)
|
|
5579
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5580
|
+
pageSize: zod_1.z.coerce
|
|
5581
|
+
.number()
|
|
5582
|
+
.min(1)
|
|
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
|
|
5611
|
+
.string()
|
|
5973
5612
|
.optional()
|
|
5974
|
-
.describe(
|
|
5975
|
-
|
|
5976
|
-
|
|
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()
|
|
5977
5636
|
.optional()
|
|
5978
|
-
.describe(
|
|
5979
|
-
|
|
5637
|
+
.describe("Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."),
|
|
5638
|
+
});
|
|
5639
|
+
/**
|
|
5640
|
+
* Install an app via OAuth.
|
|
5641
|
+
Returns a URL to start the OAuth 2.0 flow.
|
|
5642
|
+
* @summary Get OAuth2 install URL
|
|
5643
|
+
*/
|
|
5644
|
+
exports.marketplaceOAuth2InstallGetURLParams = zod_1.z.object({
|
|
5645
|
+
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
5646
|
+
});
|
|
5647
|
+
/**
|
|
5648
|
+
* Authorize OAuth2 code.
|
|
5649
|
+
Verifies the OAuth code and exchanges it for a token and refresh token
|
|
5650
|
+
* @summary Install app via OAuth2
|
|
5651
|
+
*/
|
|
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
|
|
5980
5659
|
.string()
|
|
5981
5660
|
.optional()
|
|
5982
|
-
.describe('
|
|
5983
|
-
|
|
5984
|
-
.
|
|
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
|
+
])
|
|
5985
5672
|
.optional()
|
|
5986
|
-
.describe('
|
|
5987
|
-
|
|
5988
|
-
.
|
|
5673
|
+
.describe('Error code.\nRequired with the error response.'),
|
|
5674
|
+
error_description: zod_1.z.coerce
|
|
5675
|
+
.string()
|
|
5989
5676
|
.optional()
|
|
5990
|
-
.describe('
|
|
5991
|
-
|
|
5992
|
-
.number()
|
|
5993
|
-
.min(1)
|
|
5994
|
-
.max(exports.listEventsQueryLimitMax)
|
|
5995
|
-
.default(exports.listEventsQueryLimitDefault)
|
|
5996
|
-
.describe('Number of events to return.'),
|
|
5997
|
-
subject: zod_1.z.coerce
|
|
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
|
|
5998
5679
|
.string()
|
|
5999
5680
|
.optional()
|
|
6000
|
-
.describe('
|
|
6001
|
-
|
|
6002
|
-
.
|
|
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()
|
|
6003
5684
|
.optional()
|
|
6004
|
-
.describe('
|
|
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.'),
|
|
6005
5686
|
});
|
|
6006
5687
|
/**
|
|
6007
|
-
*
|
|
6008
|
-
* @summary
|
|
6009
|
-
*/
|
|
6010
|
-
exports.ingestEventsBodySpecversionDefault = '1.0';
|
|
6011
|
-
exports.ingestEventsBodyItemSpecversionDefault = '1.0';
|
|
6012
|
-
exports.ingestEventsBody = zod_1.z
|
|
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.');
|
|
6094
|
-
/**
|
|
6095
|
-
* List features.
|
|
6096
|
-
* @summary List features
|
|
5688
|
+
* List meters.
|
|
5689
|
+
* @summary List meters
|
|
6097
5690
|
*/
|
|
6098
|
-
exports.
|
|
6099
|
-
exports.
|
|
6100
|
-
exports.
|
|
6101
|
-
exports.
|
|
6102
|
-
exports.
|
|
6103
|
-
|
|
6104
|
-
exports.listFeaturesQueryLimitDefault = 100;
|
|
6105
|
-
exports.listFeaturesQueryLimitMax = 1000;
|
|
6106
|
-
exports.listFeaturesQueryParams = zod_1.z.object({
|
|
6107
|
-
includeArchived: zod_1.z.coerce
|
|
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
|
|
6108
5697
|
.boolean()
|
|
6109
5698
|
.optional()
|
|
6110
|
-
.describe('
|
|
6111
|
-
limit: zod_1.z.coerce
|
|
6112
|
-
.number()
|
|
6113
|
-
.min(1)
|
|
6114
|
-
.max(exports.listFeaturesQueryLimitMax)
|
|
6115
|
-
.default(exports.listFeaturesQueryLimitDefault)
|
|
6116
|
-
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
6117
|
-
meterSlug: zod_1.z
|
|
6118
|
-
.array(zod_1.z.coerce.string())
|
|
6119
|
-
.optional()
|
|
6120
|
-
.describe('Filter by meterSlug'),
|
|
6121
|
-
offset: zod_1.z.coerce
|
|
6122
|
-
.number()
|
|
6123
|
-
.min(exports.listFeaturesQueryOffsetMin)
|
|
6124
|
-
.optional()
|
|
6125
|
-
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
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
|
-
Only meters with SUM and COUNT aggregation are supported for features.
|
|
6147
|
-
Features cannot be updated later, only archived.
|
|
6148
|
-
* @summary Create feature
|
|
5718
|
+
* Create a meter.
|
|
5719
|
+
* @summary Create meter
|
|
6149
5720
|
*/
|
|
6150
|
-
exports.
|
|
6151
|
-
exports.
|
|
6152
|
-
exports.
|
|
6153
|
-
exports.
|
|
6154
|
-
exports.
|
|
5721
|
+
exports.createMeterBodyDescriptionMax = 1024;
|
|
5722
|
+
exports.createMeterBodyNameMax = 256;
|
|
5723
|
+
exports.createMeterBodySlugMax = 64;
|
|
5724
|
+
exports.createMeterBodySlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5725
|
+
exports.createMeterBody = zod_1.z
|
|
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
|
-
});
|
|
6257
|
-
/**
|
|
6258
|
-
* Get progress
|
|
6259
|
-
* @summary Get progress
|
|
6260
|
-
*/
|
|
6261
|
-
exports.getProgressParams = zod_1.z.object({
|
|
6262
|
-
id: zod_1.z.coerce.string(),
|
|
6263
|
-
});
|
|
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.');
|
|
6264
5824
|
/**
|
|
6265
|
-
*
|
|
6266
|
-
* @summary
|
|
5825
|
+
* Delete a meter.
|
|
5826
|
+
* @summary Delete meter
|
|
6267
5827
|
*/
|
|
6268
|
-
exports.
|
|
6269
|
-
exports.
|
|
6270
|
-
exports.
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
.number()
|
|
6274
|
-
.min(1)
|
|
6275
|
-
.default(exports.listMarketplaceListingsQueryPageDefault)
|
|
6276
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
6277
|
-
pageSize: zod_1.z.coerce
|
|
6278
|
-
.number()
|
|
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()
|
|
6279
5833
|
.min(1)
|
|
6280
|
-
.max(exports.
|
|
6281
|
-
.
|
|
6282
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6283
|
-
});
|
|
6284
|
-
/**
|
|
6285
|
-
* Get a marketplace listing by type.
|
|
6286
|
-
* @summary Get app details by type
|
|
6287
|
-
*/
|
|
6288
|
-
exports.getMarketplaceListingParams = zod_1.z.object({
|
|
6289
|
-
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
5834
|
+
.max(exports.deleteMeterPathMeterIdOrSlugMax)
|
|
5835
|
+
.regex(exports.deleteMeterPathMeterIdOrSlugRegExp),
|
|
6290
5836
|
});
|
|
6291
5837
|
/**
|
|
6292
|
-
*
|
|
6293
|
-
* @summary
|
|
5838
|
+
* Query meter for usage.
|
|
5839
|
+
* @summary Query meter
|
|
6294
5840
|
*/
|
|
6295
|
-
exports.
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
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()
|
|
5846
|
+
.min(1)
|
|
5847
|
+
.max(exports.queryMeterPathMeterIdOrSlugMax)
|
|
5848
|
+
.regex(exports.queryMeterPathMeterIdOrSlugRegExp),
|
|
6299
5849
|
});
|
|
6300
|
-
exports.
|
|
6301
|
-
exports.
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
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
|
|
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
|
|
6308
5855
|
.string()
|
|
6309
|
-
.
|
|
6310
|
-
.
|
|
6311
|
-
})
|
|
6312
|
-
.describe('Marketplace install request payload.');
|
|
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()
|
|
6333
|
-
.optional()
|
|
6334
|
-
.describe("Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."),
|
|
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()
|
|
6357
|
-
.optional()
|
|
6358
|
-
.describe('Authorization code which the client will later exchange for an access token.\nRequired with the success response.'),
|
|
6359
|
-
error: zod_1.z
|
|
6360
|
-
.enum([
|
|
6361
|
-
'invalid_request',
|
|
6362
|
-
'unauthorized_client',
|
|
6363
|
-
'access_denied',
|
|
6364
|
-
'unsupported_response_type',
|
|
6365
|
-
'invalid_scope',
|
|
6366
|
-
'server_error',
|
|
6367
|
-
'temporarily_unavailable',
|
|
6368
|
-
])
|
|
6369
|
-
.optional()
|
|
6370
|
-
.describe('Error code.\nRequired with the error response.'),
|
|
6371
|
-
error_description: zod_1.z.coerce
|
|
6372
|
-
.string()
|
|
6373
|
-
.optional()
|
|
6374
|
-
.describe('Optional human-readable text providing additional information,\nused to assist the client developer in understanding the error that occurred.'),
|
|
6375
|
-
error_uri: zod_1.z.coerce
|
|
6376
|
-
.string()
|
|
6377
|
-
.optional()
|
|
6378
|
-
.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'),
|
|
6379
|
-
state: zod_1.z.coerce
|
|
6380
|
-
.string()
|
|
6381
|
-
.optional()
|
|
6382
|
-
.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.'),
|
|
6383
|
-
});
|
|
6384
|
-
/**
|
|
6385
|
-
* List meters.
|
|
6386
|
-
* @summary List meters
|
|
6387
|
-
*/
|
|
6388
|
-
exports.listMetersQueryPageDefault = 1;
|
|
6389
|
-
exports.listMetersQueryPageSizeDefault = 100;
|
|
6390
|
-
exports.listMetersQueryPageSizeMax = 1000;
|
|
6391
|
-
exports.listMetersQueryIncludeDeletedDefault = false;
|
|
6392
|
-
exports.listMetersQueryParams = zod_1.z.object({
|
|
6393
|
-
includeDeleted: zod_1.z.coerce
|
|
6394
|
-
.boolean()
|
|
6395
|
-
.optional()
|
|
6396
|
-
.describe('Include deleted meters.'),
|
|
6397
|
-
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6398
|
-
orderBy: zod_1.z
|
|
6399
|
-
.enum(['key', 'name', 'aggregation', 'createdAt', 'updatedAt'])
|
|
6400
|
-
.optional()
|
|
6401
|
-
.describe('The order by field.'),
|
|
6402
|
-
page: zod_1.z.coerce
|
|
6403
|
-
.number()
|
|
6404
|
-
.min(1)
|
|
6405
|
-
.default(exports.listMetersQueryPageDefault)
|
|
6406
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
6407
|
-
pageSize: zod_1.z.coerce
|
|
6408
|
-
.number()
|
|
6409
|
-
.min(1)
|
|
6410
|
-
.max(exports.listMetersQueryPageSizeMax)
|
|
6411
|
-
.default(exports.listMetersQueryPageSizeDefault)
|
|
6412
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6413
|
-
});
|
|
6414
|
-
/**
|
|
6415
|
-
* Create a meter.
|
|
6416
|
-
* @summary Create meter
|
|
6417
|
-
*/
|
|
6418
|
-
exports.createMeterBodyDescriptionMax = 1024;
|
|
6419
|
-
exports.createMeterBodyNameMax = 256;
|
|
6420
|
-
exports.createMeterBodySlugMax = 64;
|
|
6421
|
-
exports.createMeterBodySlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
6422
|
-
exports.createMeterBody = zod_1.z
|
|
6423
|
-
.object({
|
|
6424
|
-
aggregation: zod_1.z
|
|
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
|
|
6442
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6443
|
-
.optional()
|
|
6444
|
-
.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.'),
|
|
6445
|
-
metadata: zod_1.z
|
|
6446
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
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)
|
|
6454
|
-
.optional()
|
|
6455
|
-
.describe('Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.'),
|
|
6456
|
-
slug: zod_1.z.coerce
|
|
6457
|
-
.string()
|
|
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
|
|
6463
|
-
.string()
|
|
6464
|
-
.min(1)
|
|
6465
|
-
.optional()
|
|
6466
|
-
.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."),
|
|
6467
|
-
})
|
|
6468
|
-
.describe('A meter create model.');
|
|
6469
|
-
/**
|
|
6470
|
-
* Get a meter by ID or slug.
|
|
6471
|
-
* @summary Get meter
|
|
6472
|
-
*/
|
|
6473
|
-
exports.getMeterPathMeterIdOrSlugMax = 64;
|
|
6474
|
-
exports.getMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6475
|
-
exports.getMeterParams = zod_1.z.object({
|
|
6476
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6477
|
-
.string()
|
|
6478
|
-
.min(1)
|
|
6479
|
-
.max(exports.getMeterPathMeterIdOrSlugMax)
|
|
6480
|
-
.regex(exports.getMeterPathMeterIdOrSlugRegExp),
|
|
6481
|
-
});
|
|
6482
|
-
/**
|
|
6483
|
-
* Update a meter.
|
|
6484
|
-
* @summary Update meter
|
|
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
|
|
6498
|
-
.object({
|
|
6499
|
-
description: zod_1.z.coerce
|
|
6500
|
-
.string()
|
|
6501
|
-
.max(exports.updateMeterBodyDescriptionMax)
|
|
6502
|
-
.optional()
|
|
6503
|
-
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
6504
|
-
groupBy: zod_1.z
|
|
6505
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6506
|
-
.optional()
|
|
6507
|
-
.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.'),
|
|
6508
|
-
metadata: zod_1.z
|
|
6509
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6510
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6511
|
-
.nullish()
|
|
6512
|
-
.describe('Additional metadata for the resource.'),
|
|
6513
|
-
name: zod_1.z.coerce
|
|
6514
|
-
.string()
|
|
6515
|
-
.min(1)
|
|
6516
|
-
.max(exports.updateMeterBodyNameMax)
|
|
6517
|
-
.optional()
|
|
6518
|
-
.describe('Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.'),
|
|
6519
|
-
})
|
|
6520
|
-
.describe('A meter update model.\n\nOnly the properties that can be updated are included.\nFor example, the slug and aggregation cannot be updated.');
|
|
6521
|
-
/**
|
|
6522
|
-
* Delete a meter.
|
|
6523
|
-
* @summary Delete meter
|
|
6524
|
-
*/
|
|
6525
|
-
exports.deleteMeterPathMeterIdOrSlugMax = 64;
|
|
6526
|
-
exports.deleteMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6527
|
-
exports.deleteMeterParams = zod_1.z.object({
|
|
6528
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6529
|
-
.string()
|
|
6530
|
-
.min(1)
|
|
6531
|
-
.max(exports.deleteMeterPathMeterIdOrSlugMax)
|
|
6532
|
-
.regex(exports.deleteMeterPathMeterIdOrSlugRegExp),
|
|
6533
|
-
});
|
|
6534
|
-
/**
|
|
6535
|
-
* Query meter for usage.
|
|
6536
|
-
* @summary Query meter
|
|
6537
|
-
*/
|
|
6538
|
-
exports.queryMeterPathMeterIdOrSlugMax = 64;
|
|
6539
|
-
exports.queryMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6540
|
-
exports.queryMeterParams = zod_1.z.object({
|
|
6541
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6542
|
-
.string()
|
|
6543
|
-
.min(1)
|
|
6544
|
-
.max(exports.queryMeterPathMeterIdOrSlugMax)
|
|
6545
|
-
.regex(exports.queryMeterPathMeterIdOrSlugRegExp),
|
|
6546
|
-
});
|
|
6547
|
-
exports.queryMeterQueryClientIdMax = 36;
|
|
6548
|
-
exports.queryMeterQueryWindowTimeZoneDefault = 'UTC';
|
|
6549
|
-
exports.queryMeterQueryFilterCustomerIdMax = 100;
|
|
6550
|
-
exports.queryMeterQueryParams = zod_1.z.object({
|
|
6551
|
-
clientId: zod_1.z.coerce
|
|
6552
|
-
.string()
|
|
6553
|
-
.min(1)
|
|
6554
|
-
.max(exports.queryMeterQueryClientIdMax)
|
|
5856
|
+
.min(1)
|
|
5857
|
+
.max(exports.queryMeterQueryClientIdMax)
|
|
6555
5858
|
.optional()
|
|
6556
5859
|
.describe('Client ID\nUseful to track progress of a query.'),
|
|
6557
5860
|
filterCustomerId: zod_1.z
|
|
@@ -12103,79 +11406,875 @@ exports.changeSubscriptionBody = zod_1.z
|
|
|
12103
11406
|
timing: zod_1.z
|
|
12104
11407
|
.union([
|
|
12105
11408
|
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.'),
|
|
11409
|
+
.enum(['immediate', 'next_billing_cycle'])
|
|
11410
|
+
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
11411
|
+
zod_1.z.coerce
|
|
11412
|
+
.date()
|
|
11413
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11414
|
+
])
|
|
11415
|
+
.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.')
|
|
11416
|
+
.describe('Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration.'),
|
|
11417
|
+
})
|
|
11418
|
+
.describe('Change a custom subscription.'),
|
|
11419
|
+
])
|
|
11420
|
+
.describe('Change a subscription.');
|
|
11421
|
+
/**
|
|
11422
|
+
* Migrates the subscripiton to the provided version of the current plan.
|
|
11423
|
+
If possible, the migration will be done immediately.
|
|
11424
|
+
If not, the migration will be scheduled to the end of the current billing period.
|
|
11425
|
+
* @summary Migrate subscription
|
|
11426
|
+
*/
|
|
11427
|
+
exports.migrateSubscriptionPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11428
|
+
exports.migrateSubscriptionParams = zod_1.z.object({
|
|
11429
|
+
subscriptionId: zod_1.z.coerce
|
|
11430
|
+
.string()
|
|
11431
|
+
.regex(exports.migrateSubscriptionPathSubscriptionIdRegExp),
|
|
11432
|
+
});
|
|
11433
|
+
exports.migrateSubscriptionBodyTimingDefault = 'immediate';
|
|
11434
|
+
exports.migrateSubscriptionBody = zod_1.z.object({
|
|
11435
|
+
billingAnchor: zod_1.z.coerce
|
|
11436
|
+
.date()
|
|
11437
|
+
.optional()
|
|
11438
|
+
.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.'),
|
|
11439
|
+
startingPhase: zod_1.z.coerce
|
|
11440
|
+
.string()
|
|
11441
|
+
.min(1)
|
|
11442
|
+
.optional()
|
|
11443
|
+
.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.'),
|
|
11444
|
+
targetVersion: zod_1.z.coerce
|
|
11445
|
+
.number()
|
|
11446
|
+
.min(1)
|
|
11447
|
+
.optional()
|
|
11448
|
+
.describe('The version of the plan to migrate to.\nIf not provided, the subscription will migrate to the latest version of the current plan.'),
|
|
11449
|
+
timing: zod_1.z
|
|
11450
|
+
.union([
|
|
11451
|
+
zod_1.z
|
|
11452
|
+
.enum(['immediate', 'next_billing_cycle'])
|
|
11453
|
+
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
11454
|
+
zod_1.z.coerce
|
|
11455
|
+
.date()
|
|
11456
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11457
|
+
])
|
|
11458
|
+
.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.')
|
|
11459
|
+
.default(exports.migrateSubscriptionBodyTimingDefault)
|
|
11460
|
+
.describe('Timing configuration for the migration, when the migration should take effect.\nIf not supported by the subscription, 400 will be returned.'),
|
|
11461
|
+
});
|
|
11462
|
+
/**
|
|
11463
|
+
* Restores a canceled subscription.
|
|
11464
|
+
Any subscription scheduled to start later will be deleted and this subscription will be continued indefinitely.
|
|
11465
|
+
* @summary Restore subscription
|
|
11466
|
+
*/
|
|
11467
|
+
exports.restoreSubscriptionPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11468
|
+
exports.restoreSubscriptionParams = zod_1.z.object({
|
|
11469
|
+
subscriptionId: zod_1.z.coerce
|
|
11470
|
+
.string()
|
|
11471
|
+
.regex(exports.restoreSubscriptionPathSubscriptionIdRegExp),
|
|
11472
|
+
});
|
|
11473
|
+
/**
|
|
11474
|
+
* Cancels the scheduled cancelation.
|
|
11475
|
+
* @summary Unschedule cancelation
|
|
11476
|
+
*/
|
|
11477
|
+
exports.unscheduleCancelationPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11478
|
+
exports.unscheduleCancelationParams = zod_1.z.object({
|
|
11479
|
+
subscriptionId: zod_1.z.coerce
|
|
11480
|
+
.string()
|
|
11481
|
+
.regex(exports.unscheduleCancelationPathSubscriptionIdRegExp),
|
|
11482
|
+
});
|
|
11483
|
+
/**
|
|
11484
|
+
* 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).
|
|
11485
|
+
|
|
11486
|
+
- Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
|
|
11487
|
+
- Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config).
|
|
11488
|
+
- 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.
|
|
11489
|
+
|
|
11490
|
+
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.
|
|
11491
|
+
|
|
11492
|
+
Once an entitlement is created you cannot modify it, only delete it.
|
|
11493
|
+
* @summary Create a customer entitlement
|
|
11494
|
+
*/
|
|
11495
|
+
exports.createCustomerEntitlementV2Params = zod_1.z.object({
|
|
11496
|
+
customerIdOrKey: zod_1.z.union([
|
|
11497
|
+
zod_1.z.coerce
|
|
11498
|
+
.string()
|
|
11499
|
+
.regex(createCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11500
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11501
|
+
zod_1.z.coerce
|
|
11502
|
+
.string()
|
|
11503
|
+
.min(1)
|
|
11504
|
+
.max(createCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11505
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11506
|
+
]),
|
|
11507
|
+
});
|
|
11508
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMax = 64;
|
|
11509
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11510
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11511
|
+
exports.createCustomerEntitlementV2BodyIsSoftLimitDefault = false;
|
|
11512
|
+
exports.createCustomerEntitlementV2BodyIsUnlimitedDefault = false;
|
|
11513
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetMin = 0;
|
|
11514
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = 1;
|
|
11515
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax = 255;
|
|
11516
|
+
exports.createCustomerEntitlementV2BodyPreserveOverageAtResetDefault = false;
|
|
11517
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne = 64;
|
|
11518
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11519
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11520
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo = 64;
|
|
11521
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11522
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11523
|
+
exports.createCustomerEntitlementV2Body = zod_1.z
|
|
11524
|
+
.union([
|
|
11525
|
+
zod_1.z
|
|
11526
|
+
.object({
|
|
11527
|
+
featureId: zod_1.z.coerce
|
|
11528
|
+
.string()
|
|
11529
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExp)
|
|
11530
|
+
.optional()
|
|
11531
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11532
|
+
featureKey: zod_1.z.coerce
|
|
11533
|
+
.string()
|
|
11534
|
+
.min(1)
|
|
11535
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMax)
|
|
11536
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExp)
|
|
11537
|
+
.optional()
|
|
11538
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11539
|
+
isSoftLimit: zod_1.z.coerce
|
|
11540
|
+
.boolean()
|
|
11541
|
+
.optional()
|
|
11542
|
+
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
11543
|
+
issueAfterReset: zod_1.z.coerce
|
|
11544
|
+
.number()
|
|
11545
|
+
.min(exports.createCustomerEntitlementV2BodyIssueAfterResetMin)
|
|
11546
|
+
.optional()
|
|
11547
|
+
.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.'),
|
|
11548
|
+
issueAfterResetPriority: zod_1.z.coerce
|
|
11549
|
+
.number()
|
|
11550
|
+
.min(1)
|
|
11551
|
+
.max(exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax)
|
|
11552
|
+
.default(exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault)
|
|
11553
|
+
.describe('Defines the grant priority for the default grant.'),
|
|
11554
|
+
isUnlimited: zod_1.z.coerce
|
|
11555
|
+
.boolean()
|
|
11556
|
+
.optional()
|
|
11557
|
+
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
11558
|
+
measureUsageFrom: zod_1.z
|
|
11559
|
+
.union([
|
|
11560
|
+
zod_1.z
|
|
11561
|
+
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
11562
|
+
.describe('Start of measurement options'),
|
|
11563
|
+
zod_1.z.coerce
|
|
11564
|
+
.date()
|
|
11565
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11566
|
+
])
|
|
11567
|
+
.describe('Measure usage from')
|
|
11568
|
+
.optional()
|
|
11569
|
+
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
11570
|
+
metadata: zod_1.z
|
|
11571
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11572
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11573
|
+
.optional()
|
|
11574
|
+
.describe('Additional metadata for the feature.'),
|
|
11575
|
+
preserveOverageAtReset: zod_1.z.coerce
|
|
11576
|
+
.boolean()
|
|
11577
|
+
.optional()
|
|
11578
|
+
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
11579
|
+
type: zod_1.z.enum(['metered']),
|
|
11580
|
+
usagePeriod: zod_1.z
|
|
11581
|
+
.object({
|
|
11582
|
+
anchor: zod_1.z.coerce
|
|
11583
|
+
.date()
|
|
11584
|
+
.optional()
|
|
11585
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11586
|
+
interval: zod_1.z
|
|
11587
|
+
.union([
|
|
11588
|
+
zod_1.z.coerce.string(),
|
|
11589
|
+
zod_1.z
|
|
11590
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11591
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11592
|
+
])
|
|
11593
|
+
.describe('Period duration for the recurrence')
|
|
11594
|
+
.describe('The unit of time for the interval.'),
|
|
11595
|
+
})
|
|
11596
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11597
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11598
|
+
})
|
|
11599
|
+
.describe('Create inpurs for metered entitlement'),
|
|
11600
|
+
zod_1.z
|
|
11601
|
+
.object({
|
|
11602
|
+
config: zod_1.z.coerce
|
|
11603
|
+
.string()
|
|
11604
|
+
.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.'),
|
|
11605
|
+
featureId: zod_1.z.coerce
|
|
11606
|
+
.string()
|
|
11607
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne)
|
|
11608
|
+
.optional()
|
|
11609
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11610
|
+
featureKey: zod_1.z.coerce
|
|
11611
|
+
.string()
|
|
11612
|
+
.min(1)
|
|
11613
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne)
|
|
11614
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne)
|
|
11615
|
+
.optional()
|
|
11616
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11617
|
+
metadata: zod_1.z
|
|
11618
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11619
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11620
|
+
.optional()
|
|
11621
|
+
.describe('Additional metadata for the feature.'),
|
|
11622
|
+
type: zod_1.z.enum(['static']),
|
|
11623
|
+
usagePeriod: zod_1.z
|
|
11624
|
+
.object({
|
|
11625
|
+
anchor: zod_1.z.coerce
|
|
11626
|
+
.date()
|
|
11627
|
+
.optional()
|
|
11628
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11629
|
+
interval: zod_1.z
|
|
11630
|
+
.union([
|
|
11631
|
+
zod_1.z.coerce.string(),
|
|
11632
|
+
zod_1.z
|
|
11633
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11634
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11635
|
+
])
|
|
11636
|
+
.describe('Period duration for the recurrence')
|
|
11637
|
+
.describe('The unit of time for the interval.'),
|
|
11638
|
+
})
|
|
11639
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11640
|
+
.optional()
|
|
11641
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11642
|
+
})
|
|
11643
|
+
.describe('Create inputs for static entitlement'),
|
|
11644
|
+
zod_1.z
|
|
11645
|
+
.object({
|
|
11646
|
+
featureId: zod_1.z.coerce
|
|
11647
|
+
.string()
|
|
11648
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo)
|
|
11649
|
+
.optional()
|
|
11650
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11651
|
+
featureKey: zod_1.z.coerce
|
|
11652
|
+
.string()
|
|
11653
|
+
.min(1)
|
|
11654
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo)
|
|
11655
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo)
|
|
11656
|
+
.optional()
|
|
11657
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11658
|
+
metadata: zod_1.z
|
|
11659
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11660
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11661
|
+
.optional()
|
|
11662
|
+
.describe('Additional metadata for the feature.'),
|
|
11663
|
+
type: zod_1.z.enum(['boolean']),
|
|
11664
|
+
usagePeriod: zod_1.z
|
|
11665
|
+
.object({
|
|
11666
|
+
anchor: zod_1.z.coerce
|
|
11667
|
+
.date()
|
|
11668
|
+
.optional()
|
|
11669
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11670
|
+
interval: zod_1.z
|
|
11671
|
+
.union([
|
|
11672
|
+
zod_1.z.coerce.string(),
|
|
11673
|
+
zod_1.z
|
|
11674
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11675
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11676
|
+
])
|
|
11677
|
+
.describe('Period duration for the recurrence')
|
|
11678
|
+
.describe('The unit of time for the interval.'),
|
|
11679
|
+
})
|
|
11680
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11681
|
+
.optional()
|
|
11682
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11683
|
+
})
|
|
11684
|
+
.describe('Create inputs for boolean entitlement'),
|
|
11685
|
+
])
|
|
11686
|
+
.describe('Create inputs for entitlement');
|
|
11687
|
+
/**
|
|
11688
|
+
* List all entitlements for a customer. For checking entitlement access, use the /value endpoint instead.
|
|
11689
|
+
* @summary List customer entitlements
|
|
11690
|
+
*/
|
|
11691
|
+
exports.listCustomerEntitlementsV2Params = zod_1.z.object({
|
|
11692
|
+
customerIdOrKey: zod_1.z.union([
|
|
11693
|
+
zod_1.z.coerce
|
|
11694
|
+
.string()
|
|
11695
|
+
.regex(listCustomerEntitlementsV2PathCustomerIdOrKeyRegExpOne)
|
|
11696
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11697
|
+
zod_1.z.coerce
|
|
11698
|
+
.string()
|
|
11699
|
+
.min(1)
|
|
11700
|
+
.max(listCustomerEntitlementsV2PathCustomerIdOrKeyMaxTwo)
|
|
11701
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11702
|
+
]),
|
|
11703
|
+
});
|
|
11704
|
+
exports.listCustomerEntitlementsV2QueryIncludeDeletedDefault = false;
|
|
11705
|
+
exports.listCustomerEntitlementsV2QueryPageDefault = 1;
|
|
11706
|
+
exports.listCustomerEntitlementsV2QueryPageSizeDefault = 100;
|
|
11707
|
+
exports.listCustomerEntitlementsV2QueryPageSizeMax = 1000;
|
|
11708
|
+
exports.listCustomerEntitlementsV2QueryOffsetDefault = 0;
|
|
11709
|
+
exports.listCustomerEntitlementsV2QueryOffsetMin = 0;
|
|
11710
|
+
exports.listCustomerEntitlementsV2QueryLimitDefault = 100;
|
|
11711
|
+
exports.listCustomerEntitlementsV2QueryLimitMax = 1000;
|
|
11712
|
+
exports.listCustomerEntitlementsV2QueryParams = zod_1.z.object({
|
|
11713
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11714
|
+
limit: zod_1.z.coerce
|
|
11715
|
+
.number()
|
|
11716
|
+
.min(1)
|
|
11717
|
+
.max(exports.listCustomerEntitlementsV2QueryLimitMax)
|
|
11718
|
+
.default(exports.listCustomerEntitlementsV2QueryLimitDefault)
|
|
11719
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
11720
|
+
offset: zod_1.z.coerce
|
|
11721
|
+
.number()
|
|
11722
|
+
.min(exports.listCustomerEntitlementsV2QueryOffsetMin)
|
|
11723
|
+
.optional()
|
|
11724
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
11725
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11726
|
+
orderBy: zod_1.z
|
|
11727
|
+
.enum(['createdAt', 'updatedAt'])
|
|
11728
|
+
.optional()
|
|
11729
|
+
.describe('The order by field.'),
|
|
11730
|
+
page: zod_1.z.coerce
|
|
11731
|
+
.number()
|
|
11732
|
+
.min(1)
|
|
11733
|
+
.default(exports.listCustomerEntitlementsV2QueryPageDefault)
|
|
11734
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11735
|
+
pageSize: zod_1.z.coerce
|
|
11736
|
+
.number()
|
|
11737
|
+
.min(1)
|
|
11738
|
+
.max(exports.listCustomerEntitlementsV2QueryPageSizeMax)
|
|
11739
|
+
.default(exports.listCustomerEntitlementsV2QueryPageSizeDefault)
|
|
11740
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11741
|
+
});
|
|
11742
|
+
/**
|
|
11743
|
+
* Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead.
|
|
11744
|
+
* @summary Get customer entitlement
|
|
11745
|
+
*/
|
|
11746
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11747
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11748
|
+
exports.getCustomerEntitlementV2Params = zod_1.z.object({
|
|
11749
|
+
customerIdOrKey: zod_1.z.union([
|
|
11750
|
+
zod_1.z.coerce
|
|
11751
|
+
.string()
|
|
11752
|
+
.regex(getCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11753
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11754
|
+
zod_1.z.coerce
|
|
11755
|
+
.string()
|
|
11756
|
+
.min(1)
|
|
11757
|
+
.max(getCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11758
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11759
|
+
]),
|
|
11760
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11761
|
+
.string()
|
|
11762
|
+
.min(1)
|
|
11763
|
+
.max(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11764
|
+
.regex(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11765
|
+
});
|
|
11766
|
+
/**
|
|
11767
|
+
* 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.
|
|
11768
|
+
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.
|
|
11769
|
+
* @summary Delete customer entitlement
|
|
11770
|
+
*/
|
|
11771
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11772
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11773
|
+
exports.deleteCustomerEntitlementV2Params = zod_1.z.object({
|
|
11774
|
+
customerIdOrKey: zod_1.z.union([
|
|
11775
|
+
zod_1.z.coerce
|
|
11776
|
+
.string()
|
|
11777
|
+
.regex(deleteCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11778
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11779
|
+
zod_1.z.coerce
|
|
11780
|
+
.string()
|
|
11781
|
+
.min(1)
|
|
11782
|
+
.max(deleteCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11783
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11784
|
+
]),
|
|
11785
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11786
|
+
.string()
|
|
11787
|
+
.min(1)
|
|
11788
|
+
.max(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11789
|
+
.regex(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11790
|
+
});
|
|
11791
|
+
/**
|
|
11792
|
+
* List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
11793
|
+
* @summary List customer entitlement grants
|
|
11794
|
+
*/
|
|
11795
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11796
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11797
|
+
exports.listCustomerEntitlementGrantsV2Params = zod_1.z.object({
|
|
11798
|
+
customerIdOrKey: zod_1.z.union([
|
|
11799
|
+
zod_1.z.coerce
|
|
11800
|
+
.string()
|
|
11801
|
+
.regex(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyRegExpOne)
|
|
11802
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11803
|
+
zod_1.z.coerce
|
|
11804
|
+
.string()
|
|
11805
|
+
.min(1)
|
|
11806
|
+
.max(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyMaxTwo)
|
|
11807
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11808
|
+
]),
|
|
11809
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11810
|
+
.string()
|
|
11811
|
+
.min(1)
|
|
11812
|
+
.max(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax)
|
|
11813
|
+
.regex(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11814
|
+
});
|
|
11815
|
+
exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = false;
|
|
11816
|
+
exports.listCustomerEntitlementGrantsV2QueryPageDefault = 1;
|
|
11817
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = 100;
|
|
11818
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeMax = 1000;
|
|
11819
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetDefault = 0;
|
|
11820
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetMin = 0;
|
|
11821
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitDefault = 100;
|
|
11822
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitMax = 1000;
|
|
11823
|
+
exports.listCustomerEntitlementGrantsV2QueryParams = zod_1.z.object({
|
|
11824
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11825
|
+
limit: zod_1.z.coerce
|
|
11826
|
+
.number()
|
|
11827
|
+
.min(1)
|
|
11828
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryLimitMax)
|
|
11829
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryLimitDefault)
|
|
11830
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
11831
|
+
offset: zod_1.z.coerce
|
|
11832
|
+
.number()
|
|
11833
|
+
.min(exports.listCustomerEntitlementGrantsV2QueryOffsetMin)
|
|
11834
|
+
.optional()
|
|
11835
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
11836
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11837
|
+
orderBy: zod_1.z
|
|
11838
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
11839
|
+
.optional()
|
|
11840
|
+
.describe('The order by field.'),
|
|
11841
|
+
page: zod_1.z.coerce
|
|
11842
|
+
.number()
|
|
11843
|
+
.min(1)
|
|
11844
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageDefault)
|
|
11845
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11846
|
+
pageSize: zod_1.z.coerce
|
|
11847
|
+
.number()
|
|
11848
|
+
.min(1)
|
|
11849
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryPageSizeMax)
|
|
11850
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault)
|
|
11851
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11852
|
+
});
|
|
11853
|
+
/**
|
|
11854
|
+
* 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.
|
|
11855
|
+
|
|
11856
|
+
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.
|
|
11857
|
+
|
|
11858
|
+
Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.
|
|
11859
|
+
|
|
11860
|
+
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).
|
|
11861
|
+
|
|
11862
|
+
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))
|
|
11863
|
+
|
|
11864
|
+
Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
|
|
11865
|
+
* @summary Create customer entitlement grant
|
|
11866
|
+
*/
|
|
11867
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11868
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11869
|
+
exports.createCustomerEntitlementGrantV2Params = zod_1.z.object({
|
|
11870
|
+
customerIdOrKey: zod_1.z.union([
|
|
11871
|
+
zod_1.z.coerce
|
|
11872
|
+
.string()
|
|
11873
|
+
.regex(createCustomerEntitlementGrantV2PathCustomerIdOrKeyRegExpOne)
|
|
11874
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11875
|
+
zod_1.z.coerce
|
|
11876
|
+
.string()
|
|
11877
|
+
.min(1)
|
|
11878
|
+
.max(createCustomerEntitlementGrantV2PathCustomerIdOrKeyMaxTwo)
|
|
11879
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11880
|
+
]),
|
|
11881
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11882
|
+
.string()
|
|
11883
|
+
.min(1)
|
|
11884
|
+
.max(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax)
|
|
11885
|
+
.regex(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11886
|
+
});
|
|
11887
|
+
exports.createCustomerEntitlementGrantV2BodyAmountMin = 0;
|
|
11888
|
+
exports.createCustomerEntitlementGrantV2BodyPriorityMax = 255;
|
|
11889
|
+
exports.createCustomerEntitlementGrantV2BodyExpirationCountMax = 1000;
|
|
11890
|
+
exports.createCustomerEntitlementGrantV2BodyMaxRolloverAmountDefault = 0;
|
|
11891
|
+
exports.createCustomerEntitlementGrantV2BodyMinRolloverAmountDefault = 0;
|
|
11892
|
+
exports.createCustomerEntitlementGrantV2Body = zod_1.z
|
|
11893
|
+
.object({
|
|
11894
|
+
amount: zod_1.z.coerce
|
|
11895
|
+
.number()
|
|
11896
|
+
.min(exports.createCustomerEntitlementGrantV2BodyAmountMin)
|
|
11897
|
+
.describe('The amount to grant. Should be a positive number.'),
|
|
11898
|
+
effectiveAt: zod_1.z.coerce
|
|
11899
|
+
.date()
|
|
11900
|
+
.describe('Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).'),
|
|
11901
|
+
expiration: zod_1.z
|
|
11902
|
+
.object({
|
|
11903
|
+
count: zod_1.z.coerce
|
|
11904
|
+
.number()
|
|
11905
|
+
.min(1)
|
|
11906
|
+
.max(exports.createCustomerEntitlementGrantV2BodyExpirationCountMax)
|
|
11907
|
+
.describe('The number of time units in the expiration period.'),
|
|
11908
|
+
duration: zod_1.z
|
|
11909
|
+
.enum(['HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11910
|
+
.describe('The expiration duration enum')
|
|
11911
|
+
.describe('The unit of time for the expiration period.'),
|
|
11912
|
+
})
|
|
11913
|
+
.describe('The grant expiration definition')
|
|
11914
|
+
.describe('The grant expiration definition'),
|
|
11915
|
+
maxRolloverAmount: zod_1.z.coerce
|
|
11916
|
+
.number()
|
|
11917
|
+
.optional()
|
|
11918
|
+
.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))'),
|
|
11919
|
+
metadata: zod_1.z
|
|
11920
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11921
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11922
|
+
.optional()
|
|
11923
|
+
.describe('The grant metadata.'),
|
|
11924
|
+
minRolloverAmount: zod_1.z.coerce
|
|
11925
|
+
.number()
|
|
11926
|
+
.optional()
|
|
11927
|
+
.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))'),
|
|
11928
|
+
priority: zod_1.z.coerce
|
|
11929
|
+
.number()
|
|
11930
|
+
.min(1)
|
|
11931
|
+
.max(exports.createCustomerEntitlementGrantV2BodyPriorityMax)
|
|
11932
|
+
.optional()
|
|
11933
|
+
.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.'),
|
|
11934
|
+
recurrence: zod_1.z
|
|
11935
|
+
.object({
|
|
11936
|
+
anchor: zod_1.z.coerce
|
|
11937
|
+
.date()
|
|
11938
|
+
.optional()
|
|
11939
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11940
|
+
interval: zod_1.z
|
|
11941
|
+
.union([
|
|
11942
|
+
zod_1.z.coerce.string(),
|
|
11943
|
+
zod_1.z
|
|
11944
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11945
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11946
|
+
])
|
|
11947
|
+
.describe('Period duration for the recurrence')
|
|
11948
|
+
.describe('The unit of time for the interval.'),
|
|
11949
|
+
})
|
|
11950
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11951
|
+
.optional()
|
|
11952
|
+
.describe('The subject of the grant.'),
|
|
11953
|
+
})
|
|
11954
|
+
.describe('The grant creation input.');
|
|
11955
|
+
/**
|
|
11956
|
+
* Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
|
|
11957
|
+
|
|
11958
|
+
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.
|
|
11959
|
+
|
|
11960
|
+
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.
|
|
11961
|
+
* @summary Get customer entitlement history
|
|
11962
|
+
*/
|
|
11963
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11964
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11965
|
+
exports.getCustomerEntitlementHistoryV2Params = zod_1.z.object({
|
|
11966
|
+
customerIdOrKey: zod_1.z.union([
|
|
11967
|
+
zod_1.z.coerce
|
|
11968
|
+
.string()
|
|
11969
|
+
.regex(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyRegExpOne)
|
|
11970
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11971
|
+
zod_1.z.coerce
|
|
11972
|
+
.string()
|
|
11973
|
+
.min(1)
|
|
11974
|
+
.max(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyMaxTwo)
|
|
11975
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11976
|
+
]),
|
|
11977
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11978
|
+
.string()
|
|
11979
|
+
.min(1)
|
|
11980
|
+
.max(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax)
|
|
11981
|
+
.regex(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11982
|
+
});
|
|
11983
|
+
exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault = 'UTC';
|
|
11984
|
+
exports.getCustomerEntitlementHistoryV2QueryParams = zod_1.z.object({
|
|
11985
|
+
from: zod_1.z.coerce
|
|
11986
|
+
.date()
|
|
11987
|
+
.optional()
|
|
11988
|
+
.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.'),
|
|
11989
|
+
to: zod_1.z.coerce
|
|
11990
|
+
.date()
|
|
11991
|
+
.optional()
|
|
11992
|
+
.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.'),
|
|
11993
|
+
windowSize: zod_1.z
|
|
11994
|
+
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
11995
|
+
.describe('Windowsize'),
|
|
11996
|
+
windowTimeZone: zod_1.z.coerce
|
|
11997
|
+
.string()
|
|
11998
|
+
.default(exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault)
|
|
11999
|
+
.describe('The timezone used when calculating the windows.'),
|
|
12000
|
+
});
|
|
12001
|
+
/**
|
|
12002
|
+
* 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.
|
|
12003
|
+
|
|
12004
|
+
This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
12005
|
+
* @summary Override customer entitlement
|
|
12006
|
+
*/
|
|
12007
|
+
exports.overrideCustomerEntitlementV2Params = zod_1.z.object({
|
|
12008
|
+
customerIdOrKey: zod_1.z.union([
|
|
12009
|
+
zod_1.z.coerce
|
|
12010
|
+
.string()
|
|
12011
|
+
.regex(overrideCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
12012
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12013
|
+
zod_1.z.coerce
|
|
12014
|
+
.string()
|
|
12015
|
+
.min(1)
|
|
12016
|
+
.max(overrideCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
12017
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12018
|
+
]),
|
|
12019
|
+
entitlementIdOrFeatureKey: zod_1.z.union([
|
|
12020
|
+
zod_1.z.coerce
|
|
12021
|
+
.string()
|
|
12022
|
+
.regex(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExpOne)
|
|
12023
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12024
|
+
zod_1.z.coerce
|
|
12025
|
+
.string()
|
|
12026
|
+
.min(1)
|
|
12027
|
+
.max(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMaxTwo)
|
|
12028
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12029
|
+
]),
|
|
12030
|
+
});
|
|
12031
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMax = 64;
|
|
12032
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12033
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12034
|
+
exports.overrideCustomerEntitlementV2BodyIsSoftLimitDefault = false;
|
|
12035
|
+
exports.overrideCustomerEntitlementV2BodyIsUnlimitedDefault = false;
|
|
12036
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin = 0;
|
|
12037
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = 1;
|
|
12038
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax = 255;
|
|
12039
|
+
exports.overrideCustomerEntitlementV2BodyPreserveOverageAtResetDefault = false;
|
|
12040
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne = 64;
|
|
12041
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12042
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12043
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo = 64;
|
|
12044
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12045
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12046
|
+
exports.overrideCustomerEntitlementV2Body = zod_1.z
|
|
12047
|
+
.union([
|
|
12048
|
+
zod_1.z
|
|
12049
|
+
.object({
|
|
12050
|
+
featureId: zod_1.z.coerce
|
|
12051
|
+
.string()
|
|
12052
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp)
|
|
12053
|
+
.optional()
|
|
12054
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12055
|
+
featureKey: zod_1.z.coerce
|
|
12056
|
+
.string()
|
|
12057
|
+
.min(1)
|
|
12058
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMax)
|
|
12059
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp)
|
|
12060
|
+
.optional()
|
|
12061
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12062
|
+
isSoftLimit: zod_1.z.coerce
|
|
12063
|
+
.boolean()
|
|
12064
|
+
.optional()
|
|
12065
|
+
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
12066
|
+
issueAfterReset: zod_1.z.coerce
|
|
12067
|
+
.number()
|
|
12068
|
+
.min(exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin)
|
|
12069
|
+
.optional()
|
|
12070
|
+
.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.'),
|
|
12071
|
+
issueAfterResetPriority: zod_1.z.coerce
|
|
12072
|
+
.number()
|
|
12073
|
+
.min(1)
|
|
12074
|
+
.max(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax)
|
|
12075
|
+
.default(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault)
|
|
12076
|
+
.describe('Defines the grant priority for the default grant.'),
|
|
12077
|
+
isUnlimited: zod_1.z.coerce
|
|
12078
|
+
.boolean()
|
|
12079
|
+
.optional()
|
|
12080
|
+
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
12081
|
+
measureUsageFrom: zod_1.z
|
|
12082
|
+
.union([
|
|
12083
|
+
zod_1.z
|
|
12084
|
+
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
12085
|
+
.describe('Start of measurement options'),
|
|
12108
12086
|
zod_1.z.coerce
|
|
12109
12087
|
.date()
|
|
12110
12088
|
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
12111
12089
|
])
|
|
12112
|
-
.describe('
|
|
12113
|
-
.
|
|
12090
|
+
.describe('Measure usage from')
|
|
12091
|
+
.optional()
|
|
12092
|
+
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
12093
|
+
metadata: zod_1.z
|
|
12094
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12095
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12096
|
+
.optional()
|
|
12097
|
+
.describe('Additional metadata for the feature.'),
|
|
12098
|
+
preserveOverageAtReset: zod_1.z.coerce
|
|
12099
|
+
.boolean()
|
|
12100
|
+
.optional()
|
|
12101
|
+
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
12102
|
+
type: zod_1.z.enum(['metered']),
|
|
12103
|
+
usagePeriod: zod_1.z
|
|
12104
|
+
.object({
|
|
12105
|
+
anchor: zod_1.z.coerce
|
|
12106
|
+
.date()
|
|
12107
|
+
.optional()
|
|
12108
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12109
|
+
interval: zod_1.z
|
|
12110
|
+
.union([
|
|
12111
|
+
zod_1.z.coerce.string(),
|
|
12112
|
+
zod_1.z
|
|
12113
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12114
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12115
|
+
])
|
|
12116
|
+
.describe('Period duration for the recurrence')
|
|
12117
|
+
.describe('The unit of time for the interval.'),
|
|
12118
|
+
})
|
|
12119
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12120
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12114
12121
|
})
|
|
12115
|
-
.describe('
|
|
12122
|
+
.describe('Create inpurs for metered entitlement'),
|
|
12123
|
+
zod_1.z
|
|
12124
|
+
.object({
|
|
12125
|
+
config: zod_1.z.coerce
|
|
12126
|
+
.string()
|
|
12127
|
+
.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.'),
|
|
12128
|
+
featureId: zod_1.z.coerce
|
|
12129
|
+
.string()
|
|
12130
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne)
|
|
12131
|
+
.optional()
|
|
12132
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12133
|
+
featureKey: zod_1.z.coerce
|
|
12134
|
+
.string()
|
|
12135
|
+
.min(1)
|
|
12136
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne)
|
|
12137
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne)
|
|
12138
|
+
.optional()
|
|
12139
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12140
|
+
metadata: zod_1.z
|
|
12141
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12142
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12143
|
+
.optional()
|
|
12144
|
+
.describe('Additional metadata for the feature.'),
|
|
12145
|
+
type: zod_1.z.enum(['static']),
|
|
12146
|
+
usagePeriod: zod_1.z
|
|
12147
|
+
.object({
|
|
12148
|
+
anchor: zod_1.z.coerce
|
|
12149
|
+
.date()
|
|
12150
|
+
.optional()
|
|
12151
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12152
|
+
interval: zod_1.z
|
|
12153
|
+
.union([
|
|
12154
|
+
zod_1.z.coerce.string(),
|
|
12155
|
+
zod_1.z
|
|
12156
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12157
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12158
|
+
])
|
|
12159
|
+
.describe('Period duration for the recurrence')
|
|
12160
|
+
.describe('The unit of time for the interval.'),
|
|
12161
|
+
})
|
|
12162
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12163
|
+
.optional()
|
|
12164
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12165
|
+
})
|
|
12166
|
+
.describe('Create inputs for static entitlement'),
|
|
12167
|
+
zod_1.z
|
|
12168
|
+
.object({
|
|
12169
|
+
featureId: zod_1.z.coerce
|
|
12170
|
+
.string()
|
|
12171
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo)
|
|
12172
|
+
.optional()
|
|
12173
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12174
|
+
featureKey: zod_1.z.coerce
|
|
12175
|
+
.string()
|
|
12176
|
+
.min(1)
|
|
12177
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo)
|
|
12178
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo)
|
|
12179
|
+
.optional()
|
|
12180
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12181
|
+
metadata: zod_1.z
|
|
12182
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12183
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12184
|
+
.optional()
|
|
12185
|
+
.describe('Additional metadata for the feature.'),
|
|
12186
|
+
type: zod_1.z.enum(['boolean']),
|
|
12187
|
+
usagePeriod: zod_1.z
|
|
12188
|
+
.object({
|
|
12189
|
+
anchor: zod_1.z.coerce
|
|
12190
|
+
.date()
|
|
12191
|
+
.optional()
|
|
12192
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12193
|
+
interval: zod_1.z
|
|
12194
|
+
.union([
|
|
12195
|
+
zod_1.z.coerce.string(),
|
|
12196
|
+
zod_1.z
|
|
12197
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12198
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12199
|
+
])
|
|
12200
|
+
.describe('Period duration for the recurrence')
|
|
12201
|
+
.describe('The unit of time for the interval.'),
|
|
12202
|
+
})
|
|
12203
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12204
|
+
.optional()
|
|
12205
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12206
|
+
})
|
|
12207
|
+
.describe('Create inputs for boolean entitlement'),
|
|
12116
12208
|
])
|
|
12117
|
-
.describe('
|
|
12209
|
+
.describe('Create inputs for entitlement');
|
|
12118
12210
|
/**
|
|
12119
|
-
*
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
* @summary
|
|
12211
|
+
* 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.
|
|
12212
|
+
|
|
12213
|
+
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.
|
|
12214
|
+
* @summary Reset customer entitlement
|
|
12123
12215
|
*/
|
|
12124
|
-
exports.
|
|
12125
|
-
exports.
|
|
12126
|
-
|
|
12216
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12217
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12218
|
+
exports.resetCustomerEntitlementUsageV2Params = zod_1.z.object({
|
|
12219
|
+
customerIdOrKey: zod_1.z.union([
|
|
12220
|
+
zod_1.z.coerce
|
|
12221
|
+
.string()
|
|
12222
|
+
.regex(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyRegExpOne)
|
|
12223
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12224
|
+
zod_1.z.coerce
|
|
12225
|
+
.string()
|
|
12226
|
+
.min(1)
|
|
12227
|
+
.max(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyMaxTwo)
|
|
12228
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12229
|
+
]),
|
|
12230
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12127
12231
|
.string()
|
|
12128
|
-
.
|
|
12232
|
+
.min(1)
|
|
12233
|
+
.max(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax)
|
|
12234
|
+
.regex(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12129
12235
|
});
|
|
12130
|
-
exports.
|
|
12131
|
-
|
|
12132
|
-
|
|
12236
|
+
exports.resetCustomerEntitlementUsageV2Body = zod_1.z
|
|
12237
|
+
.object({
|
|
12238
|
+
effectiveAt: zod_1.z.coerce
|
|
12133
12239
|
.date()
|
|
12134
12240
|
.optional()
|
|
12135
|
-
.describe('The
|
|
12136
|
-
|
|
12137
|
-
.
|
|
12138
|
-
.min(1)
|
|
12241
|
+
.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.'),
|
|
12242
|
+
preserveOverage: zod_1.z.coerce
|
|
12243
|
+
.boolean()
|
|
12139
12244
|
.optional()
|
|
12140
|
-
.describe(
|
|
12141
|
-
|
|
12142
|
-
.
|
|
12143
|
-
.min(1)
|
|
12245
|
+
.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."),
|
|
12246
|
+
retainAnchor: zod_1.z.coerce
|
|
12247
|
+
.boolean()
|
|
12144
12248
|
.optional()
|
|
12145
|
-
.describe('
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
zod_1.z
|
|
12149
|
-
.enum(['immediate', 'next_billing_cycle'])
|
|
12150
|
-
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
12151
|
-
zod_1.z.coerce
|
|
12152
|
-
.date()
|
|
12153
|
-
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
12154
|
-
])
|
|
12155
|
-
.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.')
|
|
12156
|
-
.default(exports.migrateSubscriptionBodyTimingDefault)
|
|
12157
|
-
.describe('Timing configuration for the migration, when the migration should take effect.\nIf not supported by the subscription, 400 will be returned.'),
|
|
12158
|
-
});
|
|
12249
|
+
.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.'),
|
|
12250
|
+
})
|
|
12251
|
+
.describe('Reset parameters');
|
|
12159
12252
|
/**
|
|
12160
|
-
*
|
|
12161
|
-
|
|
12162
|
-
* @summary Restore subscription
|
|
12253
|
+
* 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.
|
|
12254
|
+
* @summary Get customer entitlement value
|
|
12163
12255
|
*/
|
|
12164
|
-
exports.
|
|
12165
|
-
exports.
|
|
12166
|
-
|
|
12256
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12257
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12258
|
+
exports.getCustomerEntitlementValueV2Params = zod_1.z.object({
|
|
12259
|
+
customerIdOrKey: zod_1.z.union([
|
|
12260
|
+
zod_1.z.coerce
|
|
12261
|
+
.string()
|
|
12262
|
+
.regex(getCustomerEntitlementValueV2PathCustomerIdOrKeyRegExpOne)
|
|
12263
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12264
|
+
zod_1.z.coerce
|
|
12265
|
+
.string()
|
|
12266
|
+
.min(1)
|
|
12267
|
+
.max(getCustomerEntitlementValueV2PathCustomerIdOrKeyMaxTwo)
|
|
12268
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12269
|
+
]),
|
|
12270
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12167
12271
|
.string()
|
|
12168
|
-
.
|
|
12272
|
+
.min(1)
|
|
12273
|
+
.max(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax)
|
|
12274
|
+
.regex(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12169
12275
|
});
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
* @summary Unschedule cancelation
|
|
12173
|
-
*/
|
|
12174
|
-
exports.unscheduleCancelationPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12175
|
-
exports.unscheduleCancelationParams = zod_1.z.object({
|
|
12176
|
-
subscriptionId: zod_1.z.coerce
|
|
12177
|
-
.string()
|
|
12178
|
-
.regex(exports.unscheduleCancelationPathSubscriptionIdRegExp),
|
|
12276
|
+
exports.getCustomerEntitlementValueV2QueryParams = zod_1.z.object({
|
|
12277
|
+
time: zod_1.z.coerce.date().optional(),
|
|
12179
12278
|
});
|
|
12180
12279
|
/**
|
|
12181
12280
|
* List ingested events with advanced filtering and cursor pagination.
|
|
@@ -12202,4 +12301,68 @@ exports.listEventsV2QueryParams = zod_1.z.object({
|
|
|
12202
12301
|
.default(exports.listEventsV2QueryLimitDefault)
|
|
12203
12302
|
.describe('The limit of the pagination.'),
|
|
12204
12303
|
});
|
|
12304
|
+
/**
|
|
12305
|
+
* List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only.
|
|
12306
|
+
To fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint.
|
|
12307
|
+
If page is provided that takes precedence and the paginated response is returned.
|
|
12308
|
+
* @summary List grants
|
|
12309
|
+
*/
|
|
12310
|
+
exports.listGrantsV2QueryIncludeDeletedDefault = false;
|
|
12311
|
+
exports.listGrantsV2QueryPageDefault = 1;
|
|
12312
|
+
exports.listGrantsV2QueryPageSizeDefault = 100;
|
|
12313
|
+
exports.listGrantsV2QueryPageSizeMax = 1000;
|
|
12314
|
+
exports.listGrantsV2QueryOffsetDefault = 0;
|
|
12315
|
+
exports.listGrantsV2QueryOffsetMin = 0;
|
|
12316
|
+
exports.listGrantsV2QueryLimitDefault = 100;
|
|
12317
|
+
exports.listGrantsV2QueryLimitMax = 1000;
|
|
12318
|
+
exports.listGrantsV2QueryParams = zod_1.z.object({
|
|
12319
|
+
customer: zod_1.z
|
|
12320
|
+
.array(zod_1.z
|
|
12321
|
+
.union([
|
|
12322
|
+
zod_1.z.coerce
|
|
12323
|
+
.string()
|
|
12324
|
+
.regex(listGrantsV2QueryCustomerItemRegExpOne)
|
|
12325
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12326
|
+
zod_1.z.coerce
|
|
12327
|
+
.string()
|
|
12328
|
+
.min(1)
|
|
12329
|
+
.max(listGrantsV2QueryCustomerItemMaxTwo)
|
|
12330
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12331
|
+
])
|
|
12332
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.'))
|
|
12333
|
+
.optional()
|
|
12334
|
+
.describe('Filtering by multiple customers (either by ID or key).\n\nUsage: `?customer=customer-1&customer=customer-2`'),
|
|
12335
|
+
feature: zod_1.z
|
|
12336
|
+
.array(zod_1.z.coerce.string())
|
|
12337
|
+
.optional()
|
|
12338
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
12339
|
+
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
12340
|
+
limit: zod_1.z.coerce
|
|
12341
|
+
.number()
|
|
12342
|
+
.min(1)
|
|
12343
|
+
.max(exports.listGrantsV2QueryLimitMax)
|
|
12344
|
+
.default(exports.listGrantsV2QueryLimitDefault)
|
|
12345
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12346
|
+
offset: zod_1.z.coerce
|
|
12347
|
+
.number()
|
|
12348
|
+
.min(exports.listGrantsV2QueryOffsetMin)
|
|
12349
|
+
.optional()
|
|
12350
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12351
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
12352
|
+
orderBy: zod_1.z
|
|
12353
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
12354
|
+
.optional()
|
|
12355
|
+
.describe('The order by field.'),
|
|
12356
|
+
page: zod_1.z.coerce
|
|
12357
|
+
.number()
|
|
12358
|
+
.min(1)
|
|
12359
|
+
.default(exports.listGrantsV2QueryPageDefault)
|
|
12360
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
12361
|
+
pageSize: zod_1.z.coerce
|
|
12362
|
+
.number()
|
|
12363
|
+
.min(1)
|
|
12364
|
+
.max(exports.listGrantsV2QueryPageSizeMax)
|
|
12365
|
+
.default(exports.listGrantsV2QueryPageSizeDefault)
|
|
12366
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
12367
|
+
});
|
|
12205
12368
|
//# sourceMappingURL=index.js.map
|