@raystack/frontier 0.75.1 → 0.76.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/package.json +4 -4
- package/react/dist/index.d.ts +34 -31
- package/react/dist/index.js +447 -647
- package/react/dist/index.mjs +475 -670
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/frontier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"description": "A js library for frontier",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"release:ci": "release-it --ci --no-increment --npm.ignoreVersion",
|
|
23
23
|
"release:dry": "release-it --dry-run --npm.ignoreVersion",
|
|
24
24
|
"release": "release-it",
|
|
25
|
-
"test": "jest",
|
|
25
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
26
26
|
"gen:client": "npx swagger-typescript-api -p ../../../../proto/apidocs.swagger.yaml -o api-client --modular",
|
|
27
27
|
"build:client": "node scripts/gen-swagger-client.mjs"
|
|
28
28
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@jest/globals": "^29.7.0",
|
|
71
71
|
"@radix-ui/react-icons": "^1.3.2",
|
|
72
|
-
"@raystack/apsara": "^0.
|
|
72
|
+
"@raystack/apsara": "^0.52.0",
|
|
73
73
|
"@raystack/eslint-config": "workspace:^",
|
|
74
74
|
"@raystack/frontier-tsconfig": "workspace:^",
|
|
75
75
|
"@size-limit/preset-small-lib": "^8.2.6",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@connectrpc/connect-query": "^2.1.1",
|
|
100
100
|
"@connectrpc/connect-web": "^2.0.2",
|
|
101
101
|
"@hookform/resolvers": "^3.10.0",
|
|
102
|
-
"@raystack/proton": "0.1.0-
|
|
102
|
+
"@raystack/proton": "0.1.0-fba39927b8b974dc1cc1ae0f05f1390580ec6d58",
|
|
103
103
|
"@tanstack/react-query": "^5.83.0",
|
|
104
104
|
"@tanstack/react-router": "1.58.17",
|
|
105
105
|
"axios": "^1.9.0",
|
package/react/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
import * as _tanstack_react_router from '@tanstack/react-router';
|
|
4
4
|
import { ReactNode, RouteComponent } from '@tanstack/react-router';
|
|
5
5
|
import * as yup from 'yup';
|
|
6
|
+
import { Plan, Organization, Group, User, BillingAccount, Subscription, PaymentMethod, OrganizationKyc, BillingAccountDetails } from '@raystack/proton/frontier';
|
|
6
7
|
import { ThemeProviderProps } from '@raystack/apsara';
|
|
8
|
+
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
9
|
+
import { Dayjs } from 'dayjs';
|
|
7
10
|
|
|
8
11
|
interface AvatarUploadProps {
|
|
9
12
|
subText?: string;
|
|
@@ -5451,7 +5454,7 @@ interface WindowProps extends React.HTMLAttributes<HTMLDialogElement> {
|
|
|
5451
5454
|
}
|
|
5452
5455
|
declare const Window: ({ open, onOpenChange, children, ...props }: WindowProps) => react_jsx_runtime.JSX.Element;
|
|
5453
5456
|
|
|
5454
|
-
interface BasePlan extends Omit<
|
|
5457
|
+
interface BasePlan extends Omit<Plan, 'title'> {
|
|
5455
5458
|
features?: Record<string, string>;
|
|
5456
5459
|
title: string;
|
|
5457
5460
|
}
|
|
@@ -5513,44 +5516,30 @@ interface FrontierProviderProps {
|
|
|
5513
5516
|
interface FrontierContextProviderProps {
|
|
5514
5517
|
config: FrontierClientOptions;
|
|
5515
5518
|
client: V1Beta1<unknown> | undefined;
|
|
5516
|
-
organizations:
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
setGroups: Dispatch<SetStateAction<V1Beta1Group[]>>;
|
|
5520
|
-
user: V1Beta1User | undefined;
|
|
5521
|
-
setUser: Dispatch<SetStateAction<V1Beta1User | undefined>>;
|
|
5519
|
+
organizations: Organization[];
|
|
5520
|
+
groups: Group[];
|
|
5521
|
+
user: User | undefined;
|
|
5522
5522
|
activeOrganization: V1Beta1Organization | undefined;
|
|
5523
5523
|
setActiveOrganization: Dispatch<SetStateAction<V1Beta1Organization | undefined>>;
|
|
5524
5524
|
isActiveOrganizationLoading: boolean;
|
|
5525
5525
|
setIsActiveOrganizationLoading: Dispatch<SetStateAction<boolean>>;
|
|
5526
5526
|
isUserLoading: boolean;
|
|
5527
|
-
|
|
5528
|
-
billingAccount: V1Beta1BillingAccount | undefined;
|
|
5529
|
-
setBillingAccount: Dispatch<SetStateAction<V1Beta1BillingAccount | undefined>>;
|
|
5527
|
+
billingAccount: BillingAccount | undefined;
|
|
5530
5528
|
isBillingAccountLoading: boolean;
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
setActiveSubscription: Dispatch<SetStateAction<V1Beta1Subscription | undefined>>;
|
|
5535
|
-
subscriptions: V1Beta1Subscription[];
|
|
5529
|
+
trialSubscription: Subscription | undefined;
|
|
5530
|
+
activeSubscription: Subscription | undefined;
|
|
5531
|
+
subscriptions: Subscription[];
|
|
5536
5532
|
isActiveSubscriptionLoading: boolean;
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
setActivePlan: Dispatch<SetStateAction<V1Beta1Plan | undefined>>;
|
|
5541
|
-
allPlans: V1Beta1Plan[];
|
|
5533
|
+
trialPlan: Plan | undefined;
|
|
5534
|
+
activePlan: Plan | undefined;
|
|
5535
|
+
allPlans: Plan[];
|
|
5542
5536
|
isAllPlansLoading: boolean;
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
basePlan?: V1Beta1Plan;
|
|
5548
|
-
organizationKyc: V1Beta1OrganizationKyc | undefined;
|
|
5549
|
-
setOrganizationKyc: Dispatch<SetStateAction<V1Beta1OrganizationKyc | undefined>>;
|
|
5537
|
+
fetchActiveSubsciption: () => Promise<Subscription | undefined>;
|
|
5538
|
+
paymentMethod: PaymentMethod | undefined;
|
|
5539
|
+
basePlan?: Plan;
|
|
5540
|
+
organizationKyc: OrganizationKyc | undefined;
|
|
5550
5541
|
isOrganizationKycLoading: boolean;
|
|
5551
|
-
|
|
5552
|
-
billingDetails: V1Beta1BillingAccountDetails | undefined;
|
|
5553
|
-
setBillingDetails: Dispatch<SetStateAction<V1Beta1BillingAccountDetails | undefined>>;
|
|
5542
|
+
billingDetails: BillingAccountDetails | undefined;
|
|
5554
5543
|
}
|
|
5555
5544
|
declare function useFrontier(): FrontierContextProviderProps;
|
|
5556
5545
|
|
|
@@ -5598,4 +5587,18 @@ declare const PREFERENCE_OPTIONS: {
|
|
|
5598
5587
|
readonly NEWSLETTER: "newsletter";
|
|
5599
5588
|
};
|
|
5600
5589
|
|
|
5601
|
-
|
|
5590
|
+
/**
|
|
5591
|
+
* Converts a ConnectRPC Timestamp to a JavaScript Date
|
|
5592
|
+
*/
|
|
5593
|
+
declare function timestampToDate(timestamp?: Timestamp): Date | null;
|
|
5594
|
+
/**
|
|
5595
|
+
* Converts a ConnectRPC Timestamp to a Dayjs object
|
|
5596
|
+
*/
|
|
5597
|
+
declare function timestampToDayjs(timestamp?: Timestamp): Dayjs | null;
|
|
5598
|
+
/**
|
|
5599
|
+
* Checks if a ConnectRPC Timestamp is the null time (0001-01-01T00:00:00Z)
|
|
5600
|
+
*/
|
|
5601
|
+
declare function isNullTimestamp(timestamp?: Timestamp): boolean;
|
|
5602
|
+
type TimeStamp = Timestamp;
|
|
5603
|
+
|
|
5604
|
+
export { AvatarUpload, Container, CreateOrganization, CustomizationProvider, FrontierClientBillingOptions, FrontierClientCustomizationOptions, FrontierClientOptions, FrontierProvider, Header, Layout, MagicLink, MagicLinkVerify, OrganizationProfile, PREFERENCE_OPTIONS, SignIn, SignUp, Subscribe, TimeStamp, Updates, Window, isNullTimestamp, timestampToDate, timestampToDayjs, useBillingPermission, useFrontier, usePreferences, useTokens };
|