@dub/utils 0.1.58 → 0.1.60
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/chunk-2HHOGJXB.mjs +1 -0
- package/dist/chunk-2HSMBFOI.mjs +1 -0
- package/dist/chunk-2LYESRL5.mjs +1 -0
- package/dist/chunk-2NDJXVWC.mjs +1 -0
- package/dist/chunk-2TKIIJPI.mjs +1 -0
- package/dist/chunk-5Q2YLI4L.mjs +1 -0
- package/dist/chunk-AEAWJEY2.mjs +1 -0
- package/dist/chunk-AFKOLBI4.mjs +1 -0
- package/dist/chunk-BDY5ASEG.mjs +1 -0
- package/dist/chunk-CDOTQCZ3.mjs +1 -0
- package/dist/chunk-ERG6PU5T.mjs +1 -0
- package/dist/chunk-FLMBFIHC.mjs +1 -0
- package/dist/chunk-FR5AC454.mjs +1 -0
- package/dist/chunk-FWOJF67D.mjs +1 -0
- package/dist/chunk-GAI3IZAO.mjs +1 -0
- package/dist/chunk-GJBKYDBA.mjs +1 -0
- package/dist/chunk-GJBLP6QH.mjs +1 -0
- package/dist/chunk-GLWDY4K2.mjs +1 -0
- package/dist/chunk-HOE6NFIO.mjs +1 -0
- package/dist/chunk-HX4PQR3T.mjs +1 -0
- package/dist/chunk-IKGQBITP.mjs +1 -0
- package/dist/chunk-JAXOOP3R.mjs +1 -0
- package/dist/chunk-JM7ZLOXL.mjs +1 -0
- package/dist/chunk-JZ57WCP2.mjs +1 -0
- package/dist/chunk-K4BETBJS.mjs +1 -0
- package/dist/chunk-K56GMX2B.mjs +1 -0
- package/dist/chunk-L6HYJOVY.mjs +1 -0
- package/dist/chunk-LXD2UNTM.mjs +1 -0
- package/dist/chunk-M3U7XL4Q.mjs +1 -0
- package/dist/chunk-MEYA6BVQ.mjs +1 -0
- package/dist/chunk-N3WPSRTJ.mjs +1 -0
- package/dist/chunk-NWIOT6U3.mjs +1 -0
- package/dist/chunk-O6ZXUQQO.mjs +1 -0
- package/dist/chunk-PIU5P3DS.mjs +1 -0
- package/dist/chunk-PLCDS6T5.mjs +1 -0
- package/dist/chunk-QF3JEAOD.mjs +1 -0
- package/dist/chunk-R36YD7DK.mjs +1 -0
- package/dist/chunk-RDYQTUD3.mjs +1 -0
- package/dist/chunk-SF6KHSBJ.mjs +1 -0
- package/dist/chunk-SFR2JCZT.mjs +1 -0
- package/dist/chunk-TD44BLTR.mjs +1 -0
- package/dist/chunk-TQ3PVUME.mjs +1 -0
- package/dist/chunk-TU5X2NQ5.mjs +1 -0
- package/dist/chunk-UK2BTN3Y.mjs +1 -0
- package/dist/chunk-UMM6G7UG.mjs +1 -0
- package/dist/chunk-UWEMC4DE.mjs +1 -0
- package/dist/chunk-VL5ICGCG.mjs +1 -0
- package/dist/chunk-VRSIRPMN.mjs +1 -0
- package/dist/chunk-XIW74P6A.mjs +1 -0
- package/dist/chunk-YHPTFMRM.mjs +1 -0
- package/dist/chunk-Z6XYAAX6.mjs +1 -0
- package/dist/chunk-ZG6ZLUL2.mjs +1 -0
- package/dist/constants/dub-domains.mjs +1 -1
- package/dist/constants/index.d.ts +5 -4
- package/dist/constants/index.mjs +1 -1
- package/dist/constants/integrations.d.ts +2 -1
- package/dist/constants/integrations.mjs +1 -1
- package/dist/constants/main.d.ts +2 -3
- package/dist/constants/main.mjs +1 -1
- package/dist/constants/pricing/pricing-plan-main-features.d.ts +4 -16
- package/dist/constants/pricing/pricing-plan-main-features.mjs +1 -1
- package/dist/constants/pricing/pricing-plan-taglines.mjs +1 -1
- package/dist/constants/pricing/trial-limits.d.ts +1 -1
- package/dist/constants/pricing/trial-limits.mjs +1 -1
- package/dist/constants/tremendous-supported-countries.d.ts +3 -0
- package/dist/constants/tremendous-supported-countries.mjs +1 -0
- package/dist/functions/datetime/format-period.mjs +1 -1
- package/dist/functions/datetime/index.mjs +1 -1
- package/dist/functions/domains.mjs +1 -1
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/functions/link-constructor.mjs +1 -1
- package/dist/functions/urls.d.ts +2 -1
- package/dist/functions/urls.mjs +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.mjs +1 -1
- package/dist/pricing-plan-compare-features-3aa73852.d.ts +26 -0
- package/dist/pricing-plan-compare-features-5bdd16ce.d.ts +24 -0
- package/dist/pricing-plan-compare-features-86e663b9.d.ts +26 -0
- package/dist/pricing-plan-compare-features-a90f3a77.d.ts +24 -0
- package/dist/trial-limits-6b9eccfb.d.ts +122 -0
- package/dist/trial-limits-b8063771.d.ts +119 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as
|
|
1
|
+
import{A as lc,a as sa,b as La,c as ib,d as jb,e as kb,f as lb,g as mb,h as nb,i as ob,j as Ab,k as Bb,l as Yb,m as Zb,n as _b,o as $b,p as ac,q as bc,r as cc,s as dc,t as ec,u as fc,v as gc,w as hc,x as ic,y as jc,z as kc}from"./chunk-2HHOGJXB.mjs";import{a as Ka}from"./chunk-2XEQCQCO.mjs";import{a as Ja}from"./chunk-53SZZ2QK.mjs";import{a as Ma}from"./chunk-UWXN5NEH.mjs";import{a as Na}from"./chunk-WOURDH2J.mjs";import{a as Oa}from"./chunk-HR4YFT2T.mjs";import{a as Pa}from"./chunk-AQPTJK67.mjs";import{a as Ra,b as Sa,c as Ta,d as Ua,e as Va,f as Wa,g as Xa,h as Ya,i as Za,j as _a,k as $a,l as ab,m as bb,n as cb,o as db,p as eb,q as fb,r as gb,s as hb}from"./chunk-JM7ZLOXL.mjs";import{a as mc}from"./chunk-FLMBFIHC.mjs";import{a as nc,b as oc,c as pc,d as qc,e as rc,f as sc}from"./chunk-UMM6G7UG.mjs";import{a as Ea,b as Fa,c as Ga}from"./chunk-KIDNKMJ2.mjs";import{a as Ia}from"./chunk-STMJW3HF.mjs";import{a as Ha}from"./chunk-CP4WO7MM.mjs";import{a as Qb}from"./chunk-3Q25XO3O.mjs";import{a as Rb}from"./chunk-Y37NQHZ4.mjs";import{a as Tb}from"./chunk-PPEZOXLP.mjs";import{a as Sb}from"./chunk-FKLXONKR.mjs";import{a as Ub}from"./chunk-NQP6WK7A.mjs";import{a as Vb}from"./chunk-BWEJXFI3.mjs";import{a as Wb}from"./chunk-PZ5KH242.mjs";import{a as Xb}from"./chunk-E3EM6ARH.mjs";import{a as Eb}from"./chunk-GRNEXX4Q.mjs";import{a as Fb,b as Gb}from"./chunk-T3OLVKAN.mjs";import{a as Hb}from"./chunk-N5E6WGFW.mjs";import{a as Ib}from"./chunk-EHUYHMHD.mjs";import{a as Jb}from"./chunk-NFQB22EC.mjs";import{a as Kb,b as Lb,c as Mb}from"./chunk-LPWMMOGV.mjs";import{a as Nb,b as Ob}from"./chunk-IHX4EDUF.mjs";import{a as Pb}from"./chunk-RONJDARA.mjs";import{a as vb}from"./chunk-JKFE3UP3.mjs";import{a as wb}from"./chunk-NZ4UYKAT.mjs";import{a as xb,b as yb,c as zb}from"./chunk-WKSJXYEU.mjs";import{a as Cb}from"./chunk-U5RTZQ5G.mjs";import{a as Db}from"./chunk-OWYWG4M6.mjs";import{a as ra}from"./chunk-E4JQPS37.mjs";import{a as Qa}from"./chunk-ZECUYKGD.mjs";import{a as pb}from"./chunk-UCO6SXQA.mjs";import{a as qb}from"./chunk-EMO4MGOU.mjs";import{a as rb}from"./chunk-VQH3G3BC.mjs";import{a as sb}from"./chunk-ZTPDEOIY.mjs";import{a as tb}from"./chunk-XN7WAYOX.mjs";import{a as ub}from"./chunk-F4P6WJV7.mjs";import{a as va}from"./chunk-ORB6LTBV.mjs";import{a as wa}from"./chunk-PMOQSSOL.mjs";import{a as xa}from"./chunk-2OJAP233.mjs";import{a as ya}from"./chunk-NEIHTFSW.mjs";import{a as za}from"./chunk-HJD7AJT4.mjs";import{a as Aa}from"./chunk-VZT64RAP.mjs";import{a as Da}from"./chunk-PWSEDNRH.mjs";import{a as Ca}from"./chunk-QYIU7UMU.mjs";import{a as Ba}from"./chunk-FJFDTHKA.mjs";import{a as ka}from"./chunk-3E3XRX7Q.mjs";import{a as la,b as ma}from"./chunk-KQ4NF54J.mjs";import{a as na}from"./chunk-WCKL6LWT.mjs";import{a as oa}from"./chunk-6MXH6P2P.mjs";import{a as pa}from"./chunk-RIZFWYUS.mjs";import{a as qa}from"./chunk-2HSMBFOI.mjs";import{a as ta}from"./chunk-52NREKQ5.mjs";import{a as ua}from"./chunk-KAJVFOSX.mjs";import{a as N,b as O,c as P}from"./chunk-GLWDY4K2.mjs";import{a as Q,b as R,c as S,d as T,e as U,f as V,g as W,h as X}from"./chunk-UWEMC4DE.mjs";import{a as Y}from"./chunk-PYD75RYX.mjs";import{a as Z,b as _}from"./chunk-2OGPCKQX.mjs";import{A as M,a as m,b as n,c as o,d as p,e as q,f as r,g as s,h as t,i as u,j as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"./chunk-TU5X2NQ5.mjs";import{a as $,b as aa,c as ba}from"./chunk-DEIZ6NOQ.mjs";import{a as ca,b as da,c as ea,d as fa,e as ga,f as ha,g as ia,h as ja}from"./chunk-FY4O7ZL5.mjs";import{a}from"./chunk-YUMUNL66.mjs";import{a as b}from"./chunk-JO76EBDG.mjs";import{a as c,b as d,c as e}from"./chunk-RRVBMEYA.mjs";import{a as f,b as g,c as h}from"./chunk-6YGW3G46.mjs";import{a as i}from"./chunk-6OQAYXTQ.mjs";import{a as j}from"./chunk-CELI6EJU.mjs";import{a as k,b as l}from"./chunk-SYT2IXG6.mjs";export{D as ACME_PROGRAM_ID,C as ACME_WORKSPACE_ID,s as ADMIN_HOSTNAMES,bc as ADVANCED_PLAN,Y as ALL_TOOLS,r as API_DOMAIN,q as API_HOSTNAMES,W as APPSFLYER_INTEGRATION_ID,o as APP_DOMAIN,p as APP_DOMAIN_WITH_NGROK,n as APP_HOSTNAMES,ac as BUSINESS_PLAN,b as CONNECT_SUPPORTED_COUNTRIES,c as CONTINENTS,d as CONTINENT_CODES,f as COUNTRIES,e as COUNTRIES_TO_CONTINENTS,g as COUNTRY_CODES,i as COUNTRY_CURRENCY_CODES,j as COUNTRY_PHONE_CODES,ca as DEFAULT_LINK_PROPS,fa as DEFAULT_PAGINATION_LIMIT,$ as DEFAULT_REDIRECTS,P as DUB_DEMO_LINKS,N as DUB_DOMAINS,O as DUB_DOMAINS_ARRAY,ha as DUB_FOUNDING_DATE,aa as DUB_HEADERS,w as DUB_LOGO,x as DUB_LOGO_SQUARE,y as DUB_QR_LOGO,A as DUB_THUMBNAIL,qc as DUB_TRIAL_PERIOD_DAYS,z as DUB_WORDMARK,B as DUB_WORKSPACE_ID,ja as DUPLICATE_IDENTITY_DECLINE_REASON,cc as ENTERPRISE_PLAN,h as EU_COUNTRY_CODES,_b as FREE_PLAN,ec as FREE_WORKSPACES_LIMIT,da as GOOGLE_FAVICON_URL,V as HUBSPOT_INTEGRATION_ID,ia as INFINITY_NUMBER,X as INTERCOM_INTEGRATION_ID,F as LEGAL_USER_ID,E as LEGAL_WORKSPACE_ID,Z as LOCALHOST_GEO_DATA,_ as LOCALHOST_IP,K as NETWORK_PROGRAM_DEFAULT_GROUP_ID,L as NETWORK_PROGRAM_DEFAULT_SALE_REWARD_ID,I as NETWORK_PROGRAM_ID,J as NETWORK_PROGRAM_SLUG,M as NETWORK_USER_ID,H as NETWORK_WORKSPACE_ID,Yb as NEW_BUSINESS_PRICE_IDS,ea as OG_AVATAR_URL,u as PARTNERS_DOMAIN,v as PARTNERS_DOMAIN_WITH_NGROK,t as PARTNERS_HOSTNAMES,ka as PAYPAL_SUPPORTED_COUNTRIES,Zb as PLANS,sa as PRICING_PLAN_COMPARE_FEATURES,lc as PRICING_PLAN_MAIN_FEATURES,mc as PRICING_PLAN_TAGLINES,$b as PRO_PLAN,G as R2_URL,ba as REDIRECTION_QUERY_PARAM,la as REGIONS,ma as REGION_CODES,na as RESERVED_SLUGS,oa as SAML_PROVIDERS,k as SECOND_LEVEL_DOMAINS,S as SEGMENT_INTEGRATION_ID,dc as SELF_SERVE_PAID_PLANS,U as SHOPIFY_INTEGRATION_ID,m as SHORT_DOMAIN,Q as SLACK_INTEGRATION_ID,l as SPECIAL_APEX_DOMAINS,pa as STABLECOIN_SUPPORTED_COUNTRIES,R as STRIPE_INTEGRATION_ID,qa as TREMENDOUS_SUPPORTED_COUNTRIES,nc as TRIAL_LIMITS,ga as TWO_WEEKS_IN_SECONDS,Za as UTMTags,T as ZAPIER_INTEGRATION_ID,ta as arrayEqual,Gb as buildFilterValue,gb as buildUrl,wa as capitalize,a as ccTLDs,xa as chunk,ya as cn,za as combineWords,Aa as constructMetadata,_a as constructURLFromUTMParams,db as createHref,Da as currencyFormatter,Qa as deepEqual,pb as fetchWithRetry,qb as fetchWithTimeout,rb as fetcher,Ha as formatDate,Ia as formatDateSmart,Ja as formatDateTime,Ka as formatDateTimeSmart,sb as formatFileSize,La as formatPeriod,ib as generateDomainFromName,Fa as getAdjustedBillingCycleStart,mb as getApexDomain,ua as getAvatarTheme,Ga as getBillingStartDate,Ma as getDateTimeLocal,Na as getDaysDifference,nb as getDomainWithoutWWW,hb as getFileExtension,Oa as getFirstAndLastDay,Ea as getLastDayOfMonth,hc as getNextPlan,Ya as getParamsFromURL,eb as getPathnameFromUrl,fc as getPlanAndTierFromPriceId,gc as getPlanDetails,cb as getPrettyUrl,Wa as getSearchParams,Xa as getSearchParamsWithArray,lb as getSubdomain,jc as getSuggestedPlan,oc as getTrialLimitFeaturePhrase,pc as getTrialLimitResourceForOverageBanner,ab as getUTMParamsFromURL,Ta as getUrlFromString,Va as getUrlFromStringIfValid,Ua as getUrlObjFromString,bb as getUrlWithoutUTMParams,sc as getWorkspaceLimitsForStripeSubscriptionStatus,tb as groupBy,ub as hashStringSHA256,vb as isClickOnInteractiveChild,ic as isDowngradePlan,ob as isDubDomain,Kb as isFulfilled,wb as isIframeable,kc as isLegacyBusinessPlan,Lb as isRejected,zb as isReservedKeyGlobal,Sa as isSafeLinkHref,yb as isUnsupportedKey,Ra as isValidUrl,rc as isWorkspaceBillingTrialActive,Ba as isZeroDecimalCurrency,Ab as linkConstructor,Bb as linkConstructorSimple,Cb as log,Mb as logPromiseResults,ra as nFormatter,Db as nanoid,Eb as normalizeString,fb as normalizeUrl,$a as paramsMetadata,Pa as parseDateTime,Fb as parseFilterValue,Hb as pick,Ib as pluralize,Jb as prettyPrint,Ob as punyEncode,Nb as punycode,Pb as randomValue,Qb as regexEscape,Rb as resizeImage,Tb as smartTruncate,Ub as stableSort,Vb as textFetcher,Wb as timeAgo,va as toCamelCase,Ca as toCentsNumber,Xb as trim,Sb as truncate,jb as validDomainRegex,xb as validKeyRegex,kb as validSlugRegex};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { b as PLANS } from './trial-limits-174d7bdb.js';
|
|
3
|
+
|
|
4
|
+
declare const TREMENDOUS_SUPPORTED_COUNTRIES: string[];
|
|
5
|
+
|
|
6
|
+
declare const PRICING_PLAN_COMPARE_FEATURES: {
|
|
7
|
+
category: string;
|
|
8
|
+
href: string;
|
|
9
|
+
features: {
|
|
10
|
+
text: string | ((d: {
|
|
11
|
+
id: string;
|
|
12
|
+
plan: (typeof PLANS)[number];
|
|
13
|
+
}) => ReactNode);
|
|
14
|
+
href?: string;
|
|
15
|
+
check?: boolean | {
|
|
16
|
+
default?: boolean;
|
|
17
|
+
free?: boolean;
|
|
18
|
+
pro?: boolean;
|
|
19
|
+
business?: boolean;
|
|
20
|
+
advanced?: boolean;
|
|
21
|
+
enterprise?: boolean;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
}[];
|
|
25
|
+
|
|
26
|
+
export { PRICING_PLAN_COMPARE_FEATURES as P, TREMENDOUS_SUPPORTED_COUNTRIES as T };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { b as PLANS } from './trial-limits-6b9eccfb.js';
|
|
3
|
+
|
|
4
|
+
declare const PRICING_PLAN_COMPARE_FEATURES: {
|
|
5
|
+
category: string;
|
|
6
|
+
href: string;
|
|
7
|
+
features: {
|
|
8
|
+
text: string | ((d: {
|
|
9
|
+
id: string;
|
|
10
|
+
plan: (typeof PLANS)[number];
|
|
11
|
+
}) => ReactNode);
|
|
12
|
+
href?: string;
|
|
13
|
+
check?: boolean | {
|
|
14
|
+
default?: boolean;
|
|
15
|
+
free?: boolean;
|
|
16
|
+
pro?: boolean;
|
|
17
|
+
business?: boolean;
|
|
18
|
+
advanced?: boolean;
|
|
19
|
+
enterprise?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
23
|
+
|
|
24
|
+
export { PRICING_PLAN_COMPARE_FEATURES as P };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { b as PLANS } from './trial-limits-b8063771.js';
|
|
3
|
+
|
|
4
|
+
declare const TREMENDOUS_SUPPORTED_COUNTRIES: string[];
|
|
5
|
+
|
|
6
|
+
declare const PRICING_PLAN_COMPARE_FEATURES: {
|
|
7
|
+
category: string;
|
|
8
|
+
href: string;
|
|
9
|
+
features: {
|
|
10
|
+
text: string | ((d: {
|
|
11
|
+
id: string;
|
|
12
|
+
plan: (typeof PLANS)[number];
|
|
13
|
+
}) => ReactNode);
|
|
14
|
+
href?: string;
|
|
15
|
+
check?: boolean | {
|
|
16
|
+
default?: boolean;
|
|
17
|
+
free?: boolean;
|
|
18
|
+
pro?: boolean;
|
|
19
|
+
business?: boolean;
|
|
20
|
+
advanced?: boolean;
|
|
21
|
+
enterprise?: boolean;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
}[];
|
|
25
|
+
|
|
26
|
+
export { PRICING_PLAN_COMPARE_FEATURES as P, TREMENDOUS_SUPPORTED_COUNTRIES as T };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { b as PLANS } from './trial-limits-b8063771.js';
|
|
3
|
+
|
|
4
|
+
declare const PRICING_PLAN_COMPARE_FEATURES: {
|
|
5
|
+
category: string;
|
|
6
|
+
href: string;
|
|
7
|
+
features: {
|
|
8
|
+
text: string | ((d: {
|
|
9
|
+
id: string;
|
|
10
|
+
plan: (typeof PLANS)[number];
|
|
11
|
+
}) => ReactNode);
|
|
12
|
+
href?: string;
|
|
13
|
+
check?: boolean | {
|
|
14
|
+
default?: boolean;
|
|
15
|
+
free?: boolean;
|
|
16
|
+
pro?: boolean;
|
|
17
|
+
business?: boolean;
|
|
18
|
+
advanced?: boolean;
|
|
19
|
+
enterprise?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
23
|
+
|
|
24
|
+
export { PRICING_PLAN_COMPARE_FEATURES as P };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
type PlanFeature = {
|
|
2
|
+
id?: string;
|
|
3
|
+
text: string;
|
|
4
|
+
tooltip?: {
|
|
5
|
+
title: string;
|
|
6
|
+
cta?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type PlanDetails = {
|
|
11
|
+
name: string;
|
|
12
|
+
price: {
|
|
13
|
+
monthly: number | null;
|
|
14
|
+
yearly: number | null;
|
|
15
|
+
ids?: string[];
|
|
16
|
+
};
|
|
17
|
+
limits: {
|
|
18
|
+
links: number;
|
|
19
|
+
clicks: number;
|
|
20
|
+
payouts: number;
|
|
21
|
+
domains: number;
|
|
22
|
+
tags: number;
|
|
23
|
+
partnerTags: number;
|
|
24
|
+
folders: number;
|
|
25
|
+
groups: number;
|
|
26
|
+
networkInvites: number;
|
|
27
|
+
partners: number;
|
|
28
|
+
users: number;
|
|
29
|
+
ai: number;
|
|
30
|
+
api: number;
|
|
31
|
+
analyticsApi: number;
|
|
32
|
+
retention: string;
|
|
33
|
+
};
|
|
34
|
+
tiers?: {
|
|
35
|
+
[key: number]: {
|
|
36
|
+
price: {
|
|
37
|
+
monthly: number | null;
|
|
38
|
+
yearly: number | null;
|
|
39
|
+
ids: string[];
|
|
40
|
+
};
|
|
41
|
+
limits: {
|
|
42
|
+
links: number;
|
|
43
|
+
clicks: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
featureTitle?: string;
|
|
48
|
+
features?: PlanFeature[];
|
|
49
|
+
};
|
|
50
|
+
declare const NEW_BUSINESS_PRICE_IDS: string[];
|
|
51
|
+
declare const PLANS: PlanDetails[];
|
|
52
|
+
declare const FREE_PLAN: PlanDetails;
|
|
53
|
+
declare const PRO_PLAN: PlanDetails;
|
|
54
|
+
declare const BUSINESS_PLAN: PlanDetails;
|
|
55
|
+
declare const ADVANCED_PLAN: PlanDetails;
|
|
56
|
+
declare const ENTERPRISE_PLAN: PlanDetails;
|
|
57
|
+
declare const SELF_SERVE_PAID_PLANS: PlanDetails[];
|
|
58
|
+
declare const FREE_WORKSPACES_LIMIT = 2;
|
|
59
|
+
declare const getPlanAndTierFromPriceId: ({ priceId, }: {
|
|
60
|
+
priceId: string;
|
|
61
|
+
}) => {
|
|
62
|
+
plan: PlanDetails | null;
|
|
63
|
+
planTier: number;
|
|
64
|
+
};
|
|
65
|
+
declare const getPlanDetails: ({ plan, planTier, }: {
|
|
66
|
+
plan: string;
|
|
67
|
+
planTier?: number | undefined;
|
|
68
|
+
}) => PlanDetails;
|
|
69
|
+
declare const getNextPlan: (plan?: string | null) => PlanDetails;
|
|
70
|
+
declare const isDowngradePlan: ({ currentPlan, newPlan, currentTier, newTier, }: {
|
|
71
|
+
currentPlan: string;
|
|
72
|
+
newPlan: string;
|
|
73
|
+
currentTier?: number | undefined;
|
|
74
|
+
newTier?: number | undefined;
|
|
75
|
+
}) => boolean;
|
|
76
|
+
declare const getSuggestedPlan: ({ events, links, }: {
|
|
77
|
+
events?: number | undefined;
|
|
78
|
+
links?: number | undefined;
|
|
79
|
+
}) => {
|
|
80
|
+
plan: PlanDetails;
|
|
81
|
+
planTier: number;
|
|
82
|
+
};
|
|
83
|
+
declare const isLegacyBusinessPlan: ({ plan, partnersLimit, }: {
|
|
84
|
+
plan?: string | undefined;
|
|
85
|
+
partnersLimit?: number | undefined;
|
|
86
|
+
}) => boolean;
|
|
87
|
+
|
|
88
|
+
declare const TRIAL_LIMITS: {
|
|
89
|
+
readonly links: 100;
|
|
90
|
+
readonly clicks: 5000;
|
|
91
|
+
readonly payouts: 50000;
|
|
92
|
+
readonly domains: 5;
|
|
93
|
+
readonly tags: 5;
|
|
94
|
+
readonly partnerTags: 5;
|
|
95
|
+
readonly folders: 5;
|
|
96
|
+
readonly groups: 5;
|
|
97
|
+
readonly networkInvites: 0;
|
|
98
|
+
readonly partners: 50;
|
|
99
|
+
readonly users: 5;
|
|
100
|
+
readonly ai: 100;
|
|
101
|
+
readonly api: 120;
|
|
102
|
+
readonly analyticsApi: 2;
|
|
103
|
+
};
|
|
104
|
+
type TrialLimitResource = keyof typeof TRIAL_LIMITS | "partnerEnrollments" | "freeDotLinkDomain";
|
|
105
|
+
declare function getTrialLimitFeaturePhrase(kind: TrialLimitResource): string;
|
|
106
|
+
declare function getTrialLimitResourceForOverageBanner({ exceededEvents, exceededLinks, exceededPayouts, }: {
|
|
107
|
+
exceededEvents: boolean;
|
|
108
|
+
exceededLinks: boolean;
|
|
109
|
+
exceededPayouts: boolean;
|
|
110
|
+
}): TrialLimitResource | null;
|
|
111
|
+
declare const DUB_TRIAL_PERIOD_DAYS = 14;
|
|
112
|
+
declare function isWorkspaceBillingTrialActive(trialEndsAt: Date | string | null | undefined): boolean;
|
|
113
|
+
type WorkspaceLimitFields = PlanDetails["limits"];
|
|
114
|
+
declare function subscriptionStatusUsesTrialLimits(status: string): boolean;
|
|
115
|
+
declare function getWorkspaceLimitsForStripeSubscriptionStatus({ planLimits, subscriptionStatus, hasPaidLatestInvoice, }: {
|
|
116
|
+
planLimits: WorkspaceLimitFields;
|
|
117
|
+
subscriptionStatus: string;
|
|
118
|
+
/** When false on an active subscription, trial limits apply until the latest invoice is paid. */
|
|
119
|
+
hasPaidLatestInvoice?: boolean;
|
|
120
|
+
}): WorkspaceLimitFields;
|
|
121
|
+
|
|
122
|
+
export { ADVANCED_PLAN as A, BUSINESS_PLAN as B, DUB_TRIAL_PERIOD_DAYS as D, ENTERPRISE_PLAN as E, FREE_PLAN as F, NEW_BUSINESS_PRICE_IDS as N, PlanFeature as P, SELF_SERVE_PAID_PLANS as S, TRIAL_LIMITS as T, PlanDetails as a, PLANS as b, PRO_PLAN as c, FREE_WORKSPACES_LIMIT as d, getPlanDetails as e, getNextPlan as f, getPlanAndTierFromPriceId as g, getSuggestedPlan as h, isDowngradePlan as i, isLegacyBusinessPlan as j, TrialLimitResource as k, getTrialLimitFeaturePhrase as l, getTrialLimitResourceForOverageBanner as m, isWorkspaceBillingTrialActive as n, getWorkspaceLimitsForStripeSubscriptionStatus as o, subscriptionStatusUsesTrialLimits as s };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
type PlanFeature = {
|
|
2
|
+
id?: string;
|
|
3
|
+
text: string;
|
|
4
|
+
tooltip?: {
|
|
5
|
+
title: string;
|
|
6
|
+
cta?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type PlanDetails = {
|
|
11
|
+
name: string;
|
|
12
|
+
price: {
|
|
13
|
+
monthly: number | null;
|
|
14
|
+
yearly: number | null;
|
|
15
|
+
ids?: string[];
|
|
16
|
+
};
|
|
17
|
+
limits: {
|
|
18
|
+
links: number;
|
|
19
|
+
clicks: number;
|
|
20
|
+
payouts: number;
|
|
21
|
+
domains: number;
|
|
22
|
+
tags: number;
|
|
23
|
+
partnerTags: number;
|
|
24
|
+
folders: number;
|
|
25
|
+
groups: number;
|
|
26
|
+
networkInvites: number;
|
|
27
|
+
partners: number;
|
|
28
|
+
users: number;
|
|
29
|
+
ai: number;
|
|
30
|
+
api: number;
|
|
31
|
+
analyticsApi: number;
|
|
32
|
+
retention: string;
|
|
33
|
+
};
|
|
34
|
+
tiers?: {
|
|
35
|
+
[key: number]: {
|
|
36
|
+
price: {
|
|
37
|
+
monthly: number | null;
|
|
38
|
+
yearly: number | null;
|
|
39
|
+
ids: string[];
|
|
40
|
+
};
|
|
41
|
+
limits: {
|
|
42
|
+
links: number;
|
|
43
|
+
clicks: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
featureTitle?: string;
|
|
48
|
+
features?: PlanFeature[];
|
|
49
|
+
};
|
|
50
|
+
declare const NEW_BUSINESS_PRICE_IDS: string[];
|
|
51
|
+
declare const PLANS: PlanDetails[];
|
|
52
|
+
declare const FREE_PLAN: PlanDetails;
|
|
53
|
+
declare const PRO_PLAN: PlanDetails;
|
|
54
|
+
declare const BUSINESS_PLAN: PlanDetails;
|
|
55
|
+
declare const ADVANCED_PLAN: PlanDetails;
|
|
56
|
+
declare const ENTERPRISE_PLAN: PlanDetails;
|
|
57
|
+
declare const SELF_SERVE_PAID_PLANS: PlanDetails[];
|
|
58
|
+
declare const FREE_WORKSPACES_LIMIT = 2;
|
|
59
|
+
declare const getPlanAndTierFromPriceId: ({ priceId, }: {
|
|
60
|
+
priceId: string;
|
|
61
|
+
}) => {
|
|
62
|
+
plan: PlanDetails | null;
|
|
63
|
+
planTier: number;
|
|
64
|
+
};
|
|
65
|
+
declare const getPlanDetails: ({ plan, planTier, }: {
|
|
66
|
+
plan: string;
|
|
67
|
+
planTier?: number | undefined;
|
|
68
|
+
}) => PlanDetails;
|
|
69
|
+
declare const getNextPlan: (plan?: string | null) => PlanDetails;
|
|
70
|
+
declare const isDowngradePlan: ({ currentPlan, newPlan, currentTier, newTier, }: {
|
|
71
|
+
currentPlan: string;
|
|
72
|
+
newPlan: string;
|
|
73
|
+
currentTier?: number | undefined;
|
|
74
|
+
newTier?: number | undefined;
|
|
75
|
+
}) => boolean;
|
|
76
|
+
declare const getSuggestedPlan: ({ events, links, }: {
|
|
77
|
+
events?: number | undefined;
|
|
78
|
+
links?: number | undefined;
|
|
79
|
+
}) => {
|
|
80
|
+
plan: PlanDetails;
|
|
81
|
+
planTier: number;
|
|
82
|
+
};
|
|
83
|
+
declare const isLegacyBusinessPlan: ({ plan, partnersLimit, }: {
|
|
84
|
+
plan?: string | undefined;
|
|
85
|
+
partnersLimit?: number | undefined;
|
|
86
|
+
}) => boolean;
|
|
87
|
+
|
|
88
|
+
declare const TRIAL_LIMITS: {
|
|
89
|
+
readonly links: 100;
|
|
90
|
+
readonly clicks: 5000;
|
|
91
|
+
readonly payouts: 50000;
|
|
92
|
+
readonly domains: 5;
|
|
93
|
+
readonly tags: 5;
|
|
94
|
+
readonly partnerTags: 5;
|
|
95
|
+
readonly folders: 5;
|
|
96
|
+
readonly groups: 5;
|
|
97
|
+
readonly networkInvites: 0;
|
|
98
|
+
readonly partners: 50;
|
|
99
|
+
readonly users: 3;
|
|
100
|
+
readonly ai: 100;
|
|
101
|
+
readonly api: 120;
|
|
102
|
+
readonly analyticsApi: 2;
|
|
103
|
+
};
|
|
104
|
+
type TrialLimitResource = keyof typeof TRIAL_LIMITS | "partnerEnrollments" | "freeDotLinkDomain";
|
|
105
|
+
declare function getTrialLimitFeaturePhrase(kind: TrialLimitResource): string;
|
|
106
|
+
declare function getTrialLimitResourceForOverageBanner({ exceededEvents, exceededLinks, exceededPayouts, }: {
|
|
107
|
+
exceededEvents: boolean;
|
|
108
|
+
exceededLinks: boolean;
|
|
109
|
+
exceededPayouts: boolean;
|
|
110
|
+
}): TrialLimitResource | null;
|
|
111
|
+
declare const DUB_TRIAL_PERIOD_DAYS = 14;
|
|
112
|
+
declare function isWorkspaceBillingTrialActive(trialEndsAt: Date | string | null | undefined): boolean;
|
|
113
|
+
type WorkspaceLimitFields = PlanDetails["limits"];
|
|
114
|
+
declare function getWorkspaceLimitsForStripeSubscriptionStatus({ planLimits, subscriptionStatus, }: {
|
|
115
|
+
planLimits: WorkspaceLimitFields;
|
|
116
|
+
subscriptionStatus: string;
|
|
117
|
+
}): WorkspaceLimitFields;
|
|
118
|
+
|
|
119
|
+
export { ADVANCED_PLAN as A, BUSINESS_PLAN as B, DUB_TRIAL_PERIOD_DAYS as D, ENTERPRISE_PLAN as E, FREE_PLAN as F, NEW_BUSINESS_PRICE_IDS as N, PlanFeature as P, SELF_SERVE_PAID_PLANS as S, TRIAL_LIMITS as T, PlanDetails as a, PLANS as b, PRO_PLAN as c, FREE_WORKSPACES_LIMIT as d, getPlanDetails as e, getNextPlan as f, getPlanAndTierFromPriceId as g, getSuggestedPlan as h, isDowngradePlan as i, isLegacyBusinessPlan as j, TrialLimitResource as k, getTrialLimitFeaturePhrase as l, getTrialLimitResourceForOverageBanner as m, isWorkspaceBillingTrialActive as n, getWorkspaceLimitsForStripeSubscriptionStatus as o };
|