@carlonicora/nextjs-jsonapi 1.15.0 → 1.16.0
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/{ApiResponseInterface-B4QdWh-y.d.mts → ApiResponseInterface-BvWIeLkq.d.ts} +2 -1
- package/dist/{ApiResponseInterface-QLDnxLA9.d.ts → ApiResponseInterface-CAbw0sv7.d.mts} +2 -1
- package/dist/{BlockNoteEditor-ITJLAOXC.mjs → BlockNoteEditor-HFX7Z5BQ.mjs} +5 -5
- package/dist/{BlockNoteEditor-FGXYUAWI.js → BlockNoteEditor-MBFDWP7X.js} +15 -15
- package/dist/{BlockNoteEditor-FGXYUAWI.js.map → BlockNoteEditor-MBFDWP7X.js.map} +1 -1
- package/dist/JsonApiRequest-45CLE65I.js +24 -0
- package/dist/{JsonApiRequest-FXZCYIER.js.map → JsonApiRequest-45CLE65I.js.map} +1 -1
- package/dist/{JsonApiRequest-HFWXMKMA.mjs → JsonApiRequest-6IPS3DZJ.mjs} +2 -2
- package/dist/{chunk-C6QXZGL7.js → chunk-2AZLCF6D.js} +1617 -158
- package/dist/chunk-2AZLCF6D.js.map +1 -0
- package/dist/{chunk-WAFOKMKT.mjs → chunk-5RAUCUAA.mjs} +3722 -396
- package/dist/chunk-5RAUCUAA.mjs.map +1 -0
- package/dist/{chunk-TGBXBUWM.mjs → chunk-BCKYJQ3K.mjs} +8 -1
- package/dist/chunk-BCKYJQ3K.mjs.map +1 -0
- package/dist/{chunk-JGVXZS7M.mjs → chunk-BCQSE3EU.mjs} +1588 -129
- package/dist/chunk-BCQSE3EU.mjs.map +1 -0
- package/dist/{chunk-FPZPD4JI.js → chunk-GPGJNTHP.js} +17 -10
- package/dist/chunk-GPGJNTHP.js.map +1 -0
- package/dist/{chunk-PK5DRSUD.js → chunk-ONB2DAIV.js} +4090 -764
- package/dist/chunk-ONB2DAIV.js.map +1 -0
- package/dist/{chunk-SJIVGCNM.mjs → chunk-POKIJ56Q.mjs} +7 -2
- package/dist/chunk-POKIJ56Q.mjs.map +1 -0
- package/dist/{chunk-6YD42BP6.js → chunk-R5QSSISB.js} +14 -9
- package/dist/chunk-R5QSSISB.js.map +1 -0
- package/dist/client/index.d.mts +5 -5
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +7 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +6 -4
- package/dist/components/index.d.mts +253 -9
- package/dist/components/index.d.ts +253 -9
- package/dist/components/index.js +83 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +82 -4
- package/dist/{config-eceYM5kN.d.ts → config-CWsTwnsK.d.mts} +7 -2
- package/dist/{config-C5tGGrYf.d.mts → config-DEaUbBqR.d.ts} +7 -2
- package/dist/{content.interface-TB2MfJGs.d.ts → content.interface-D_4b4RQt.d.ts} +1 -1
- package/dist/{content.interface-CxBBC7ec.d.mts → content.interface-Dk4UZcJM.d.mts} +1 -1
- package/dist/contexts/index.d.mts +2 -2
- package/dist/contexts/index.d.ts +2 -2
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +521 -18
- package/dist/core/index.d.ts +521 -18
- package/dist/core/index.js +53 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +52 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +56 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -3
- package/dist/{notification.interface-lG6UpTpt.d.mts → notification.interface-BllkURRm.d.mts} +1 -2
- package/dist/{notification.interface-lG6UpTpt.d.ts → notification.interface-BllkURRm.d.ts} +1 -2
- package/dist/{s3.service-DP_hsssD.d.mts → s3.service-BEfGqho0.d.ts} +20 -2
- package/dist/{s3.service-Dq-PTUNa.d.ts → s3.service-DIQRYe93.d.mts} +20 -2
- package/dist/scripts/generate-web-module/generator.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/generator.js +66 -0
- package/dist/scripts/generate-web-module/generator.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/index.d.ts +8 -0
- package/dist/scripts/generate-web-module/templates/index.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/index.js +18 -1
- package/dist/scripts/generate-web-module/templates/index.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/project/bootstrapper.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/bootstrapper.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/bootstrapper.template.js +141 -0
- package/dist/scripts/generate-web-module/templates/project/bootstrapper.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/env.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/env.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/env.template.js +110 -0
- package/dist/scripts/generate-web-module/templates/project/env.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/main-layout.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/main-layout.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/main-layout.template.js +101 -0
- package/dist/scripts/generate-web-module/templates/project/main-layout.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/middleware-env.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/middleware-env.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/middleware-env.template.js +66 -0
- package/dist/scripts/generate-web-module/templates/project/middleware-env.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-container.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/settings-container.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-container.template.js +257 -0
- package/dist/scripts/generate-web-module/templates/project/settings-container.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-context.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/settings-context.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-context.template.js +124 -0
- package/dist/scripts/generate-web-module/templates/project/settings-context.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-module-page.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/settings-module-page.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-module-page.template.js +78 -0
- package/dist/scripts/generate-web-module/templates/project/settings-module-page.template.js.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-page.template.d.ts +7 -0
- package/dist/scripts/generate-web-module/templates/project/settings-page.template.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/templates/project/settings-page.template.js +75 -0
- package/dist/scripts/generate-web-module/templates/project/settings-page.template.js.map +1 -0
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +1 -1
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
- package/dist/server/index.d.mts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +12 -12
- package/dist/server/index.mjs +2 -2
- package/dist/stripe-subscription.interface-C63L6hVg.d.mts +226 -0
- package/dist/stripe-subscription.interface-CUvNDvw5.d.ts +226 -0
- package/dist/{useSocket-Bua6MwLi.d.mts → useSocket-BpenBR2z.d.mts} +1 -1
- package/dist/{useSocket-D5dhUp4m.d.ts → useSocket-D-QYA0Sr.d.ts} +1 -1
- package/package.json +9 -1
- package/scripts/generate-web-module/generator.ts +83 -0
- package/scripts/generate-web-module/templates/index.ts +10 -0
- package/scripts/generate-web-module/templates/project/bootstrapper.template.ts +108 -0
- package/scripts/generate-web-module/templates/project/env.template.ts +77 -0
- package/scripts/generate-web-module/templates/project/main-layout.template.tsx +68 -0
- package/scripts/generate-web-module/templates/project/middleware-env.template.ts +33 -0
- package/scripts/generate-web-module/templates/project/settings-container.template.tsx +224 -0
- package/scripts/generate-web-module/templates/project/settings-context.template.tsx +91 -0
- package/scripts/generate-web-module/templates/project/settings-module-page.template.tsx +45 -0
- package/scripts/generate-web-module/templates/project/settings-page.template.tsx +42 -0
- package/scripts/generate-web-module/types/template-data.interface.ts +1 -1
- package/src/client/config.ts +9 -0
- package/src/components/index.ts +7 -0
- package/src/core/abstracts/AbstractService.ts +104 -0
- package/src/core/endpoint/EndpointCreator.ts +7 -4
- package/src/core/index.ts +12 -4
- package/src/core/interfaces/ApiResponseInterface.ts +1 -0
- package/src/core/registry/ModuleRegistry.ts +11 -2
- package/src/core/utils/translateResponse.ts +17 -0
- package/src/features/billing/components/cards/BillingUsageSummaryCard.tsx +97 -0
- package/src/features/billing/components/cards/CustomerInfoCard.tsx +112 -0
- package/src/features/billing/components/cards/InvoicesSummaryCard.tsx +114 -0
- package/src/features/billing/components/cards/PaymentMethodSummaryCard.tsx +119 -0
- package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +146 -0
- package/src/features/billing/components/cards/index.ts +5 -0
- package/src/features/billing/components/containers/BillingDashboardContainer.tsx +427 -0
- package/src/features/billing/components/containers/index.ts +1 -0
- package/src/features/billing/components/index.ts +6 -0
- package/src/features/billing/components/modals/BillingDetailModal.tsx +36 -0
- package/src/features/billing/components/modals/index.ts +1 -0
- package/src/features/billing/components/providers/StripeProvider.tsx +48 -0
- package/src/features/billing/components/providers/index.ts +1 -0
- package/src/features/billing/components/utils/currency.ts +49 -0
- package/src/features/billing/components/utils/date.ts +21 -0
- package/src/features/billing/components/utils/index.ts +2 -0
- package/src/features/billing/components/widgets/BillingAlertBanner.tsx +63 -0
- package/src/features/billing/components/widgets/index.ts +1 -0
- package/src/features/billing/data/Billing.ts +17 -0
- package/src/features/billing/data/billing.service.ts +58 -0
- package/src/features/billing/data/index.ts +5 -0
- package/src/features/billing/index.ts +3 -0
- package/src/features/billing/modules/billing.module.ts +9 -0
- package/src/features/billing/modules/index.ts +1 -0
- package/src/features/billing/stripe-customer/components/containers/PaymentMethodsContainer.tsx +79 -0
- package/src/features/billing/stripe-customer/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-customer/components/details/PaymentMethodCard.tsx +151 -0
- package/src/features/billing/stripe-customer/components/details/index.ts +1 -0
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodEditor.tsx +186 -0
- package/src/features/billing/stripe-customer/components/forms/index.ts +1 -0
- package/src/features/billing/stripe-customer/components/index.ts +4 -0
- package/src/features/billing/stripe-customer/components/lists/PaymentMethodsList.tsx +19 -0
- package/src/features/billing/stripe-customer/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-customer/data/index.ts +5 -0
- package/src/features/billing/stripe-customer/data/payment-method.interface.ts +27 -0
- package/src/features/billing/stripe-customer/data/payment-method.ts +119 -0
- package/src/features/billing/stripe-customer/data/stripe-customer.interface.ts +16 -0
- package/src/features/billing/stripe-customer/data/stripe-customer.service.ts +128 -0
- package/src/features/billing/stripe-customer/data/stripe-customer.ts +71 -0
- package/src/features/billing/stripe-customer/index.ts +3 -0
- package/src/features/billing/stripe-customer/stripe-customer.module.ts +9 -0
- package/src/features/billing/stripe-customer/stripe-payment-method.module.ts +9 -0
- package/src/features/billing/stripe-invoice/components/containers/InvoicesContainer.tsx +66 -0
- package/src/features/billing/stripe-invoice/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx +172 -0
- package/src/features/billing/stripe-invoice/components/details/index.ts +1 -0
- package/src/features/billing/stripe-invoice/components/index.ts +4 -0
- package/src/features/billing/stripe-invoice/components/lists/InvoicesList.tsx +84 -0
- package/src/features/billing/stripe-invoice/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-invoice/components/widgets/InvoiceStatusBadge.tsx +41 -0
- package/src/features/billing/stripe-invoice/components/widgets/index.ts +1 -0
- package/src/features/billing/stripe-invoice/data/index.ts +3 -0
- package/src/features/billing/stripe-invoice/data/stripe-invoice.interface.ts +65 -0
- package/src/features/billing/stripe-invoice/data/stripe-invoice.service.ts +64 -0
- package/src/features/billing/stripe-invoice/data/stripe-invoice.ts +177 -0
- package/src/features/billing/stripe-invoice/index.ts +2 -0
- package/src/features/billing/stripe-invoice/stripe-invoice.module.ts +9 -0
- package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +304 -0
- package/src/features/billing/stripe-price/components/forms/index.ts +1 -0
- package/src/features/billing/stripe-price/components/index.ts +2 -0
- package/src/features/billing/stripe-price/components/lists/PricesList.tsx +283 -0
- package/src/features/billing/stripe-price/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-price/data/index.ts +3 -0
- package/src/features/billing/stripe-price/data/stripe-price.interface.ts +48 -0
- package/src/features/billing/stripe-price/data/stripe-price.service.ts +123 -0
- package/src/features/billing/stripe-price/data/stripe-price.ts +156 -0
- package/src/features/billing/stripe-price/index.ts +2 -0
- package/src/features/billing/stripe-price/stripe-price.module.ts +9 -0
- package/src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx +86 -0
- package/src/features/billing/stripe-product/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-product/components/forms/ProductEditor.tsx +100 -0
- package/src/features/billing/stripe-product/components/forms/index.ts +1 -0
- package/src/features/billing/stripe-product/components/index.ts +3 -0
- package/src/features/billing/stripe-product/components/lists/ProductsList.tsx +206 -0
- package/src/features/billing/stripe-product/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-product/data/index.ts +3 -0
- package/src/features/billing/stripe-product/data/stripe-product.interface.ts +18 -0
- package/src/features/billing/stripe-product/data/stripe-product.service.ts +112 -0
- package/src/features/billing/stripe-product/data/stripe-product.ts +74 -0
- package/src/features/billing/stripe-product/index.ts +2 -0
- package/src/features/billing/stripe-product/stripe-product.module.ts +9 -0
- package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +304 -0
- package/src/features/billing/stripe-subscription/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +223 -0
- package/src/features/billing/stripe-subscription/components/details/index.ts +1 -0
- package/src/features/billing/stripe-subscription/components/forms/CancelSubscriptionDialog.tsx +116 -0
- package/src/features/billing/stripe-subscription/components/forms/SubscriptionEditor.tsx +331 -0
- package/src/features/billing/stripe-subscription/components/forms/index.ts +2 -0
- package/src/features/billing/stripe-subscription/components/index.ts +5 -0
- package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +104 -0
- package/src/features/billing/stripe-subscription/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx +95 -0
- package/src/features/billing/stripe-subscription/components/widgets/PricingCardsGrid.tsx +110 -0
- package/src/features/billing/stripe-subscription/components/widgets/ProrationPreview.tsx +41 -0
- package/src/features/billing/stripe-subscription/components/widgets/SubscriptionStatusBadge.tsx +60 -0
- package/src/features/billing/stripe-subscription/components/widgets/index.ts +4 -0
- package/src/features/billing/stripe-subscription/data/index.ts +3 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +66 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.service.ts +193 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +135 -0
- package/src/features/billing/stripe-subscription/hooks/index.ts +1 -0
- package/src/features/billing/stripe-subscription/hooks/useConfirmSubscriptionPayment.ts +111 -0
- package/src/features/billing/stripe-subscription/index.ts +5 -0
- package/src/features/billing/stripe-subscription/stripe-subscription.module.ts +9 -0
- package/src/features/billing/stripe-usage/components/containers/UsageContainer.tsx +109 -0
- package/src/features/billing/stripe-usage/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +90 -0
- package/src/features/billing/stripe-usage/components/details/index.ts +1 -0
- package/src/features/billing/stripe-usage/components/index.ts +4 -0
- package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +72 -0
- package/src/features/billing/stripe-usage/components/lists/index.ts +1 -0
- package/src/features/billing/stripe-usage/components/widgets/UsageSummaryCards.tsx +19 -0
- package/src/features/billing/stripe-usage/components/widgets/index.ts +1 -0
- package/src/features/billing/stripe-usage/data/index.ts +3 -0
- package/src/features/billing/stripe-usage/data/stripe-usage.interface.ts +55 -0
- package/src/features/billing/stripe-usage/data/stripe-usage.service.ts +129 -0
- package/src/features/billing/stripe-usage/data/stripe-usage.ts +70 -0
- package/src/features/billing/stripe-usage/index.ts +2 -0
- package/src/features/billing/stripe-usage/stripe-usage.module.ts +9 -0
- package/src/features/company/components/forms/CompanyEditor.tsx +2 -2
- package/src/features/company/contexts/CompanyContext.tsx +2 -2
- package/src/features/feature/components/forms/FormFeatures.tsx +13 -106
- package/src/features/feature/data/feature.interface.ts +1 -1
- package/src/features/feature/data/feature.ts +4 -4
- package/src/features/index.ts +7 -0
- package/src/features/module/data/module.interface.ts +0 -1
- package/src/features/module/data/module.ts +0 -6
- package/src/features/user/components/lists/ContributorsList.tsx +2 -2
- package/src/features/user/components/widgets/UserAvatar.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/shadcnui/custom/link.tsx +16 -6
- package/src/utils/blocknote-diff.util.ts +2 -1
- package/src/utils/blocknote-word-diff-renderer.util.ts +8 -7
- package/dist/AuthComponent-hxOPs9o8.d.mts +0 -11
- package/dist/AuthComponent-hxOPs9o8.d.ts +0 -11
- package/dist/JsonApiRequest-FXZCYIER.js +0 -24
- package/dist/chunk-6YD42BP6.js.map +0 -1
- package/dist/chunk-C6QXZGL7.js.map +0 -1
- package/dist/chunk-FPZPD4JI.js.map +0 -1
- package/dist/chunk-JGVXZS7M.mjs.map +0 -1
- package/dist/chunk-PK5DRSUD.js.map +0 -1
- package/dist/chunk-SJIVGCNM.mjs.map +0 -1
- package/dist/chunk-TGBXBUWM.mjs.map +0 -1
- package/dist/chunk-WAFOKMKT.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-ITJLAOXC.mjs.map → BlockNoteEditor-HFX7Z5BQ.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-HFWXMKMA.mjs.map → JsonApiRequest-6IPS3DZJ.mjs.map} +0 -0
package/dist/core/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as ApiData, a as ApiResponseInterface } from '../ApiResponseInterface-
|
|
2
|
-
import { A as ApiDataInterface, J as JsonApiHydratedDataInterface, a as ApiRequestDataTypeInterface, M as ModuleWithPermissions, F as FieldSelector, i as PermissionUser, b as Action, h as PermissionModule, j as ModuleFactory, m as ModuleInterface, l as FeatureInterface, o as RoleInterface, R as RoleInput, k as CompanyInterface, C as CompanyInput, U as UserInterface, p as UserInput, N as NotificationInterface, n as NotificationInput } from '../notification.interface-
|
|
3
|
-
export { G as GetterKeys, f as ModuleDefinition, e as ModulePermissionDefinition, d as PageUrl, P as PermissionCheck, g as PermissionConfig, c as createJsonApiInclusion } from '../notification.interface-
|
|
4
|
-
import { c as AuthInterface, a as AuthInput, j as S3Interface, i as S3Input } from '../s3.service-
|
|
5
|
-
export {
|
|
1
|
+
import { A as ApiData, a as ApiResponseInterface } from '../ApiResponseInterface-CAbw0sv7.mjs';
|
|
2
|
+
import { A as ApiDataInterface, J as JsonApiHydratedDataInterface, a as ApiRequestDataTypeInterface, M as ModuleWithPermissions, F as FieldSelector, i as PermissionUser, b as Action, h as PermissionModule, j as ModuleFactory, m as ModuleInterface, l as FeatureInterface, o as RoleInterface, R as RoleInput, k as CompanyInterface, C as CompanyInput, U as UserInterface, p as UserInput, N as NotificationInterface, n as NotificationInput } from '../notification.interface-BllkURRm.mjs';
|
|
3
|
+
export { G as GetterKeys, f as ModuleDefinition, e as ModulePermissionDefinition, d as PageUrl, P as PermissionCheck, g as PermissionConfig, c as createJsonApiInclusion } from '../notification.interface-BllkURRm.mjs';
|
|
4
|
+
import { c as AuthInterface, a as AuthInput, A as AbstractService, N as NextRef, P as PreviousRef, j as S3Interface, i as S3Input } from '../s3.service-DIQRYe93.mjs';
|
|
5
|
+
export { b as AuthQuery, d as AuthService, C as CompanyService, e as ContentService, F as FeatureService, H as HttpMethod, f as NotificationService, h as PushService, R as RoleService, k as S3Service, S as SelfRef, U as UserService, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from '../s3.service-DIQRYe93.mjs';
|
|
6
6
|
export { B as BreadcrumbItemData } from '../breadcrumb.item.data.interface-CgB4_1EE.mjs';
|
|
7
7
|
export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from '../content.fields-Ck5lkQ5d.mjs';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
@@ -12,8 +12,9 @@ import { ReactElement, ReactNode } from 'react';
|
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { PartialBlock } from '@blocknote/core';
|
|
14
14
|
import { LucideIcon } from 'lucide-react';
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
import { M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, j as StripeSubscriptionInterface, I as InvoiceStatus, g as StripeProductInterface, d as StripePriceInterface, h as StripeProductInput, e as PriceRecurring, f as StripePriceInput, i as SubscriptionStatus, k as StripeSubscriptionInput, m as StripeSubscriptionCreateResponse, b as ProrationPreviewInterface, n as StripeUsageInterface, R as ReportUsageInput, U as UsageSummaryInterface } from '../stripe-subscription.interface-C63L6hVg.mjs';
|
|
16
|
+
export { A as AuthComponent, c as ProrationLineItem, l as StripeSubscriptionCreateMeta, p as UsageRecordInterface } from '../stripe-subscription.interface-C63L6hVg.mjs';
|
|
17
|
+
import { a as ContentInterface, C as ContentInput } from '../content.interface-Dk4UZcJM.mjs';
|
|
17
18
|
import 'd3';
|
|
18
19
|
|
|
19
20
|
declare abstract class AbstractApiData implements ApiDataInterface {
|
|
@@ -200,6 +201,14 @@ interface FoundationModuleDefinitions {
|
|
|
200
201
|
Content: ModuleWithPermissions;
|
|
201
202
|
UserTopic: ModuleWithPermissions;
|
|
202
203
|
UserExpertise: ModuleWithPermissions;
|
|
204
|
+
Billing: ModuleWithPermissions;
|
|
205
|
+
StripeCustomer: ModuleWithPermissions;
|
|
206
|
+
StripePaymentMethod: ModuleWithPermissions;
|
|
207
|
+
StripeSubscription: ModuleWithPermissions;
|
|
208
|
+
StripeInvoice: ModuleWithPermissions;
|
|
209
|
+
StripeProduct: ModuleWithPermissions;
|
|
210
|
+
StripePrice: ModuleWithPermissions;
|
|
211
|
+
StripeUsage: ModuleWithPermissions;
|
|
203
212
|
}
|
|
204
213
|
interface AppModuleDefinitions {
|
|
205
214
|
}
|
|
@@ -257,7 +266,7 @@ declare function hasBootstrapper(): boolean;
|
|
|
257
266
|
declare function resetBootstrapStore(): void;
|
|
258
267
|
|
|
259
268
|
type EndpointQuery = {
|
|
260
|
-
endpoint: ApiRequestDataTypeInterface;
|
|
269
|
+
endpoint: ApiRequestDataTypeInterface | string;
|
|
261
270
|
id?: string;
|
|
262
271
|
childEndpoint?: ApiRequestDataTypeInterface | string;
|
|
263
272
|
childId?: string;
|
|
@@ -269,7 +278,7 @@ type EndpointQuery = {
|
|
|
269
278
|
declare class EndpointCreator {
|
|
270
279
|
private _endpoint;
|
|
271
280
|
constructor(params: {
|
|
272
|
-
endpoint: ApiRequestDataTypeInterface;
|
|
281
|
+
endpoint: ApiRequestDataTypeInterface | string;
|
|
273
282
|
id?: string;
|
|
274
283
|
childEndpoint?: ApiRequestDataTypeInterface | string;
|
|
275
284
|
childId?: string;
|
|
@@ -278,7 +287,7 @@ declare class EndpointCreator {
|
|
|
278
287
|
value: string;
|
|
279
288
|
}[];
|
|
280
289
|
});
|
|
281
|
-
endpoint(value: ApiRequestDataTypeInterface): EndpointCreator;
|
|
290
|
+
endpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
|
|
282
291
|
id(value: string): EndpointCreator;
|
|
283
292
|
childEndpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
|
|
284
293
|
childId(value: string): EndpointCreator;
|
|
@@ -570,14 +579,14 @@ declare const getLucideIconByModuleName: (params: {
|
|
|
570
579
|
name: string;
|
|
571
580
|
}) => LucideIcon | null;
|
|
572
581
|
|
|
582
|
+
declare const AuthModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
583
|
+
|
|
573
584
|
declare const ModuleModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
574
585
|
|
|
575
586
|
declare class Module extends AbstractApiData implements ModuleInterface {
|
|
576
587
|
private _name?;
|
|
577
|
-
private _isCore?;
|
|
578
588
|
private _permissions?;
|
|
579
589
|
get name(): string;
|
|
580
|
-
get isCore(): boolean;
|
|
581
590
|
get permissions(): {
|
|
582
591
|
create: boolean | string;
|
|
583
592
|
read: boolean | string;
|
|
@@ -591,10 +600,10 @@ declare const FeatureModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
|
591
600
|
|
|
592
601
|
declare class Feature extends AbstractApiData implements FeatureInterface {
|
|
593
602
|
private _name?;
|
|
594
|
-
private
|
|
603
|
+
private _isCore?;
|
|
595
604
|
private _modules;
|
|
596
605
|
get name(): string;
|
|
597
|
-
get
|
|
606
|
+
get isCore(): boolean;
|
|
598
607
|
get modules(): ModuleInterface[];
|
|
599
608
|
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
600
609
|
}
|
|
@@ -697,7 +706,503 @@ declare class Auth extends AbstractApiData implements AuthInterface {
|
|
|
697
706
|
createJsonApi(data: AuthInput): any;
|
|
698
707
|
}
|
|
699
708
|
|
|
700
|
-
|
|
709
|
+
/**
|
|
710
|
+
* Legacy billing service - only contains meter methods
|
|
711
|
+
* @deprecated Use StripeUsageService for meter methods, StripeInvoiceService for invoices,
|
|
712
|
+
* StripeCustomerService for payment methods
|
|
713
|
+
*/
|
|
714
|
+
declare class BillingService extends AbstractService {
|
|
715
|
+
/**
|
|
716
|
+
* List all available usage meters
|
|
717
|
+
* @deprecated Use StripeUsageService.listMeters() instead
|
|
718
|
+
*/
|
|
719
|
+
static listMeters(params?: {
|
|
720
|
+
next?: NextRef;
|
|
721
|
+
prev?: PreviousRef;
|
|
722
|
+
}): Promise<MeterInterface[]>;
|
|
723
|
+
/**
|
|
724
|
+
* Get meter summaries for a specific time period
|
|
725
|
+
* @deprecated Use StripeUsageService.getMeterSummaries() instead
|
|
726
|
+
*/
|
|
727
|
+
static getMeterSummaries(params: {
|
|
728
|
+
meterId: string;
|
|
729
|
+
startTime: Date;
|
|
730
|
+
endTime: Date;
|
|
731
|
+
}): Promise<MeterSummaryInterface[]>;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Billing is a namespace module used for permissions and non-entity endpoints.
|
|
736
|
+
* It doesn't correspond to a specific backend entity but provides routing for
|
|
737
|
+
* meter-related endpoints and permission checks.
|
|
738
|
+
*/
|
|
739
|
+
declare class Billing extends AbstractApiData {
|
|
740
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
741
|
+
createJsonApi(_data?: any): any;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
declare const BillingModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* PaymentMethod class for JSON:API rehydration
|
|
748
|
+
*
|
|
749
|
+
* Transforms flat JSON:API attributes into the nested PaymentMethodInterface structure
|
|
750
|
+
* expected by the frontend components.
|
|
751
|
+
*/
|
|
752
|
+
declare class PaymentMethod extends AbstractApiData implements PaymentMethodInterface {
|
|
753
|
+
private _paymentType?;
|
|
754
|
+
private _card?;
|
|
755
|
+
private _billingDetails?;
|
|
756
|
+
get type(): string;
|
|
757
|
+
get card(): {
|
|
758
|
+
brand: string;
|
|
759
|
+
last4: string;
|
|
760
|
+
expMonth: number;
|
|
761
|
+
expYear: number;
|
|
762
|
+
} | undefined;
|
|
763
|
+
get billingDetails(): {
|
|
764
|
+
name?: string;
|
|
765
|
+
email?: string;
|
|
766
|
+
phone?: string;
|
|
767
|
+
address?: {
|
|
768
|
+
city?: string;
|
|
769
|
+
country?: string;
|
|
770
|
+
line1?: string;
|
|
771
|
+
line2?: string;
|
|
772
|
+
postalCode?: string;
|
|
773
|
+
state?: string;
|
|
774
|
+
};
|
|
775
|
+
} | undefined;
|
|
776
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
777
|
+
createJsonApi(_data?: any): any;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
declare class StripeCustomer extends AbstractApiData implements StripeCustomerInterface {
|
|
781
|
+
private _stripeCustomerId?;
|
|
782
|
+
private _email?;
|
|
783
|
+
private _name?;
|
|
784
|
+
private _defaultPaymentMethodId?;
|
|
785
|
+
private _currency?;
|
|
786
|
+
private _balance?;
|
|
787
|
+
private _delinquent;
|
|
788
|
+
private _metadata?;
|
|
789
|
+
get stripeCustomerId(): string;
|
|
790
|
+
get email(): string | undefined;
|
|
791
|
+
get name(): string | undefined;
|
|
792
|
+
get defaultPaymentMethodId(): string | undefined;
|
|
793
|
+
get currency(): string | undefined;
|
|
794
|
+
get balance(): number | undefined;
|
|
795
|
+
get delinquent(): boolean;
|
|
796
|
+
get metadata(): Record<string, any> | undefined;
|
|
797
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
798
|
+
createJsonApi(_data?: any): any;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Customer-facing billing service for managing subscriptions, payments, and usage
|
|
803
|
+
*/
|
|
804
|
+
declare class StripeCustomerService extends AbstractService {
|
|
805
|
+
/**
|
|
806
|
+
* Get the current user's billing customer record
|
|
807
|
+
*/
|
|
808
|
+
static getCustomer(): Promise<StripeCustomerInterface>;
|
|
809
|
+
/**
|
|
810
|
+
* Create a billing customer for the current user
|
|
811
|
+
*/
|
|
812
|
+
static createCustomer(): Promise<StripeCustomerInterface>;
|
|
813
|
+
/**
|
|
814
|
+
* Create a setup intent for adding payment methods
|
|
815
|
+
*/
|
|
816
|
+
static createSetupIntent(): Promise<{
|
|
817
|
+
clientSecret: string;
|
|
818
|
+
}>;
|
|
819
|
+
/**
|
|
820
|
+
* Create a Stripe customer portal session URL
|
|
821
|
+
*/
|
|
822
|
+
static createPortalSession(): Promise<{
|
|
823
|
+
url: string;
|
|
824
|
+
}>;
|
|
825
|
+
/**
|
|
826
|
+
* List all payment methods for the current user
|
|
827
|
+
*/
|
|
828
|
+
static listPaymentMethods(params?: {
|
|
829
|
+
next?: NextRef;
|
|
830
|
+
prev?: PreviousRef;
|
|
831
|
+
}): Promise<PaymentMethodInterface[]>;
|
|
832
|
+
/**
|
|
833
|
+
* Set the default payment method for the current user
|
|
834
|
+
*/
|
|
835
|
+
static setDefaultPaymentMethod(params: {
|
|
836
|
+
paymentMethodId: string;
|
|
837
|
+
}): Promise<StripeCustomerInterface>;
|
|
838
|
+
/**
|
|
839
|
+
* Remove a payment method
|
|
840
|
+
*/
|
|
841
|
+
static removePaymentMethod(params: {
|
|
842
|
+
paymentMethodId: string;
|
|
843
|
+
}): Promise<void>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
declare const StripeCustomerModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
847
|
+
|
|
848
|
+
declare const StripePaymentMethodModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
849
|
+
|
|
850
|
+
declare class StripeInvoice extends AbstractApiData implements StripeInvoiceInterface {
|
|
851
|
+
private _stripeInvoiceId?;
|
|
852
|
+
private _stripeInvoiceNumber?;
|
|
853
|
+
private _customerId?;
|
|
854
|
+
private _subscriptionId?;
|
|
855
|
+
private _subscription?;
|
|
856
|
+
private _status?;
|
|
857
|
+
private _amountDue?;
|
|
858
|
+
private _amountPaid?;
|
|
859
|
+
private _amountRemaining?;
|
|
860
|
+
private _subtotal?;
|
|
861
|
+
private _total?;
|
|
862
|
+
private _tax?;
|
|
863
|
+
private _currency?;
|
|
864
|
+
private _periodStart?;
|
|
865
|
+
private _periodEnd?;
|
|
866
|
+
private _dueDate?;
|
|
867
|
+
private _paidAt?;
|
|
868
|
+
private _attemptCount;
|
|
869
|
+
private _attempted;
|
|
870
|
+
private _stripeHostedInvoiceUrl?;
|
|
871
|
+
private _stripePdfUrl?;
|
|
872
|
+
private _paid;
|
|
873
|
+
private _metadata?;
|
|
874
|
+
get stripeInvoiceId(): string;
|
|
875
|
+
get stripeInvoiceNumber(): string | undefined;
|
|
876
|
+
get customerId(): string | undefined;
|
|
877
|
+
get subscriptionId(): string | undefined;
|
|
878
|
+
get subscription(): StripeSubscriptionInterface | undefined;
|
|
879
|
+
get status(): InvoiceStatus;
|
|
880
|
+
get amountDue(): number;
|
|
881
|
+
get amountPaid(): number;
|
|
882
|
+
get amountRemaining(): number;
|
|
883
|
+
get subtotal(): number;
|
|
884
|
+
get total(): number;
|
|
885
|
+
get tax(): number | undefined;
|
|
886
|
+
get currency(): string;
|
|
887
|
+
get periodStart(): Date;
|
|
888
|
+
get periodEnd(): Date;
|
|
889
|
+
get dueDate(): Date | undefined;
|
|
890
|
+
get paidAt(): Date | undefined;
|
|
891
|
+
get attemptCount(): number;
|
|
892
|
+
get attempted(): boolean;
|
|
893
|
+
get stripeHostedInvoiceUrl(): string | undefined;
|
|
894
|
+
get stripePdfUrl(): string | undefined;
|
|
895
|
+
get paid(): boolean;
|
|
896
|
+
get metadata(): Record<string, any> | undefined;
|
|
897
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
898
|
+
createJsonApi(_data?: any): any;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Service for managing Stripe invoices
|
|
903
|
+
*/
|
|
904
|
+
declare class StripeInvoiceService extends AbstractService {
|
|
905
|
+
/**
|
|
906
|
+
* List all invoices for the current user
|
|
907
|
+
*/
|
|
908
|
+
static listInvoices(params?: {
|
|
909
|
+
status?: string;
|
|
910
|
+
next?: NextRef;
|
|
911
|
+
prev?: PreviousRef;
|
|
912
|
+
}): Promise<StripeInvoiceInterface[]>;
|
|
913
|
+
/**
|
|
914
|
+
* Get a specific invoice by ID
|
|
915
|
+
*/
|
|
916
|
+
static getInvoice(params: {
|
|
917
|
+
invoiceId: string;
|
|
918
|
+
}): Promise<StripeInvoiceInterface>;
|
|
919
|
+
/**
|
|
920
|
+
* Get the upcoming invoice for the current user
|
|
921
|
+
*/
|
|
922
|
+
static getUpcomingInvoice(): Promise<StripeInvoiceInterface>;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
declare const StripeInvoiceModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
926
|
+
|
|
927
|
+
declare class StripeProduct extends AbstractApiData implements StripeProductInterface {
|
|
928
|
+
private _stripeProductId?;
|
|
929
|
+
private _name?;
|
|
930
|
+
private _description?;
|
|
931
|
+
private _active;
|
|
932
|
+
private _metadata?;
|
|
933
|
+
private _stripePrices;
|
|
934
|
+
get stripeProductId(): string;
|
|
935
|
+
get name(): string;
|
|
936
|
+
get description(): string | undefined;
|
|
937
|
+
get active(): boolean;
|
|
938
|
+
get metadata(): Record<string, any> | undefined;
|
|
939
|
+
get stripePrices(): StripePriceInterface[];
|
|
940
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
941
|
+
createJsonApi(data: StripeProductInput): any;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
declare class StripeProductService extends AbstractService {
|
|
945
|
+
/**
|
|
946
|
+
* List all products (admin)
|
|
947
|
+
*/
|
|
948
|
+
static listProducts(params?: {
|
|
949
|
+
active?: boolean;
|
|
950
|
+
next?: NextRef;
|
|
951
|
+
prev?: PreviousRef;
|
|
952
|
+
}): Promise<StripeProductInterface[]>;
|
|
953
|
+
/**
|
|
954
|
+
* Get a specific product by ID (admin)
|
|
955
|
+
*/
|
|
956
|
+
static getProduct(params: {
|
|
957
|
+
id: string;
|
|
958
|
+
}): Promise<StripeProductInterface>;
|
|
959
|
+
/**
|
|
960
|
+
* Create a new product (admin)
|
|
961
|
+
*/
|
|
962
|
+
static createProduct(params: StripeProductInput): Promise<StripeProductInterface>;
|
|
963
|
+
/**
|
|
964
|
+
* Update an existing product (admin)
|
|
965
|
+
*/
|
|
966
|
+
static updateProduct(params: StripeProductInput): Promise<StripeProductInterface>;
|
|
967
|
+
/**
|
|
968
|
+
* Archive a product (admin)
|
|
969
|
+
*/
|
|
970
|
+
static archiveProduct(params: {
|
|
971
|
+
id: string;
|
|
972
|
+
}): Promise<StripeProductInterface>;
|
|
973
|
+
/**
|
|
974
|
+
* Reactivate a product (admin) - sets active to true
|
|
975
|
+
*/
|
|
976
|
+
static reactivateProduct(params: {
|
|
977
|
+
id: string;
|
|
978
|
+
}): Promise<StripeProductInterface>;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
declare const StripeProductModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
982
|
+
|
|
983
|
+
declare class StripePrice extends AbstractApiData implements StripePriceInterface {
|
|
984
|
+
private _stripePriceId?;
|
|
985
|
+
private _productId?;
|
|
986
|
+
private _product?;
|
|
987
|
+
private _active;
|
|
988
|
+
private _currency?;
|
|
989
|
+
private _unitAmount?;
|
|
990
|
+
private _recurring?;
|
|
991
|
+
private _priceType?;
|
|
992
|
+
private _nickname?;
|
|
993
|
+
private _lookupKey?;
|
|
994
|
+
private _metadata?;
|
|
995
|
+
private _description?;
|
|
996
|
+
private _features?;
|
|
997
|
+
get stripePriceId(): string;
|
|
998
|
+
get productId(): string;
|
|
999
|
+
get product(): StripeProductInterface | undefined;
|
|
1000
|
+
get active(): boolean;
|
|
1001
|
+
get currency(): string;
|
|
1002
|
+
get unitAmount(): number | undefined;
|
|
1003
|
+
get recurring(): PriceRecurring | undefined;
|
|
1004
|
+
get priceType(): "one_time" | "recurring";
|
|
1005
|
+
get nickname(): string | undefined;
|
|
1006
|
+
get lookupKey(): string | undefined;
|
|
1007
|
+
get metadata(): Record<string, any> | undefined;
|
|
1008
|
+
get description(): string | undefined;
|
|
1009
|
+
get features(): string[] | undefined;
|
|
1010
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
1011
|
+
createJsonApi(data: StripePriceInput): any;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Admin billing service for managing products and prices
|
|
1016
|
+
*/
|
|
1017
|
+
declare class StripePriceService extends AbstractService {
|
|
1018
|
+
/**
|
|
1019
|
+
* List all prices (admin)
|
|
1020
|
+
*/
|
|
1021
|
+
static listPrices(params?: {
|
|
1022
|
+
productId?: string;
|
|
1023
|
+
active?: boolean;
|
|
1024
|
+
next?: NextRef;
|
|
1025
|
+
prev?: PreviousRef;
|
|
1026
|
+
}): Promise<StripePriceInterface[]>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Get a specific price by ID (admin)
|
|
1029
|
+
*/
|
|
1030
|
+
static getPrice(params: {
|
|
1031
|
+
id: string;
|
|
1032
|
+
}): Promise<StripePriceInterface>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Create a new price (admin)
|
|
1035
|
+
*/
|
|
1036
|
+
static createPrice(params: StripePriceInput): Promise<StripePriceInterface>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Update an existing price (admin)
|
|
1039
|
+
*/
|
|
1040
|
+
static updatePrice(params: StripePriceInput): Promise<StripePriceInterface>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Archive a price (admin)
|
|
1043
|
+
*
|
|
1044
|
+
* Sets the price as inactive. Archived prices cannot be used for new subscriptions.
|
|
1045
|
+
*/
|
|
1046
|
+
static archivePrice(params: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
}): Promise<void>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Reactivate a price (admin)
|
|
1051
|
+
*
|
|
1052
|
+
* Sets the price as active. Active prices can be used for new subscriptions.
|
|
1053
|
+
*/
|
|
1054
|
+
static reactivatePrice(params: {
|
|
1055
|
+
id: string;
|
|
1056
|
+
}): Promise<void>;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
declare const StripePriceModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1060
|
+
|
|
1061
|
+
declare class StripeSubscription extends AbstractApiData implements StripeSubscriptionInterface {
|
|
1062
|
+
private _stripeSubscriptionId?;
|
|
1063
|
+
private _status?;
|
|
1064
|
+
private _currentPeriodStart?;
|
|
1065
|
+
private _currentPeriodEnd?;
|
|
1066
|
+
private _cancelAtPeriodEnd;
|
|
1067
|
+
private _canceledAt?;
|
|
1068
|
+
private _trialStart?;
|
|
1069
|
+
private _trialEnd?;
|
|
1070
|
+
private _price?;
|
|
1071
|
+
get stripeSubscriptionId(): string;
|
|
1072
|
+
get status(): SubscriptionStatus;
|
|
1073
|
+
get currentPeriodStart(): Date;
|
|
1074
|
+
get currentPeriodEnd(): Date;
|
|
1075
|
+
get cancelAtPeriodEnd(): boolean;
|
|
1076
|
+
get canceledAt(): Date | undefined;
|
|
1077
|
+
get trialStart(): Date | undefined;
|
|
1078
|
+
get trialEnd(): Date | undefined;
|
|
1079
|
+
get price(): StripePriceInterface | undefined;
|
|
1080
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
1081
|
+
createJsonApi(data: StripeSubscriptionInput): any;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Customer-facing billing service for managing subscriptions, payments, and usage
|
|
1086
|
+
*/
|
|
1087
|
+
declare class StripeSubscriptionService extends AbstractService {
|
|
1088
|
+
/**
|
|
1089
|
+
* List all subscriptions for the current user
|
|
1090
|
+
*/
|
|
1091
|
+
static listSubscriptions(params?: {
|
|
1092
|
+
next?: NextRef;
|
|
1093
|
+
prev?: PreviousRef;
|
|
1094
|
+
}): Promise<StripeSubscriptionInterface[]>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Get a specific subscription by ID
|
|
1097
|
+
*/
|
|
1098
|
+
static getSubscription(params: {
|
|
1099
|
+
subscriptionId: string;
|
|
1100
|
+
}): Promise<StripeSubscriptionInterface>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Create a new subscription
|
|
1103
|
+
* Returns subscription data along with meta containing SCA payment confirmation details
|
|
1104
|
+
*/
|
|
1105
|
+
static createSubscription(params: StripeSubscriptionInput): Promise<StripeSubscriptionCreateResponse>;
|
|
1106
|
+
/**
|
|
1107
|
+
* Change the plan of an existing subscription
|
|
1108
|
+
*/
|
|
1109
|
+
static changePlan(params: StripeSubscriptionInput): Promise<StripeSubscriptionInterface>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Get a proration preview for a plan change
|
|
1112
|
+
*/
|
|
1113
|
+
static getProrationPreview(params: {
|
|
1114
|
+
subscriptionId: string;
|
|
1115
|
+
newPriceId: string;
|
|
1116
|
+
quantity?: number;
|
|
1117
|
+
}): Promise<ProrationPreviewInterface>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Cancel a subscription
|
|
1120
|
+
*/
|
|
1121
|
+
static cancelSubscription(params: StripeSubscriptionInput): Promise<StripeSubscriptionInterface>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Pause a subscription
|
|
1124
|
+
*/
|
|
1125
|
+
static pauseSubscription(params: {
|
|
1126
|
+
subscriptionId: string;
|
|
1127
|
+
}): Promise<StripeSubscriptionInterface>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Resume a paused subscription
|
|
1130
|
+
*/
|
|
1131
|
+
static resumeSubscription(params: {
|
|
1132
|
+
subscriptionId: string;
|
|
1133
|
+
}): Promise<StripeSubscriptionInterface>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Sync a subscription with the latest data from Stripe
|
|
1136
|
+
* This is useful after payment confirmation to get the updated status
|
|
1137
|
+
*/
|
|
1138
|
+
static syncSubscription(params: {
|
|
1139
|
+
subscriptionId: string;
|
|
1140
|
+
}): Promise<StripeSubscriptionInterface>;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
declare const StripeSubscriptionModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1144
|
+
|
|
1145
|
+
declare class StripeUsage extends AbstractApiData implements StripeUsageInterface {
|
|
1146
|
+
private _subscriptionId?;
|
|
1147
|
+
private _meterId?;
|
|
1148
|
+
private _meterEventName?;
|
|
1149
|
+
private _stripeEventId?;
|
|
1150
|
+
private _quantity?;
|
|
1151
|
+
private _timestamp?;
|
|
1152
|
+
get subscriptionId(): string;
|
|
1153
|
+
get meterId(): string;
|
|
1154
|
+
get meterEventName(): string;
|
|
1155
|
+
get stripeEventId(): string;
|
|
1156
|
+
get quantity(): number;
|
|
1157
|
+
get timestamp(): Date | undefined;
|
|
1158
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
1159
|
+
createJsonApi(data: ReportUsageInput): any;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Service for managing Stripe usage tracking
|
|
1164
|
+
*/
|
|
1165
|
+
declare class StripeUsageService extends AbstractService {
|
|
1166
|
+
/**
|
|
1167
|
+
* List all available usage meters
|
|
1168
|
+
*/
|
|
1169
|
+
static listMeters(params?: {
|
|
1170
|
+
next?: NextRef;
|
|
1171
|
+
prev?: PreviousRef;
|
|
1172
|
+
}): Promise<MeterInterface[]>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Get meter summaries for a specific time period
|
|
1175
|
+
*/
|
|
1176
|
+
static getMeterSummaries(params: {
|
|
1177
|
+
meterId: string;
|
|
1178
|
+
startTime: Date;
|
|
1179
|
+
endTime: Date;
|
|
1180
|
+
}): Promise<MeterSummaryInterface[]>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Report usage for a subscription item
|
|
1183
|
+
*/
|
|
1184
|
+
static reportUsage(params: ReportUsageInput): Promise<StripeUsageInterface>;
|
|
1185
|
+
/**
|
|
1186
|
+
* List usage records for a subscription item
|
|
1187
|
+
*/
|
|
1188
|
+
static listUsageRecords(params: {
|
|
1189
|
+
subscriptionItemId: string;
|
|
1190
|
+
next?: NextRef;
|
|
1191
|
+
prev?: PreviousRef;
|
|
1192
|
+
}): Promise<StripeUsageInterface[]>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Get usage summary for a subscription item
|
|
1195
|
+
*/
|
|
1196
|
+
static getUsageSummary(params: {
|
|
1197
|
+
subscriptionItemId: string;
|
|
1198
|
+
start?: Date;
|
|
1199
|
+
end?: Date;
|
|
1200
|
+
}): Promise<UsageSummaryInterface>;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
declare const StripeUsageModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1204
|
+
|
|
1205
|
+
declare const ContentModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
701
1206
|
|
|
702
1207
|
declare class Content extends AbstractApiData implements ContentInterface, SearchResultInterface {
|
|
703
1208
|
private _contentType?;
|
|
@@ -721,8 +1226,6 @@ declare class Content extends AbstractApiData implements ContentInterface, Searc
|
|
|
721
1226
|
protected addContentInput(response: any, data: ContentInput): void;
|
|
722
1227
|
}
|
|
723
1228
|
|
|
724
|
-
declare const ContentModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
725
|
-
|
|
726
1229
|
declare class Notification extends AbstractApiData implements NotificationInterface {
|
|
727
1230
|
private _notificationType?;
|
|
728
1231
|
private _isRead?;
|
|
@@ -774,4 +1277,4 @@ declare class S3 extends AbstractApiData implements S3Interface {
|
|
|
774
1277
|
createJsonApi(data: S3Input): any;
|
|
775
1278
|
}
|
|
776
1279
|
|
|
777
|
-
export { AbstractApiData, Action, ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, Auth, AuthInput, AuthInterface, AuthModule, AuthorModule, type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, ClientAbstractService, ClientHttpMethod, type ClientNextRef, type ClientPreviousRef, type ClientSelfRef, Company, CompanyFields, CompanyInput, CompanyInterface, CompanyModule, Content, ContentInput, ContentInterface, ContentModule, DataClassRegistry as DataClass, DataClassRegistry, type DiffBlock, type DiffResult, EndpointCreator, type EndpointQuery, type EntityObject, Feature, FeatureInterface, FeatureModule, FieldSelector, type FormatOption, type FoundationModuleDefinitions, JsonApiDataFactory, JsonApiHydratedDataInterface, Module, type ModuleDefinitions, ModuleFactory, ModuleInterface, ModuleModule, ModuleRegistrar, ModuleRegistry, ModuleWithPermissions, Modules, Notification, NotificationFields, NotificationInput, NotificationInterface, NotificationModule, PermissionModule, PermissionUser, Push, type PushInput, type PushInterface, PushModule, RehydrationFactory, Role, RoleInput, RoleInterface, RoleModule, S3, S3Input, S3Interface, S3Module, type SearchResultInterface, TableOptions, User, UserInput, UserInterface, UserModule, type UserObject, type WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, entityObjectSchema, exists, formatDate, getBootstrapper, getClientGlobalErrorHandler, getIcon, getIconByModule, getIconByModuleName, getLucideIcon, getLucideIconByModule, getLucideIconByModuleName, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema };
|
|
1280
|
+
export { AbstractApiData, AbstractService, Action, ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, Auth, AuthInput, AuthInterface, AuthModule, AuthorModule, Billing, BillingModule, BillingService, type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, ClientAbstractService, ClientHttpMethod, type ClientNextRef, type ClientPreviousRef, type ClientSelfRef, Company, CompanyFields, CompanyInput, CompanyInterface, CompanyModule, Content, ContentInput, ContentInterface, ContentModule, DataClassRegistry as DataClass, DataClassRegistry, type DiffBlock, type DiffResult, EndpointCreator, type EndpointQuery, type EntityObject, Feature, FeatureInterface, FeatureModule, FieldSelector, type FormatOption, type FoundationModuleDefinitions, InvoiceStatus, JsonApiDataFactory, JsonApiHydratedDataInterface, MeterInterface, MeterSummaryInterface, Module, type ModuleDefinitions, ModuleFactory, ModuleInterface, ModuleModule, ModuleRegistrar, ModuleRegistry, ModuleWithPermissions, Modules, NextRef, Notification, NotificationFields, NotificationInput, NotificationInterface, NotificationModule, PaymentMethod, PaymentMethodInterface, PermissionModule, PermissionUser, PreviousRef, PriceRecurring, ProrationPreviewInterface, Push, type PushInput, type PushInterface, PushModule, RehydrationFactory, ReportUsageInput, Role, RoleInput, RoleInterface, RoleModule, S3, S3Input, S3Interface, S3Module, type SearchResultInterface, StripeCustomer, StripeCustomerInterface, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceInterface, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceInput, StripePriceInterface, StripePriceModule, StripePriceService, StripeProduct, StripeProductInput, StripeProductInterface, StripeProductModule, StripeProductService, StripeSubscription, StripeSubscriptionCreateResponse, StripeSubscriptionInput, StripeSubscriptionInterface, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageInterface, StripeUsageModule, StripeUsageService, SubscriptionStatus, TableOptions, UsageSummaryInterface, User, UserInput, UserInterface, UserModule, type UserObject, type WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, entityObjectSchema, exists, formatDate, getBootstrapper, getClientGlobalErrorHandler, getIcon, getIconByModule, getIconByModuleName, getLucideIcon, getLucideIconByModule, getLucideIconByModuleName, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema };
|