@logto/schemas 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alterations/1.16.0-1712912361-delete-jwt-customier-with-empty-script.ts +23 -0
- package/alterations/1.16.0-1713942039-add-organization-custom-data.ts +25 -0
- package/alterations/1.16.0-1714270244-application-org-resource-scope.ts +32 -0
- package/alterations-js/1.16.0-1712912361-delete-jwt-customier-with-empty-script.d.ts +3 -0
- package/alterations-js/1.16.0-1712912361-delete-jwt-customier-with-empty-script.js +17 -0
- package/alterations-js/1.16.0-1713942039-add-organization-custom-data.d.ts +4 -0
- package/alterations-js/1.16.0-1713942039-add-organization-custom-data.js +17 -0
- package/alterations-js/1.16.0-1714270244-application-org-resource-scope.d.ts +3 -0
- package/alterations-js/1.16.0-1714270244-application-org-resource-scope.js +27 -0
- package/lib/db-entries/application-user-consent-organization-resource-scope.d.ts +24 -0
- package/lib/db-entries/application-user-consent-organization-resource-scope.js +29 -0
- package/lib/db-entries/index.d.ts +1 -0
- package/lib/db-entries/index.js +1 -0
- package/lib/db-entries/organization.d.ts +6 -2
- package/lib/db-entries/organization.js +5 -0
- package/lib/foundations/jsonb-types/hooks.d.ts +71 -3
- package/lib/foundations/jsonb-types/hooks.js +98 -7
- package/lib/types/application.d.ts +81 -0
- package/lib/types/application.js +7 -4
- package/lib/types/consent.d.ts +207 -22
- package/lib/types/consent.js +11 -7
- package/lib/types/hook.d.ts +6 -20
- package/lib/types/logto-config/index.d.ts +20 -19
- package/lib/types/logto-config/jwt-customizer.d.ts +47 -40
- package/lib/types/logto-config/jwt-customizer.js +19 -24
- package/lib/types/logto-config/jwt-customizer.test.js +10 -2
- package/lib/types/organization.d.ts +0 -1
- package/lib/types/organization.js +0 -9
- package/lib/types/system.d.ts +28 -1
- package/lib/types/system.js +16 -0
- package/lib/types/user.d.ts +7 -7
- package/package.json +7 -7
- package/tables/application_user_consent_organization_resource_scopes.sql +18 -0
- package/tables/organizations.sql +2 -0
package/lib/types/consent.d.ts
CHANGED
|
@@ -271,32 +271,19 @@ export declare const applicationSignInExperienceGuard: z.ZodObject<Pick<{
|
|
|
271
271
|
termsOfUseUrl: string | null;
|
|
272
272
|
privacyPolicyUrl: string | null;
|
|
273
273
|
}>;
|
|
274
|
-
/**
|
|
275
|
-
* Define the public organization info that can be exposed to the public. e.g. on the user consent page.
|
|
276
|
-
*/
|
|
277
|
-
export declare const publicOrganizationGuard: z.ZodObject<Pick<{
|
|
278
|
-
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
279
|
-
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
280
|
-
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
281
|
-
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
282
|
-
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
283
|
-
}, "name" | "id">, "strip", z.ZodTypeAny, {
|
|
284
|
-
name: string;
|
|
285
|
-
id: string;
|
|
286
|
-
}, {
|
|
287
|
-
name: string;
|
|
288
|
-
id: string;
|
|
289
|
-
}>;
|
|
290
274
|
export declare const missingResourceScopesGuard: z.ZodObject<{
|
|
291
275
|
resource: z.ZodObject<{
|
|
292
276
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
277
|
+
indicator: z.ZodType<string, z.ZodTypeDef, string>;
|
|
293
278
|
id: z.ZodString;
|
|
294
279
|
}, "strip", z.ZodTypeAny, {
|
|
295
280
|
name: string;
|
|
296
281
|
id: string;
|
|
282
|
+
indicator: string;
|
|
297
283
|
}, {
|
|
298
284
|
name: string;
|
|
299
285
|
id: string;
|
|
286
|
+
indicator: string;
|
|
300
287
|
}>;
|
|
301
288
|
scopes: z.ZodArray<z.ZodObject<Pick<{
|
|
302
289
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -318,6 +305,7 @@ export declare const missingResourceScopesGuard: z.ZodObject<{
|
|
|
318
305
|
resource: {
|
|
319
306
|
name: string;
|
|
320
307
|
id: string;
|
|
308
|
+
indicator: string;
|
|
321
309
|
};
|
|
322
310
|
scopes: {
|
|
323
311
|
name: string;
|
|
@@ -328,6 +316,7 @@ export declare const missingResourceScopesGuard: z.ZodObject<{
|
|
|
328
316
|
resource: {
|
|
329
317
|
name: string;
|
|
330
318
|
id: string;
|
|
319
|
+
indicator: string;
|
|
331
320
|
};
|
|
332
321
|
scopes: {
|
|
333
322
|
name: string;
|
|
@@ -339,6 +328,97 @@ export declare const missingResourceScopesGuard: z.ZodObject<{
|
|
|
339
328
|
* Define the missing resource scopes for the consent page.
|
|
340
329
|
*/
|
|
341
330
|
export type MissingResourceScopes = z.infer<typeof missingResourceScopesGuard>;
|
|
331
|
+
/**
|
|
332
|
+
* Define the public organization info that can be exposed to the public. e.g. on the user consent page.
|
|
333
|
+
*/
|
|
334
|
+
export declare const publicOrganizationGuard: z.ZodObject<{
|
|
335
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
336
|
+
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
337
|
+
missingResourceScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
338
|
+
resource: z.ZodObject<{
|
|
339
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
340
|
+
indicator: z.ZodType<string, z.ZodTypeDef, string>;
|
|
341
|
+
id: z.ZodString;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
name: string;
|
|
344
|
+
id: string;
|
|
345
|
+
indicator: string;
|
|
346
|
+
}, {
|
|
347
|
+
name: string;
|
|
348
|
+
id: string;
|
|
349
|
+
indicator: string;
|
|
350
|
+
}>;
|
|
351
|
+
scopes: z.ZodArray<z.ZodObject<Pick<{
|
|
352
|
+
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
353
|
+
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
354
|
+
resourceId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
355
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
356
|
+
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
357
|
+
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
358
|
+
}, "name" | "id" | "description">, "strip", z.ZodTypeAny, {
|
|
359
|
+
name: string;
|
|
360
|
+
id: string;
|
|
361
|
+
description: string | null;
|
|
362
|
+
}, {
|
|
363
|
+
name: string;
|
|
364
|
+
id: string;
|
|
365
|
+
description: string | null;
|
|
366
|
+
}>, "many">;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
resource: {
|
|
369
|
+
name: string;
|
|
370
|
+
id: string;
|
|
371
|
+
indicator: string;
|
|
372
|
+
};
|
|
373
|
+
scopes: {
|
|
374
|
+
name: string;
|
|
375
|
+
id: string;
|
|
376
|
+
description: string | null;
|
|
377
|
+
}[];
|
|
378
|
+
}, {
|
|
379
|
+
resource: {
|
|
380
|
+
name: string;
|
|
381
|
+
id: string;
|
|
382
|
+
indicator: string;
|
|
383
|
+
};
|
|
384
|
+
scopes: {
|
|
385
|
+
name: string;
|
|
386
|
+
id: string;
|
|
387
|
+
description: string | null;
|
|
388
|
+
}[];
|
|
389
|
+
}>, "many">>;
|
|
390
|
+
}, "strip", z.ZodTypeAny, {
|
|
391
|
+
name: string;
|
|
392
|
+
id: string;
|
|
393
|
+
missingResourceScopes?: {
|
|
394
|
+
resource: {
|
|
395
|
+
name: string;
|
|
396
|
+
id: string;
|
|
397
|
+
indicator: string;
|
|
398
|
+
};
|
|
399
|
+
scopes: {
|
|
400
|
+
name: string;
|
|
401
|
+
id: string;
|
|
402
|
+
description: string | null;
|
|
403
|
+
}[];
|
|
404
|
+
}[] | undefined;
|
|
405
|
+
}, {
|
|
406
|
+
name: string;
|
|
407
|
+
id: string;
|
|
408
|
+
missingResourceScopes?: {
|
|
409
|
+
resource: {
|
|
410
|
+
name: string;
|
|
411
|
+
id: string;
|
|
412
|
+
indicator: string;
|
|
413
|
+
};
|
|
414
|
+
scopes: {
|
|
415
|
+
name: string;
|
|
416
|
+
id: string;
|
|
417
|
+
description: string | null;
|
|
418
|
+
}[];
|
|
419
|
+
}[] | undefined;
|
|
420
|
+
}>;
|
|
421
|
+
export type PublicOrganization = z.infer<typeof publicOrganizationGuard>;
|
|
342
422
|
export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
343
423
|
application: z.ZodObject<{
|
|
344
424
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -509,30 +589,107 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
509
589
|
primaryPhone: string | null;
|
|
510
590
|
avatar: string | null;
|
|
511
591
|
}>;
|
|
512
|
-
organizations: z.ZodOptional<z.ZodArray<z.ZodObject<
|
|
513
|
-
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
514
|
-
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
592
|
+
organizations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
515
593
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
594
|
+
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
595
|
+
missingResourceScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
596
|
+
resource: z.ZodObject<{
|
|
597
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
598
|
+
indicator: z.ZodType<string, z.ZodTypeDef, string>;
|
|
599
|
+
id: z.ZodString;
|
|
600
|
+
}, "strip", z.ZodTypeAny, {
|
|
601
|
+
name: string;
|
|
602
|
+
id: string;
|
|
603
|
+
indicator: string;
|
|
604
|
+
}, {
|
|
605
|
+
name: string;
|
|
606
|
+
id: string;
|
|
607
|
+
indicator: string;
|
|
608
|
+
}>;
|
|
609
|
+
scopes: z.ZodArray<z.ZodObject<Pick<{
|
|
610
|
+
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
611
|
+
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
612
|
+
resourceId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
613
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
614
|
+
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
615
|
+
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
616
|
+
}, "name" | "id" | "description">, "strip", z.ZodTypeAny, {
|
|
617
|
+
name: string;
|
|
618
|
+
id: string;
|
|
619
|
+
description: string | null;
|
|
620
|
+
}, {
|
|
621
|
+
name: string;
|
|
622
|
+
id: string;
|
|
623
|
+
description: string | null;
|
|
624
|
+
}>, "many">;
|
|
625
|
+
}, "strip", z.ZodTypeAny, {
|
|
626
|
+
resource: {
|
|
627
|
+
name: string;
|
|
628
|
+
id: string;
|
|
629
|
+
indicator: string;
|
|
630
|
+
};
|
|
631
|
+
scopes: {
|
|
632
|
+
name: string;
|
|
633
|
+
id: string;
|
|
634
|
+
description: string | null;
|
|
635
|
+
}[];
|
|
636
|
+
}, {
|
|
637
|
+
resource: {
|
|
638
|
+
name: string;
|
|
639
|
+
id: string;
|
|
640
|
+
indicator: string;
|
|
641
|
+
};
|
|
642
|
+
scopes: {
|
|
643
|
+
name: string;
|
|
644
|
+
id: string;
|
|
645
|
+
description: string | null;
|
|
646
|
+
}[];
|
|
647
|
+
}>, "many">>;
|
|
648
|
+
}, "strip", z.ZodTypeAny, {
|
|
519
649
|
name: string;
|
|
520
650
|
id: string;
|
|
651
|
+
missingResourceScopes?: {
|
|
652
|
+
resource: {
|
|
653
|
+
name: string;
|
|
654
|
+
id: string;
|
|
655
|
+
indicator: string;
|
|
656
|
+
};
|
|
657
|
+
scopes: {
|
|
658
|
+
name: string;
|
|
659
|
+
id: string;
|
|
660
|
+
description: string | null;
|
|
661
|
+
}[];
|
|
662
|
+
}[] | undefined;
|
|
521
663
|
}, {
|
|
522
664
|
name: string;
|
|
523
665
|
id: string;
|
|
666
|
+
missingResourceScopes?: {
|
|
667
|
+
resource: {
|
|
668
|
+
name: string;
|
|
669
|
+
id: string;
|
|
670
|
+
indicator: string;
|
|
671
|
+
};
|
|
672
|
+
scopes: {
|
|
673
|
+
name: string;
|
|
674
|
+
id: string;
|
|
675
|
+
description: string | null;
|
|
676
|
+
}[];
|
|
677
|
+
}[] | undefined;
|
|
524
678
|
}>, "many">>;
|
|
525
679
|
missingOIDCScope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
526
680
|
missingResourceScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
527
681
|
resource: z.ZodObject<{
|
|
528
682
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
683
|
+
indicator: z.ZodType<string, z.ZodTypeDef, string>;
|
|
529
684
|
id: z.ZodString;
|
|
530
685
|
}, "strip", z.ZodTypeAny, {
|
|
531
686
|
name: string;
|
|
532
687
|
id: string;
|
|
688
|
+
indicator: string;
|
|
533
689
|
}, {
|
|
534
690
|
name: string;
|
|
535
691
|
id: string;
|
|
692
|
+
indicator: string;
|
|
536
693
|
}>;
|
|
537
694
|
scopes: z.ZodArray<z.ZodObject<Pick<{
|
|
538
695
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -554,6 +711,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
554
711
|
resource: {
|
|
555
712
|
name: string;
|
|
556
713
|
id: string;
|
|
714
|
+
indicator: string;
|
|
557
715
|
};
|
|
558
716
|
scopes: {
|
|
559
717
|
name: string;
|
|
@@ -564,6 +722,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
564
722
|
resource: {
|
|
565
723
|
name: string;
|
|
566
724
|
id: string;
|
|
725
|
+
indicator: string;
|
|
567
726
|
};
|
|
568
727
|
scopes: {
|
|
569
728
|
name: string;
|
|
@@ -597,12 +756,25 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
597
756
|
organizations?: {
|
|
598
757
|
name: string;
|
|
599
758
|
id: string;
|
|
759
|
+
missingResourceScopes?: {
|
|
760
|
+
resource: {
|
|
761
|
+
name: string;
|
|
762
|
+
id: string;
|
|
763
|
+
indicator: string;
|
|
764
|
+
};
|
|
765
|
+
scopes: {
|
|
766
|
+
name: string;
|
|
767
|
+
id: string;
|
|
768
|
+
description: string | null;
|
|
769
|
+
}[];
|
|
770
|
+
}[] | undefined;
|
|
600
771
|
}[] | undefined;
|
|
601
772
|
missingOIDCScope?: string[] | undefined;
|
|
602
773
|
missingResourceScopes?: {
|
|
603
774
|
resource: {
|
|
604
775
|
name: string;
|
|
605
776
|
id: string;
|
|
777
|
+
indicator: string;
|
|
606
778
|
};
|
|
607
779
|
scopes: {
|
|
608
780
|
name: string;
|
|
@@ -635,12 +807,25 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
635
807
|
organizations?: {
|
|
636
808
|
name: string;
|
|
637
809
|
id: string;
|
|
810
|
+
missingResourceScopes?: {
|
|
811
|
+
resource: {
|
|
812
|
+
name: string;
|
|
813
|
+
id: string;
|
|
814
|
+
indicator: string;
|
|
815
|
+
};
|
|
816
|
+
scopes: {
|
|
817
|
+
name: string;
|
|
818
|
+
id: string;
|
|
819
|
+
description: string | null;
|
|
820
|
+
}[];
|
|
821
|
+
}[] | undefined;
|
|
638
822
|
}[] | undefined;
|
|
639
823
|
missingOIDCScope?: string[] | undefined;
|
|
640
824
|
missingResourceScopes?: {
|
|
641
825
|
resource: {
|
|
642
826
|
name: string;
|
|
643
827
|
id: string;
|
|
828
|
+
indicator: string;
|
|
644
829
|
};
|
|
645
830
|
scopes: {
|
|
646
831
|
name: string;
|
package/lib/types/consent.js
CHANGED
|
@@ -24,18 +24,22 @@ export const applicationSignInExperienceGuard = ApplicationSignInExperiences.gua
|
|
|
24
24
|
privacyPolicyUrl: true,
|
|
25
25
|
termsOfUseUrl: true,
|
|
26
26
|
});
|
|
27
|
+
export const missingResourceScopesGuard = z.object({
|
|
28
|
+
// The original resource id has a maximum length of 21 restriction. We need to make it compatible with the logto reserved organization name.
|
|
29
|
+
// use string here, as we do not care about the resource id length here.
|
|
30
|
+
resource: Resources.guard.pick({ name: true, indicator: true }).extend({ id: z.string() }),
|
|
31
|
+
scopes: Scopes.guard.pick({ id: true, name: true, description: true }).array(),
|
|
32
|
+
});
|
|
27
33
|
/**
|
|
28
34
|
* Define the public organization info that can be exposed to the public. e.g. on the user consent page.
|
|
29
35
|
*/
|
|
30
|
-
export const publicOrganizationGuard = Organizations.guard
|
|
36
|
+
export const publicOrganizationGuard = Organizations.guard
|
|
37
|
+
.pick({
|
|
31
38
|
id: true,
|
|
32
39
|
name: true,
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// use string here, as we do not care about the resource id length here.
|
|
37
|
-
resource: Resources.guard.pick({ name: true }).extend({ id: z.string() }),
|
|
38
|
-
scopes: Scopes.guard.pick({ id: true, name: true, description: true }).array(),
|
|
40
|
+
})
|
|
41
|
+
.extend({
|
|
42
|
+
missingResourceScopes: missingResourceScopesGuard.array().optional(),
|
|
39
43
|
});
|
|
40
44
|
export const consentInfoResponseGuard = z.object({
|
|
41
45
|
application: publicApplicationGuard.merge(applicationSignInExperienceGuard.partial()),
|
package/lib/types/hook.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type Application, type User } from '../db-entries/index.js';
|
|
3
|
-
import { type HookEvent } from '../foundations/index.js';
|
|
4
|
-
import type { userInfoSelectFields } from './user.js';
|
|
5
|
-
export type HookEventPayload = {
|
|
6
|
-
hookId: string;
|
|
7
|
-
event: HookEvent;
|
|
8
|
-
createdAt: string;
|
|
9
|
-
sessionId?: string;
|
|
10
|
-
userAgent?: string;
|
|
11
|
-
userId?: string;
|
|
12
|
-
userIp?: string;
|
|
13
|
-
user?: Pick<User, (typeof userInfoSelectFields)[number]>;
|
|
14
|
-
application?: Pick<Application, 'id' | 'type' | 'name' | 'description'>;
|
|
15
|
-
} & Record<string, unknown>;
|
|
16
2
|
declare const hookExecutionStatsGuard: z.ZodObject<{
|
|
17
3
|
successCount: z.ZodNumber;
|
|
18
4
|
requestCount: z.ZodNumber;
|
|
@@ -38,8 +24,8 @@ export declare const hookResponseGuard: z.ZodObject<{
|
|
|
38
24
|
headers?: Record<string, string> | undefined;
|
|
39
25
|
retries?: number | undefined;
|
|
40
26
|
}>;
|
|
41
|
-
event: z.ZodType<
|
|
42
|
-
events: z.ZodType<
|
|
27
|
+
event: z.ZodType<"User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent | null, z.ZodTypeDef, "User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent | null>;
|
|
28
|
+
events: z.ZodType<("User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent)[], z.ZodTypeDef, ("User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent)[]>;
|
|
43
29
|
signingKey: z.ZodType<string, z.ZodTypeDef, string>;
|
|
44
30
|
enabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
45
31
|
executionStats: z.ZodObject<{
|
|
@@ -62,8 +48,8 @@ export declare const hookResponseGuard: z.ZodObject<{
|
|
|
62
48
|
headers?: Record<string, string> | undefined;
|
|
63
49
|
retries?: number | undefined;
|
|
64
50
|
};
|
|
65
|
-
event:
|
|
66
|
-
events:
|
|
51
|
+
event: "User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent | null;
|
|
52
|
+
events: ("User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent)[];
|
|
67
53
|
signingKey: string;
|
|
68
54
|
enabled: boolean;
|
|
69
55
|
executionStats: {
|
|
@@ -80,8 +66,8 @@ export declare const hookResponseGuard: z.ZodObject<{
|
|
|
80
66
|
headers?: Record<string, string> | undefined;
|
|
81
67
|
retries?: number | undefined;
|
|
82
68
|
};
|
|
83
|
-
event:
|
|
84
|
-
events:
|
|
69
|
+
event: "User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent | null;
|
|
70
|
+
events: ("User.Created" | "User.Deleted" | "User.Updated" | "Role.Created" | "Role.Deleted" | "Role.Updated" | "Scope.Created" | "Scope.Deleted" | "Scope.Updated" | "Organization.Created" | "Organization.Deleted" | "Organization.Updated" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationRole.Updated" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "OrganizationScope.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | import("../index.js").InteractionHookEvent)[];
|
|
85
71
|
signingKey: string;
|
|
86
72
|
enabled: boolean;
|
|
87
73
|
executionStats: {
|
|
@@ -59,7 +59,7 @@ export declare const jwtCustomizerConfigGuard: Readonly<{
|
|
|
59
59
|
export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [z.ZodObject<{
|
|
60
60
|
key: z.ZodLiteral<LogtoJwtTokenKey.AccessToken>;
|
|
61
61
|
value: z.ZodObject<{
|
|
62
|
-
script: z.
|
|
62
|
+
script: z.ZodString;
|
|
63
63
|
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
64
|
tokenSample: z.ZodOptional<z.ZodObject<{
|
|
65
65
|
accountId: z.ZodOptional<z.ZodString>;
|
|
@@ -153,6 +153,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
153
153
|
}>>>;
|
|
154
154
|
createdAt: z.ZodOptional<ZodType<number, z.ZodTypeDef, number>>;
|
|
155
155
|
updatedAt: z.ZodOptional<ZodType<number, z.ZodTypeDef, number>>;
|
|
156
|
+
customData: z.ZodOptional<ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>>;
|
|
156
157
|
primaryEmail: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
157
158
|
primaryPhone: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
158
159
|
avatar: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
@@ -163,7 +164,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
163
164
|
userId: string;
|
|
164
165
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
165
166
|
}>>>;
|
|
166
|
-
customData: z.ZodOptional<ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>>;
|
|
167
167
|
isSuspended: z.ZodOptional<ZodType<boolean, z.ZodTypeDef, boolean>>;
|
|
168
168
|
lastSignInAt: z.ZodOptional<ZodType<number | null, z.ZodTypeDef, number | null>>;
|
|
169
169
|
ssoIdentities: z.ZodOptional<z.ZodArray<z.ZodObject<Pick<{
|
|
@@ -238,6 +238,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
238
238
|
id: ZodType<string, z.ZodTypeDef, string>;
|
|
239
239
|
name: ZodType<string, z.ZodTypeDef, string>;
|
|
240
240
|
description: ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
241
|
+
customData: ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
241
242
|
createdAt: ZodType<number, z.ZodTypeDef, number>;
|
|
242
243
|
}, "name" | "id" | "description">, "strip", z.ZodTypeAny, {
|
|
243
244
|
name: string;
|
|
@@ -292,6 +293,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
292
293
|
}> | undefined;
|
|
293
294
|
createdAt?: number | undefined;
|
|
294
295
|
updatedAt?: number | undefined;
|
|
296
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
295
297
|
primaryEmail?: string | null | undefined;
|
|
296
298
|
primaryPhone?: string | null | undefined;
|
|
297
299
|
avatar?: string | null | undefined;
|
|
@@ -299,7 +301,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
299
301
|
userId: string;
|
|
300
302
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
301
303
|
}> | undefined;
|
|
302
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
303
304
|
isSuspended?: boolean | undefined;
|
|
304
305
|
lastSignInAt?: number | null | undefined;
|
|
305
306
|
ssoIdentities?: {
|
|
@@ -361,6 +362,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
361
362
|
}> | undefined;
|
|
362
363
|
createdAt?: number | undefined;
|
|
363
364
|
updatedAt?: number | undefined;
|
|
365
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
364
366
|
primaryEmail?: string | null | undefined;
|
|
365
367
|
primaryPhone?: string | null | undefined;
|
|
366
368
|
avatar?: string | null | undefined;
|
|
@@ -368,7 +370,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
368
370
|
userId: string;
|
|
369
371
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
370
372
|
}> | undefined;
|
|
371
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
372
373
|
isSuspended?: boolean | undefined;
|
|
373
374
|
lastSignInAt?: number | null | undefined;
|
|
374
375
|
ssoIdentities?: {
|
|
@@ -432,6 +433,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
432
433
|
}> | undefined;
|
|
433
434
|
createdAt?: number | undefined;
|
|
434
435
|
updatedAt?: number | undefined;
|
|
436
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
435
437
|
primaryEmail?: string | null | undefined;
|
|
436
438
|
primaryPhone?: string | null | undefined;
|
|
437
439
|
avatar?: string | null | undefined;
|
|
@@ -439,7 +441,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
439
441
|
userId: string;
|
|
440
442
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
441
443
|
}> | undefined;
|
|
442
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
443
444
|
isSuspended?: boolean | undefined;
|
|
444
445
|
lastSignInAt?: number | null | undefined;
|
|
445
446
|
ssoIdentities?: {
|
|
@@ -503,6 +504,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
503
504
|
}> | undefined;
|
|
504
505
|
createdAt?: number | undefined;
|
|
505
506
|
updatedAt?: number | undefined;
|
|
507
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
506
508
|
primaryEmail?: string | null | undefined;
|
|
507
509
|
primaryPhone?: string | null | undefined;
|
|
508
510
|
avatar?: string | null | undefined;
|
|
@@ -510,7 +512,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
510
512
|
userId: string;
|
|
511
513
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
512
514
|
}> | undefined;
|
|
513
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
514
515
|
isSuspended?: boolean | undefined;
|
|
515
516
|
lastSignInAt?: number | null | undefined;
|
|
516
517
|
ssoIdentities?: {
|
|
@@ -544,7 +545,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
544
545
|
};
|
|
545
546
|
}>>;
|
|
546
547
|
}, "strict", z.ZodTypeAny, {
|
|
547
|
-
script
|
|
548
|
+
script: string;
|
|
548
549
|
environmentVariables?: Record<string, string> | undefined;
|
|
549
550
|
tokenSample?: {
|
|
550
551
|
accountId?: string | undefined;
|
|
@@ -591,6 +592,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
591
592
|
}> | undefined;
|
|
592
593
|
createdAt?: number | undefined;
|
|
593
594
|
updatedAt?: number | undefined;
|
|
595
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
594
596
|
primaryEmail?: string | null | undefined;
|
|
595
597
|
primaryPhone?: string | null | undefined;
|
|
596
598
|
avatar?: string | null | undefined;
|
|
@@ -598,7 +600,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
598
600
|
userId: string;
|
|
599
601
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
600
602
|
}> | undefined;
|
|
601
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
602
603
|
isSuspended?: boolean | undefined;
|
|
603
604
|
lastSignInAt?: number | null | undefined;
|
|
604
605
|
ssoIdentities?: {
|
|
@@ -632,7 +633,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
632
633
|
};
|
|
633
634
|
} | undefined;
|
|
634
635
|
}, {
|
|
635
|
-
script
|
|
636
|
+
script: string;
|
|
636
637
|
environmentVariables?: Record<string, string> | undefined;
|
|
637
638
|
tokenSample?: {
|
|
638
639
|
accountId?: string | undefined;
|
|
@@ -679,6 +680,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
679
680
|
}> | undefined;
|
|
680
681
|
createdAt?: number | undefined;
|
|
681
682
|
updatedAt?: number | undefined;
|
|
683
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
682
684
|
primaryEmail?: string | null | undefined;
|
|
683
685
|
primaryPhone?: string | null | undefined;
|
|
684
686
|
avatar?: string | null | undefined;
|
|
@@ -686,7 +688,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
686
688
|
userId: string;
|
|
687
689
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
688
690
|
}> | undefined;
|
|
689
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
690
691
|
isSuspended?: boolean | undefined;
|
|
691
692
|
lastSignInAt?: number | null | undefined;
|
|
692
693
|
ssoIdentities?: {
|
|
@@ -722,7 +723,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
722
723
|
}>;
|
|
723
724
|
}, "strip", z.ZodTypeAny, {
|
|
724
725
|
value: {
|
|
725
|
-
script
|
|
726
|
+
script: string;
|
|
726
727
|
environmentVariables?: Record<string, string> | undefined;
|
|
727
728
|
tokenSample?: {
|
|
728
729
|
accountId?: string | undefined;
|
|
@@ -769,6 +770,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
769
770
|
}> | undefined;
|
|
770
771
|
createdAt?: number | undefined;
|
|
771
772
|
updatedAt?: number | undefined;
|
|
773
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
772
774
|
primaryEmail?: string | null | undefined;
|
|
773
775
|
primaryPhone?: string | null | undefined;
|
|
774
776
|
avatar?: string | null | undefined;
|
|
@@ -776,7 +778,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
776
778
|
userId: string;
|
|
777
779
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
778
780
|
}> | undefined;
|
|
779
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
780
781
|
isSuspended?: boolean | undefined;
|
|
781
782
|
lastSignInAt?: number | null | undefined;
|
|
782
783
|
ssoIdentities?: {
|
|
@@ -813,7 +814,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
813
814
|
key: LogtoJwtTokenKey.AccessToken;
|
|
814
815
|
}, {
|
|
815
816
|
value: {
|
|
816
|
-
script
|
|
817
|
+
script: string;
|
|
817
818
|
environmentVariables?: Record<string, string> | undefined;
|
|
818
819
|
tokenSample?: {
|
|
819
820
|
accountId?: string | undefined;
|
|
@@ -860,6 +861,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
860
861
|
}> | undefined;
|
|
861
862
|
createdAt?: number | undefined;
|
|
862
863
|
updatedAt?: number | undefined;
|
|
864
|
+
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
863
865
|
primaryEmail?: string | null | undefined;
|
|
864
866
|
primaryPhone?: string | null | undefined;
|
|
865
867
|
avatar?: string | null | undefined;
|
|
@@ -867,7 +869,6 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
867
869
|
userId: string;
|
|
868
870
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
869
871
|
}> | undefined;
|
|
870
|
-
customData?: import("@withtyped/server").JsonObject | undefined;
|
|
871
872
|
isSuspended?: boolean | undefined;
|
|
872
873
|
lastSignInAt?: number | null | undefined;
|
|
873
874
|
ssoIdentities?: {
|
|
@@ -905,7 +906,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
905
906
|
}>, z.ZodObject<{
|
|
906
907
|
key: z.ZodLiteral<LogtoJwtTokenKey.ClientCredentials>;
|
|
907
908
|
value: z.ZodObject<{
|
|
908
|
-
script: z.
|
|
909
|
+
script: z.ZodString;
|
|
909
910
|
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
910
911
|
contextSample: z.ZodOptional<z.ZodRecord<z.ZodString, ZodType<import("@withtyped/server").Json, z.ZodTypeDef, import("@withtyped/server").Json>>>;
|
|
911
912
|
tokenSample: z.ZodOptional<z.ZodObject<{
|
|
@@ -928,7 +929,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
928
929
|
clientId?: string | undefined;
|
|
929
930
|
}>>;
|
|
930
931
|
}, "strict", z.ZodTypeAny, {
|
|
931
|
-
script
|
|
932
|
+
script: string;
|
|
932
933
|
environmentVariables?: Record<string, string> | undefined;
|
|
933
934
|
contextSample?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
934
935
|
tokenSample?: {
|
|
@@ -939,7 +940,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
939
940
|
clientId?: string | undefined;
|
|
940
941
|
} | undefined;
|
|
941
942
|
}, {
|
|
942
|
-
script
|
|
943
|
+
script: string;
|
|
943
944
|
environmentVariables?: Record<string, string> | undefined;
|
|
944
945
|
contextSample?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
945
946
|
tokenSample?: {
|
|
@@ -952,7 +953,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
952
953
|
}>;
|
|
953
954
|
}, "strip", z.ZodTypeAny, {
|
|
954
955
|
value: {
|
|
955
|
-
script
|
|
956
|
+
script: string;
|
|
956
957
|
environmentVariables?: Record<string, string> | undefined;
|
|
957
958
|
contextSample?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
958
959
|
tokenSample?: {
|
|
@@ -966,7 +967,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
966
967
|
key: LogtoJwtTokenKey.ClientCredentials;
|
|
967
968
|
}, {
|
|
968
969
|
value: {
|
|
969
|
-
script
|
|
970
|
+
script: string;
|
|
970
971
|
environmentVariables?: Record<string, string> | undefined;
|
|
971
972
|
contextSample?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
972
973
|
tokenSample?: {
|