@lukoweb/apitogo-plugin-dev-portal-billing 0.2.79 → 0.2.81
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/{AccountPlansPage-BDfagKTr.mjs → AccountPlansPage-CMBvMp3X.mjs} +4 -4
- package/dist/{CheckoutPage-4tCFiL7W.mjs → CheckoutPage-Bidc0zIy.mjs} +2 -2
- package/dist/{ContactSalesPage-BqxdJ4wl.mjs → ContactSalesPage-SA087U3b.mjs} +2 -2
- package/dist/{CredentialsPage-DMVMiDdL.mjs → CredentialsPage-CmcWVAbQ.mjs} +3 -3
- package/dist/{PricingCard-CrN4GIZ7.mjs → PricingCard-DigtvdyD.mjs} +11 -3
- package/dist/{PricingPage-DPIF_DOP.mjs → PricingPage-uIkrdvuz.mjs} +4 -4
- package/dist/{SubscriptionsPage-C8hRY5Sr.mjs → SubscriptionsPage-BD9jv7MS.mjs} +6 -6
- package/dist/{UsagePage-Cwqnusaz.mjs → UsagePage-C7D-DNFk.mjs} +4 -4
- package/dist/{account-links-DGL7nKSZ.mjs → account-links-IdQyrJHM.mjs} +1 -1
- package/dist/{billing-state-CIqyRwkD.mjs → billing-state-PPQjKJEY.mjs} +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +15 -15
- package/dist/{useApiKeys-BE2aLp-q.mjs → useApiKeys-BAiXEQfD.mjs} +1 -1
- package/dist/{useDevPortalApiBaseUrl-TaJ7GhG5.mjs → useDevPortalApiBaseUrl-DSq7NkwR.mjs} +6 -3
- package/dist/{useMySubscriptions-DnjIFrcQ.mjs → useMySubscriptions-CPECeshG.mjs} +1 -1
- package/dist/{usePlans-BfvrukjB.mjs → usePlans-DkijFP2K.mjs} +1 -1
- package/dist/{useUsage-DQty3tDN.mjs → useUsage-CSyJWeB-.mjs} +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { b as withPlanFeatures, c as isActiveSubscription, n as useDevPortalPreviewMode, p as parseManifestPlans, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
3
|
-
import { t as PricingCard } from "./PricingCard-
|
|
2
|
+
import { b as withPlanFeatures, c as isActiveSubscription, n as useDevPortalPreviewMode, p as parseManifestPlans, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
|
+
import { t as PricingCard } from "./PricingCard-DigtvdyD.mjs";
|
|
4
4
|
import { n as readProblemDetail } from "./problem-details-n20-dy3w.mjs";
|
|
5
|
-
import { t as useMySubscriptions } from "./useMySubscriptions-
|
|
6
|
-
import { t as usePlans } from "./usePlans-
|
|
5
|
+
import { t as useMySubscriptions } from "./useMySubscriptions-CPECeshG.mjs";
|
|
6
|
+
import { t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
7
7
|
import { n as readPendingCheckout, t as clearPendingCheckout } from "./pending-checkout-DpVaNnTu.mjs";
|
|
8
8
|
import { Head } from "@lukoweb/apitogo/components";
|
|
9
9
|
import { CreditCardIcon } from "@lukoweb/apitogo/icons";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as ALREADY_SUBSCRIBED_PARAM, s as PRICING_PATH, t as ACCOUNT_PLANS_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
2
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
2
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
3
|
import { n as readProblemDetail, t as isAlreadySubscribedMessage } from "./problem-details-n20-dy3w.mjs";
|
|
4
4
|
import { r as rememberPendingCheckout } from "./pending-checkout-DpVaNnTu.mjs";
|
|
5
|
-
import { t as FREE_CHECKOUT_MARKER } from "./billing-state-
|
|
5
|
+
import { t as FREE_CHECKOUT_MARKER } from "./billing-state-PPQjKJEY.mjs";
|
|
6
6
|
import { ShieldIcon } from "@lukoweb/apitogo/icons";
|
|
7
7
|
import { Link, useNavigate, useSearchParams } from "@lukoweb/apitogo/router";
|
|
8
8
|
import { useEffect } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
2
|
import { s as PRICING_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
3
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-
|
|
3
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
4
4
|
import { n as readProblemDetail } from "./problem-details-n20-dy3w.mjs";
|
|
5
|
-
import { t as usePlans } from "./usePlans-
|
|
5
|
+
import { t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
6
6
|
import { Link, useSearchParams } from "@lukoweb/apitogo/router";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
2
|
import { t as ACCOUNT_PLANS_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
3
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
3
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
4
4
|
import { r as createDemoCredentials, t as DEMO_GATEWAY_KEY_HEADER } from "./demo-session-yK9qEqV-.mjs";
|
|
5
|
-
import { n as useApiKeys } from "./useApiKeys-
|
|
6
|
-
import { n as apiReferencePath, r as ApiKeysPanel } from "./account-links-
|
|
5
|
+
import { n as useApiKeys } from "./useApiKeys-BAiXEQfD.mjs";
|
|
6
|
+
import { n as apiReferencePath, r as ApiKeysPanel } from "./account-links-IdQyrJHM.mjs";
|
|
7
7
|
import { i as ChoosePlanNotice, r as keyPlanNote, t as apiKeysPageState } from "./page-state-Cmo0FPLl.mjs";
|
|
8
8
|
import { Head } from "@lukoweb/apitogo/components";
|
|
9
9
|
import { KeyRoundIcon } from "@lukoweb/apitogo/icons";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
2
|
import { i as CONTACT_SALES_PATH, r as CHECKOUT_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
3
|
-
import { a as formatPlanDisplayPrice, c as isActiveSubscription, d as isPlanFree, f as listPlanFeatureLines, i as formatMoney, s as formatPlanPriceUnit, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-
|
|
3
|
+
import { a as formatPlanDisplayPrice, c as isActiveSubscription, d as isPlanFree, f as listPlanFeatureLines, i as formatMoney, s as formatPlanPriceUnit, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
4
4
|
import { Button } from "@lukoweb/apitogo/components";
|
|
5
5
|
import { Link as Link$1 } from "@lukoweb/apitogo/router";
|
|
6
6
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@lukoweb/apitogo/ui/AlertDialog.js";
|
|
@@ -8,14 +8,17 @@ import { cn } from "@lukoweb/apitogo/ui/util.js";
|
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/PricingCard.tsx
|
|
11
|
+
/** The free days a paid plan gives a new subscriber, or 0. */
|
|
12
|
+
const planTrialDays = (plan) => !isPlanCustomPriced(plan) && !isPlanFree(plan) && (plan.trialDays ?? 0) > 0 ? plan.trialDays ?? 0 : 0;
|
|
11
13
|
const publicCtaLabel = (plan) => {
|
|
12
14
|
if (isPlanCustomPriced(plan)) return "Contact sales";
|
|
13
15
|
if (isPlanFree(plan)) return "Get started for free";
|
|
14
|
-
return "Subscribe now";
|
|
16
|
+
return planTrialDays(plan) ? "Start free trial" : "Subscribe now";
|
|
15
17
|
};
|
|
16
18
|
const accountCtaLabel = (plan) => {
|
|
17
19
|
if (isPlanCustomPriced(plan)) return "Contact sales";
|
|
18
|
-
|
|
20
|
+
if (isPlanFree(plan)) return "Get started";
|
|
21
|
+
return planTrialDays(plan) ? "Start free trial" : "Subscribe";
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Custom-priced plans skip checkout and open the contact-sales form. A plan sold at several prices also says which one
|
|
@@ -74,6 +77,11 @@ const PricingCard = ({ plan, mode = "public", subscriptionStatus, isSubscribed =
|
|
|
74
77
|
className: "mt-0.5 text-[0.78125rem] text-muted-foreground",
|
|
75
78
|
children: formatPlanPriceUnit(plan)
|
|
76
79
|
}),
|
|
80
|
+
planTrialDays(plan) ? /* @__PURE__ */ jsxs("p", {
|
|
81
|
+
className: "mt-1.5 text-[0.8125rem] font-semibold text-primary",
|
|
82
|
+
"data-testid": `trial-${plan.sku}`,
|
|
83
|
+
children: [planTrialDays(plan), "-day free trial"]
|
|
84
|
+
}) : null,
|
|
77
85
|
discount ? /* @__PURE__ */ jsxs("p", {
|
|
78
86
|
className: "mt-1.5 text-[0.8125rem] font-semibold text-emerald-600",
|
|
79
87
|
"data-testid": `saving-${plan.sku}`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { b as withPlanFeatures, d as isPlanFree, g as pickFeaturedPlanSku, n as useDevPortalPreviewMode, p as parseManifestPlans, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-
|
|
3
|
-
import { t as PricingCard } from "./PricingCard-
|
|
4
|
-
import { t as usePlans } from "./usePlans-
|
|
2
|
+
import { b as withPlanFeatures, d as isPlanFree, g as pickFeaturedPlanSku, n as useDevPortalPreviewMode, p as parseManifestPlans, u as isPlanCustomPriced } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
|
+
import { t as PricingCard } from "./PricingCard-DigtvdyD.mjs";
|
|
4
|
+
import { t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
5
5
|
import { t as isPreviewPricingEnabled } from "./pricing-config-Bc6eWFUO.mjs";
|
|
6
|
-
import { a as isPricingLoading, n as buildCompareRows } from "./billing-state-
|
|
6
|
+
import { a as isPricingLoading, n as buildCompareRows } from "./billing-state-PPQjKJEY.mjs";
|
|
7
7
|
import { Head, Heading } from "@lukoweb/apitogo/components";
|
|
8
8
|
import { Navigate } from "@lukoweb/apitogo/router";
|
|
9
9
|
import { useState } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
2
|
import { a as CREDENTIALS_PATH, n as ALREADY_SUBSCRIBED_PARAM, t as ACCOUNT_PLANS_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
3
|
-
import { c as isActiveSubscription, m as parseMonthlyQuotaCalls, o as formatPlanPrice, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
4
|
-
import { t as useMySubscriptions } from "./useMySubscriptions-
|
|
5
|
-
import { t as usePlans } from "./usePlans-
|
|
3
|
+
import { c as isActiveSubscription, m as parseMonthlyQuotaCalls, o as formatPlanPrice, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
4
|
+
import { t as useMySubscriptions } from "./useMySubscriptions-CPECeshG.mjs";
|
|
5
|
+
import { t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
6
6
|
import { n as readPendingCheckout, t as clearPendingCheckout } from "./pending-checkout-DpVaNnTu.mjs";
|
|
7
|
-
import { n as useApiKeys } from "./useApiKeys-
|
|
8
|
-
import { t as useUsage } from "./useUsage-
|
|
9
|
-
import { i as hasPaymentProvider, r as checkoutConfirmingText } from "./billing-state-
|
|
7
|
+
import { n as useApiKeys } from "./useApiKeys-BAiXEQfD.mjs";
|
|
8
|
+
import { t as useUsage } from "./useUsage-CSyJWeB-.mjs";
|
|
9
|
+
import { i as hasPaymentProvider, r as checkoutConfirmingText } from "./billing-state-PPQjKJEY.mjs";
|
|
10
10
|
import { i as ChoosePlanNotice, n as billingPageState, r as keyPlanNote } from "./page-state-Cmo0FPLl.mjs";
|
|
11
11
|
import { Head, Spinner } from "@lukoweb/apitogo/components";
|
|
12
12
|
import { Link as Link$1, useSearchParams } from "@lukoweb/apitogo/router";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { c as isActiveSubscription, h as parseQuotaPeriodDays, m as parseMonthlyQuotaCalls } from "./useDevPortalApiBaseUrl-
|
|
3
|
-
import { t as useMySubscriptions } from "./useMySubscriptions-
|
|
4
|
-
import { t as usePlans } from "./usePlans-
|
|
5
|
-
import { n as useUsageRecent, t as useUsage } from "./useUsage-
|
|
2
|
+
import { c as isActiveSubscription, h as parseQuotaPeriodDays, m as parseMonthlyQuotaCalls } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
|
+
import { t as useMySubscriptions } from "./useMySubscriptions-CPECeshG.mjs";
|
|
4
|
+
import { t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
5
|
+
import { n as useUsageRecent, t as useUsage } from "./useUsage-CSyJWeB-.mjs";
|
|
6
6
|
import { Head } from "@lukoweb/apitogo/components";
|
|
7
7
|
import { Link as Link$1 } from "@lukoweb/apitogo/router";
|
|
8
8
|
import { useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useRevokeApiKey, r as useCreateApiKey, t as API_KEY_CAP_REACHED } from "./useApiKeys-
|
|
1
|
+
import { i as useRevokeApiKey, r as useCreateApiKey, t as API_KEY_CAP_REACHED } from "./useApiKeys-BAiXEQfD.mjs";
|
|
2
2
|
import { Spinner } from "@lukoweb/apitogo/components";
|
|
3
3
|
import { KeyRoundIcon, TrashIcon } from "@lukoweb/apitogo/icons";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as quotaCell, v as rateLimitCell } from "./useDevPortalApiBaseUrl-
|
|
1
|
+
import { _ as quotaCell, v as rateLimitCell } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/billing-state.ts
|
|
4
4
|
/** Whether the pricing page has no plans to show yet because the answer is still on its way. */
|
package/dist/index.d.mts
CHANGED
|
@@ -22,7 +22,8 @@ type DevPortalPlan = {
|
|
|
22
22
|
syncedAtUtc?: string;
|
|
23
23
|
includedActionKeys?: string[]; /** Optional marketing bullets for pricing cards (preview / local catalog). */
|
|
24
24
|
features?: string[]; /** Every price of a plan sold at several (periods, currencies); the first is the default. Absent: one price. */
|
|
25
|
-
prices?: DevPortalPlanPrice[];
|
|
25
|
+
prices?: DevPortalPlanPrice[]; /** Free days before a new subscriber's first charge; absent or null for no trial. */
|
|
26
|
+
trialDays?: number | null;
|
|
26
27
|
};
|
|
27
28
|
/** One price of a plan: `monthly`, `quarterly` or `annual`, a lowercase currency, an amount for one period. */
|
|
28
29
|
type DevPortalPlanPrice = {
|
|
@@ -87,6 +88,7 @@ type DevPortalBillingConfig = {
|
|
|
87
88
|
includedActionKeys?: string[];
|
|
88
89
|
features?: string[];
|
|
89
90
|
prices?: DevPortalPlanPrice[];
|
|
91
|
+
trialDays?: number;
|
|
90
92
|
}>;
|
|
91
93
|
};
|
|
92
94
|
type DevPortalApiKey = {
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as AccountPlansPage } from "./AccountPlansPage-
|
|
1
|
+
import { t as AccountPlansPage } from "./AccountPlansPage-CMBvMp3X.mjs";
|
|
2
2
|
import { n as registerDevPortalBillingOptions, r as useDevPortalBillingConfig, t as DevPortalBillingProvider } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
3
3
|
import { a as CREDENTIALS_PATH, c as SUBSCRIPTIONS_PATH, i as CONTACT_SALES_PATH, l as USAGE_PATH, o as LOGIN_NAV_PATH, r as CHECKOUT_PATH, s as PRICING_PATH, t as ACCOUNT_PLANS_PATH } from "./paths-DBr3Dj_q.mjs";
|
|
4
|
-
import { a as formatPlanDisplayPrice, c as isActiveSubscription, f as listPlanFeatureLines, g as pickFeaturedPlanSku, p as parseManifestPlans, s as formatPlanPriceUnit, y as resolveDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
5
|
-
import "./PricingCard-
|
|
4
|
+
import { a as formatPlanDisplayPrice, c as isActiveSubscription, f as listPlanFeatureLines, g as pickFeaturedPlanSku, p as parseManifestPlans, s as formatPlanPriceUnit, y as resolveDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
5
|
+
import "./PricingCard-DigtvdyD.mjs";
|
|
6
6
|
import { t as DEMO_GATEWAY_KEY_HEADER } from "./demo-session-yK9qEqV-.mjs";
|
|
7
|
-
import { t as useMySubscriptions } from "./useMySubscriptions-
|
|
8
|
-
import { n as startPlansPrefetch, t as usePlans } from "./usePlans-
|
|
7
|
+
import { t as useMySubscriptions } from "./useMySubscriptions-CPECeshG.mjs";
|
|
8
|
+
import { n as startPlansPrefetch, t as usePlans } from "./usePlans-DkijFP2K.mjs";
|
|
9
9
|
import "./pending-checkout-DpVaNnTu.mjs";
|
|
10
|
-
import { a as playgroundKeyIdentities, i as useRevokeApiKey, n as useApiKeys, r as useCreateApiKey, t as API_KEY_CAP_REACHED } from "./useApiKeys-
|
|
11
|
-
import { n as useUsageRecent, t as useUsage } from "./useUsage-
|
|
12
|
-
import { r as ApiKeysPanel, t as accountLayoutProps } from "./account-links-
|
|
10
|
+
import { a as playgroundKeyIdentities, i as useRevokeApiKey, n as useApiKeys, r as useCreateApiKey, t as API_KEY_CAP_REACHED } from "./useApiKeys-BAiXEQfD.mjs";
|
|
11
|
+
import { n as useUsageRecent, t as useUsage } from "./useUsage-CSyJWeB-.mjs";
|
|
12
|
+
import { r as ApiKeysPanel, t as accountLayoutProps } from "./account-links-IdQyrJHM.mjs";
|
|
13
13
|
import { t as isPreviewPricingEnabled } from "./pricing-config-Bc6eWFUO.mjs";
|
|
14
14
|
import { Head, Link } from "@lukoweb/apitogo/components";
|
|
15
15
|
import { ArrowRightIcon, KeyRoundIcon, StarsIcon } from "@lukoweb/apitogo/icons";
|
|
@@ -367,13 +367,13 @@ async function getSignedInIdentities(apiBaseUrl, fetchImpl = fetch) {
|
|
|
367
367
|
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region src/DevPortalBillingPlugin.tsx
|
|
370
|
-
const AccountPlansPage$1 = lazy(() => import("./AccountPlansPage-
|
|
371
|
-
const CheckoutPage = lazy(() => import("./CheckoutPage-
|
|
372
|
-
const ContactSalesPage = lazy(() => import("./ContactSalesPage-
|
|
373
|
-
const CredentialsPage = lazy(() => import("./CredentialsPage-
|
|
374
|
-
const PricingPage = lazy(() => import("./PricingPage-
|
|
375
|
-
const SubscriptionsPage = lazy(() => import("./SubscriptionsPage-
|
|
376
|
-
const UsagePage = lazy(() => import("./UsagePage-
|
|
370
|
+
const AccountPlansPage$1 = lazy(() => import("./AccountPlansPage-CMBvMp3X.mjs").then((n) => n.n));
|
|
371
|
+
const CheckoutPage = lazy(() => import("./CheckoutPage-Bidc0zIy.mjs"));
|
|
372
|
+
const ContactSalesPage = lazy(() => import("./ContactSalesPage-SA087U3b.mjs"));
|
|
373
|
+
const CredentialsPage = lazy(() => import("./CredentialsPage-CmcWVAbQ.mjs"));
|
|
374
|
+
const PricingPage = lazy(() => import("./PricingPage-uIkrdvuz.mjs"));
|
|
375
|
+
const SubscriptionsPage = lazy(() => import("./SubscriptionsPage-BD9jv7MS.mjs"));
|
|
376
|
+
const UsagePage = lazy(() => import("./UsagePage-C7D-DNFk.mjs"));
|
|
377
377
|
function resolvePricingEnabled(config) {
|
|
378
378
|
if (config.__meta?.pricingEnabled !== void 0) return config.__meta.pricingEnabled;
|
|
379
379
|
return isPreviewPricingEnabled();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
2
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
3
|
import { n as readProblemDetail } from "./problem-details-n20-dy3w.mjs";
|
|
4
4
|
import { n as createDemoApiKeys, t as DEMO_GATEWAY_KEY_HEADER } from "./demo-session-yK9qEqV-.mjs";
|
|
5
5
|
import { useMutation, useQuery, useQueryClient } from "@lukoweb/apitogo/react-query";
|
|
@@ -30,7 +30,8 @@ function mapPreviewPlans(plans) {
|
|
|
30
30
|
limitsJson: resolveLimitsJson(plan),
|
|
31
31
|
includedActionKeys: plan.includedActionKeys,
|
|
32
32
|
features: plan.features,
|
|
33
|
-
...plan.prices?.length ? { prices: plan.prices } : {}
|
|
33
|
+
...plan.prices?.length ? { prices: plan.prices } : {},
|
|
34
|
+
...plan.trialDays ? { trialDays: plan.trialDays } : {}
|
|
34
35
|
}));
|
|
35
36
|
}
|
|
36
37
|
function readModulePlanItems() {
|
|
@@ -50,7 +51,8 @@ function parseManifestPlans(configPlans) {
|
|
|
50
51
|
limitsJson: plan.limitsJson ?? null,
|
|
51
52
|
includedActionKeys: plan.includedActionKeys ?? [],
|
|
52
53
|
features: plan.features,
|
|
53
|
-
prices: plan.prices
|
|
54
|
+
prices: plan.prices,
|
|
55
|
+
trialDays: plan.trialDays
|
|
54
56
|
}))) };
|
|
55
57
|
if (manifestCatalog?.plans?.length) return { plans: mapPreviewPlans(manifestCatalog.plans) };
|
|
56
58
|
const metaPlans = zudokuConfig?.__meta?.previewPlans;
|
|
@@ -68,7 +70,8 @@ function parseManifestPlans(configPlans) {
|
|
|
68
70
|
limitsJson: plan.limitsJson ?? null,
|
|
69
71
|
includedActionKeys: plan.includedActionKeys ?? [],
|
|
70
72
|
features: plan.features,
|
|
71
|
-
prices: plan.prices
|
|
73
|
+
prices: plan.prices,
|
|
74
|
+
trialDays: plan.trialDays
|
|
72
75
|
}))) };
|
|
73
76
|
return { plans: [] };
|
|
74
77
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
2
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
3
|
import { i as createDemoMeResponse } from "./demo-session-yK9qEqV-.mjs";
|
|
4
4
|
import { useQuery } from "@lukoweb/apitogo/react-query";
|
|
5
5
|
import { useAuth } from "@lukoweb/apitogo/hooks";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as useDevPortalBillingConfig } from "./DevPortalBillingContext-BUQPLoyk.mjs";
|
|
2
|
-
import { b as withPlanFeatures, l as isPlaceholderDevPortalApiUrl, n as useDevPortalPreviewMode, p as parseManifestPlans, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
2
|
+
import { b as withPlanFeatures, l as isPlaceholderDevPortalApiUrl, n as useDevPortalPreviewMode, p as parseManifestPlans, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
3
3
|
import { useQuery } from "@lukoweb/apitogo/react-query";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/plans-prefetch.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-
|
|
1
|
+
import { n as useDevPortalPreviewMode, r as useIsDemoSession, t as useDevPortalApiBaseUrl } from "./useDevPortalApiBaseUrl-DSq7NkwR.mjs";
|
|
2
2
|
import { useQuery } from "@lukoweb/apitogo/react-query";
|
|
3
3
|
import { useAuth } from "@lukoweb/apitogo/hooks";
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukoweb/apitogo-plugin-dev-portal-billing",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.81",
|
|
4
4
|
"homepage": "https://docs.apitogo.com",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"react": "19.2.4",
|
|
43
43
|
"react-dom": "19.2.4",
|
|
44
44
|
"tsdown": "0.20.3",
|
|
45
|
-
"@lukoweb/apitogo": "0.2.
|
|
46
|
-
"@lukoweb/apitogo-module-user-panel": "0.2.
|
|
45
|
+
"@lukoweb/apitogo": "0.2.81",
|
|
46
|
+
"@lukoweb/apitogo-module-user-panel": "0.2.81"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=19.2.0",
|