@kuckit/app-web 2.0.1 → 2.0.2

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +93 -836
  2. package/package.json +14 -27
  3. package/src/index.ts +0 -38
package/dist/index.d.ts CHANGED
@@ -6,21 +6,18 @@ import { RouteComponent } from "@tanstack/react-router";
6
6
  import { ClientModuleSpec, ClientModuleSpec as ClientModuleSpec$1, NavItem, NavRegistry, RouteDefinition, RouteRegistry, SlotRegistry } from "@kuckit/sdk-react";
7
7
  import * as _orpc_client0 from "@orpc/client";
8
8
  import { RPCLink } from "@orpc/client/fetch";
9
- import * as _orpc_tanstack_query0 from "@orpc/tanstack-query";
10
9
  import { createTanstackQueryUtils } from "@orpc/tanstack-query";
11
10
  import * as better_auth_react0 from "better-auth/react";
12
11
  import { createAuthClient } from "better-auth/react";
13
- import * as _orpc_server0 from "@orpc/server";
14
- import * as zod0 from "zod";
15
12
  import * as better_auth0 from "better-auth";
16
- import { AppRouterClient } from "@kuckit/api/routers/index";
13
+ import { AppRouterClient as AppRouterClient$1 } from "@kuckit/api/routers/index";
17
14
 
18
15
  //#region src/types.d.ts
19
- type ORPCUtils = ReturnType<typeof createTanstackQueryUtils<AppRouterClient>>;
16
+ type ORPCUtils = ReturnType<typeof createTanstackQueryUtils<AppRouterClient$1>>;
20
17
  type AuthClient = ReturnType<typeof createAuthClient>;
21
18
  interface KuckitWebServices {
22
19
  queryClient: QueryClient;
23
- rpcClient: AppRouterClient;
20
+ rpcClient: AppRouterClient$1;
24
21
  orpc: ORPCUtils;
25
22
  authClient: AuthClient;
26
23
  }
@@ -66,402 +63,12 @@ interface ModuleRoute {
66
63
  declare const KuckitWebContext: react0.Context<KuckitWebContext | null>;
67
64
  declare function useKuckitWeb(): KuckitWebContext;
68
65
  declare function useServices(): KuckitWebServices;
69
- declare function useRpc(): {
70
- healthCheck: _orpc_server0.ProcedureClient<Record<never, never>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<string, string>, Record<never, never>>;
71
- privateData: _orpc_server0.ProcedureClient<Record<never, never>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<{
72
- message: string;
73
- user: {
74
- id: string;
75
- createdAt: Date;
76
- updatedAt: Date;
77
- email: string;
78
- emailVerified: boolean;
79
- name: string;
80
- image?: string | null | undefined | undefined;
81
- };
82
- }, {
83
- message: string;
84
- user: {
85
- id: string;
86
- createdAt: Date;
87
- updatedAt: Date;
88
- email: string;
89
- emailVerified: boolean;
90
- name: string;
91
- image?: string | null | undefined | undefined;
92
- };
93
- }>, Record<never, never>>;
94
- profile: {
95
- me: _orpc_server0.ProcedureClient<Record<never, never>, _orpc_server0.Schema<unknown, unknown>, zod0.ZodObject<{
96
- id: zod0.ZodString;
97
- name: zod0.ZodString;
98
- email: zod0.ZodString;
99
- emailVerified: zod0.ZodBoolean;
100
- createdAt: zod0.ZodString;
101
- updatedAt: zod0.ZodString;
102
- }, better_auth0.$strip>, Record<never, never>>;
103
- };
104
- };
105
- declare function useOrpc(): {
106
- healthCheck: _orpc_tanstack_query0.ProcedureUtils<Record<never, never>, unknown, string, Error> & _orpc_tanstack_query0.GeneralUtils<unknown>;
107
- privateData: _orpc_tanstack_query0.ProcedureUtils<Record<never, never>, unknown, {
108
- message: string;
109
- user: {
110
- id: string;
111
- createdAt: Date;
112
- updatedAt: Date;
113
- email: string;
114
- emailVerified: boolean;
115
- name: string;
116
- image?: string | null | undefined | undefined;
117
- };
118
- }, Error> & _orpc_tanstack_query0.GeneralUtils<unknown>;
119
- profile: {
120
- me: _orpc_tanstack_query0.ProcedureUtils<Record<never, never>, unknown, {
121
- id: string;
122
- name: string;
123
- email: string;
124
- emailVerified: boolean;
125
- createdAt: string;
126
- updatedAt: string;
127
- }, Error> & _orpc_tanstack_query0.GeneralUtils<unknown>;
128
- } & _orpc_tanstack_query0.GeneralUtils<unknown>;
129
- } & _orpc_tanstack_query0.GeneralUtils<unknown>;
130
- declare function useAuth(): {
131
- signOut: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
132
- query?: Record<string, any> | undefined;
133
- fetchOptions?: FetchOptions | undefined;
134
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
135
- success: boolean;
136
- }, {
137
- code?: string | undefined;
138
- message?: string | undefined;
139
- }, FetchOptions["throw"] extends true ? true : false>>;
140
- } & {
141
- resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
142
- newPassword: string;
143
- token?: string | undefined;
144
- }> & Record<string, any>, Partial<{
145
- token?: string | undefined;
146
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
147
- newPassword: string;
148
- token?: string | undefined;
149
- } & {
150
- fetchOptions?: FetchOptions | undefined;
151
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
152
- status: boolean;
153
- }, {
154
- code?: string | undefined;
155
- message?: string | undefined;
156
- }, FetchOptions["throw"] extends true ? true : false>>;
157
- } & {
158
- verifyEmail: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
159
- token: string;
160
- callbackURL?: string | undefined;
161
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
162
- query: {
163
- token: string;
164
- callbackURL?: string | undefined;
165
- };
166
- fetchOptions?: FetchOptions | undefined;
167
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<void | {
168
- status: boolean;
169
- }>, {
170
- code?: string | undefined;
171
- message?: string | undefined;
172
- }, FetchOptions["throw"] extends true ? true : false>>;
173
- } & {
174
- sendVerificationEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
175
- email: string;
176
- callbackURL?: string | undefined;
177
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
178
- email: string;
179
- callbackURL?: string | undefined;
180
- } & {
181
- fetchOptions?: FetchOptions | undefined;
182
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
183
- status: boolean;
184
- }, {
185
- code?: string | undefined;
186
- message?: string | undefined;
187
- }, FetchOptions["throw"] extends true ? true : false>>;
188
- } & {
189
- changeEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
190
- newEmail: string;
191
- callbackURL?: string | undefined;
192
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
193
- newEmail: string;
194
- callbackURL?: string | undefined;
195
- } & {
196
- fetchOptions?: FetchOptions | undefined;
197
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
198
- status: boolean;
199
- }, {
200
- code?: string | undefined;
201
- message?: string | undefined;
202
- }, FetchOptions["throw"] extends true ? true : false>>;
203
- } & {
204
- changePassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
205
- newPassword: string;
206
- currentPassword: string;
207
- revokeOtherSessions?: boolean | undefined;
208
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
209
- newPassword: string;
210
- currentPassword: string;
211
- revokeOtherSessions?: boolean | undefined;
212
- } & {
213
- fetchOptions?: FetchOptions | undefined;
214
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
215
- token: string | null;
216
- user: {
217
- id: string;
218
- email: string;
219
- name: string;
220
- image: string | null | undefined;
221
- emailVerified: boolean;
222
- createdAt: Date;
223
- updatedAt: Date;
224
- };
225
- }, {
226
- code?: string | undefined;
227
- message?: string | undefined;
228
- }, FetchOptions["throw"] extends true ? true : false>>;
229
- } & {
230
- deleteUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
231
- callbackURL?: string | undefined;
232
- password?: string | undefined;
233
- token?: string | undefined;
234
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
235
- callbackURL?: string | undefined;
236
- password?: string | undefined;
237
- token?: string | undefined;
238
- } & {
239
- fetchOptions?: FetchOptions | undefined;
240
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
241
- success: boolean;
242
- message: string;
243
- }, {
244
- code?: string | undefined;
245
- message?: string | undefined;
246
- }, FetchOptions["throw"] extends true ? true : false>>;
247
- } & {
248
- requestPasswordReset: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
249
- email: string;
250
- redirectTo?: string | undefined;
251
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
252
- email: string;
253
- redirectTo?: string | undefined;
254
- } & {
255
- fetchOptions?: FetchOptions | undefined;
256
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
257
- status: boolean;
258
- message: string;
259
- }, {
260
- code?: string | undefined;
261
- message?: string | undefined;
262
- }, FetchOptions["throw"] extends true ? true : false>>;
263
- } & {
264
- resetPassword: {
265
- ":token": <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
266
- callbackURL: string;
267
- }> & Record<string, any>, {
268
- token: string;
269
- }>>(data_0: better_auth0.Prettify<{
270
- query: {
271
- callbackURL: string;
272
- };
273
- fetchOptions?: FetchOptions | undefined;
274
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<never, {
275
- code?: string | undefined;
276
- message?: string | undefined;
277
- }, FetchOptions["throw"] extends true ? true : false>>;
278
- };
279
- } & {
280
- revokeSession: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
281
- token: string;
282
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
283
- token: string;
284
- } & {
285
- fetchOptions?: FetchOptions | undefined;
286
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
287
- status: boolean;
288
- }, {
289
- code?: string | undefined;
290
- message?: string | undefined;
291
- }, FetchOptions["throw"] extends true ? true : false>>;
292
- } & {
293
- revokeSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
294
- query?: Record<string, any> | undefined;
295
- fetchOptions?: FetchOptions | undefined;
296
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
297
- status: boolean;
298
- }, {
299
- code?: string | undefined;
300
- message?: string | undefined;
301
- }, FetchOptions["throw"] extends true ? true : false>>;
302
- } & {
303
- revokeOtherSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
304
- query?: Record<string, any> | undefined;
305
- fetchOptions?: FetchOptions | undefined;
306
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
307
- status: boolean;
308
- }, {
309
- code?: string | undefined;
310
- message?: string | undefined;
311
- }, FetchOptions["throw"] extends true ? true : false>>;
312
- } & {
313
- linkSocial: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
314
- provider: unknown;
315
- callbackURL?: string | undefined;
316
- idToken?: {
317
- token: string;
318
- nonce?: string | undefined;
319
- accessToken?: string | undefined;
320
- refreshToken?: string | undefined;
321
- scopes?: string[] | undefined;
322
- } | undefined;
323
- requestSignUp?: boolean | undefined;
324
- scopes?: string[] | undefined;
325
- errorCallbackURL?: string | undefined;
326
- disableRedirect?: boolean | undefined;
327
- additionalData?: Record<string, any> | undefined;
328
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
329
- provider: unknown;
330
- callbackURL?: string | undefined;
331
- idToken?: {
332
- token: string;
333
- nonce?: string | undefined;
334
- accessToken?: string | undefined;
335
- refreshToken?: string | undefined;
336
- scopes?: string[] | undefined;
337
- } | undefined;
338
- requestSignUp?: boolean | undefined;
339
- scopes?: string[] | undefined;
340
- errorCallbackURL?: string | undefined;
341
- disableRedirect?: boolean | undefined;
342
- additionalData?: Record<string, any> | undefined;
343
- } & {
344
- fetchOptions?: FetchOptions | undefined;
345
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
346
- url: string;
347
- redirect: boolean;
348
- }, {
349
- code?: string | undefined;
350
- message?: string | undefined;
351
- }, FetchOptions["throw"] extends true ? true : false>>;
352
- } & {
353
- listAccounts: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
354
- query?: Record<string, any> | undefined;
355
- fetchOptions?: FetchOptions | undefined;
356
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
357
- id: string;
358
- providerId: string;
359
- createdAt: Date;
360
- updatedAt: Date;
361
- accountId: string;
362
- userId: string;
363
- scopes: string[];
364
- }[], {
365
- code?: string | undefined;
366
- message?: string | undefined;
367
- }, FetchOptions["throw"] extends true ? true : false>>;
368
- } & {
369
- deleteUser: {
370
- callback: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
371
- token: string;
372
- callbackURL?: string | undefined;
373
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
374
- query: {
375
- token: string;
376
- callbackURL?: string | undefined;
377
- };
378
- fetchOptions?: FetchOptions | undefined;
379
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
380
- success: boolean;
381
- message: string;
382
- }, {
383
- code?: string | undefined;
384
- message?: string | undefined;
385
- }, FetchOptions["throw"] extends true ? true : false>>;
386
- };
387
- } & {
388
- unlinkAccount: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
389
- providerId: string;
390
- accountId?: string | undefined;
391
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
392
- providerId: string;
393
- accountId?: string | undefined;
394
- } & {
395
- fetchOptions?: FetchOptions | undefined;
396
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
397
- status: boolean;
398
- }, {
399
- code?: string | undefined;
400
- message?: string | undefined;
401
- }, FetchOptions["throw"] extends true ? true : false>>;
402
- } & {
403
- refreshToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
404
- providerId: string;
405
- accountId?: string | undefined;
406
- userId?: string | undefined;
407
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
408
- providerId: string;
409
- accountId?: string | undefined;
410
- userId?: string | undefined;
411
- } & {
412
- fetchOptions?: FetchOptions | undefined;
413
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
414
- accessToken: string | undefined;
415
- refreshToken: string | undefined;
416
- accessTokenExpiresAt: Date | undefined;
417
- refreshTokenExpiresAt: Date | undefined;
418
- scope: string | null | undefined;
419
- idToken: string | null | undefined;
420
- providerId: string;
421
- accountId: string;
422
- }, {
423
- code?: string | undefined;
424
- message?: string | undefined;
425
- }, FetchOptions["throw"] extends true ? true : false>>;
426
- } & {
427
- getAccessToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
428
- providerId: string;
429
- accountId?: string | undefined;
430
- userId?: string | undefined;
431
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
432
- providerId: string;
433
- accountId?: string | undefined;
434
- userId?: string | undefined;
435
- } & {
436
- fetchOptions?: FetchOptions | undefined;
437
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
438
- accessToken: string;
439
- accessTokenExpiresAt: Date | undefined;
440
- scopes: string[];
441
- idToken: string | undefined;
442
- }, {
443
- code?: string | undefined;
444
- message?: string | undefined;
445
- }, FetchOptions["throw"] extends true ? true : false>>;
446
- } & {
447
- accountInfo: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
448
- accountId?: string | undefined;
449
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
450
- query?: {
451
- accountId?: string | undefined;
452
- } | undefined;
453
- fetchOptions?: FetchOptions | undefined;
454
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
455
- user: better_auth0.OAuth2UserInfo;
456
- data: Record<string, any>;
457
- }, {
458
- code?: string | undefined;
459
- message?: string | undefined;
460
- }, FetchOptions["throw"] extends true ? true : false>>;
461
- } & {
66
+ declare function useRpc(): AppRouterClient;
67
+ declare function useOrpc(): any;
68
+ declare function useAuth(): {
462
69
  signIn: {
463
70
  social: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
464
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
71
+ provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
465
72
  callbackURL?: string | undefined;
466
73
  newUserCallbackURL?: string | undefined;
467
74
  errorCallbackURL?: string | undefined;
@@ -478,7 +85,7 @@ declare function useAuth(): {
478
85
  loginHint?: string | undefined;
479
86
  additionalData?: Record<string, any> | undefined;
480
87
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
481
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
88
+ provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
482
89
  callbackURL?: string | undefined;
483
90
  newUserCallbackURL?: string | undefined;
484
91
  errorCallbackURL?: string | undefined;
@@ -517,6 +124,16 @@ declare function useAuth(): {
517
124
  message?: string | undefined;
518
125
  }, FetchOptions["throw"] extends true ? true : false>>;
519
126
  };
127
+ } & {
128
+ signOut: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
129
+ query?: Record<string, any> | undefined;
130
+ fetchOptions?: FetchOptions | undefined;
131
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
132
+ success: boolean;
133
+ }, {
134
+ code?: string | undefined;
135
+ message?: string | undefined;
136
+ }, FetchOptions["throw"] extends true ? true : false>>;
520
137
  } & {
521
138
  signUp: {
522
139
  email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
@@ -563,277 +180,35 @@ declare function useAuth(): {
563
180
  } & {
564
181
  signIn: {
565
182
  email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
566
- email: string;
567
- password: string;
568
- callbackURL?: string | undefined;
569
- rememberMe?: boolean | undefined;
570
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
571
- email: string;
572
- password: string;
573
- callbackURL?: string | undefined;
574
- rememberMe?: boolean | undefined;
575
- } & {
576
- fetchOptions?: FetchOptions | undefined;
577
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
578
- redirect: boolean;
579
- token: string;
580
- url?: string | undefined;
581
- user: {
582
- id: string;
583
- createdAt: Date;
584
- updatedAt: Date;
585
- email: string;
586
- emailVerified: boolean;
587
- name: string;
588
- image?: string | null | undefined | undefined;
589
- };
590
- }, {
591
- code?: string | undefined;
592
- message?: string | undefined;
593
- }, FetchOptions["throw"] extends true ? true : false>>;
594
- };
595
- } & {
596
- updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<Partial<{}> & {
597
- name?: string | undefined;
598
- image?: string | undefined | null;
599
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
600
- image?: (string | null) | undefined;
601
- name?: string | undefined;
602
- fetchOptions?: FetchOptions | undefined;
603
- } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
604
- status: boolean;
605
- }, {
606
- code?: string | undefined;
607
- message?: string | undefined;
608
- }, FetchOptions["throw"] extends true ? true : false>>;
609
- } & {
610
- listSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
611
- query?: Record<string, any> | undefined;
612
- fetchOptions?: FetchOptions | undefined;
613
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth0.Prettify<{
614
- id: string;
615
- createdAt: Date;
616
- updatedAt: Date;
617
- userId: string;
618
- expiresAt: Date;
619
- token: string;
620
- ipAddress?: string | null | undefined | undefined;
621
- userAgent?: string | null | undefined | undefined;
622
- }>[], {
623
- code?: string | undefined;
624
- message?: string | undefined;
625
- }, FetchOptions["throw"] extends true ? true : false>>;
626
- } & {
627
- getSession: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
628
- disableCookieCache?: unknown;
629
- disableRefresh?: unknown;
630
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
631
- query?: {
632
- disableCookieCache?: unknown;
633
- disableRefresh?: unknown;
634
- } | undefined;
635
- fetchOptions?: FetchOptions | undefined;
636
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
637
- user: {
638
- id: string;
639
- createdAt: Date;
640
- updatedAt: Date;
641
- email: string;
642
- emailVerified: boolean;
643
- name: string;
644
- image?: string | null | undefined;
645
- };
646
- session: {
647
- id: string;
648
- createdAt: Date;
649
- updatedAt: Date;
650
- userId: string;
651
- expiresAt: Date;
652
- token: string;
653
- ipAddress?: string | null | undefined;
654
- userAgent?: string | null | undefined;
655
- };
656
- } | null, {
657
- code?: string | undefined;
658
- message?: string | undefined;
659
- }, FetchOptions["throw"] extends true ? true : false>>;
660
- } & {
661
- useSession: () => {
662
- data: {
663
- user: {
664
- id: string;
665
- createdAt: Date;
666
- updatedAt: Date;
667
- email: string;
668
- emailVerified: boolean;
669
- name: string;
670
- image?: string | null | undefined;
671
- };
672
- session: {
673
- id: string;
674
- createdAt: Date;
675
- updatedAt: Date;
676
- userId: string;
677
- expiresAt: Date;
678
- token: string;
679
- ipAddress?: string | null | undefined;
680
- userAgent?: string | null | undefined;
681
- };
682
- } | null;
683
- isPending: boolean;
684
- isRefetching: boolean;
685
- error: better_auth_react0.BetterFetchError | null;
686
- refetch: (queryParams?: {
687
- query?: better_auth0.SessionQueryParams;
688
- } | undefined) => Promise<void>;
689
- };
690
- $Infer: {
691
- Session: {
692
- user: {
693
- id: string;
694
- createdAt: Date;
695
- updatedAt: Date;
696
- email: string;
697
- emailVerified: boolean;
698
- name: string;
699
- image?: string | null | undefined;
700
- };
701
- session: {
702
- id: string;
703
- createdAt: Date;
704
- updatedAt: Date;
705
- userId: string;
706
- expiresAt: Date;
707
- token: string;
708
- ipAddress?: string | null | undefined;
709
- userAgent?: string | null | undefined;
710
- };
711
- };
712
- };
713
- $fetch: better_auth_react0.BetterFetch<{
714
- plugins: (better_auth_react0.BetterFetchPlugin | {
715
- id: string;
716
- name: string;
717
- hooks: {
718
- onSuccess(context: better_auth_react0.SuccessContext<any>): void;
719
- };
720
- } | {
721
- id: string;
722
- name: string;
723
- hooks: {
724
- onSuccess: ((context: better_auth_react0.SuccessContext<any>) => Promise<void> | void) | undefined;
725
- onError: ((context: better_auth_react0.ErrorContext) => Promise<void> | void) | undefined;
726
- onRequest: (<T extends Record<string, any>>(context: better_auth_react0.RequestContext<T>) => Promise<better_auth_react0.RequestContext | void> | better_auth_react0.RequestContext | void) | undefined;
727
- onResponse: ((context: better_auth_react0.ResponseContext) => Promise<Response | void | better_auth_react0.ResponseContext> | Response | better_auth_react0.ResponseContext | void) | undefined;
728
- };
729
- })[];
730
- cache?: RequestCache | undefined;
731
- method: string;
732
- headers?: (HeadersInit & (HeadersInit | {
733
- accept: "application/json" | "text/plain" | "application/octet-stream";
734
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
735
- authorization: "Bearer" | "Basic";
736
- })) | undefined;
737
- redirect?: RequestRedirect | undefined;
738
- credentials?: RequestCredentials;
739
- integrity?: string | undefined;
740
- keepalive?: boolean | undefined;
741
- mode?: RequestMode | undefined;
742
- priority?: RequestPriority | undefined;
743
- referrer?: string | undefined;
744
- referrerPolicy?: ReferrerPolicy | undefined;
745
- signal?: (AbortSignal | null) | undefined;
746
- window?: null | undefined;
747
- onRetry?: ((response: better_auth_react0.ResponseContext) => Promise<void> | void) | undefined;
748
- hookOptions?: {
749
- cloneResponse?: boolean;
750
- } | undefined;
751
- timeout?: number | undefined;
752
- customFetchImpl: better_auth_react0.FetchEsque;
753
- baseURL: string;
754
- throw?: boolean | undefined;
755
- auth?: ({
756
- type: "Bearer";
757
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
758
- } | {
759
- type: "Basic";
760
- username: string | (() => string | undefined) | undefined;
761
- password: string | (() => string | undefined) | undefined;
762
- } | {
763
- type: "Custom";
764
- prefix: string | (() => string | undefined) | undefined;
765
- value: string | (() => string | undefined) | undefined;
766
- }) | undefined;
767
- body?: any;
768
- query?: any;
769
- params?: any;
770
- duplex?: "full" | "half" | undefined;
771
- jsonParser: (text: string) => Promise<any> | any;
772
- retry?: better_auth_react0.RetryOptions | undefined;
773
- retryAttempt?: number | undefined;
774
- output?: (better_auth_react0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
775
- errorSchema?: better_auth_react0.StandardSchemaV1 | undefined;
776
- disableValidation?: boolean | undefined;
777
- disableSignal?: boolean | undefined;
778
- }, unknown, unknown, {}>;
779
- $store: {
780
- notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
781
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
782
- atoms: Record<string, better_auth_react0.WritableAtom<any>>;
783
- };
784
- $ERROR_CODES: {
785
- readonly USER_NOT_FOUND: "User not found";
786
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
787
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
788
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
789
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
790
- readonly INVALID_PASSWORD: "Invalid password";
791
- readonly INVALID_EMAIL: "Invalid email";
792
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
793
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
794
- readonly PROVIDER_NOT_FOUND: "Provider not found";
795
- readonly INVALID_TOKEN: "Invalid token";
796
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
797
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
798
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
799
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
800
- readonly PASSWORD_TOO_SHORT: "Password too short";
801
- readonly PASSWORD_TOO_LONG: "Password too long";
802
- readonly USER_ALREADY_EXISTS: "User already exists.";
803
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
804
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
805
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
806
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
807
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
808
- readonly ACCOUNT_NOT_FOUND: "Account not found";
809
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
183
+ email: string;
184
+ password: string;
185
+ callbackURL?: string | undefined;
186
+ rememberMe?: boolean | undefined;
187
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
188
+ email: string;
189
+ password: string;
190
+ callbackURL?: string | undefined;
191
+ rememberMe?: boolean | undefined;
192
+ } & {
193
+ fetchOptions?: FetchOptions | undefined;
194
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
195
+ redirect: boolean;
196
+ token: string;
197
+ url?: string | undefined;
198
+ user: {
199
+ id: string;
200
+ createdAt: Date;
201
+ updatedAt: Date;
202
+ email: string;
203
+ emailVerified: boolean;
204
+ name: string;
205
+ image?: string | null | undefined | undefined;
206
+ };
207
+ }, {
208
+ code?: string | undefined;
209
+ message?: string | undefined;
210
+ }, FetchOptions["throw"] extends true ? true : false>>;
810
211
  };
811
- };
812
- declare function useQueryClient(): _tanstack_react_query0.QueryClient;
813
- declare function createKuckitWebProvider(options: CreateKuckitWebProviderOptions): ComponentType<{
814
- children?: ReactNode;
815
- }>;
816
- declare function withKuckitWeb<P extends object>(Component: ComponentType<P>, options: CreateKuckitWebProviderOptions): ComponentType<P>;
817
- //#endregion
818
- //#region src/services.d.ts
819
- interface CreateServicesOptions {
820
- serverUrl?: string;
821
- onQueryError?: (error: Error) => void;
822
- }
823
- declare function createQueryClient(onError?: (error: Error) => void): QueryClient;
824
- declare function createRPCLink(serverUrl: string): RPCLink<_orpc_client0.ClientContext>;
825
- declare function createRPCClient(link: ReturnType<typeof createRPCLink>): AppRouterClient;
826
- declare function createORPCUtils(client: AppRouterClient): ORPCUtils;
827
- declare function createAuthClientService(serverUrl: string): {
828
- signOut: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
829
- query?: Record<string, any> | undefined;
830
- fetchOptions?: FetchOptions | undefined;
831
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
832
- success: boolean;
833
- }, {
834
- code?: string | undefined;
835
- message?: string | undefined;
836
- }, FetchOptions["throw"] extends true ? true : false>>;
837
212
  } & {
838
213
  resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
839
214
  newPassword: string;
@@ -923,6 +298,20 @@ declare function createAuthClientService(serverUrl: string): {
923
298
  code?: string | undefined;
924
299
  message?: string | undefined;
925
300
  }, FetchOptions["throw"] extends true ? true : false>>;
301
+ } & {
302
+ updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<Partial<{}> & {
303
+ name?: string | undefined;
304
+ image?: string | undefined | null;
305
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
306
+ image?: (string | null) | undefined;
307
+ name?: string | undefined;
308
+ fetchOptions?: FetchOptions | undefined;
309
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
310
+ status: boolean;
311
+ }, {
312
+ code?: string | undefined;
313
+ message?: string | undefined;
314
+ }, FetchOptions["throw"] extends true ? true : false>>;
926
315
  } & {
927
316
  deleteUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
928
317
  callbackURL?: string | undefined;
@@ -973,6 +362,23 @@ declare function createAuthClientService(serverUrl: string): {
973
362
  message?: string | undefined;
974
363
  }, FetchOptions["throw"] extends true ? true : false>>;
975
364
  };
365
+ } & {
366
+ listSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
367
+ query?: Record<string, any> | undefined;
368
+ fetchOptions?: FetchOptions | undefined;
369
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth0.Prettify<{
370
+ id: string;
371
+ createdAt: Date;
372
+ updatedAt: Date;
373
+ userId: string;
374
+ expiresAt: Date;
375
+ token: string;
376
+ ipAddress?: string | null | undefined | undefined;
377
+ userAgent?: string | null | undefined | undefined;
378
+ }>[], {
379
+ code?: string | undefined;
380
+ message?: string | undefined;
381
+ }, FetchOptions["throw"] extends true ? true : false>>;
976
382
  } & {
977
383
  revokeSession: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
978
384
  token: string;
@@ -1155,171 +561,6 @@ declare function createAuthClientService(serverUrl: string): {
1155
561
  code?: string | undefined;
1156
562
  message?: string | undefined;
1157
563
  }, FetchOptions["throw"] extends true ? true : false>>;
1158
- } & {
1159
- signIn: {
1160
- social: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1161
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
1162
- callbackURL?: string | undefined;
1163
- newUserCallbackURL?: string | undefined;
1164
- errorCallbackURL?: string | undefined;
1165
- disableRedirect?: boolean | undefined;
1166
- idToken?: {
1167
- token: string;
1168
- nonce?: string | undefined;
1169
- accessToken?: string | undefined;
1170
- refreshToken?: string | undefined;
1171
- expiresAt?: number | undefined;
1172
- } | undefined;
1173
- scopes?: string[] | undefined;
1174
- requestSignUp?: boolean | undefined;
1175
- loginHint?: string | undefined;
1176
- additionalData?: Record<string, any> | undefined;
1177
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1178
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
1179
- callbackURL?: string | undefined;
1180
- newUserCallbackURL?: string | undefined;
1181
- errorCallbackURL?: string | undefined;
1182
- disableRedirect?: boolean | undefined;
1183
- idToken?: {
1184
- token: string;
1185
- nonce?: string | undefined;
1186
- accessToken?: string | undefined;
1187
- refreshToken?: string | undefined;
1188
- expiresAt?: number | undefined;
1189
- } | undefined;
1190
- scopes?: string[] | undefined;
1191
- requestSignUp?: boolean | undefined;
1192
- loginHint?: string | undefined;
1193
- additionalData?: Record<string, any> | undefined;
1194
- } & {
1195
- fetchOptions?: FetchOptions | undefined;
1196
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
1197
- redirect: boolean;
1198
- url: string;
1199
- } | {
1200
- redirect: boolean;
1201
- token: string;
1202
- url: undefined;
1203
- user: {
1204
- id: string;
1205
- createdAt: Date;
1206
- updatedAt: Date;
1207
- email: string;
1208
- emailVerified: boolean;
1209
- name: string;
1210
- image?: string | null | undefined | undefined;
1211
- };
1212
- }>, {
1213
- code?: string | undefined;
1214
- message?: string | undefined;
1215
- }, FetchOptions["throw"] extends true ? true : false>>;
1216
- };
1217
- } & {
1218
- signUp: {
1219
- email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1220
- name: string;
1221
- email: string;
1222
- password: string;
1223
- image?: string | undefined;
1224
- callbackURL?: string | undefined;
1225
- rememberMe?: boolean | undefined;
1226
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1227
- email: string;
1228
- name: string;
1229
- password: string;
1230
- image?: string | undefined;
1231
- callbackURL?: string | undefined;
1232
- fetchOptions?: FetchOptions | undefined;
1233
- } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
1234
- token: null;
1235
- user: {
1236
- id: string;
1237
- createdAt: Date;
1238
- updatedAt: Date;
1239
- email: string;
1240
- emailVerified: boolean;
1241
- name: string;
1242
- image?: string | null | undefined | undefined;
1243
- };
1244
- } | {
1245
- token: string;
1246
- user: {
1247
- id: string;
1248
- createdAt: Date;
1249
- updatedAt: Date;
1250
- email: string;
1251
- emailVerified: boolean;
1252
- name: string;
1253
- image?: string | null | undefined | undefined;
1254
- };
1255
- }>, {
1256
- code?: string | undefined;
1257
- message?: string | undefined;
1258
- }, FetchOptions["throw"] extends true ? true : false>>;
1259
- };
1260
- } & {
1261
- signIn: {
1262
- email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1263
- email: string;
1264
- password: string;
1265
- callbackURL?: string | undefined;
1266
- rememberMe?: boolean | undefined;
1267
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1268
- email: string;
1269
- password: string;
1270
- callbackURL?: string | undefined;
1271
- rememberMe?: boolean | undefined;
1272
- } & {
1273
- fetchOptions?: FetchOptions | undefined;
1274
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1275
- redirect: boolean;
1276
- token: string;
1277
- url?: string | undefined;
1278
- user: {
1279
- id: string;
1280
- createdAt: Date;
1281
- updatedAt: Date;
1282
- email: string;
1283
- emailVerified: boolean;
1284
- name: string;
1285
- image?: string | null | undefined | undefined;
1286
- };
1287
- }, {
1288
- code?: string | undefined;
1289
- message?: string | undefined;
1290
- }, FetchOptions["throw"] extends true ? true : false>>;
1291
- };
1292
- } & {
1293
- updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<Partial<{}> & {
1294
- name?: string | undefined;
1295
- image?: string | undefined | null;
1296
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1297
- image?: (string | null) | undefined;
1298
- name?: string | undefined;
1299
- fetchOptions?: FetchOptions | undefined;
1300
- } & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1301
- status: boolean;
1302
- }, {
1303
- code?: string | undefined;
1304
- message?: string | undefined;
1305
- }, FetchOptions["throw"] extends true ? true : false>>;
1306
- } & {
1307
- listSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1308
- query?: Record<string, any> | undefined;
1309
- fetchOptions?: FetchOptions | undefined;
1310
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth0.Prettify<{
1311
- id: string;
1312
- createdAt: Date;
1313
- updatedAt: Date;
1314
- userId: string;
1315
- expiresAt: Date;
1316
- token: string;
1317
- ipAddress?: string | null | undefined | undefined;
1318
- userAgent?: string | null | undefined | undefined;
1319
- }>[], {
1320
- code?: string | undefined;
1321
- message?: string | undefined;
1322
- }, FetchOptions["throw"] extends true ? true : false>>;
1323
564
  } & {
1324
565
  getSession: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1325
566
  disableCookieCache?: unknown;
@@ -1506,6 +747,22 @@ declare function createAuthClientService(serverUrl: string): {
1506
747
  readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
1507
748
  };
1508
749
  };
750
+ declare function useQueryClient(): _tanstack_react_query0.QueryClient;
751
+ declare function createKuckitWebProvider(options: CreateKuckitWebProviderOptions): ComponentType<{
752
+ children?: ReactNode;
753
+ }>;
754
+ declare function withKuckitWeb<P extends object>(Component: ComponentType<P>, options: CreateKuckitWebProviderOptions): ComponentType<P>;
755
+ //#endregion
756
+ //#region src/services.d.ts
757
+ interface CreateServicesOptions {
758
+ serverUrl?: string;
759
+ onQueryError?: (error: Error) => void;
760
+ }
761
+ declare function createQueryClient(onError?: (error: Error) => void): QueryClient;
762
+ declare function createRPCLink(serverUrl: string): RPCLink<_orpc_client0.ClientContext>;
763
+ declare function createRPCClient(link: ReturnType<typeof createRPCLink>): AppRouterClient$1;
764
+ declare function createORPCUtils(client: AppRouterClient$1): ORPCUtils;
765
+ declare function createAuthClientService(serverUrl: string): any;
1509
766
  declare function createKuckitWebServices(options?: CreateServicesOptions): KuckitWebServices;
1510
767
  //#endregion
1511
768
  export { type AuthClient, type ClientModuleSpec, type CreateKuckitWebProviderOptions, type CreateServicesOptions, type KuckitWebConfig, type KuckitWebContext, type KuckitWebProviderProps, type KuckitWebRouterProps, type KuckitWebServices, type ModuleRoute, type NavItem, type ORPCUtils, type RouteDefinition, createAuthClientService, createKuckitWebProvider, createKuckitWebServices, createORPCUtils, createQueryClient, createRPCClient, createRPCLink, useAuth, useKuckitWeb, useOrpc, useQueryClient, useRpc, useServices, withKuckitWeb };
package/package.json CHANGED
@@ -1,49 +1,36 @@
1
1
  {
2
2
  "name": "@kuckit/app-web",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
- "main": "src/index.ts",
6
- "types": "src/index.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./src/index.ts",
13
- "default": "./src/index.ts"
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
14
  },
15
15
  "./*": {
16
- "types": "./src/*.ts",
17
- "default": "./src/*.ts"
18
- }
19
- },
20
- "publishConfig": {
21
- "main": "dist/index.js",
22
- "types": "dist/index.d.ts",
23
- "exports": {
24
- ".": {
25
- "types": "./dist/index.d.ts",
26
- "default": "./dist/index.js"
27
- },
28
- "./*": {
29
- "types": "./dist/*.d.ts",
30
- "default": "./dist/*.js"
31
- }
16
+ "types": "./dist/*.d.ts",
17
+ "default": "./dist/*.js"
32
18
  }
33
19
  },
34
20
  "scripts": {
35
21
  "build": "tsdown",
36
- "check-types": "tsc -b"
22
+ "check-types": "tsc -b",
23
+ "prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
37
24
  },
38
25
  "dependencies": {
39
- "@kuckit/sdk-react": "workspace:*",
40
- "@kuckit/api": "workspace:*",
41
- "@kuckit/auth": "workspace:*",
26
+ "@kuckit/sdk-react": "^2.0.2",
27
+ "@kuckit/api": "^2.0.2",
28
+ "@kuckit/auth": "^2.0.2",
42
29
  "@tanstack/react-query": "^5.85.5",
43
30
  "@tanstack/react-router": "^1.114.25",
44
- "@orpc/client": "catalog:",
31
+ "@orpc/client": "^1.10.0",
45
32
  "@orpc/tanstack-query": "^1.10.0",
46
- "better-auth": "catalog:",
33
+ "better-auth": "^1.3.28",
47
34
  "react": "19.1.0"
48
35
  },
49
36
  "devDependencies": {
package/src/index.ts DELETED
@@ -1,38 +0,0 @@
1
- // Provider and HOC
2
- export {
3
- createKuckitWebProvider,
4
- withKuckitWeb,
5
- useKuckitWeb,
6
- useServices,
7
- useRpc,
8
- useOrpc,
9
- useAuth,
10
- useQueryClient,
11
- } from './provider'
12
-
13
- // Service factories (for custom setup)
14
- export {
15
- createKuckitWebServices,
16
- createQueryClient,
17
- createRPCLink,
18
- createRPCClient,
19
- createORPCUtils,
20
- createAuthClientService,
21
- type CreateServicesOptions,
22
- } from './services'
23
-
24
- // Types
25
- export type {
26
- KuckitWebConfig,
27
- KuckitWebContext,
28
- KuckitWebServices,
29
- KuckitWebProviderProps,
30
- KuckitWebRouterProps,
31
- CreateKuckitWebProviderOptions,
32
- ORPCUtils,
33
- AuthClient,
34
- ModuleRoute,
35
- } from './types'
36
-
37
- // Re-export commonly used types from sdk-react for convenience
38
- export type { ClientModuleSpec, RouteDefinition, NavItem } from '@kuckit/sdk-react'