@raystack/frontier 0.104.2 → 0.106.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/admin/dist/index.js +2192 -2004
- package/admin/dist/index.mjs +1360 -1156
- package/{react/dist/client.d.ts → client/dist/index.d.ts} +1 -2
- package/{react/dist/client.js → client/dist/index.js} +2197 -1950
- package/{react/dist/client.mjs → client/dist/index.mjs} +1098 -842
- package/package.json +9 -16
- package/react/dist/index.d.ts +0 -379
- package/react/dist/index.js +0 -18687
- package/react/dist/index.mjs +0 -19213
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/frontier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.106.0",
|
|
4
4
|
"description": "A js library for frontier",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/**/*",
|
|
11
|
-
"
|
|
11
|
+
"client/dist/**/*",
|
|
12
12
|
"hooks/dist/**/*",
|
|
13
13
|
"admin/dist/**/*",
|
|
14
14
|
"README.md"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsup",
|
|
18
|
-
"dev": "tsup
|
|
18
|
+
"dev": "tsup client/index.ts --watch --ignore-watch client/dist",
|
|
19
19
|
"size": "size-limit",
|
|
20
20
|
"lint": "eslint \"./**/*.ts*\" --ignore-pattern \"*.d.ts\" --ignore-pattern \"*.test.ts\"",
|
|
21
21
|
"bump-version": "node scripts/bump-version.js",
|
|
@@ -45,17 +45,11 @@
|
|
|
45
45
|
"module": "./dist/index.mjs",
|
|
46
46
|
"require": "./dist/index.js"
|
|
47
47
|
},
|
|
48
|
-
"./react": {
|
|
49
|
-
"types": "./react/dist/index.d.ts",
|
|
50
|
-
"import": "./react/dist/index.mjs",
|
|
51
|
-
"module": "./react/dist/index.mjs",
|
|
52
|
-
"require": "./react/dist/index.js"
|
|
53
|
-
},
|
|
54
48
|
"./client": {
|
|
55
|
-
"types": "./
|
|
56
|
-
"import": "./
|
|
57
|
-
"module": "./
|
|
58
|
-
"require": "./
|
|
49
|
+
"types": "./client/dist/index.d.ts",
|
|
50
|
+
"import": "./client/dist/index.mjs",
|
|
51
|
+
"module": "./client/dist/index.mjs",
|
|
52
|
+
"require": "./client/dist/index.js"
|
|
59
53
|
},
|
|
60
54
|
"./hooks": {
|
|
61
55
|
"types": "./hooks/dist/index.d.ts",
|
|
@@ -74,7 +68,7 @@
|
|
|
74
68
|
"@jest/globals": "^29.7.0",
|
|
75
69
|
"@radix-ui/react-form": "^0.1.8",
|
|
76
70
|
"@radix-ui/react-icons": "^1.3.2",
|
|
77
|
-
"@raystack/apsara": "0.
|
|
71
|
+
"@raystack/apsara": "1.0.0-rc.12",
|
|
78
72
|
"@raystack/eslint-config": "workspace:^",
|
|
79
73
|
"@raystack/frontier-tsconfig": "workspace:^",
|
|
80
74
|
"@size-limit/preset-small-lib": "^8.2.6",
|
|
@@ -107,7 +101,6 @@
|
|
|
107
101
|
"@connectrpc/connect-query": "2.1.1",
|
|
108
102
|
"@connectrpc/connect-web": "2.1.1",
|
|
109
103
|
"@hookform/resolvers": "^3.10.0",
|
|
110
|
-
"@raystack/apsara-v1": "npm:@raystack/apsara@1.0.0-rc.9",
|
|
111
104
|
"@raystack/proton": "0.1.0-859ba765e6cfd44736ddcf42664b742fe7fd916e",
|
|
112
105
|
"@tanstack/react-query": "^5.90.2",
|
|
113
106
|
"@tanstack/react-router": "^1.168.3",
|
|
@@ -124,7 +117,7 @@
|
|
|
124
117
|
"yup": "^1.6.1"
|
|
125
118
|
},
|
|
126
119
|
"peerDependencies": {
|
|
127
|
-
"@raystack/apsara": ">=0.
|
|
120
|
+
"@raystack/apsara": ">=1.0.0-rc.0",
|
|
128
121
|
"@types/react": "^19",
|
|
129
122
|
"react": "^19",
|
|
130
123
|
"react-dom": "^19"
|
package/react/dist/index.d.ts
DELETED
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import React, { ComponentPropsWithRef, ReactNode, Dispatch, SetStateAction, PropsWithChildren } from 'react';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as yup from 'yup';
|
|
4
|
-
import * as _tanstack_history from '@tanstack/history';
|
|
5
|
-
import * as _tanstack_router_core from '@tanstack/router-core';
|
|
6
|
-
import * as _tanstack_react_router from '@tanstack/react-router';
|
|
7
|
-
import { RouteComponent } from '@tanstack/react-router';
|
|
8
|
-
import { Plan, Organization, Group, User, BillingAccount, Subscription, PaymentMethod, OrganizationKyc, BillingAccountDetails } from '@raystack/proton/frontier';
|
|
9
|
-
import { ThemeProviderProps } from '@raystack/apsara';
|
|
10
|
-
import { QueryClient, UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
11
|
-
import { ConnectError } from '@connectrpc/connect';
|
|
12
|
-
import { DescMessage, MessageShape, DescMethodUnary, MessageInitShape } from '@bufbuild/protobuf';
|
|
13
|
-
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
14
|
-
import { Dayjs } from 'dayjs';
|
|
15
|
-
|
|
16
|
-
interface AvatarUploadProps {
|
|
17
|
-
subText?: string;
|
|
18
|
-
value?: string;
|
|
19
|
-
onChange?: (value: string) => void;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
initials?: string;
|
|
22
|
-
}
|
|
23
|
-
declare const AvatarUpload: React.ForwardRefExoticComponent<AvatarUploadProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
|
|
25
|
-
type ContainerProps = ComponentPropsWithRef<'div'> & {
|
|
26
|
-
children?: React.ReactNode;
|
|
27
|
-
shadow?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
28
|
-
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
29
|
-
className?: string;
|
|
30
|
-
};
|
|
31
|
-
declare const Container: ({ children, shadow, radius, style, className }: ContainerProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
-
|
|
33
|
-
type HeaderProps = ComponentPropsWithRef<'div'> & {
|
|
34
|
-
title?: string;
|
|
35
|
-
logo?: React.ReactNode;
|
|
36
|
-
};
|
|
37
|
-
declare const Header: ({ title, logo }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
-
|
|
39
|
-
type MagicLinkProps = {
|
|
40
|
-
open?: boolean;
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
-
};
|
|
43
|
-
declare const MagicLink: ({ open, ...props }: MagicLinkProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
-
|
|
45
|
-
type MagicLinkVerifyProps = ComponentPropsWithRef<typeof Container> & {
|
|
46
|
-
logo?: React.ReactNode;
|
|
47
|
-
title?: string;
|
|
48
|
-
redirectURL?: string;
|
|
49
|
-
};
|
|
50
|
-
declare const MagicLinkVerify: ({ logo, title, redirectURL, ...props }: MagicLinkVerifyProps) => react_jsx_runtime.JSX.Element;
|
|
51
|
-
|
|
52
|
-
type SignedInProps = ComponentPropsWithRef<typeof Container> & {
|
|
53
|
-
logo?: React.ReactNode;
|
|
54
|
-
title?: string;
|
|
55
|
-
excludes?: string[];
|
|
56
|
-
footer?: boolean;
|
|
57
|
-
};
|
|
58
|
-
declare const SignIn: ({ logo, title, excludes, footer, ...props }: SignedInProps) => react_jsx_runtime.JSX.Element;
|
|
59
|
-
|
|
60
|
-
type SignUpProps = ComponentPropsWithRef<typeof Container> & {
|
|
61
|
-
logo?: React.ReactNode;
|
|
62
|
-
title?: string;
|
|
63
|
-
excludes?: string[];
|
|
64
|
-
};
|
|
65
|
-
declare const SignUp: ({ logo, title, excludes, ...props }: SignUpProps) => react_jsx_runtime.JSX.Element;
|
|
66
|
-
|
|
67
|
-
declare const schema$1: yup.ObjectSchema<{
|
|
68
|
-
newsletter: boolean | undefined;
|
|
69
|
-
}, yup.AnyObject, {
|
|
70
|
-
newsletter: undefined;
|
|
71
|
-
}, "">;
|
|
72
|
-
type FormData$1 = yup.InferType<typeof schema$1>;
|
|
73
|
-
type UpdatesProps = {
|
|
74
|
-
logo?: ReactNode;
|
|
75
|
-
title?: string;
|
|
76
|
-
preferenceTitle?: string;
|
|
77
|
-
preferenceDescription?: string;
|
|
78
|
-
onSubmit?: (data: FormData$1) => void;
|
|
79
|
-
};
|
|
80
|
-
declare const Updates: ({ logo, title, preferenceTitle, preferenceDescription, onSubmit }: UpdatesProps) => react_jsx_runtime.JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare const schema: yup.ObjectSchema<{
|
|
83
|
-
name: string;
|
|
84
|
-
email: string;
|
|
85
|
-
contactNumber: string | null | undefined;
|
|
86
|
-
}, yup.AnyObject, {
|
|
87
|
-
name: undefined;
|
|
88
|
-
email: undefined;
|
|
89
|
-
contactNumber: undefined;
|
|
90
|
-
}, "">;
|
|
91
|
-
type FormData = yup.InferType<typeof schema>;
|
|
92
|
-
type SubscribeProps = {
|
|
93
|
-
title?: string;
|
|
94
|
-
desc?: string;
|
|
95
|
-
activity?: string;
|
|
96
|
-
medium?: string;
|
|
97
|
-
source?: string;
|
|
98
|
-
confirmSection?: ReactNode;
|
|
99
|
-
onSubmit?: (data: FormData) => void;
|
|
100
|
-
};
|
|
101
|
-
declare const Subscribe: ({ title, desc, activity, medium, source, confirmSection, onSubmit }: SubscribeProps) => react_jsx_runtime.JSX.Element;
|
|
102
|
-
|
|
103
|
-
type CreateOrganizationProps = ComponentPropsWithRef<typeof Container> & {
|
|
104
|
-
title?: string;
|
|
105
|
-
description?: string;
|
|
106
|
-
};
|
|
107
|
-
declare const CreateOrganization: ({ title, description, ...props }: CreateOrganizationProps) => react_jsx_runtime.JSX.Element;
|
|
108
|
-
|
|
109
|
-
interface CustomScreen {
|
|
110
|
-
name: string;
|
|
111
|
-
path: string;
|
|
112
|
-
category: 'Organization' | 'User';
|
|
113
|
-
component: RouteComponent;
|
|
114
|
-
}
|
|
115
|
-
type Theme = 'light' | 'dark' | 'system';
|
|
116
|
-
interface OrganizationProfileProps {
|
|
117
|
-
organizationId: string;
|
|
118
|
-
defaultRoute?: string;
|
|
119
|
-
showBilling?: boolean;
|
|
120
|
-
showTokens?: boolean;
|
|
121
|
-
showAPIKeys?: boolean;
|
|
122
|
-
showPreferences?: boolean;
|
|
123
|
-
hideToast?: boolean;
|
|
124
|
-
customScreens?: CustomScreen[];
|
|
125
|
-
onLogout?: () => void;
|
|
126
|
-
theme?: Theme;
|
|
127
|
-
onThemeChange?: (theme: Theme) => void;
|
|
128
|
-
}
|
|
129
|
-
interface CustomRoutes {
|
|
130
|
-
Organization: Pick<CustomScreen, 'name' | 'path'>[];
|
|
131
|
-
User: Pick<CustomScreen, 'name' | 'path'>[];
|
|
132
|
-
}
|
|
133
|
-
type RouterContext = Pick<OrganizationProfileProps, 'organizationId' | 'showBilling' | 'showTokens' | 'showAPIKeys' | 'hideToast' | 'showPreferences' | 'theme' | 'onThemeChange'> & {
|
|
134
|
-
customRoutes: CustomRoutes;
|
|
135
|
-
onLogout?: () => void;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
declare const router: _tanstack_router_core.RouterCore<_tanstack_router_core.Route<_tanstack_react_router.Register, any, "/", "/", string, "__root__", undefined, {}, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, readonly [_tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", string, "/", undefined, _tanstack_react_router.ResolveParams<"/">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/security", "/security", string, "/security", undefined, _tanstack_react_router.ResolveParams<"/security">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/sessions", "/sessions", string, "/sessions", undefined, _tanstack_react_router.ResolveParams<"/sessions">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/members", "/members", string, "/members", undefined, _tanstack_react_router.ResolveParams<"/members">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/teams", "/teams", string, "/teams", undefined, _tanstack_react_router.ResolveParams<"/teams">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_router_core.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/domains", "/domains", string, "/domains", undefined, _tanstack_react_router.ResolveParams<"/domains">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, readonly [_tanstack_react_router.Route<unknown, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/domains", "/domains", string, "/domains", undefined, _tanstack_react_router.ResolveParams<"/domains">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/modal", "/domains/modal", string, "/domains/modal", undefined, _tanstack_react_router.ResolveParams<"/modal">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/domains", "/domains", string, "/domains", undefined, _tanstack_react_router.ResolveParams<"/domains">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/$domainId/verify", "/domains/$domainId/verify", string, "/domains/$domainId/verify", undefined, _tanstack_react_router.ResolveParams<"/$domainId/verify">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/domains", "/domains", string, "/domains", undefined, _tanstack_react_router.ResolveParams<"/domains">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/$domainId/delete", "/domains/$domainId/delete", string, "/domains/$domainId/delete", undefined, _tanstack_react_router.ResolveParams<"/$domainId/delete">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>], unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/teams/$teamId", "/teams/$teamId", string, "/teams/$teamId", undefined, _tanstack_react_router.ResolveParams<"/teams/$teamId">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/projects", "/projects", string, "/projects", undefined, _tanstack_react_router.ResolveParams<"/projects">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/projects/$projectId", "/projects/$projectId", string, "/projects/$projectId", undefined, _tanstack_react_router.ResolveParams<"/projects/$projectId">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/profile", "/profile", string, "/profile", undefined, _tanstack_react_router.ResolveParams<"/profile">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/preferences", "/preferences", string, "/preferences", undefined, _tanstack_react_router.ResolveParams<"/preferences">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/billing", "/billing", string, "/billing", undefined, _tanstack_react_router.ResolveParams<"/billing">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/plans", "/plans", string, "/plans", undefined, _tanstack_react_router.ResolveParams<"/plans">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/tokens", "/tokens", string, "/tokens", undefined, _tanstack_react_router.ResolveParams<"/tokens">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/api-keys", "/api-keys", string, "/api-keys", undefined, _tanstack_react_router.ResolveParams<"/api-keys">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, _tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/api-keys/$id", "/api-keys/$id", string, "/api-keys/$id", undefined, _tanstack_react_router.ResolveParams<"/api-keys/$id">, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, ..._tanstack_react_router.Route<unknown, _tanstack_react_router.RootRoute<_tanstack_react_router.Register, undefined, RouterContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, string, "/", string, "__root__", undefined, _tanstack_react_router.ResolveParams<string>, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, _tanstack_react_router.AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>[]], unknown, unknown, unknown, undefined>, "never", false, _tanstack_history.RouterHistory, Record<string, any>>;
|
|
139
|
-
declare const OrganizationProfile: ({ organizationId, defaultRoute, showBilling, showTokens, showAPIKeys, showPreferences, hideToast, customScreens, onLogout, theme, onThemeChange, }: OrganizationProfileProps) => react_jsx_runtime.JSX.Element;
|
|
140
|
-
declare module '@tanstack/react-router' {
|
|
141
|
-
interface Register {
|
|
142
|
-
router: typeof router;
|
|
143
|
-
}
|
|
144
|
-
interface HistoryState {
|
|
145
|
-
refetch?: boolean;
|
|
146
|
-
enableServiceUserTokensListFetch?: boolean;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
interface WindowProps extends React.HTMLAttributes<HTMLDialogElement> {
|
|
151
|
-
open?: boolean;
|
|
152
|
-
onOpenChange?: (open: boolean) => void;
|
|
153
|
-
children?: React.ReactNode;
|
|
154
|
-
}
|
|
155
|
-
declare const Window: ({ open, onOpenChange, children, ...props }: WindowProps) => react_jsx_runtime.JSX.Element;
|
|
156
|
-
|
|
157
|
-
interface BasePlan extends Omit<Plan, 'title'> {
|
|
158
|
-
features?: Record<string, string>;
|
|
159
|
-
title: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
interface FrontierClientBillingOptions {
|
|
163
|
-
supportEmail?: string;
|
|
164
|
-
successUrl?: string;
|
|
165
|
-
cancelUrl?: string;
|
|
166
|
-
hideDecimals?: boolean;
|
|
167
|
-
cancelAfterTrial?: boolean;
|
|
168
|
-
showPerMonthPrice?: boolean;
|
|
169
|
-
tokenProductId?: string;
|
|
170
|
-
basePlan?: BasePlan;
|
|
171
|
-
}
|
|
172
|
-
interface EntityTerminologies {
|
|
173
|
-
singular: string;
|
|
174
|
-
plural: string;
|
|
175
|
-
}
|
|
176
|
-
interface FrontierClientCustomizationOptions {
|
|
177
|
-
terminology?: {
|
|
178
|
-
organization?: EntityTerminologies;
|
|
179
|
-
project?: EntityTerminologies;
|
|
180
|
-
team?: EntityTerminologies;
|
|
181
|
-
member?: EntityTerminologies;
|
|
182
|
-
user?: EntityTerminologies;
|
|
183
|
-
appName?: string;
|
|
184
|
-
};
|
|
185
|
-
messages?: {
|
|
186
|
-
billing?: {
|
|
187
|
-
plan_change?: Record<string, string>;
|
|
188
|
-
};
|
|
189
|
-
general?: Record<string, string>;
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
interface FrontierClientOptions {
|
|
193
|
-
locale?: string;
|
|
194
|
-
connectEndpoint?: string;
|
|
195
|
-
redirectSignup?: string;
|
|
196
|
-
redirectLogin?: string;
|
|
197
|
-
redirectMagicLinkVerify?: string;
|
|
198
|
-
callbackUrl?: string;
|
|
199
|
-
dateFormat?: string;
|
|
200
|
-
shortDateFormat?: string;
|
|
201
|
-
billing?: FrontierClientBillingOptions;
|
|
202
|
-
customization?: FrontierClientCustomizationOptions;
|
|
203
|
-
}
|
|
204
|
-
interface InitialState {
|
|
205
|
-
sessionId?: string | null;
|
|
206
|
-
}
|
|
207
|
-
type CustomHeaderValue = string | (() => string);
|
|
208
|
-
interface FrontierProviderProps {
|
|
209
|
-
config: FrontierClientOptions;
|
|
210
|
-
children: React.ReactNode;
|
|
211
|
-
initialState?: InitialState;
|
|
212
|
-
customHeaders?: Record<string, CustomHeaderValue>;
|
|
213
|
-
theme?: ThemeProviderProps;
|
|
214
|
-
renderToastProvider?: boolean;
|
|
215
|
-
renderThemeProvider?: boolean;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
interface FrontierContextProviderProps {
|
|
219
|
-
config: FrontierClientOptions;
|
|
220
|
-
organizations: Organization[];
|
|
221
|
-
groups: Group[];
|
|
222
|
-
user: User | undefined;
|
|
223
|
-
activeOrganization: Organization | undefined;
|
|
224
|
-
setActiveOrganization: Dispatch<SetStateAction<Organization | undefined>>;
|
|
225
|
-
isActiveOrganizationLoading: boolean;
|
|
226
|
-
setIsActiveOrganizationLoading: Dispatch<SetStateAction<boolean>>;
|
|
227
|
-
isUserLoading: boolean;
|
|
228
|
-
billingAccount: BillingAccount | undefined;
|
|
229
|
-
isBillingAccountLoading: boolean;
|
|
230
|
-
trialSubscription: Subscription | undefined;
|
|
231
|
-
activeSubscription: Subscription | undefined;
|
|
232
|
-
subscriptions: Subscription[];
|
|
233
|
-
isActiveSubscriptionLoading: boolean;
|
|
234
|
-
trialPlan: Plan | undefined;
|
|
235
|
-
activePlan: Plan | undefined;
|
|
236
|
-
allPlans: Plan[];
|
|
237
|
-
isAllPlansLoading: boolean;
|
|
238
|
-
fetchActiveSubscription: () => Promise<Subscription | undefined>;
|
|
239
|
-
paymentMethod: PaymentMethod | undefined;
|
|
240
|
-
basePlan?: Plan;
|
|
241
|
-
organizationKyc: OrganizationKyc | undefined;
|
|
242
|
-
isOrganizationKycLoading: boolean;
|
|
243
|
-
billingDetails: BillingAccountDetails | undefined;
|
|
244
|
-
sessionMetadata: {
|
|
245
|
-
browser?: string;
|
|
246
|
-
operatingSystem?: string;
|
|
247
|
-
ipAddress?: string;
|
|
248
|
-
location?: {
|
|
249
|
-
city?: string;
|
|
250
|
-
country?: string;
|
|
251
|
-
latitude?: string;
|
|
252
|
-
longitude?: string;
|
|
253
|
-
};
|
|
254
|
-
} | undefined;
|
|
255
|
-
}
|
|
256
|
-
declare function useFrontier(): FrontierContextProviderProps;
|
|
257
|
-
|
|
258
|
-
declare const queryClient: QueryClient;
|
|
259
|
-
declare const FrontierProvider: {
|
|
260
|
-
(props: FrontierProviderProps): react_jsx_runtime.JSX.Element;
|
|
261
|
-
displayName: string;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
interface CustomizationProviderProps {
|
|
265
|
-
children: ReactNode;
|
|
266
|
-
config?: FrontierClientCustomizationOptions;
|
|
267
|
-
}
|
|
268
|
-
declare const CustomizationProvider: React.FC<CustomizationProviderProps>;
|
|
269
|
-
|
|
270
|
-
interface TerminologyOptions {
|
|
271
|
-
plural?: boolean;
|
|
272
|
-
case?: "lower" | "upper" | "capital";
|
|
273
|
-
}
|
|
274
|
-
interface TerminologyEntity {
|
|
275
|
-
(options?: TerminologyOptions): string;
|
|
276
|
-
}
|
|
277
|
-
interface TerminologyMap {
|
|
278
|
-
organization: TerminologyEntity;
|
|
279
|
-
project: TerminologyEntity;
|
|
280
|
-
team: TerminologyEntity;
|
|
281
|
-
member: TerminologyEntity;
|
|
282
|
-
user: TerminologyEntity;
|
|
283
|
-
appName: TerminologyEntity;
|
|
284
|
-
}
|
|
285
|
-
declare const useTerminology: () => TerminologyMap;
|
|
286
|
-
|
|
287
|
-
interface UseTokensReturn {
|
|
288
|
-
tokenBalance: bigint;
|
|
289
|
-
isTokensLoading: boolean;
|
|
290
|
-
fetchTokenBalance: () => Promise<any>;
|
|
291
|
-
}
|
|
292
|
-
declare const useTokens: () => UseTokensReturn;
|
|
293
|
-
|
|
294
|
-
declare const useBillingPermission: () => {
|
|
295
|
-
isFetching: boolean;
|
|
296
|
-
isAllowed: boolean;
|
|
297
|
-
canSeeBilling: boolean;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
type UseConnectQueryPollingResult<TData> = UseQueryResult<TData, ConnectError> & {
|
|
301
|
-
isPollingFailed: boolean;
|
|
302
|
-
};
|
|
303
|
-
declare function useConnectQueryPolling<I extends DescMessage, O extends DescMessage, SelectOutData = MessageShape<O>>(params: {
|
|
304
|
-
method: DescMethodUnary<I, O>;
|
|
305
|
-
input: MessageInitShape<I> | undefined;
|
|
306
|
-
enabled: boolean;
|
|
307
|
-
select: (data: MessageShape<O>) => SelectOutData;
|
|
308
|
-
isComplete: (data: SelectOutData) => boolean;
|
|
309
|
-
maxPoll?: number;
|
|
310
|
-
pollingInterval?: number;
|
|
311
|
-
}): UseConnectQueryPollingResult<SelectOutData>;
|
|
312
|
-
|
|
313
|
-
type Preference = {
|
|
314
|
-
name?: string;
|
|
315
|
-
value?: string;
|
|
316
|
-
scopeType?: string;
|
|
317
|
-
scopeId?: string;
|
|
318
|
-
[key: string]: any;
|
|
319
|
-
};
|
|
320
|
-
type Preferences = Record<string, Preference>;
|
|
321
|
-
interface UsePreferences {
|
|
322
|
-
preferences: Preferences;
|
|
323
|
-
isLoading: boolean;
|
|
324
|
-
isFetching: boolean;
|
|
325
|
-
status: 'idle' | 'fetching' | 'loading';
|
|
326
|
-
fetchPreferences: () => void;
|
|
327
|
-
updatePreferences: (preferences: Preference[]) => Promise<void>;
|
|
328
|
-
fetchPreferencesStatus: UseQueryResult['status'];
|
|
329
|
-
updatePreferencesStatus: UseMutationResult['status'];
|
|
330
|
-
}
|
|
331
|
-
declare function usePreferences({ autoFetch, scopeType, scopeId }?: {
|
|
332
|
-
autoFetch?: boolean;
|
|
333
|
-
scopeType?: string;
|
|
334
|
-
scopeId?: string;
|
|
335
|
-
}): UsePreferences;
|
|
336
|
-
|
|
337
|
-
interface LayoutProps {
|
|
338
|
-
title: string;
|
|
339
|
-
description?: string;
|
|
340
|
-
}
|
|
341
|
-
declare function Layout({ title, description, children }: PropsWithChildren<LayoutProps>): react_jsx_runtime.JSX.Element;
|
|
342
|
-
|
|
343
|
-
interface PageHeaderProps {
|
|
344
|
-
title: string;
|
|
345
|
-
description?: string | ReactNode;
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* PageHeader - Component for displaying page header with a title and optional description on top of SDK pages.
|
|
349
|
-
*
|
|
350
|
-
* @param title - The main heading text for the page
|
|
351
|
-
* @param description - Optional description text or ReactNode displayed below the title
|
|
352
|
-
*
|
|
353
|
-
* @example
|
|
354
|
-
* <PageHeader
|
|
355
|
-
* title="Sessions"
|
|
356
|
-
* description="Devices logged into this account."
|
|
357
|
-
* />
|
|
358
|
-
*/
|
|
359
|
-
declare const PageHeader: ({ title, description }: PageHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
360
|
-
|
|
361
|
-
declare const PREFERENCE_OPTIONS: {
|
|
362
|
-
readonly NEWSLETTER: "newsletter";
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Converts a ConnectRPC Timestamp to a JavaScript Date
|
|
367
|
-
*/
|
|
368
|
-
declare function timestampToDate(timestamp?: Timestamp): Date | null;
|
|
369
|
-
/**
|
|
370
|
-
* Converts a ConnectRPC Timestamp to a Dayjs object
|
|
371
|
-
*/
|
|
372
|
-
declare function timestampToDayjs(timestamp?: Timestamp): Dayjs | null;
|
|
373
|
-
/**
|
|
374
|
-
* Checks if a ConnectRPC Timestamp is the null time (0001-01-01T00:00:00Z)
|
|
375
|
-
*/
|
|
376
|
-
declare function isNullTimestamp(timestamp?: Timestamp): boolean;
|
|
377
|
-
type TimeStamp = Timestamp;
|
|
378
|
-
|
|
379
|
-
export { AvatarUpload, Container, CreateOrganization, CustomizationProvider, FrontierClientBillingOptions, FrontierClientCustomizationOptions, FrontierClientOptions, FrontierProvider, Header, Layout, MagicLink, MagicLinkVerify, OrganizationProfile, PREFERENCE_OPTIONS, PageHeader, SignIn, SignUp, Subscribe, TimeStamp, Updates, Window, isNullTimestamp, queryClient, timestampToDate, timestampToDayjs, useBillingPermission, useConnectQueryPolling, useFrontier, usePreferences, useTerminology, useTokens };
|