@atlasauth/react 0.1.17 → 0.1.19
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/CHANGELOG.md +18 -0
- package/dist/AtlasProvider.d.ts +9 -0
- package/dist/AtlasProvider.js +2 -0
- package/dist/AtlasProvider.js.map +1 -1
- package/dist/account.d.ts +66 -0
- package/dist/account.js +223 -0
- package/dist/account.js.map +1 -0
- package/dist/auth-buttons.d.ts +29 -0
- package/dist/auth-buttons.js +43 -0
- package/dist/auth-buttons.js.map +1 -0
- package/dist/billing.d.ts +127 -0
- package/dist/billing.js +235 -0
- package/dist/billing.js.map +1 -0
- package/dist/components-shared.d.ts +22 -0
- package/dist/components-shared.js +70 -0
- package/dist/components-shared.js.map +1 -0
- package/dist/components.d.ts +29 -427
- package/dist/components.js +68 -1223
- package/dist/components.js.map +1 -1
- package/dist/control-components.d.ts +46 -0
- package/dist/control-components.js +69 -0
- package/dist/control-components.js.map +1 -0
- package/dist/flow.d.ts +81 -0
- package/dist/flow.js +319 -0
- package/dist/flow.js.map +1 -0
- package/dist/organization.d.ts +37 -0
- package/dist/organization.js +111 -0
- package/dist/organization.js.map +1 -0
- package/dist/reverification.d.ts +21 -0
- package/dist/reverification.js +74 -0
- package/dist/reverification.js.map +1 -0
- package/dist/sign-in.d.ts +42 -0
- package/dist/sign-in.js +91 -0
- package/dist/sign-in.js.map +1 -0
- package/dist/sign-up.d.ts +18 -0
- package/dist/sign-up.js +37 -0
- package/dist/sign-up.js.map +1 -0
- package/dist/user-button.d.ts +54 -0
- package/dist/user-button.js +75 -0
- package/dist/user-button.js.map +1 -0
- package/dist/waitlist.d.ts +15 -0
- package/dist/waitlist.js +52 -0
- package/dist/waitlist.js.map +1 -0
- package/package.json +4 -3
package/dist/components.d.ts
CHANGED
|
@@ -1,430 +1,32 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type ReauthInput } from '@atlasauth/js';
|
|
3
|
-
import { type FlowState } from './fapi';
|
|
4
|
-
import { useOrganization } from './hooks';
|
|
5
|
-
import { type ProtectCondition } from './protect';
|
|
6
|
-
import type { AtlasBillingInvoice, AtlasBillingPlan, AtlasBillingSubscription, AtlasPaymentMethod } from './types';
|
|
7
|
-
export declare function SignedIn({ children }: {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}): import("react").JSX.Element | null;
|
|
10
|
-
export declare function SignedOut({ children }: {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}): import("react").JSX.Element | null;
|
|
13
|
-
/** §10.2: render children only while the SDK is still loading. */
|
|
14
|
-
export declare function AtlasLoading({ children }: {
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
}): import("react").JSX.Element | null;
|
|
17
|
-
/** §10.2: render children only once the SDK has finished loading — the
|
|
18
|
-
* symmetric partner of {@link AtlasLoading}, so a consumer can show a spinner
|
|
19
|
-
* and its resolved content without hand-rolling the inverse condition. */
|
|
20
|
-
export declare function AtlasLoaded({ children }: {
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
}): import("react").JSX.Element | null;
|
|
23
1
|
/**
|
|
24
|
-
* §10.2
|
|
2
|
+
* §10.2 components — public aggregation point for the @atlasauth/react component
|
|
3
|
+
* library.
|
|
25
4
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
fallback?: ReactNode;
|
|
34
|
-
}): import("react").JSX.Element | null;
|
|
35
|
-
export interface FlowProps {
|
|
36
|
-
/** Where to send the user once the flow completes. */
|
|
37
|
-
afterUrl?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Also show Google One-Tap above the "Sign in with Google" button. OFF by
|
|
40
|
-
* default: the button alone (a user-initiated popup) converts better and never
|
|
41
|
-
* surprises the user with an auto-prompt. One-Tap is a separate GSI call, so
|
|
42
|
-
* this only adds it — the button is unaffected.
|
|
43
|
-
*/
|
|
44
|
-
googleOneTap?: boolean;
|
|
45
|
-
}
|
|
46
|
-
export declare function SignIn(props?: FlowProps): import("react").JSX.Element;
|
|
47
|
-
/**
|
|
48
|
-
* §6 headless native sign-in, for a consumer that renders its OWN Google button
|
|
49
|
-
* (or Apple / Facebook Limited Login). Mint a nonce with `mintNonce(provider)`,
|
|
50
|
-
* hand it to the provider SDK, then pass the resulting id_token to
|
|
51
|
-
* `signInWithIdToken` — it posts to the native endpoint, exchanges the ticket
|
|
52
|
-
* for cookies and re-boots the app on completion, returning the flow state so
|
|
53
|
-
* the caller can react to `needs_second_factor` etc.
|
|
54
|
-
*/
|
|
55
|
-
export declare function useSignIn(): {
|
|
56
|
-
mintNonce: (provider: string) => Promise<string | null>;
|
|
57
|
-
signInWithIdToken: (input: {
|
|
58
|
-
provider: string;
|
|
59
|
-
idToken: string;
|
|
60
|
-
nonce?: string;
|
|
61
|
-
}) => Promise<FlowState>;
|
|
62
|
-
};
|
|
63
|
-
export declare function SignUp(_props?: FlowProps): import("react").JSX.Element;
|
|
64
|
-
/**
|
|
65
|
-
* §L3 prebuilt-component EXTENSION API (Clerk `<UserButton.MenuItems>` /
|
|
66
|
-
* `<UserButton.Action>` / `<UserButton.Link>`).
|
|
67
|
-
*
|
|
68
|
-
* These are *descriptor* components: they render nothing on their own. A parent
|
|
69
|
-
* (`<UserButton>`) walks its children, matches these by identity, and turns each
|
|
70
|
-
* into a real menu entry it controls — so custom items sit inside the prebuilt
|
|
71
|
-
* dropdown's markup/appearance rather than being bolted on outside it. This is
|
|
72
|
-
* the same static-subcomponent pattern Clerk uses (`UserButton.Action`, etc.).
|
|
73
|
-
*/
|
|
74
|
-
export interface MenuActionProps {
|
|
75
|
-
/** The row's text. */
|
|
76
|
-
label: ReactNode;
|
|
77
|
-
/** Optional leading icon/element. */
|
|
78
|
-
labelIcon?: ReactNode;
|
|
79
|
-
/** Invoked when the row is chosen. */
|
|
80
|
-
onClick?: () => void;
|
|
81
|
-
}
|
|
82
|
-
export interface MenuLinkProps {
|
|
83
|
-
label: ReactNode;
|
|
84
|
-
labelIcon?: ReactNode;
|
|
85
|
-
/** Where the row navigates. */
|
|
86
|
-
href: string;
|
|
87
|
-
}
|
|
88
|
-
/** A container for custom `<UserButton.Action>` / `<UserButton.Link>` rows. Renders nothing itself. */
|
|
89
|
-
declare function UserButtonMenuItems(_props: {
|
|
90
|
-
children?: ReactNode;
|
|
91
|
-
}): null;
|
|
92
|
-
/** A custom action row inside `<UserButton.MenuItems>`. Renders nothing itself. */
|
|
93
|
-
declare function UserButtonAction(_props: MenuActionProps): null;
|
|
94
|
-
/** A custom link row inside `<UserButton.MenuItems>`. Renders nothing itself. */
|
|
95
|
-
declare function UserButtonLink(_props: MenuLinkProps): null;
|
|
96
|
-
/**
|
|
97
|
-
* The signed-in user's avatar + dropdown. Pass `<UserButton.MenuItems>` children
|
|
98
|
-
* to add custom `<UserButton.Action>` / `<UserButton.Link>` rows above sign-out.
|
|
99
|
-
*/
|
|
100
|
-
export declare function UserButton({ children }?: {
|
|
101
|
-
children?: ReactNode;
|
|
102
|
-
}): import("react").JSX.Element | null;
|
|
103
|
-
export declare namespace UserButton {
|
|
104
|
-
var MenuItems: typeof UserButtonMenuItems;
|
|
105
|
-
var Action: typeof UserButtonAction;
|
|
106
|
-
var Link: typeof UserButtonLink;
|
|
107
|
-
}
|
|
108
|
-
export interface AuthButtonProps {
|
|
109
|
-
/** Where the sign-in / sign-up page lives. Defaults to `/sign-in` / `/sign-up`. */
|
|
110
|
-
url?: string;
|
|
111
|
-
/** Where to return after auth completes (becomes `?redirect_url=`). */
|
|
112
|
-
redirectUrl?: string;
|
|
113
|
-
children?: ReactNode;
|
|
114
|
-
className?: string;
|
|
115
|
-
}
|
|
116
|
-
/** Clerk-parity ergonomic: a button that sends the user to your sign-in page. */
|
|
117
|
-
export declare function SignInButton({ url, redirectUrl, children, className }: AuthButtonProps): import("react").JSX.Element;
|
|
118
|
-
/** Clerk-parity ergonomic: a button that sends the user to your sign-up page. */
|
|
119
|
-
export declare function SignUpButton({ url, redirectUrl, children, className }: AuthButtonProps): import("react").JSX.Element;
|
|
120
|
-
/** Clerk-parity ergonomic: a button that signs the user out, then optionally redirects. */
|
|
121
|
-
export declare function SignOutButton({ redirectUrl, children, className, }: {
|
|
122
|
-
redirectUrl?: string;
|
|
123
|
-
children?: ReactNode;
|
|
124
|
-
className?: string;
|
|
125
|
-
}): import("react").JSX.Element;
|
|
126
|
-
/** Declarative "render this to send the user to sign-in" (Clerk `<RedirectToSignIn>`). */
|
|
127
|
-
export declare function RedirectToSignIn({ url, redirectUrl }: {
|
|
128
|
-
url?: string;
|
|
129
|
-
redirectUrl?: string;
|
|
130
|
-
}): null;
|
|
131
|
-
/** Declarative "render this to send the user to sign-up" (Clerk `<RedirectToSignUp>`). */
|
|
132
|
-
export declare function RedirectToSignUp({ url, redirectUrl }: {
|
|
133
|
-
url?: string;
|
|
134
|
-
redirectUrl?: string;
|
|
135
|
-
}): null;
|
|
136
|
-
/**
|
|
137
|
-
* §L1 (Clerk `<MultisessionAppSupport>`). Re-mounts its subtree whenever the
|
|
138
|
-
* ACTIVE account changes, so per-user state held in component state or memo
|
|
139
|
-
* caches is discarded on a `setActive({ session })` switch rather than bleeding
|
|
140
|
-
* one account's data into the next. Keying on the session id (plus a stable key
|
|
141
|
-
* while signed out) is the whole mechanism — React unmounts the old tree and
|
|
142
|
-
* mounts a fresh one when the key changes.
|
|
143
|
-
*/
|
|
144
|
-
export declare function MultisessionAppSupport({ children }: {
|
|
145
|
-
children: ReactNode;
|
|
146
|
-
}): import("react").JSX.Element;
|
|
147
|
-
/**
|
|
148
|
-
* The signed-in user's avatar (image, or initials fallback) — the standalone
|
|
149
|
-
* renderer `<UserButton>` uses internally, exported for reuse (Clerk `<UserAvatar>`).
|
|
150
|
-
*/
|
|
151
|
-
export declare function UserAvatar({ size, className }: {
|
|
152
|
-
size?: number;
|
|
153
|
-
className?: string;
|
|
154
|
-
}): import("react").JSX.Element | null;
|
|
155
|
-
/**
|
|
156
|
-
* §5.1 headless sign-up — the sign-up counterpart of {@link useSignIn}. Starts a
|
|
157
|
-
* sign-up attempt and returns the resulting flow (usually `needs_email_verification`;
|
|
158
|
-
* the shared `advance` then drives the code to completion), reloading the provider
|
|
159
|
-
* when a sign-up completes with a session ticket.
|
|
160
|
-
*/
|
|
161
|
-
export declare function useSignUp(): {
|
|
162
|
-
create: (input: {
|
|
163
|
-
email: string;
|
|
164
|
-
password: string;
|
|
165
|
-
fields?: Record<string, string>;
|
|
166
|
-
consent?: boolean;
|
|
167
|
-
captchaToken?: string;
|
|
168
|
-
}) => Promise<FlowState>;
|
|
169
|
-
};
|
|
170
|
-
export declare function OrganizationSwitcher(): import("react").JSX.Element;
|
|
171
|
-
/**
|
|
172
|
-
* Clerk-parity `useOrganizationList()`. The memberships the signed-in user
|
|
173
|
-
* belongs to, plus a `createOrganization(name)` that creates one through FAPI and
|
|
174
|
-
* re-boots the provider so the new membership appears everywhere. `memberships`
|
|
175
|
-
* comes straight from {@link useOrganization} (the same list `<OrganizationSwitcher>`
|
|
176
|
-
* renders), so there is one source of truth for what the user belongs to.
|
|
177
|
-
*/
|
|
178
|
-
export declare function useOrganizationList(): {
|
|
179
|
-
memberships: ReturnType<typeof useOrganization>['memberships'];
|
|
180
|
-
createOrganization(name: string): Promise<{
|
|
181
|
-
id: string;
|
|
182
|
-
name: string;
|
|
183
|
-
} | null>;
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* Clerk-parity `<CreateOrganization>`. A small name-and-submit form that creates
|
|
187
|
-
* an organization via {@link useOrganizationList} and immediately makes it the
|
|
188
|
-
* active org, so the user drops straight into the org they just made. Styled like
|
|
189
|
-
* the `<SignUp>` card. `onCreate` fires with the created org for a caller that
|
|
190
|
-
* wants to route afterwards.
|
|
191
|
-
*/
|
|
192
|
-
export declare function CreateOrganization({ onCreate, }?: {
|
|
193
|
-
onCreate?(organization: {
|
|
194
|
-
id: string;
|
|
195
|
-
name: string;
|
|
196
|
-
}): void;
|
|
197
|
-
}): import("react").JSX.Element;
|
|
198
|
-
/**
|
|
199
|
-
* Clerk-parity `<OrganizationList>`. Every organization the user belongs to as a
|
|
200
|
-
* button that switches to it (mirroring `<OrganizationSwitcher>`'s markup), plus
|
|
201
|
-
* an inline `<CreateOrganization>` so a user with no orgs — or who wants another —
|
|
202
|
-
* can make one without leaving the list.
|
|
203
|
-
*/
|
|
204
|
-
export declare function OrganizationList(): import("react").JSX.Element;
|
|
205
|
-
/**
|
|
206
|
-
* §2 The signed-in user's active devices, with per-device and "sign out everyone
|
|
207
|
-
* else" revocation. A drop-in for a settings page — the composable half of the
|
|
208
|
-
* post-login account surface an integrator needs the moment login is Atlas.
|
|
209
|
-
*/
|
|
210
|
-
export declare function ActiveSessions(): import("react").JSX.Element;
|
|
211
|
-
/**
|
|
212
|
-
* §2 The signed-in user's profile — name (editable) and email addresses. Another
|
|
213
|
-
* composable piece of the account surface; writes go to `PATCH /v1/client/me` and
|
|
214
|
-
* re-boot the provider so the rest of the app sees the change.
|
|
215
|
-
*/
|
|
216
|
-
export declare function ProfileCard(): import("react").JSX.Element | null;
|
|
217
|
-
/**
|
|
218
|
-
* §2 Manage two-factor authentication (authenticator app / TOTP). The full
|
|
219
|
-
* enrollment ceremony — start (secret + otpauth URI), verify with a live code,
|
|
220
|
-
* then the one-time backup codes — plus turn-off, in one composable drop-in, so a
|
|
221
|
-
* team never rebuilds the FAPI dance to put 2FA in their own settings page. The
|
|
222
|
-
* secret + `otpauth://` URI are shown for scan-or-manual entry (render a QR from
|
|
223
|
-
* the URI if you like — kept dependency-free here).
|
|
224
|
-
*/
|
|
225
|
-
export declare function ManageMfa(): import("react").JSX.Element;
|
|
226
|
-
/**
|
|
227
|
-
* §2 Manage passkeys (WebAuthn). Lists the user's registered credentials and runs
|
|
228
|
-
* the full add ceremony — `POST /passkeys/begin` → `navigator.credentials.create`
|
|
229
|
-
* (via the SDK's {@link createPasskey}) → `POST /passkeys/finish` — plus rename-free
|
|
230
|
-
* removal, in one composable drop-in. Nothing renders the "Add" affordance when the
|
|
231
|
-
* runtime has no WebAuthn support, so it degrades cleanly on older browsers.
|
|
232
|
-
*/
|
|
233
|
-
export declare function ManagePasskeys(): import("react").JSX.Element;
|
|
234
|
-
/**
|
|
235
|
-
* §2 The drop-in post-login account surface. Composes the account-management
|
|
236
|
-
* pieces (profile, 2FA, passkeys, devices). Each piece is also exported on its own
|
|
237
|
-
* (`<ProfileCard/>`, `<ManageMfa/>`, `<ManagePasskeys/>`, `<ActiveSessions/>`) so a
|
|
238
|
-
* team can drop just one into their existing settings page.
|
|
239
|
-
*/
|
|
240
|
-
/**
|
|
241
|
-
* §L3 extension API (Clerk `<UserProfile.Page>` / `<UserProfile.Link>`): add
|
|
242
|
-
* your own tab of content, or an external link, into the prebuilt profile. Both
|
|
243
|
-
* are descriptor components — `<UserProfile>` reads them from its children.
|
|
244
|
-
*/
|
|
245
|
-
export interface ProfilePageProps {
|
|
246
|
-
/** The tab's label. */
|
|
247
|
-
label: ReactNode;
|
|
248
|
-
labelIcon?: ReactNode;
|
|
249
|
-
/** The tab's body. */
|
|
250
|
-
children?: ReactNode;
|
|
251
|
-
}
|
|
252
|
-
export interface ProfileLinkProps {
|
|
253
|
-
label: ReactNode;
|
|
254
|
-
labelIcon?: ReactNode;
|
|
255
|
-
/** Where the tab navigates instead of showing content. */
|
|
256
|
-
url: string;
|
|
257
|
-
}
|
|
258
|
-
/** A custom content tab inside `<UserProfile>`. Renders nothing on its own. */
|
|
259
|
-
declare function UserProfilePage(_props: ProfilePageProps): null;
|
|
260
|
-
/** A custom external-link tab inside `<UserProfile>`. Renders nothing on its own. */
|
|
261
|
-
declare function UserProfileLink(_props: ProfileLinkProps): null;
|
|
262
|
-
export declare function UserProfile({ children }?: {
|
|
263
|
-
children?: ReactNode;
|
|
264
|
-
}): import("react").JSX.Element | null;
|
|
265
|
-
export declare namespace UserProfile {
|
|
266
|
-
var Page: typeof UserProfilePage;
|
|
267
|
-
var Link: typeof UserProfileLink;
|
|
268
|
-
}
|
|
269
|
-
export declare function OrganizationProfile(): import("react").JSX.Element | null;
|
|
270
|
-
/**
|
|
271
|
-
* Clerk-parity `useWaitlist()`. Headless join: `join(email)` posts the address to
|
|
272
|
-
* the waitlist endpoint and hands back the raw {@link FapiClient} response, so a
|
|
273
|
-
* caller rendering its own form decides what to show on success vs. failure.
|
|
274
|
-
*/
|
|
275
|
-
export declare function useWaitlist(): {
|
|
276
|
-
join: (email: string) => Promise<import("@atlasauth/js").FapiResponse<unknown>>;
|
|
277
|
-
};
|
|
278
|
-
/**
|
|
279
|
-
* Clerk-parity `<Waitlist>`. An email-and-submit card (styled like `<SignUp>`)
|
|
280
|
-
* that calls {@link useWaitlist}. A 200 swaps the form for a success message; any
|
|
281
|
-
* other response surfaces the server's message as a field error, so a bad or
|
|
282
|
-
* duplicate address is reported in place rather than silently swallowed.
|
|
283
|
-
*/
|
|
284
|
-
export declare function Waitlist(): import("react").JSX.Element;
|
|
285
|
-
/**
|
|
286
|
-
* Clerk-parity `useReverification()`. A thin, headless wrapper over the EXISTING
|
|
287
|
-
* step-up path (`@atlasauth/js`'s {@link reauthenticate} → `POST /v1/client/me/reauthenticate`)
|
|
288
|
-
* — it invents no server endpoint.
|
|
5
|
+
* The implementations live in per-component sibling files (`sign-in.tsx`,
|
|
6
|
+
* `sign-up.tsx`, `user-button.tsx`, `organization.tsx`, `account.tsx`,
|
|
7
|
+
* `auth-buttons.tsx`, `control-components.tsx`, `billing.tsx`, `waitlist.tsx`,
|
|
8
|
+
* `reverification.tsx`, and the shared `flow.tsx` / `components-shared.tsx`).
|
|
9
|
+
* This module re-exports every one of them so the package's public API — what
|
|
10
|
+
* `index.ts` re-exports via `export * from './components'` — stays byte-for-byte
|
|
11
|
+
* identical after the split. Import sites (`@atlasauth/react`) are unaffected.
|
|
289
12
|
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
export
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
* caller is redirected to. There is deliberately NO in-page card form: taking
|
|
311
|
-
* card details would need a PCI-scoped Stripe Elements integration, and faking
|
|
312
|
-
* one would be a lie. Redirect-to-Checkout is the same posture Stripe itself
|
|
313
|
-
* recommends for most apps.
|
|
314
|
-
*/
|
|
315
|
-
export interface CheckoutParams {
|
|
316
|
-
/** The plan to buy. */
|
|
317
|
-
planId: string;
|
|
318
|
-
/** Buy for an organization (its admin) rather than for the user. */
|
|
319
|
-
orgId?: string;
|
|
320
|
-
/** Where Stripe returns on success / cancel. Defaults to the current URL. */
|
|
321
|
-
successUrl?: string;
|
|
322
|
-
cancelUrl?: string;
|
|
323
|
-
/** Redirect to the Checkout URL (default true). False → the URL is only returned. */
|
|
324
|
-
redirect?: boolean;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* §commerce headless billing (Clerk `useCheckout`/subscription hooks combined).
|
|
328
|
-
* Loads the instance's plans and — when signed in — the subject's subscription,
|
|
329
|
-
* and exposes `checkout()` and `openPortal()`. Pass `{ orgId }` to operate on an
|
|
330
|
-
* organization the user administers instead of on the user.
|
|
331
|
-
*/
|
|
332
|
-
export declare function useBilling(opts?: {
|
|
333
|
-
orgId?: string;
|
|
334
|
-
}): {
|
|
335
|
-
isLoaded: boolean;
|
|
336
|
-
plans: AtlasBillingPlan[];
|
|
337
|
-
subscription: AtlasBillingSubscription | null;
|
|
338
|
-
invoices: AtlasBillingInvoice[];
|
|
339
|
-
paymentMethod: AtlasPaymentMethod | null;
|
|
340
|
-
checkout: (params: CheckoutParams) => Promise<import("@atlasauth/js").FapiResponse<{
|
|
341
|
-
url: string;
|
|
342
|
-
}>>;
|
|
343
|
-
openPortal: (params?: {
|
|
344
|
-
returnUrl?: string;
|
|
345
|
-
orgId?: string;
|
|
346
|
-
redirect?: boolean;
|
|
347
|
-
}) => Promise<import("@atlasauth/js").FapiResponse<{
|
|
348
|
-
url: string;
|
|
349
|
-
}>>;
|
|
350
|
-
reload: () => Promise<void>;
|
|
351
|
-
};
|
|
352
|
-
/** §commerce Clerk-parity alias — just the `checkout` action from {@link useBilling}. */
|
|
353
|
-
export declare function useCheckout(opts?: {
|
|
354
|
-
orgId?: string;
|
|
355
|
-
}): {
|
|
356
|
-
checkout: (params: CheckoutParams) => Promise<import("@atlasauth/js").FapiResponse<{
|
|
357
|
-
url: string;
|
|
358
|
-
}>>;
|
|
359
|
-
};
|
|
360
|
-
/** §commerce Clerk-parity alias — the subject's subscription from {@link useBilling}. */
|
|
361
|
-
export declare function useSubscription(opts?: {
|
|
362
|
-
orgId?: string;
|
|
363
|
-
}): {
|
|
364
|
-
isLoaded: boolean;
|
|
365
|
-
subscription: AtlasBillingSubscription | null;
|
|
366
|
-
openPortal: (params?: {
|
|
367
|
-
returnUrl?: string;
|
|
368
|
-
orgId?: string;
|
|
369
|
-
redirect?: boolean;
|
|
370
|
-
}) => Promise<import("@atlasauth/js").FapiResponse<{
|
|
371
|
-
url: string;
|
|
372
|
-
}>>;
|
|
373
|
-
reload: () => Promise<void>;
|
|
374
|
-
};
|
|
375
|
-
/** §commerce Clerk-parity alias — the subject's invoices from {@link useBilling}. */
|
|
376
|
-
export declare function useInvoices(opts?: {
|
|
377
|
-
orgId?: string;
|
|
378
|
-
}): {
|
|
379
|
-
isLoaded: boolean;
|
|
380
|
-
invoices: AtlasBillingInvoice[];
|
|
381
|
-
reload: () => Promise<void>;
|
|
382
|
-
};
|
|
383
|
-
/** §commerce Clerk-parity alias — the subject's default payment method + Portal to change it. */
|
|
384
|
-
export declare function usePaymentMethods(opts?: {
|
|
385
|
-
orgId?: string;
|
|
386
|
-
}): {
|
|
387
|
-
isLoaded: boolean;
|
|
388
|
-
paymentMethod: AtlasPaymentMethod | null;
|
|
389
|
-
openPortal: (params?: {
|
|
390
|
-
returnUrl?: string;
|
|
391
|
-
orgId?: string;
|
|
392
|
-
redirect?: boolean;
|
|
393
|
-
}) => Promise<import("@atlasauth/js").FapiResponse<{
|
|
394
|
-
url: string;
|
|
395
|
-
}>>;
|
|
396
|
-
reload: () => Promise<void>;
|
|
397
|
-
};
|
|
398
|
-
/**
|
|
399
|
-
* §commerce (Clerk `<PricingTable>`). Renders the instance's plans as cards with
|
|
400
|
-
* price + features and a subscribe button that starts a real Stripe Checkout.
|
|
401
|
-
* The plan the subject is currently on is marked as current (its button is
|
|
402
|
-
* disabled and an "Manage billing" action opens the Billing Portal instead).
|
|
403
|
-
*/
|
|
404
|
-
export declare function PricingTable({ orgId }?: {
|
|
405
|
-
orgId?: string;
|
|
406
|
-
}): import("react").JSX.Element;
|
|
407
|
-
/**
|
|
408
|
-
* §commerce (Clerk `<Invoices>`). The subject's billing history — number, status,
|
|
409
|
-
* amount, and a link to Stripe's hosted invoice / PDF. Renders nothing until
|
|
410
|
-
* loaded, and an empty state when there are no invoices yet.
|
|
411
|
-
*/
|
|
412
|
-
export declare function Invoices({ orgId }?: {
|
|
413
|
-
orgId?: string;
|
|
414
|
-
}): import("react").JSX.Element;
|
|
415
|
-
/**
|
|
416
|
-
* §commerce (Clerk `<EmbeddedCheckout>`). In-page checkout for a plan: mounts
|
|
417
|
-
* Stripe's own Embedded Checkout iframe — Stripe.js owns the card fields, so no
|
|
418
|
-
* PCI-scoped data ever touches Atlas. Fetches the instance's Stripe publishable
|
|
419
|
-
* key from `/billing/config`; when embedded checkout is not configured it renders
|
|
420
|
-
* `fallback` (default: a hosted-redirect button) rather than a broken frame.
|
|
421
|
-
*/
|
|
422
|
-
export declare function EmbeddedCheckout({ planId, orgId, returnUrl, fallback, }: {
|
|
423
|
-
planId: string;
|
|
424
|
-
orgId?: string;
|
|
425
|
-
/** Where Stripe returns after the in-page flow (defaults to the current URL). */
|
|
426
|
-
returnUrl?: string;
|
|
427
|
-
/** Rendered when embedded checkout is unavailable (no publishable key). */
|
|
428
|
-
fallback?: ReactNode;
|
|
429
|
-
}): import("react").JSX.Element;
|
|
430
|
-
export {};
|
|
13
|
+
* `<SignIn/>` and `<SignUp/>` are "full multi-step flows driven entirely by the
|
|
14
|
+
* server-side attempt status": no client here decides what comes next; each step
|
|
15
|
+
* renders whatever `status` the server returned, via the exhaustive mapping in
|
|
16
|
+
* @atlasauth/js. See `flow.tsx` for that shell.
|
|
17
|
+
*/
|
|
18
|
+
export { SignedIn, SignedOut, AtlasLoading, AtlasLoaded, Protect, MultisessionAppSupport, } from './control-components';
|
|
19
|
+
export type { FlowProps } from './flow';
|
|
20
|
+
export { SignIn, SocialSignInButton, useSignIn } from './sign-in';
|
|
21
|
+
export { SignUp, useSignUp } from './sign-up';
|
|
22
|
+
export type { MenuActionProps, MenuLinkProps } from './user-button';
|
|
23
|
+
export { UserButton, UserAvatar } from './user-button';
|
|
24
|
+
export type { AuthButtonProps } from './auth-buttons';
|
|
25
|
+
export { SignInButton, SignUpButton, SignOutButton, RedirectToSignIn, RedirectToSignUp, } from './auth-buttons';
|
|
26
|
+
export { OrganizationSwitcher, useOrganizationList, CreateOrganization, OrganizationList, OrganizationProfile, } from './organization';
|
|
27
|
+
export type { ProfilePageProps, ProfileLinkProps } from './account';
|
|
28
|
+
export { ActiveSessions, ProfileCard, ManageMfa, ManagePasskeys, UserProfile, } from './account';
|
|
29
|
+
export { useWaitlist, Waitlist } from './waitlist';
|
|
30
|
+
export { useReverification } from './reverification';
|
|
31
|
+
export type { CheckoutParams } from './billing';
|
|
32
|
+
export { useBilling, useCheckout, useSubscription, useInvoices, usePaymentMethods, PricingTable, Invoices, EmbeddedCheckout, } from './billing';
|