@intlayer/design-system 5.7.2-canary.2 → 5.7.2-canary.3

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.
@@ -3,688 +3,19 @@ import { UseAsyncOptions } from './useAsync/useAsync';
3
3
  /**
4
4
  * Auth
5
5
  */
6
- export declare const useLogin: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signInEmail"]>) => import('./useAsync').UseAsyncResult<"login", <FetchOptions extends {
7
- method?: string | undefined;
8
- mode?: RequestMode | undefined;
9
- referrerPolicy?: ReferrerPolicy | undefined;
10
- cache?: RequestCache | undefined;
11
- headers?: (HeadersInit & (HeadersInit | {
12
- accept: "application/json" | "text/plain" | "application/octet-stream";
13
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
14
- authorization: "Bearer" | "Basic";
15
- })) | undefined;
16
- credentials?: RequestCredentials | undefined;
17
- integrity?: string | undefined;
18
- keepalive?: boolean | undefined;
19
- priority?: RequestPriority | undefined;
20
- redirect?: RequestRedirect | undefined;
21
- referrer?: string | undefined;
22
- signal?: (AbortSignal | null) | undefined;
23
- window?: null | undefined;
24
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
25
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
26
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
27
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
28
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
29
- hookOptions?: {
30
- cloneResponse?: boolean;
31
- } | undefined;
32
- timeout?: number | undefined;
33
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
34
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
35
- baseURL?: string | undefined;
36
- throw?: boolean | undefined;
37
- auth?: ({
38
- type: "Bearer";
39
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
40
- } | {
41
- type: "Basic";
42
- username: string | (() => string | undefined) | undefined;
43
- password: string | (() => string | undefined) | undefined;
44
- } | {
45
- type: "Custom";
46
- prefix: string | (() => string | undefined) | undefined;
47
- value: string | (() => string | undefined) | undefined;
48
- }) | undefined;
49
- body?: (Partial<{
50
- email: string;
51
- password: string;
52
- callbackURL?: string | undefined;
53
- rememberMe?: boolean | undefined;
54
- }> & Record<string, any>) | undefined;
55
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
56
- params?: Record<string, any> | undefined;
57
- duplex?: "full" | "half" | undefined;
58
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
59
- retry?: import('better-auth/client').RetryOptions | undefined;
60
- retryAttempt?: number | undefined;
61
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
62
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
63
- disableValidation?: boolean | undefined;
64
- }>(data_0: import('better-auth').Prettify<{
65
- email: string;
66
- password: string;
67
- callbackURL?: string | undefined;
68
- rememberMe?: boolean | undefined;
69
- } & {
70
- fetchOptions?: FetchOptions | undefined;
71
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
72
- redirect: boolean;
73
- token: string;
74
- url: string | undefined;
75
- user: {
76
- id: string;
77
- email: string;
78
- name: string;
79
- image: string | null | undefined;
80
- emailVerified: boolean;
81
- createdAt: Date;
82
- updatedAt: Date;
83
- };
84
- }, {
85
- code?: string;
86
- message?: string;
87
- }, FetchOptions["throw"] extends true ? true : false>>>;
88
- export declare const useRegister: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signUpEmail"]>) => import('./useAsync').UseAsyncResult<"register", <FetchOptions extends {
89
- method?: string | undefined;
90
- mode?: RequestMode | undefined;
91
- referrerPolicy?: ReferrerPolicy | undefined;
92
- cache?: RequestCache | undefined;
93
- headers?: (HeadersInit & (HeadersInit | {
94
- accept: "application/json" | "text/plain" | "application/octet-stream";
95
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
96
- authorization: "Bearer" | "Basic";
97
- })) | undefined;
98
- credentials?: RequestCredentials | undefined;
99
- integrity?: string | undefined;
100
- keepalive?: boolean | undefined;
101
- priority?: RequestPriority | undefined;
102
- redirect?: RequestRedirect | undefined;
103
- referrer?: string | undefined;
104
- signal?: (AbortSignal | null) | undefined;
105
- window?: null | undefined;
106
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
107
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
108
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
109
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
110
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
111
- hookOptions?: {
112
- cloneResponse?: boolean;
113
- } | undefined;
114
- timeout?: number | undefined;
115
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
116
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
117
- baseURL?: string | undefined;
118
- throw?: boolean | undefined;
119
- auth?: ({
120
- type: "Bearer";
121
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
122
- } | {
123
- type: "Basic";
124
- username: string | (() => string | undefined) | undefined;
125
- password: string | (() => string | undefined) | undefined;
126
- } | {
127
- type: "Custom";
128
- prefix: string | (() => string | undefined) | undefined;
129
- value: string | (() => string | undefined) | undefined;
130
- }) | undefined;
131
- body?: (Partial<{
132
- name: string;
133
- email: string;
134
- password: string;
135
- image?: string;
136
- callbackURL?: string;
137
- rememberMe?: boolean;
138
- }> & Record<string, any>) | undefined;
139
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
140
- params?: Record<string, any> | undefined;
141
- duplex?: "full" | "half" | undefined;
142
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
143
- retry?: import('better-auth/client').RetryOptions | undefined;
144
- retryAttempt?: number | undefined;
145
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
146
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
147
- disableValidation?: boolean | undefined;
148
- }>(data_0: import('better-auth').Prettify<{
149
- email: string;
150
- name: string;
151
- password: string;
152
- image?: string;
153
- callbackURL?: string;
154
- fetchOptions?: FetchOptions | undefined;
155
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<{
156
- token: null;
157
- user: {
158
- id: string;
159
- email: string;
160
- name: string;
161
- image: string | null | undefined;
162
- emailVerified: boolean;
163
- createdAt: Date;
164
- updatedAt: Date;
165
- };
166
- } | {
167
- token: string;
168
- user: {
169
- id: string;
170
- email: string;
171
- name: string;
172
- image: string | null | undefined;
173
- emailVerified: boolean;
174
- createdAt: Date;
175
- updatedAt: Date;
176
- };
177
- }>, {
178
- code?: string;
179
- message?: string;
180
- }, FetchOptions["throw"] extends true ? true : false>>>;
181
- export declare const useLogout: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signOut"]>) => import('./useAsync').UseAsyncResult<"logout", <FetchOptions extends {
182
- method?: string | undefined;
183
- mode?: RequestMode | undefined;
184
- referrerPolicy?: ReferrerPolicy | undefined;
185
- cache?: RequestCache | undefined;
186
- headers?: (HeadersInit & (HeadersInit | {
187
- accept: "application/json" | "text/plain" | "application/octet-stream";
188
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
189
- authorization: "Bearer" | "Basic";
190
- })) | undefined;
191
- credentials?: RequestCredentials | undefined;
192
- integrity?: string | undefined;
193
- keepalive?: boolean | undefined;
194
- priority?: RequestPriority | undefined;
195
- redirect?: RequestRedirect | undefined;
196
- referrer?: string | undefined;
197
- signal?: (AbortSignal | null) | undefined;
198
- window?: null | undefined;
199
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
200
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
201
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
202
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
203
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
204
- hookOptions?: {
205
- cloneResponse?: boolean;
206
- } | undefined;
207
- timeout?: number | undefined;
208
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
209
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
210
- baseURL?: string | undefined;
211
- throw?: boolean | undefined;
212
- auth?: ({
213
- type: "Bearer";
214
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
215
- } | {
216
- type: "Basic";
217
- username: string | (() => string | undefined) | undefined;
218
- password: string | (() => string | undefined) | undefined;
219
- } | {
220
- type: "Custom";
221
- prefix: string | (() => string | undefined) | undefined;
222
- value: string | (() => string | undefined) | undefined;
223
- }) | undefined;
224
- body?: undefined;
225
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
226
- params?: Record<string, any> | undefined;
227
- duplex?: "full" | "half" | undefined;
228
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
229
- retry?: import('better-auth/client').RetryOptions | undefined;
230
- retryAttempt?: number | undefined;
231
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
232
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
233
- disableValidation?: boolean | undefined;
234
- }>(data_0?: import('better-auth').Prettify<{
235
- query?: Record<string, any> | undefined;
236
- fetchOptions?: FetchOptions | undefined;
237
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
238
- success: boolean;
239
- }, {
240
- code?: string;
241
- message?: string;
242
- }, FetchOptions["throw"] extends true ? true : false>>>;
243
- export declare const useChangePassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["changePasswordSession"]>) => import('./useAsync').UseAsyncResult<"changePassword", <FetchOptions extends {
244
- method?: string | undefined;
245
- mode?: RequestMode | undefined;
246
- referrerPolicy?: ReferrerPolicy | undefined;
247
- cache?: RequestCache | undefined;
248
- headers?: (HeadersInit & (HeadersInit | {
249
- accept: "application/json" | "text/plain" | "application/octet-stream";
250
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
251
- authorization: "Bearer" | "Basic";
252
- })) | undefined;
253
- credentials?: RequestCredentials | undefined;
254
- integrity?: string | undefined;
255
- keepalive?: boolean | undefined;
256
- priority?: RequestPriority | undefined;
257
- redirect?: RequestRedirect | undefined;
258
- referrer?: string | undefined;
259
- signal?: (AbortSignal | null) | undefined;
260
- window?: null | undefined;
261
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
262
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
263
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
264
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
265
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
266
- hookOptions?: {
267
- cloneResponse?: boolean;
268
- } | undefined;
269
- timeout?: number | undefined;
270
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
271
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
272
- baseURL?: string | undefined;
273
- throw?: boolean | undefined;
274
- auth?: ({
275
- type: "Bearer";
276
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
277
- } | {
278
- type: "Basic";
279
- username: string | (() => string | undefined) | undefined;
280
- password: string | (() => string | undefined) | undefined;
281
- } | {
282
- type: "Custom";
283
- prefix: string | (() => string | undefined) | undefined;
284
- value: string | (() => string | undefined) | undefined;
285
- }) | undefined;
286
- body?: (Partial<{
287
- newPassword: string;
288
- currentPassword: string;
289
- revokeOtherSessions?: boolean | undefined;
290
- }> & Record<string, any>) | undefined;
291
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
292
- params?: Record<string, any> | undefined;
293
- duplex?: "full" | "half" | undefined;
294
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
295
- retry?: import('better-auth/client').RetryOptions | undefined;
296
- retryAttempt?: number | undefined;
297
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
298
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
299
- disableValidation?: boolean | undefined;
300
- }>(data_0: import('better-auth').Prettify<{
301
- newPassword: string;
302
- currentPassword: string;
303
- revokeOtherSessions?: boolean | undefined;
304
- } & {
305
- fetchOptions?: FetchOptions | undefined;
306
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
307
- token: string | null;
308
- user: {
309
- id: string;
310
- email: string;
311
- name: string;
312
- image: string | null | undefined;
313
- emailVerified: boolean;
314
- createdAt: Date;
315
- updatedAt: Date;
316
- };
317
- }, {
318
- code?: string;
319
- message?: string;
320
- }, FetchOptions["throw"] extends true ? true : false>>>;
321
- export declare const useAskResetPassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["requestPasswordResetSession"]>) => import('./useAsync').UseAsyncResult<"askResetPassword", <FetchOptions extends {
322
- method?: string | undefined;
323
- mode?: RequestMode | undefined;
324
- referrerPolicy?: ReferrerPolicy | undefined;
325
- cache?: RequestCache | undefined;
326
- headers?: (HeadersInit & (HeadersInit | {
327
- accept: "application/json" | "text/plain" | "application/octet-stream";
328
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
329
- authorization: "Bearer" | "Basic";
330
- })) | undefined;
331
- credentials?: RequestCredentials | undefined;
332
- integrity?: string | undefined;
333
- keepalive?: boolean | undefined;
334
- priority?: RequestPriority | undefined;
335
- redirect?: RequestRedirect | undefined;
336
- referrer?: string | undefined;
337
- signal?: (AbortSignal | null) | undefined;
338
- window?: null | undefined;
339
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
340
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
341
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
342
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
343
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
344
- hookOptions?: {
345
- cloneResponse?: boolean;
346
- } | undefined;
347
- timeout?: number | undefined;
348
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
349
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
350
- baseURL?: string | undefined;
351
- throw?: boolean | undefined;
352
- auth?: ({
353
- type: "Bearer";
354
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
355
- } | {
356
- type: "Basic";
357
- username: string | (() => string | undefined) | undefined;
358
- password: string | (() => string | undefined) | undefined;
359
- } | {
360
- type: "Custom";
361
- prefix: string | (() => string | undefined) | undefined;
362
- value: string | (() => string | undefined) | undefined;
363
- }) | undefined;
364
- body?: (Partial<{
365
- email: string;
366
- redirectTo?: string | undefined;
367
- }> & Record<string, any>) | undefined;
368
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
369
- params?: Record<string, any> | undefined;
370
- duplex?: "full" | "half" | undefined;
371
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
372
- retry?: import('better-auth/client').RetryOptions | undefined;
373
- retryAttempt?: number | undefined;
374
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
375
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
376
- disableValidation?: boolean | undefined;
377
- }>(data_0: import('better-auth').Prettify<{
378
- email: string;
379
- redirectTo?: string | undefined;
380
- } & {
381
- fetchOptions?: FetchOptions | undefined;
382
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
383
- status: boolean;
384
- }, {
385
- code?: string;
386
- message?: string;
387
- }, FetchOptions["throw"] extends true ? true : false>>>;
388
- export declare const useDefineNewPassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["changePasswordSession"]>) => import('./useAsync').UseAsyncResult<"defineNewPassword", <FetchOptions extends {
389
- method?: string | undefined;
390
- mode?: RequestMode | undefined;
391
- referrerPolicy?: ReferrerPolicy | undefined;
392
- cache?: RequestCache | undefined;
393
- headers?: (HeadersInit & (HeadersInit | {
394
- accept: "application/json" | "text/plain" | "application/octet-stream";
395
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
396
- authorization: "Bearer" | "Basic";
397
- })) | undefined;
398
- credentials?: RequestCredentials | undefined;
399
- integrity?: string | undefined;
400
- keepalive?: boolean | undefined;
401
- priority?: RequestPriority | undefined;
402
- redirect?: RequestRedirect | undefined;
403
- referrer?: string | undefined;
404
- signal?: (AbortSignal | null) | undefined;
405
- window?: null | undefined;
406
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
407
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
408
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
409
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
410
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
411
- hookOptions?: {
412
- cloneResponse?: boolean;
413
- } | undefined;
414
- timeout?: number | undefined;
415
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
416
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
417
- baseURL?: string | undefined;
418
- throw?: boolean | undefined;
419
- auth?: ({
420
- type: "Bearer";
421
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
422
- } | {
423
- type: "Basic";
424
- username: string | (() => string | undefined) | undefined;
425
- password: string | (() => string | undefined) | undefined;
426
- } | {
427
- type: "Custom";
428
- prefix: string | (() => string | undefined) | undefined;
429
- value: string | (() => string | undefined) | undefined;
430
- }) | undefined;
431
- body?: (Partial<{
432
- newPassword: string;
433
- currentPassword: string;
434
- revokeOtherSessions?: boolean | undefined;
435
- }> & Record<string, any>) | undefined;
436
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
437
- params?: Record<string, any> | undefined;
438
- duplex?: "full" | "half" | undefined;
439
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
440
- retry?: import('better-auth/client').RetryOptions | undefined;
441
- retryAttempt?: number | undefined;
442
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
443
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
444
- disableValidation?: boolean | undefined;
445
- }>(data_0: import('better-auth').Prettify<{
446
- newPassword: string;
447
- currentPassword: string;
448
- revokeOtherSessions?: boolean | undefined;
449
- } & {
450
- fetchOptions?: FetchOptions | undefined;
451
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
452
- token: string | null;
453
- user: {
454
- id: string;
455
- email: string;
456
- name: string;
457
- image: string | null | undefined;
458
- emailVerified: boolean;
459
- createdAt: Date;
460
- updatedAt: Date;
461
- };
462
- }, {
463
- code?: string;
464
- message?: string;
465
- }, FetchOptions["throw"] extends true ? true : false>>>;
466
- export declare const useVerifyEmail: (args?: UseAsyncOptions<IntlayerAPI["auth"]["verifyEmailSession"]>) => import('./useAsync').UseAsyncResult<"verifyEmail", <FetchOptions extends {
467
- method?: string | undefined;
468
- mode?: RequestMode | undefined;
469
- referrerPolicy?: ReferrerPolicy | undefined;
470
- cache?: RequestCache | undefined;
471
- headers?: (HeadersInit & (HeadersInit | {
472
- accept: "application/json" | "text/plain" | "application/octet-stream";
473
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
474
- authorization: "Bearer" | "Basic";
475
- })) | undefined;
476
- credentials?: RequestCredentials | undefined;
477
- integrity?: string | undefined;
478
- keepalive?: boolean | undefined;
479
- priority?: RequestPriority | undefined;
480
- redirect?: RequestRedirect | undefined;
481
- referrer?: string | undefined;
482
- signal?: (AbortSignal | null) | undefined;
483
- window?: null | undefined;
484
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
485
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
486
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
487
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
488
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
489
- hookOptions?: {
490
- cloneResponse?: boolean;
491
- } | undefined;
492
- timeout?: number | undefined;
493
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
494
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
495
- baseURL?: string | undefined;
496
- throw?: boolean | undefined;
497
- auth?: ({
498
- type: "Bearer";
499
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
500
- } | {
501
- type: "Basic";
502
- username: string | (() => string | undefined) | undefined;
503
- password: string | (() => string | undefined) | undefined;
504
- } | {
505
- type: "Custom";
506
- prefix: string | (() => string | undefined) | undefined;
507
- value: string | (() => string | undefined) | undefined;
508
- }) | undefined;
509
- body?: undefined;
510
- query?: (Partial<{
511
- token: string;
512
- callbackURL?: string | undefined;
513
- }> & Record<string, any>) | undefined;
514
- params?: Record<string, any> | undefined;
515
- duplex?: "full" | "half" | undefined;
516
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
517
- retry?: import('better-auth/client').RetryOptions | undefined;
518
- retryAttempt?: number | undefined;
519
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
520
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
521
- disableValidation?: boolean | undefined;
522
- }>(data_0: import('better-auth').Prettify<{
523
- query: {
524
- token: string;
525
- callbackURL?: string | undefined;
526
- };
527
- fetchOptions?: FetchOptions | undefined;
528
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<void | {
529
- status: boolean;
530
- user: {
531
- id: any;
532
- email: any;
533
- name: any;
534
- image: any;
535
- emailVerified: any;
536
- createdAt: any;
537
- updatedAt: any;
538
- };
539
- } | {
540
- status: boolean;
541
- user: null;
542
- }>, {
543
- code?: string;
544
- message?: string;
545
- }, FetchOptions["throw"] extends true ? true : false>>>;
546
- export declare const useGetUserByAccount: (args?: UseAsyncOptions<IntlayerAPI["auth"]["accountInfo"]>) => import('./useAsync').UseAsyncResult<"getUserByAccount", <FetchOptions extends {
547
- method?: string | undefined;
548
- mode?: RequestMode | undefined;
549
- referrerPolicy?: ReferrerPolicy | undefined;
550
- cache?: RequestCache | undefined;
551
- headers?: (HeadersInit & (HeadersInit | {
552
- accept: "application/json" | "text/plain" | "application/octet-stream";
553
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
554
- authorization: "Bearer" | "Basic";
555
- })) | undefined;
556
- credentials?: RequestCredentials | undefined;
557
- integrity?: string | undefined;
558
- keepalive?: boolean | undefined;
559
- priority?: RequestPriority | undefined;
560
- redirect?: RequestRedirect | undefined;
561
- referrer?: string | undefined;
562
- signal?: (AbortSignal | null) | undefined;
563
- window?: null | undefined;
564
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
565
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
566
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
567
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
568
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
569
- hookOptions?: {
570
- cloneResponse?: boolean;
571
- } | undefined;
572
- timeout?: number | undefined;
573
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
574
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
575
- baseURL?: string | undefined;
576
- throw?: boolean | undefined;
577
- auth?: ({
578
- type: "Bearer";
579
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
580
- } | {
581
- type: "Basic";
582
- username: string | (() => string | undefined) | undefined;
583
- password: string | (() => string | undefined) | undefined;
584
- } | {
585
- type: "Custom";
586
- prefix: string | (() => string | undefined) | undefined;
587
- value: string | (() => string | undefined) | undefined;
588
- }) | undefined;
589
- body?: (Partial<{
590
- accountId: string;
591
- }> & Record<string, any>) | undefined;
592
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
593
- params?: Record<string, any> | undefined;
594
- duplex?: "full" | "half" | undefined;
595
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
596
- retry?: import('better-auth/client').RetryOptions | undefined;
597
- retryAttempt?: number | undefined;
598
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
599
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
600
- disableValidation?: boolean | undefined;
601
- }>(data_0: import('better-auth').Prettify<{
602
- accountId: string;
603
- } & {
604
- fetchOptions?: FetchOptions | undefined;
605
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
606
- user: {
607
- id: string;
608
- name?: string;
609
- email?: string | null;
610
- image?: string;
611
- emailVerified: boolean;
612
- };
613
- data: Record<string, any>;
614
- }, {
615
- code?: string;
616
- message?: string;
617
- }, FetchOptions["throw"] extends true ? true : false>>>;
6
+ export declare const useLogin: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signInEmail"]>) => import('./useAsync').UseAsyncResult<"login", any>;
7
+ export declare const useRegister: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signUpEmail"]>) => import('./useAsync').UseAsyncResult<"register", any>;
8
+ export declare const useLogout: (args?: UseAsyncOptions<IntlayerAPI["auth"]["signOut"]>) => import('./useAsync').UseAsyncResult<"logout", any>;
9
+ export declare const useChangePassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["changePasswordSession"]>) => import('./useAsync').UseAsyncResult<"changePassword", any>;
10
+ export declare const useAskResetPassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["requestPasswordResetSession"]>) => import('./useAsync').UseAsyncResult<"askResetPassword", any>;
11
+ export declare const useDefineNewPassword: (args?: UseAsyncOptions<IntlayerAPI["auth"]["changePasswordSession"]>) => import('./useAsync').UseAsyncResult<"defineNewPassword", any>;
12
+ export declare const useVerifyEmail: (args?: UseAsyncOptions<IntlayerAPI["auth"]["verifyEmailSession"]>) => import('./useAsync').UseAsyncResult<"verifyEmail", any>;
13
+ export declare const useGetUserByAccount: (args?: UseAsyncOptions<IntlayerAPI["auth"]["accountInfo"]>) => import('./useAsync').UseAsyncResult<"getUserByAccount", any>;
618
14
  /**
619
15
  * User
620
16
  */
621
17
  export declare const useGetUsers: (args?: UseAsyncOptions<IntlayerAPI["user"]["getUsers"]>) => import('./useAsync').UseAsyncResult<"getUsers", (filters?: import('@intlayer/backend').GetUsersParams, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').GetUsersResult>>;
622
- export declare const useCreateUser: (args?: UseAsyncOptions<IntlayerAPI["auth"]["updateUser"]>) => import('./useAsync').UseAsyncResult<"createUser", <FetchOptions extends {
623
- method?: string | undefined;
624
- mode?: RequestMode | undefined;
625
- referrerPolicy?: ReferrerPolicy | undefined;
626
- cache?: RequestCache | undefined;
627
- headers?: (HeadersInit & (HeadersInit | {
628
- accept: "application/json" | "text/plain" | "application/octet-stream";
629
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
630
- authorization: "Bearer" | "Basic";
631
- })) | undefined;
632
- credentials?: RequestCredentials | undefined;
633
- integrity?: string | undefined;
634
- keepalive?: boolean | undefined;
635
- priority?: RequestPriority | undefined;
636
- redirect?: RequestRedirect | undefined;
637
- referrer?: string | undefined;
638
- signal?: (AbortSignal | null) | undefined;
639
- window?: null | undefined;
640
- onRequest?: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
641
- onResponse?: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
642
- onSuccess?: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
643
- onError?: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
644
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
645
- hookOptions?: {
646
- cloneResponse?: boolean;
647
- } | undefined;
648
- timeout?: number | undefined;
649
- customFetchImpl?: import('better-auth/client').FetchEsque | undefined;
650
- plugins?: import('better-auth/client').BetterFetchPlugin[] | undefined;
651
- baseURL?: string | undefined;
652
- throw?: boolean | undefined;
653
- auth?: ({
654
- type: "Bearer";
655
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
656
- } | {
657
- type: "Basic";
658
- username: string | (() => string | undefined) | undefined;
659
- password: string | (() => string | undefined) | undefined;
660
- } | {
661
- type: "Custom";
662
- prefix: string | (() => string | undefined) | undefined;
663
- value: string | (() => string | undefined) | undefined;
664
- }) | undefined;
665
- body?: (Partial<Partial<{}> & {
666
- name?: string;
667
- image?: string;
668
- }> & Record<string, any>) | undefined;
669
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
670
- params?: Record<string, any> | undefined;
671
- duplex?: "full" | "half" | undefined;
672
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
673
- retry?: import('better-auth/client').RetryOptions | undefined;
674
- retryAttempt?: number | undefined;
675
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
676
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
677
- disableValidation?: boolean | undefined;
678
- }>(data_0?: import('better-auth').Prettify<{
679
- image?: string | null;
680
- name?: string;
681
- fetchOptions?: FetchOptions | undefined;
682
- } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
683
- status: boolean;
684
- }, {
685
- code?: string;
686
- message?: string;
687
- }, FetchOptions["throw"] extends true ? true : false>>>;
18
+ export declare const useCreateUser: (args?: UseAsyncOptions<IntlayerAPI["auth"]["updateUser"]>) => import('./useAsync').UseAsyncResult<"createUser", any>;
688
19
  export declare const useUpdateUser: (args?: UseAsyncOptions<IntlayerAPI["user"]["updateUser"]>) => import('./useAsync').UseAsyncResult<"updateUser", (user: import('@intlayer/backend').UpdateUserBody, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>>;
689
20
  export declare const useDeleteUser: (args?: UseAsyncOptions<IntlayerAPI["user"]["deleteUser"]>) => import('./useAsync').UseAsyncResult<"deleteUser", (userId: string, otherOptions?: import('@intlayer/api').FetcherOptions) => Promise<import('@intlayer/backend').UpdateUserResult>>;
690
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerAPIHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/intlayerAPIHooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,qBAAqB,CAAC;AAmJrE;;GAEG;AAEH,eAAO,MAAM,QAAQ,GACnB,OAAO,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;qBA2hBlB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAthBvC,CAAC;AAEL,eAAO,MAAM,WAAW,GACtB,OAAO,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;qBAmhBlB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDA9gBvC,CAAC;AAEL,eAAO,MAAM,SAAS,GACpB,OAAO,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;qBA2gBd,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAvgBv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AO,MAAM,sBAAsB,GACjC,OAAO,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CAAC,6LAMvE,CAAC;AAEJ;;GAEG;AAEH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,2PAM/D,CAAC;AAEJ,eAAO,MAAM,wBAAwB,GACnC,OAAO,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,oJAM9D,CAAC"}
@@ -8,7 +8,7 @@ const hooks_useAsync_useAsync = require("../useAsync/useAsync.cjs");
8
8
  const useOAuth2 = (intlayerConfiguration) => {
9
9
  const configuration = editorReact.useConfiguration();
10
10
  const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
11
- const intlayerAPI = api.getAuthAPI(config);
11
+ const intlayerAPI = api.getOAuthAPI(config);
12
12
  const { data } = hooks_useAsync_useAsync.useAsync(
13
13
  "getOAuth2AccessToken",
14
14
  intlayerAPI.getOAuth2AccessToken,
@@ -1 +1 @@
1
- {"version":3,"file":"useOAuth2.cjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["useConfiguration","getAuthAPI","useAsync"],"mappings":";;;;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,eAAW,MAAM;AAE/B,QAAA,EAAE,SAASC,wBAAA;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;;"}
1
+ {"version":3,"file":"useOAuth2.cjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["useConfiguration","getOAuthAPI","useAsync"],"mappings":";;;;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,gBAAY,MAAM;AAEhC,QAAA,EAAE,SAASC,wBAAA;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;;"}
@@ -1,5 +1,5 @@
1
1
  import { IntlayerConfig } from '@intlayer/config/client';
2
2
  export declare const useOAuth2: (intlayerConfiguration?: IntlayerConfig) => {
3
- oAuth2AccessToken: any;
3
+ oAuth2AccessToken: import('@intlayer/backend').OAuth2Token | null | undefined;
4
4
  };
5
5
  //# sourceMappingURL=useOAuth2.d.ts.map
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { getAuthAPI } from "@intlayer/api";
2
+ import { getOAuthAPI } from "@intlayer/api";
3
3
  import defaultConfiguration from "@intlayer/config/built";
4
4
  import { useConfiguration } from "@intlayer/editor-react";
5
5
  import { useAsync } from "../useAsync/useAsync.mjs";
6
6
  const useOAuth2 = (intlayerConfiguration) => {
7
7
  const configuration = useConfiguration();
8
8
  const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
9
- const intlayerAPI = getAuthAPI(config);
9
+ const intlayerAPI = getOAuthAPI(config);
10
10
  const { data } = useAsync(
11
11
  "getOAuth2AccessToken",
12
12
  intlayerAPI.getOAuth2AccessToken,
@@ -1 +1 @@
1
- {"version":3,"file":"useOAuth2.mjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":[],"mappings":";;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,WAAW,MAAM;AAE/B,QAAA,EAAE,SAAS;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"useOAuth2.mjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getOAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getOAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":[],"mappings":";;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,YAAY,MAAM;AAEhC,QAAA,EAAE,SAAS;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;"}
@@ -9,7 +9,6 @@ require("../useAsync/useAsyncStateStore.cjs");
9
9
  const useSession = (sessionProp, intlayerConfiguration) => {
10
10
  const configuration = editorReact.useConfiguration();
11
11
  const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
12
- const intlayerAPI = api.getAuthAPI(config);
13
12
  const {
14
13
  getSession,
15
14
  revalidate,
@@ -19,6 +18,7 @@ const useSession = (sessionProp, intlayerConfiguration) => {
19
18
  } = hooks_useAsync_useAsync.useAsync(
20
19
  "getSession",
21
20
  async () => {
21
+ const intlayerAPI = await api.getAuthAPI(config);
22
22
  const result = await intlayerAPI.getSession();
23
23
  return result.data;
24
24
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useSession.cjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":["useConfiguration","getAuthAPI","useAsync"],"mappings":";;;;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,eAAW,MAAM;AAE/B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACEC,wBAAA;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;;"}
1
+ {"version":3,"file":"useSession.cjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const intlayerAPI = await getAuthAPI(config);\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":["useConfiguration","useAsync","getAuthAPI"],"mappings":";;;;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AAEnD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACEC,wBAAA;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,cAAc,MAAMC,IAAA,WAAW,MAAM;AACrC,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;;"}
@@ -7,7 +7,6 @@ import "../useAsync/useAsyncStateStore.mjs";
7
7
  const useSession = (sessionProp, intlayerConfiguration) => {
8
8
  const configuration = useConfiguration();
9
9
  const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
10
- const intlayerAPI = getAuthAPI(config);
11
10
  const {
12
11
  getSession,
13
12
  revalidate,
@@ -17,6 +16,7 @@ const useSession = (sessionProp, intlayerConfiguration) => {
17
16
  } = useAsync(
18
17
  "getSession",
19
18
  async () => {
19
+ const intlayerAPI = await getAuthAPI(config);
20
20
  const result = await intlayerAPI.getSession();
21
21
  return result.data;
22
22
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useSession.mjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":[],"mappings":";;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,WAAW,MAAM;AAE/B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACE;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"useSession.mjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const intlayerAPI = await getAuthAPI(config);\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":[],"mappings":";;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AAEnD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACE;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,cAAc,MAAM,WAAW,MAAM;AACrC,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "5.7.2-canary.2",
3
+ "version": "5.7.2-canary.3",
4
4
  "private": false,
5
5
  "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
6
6
  "keywords": [
@@ -78,12 +78,12 @@
78
78
  "tailwind-merge": "^3.3.0",
79
79
  "zod": "^3.25.56",
80
80
  "zustand": "^4.5.6",
81
- "@intlayer/config": "5.7.2-canary.2",
82
- "@intlayer/api": "5.7.2-canary.2",
83
- "@intlayer/core": "5.7.2-canary.2",
84
- "@intlayer/dictionaries-entry": "5.7.2-canary.2",
85
- "react-intlayer": "5.7.2-canary.2",
86
- "@intlayer/editor-react": "5.7.2-canary.2"
81
+ "@intlayer/config": "5.7.2-canary.3",
82
+ "@intlayer/core": "5.7.2-canary.3",
83
+ "@intlayer/dictionaries-entry": "5.7.2-canary.3",
84
+ "@intlayer/api": "5.7.2-canary.3",
85
+ "react-intlayer": "5.7.2-canary.3",
86
+ "@intlayer/editor-react": "5.7.2-canary.3"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@chromatic-com/storybook": "^3.2.6",
@@ -120,11 +120,11 @@
120
120
  "vite": "^6.3.5",
121
121
  "vite-plugin-dts": "^4.5.3",
122
122
  "vitest": "^3.2.2",
123
- "@intlayer/backend": "5.7.2-canary.2",
123
+ "@intlayer/backend": "5.7.2-canary.3",
124
+ "@utils/eslint-config": "1.0.4",
124
125
  "@utils/ts-config": "1.0.4",
125
126
  "@utils/ts-config-types": "1.0.4",
126
- "@utils/tsup-config": "1.0.4",
127
- "@utils/eslint-config": "1.0.4"
127
+ "@utils/tsup-config": "1.0.4"
128
128
  },
129
129
  "peerDependencies": {
130
130
  "@monaco-editor/react": "^4.7.0",
@@ -135,13 +135,13 @@
135
135
  "react-dom": ">=16.0.0",
136
136
  "tailwind-merge": "^3.3.0",
137
137
  "zustand": "^4.5.6",
138
- "@intlayer/api": "5.7.2-canary.2",
139
- "@intlayer/config": "5.7.2-canary.2",
140
- "@intlayer/core": "5.7.2-canary.2",
141
- "@intlayer/editor-react": "5.7.2-canary.2",
142
- "@intlayer/dictionaries-entry": "5.7.2-canary.2",
143
- "react-intlayer": "5.7.2-canary.2",
144
- "intlayer": "5.7.2-canary.2"
138
+ "@intlayer/config": "5.7.2-canary.3",
139
+ "@intlayer/api": "5.7.2-canary.3",
140
+ "@intlayer/core": "5.7.2-canary.3",
141
+ "@intlayer/dictionaries-entry": "5.7.2-canary.3",
142
+ "react-intlayer": "5.7.2-canary.3",
143
+ "intlayer": "5.7.2-canary.3",
144
+ "@intlayer/editor-react": "5.7.2-canary.3"
145
145
  },
146
146
  "scripts": {
147
147
  "build": "pnpm build:package && pnpm build:css",