wcz-test 6.9.2 → 6.9.4

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 (116) hide show
  1. package/dist/DialogsHooks-Bi8dZoyu.js +338 -0
  2. package/dist/DialogsHooks-Bi8dZoyu.js.map +1 -0
  3. package/dist/{RouterListItemButton-Cx7rXEfm.js → RouterListItemButton-CHS7rofI.js} +4 -4
  4. package/dist/{RouterListItemButton-Cx7rXEfm.js.map → RouterListItemButton-CHS7rofI.js.map} +1 -1
  5. package/dist/auth-client-B6cIXYDV.js +1417 -0
  6. package/dist/auth-client-B6cIXYDV.js.map +1 -0
  7. package/dist/client.d.ts +725 -0
  8. package/dist/client.js +1 -1
  9. package/dist/components.d.ts +134 -0
  10. package/dist/components.js +65 -66
  11. package/dist/components.js.map +1 -1
  12. package/dist/error-BhAKg8LX-X0sdNXNa.js +195 -0
  13. package/dist/error-BhAKg8LX-X0sdNXNa.js.map +1 -0
  14. package/dist/hooks.d.ts +192 -0
  15. package/dist/hooks.js +31 -31
  16. package/dist/hooks.js.map +1 -1
  17. package/dist/index.d.ts +74 -0
  18. package/dist/index.js +83 -84
  19. package/dist/index.js.map +1 -1
  20. package/dist/models.d.ts +476 -0
  21. package/dist/queries.d.ts +1956 -0
  22. package/dist/server-mxQ3s5dx-CC81W42s.js +644 -0
  23. package/dist/server-mxQ3s5dx-CC81W42s.js.map +1 -0
  24. package/dist/server.d.ts +41 -0
  25. package/dist/server.js +8659 -7
  26. package/dist/server.js.map +1 -1
  27. package/dist/utils.d.ts +11 -0
  28. package/dist/vite.d.ts +5 -0
  29. package/package.json +29 -29
  30. package/dist/DialogsHooks-BlUsVlfv.js +0 -39
  31. package/dist/DialogsHooks-BlUsVlfv.js.map +0 -1
  32. package/dist/auth-client-o9U0_qmf.js +0 -79
  33. package/dist/auth-client-o9U0_qmf.js.map +0 -1
  34. package/dist/components/core/AppTitle.d.ts +0 -2
  35. package/dist/components/core/Fullscreen.d.ts +0 -3
  36. package/dist/components/core/Layout.d.ts +0 -8
  37. package/dist/components/core/ToolbarAccount.d.ts +0 -2
  38. package/dist/components/core/TypographyWithIcon.d.ts +0 -7
  39. package/dist/components/core/navigation/NavigationList.d.ts +0 -22
  40. package/dist/components/core/navigation/NavigationListItem.d.ts +0 -16
  41. package/dist/components/core/navigation/NavigationRail.d.ts +0 -12
  42. package/dist/components/data-grid/ChipInputCell.d.ts +0 -9
  43. package/dist/components/data-grid/EditableColumnHeader.d.ts +0 -2
  44. package/dist/components/file/Dropzone.d.ts +0 -8
  45. package/dist/components/file/FileViewer.d.ts +0 -20
  46. package/dist/components/file/fileViewer/FileViewerGrid.d.ts +0 -17
  47. package/dist/components/file/fileViewer/FileViewerList.d.ts +0 -12
  48. package/dist/components/file/fileViewer/ImageViewer.d.ts +0 -6
  49. package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +0 -15
  50. package/dist/components/form/FormAutocomplete.d.ts +0 -7
  51. package/dist/components/form/FormCheckbox.d.ts +0 -7
  52. package/dist/components/form/FormDatePicker.d.ts +0 -8
  53. package/dist/components/form/FormDateRangePicker.d.ts +0 -8
  54. package/dist/components/form/FormDateTimePicker.d.ts +0 -8
  55. package/dist/components/form/FormDateTimeRangePicker.d.ts +0 -8
  56. package/dist/components/form/FormNumberField.d.ts +0 -9
  57. package/dist/components/form/FormRadioGroup.d.ts +0 -13
  58. package/dist/components/form/FormSlider.d.ts +0 -7
  59. package/dist/components/form/FormSubmitButton.d.ts +0 -4
  60. package/dist/components/form/FormSwitch.d.ts +0 -7
  61. package/dist/components/form/FormTextField.d.ts +0 -7
  62. package/dist/components/form/FormTimePicker.d.ts +0 -8
  63. package/dist/components/form/FormTimeRangePicker.d.ts +0 -8
  64. package/dist/components/router/RouterButton.d.ts +0 -6
  65. package/dist/components/router/RouterError.d.ts +0 -7
  66. package/dist/components/router/RouterGridActionsCellItem.d.ts +0 -6
  67. package/dist/components/router/RouterIconButton.d.ts +0 -6
  68. package/dist/components/router/RouterLink.d.ts +0 -6
  69. package/dist/components/router/RouterListItemButton.d.ts +0 -6
  70. package/dist/components/router/RouterNotFound.d.ts +0 -1
  71. package/dist/components/router/RouterTab.d.ts +0 -6
  72. package/dist/contexts/DialogsContext.d.ts +0 -6
  73. package/dist/contexts/FileContext.d.ts +0 -13
  74. package/dist/env.d.ts +0 -10
  75. package/dist/exports/client.d.ts +0 -5
  76. package/dist/exports/components.d.ts +0 -14
  77. package/dist/exports/hooks.d.ts +0 -4
  78. package/dist/exports/index.d.ts +0 -3
  79. package/dist/exports/models.d.ts +0 -25
  80. package/dist/exports/queries.d.ts +0 -4
  81. package/dist/exports/server.d.ts +0 -3
  82. package/dist/exports/utils.d.ts +0 -3
  83. package/dist/exports/vite.d.ts +0 -1
  84. package/dist/hooks/DialogsHooks.d.ts +0 -42
  85. package/dist/hooks/FormHooks.d.ts +0 -52
  86. package/dist/hooks/ThemeHook.d.ts +0 -4
  87. package/dist/lib/auth/auth-client.d.ts +0 -688
  88. package/dist/lib/auth/auth.d.ts +0 -24
  89. package/dist/lib/db/index.d.ts +0 -4
  90. package/dist/lib/db/schemas/auth.d.ts +0 -606
  91. package/dist/lib/utils.d.ts +0 -50
  92. package/dist/lib/vite-plugin.d.ts +0 -2
  93. package/dist/models/Navigation.d.ts +0 -18
  94. package/dist/models/User.d.ts +0 -8
  95. package/dist/models/approval/Approval.d.ts +0 -177
  96. package/dist/models/approval/ApprovalEmployee.d.ts +0 -7
  97. package/dist/models/approval/ApprovalFlow.d.ts +0 -49
  98. package/dist/models/approval/ApprovalFlowStep.d.ts +0 -29
  99. package/dist/models/approval/ApprovalRequestType.d.ts +0 -5
  100. package/dist/models/approval/ApprovalStatus.d.ts +0 -9
  101. package/dist/models/approval/ApprovalStepResult.d.ts +0 -11
  102. package/dist/models/approval/StepApprovalOrder.d.ts +0 -6
  103. package/dist/models/email/Email.d.ts +0 -13
  104. package/dist/models/email/EmailAttachment.d.ts +0 -6
  105. package/dist/models/file/FileActions.d.ts +0 -6
  106. package/dist/models/file/FileMeta.d.ts +0 -15
  107. package/dist/models/peoplesoft/Department.d.ts +0 -58
  108. package/dist/models/peoplesoft/Employee.d.ts +0 -46
  109. package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +0 -6
  110. package/dist/models/peoplesoft/EmployeeStatus.d.ts +0 -6
  111. package/dist/providers/DialogsProvider.d.ts +0 -6
  112. package/dist/providers/LayoutProvider.d.ts +0 -11
  113. package/dist/queries/Approval.d.ts +0 -585
  114. package/dist/queries/ApprovalHooks.d.ts +0 -315
  115. package/dist/queries/FileHooks.d.ts +0 -151
  116. package/dist/queries/PeopleSoftHooks.d.ts +0 -537
@@ -0,0 +1,725 @@
1
+ import { BetterFetch } from '@better-fetch/fetch';
2
+ import { BetterFetchError } from '@better-fetch/fetch';
3
+ import { BetterFetchPlugin } from '@better-fetch/fetch';
4
+ import { BetterFetchResponse } from '@better-fetch/fetch';
5
+ import { ClientFetchOption } from 'better-auth';
6
+ import { ErrorContext } from '@better-fetch/fetch';
7
+ import { FetchEsque } from '@better-fetch/fetch';
8
+ import { OAuth2UserInfo } from 'better-auth';
9
+ import { RequestContext } from '@better-fetch/fetch';
10
+ import { ResponseContext } from '@better-fetch/fetch';
11
+ import { RetryOptions } from '@better-fetch/fetch';
12
+ import { SessionQueryParams } from 'better-auth';
13
+ import { StandardSchemaV1 } from '@better-fetch/fetch';
14
+ import { SuccessContext } from '@better-fetch/fetch';
15
+ import { t } from 'i18next';
16
+ import { u } from 'node_modules/better-auth/dist/helper-DU33OcfW.d.mts';
17
+ import { useTranslation } from 'react-i18next';
18
+ import { WritableAtom } from 'nanostores';
19
+
20
+ export declare const authClient: {
21
+ signIn: {
22
+ social: <FetchOptions extends ClientFetchOption<Partial<{
23
+ provider: unknown;
24
+ callbackURL?: string | undefined;
25
+ newUserCallbackURL?: string | undefined;
26
+ errorCallbackURL?: string | undefined;
27
+ disableRedirect?: boolean | undefined;
28
+ idToken?: {
29
+ token: string;
30
+ nonce?: string | undefined;
31
+ accessToken?: string | undefined;
32
+ refreshToken?: string | undefined;
33
+ expiresAt?: number | undefined;
34
+ } | undefined;
35
+ scopes?: string[] | undefined;
36
+ requestSignUp?: boolean | undefined;
37
+ loginHint?: string | undefined;
38
+ additionalData?: Record<string, any> | undefined;
39
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
40
+ provider: unknown;
41
+ callbackURL?: string | undefined;
42
+ newUserCallbackURL?: string | undefined;
43
+ errorCallbackURL?: string | undefined;
44
+ disableRedirect?: boolean | undefined;
45
+ idToken?: {
46
+ token: string;
47
+ nonce?: string | undefined;
48
+ accessToken?: string | undefined;
49
+ refreshToken?: string | undefined;
50
+ expiresAt?: number | undefined;
51
+ } | undefined;
52
+ scopes?: string[] | undefined;
53
+ requestSignUp?: boolean | undefined;
54
+ loginHint?: string | undefined;
55
+ additionalData?: Record<string, any> | undefined;
56
+ } & {
57
+ fetchOptions?: FetchOptions | undefined;
58
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
59
+ redirect: boolean;
60
+ token: string;
61
+ url: undefined;
62
+ user: {
63
+ id: string;
64
+ email: string;
65
+ name: string;
66
+ image: string | null | undefined;
67
+ emailVerified: boolean;
68
+ createdAt: Date;
69
+ updatedAt: Date;
70
+ };
71
+ } | {
72
+ url: string;
73
+ redirect: boolean;
74
+ }>, {
75
+ code?: string | undefined;
76
+ message?: string | undefined;
77
+ }, FetchOptions["throw"] extends true ? true : false>>;
78
+ };
79
+ } & {
80
+ signOut: <FetchOptions extends ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
81
+ query?: Record<string, any> | undefined;
82
+ fetchOptions?: FetchOptions | undefined;
83
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
84
+ success: boolean;
85
+ }, {
86
+ code?: string | undefined;
87
+ message?: string | undefined;
88
+ }, FetchOptions["throw"] extends true ? true : false>>;
89
+ } & {
90
+ signUp: {
91
+ email: <FetchOptions extends ClientFetchOption<Partial<{
92
+ name: string;
93
+ email: string;
94
+ password: string;
95
+ image?: string | undefined;
96
+ callbackURL?: string | undefined;
97
+ rememberMe?: boolean | undefined;
98
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
99
+ email: string;
100
+ name: string;
101
+ password: string;
102
+ image?: string | undefined;
103
+ callbackURL?: string | undefined;
104
+ fetchOptions?: FetchOptions | undefined;
105
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
106
+ token: null;
107
+ user: {
108
+ id: string;
109
+ email: string;
110
+ name: string;
111
+ image: string | null | undefined;
112
+ emailVerified: boolean;
113
+ createdAt: Date;
114
+ updatedAt: Date;
115
+ };
116
+ } | {
117
+ token: string;
118
+ user: {
119
+ id: string;
120
+ email: string;
121
+ name: string;
122
+ image: string | null | undefined;
123
+ emailVerified: boolean;
124
+ createdAt: Date;
125
+ updatedAt: Date;
126
+ };
127
+ }>, {
128
+ code?: string | undefined;
129
+ message?: string | undefined;
130
+ }, FetchOptions["throw"] extends true ? true : false>>;
131
+ };
132
+ } & {
133
+ signIn: {
134
+ email: <FetchOptions extends ClientFetchOption<Partial<{
135
+ email: string;
136
+ password: string;
137
+ callbackURL?: string | undefined;
138
+ rememberMe?: boolean | undefined;
139
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
140
+ email: string;
141
+ password: string;
142
+ callbackURL?: string | undefined;
143
+ rememberMe?: boolean | undefined;
144
+ } & {
145
+ fetchOptions?: FetchOptions | undefined;
146
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
147
+ redirect: boolean;
148
+ token: string;
149
+ url: string | undefined;
150
+ user: {
151
+ id: string;
152
+ email: string;
153
+ name: string;
154
+ image: string | null | undefined;
155
+ emailVerified: boolean;
156
+ createdAt: Date;
157
+ updatedAt: Date;
158
+ };
159
+ }, {
160
+ code?: string | undefined;
161
+ message?: string | undefined;
162
+ }, FetchOptions["throw"] extends true ? true : false>>;
163
+ };
164
+ } & {
165
+ resetPassword: <FetchOptions extends ClientFetchOption<Partial<{
166
+ newPassword: string;
167
+ token?: string | undefined;
168
+ }> & Record<string, any>, Partial<{
169
+ token?: string | undefined;
170
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
171
+ newPassword: string;
172
+ token?: string | undefined;
173
+ } & {
174
+ fetchOptions?: FetchOptions | undefined;
175
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
176
+ status: boolean;
177
+ }, {
178
+ code?: string | undefined;
179
+ message?: string | undefined;
180
+ }, FetchOptions["throw"] extends true ? true : false>>;
181
+ } & {
182
+ verifyEmail: <FetchOptions extends ClientFetchOption<never, Partial<{
183
+ token: string;
184
+ callbackURL?: string | undefined;
185
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
186
+ query: {
187
+ token: string;
188
+ callbackURL?: string | undefined;
189
+ };
190
+ fetchOptions?: FetchOptions | undefined;
191
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<void | {
192
+ status: boolean;
193
+ }>, {
194
+ code?: string | undefined;
195
+ message?: string | undefined;
196
+ }, FetchOptions["throw"] extends true ? true : false>>;
197
+ } & {
198
+ sendVerificationEmail: <FetchOptions extends ClientFetchOption<Partial<{
199
+ email: string;
200
+ callbackURL?: string | undefined;
201
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
202
+ email: string;
203
+ callbackURL?: string | undefined;
204
+ } & {
205
+ fetchOptions?: FetchOptions | undefined;
206
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
207
+ status: boolean;
208
+ }, {
209
+ code?: string | undefined;
210
+ message?: string | undefined;
211
+ }, FetchOptions["throw"] extends true ? true : false>>;
212
+ } & {
213
+ changeEmail: <FetchOptions extends ClientFetchOption<Partial<{
214
+ newEmail: string;
215
+ callbackURL?: string | undefined;
216
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
217
+ newEmail: string;
218
+ callbackURL?: string | undefined;
219
+ } & {
220
+ fetchOptions?: FetchOptions | undefined;
221
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
222
+ status: boolean;
223
+ }, {
224
+ code?: string | undefined;
225
+ message?: string | undefined;
226
+ }, FetchOptions["throw"] extends true ? true : false>>;
227
+ } & {
228
+ changePassword: <FetchOptions extends ClientFetchOption<Partial<{
229
+ newPassword: string;
230
+ currentPassword: string;
231
+ revokeOtherSessions?: boolean | undefined;
232
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
233
+ newPassword: string;
234
+ currentPassword: string;
235
+ revokeOtherSessions?: boolean | undefined;
236
+ } & {
237
+ fetchOptions?: FetchOptions | undefined;
238
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
239
+ token: string | null;
240
+ user: {
241
+ id: string;
242
+ email: string;
243
+ name: string;
244
+ image: string | null | undefined;
245
+ emailVerified: boolean;
246
+ createdAt: Date;
247
+ updatedAt: Date;
248
+ };
249
+ }, {
250
+ code?: string | undefined;
251
+ message?: string | undefined;
252
+ }, FetchOptions["throw"] extends true ? true : false>>;
253
+ } & {
254
+ updateUser: <FetchOptions extends ClientFetchOption<Partial<Partial<{}> & {
255
+ name?: string | undefined;
256
+ image?: string | undefined;
257
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
258
+ image?: (string | null) | undefined;
259
+ name?: string | undefined;
260
+ fetchOptions?: FetchOptions | undefined;
261
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
262
+ status: boolean;
263
+ }, {
264
+ code?: string | undefined;
265
+ message?: string | undefined;
266
+ }, FetchOptions["throw"] extends true ? true : false>>;
267
+ } & {
268
+ deleteUser: <FetchOptions extends ClientFetchOption<Partial<{
269
+ callbackURL?: string | undefined;
270
+ password?: string | undefined;
271
+ token?: string | undefined;
272
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
273
+ callbackURL?: string | undefined;
274
+ password?: string | undefined;
275
+ token?: string | undefined;
276
+ } & {
277
+ fetchOptions?: FetchOptions | undefined;
278
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
279
+ success: boolean;
280
+ message: string;
281
+ }, {
282
+ code?: string | undefined;
283
+ message?: string | undefined;
284
+ }, FetchOptions["throw"] extends true ? true : false>>;
285
+ } & {
286
+ requestPasswordReset: <FetchOptions extends ClientFetchOption<Partial<{
287
+ email: string;
288
+ redirectTo?: string | undefined;
289
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
290
+ email: string;
291
+ redirectTo?: string | undefined;
292
+ } & {
293
+ fetchOptions?: FetchOptions | undefined;
294
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
295
+ status: boolean;
296
+ message: string;
297
+ }, {
298
+ code?: string | undefined;
299
+ message?: string | undefined;
300
+ }, FetchOptions["throw"] extends true ? true : false>>;
301
+ } & {
302
+ resetPassword: {
303
+ ":token": <FetchOptions extends ClientFetchOption<never, Partial<{
304
+ callbackURL: string;
305
+ }> & Record<string, any>, {
306
+ token: string;
307
+ }>>(data_0: u< {
308
+ query: {
309
+ callbackURL: string;
310
+ };
311
+ fetchOptions?: FetchOptions | undefined;
312
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<never, {
313
+ code?: string | undefined;
314
+ message?: string | undefined;
315
+ }, FetchOptions["throw"] extends true ? true : false>>;
316
+ };
317
+ } & {
318
+ listSessions: <FetchOptions extends ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
319
+ query?: Record<string, any> | undefined;
320
+ fetchOptions?: FetchOptions | undefined;
321
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<u< {
322
+ id: string;
323
+ createdAt: Date;
324
+ updatedAt: Date;
325
+ userId: string;
326
+ expiresAt: Date;
327
+ token: string;
328
+ ipAddress?: string | null | undefined | undefined;
329
+ userAgent?: string | null | undefined | undefined;
330
+ }>[], {
331
+ code?: string | undefined;
332
+ message?: string | undefined;
333
+ }, FetchOptions["throw"] extends true ? true : false>>;
334
+ } & {
335
+ revokeSession: <FetchOptions extends ClientFetchOption<Partial<{
336
+ token: string;
337
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
338
+ token: string;
339
+ } & {
340
+ fetchOptions?: FetchOptions | undefined;
341
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
342
+ status: boolean;
343
+ }, {
344
+ code?: string | undefined;
345
+ message?: string | undefined;
346
+ }, FetchOptions["throw"] extends true ? true : false>>;
347
+ } & {
348
+ revokeSessions: <FetchOptions extends ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
349
+ query?: Record<string, any> | undefined;
350
+ fetchOptions?: FetchOptions | undefined;
351
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
352
+ status: boolean;
353
+ }, {
354
+ code?: string | undefined;
355
+ message?: string | undefined;
356
+ }, FetchOptions["throw"] extends true ? true : false>>;
357
+ } & {
358
+ revokeOtherSessions: <FetchOptions extends ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
359
+ query?: Record<string, any> | undefined;
360
+ fetchOptions?: FetchOptions | undefined;
361
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
362
+ status: boolean;
363
+ }, {
364
+ code?: string | undefined;
365
+ message?: string | undefined;
366
+ }, FetchOptions["throw"] extends true ? true : false>>;
367
+ } & {
368
+ linkSocial: <FetchOptions extends ClientFetchOption<Partial<{
369
+ provider: unknown;
370
+ callbackURL?: string | undefined;
371
+ idToken?: {
372
+ token: string;
373
+ nonce?: string | undefined;
374
+ accessToken?: string | undefined;
375
+ refreshToken?: string | undefined;
376
+ scopes?: string[] | undefined;
377
+ } | undefined;
378
+ requestSignUp?: boolean | undefined;
379
+ scopes?: string[] | undefined;
380
+ errorCallbackURL?: string | undefined;
381
+ disableRedirect?: boolean | undefined;
382
+ additionalData?: Record<string, any> | undefined;
383
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
384
+ provider: unknown;
385
+ callbackURL?: string | undefined;
386
+ idToken?: {
387
+ token: string;
388
+ nonce?: string | undefined;
389
+ accessToken?: string | undefined;
390
+ refreshToken?: string | undefined;
391
+ scopes?: string[] | undefined;
392
+ } | undefined;
393
+ requestSignUp?: boolean | undefined;
394
+ scopes?: string[] | undefined;
395
+ errorCallbackURL?: string | undefined;
396
+ disableRedirect?: boolean | undefined;
397
+ additionalData?: Record<string, any> | undefined;
398
+ } & {
399
+ fetchOptions?: FetchOptions | undefined;
400
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
401
+ url: string;
402
+ redirect: boolean;
403
+ }, {
404
+ code?: string | undefined;
405
+ message?: string | undefined;
406
+ }, FetchOptions["throw"] extends true ? true : false>>;
407
+ } & {
408
+ listAccounts: <FetchOptions extends ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
409
+ query?: Record<string, any> | undefined;
410
+ fetchOptions?: FetchOptions | undefined;
411
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
412
+ id: string;
413
+ providerId: string;
414
+ createdAt: Date;
415
+ updatedAt: Date;
416
+ accountId: string;
417
+ userId: string;
418
+ scopes: string[];
419
+ }[], {
420
+ code?: string | undefined;
421
+ message?: string | undefined;
422
+ }, FetchOptions["throw"] extends true ? true : false>>;
423
+ } & {
424
+ deleteUser: {
425
+ callback: <FetchOptions extends ClientFetchOption<never, Partial<{
426
+ token: string;
427
+ callbackURL?: string | undefined;
428
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
429
+ query: {
430
+ token: string;
431
+ callbackURL?: string | undefined;
432
+ };
433
+ fetchOptions?: FetchOptions | undefined;
434
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
435
+ success: boolean;
436
+ message: string;
437
+ }, {
438
+ code?: string | undefined;
439
+ message?: string | undefined;
440
+ }, FetchOptions["throw"] extends true ? true : false>>;
441
+ };
442
+ } & {
443
+ unlinkAccount: <FetchOptions extends ClientFetchOption<Partial<{
444
+ providerId: string;
445
+ accountId?: string | undefined;
446
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
447
+ providerId: string;
448
+ accountId?: string | undefined;
449
+ } & {
450
+ fetchOptions?: FetchOptions | undefined;
451
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
452
+ status: boolean;
453
+ }, {
454
+ code?: string | undefined;
455
+ message?: string | undefined;
456
+ }, FetchOptions["throw"] extends true ? true : false>>;
457
+ } & {
458
+ refreshToken: <FetchOptions extends ClientFetchOption<Partial<{
459
+ providerId: string;
460
+ accountId?: string | undefined;
461
+ userId?: string | undefined;
462
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
463
+ providerId: string;
464
+ accountId?: string | undefined;
465
+ userId?: string | undefined;
466
+ } & {
467
+ fetchOptions?: FetchOptions | undefined;
468
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
469
+ accessToken: string | undefined;
470
+ refreshToken: string | undefined;
471
+ accessTokenExpiresAt: Date | undefined;
472
+ refreshTokenExpiresAt: Date | undefined;
473
+ scope: string | null | undefined;
474
+ idToken: string | null | undefined;
475
+ providerId: string;
476
+ accountId: string;
477
+ }, {
478
+ code?: string | undefined;
479
+ message?: string | undefined;
480
+ }, FetchOptions["throw"] extends true ? true : false>>;
481
+ } & {
482
+ getAccessToken: <FetchOptions extends ClientFetchOption<Partial<{
483
+ providerId: string;
484
+ accountId?: string | undefined;
485
+ userId?: string | undefined;
486
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: u< {
487
+ providerId: string;
488
+ accountId?: string | undefined;
489
+ userId?: string | undefined;
490
+ } & {
491
+ fetchOptions?: FetchOptions | undefined;
492
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
493
+ accessToken: string;
494
+ accessTokenExpiresAt: Date | undefined;
495
+ scopes: string[];
496
+ idToken: string | undefined;
497
+ }, {
498
+ code?: string | undefined;
499
+ message?: string | undefined;
500
+ }, FetchOptions["throw"] extends true ? true : false>>;
501
+ } & {
502
+ accountInfo: <FetchOptions extends ClientFetchOption<never, Partial<{
503
+ accountId?: string | undefined;
504
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
505
+ query?: {
506
+ accountId?: string | undefined;
507
+ } | undefined;
508
+ fetchOptions?: FetchOptions | undefined;
509
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
510
+ user: OAuth2UserInfo;
511
+ data: Record<string, any>;
512
+ }, {
513
+ code?: string | undefined;
514
+ message?: string | undefined;
515
+ }, FetchOptions["throw"] extends true ? true : false>>;
516
+ } & {
517
+ getSession: <FetchOptions extends ClientFetchOption<never, Partial<{
518
+ disableCookieCache?: unknown;
519
+ disableRefresh?: unknown;
520
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: u< {
521
+ query?: {
522
+ disableCookieCache?: unknown;
523
+ disableRefresh?: unknown;
524
+ } | undefined;
525
+ fetchOptions?: FetchOptions | undefined;
526
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse< {
527
+ user: {
528
+ id: string;
529
+ createdAt: Date;
530
+ updatedAt: Date;
531
+ email: string;
532
+ emailVerified: boolean;
533
+ name: string;
534
+ image?: string | null | undefined;
535
+ };
536
+ session: {
537
+ id: string;
538
+ createdAt: Date;
539
+ updatedAt: Date;
540
+ userId: string;
541
+ expiresAt: Date;
542
+ token: string;
543
+ ipAddress?: string | null | undefined;
544
+ userAgent?: string | null | undefined;
545
+ };
546
+ } | null, {
547
+ code?: string | undefined;
548
+ message?: string | undefined;
549
+ }, FetchOptions["throw"] extends true ? true : false>>;
550
+ } & {
551
+ useSession: () => {
552
+ data: {
553
+ user: {
554
+ id: string;
555
+ createdAt: Date;
556
+ updatedAt: Date;
557
+ email: string;
558
+ emailVerified: boolean;
559
+ name: string;
560
+ image?: string | null | undefined;
561
+ };
562
+ session: {
563
+ id: string;
564
+ createdAt: Date;
565
+ updatedAt: Date;
566
+ userId: string;
567
+ expiresAt: Date;
568
+ token: string;
569
+ ipAddress?: string | null | undefined;
570
+ userAgent?: string | null | undefined;
571
+ };
572
+ } | null;
573
+ isPending: boolean;
574
+ isRefetching: boolean;
575
+ error: BetterFetchError | null;
576
+ refetch: (queryParams?: {
577
+ query?: SessionQueryParams;
578
+ } | undefined) => Promise<void>;
579
+ };
580
+ $Infer: {
581
+ Session: {
582
+ user: {
583
+ id: string;
584
+ createdAt: Date;
585
+ updatedAt: Date;
586
+ email: string;
587
+ emailVerified: boolean;
588
+ name: string;
589
+ image?: string | null | undefined;
590
+ };
591
+ session: {
592
+ id: string;
593
+ createdAt: Date;
594
+ updatedAt: Date;
595
+ userId: string;
596
+ expiresAt: Date;
597
+ token: string;
598
+ ipAddress?: string | null | undefined;
599
+ userAgent?: string | null | undefined;
600
+ };
601
+ };
602
+ };
603
+ $fetch: BetterFetch< {
604
+ plugins: (BetterFetchPlugin | {
605
+ id: string;
606
+ name: string;
607
+ hooks: {
608
+ onSuccess(context: SuccessContext<any>): void;
609
+ };
610
+ } | {
611
+ id: string;
612
+ name: string;
613
+ hooks: {
614
+ onRequest<T extends Record<string, any>>(context: RequestContext<T>): void;
615
+ };
616
+ } | {
617
+ id: string;
618
+ name: string;
619
+ hooks: {
620
+ onSuccess: ((context: SuccessContext<any>) => Promise<void> | void) | undefined;
621
+ onError: ((context: ErrorContext) => Promise<void> | void) | undefined;
622
+ onRequest: (<T extends Record<string, any>>(context: RequestContext<T>) => Promise<RequestContext | void> | RequestContext | void) | undefined;
623
+ onResponse: ((context: ResponseContext) => Promise<Response | void | ResponseContext> | Response | ResponseContext | void) | undefined;
624
+ };
625
+ })[];
626
+ cache?: RequestCache | undefined;
627
+ method: string;
628
+ headers?: (HeadersInit & (HeadersInit | {
629
+ accept: "application/json" | "text/plain" | "application/octet-stream";
630
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
631
+ authorization: "Bearer" | "Basic";
632
+ })) | undefined;
633
+ redirect?: RequestRedirect | undefined;
634
+ credentials?: RequestCredentials;
635
+ integrity?: string | undefined;
636
+ keepalive?: boolean | undefined;
637
+ mode?: RequestMode | undefined;
638
+ priority?: RequestPriority | undefined;
639
+ referrer?: string | undefined;
640
+ referrerPolicy?: ReferrerPolicy | undefined;
641
+ signal?: (AbortSignal | null) | undefined;
642
+ window?: null | undefined;
643
+ onRetry?: ((response: ResponseContext) => Promise<void> | void) | undefined;
644
+ hookOptions?: {
645
+ cloneResponse?: boolean;
646
+ } | undefined;
647
+ timeout?: number | undefined;
648
+ customFetchImpl: FetchEsque;
649
+ baseURL: string;
650
+ throw?: boolean | undefined;
651
+ auth?: ({
652
+ type: "Bearer";
653
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
654
+ } | {
655
+ type: "Basic";
656
+ username: string | (() => string | undefined) | undefined;
657
+ password: string | (() => string | undefined) | undefined;
658
+ } | {
659
+ type: "Custom";
660
+ prefix: string | (() => string | undefined) | undefined;
661
+ value: string | (() => string | undefined) | undefined;
662
+ }) | undefined;
663
+ body?: any;
664
+ query?: any;
665
+ params?: any;
666
+ duplex?: "full" | "half" | undefined;
667
+ jsonParser: (text: string) => Promise<any> | any;
668
+ retry?: RetryOptions | undefined;
669
+ retryAttempt?: number | undefined;
670
+ output?: (StandardSchemaV1 | typeof Blob | typeof File) | undefined;
671
+ errorSchema?: StandardSchemaV1 | undefined;
672
+ disableValidation?: boolean | undefined;
673
+ disableSignal?: boolean | undefined;
674
+ }, unknown, unknown, {}>;
675
+ $store: {
676
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
677
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
678
+ atoms: Record<string, WritableAtom<any>>;
679
+ };
680
+ $ERROR_CODES: {
681
+ readonly USER_NOT_FOUND: "User not found";
682
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
683
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
684
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
685
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
686
+ readonly INVALID_PASSWORD: "Invalid password";
687
+ readonly INVALID_EMAIL: "Invalid email";
688
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
689
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
690
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
691
+ readonly INVALID_TOKEN: "Invalid token";
692
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
693
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
694
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
695
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
696
+ readonly PASSWORD_TOO_SHORT: "Password too short";
697
+ readonly PASSWORD_TOO_LONG: "Password too long";
698
+ readonly USER_ALREADY_EXISTS: "User already exists.";
699
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
700
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
701
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
702
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
703
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
704
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
705
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
706
+ };
707
+ };
708
+
709
+ export declare class Platform {
710
+ static get isAndroid(): boolean;
711
+ static get isIOS(): boolean;
712
+ static get isWindows(): boolean;
713
+ static get isMacOS(): boolean;
714
+ private static get userAgent();
715
+ }
716
+
717
+ export { t }
718
+
719
+ export { useTranslation }
720
+
721
+ export declare const WISTRON_PRIMARY_COLOR = "#00506E";
722
+
723
+ export declare const WISTRON_SECONDARY_COLOR = "#64DC00";
724
+
725
+ export { }