@logto/schemas 1.28.0 → 1.30.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.
Files changed (129) hide show
  1. package/alterations/1.29.0-1748832174-add-webauthn-related-origins.ts +20 -0
  2. package/alterations/1.29.0-1749005587-user-sso-identities-table-add-updated-at-column.ts +31 -0
  3. package/alterations/1.29.0-1749026308-add-oidc-session-extension-table.ts +41 -0
  4. package/alterations/1.29.0-1749523818-add-custom-profile-fields.ts +58 -0
  5. package/alterations/1.29.0-1749724664-drop-sie-order-constraint-from-custom-profile-fields.ts +20 -0
  6. package/alterations/1.29.0-1750663091-change-user-password-encrypted-length.ts +18 -0
  7. package/alterations/1.29.0-1750744518-add-secrets-table.ts +50 -0
  8. package/alterations/1.29.0-1750744539-add-secret-connector-relations-table.ts +109 -0
  9. package/alterations/1.30.0-1750744685-add-triggers-to-delete-secrets-on-social-identities-deletion.ts +81 -0
  10. package/alterations/1.30.0-1750748516-add-enable-token-storage-column-to-connectors-table.ts +20 -0
  11. package/alterations/1.30.0-1751255436-split-secret-connector-relatioins-table.ts +359 -0
  12. package/alterations/1.30.0-1751337183-add-require-mfa-on-sign-in-to-users.ts +20 -0
  13. package/alterations/1.30.0-1751400000-move-require-mfa-on-sign-in-to-logto-config.ts +21 -0
  14. package/alterations/1.30.0-1751529530-add-enable-token-storage-column-to-sso-connectors-table.ts +20 -0
  15. package/alterations/1.30.0-1752630302-alterate-enable-column-default-value-in-account-centers-table.ts +20 -0
  16. package/alterations/1.30.0-1753669579-add-organization-user-relations-foreign-key.ts +46 -0
  17. package/alterations-js/1.29.0-1748832174-add-webauthn-related-origins.js +16 -0
  18. package/alterations-js/1.29.0-1749005587-user-sso-identities-table-add-updated-at-column.js +25 -0
  19. package/alterations-js/1.29.0-1749026308-add-oidc-session-extension-table.js +33 -0
  20. package/alterations-js/1.29.0-1749523818-add-custom-profile-fields.js +52 -0
  21. package/alterations-js/1.29.0-1749724664-drop-sie-order-constraint-from-custom-profile-fields.js +16 -0
  22. package/alterations-js/1.29.0-1750663091-change-user-password-encrypted-length.js +14 -0
  23. package/alterations-js/1.29.0-1750744518-add-secrets-table.js +42 -0
  24. package/alterations-js/1.29.0-1750744539-add-secret-connector-relations-table.js +99 -0
  25. package/alterations-js/1.30.0-1750744685-add-triggers-to-delete-secrets-on-social-identities-deletion.js +76 -0
  26. package/alterations-js/1.30.0-1750748516-add-enable-token-storage-column-to-connectors-table.js +16 -0
  27. package/alterations-js/1.30.0-1751255436-split-secret-connector-relatioins-table.js +338 -0
  28. package/alterations-js/1.30.0-1751337183-add-require-mfa-on-sign-in-to-users.js +16 -0
  29. package/alterations-js/1.30.0-1751400000-move-require-mfa-on-sign-in-to-logto-config.js +17 -0
  30. package/alterations-js/1.30.0-1751529530-add-enable-token-storage-column-to-sso-connectors-table.js +16 -0
  31. package/alterations-js/1.30.0-1752630302-alterate-enable-column-default-value-in-account-centers-table.js +16 -0
  32. package/alterations-js/1.30.0-1753669579-add-organization-user-relations-foreign-key.js +38 -0
  33. package/lib/consts/oidc.d.ts +9 -1
  34. package/lib/consts/oidc.js +5 -0
  35. package/lib/db-entries/account-center.d.ts +4 -2
  36. package/lib/db-entries/account-center.js +5 -1
  37. package/lib/db-entries/connector.d.ts +5 -1
  38. package/lib/db-entries/connector.js +4 -0
  39. package/lib/db-entries/custom-profile-field.d.ts +32 -0
  40. package/lib/db-entries/custom-profile-field.js +58 -0
  41. package/lib/db-entries/index.d.ts +5 -0
  42. package/lib/db-entries/index.js +5 -0
  43. package/lib/db-entries/oidc-session-extension.d.ts +24 -0
  44. package/lib/db-entries/oidc-session-extension.js +42 -0
  45. package/lib/db-entries/secret-enterprise-sso-connector-relation.d.ts +28 -0
  46. package/lib/db-entries/secret-enterprise-sso-connector-relation.js +37 -0
  47. package/lib/db-entries/secret-social-connector-relation.d.ts +28 -0
  48. package/lib/db-entries/secret-social-connector-relation.js +37 -0
  49. package/lib/db-entries/secret.d.ts +44 -0
  50. package/lib/db-entries/secret.js +62 -0
  51. package/lib/db-entries/sso-connector.d.ts +5 -1
  52. package/lib/db-entries/sso-connector.js +4 -0
  53. package/lib/db-entries/user-sso-identity.d.ts +5 -1
  54. package/lib/db-entries/user-sso-identity.js +4 -0
  55. package/lib/db-entries/user.js +2 -2
  56. package/lib/foundations/jsonb-types/account-centers.d.ts +5 -0
  57. package/lib/foundations/jsonb-types/account-centers.js +2 -0
  58. package/lib/foundations/jsonb-types/custom-profile-fields.d.ts +441 -0
  59. package/lib/foundations/jsonb-types/custom-profile-fields.js +44 -0
  60. package/lib/foundations/jsonb-types/index.d.ts +2 -1
  61. package/lib/foundations/jsonb-types/index.js +2 -1
  62. package/lib/foundations/jsonb-types/secrets.d.ts +11 -0
  63. package/lib/foundations/jsonb-types/secrets.js +15 -0
  64. package/lib/foundations/jsonb-types/sign-in-experience.d.ts +3 -1
  65. package/lib/foundations/jsonb-types/sign-in-experience.js +2 -0
  66. package/lib/foundations/jsonb-types/users.d.ts +126 -0
  67. package/lib/foundations/jsonb-types/users.js +22 -10
  68. package/lib/types/connector.d.ts +39 -0
  69. package/lib/types/connector.js +1 -0
  70. package/lib/types/consent.d.ts +44 -0
  71. package/lib/types/custom-profile-fields.d.ts +2587 -0
  72. package/lib/types/custom-profile-fields.js +159 -0
  73. package/lib/types/index.d.ts +4 -0
  74. package/lib/types/index.js +4 -0
  75. package/lib/types/interactions.d.ts +181 -1
  76. package/lib/types/interactions.js +49 -1
  77. package/lib/types/log/interaction.d.ts +2 -1
  78. package/lib/types/logto-config/index.d.ts +1139 -18
  79. package/lib/types/logto-config/jwt-customizer.d.ts +2529 -32
  80. package/lib/types/logto-config/jwt-customizer.js +55 -1
  81. package/lib/types/logto-config/oidc-provider.d.ts +6 -6
  82. package/lib/types/mfa.d.ts +10 -10
  83. package/lib/types/secrets.d.ts +436 -0
  84. package/lib/types/secrets.js +73 -0
  85. package/lib/types/sign-in-experience.d.ts +21 -3
  86. package/lib/types/sign-in-experience.js +3 -1
  87. package/lib/types/sso-connector.d.ts +28 -2
  88. package/lib/types/sso-connector.js +3 -0
  89. package/lib/types/tenant.d.ts +1 -0
  90. package/lib/types/tenant.js +1 -0
  91. package/lib/types/user-logto-config.d.ts +45 -0
  92. package/lib/types/user-logto-config.js +18 -0
  93. package/lib/types/user.d.ts +626 -0
  94. package/lib/types/user.js +17 -1
  95. package/lib/types/verification-records/backup-code-verification.d.ts +47 -0
  96. package/lib/types/verification-records/backup-code-verification.js +12 -0
  97. package/lib/types/verification-records/code-verification.d.ts +89 -0
  98. package/lib/types/verification-records/code-verification.js +22 -0
  99. package/lib/types/verification-records/enterprise-sso-verification.d.ts +213 -0
  100. package/lib/types/verification-records/enterprise-sso-verification.js +15 -0
  101. package/lib/types/verification-records/index.d.ts +16 -0
  102. package/lib/types/verification-records/index.js +16 -0
  103. package/lib/types/verification-records/new-password-identity-verification.d.ts +85 -0
  104. package/lib/types/verification-records/new-password-identity-verification.js +20 -0
  105. package/lib/types/verification-records/one-time-token-verification.d.ts +55 -0
  106. package/lib/types/verification-records/one-time-token-verification.js +13 -0
  107. package/lib/types/verification-records/password-verification.d.ts +40 -0
  108. package/lib/types/verification-records/password-verification.js +9 -0
  109. package/lib/types/verification-records/social-verification.d.ts +270 -0
  110. package/lib/types/verification-records/social-verification.js +16 -0
  111. package/lib/types/verification-records/totp-verification.d.ts +47 -0
  112. package/lib/types/verification-records/totp-verification.js +12 -0
  113. package/lib/types/verification-records/web-authn-verification.d.ts +124 -0
  114. package/lib/types/verification-records/web-authn-verification.js +17 -0
  115. package/package.json +6 -6
  116. package/tables/account_centers.sql +2 -1
  117. package/tables/connectors.sql +4 -0
  118. package/tables/custom_profile_fields.sql +31 -0
  119. package/tables/oidc_model_instances.sql +2 -0
  120. package/tables/oidc_session_extensions.sql +18 -0
  121. package/tables/organization_user_relations.sql +4 -1
  122. package/tables/secret_enterprise_sso_connector_relations.sql +60 -0
  123. package/tables/secret_social_connector_relations.sql +75 -0
  124. package/tables/secrets.sql +26 -0
  125. package/tables/sso_connectors.sql +2 -0
  126. package/tables/user_sso_identities.sql +8 -0
  127. package/tables/users.sql +3 -2
  128. /package/lib/{foundations/jsonb-types/verification-records.d.ts → types/verification-records/verification-type.d.ts} +0 -0
  129. /package/lib/{foundations/jsonb-types/verification-records.js → types/verification-records/verification-type.js} +0 -0
@@ -77,6 +77,7 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
77
77
  publicKey: string;
78
78
  counter: number;
79
79
  agent: string;
80
+ name?: string | undefined;
80
81
  lastUsedAt?: string | undefined;
81
82
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
82
83
  } | {
@@ -88,6 +89,16 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
88
89
  usedAt?: string | undefined;
89
90
  }[];
90
91
  lastUsedAt?: string | undefined;
92
+ } | {
93
+ type: MfaFactor.EmailVerificationCode;
94
+ id: string;
95
+ createdAt: string;
96
+ lastUsedAt?: string | undefined;
97
+ } | {
98
+ type: MfaFactor.PhoneVerificationCode;
99
+ id: string;
100
+ createdAt: string;
101
+ lastUsedAt?: string | undefined;
91
102
  })[], z.ZodTypeDef, ({
92
103
  type: MfaFactor.TOTP;
93
104
  id: string;
@@ -102,6 +113,7 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
102
113
  publicKey: string;
103
114
  counter: number;
104
115
  agent: string;
116
+ name?: string | undefined;
105
117
  lastUsedAt?: string | undefined;
106
118
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
107
119
  } | {
@@ -113,6 +125,16 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
113
125
  usedAt?: string | undefined;
114
126
  }[];
115
127
  lastUsedAt?: string | undefined;
128
+ } | {
129
+ type: MfaFactor.EmailVerificationCode;
130
+ id: string;
131
+ createdAt: string;
132
+ lastUsedAt?: string | undefined;
133
+ } | {
134
+ type: MfaFactor.PhoneVerificationCode;
135
+ id: string;
136
+ createdAt: string;
137
+ lastUsedAt?: string | undefined;
116
138
  })[]>;
117
139
  isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
118
140
  lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
@@ -225,6 +247,7 @@ export declare const userProfileResponseGuard: z.ZodObject<Pick<{
225
247
  publicKey: string;
226
248
  counter: number;
227
249
  agent: string;
250
+ name?: string | undefined;
228
251
  lastUsedAt?: string | undefined;
229
252
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
230
253
  } | {
@@ -236,6 +259,16 @@ export declare const userProfileResponseGuard: z.ZodObject<Pick<{
236
259
  usedAt?: string | undefined;
237
260
  }[];
238
261
  lastUsedAt?: string | undefined;
262
+ } | {
263
+ type: MfaFactor.EmailVerificationCode;
264
+ id: string;
265
+ createdAt: string;
266
+ lastUsedAt?: string | undefined;
267
+ } | {
268
+ type: MfaFactor.PhoneVerificationCode;
269
+ id: string;
270
+ createdAt: string;
271
+ lastUsedAt?: string | undefined;
239
272
  })[], z.ZodTypeDef, ({
240
273
  type: MfaFactor.TOTP;
241
274
  id: string;
@@ -250,6 +283,7 @@ export declare const userProfileResponseGuard: z.ZodObject<Pick<{
250
283
  publicKey: string;
251
284
  counter: number;
252
285
  agent: string;
286
+ name?: string | undefined;
253
287
  lastUsedAt?: string | undefined;
254
288
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
255
289
  } | {
@@ -261,6 +295,16 @@ export declare const userProfileResponseGuard: z.ZodObject<Pick<{
261
295
  usedAt?: string | undefined;
262
296
  }[];
263
297
  lastUsedAt?: string | undefined;
298
+ } | {
299
+ type: MfaFactor.EmailVerificationCode;
300
+ id: string;
301
+ createdAt: string;
302
+ lastUsedAt?: string | undefined;
303
+ } | {
304
+ type: MfaFactor.PhoneVerificationCode;
305
+ id: string;
306
+ createdAt: string;
307
+ lastUsedAt?: string | undefined;
264
308
  })[]>;
265
309
  isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
266
310
  lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
@@ -310,17 +354,20 @@ export declare const userMfaVerificationResponseGuard: z.ZodArray<z.ZodObject<{
310
354
  createdAt: z.ZodString;
311
355
  type: z.ZodNativeEnum<typeof MfaFactor>;
312
356
  agent: z.ZodOptional<z.ZodString>;
357
+ name: z.ZodOptional<z.ZodString>;
313
358
  remainCodes: z.ZodOptional<z.ZodNumber>;
314
359
  }, "strip", z.ZodTypeAny, {
315
360
  type: MfaFactor;
316
361
  id: string;
317
362
  createdAt: string;
363
+ name?: string | undefined;
318
364
  agent?: string | undefined;
319
365
  remainCodes?: number | undefined;
320
366
  }, {
321
367
  type: MfaFactor;
322
368
  id: string;
323
369
  createdAt: string;
370
+ name?: string | undefined;
324
371
  agent?: string | undefined;
325
372
  remainCodes?: number | undefined;
326
373
  }>, "many">;
@@ -428,6 +475,7 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
428
475
  publicKey: string;
429
476
  counter: number;
430
477
  agent: string;
478
+ name?: string | undefined;
431
479
  lastUsedAt?: string | undefined;
432
480
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
433
481
  } | {
@@ -439,6 +487,16 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
439
487
  usedAt?: string | undefined;
440
488
  }[];
441
489
  lastUsedAt?: string | undefined;
490
+ } | {
491
+ type: MfaFactor.EmailVerificationCode;
492
+ id: string;
493
+ createdAt: string;
494
+ lastUsedAt?: string | undefined;
495
+ } | {
496
+ type: MfaFactor.PhoneVerificationCode;
497
+ id: string;
498
+ createdAt: string;
499
+ lastUsedAt?: string | undefined;
442
500
  })[], z.ZodTypeDef, ({
443
501
  type: MfaFactor.TOTP;
444
502
  id: string;
@@ -453,6 +511,7 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
453
511
  publicKey: string;
454
512
  counter: number;
455
513
  agent: string;
514
+ name?: string | undefined;
456
515
  lastUsedAt?: string | undefined;
457
516
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
458
517
  } | {
@@ -464,6 +523,16 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
464
523
  usedAt?: string | undefined;
465
524
  }[];
466
525
  lastUsedAt?: string | undefined;
526
+ } | {
527
+ type: MfaFactor.EmailVerificationCode;
528
+ id: string;
529
+ createdAt: string;
530
+ lastUsedAt?: string | undefined;
531
+ } | {
532
+ type: MfaFactor.PhoneVerificationCode;
533
+ id: string;
534
+ createdAt: string;
535
+ lastUsedAt?: string | undefined;
467
536
  })[]>;
468
537
  isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
469
538
  lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
@@ -478,3 +547,560 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
478
547
  id: string;
479
548
  avatar: string | null;
480
549
  }>;
550
+ export declare const consoleUserPreferenceKey = "adminConsolePreferences";
551
+ export declare const guideRequestsKey = "guideRequests";
552
+ export declare const getUserSocialIdentityResponseGuard: z.ZodObject<{
553
+ identity: z.ZodObject<{
554
+ userId: z.ZodString;
555
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>>;
556
+ }, "strip", z.ZodTypeAny, {
557
+ userId: string;
558
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
559
+ }, {
560
+ userId: string;
561
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
562
+ }>;
563
+ tokenSecret: z.ZodOptional<z.ZodObject<Omit<{
564
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
565
+ id: z.ZodType<string, z.ZodTypeDef, string>;
566
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
567
+ encryptedDek: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
568
+ iv: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
569
+ authTag: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
570
+ ciphertext: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
571
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
572
+ updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
573
+ } & {
574
+ type: z.ZodLiteral<import("../foundations/index.js").SecretType>;
575
+ metadata: z.ZodObject<{
576
+ scope: z.ZodOptional<z.ZodString>;
577
+ expiresAt: z.ZodOptional<z.ZodNumber>;
578
+ tokenType: z.ZodOptional<z.ZodString>;
579
+ hasRefreshToken: z.ZodBoolean;
580
+ }, "strip", z.ZodTypeAny, {
581
+ hasRefreshToken: boolean;
582
+ scope?: string | undefined;
583
+ expiresAt?: number | undefined;
584
+ tokenType?: string | undefined;
585
+ }, {
586
+ hasRefreshToken: boolean;
587
+ scope?: string | undefined;
588
+ expiresAt?: number | undefined;
589
+ tokenType?: string | undefined;
590
+ }>;
591
+ connectorId: z.ZodString;
592
+ identityId: z.ZodString;
593
+ target: z.ZodString;
594
+ }, "encryptedDek" | "iv" | "authTag" | "ciphertext">, "strip", z.ZodTypeAny, {
595
+ type: import("../foundations/index.js").SecretType;
596
+ id: string;
597
+ userId: string;
598
+ tenantId: string;
599
+ createdAt: number;
600
+ updatedAt: number;
601
+ connectorId: string;
602
+ metadata: {
603
+ hasRefreshToken: boolean;
604
+ scope?: string | undefined;
605
+ expiresAt?: number | undefined;
606
+ tokenType?: string | undefined;
607
+ };
608
+ target: string;
609
+ identityId: string;
610
+ }, {
611
+ type: import("../foundations/index.js").SecretType;
612
+ id: string;
613
+ userId: string;
614
+ tenantId: string;
615
+ createdAt: number;
616
+ updatedAt: number;
617
+ connectorId: string;
618
+ metadata: {
619
+ hasRefreshToken: boolean;
620
+ scope?: string | undefined;
621
+ expiresAt?: number | undefined;
622
+ tokenType?: string | undefined;
623
+ };
624
+ target: string;
625
+ identityId: string;
626
+ }>>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ identity: {
629
+ userId: string;
630
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
631
+ };
632
+ tokenSecret?: {
633
+ type: import("../foundations/index.js").SecretType;
634
+ id: string;
635
+ userId: string;
636
+ tenantId: string;
637
+ createdAt: number;
638
+ updatedAt: number;
639
+ connectorId: string;
640
+ metadata: {
641
+ hasRefreshToken: boolean;
642
+ scope?: string | undefined;
643
+ expiresAt?: number | undefined;
644
+ tokenType?: string | undefined;
645
+ };
646
+ target: string;
647
+ identityId: string;
648
+ } | undefined;
649
+ }, {
650
+ identity: {
651
+ userId: string;
652
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
653
+ };
654
+ tokenSecret?: {
655
+ type: import("../foundations/index.js").SecretType;
656
+ id: string;
657
+ userId: string;
658
+ tenantId: string;
659
+ createdAt: number;
660
+ updatedAt: number;
661
+ connectorId: string;
662
+ metadata: {
663
+ hasRefreshToken: boolean;
664
+ scope?: string | undefined;
665
+ expiresAt?: number | undefined;
666
+ tokenType?: string | undefined;
667
+ };
668
+ target: string;
669
+ identityId: string;
670
+ } | undefined;
671
+ }>;
672
+ export type GetUserSocialIdentityResponse = z.infer<typeof getUserSocialIdentityResponseGuard>;
673
+ export declare const getUserSsoIdentityResponseGuard: z.ZodObject<{
674
+ ssoIdentity: import("../foundations/schemas.js").Guard<import("../db-entries/user-sso-identity.js").UserSsoIdentity>;
675
+ tokenSecret: z.ZodOptional<z.ZodObject<Omit<{
676
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
677
+ id: z.ZodType<string, z.ZodTypeDef, string>;
678
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
679
+ encryptedDek: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
680
+ iv: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
681
+ authTag: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
682
+ ciphertext: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
683
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
684
+ updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
685
+ } & {
686
+ type: z.ZodLiteral<import("../foundations/index.js").SecretType>;
687
+ metadata: z.ZodObject<{
688
+ scope: z.ZodOptional<z.ZodString>;
689
+ expiresAt: z.ZodOptional<z.ZodNumber>;
690
+ tokenType: z.ZodOptional<z.ZodString>;
691
+ hasRefreshToken: z.ZodBoolean;
692
+ }, "strip", z.ZodTypeAny, {
693
+ hasRefreshToken: boolean;
694
+ scope?: string | undefined;
695
+ expiresAt?: number | undefined;
696
+ tokenType?: string | undefined;
697
+ }, {
698
+ hasRefreshToken: boolean;
699
+ scope?: string | undefined;
700
+ expiresAt?: number | undefined;
701
+ tokenType?: string | undefined;
702
+ }>;
703
+ ssoConnectorId: z.ZodString;
704
+ issuer: z.ZodString;
705
+ identityId: z.ZodString;
706
+ }, "encryptedDek" | "iv" | "authTag" | "ciphertext">, "strip", z.ZodTypeAny, {
707
+ type: import("../foundations/index.js").SecretType;
708
+ id: string;
709
+ userId: string;
710
+ tenantId: string;
711
+ createdAt: number;
712
+ issuer: string;
713
+ updatedAt: number;
714
+ metadata: {
715
+ hasRefreshToken: boolean;
716
+ scope?: string | undefined;
717
+ expiresAt?: number | undefined;
718
+ tokenType?: string | undefined;
719
+ };
720
+ ssoConnectorId: string;
721
+ identityId: string;
722
+ }, {
723
+ type: import("../foundations/index.js").SecretType;
724
+ id: string;
725
+ userId: string;
726
+ tenantId: string;
727
+ createdAt: number;
728
+ issuer: string;
729
+ updatedAt: number;
730
+ metadata: {
731
+ hasRefreshToken: boolean;
732
+ scope?: string | undefined;
733
+ expiresAt?: number | undefined;
734
+ tokenType?: string | undefined;
735
+ };
736
+ ssoConnectorId: string;
737
+ identityId: string;
738
+ }>>;
739
+ }, "strip", z.ZodTypeAny, {
740
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
741
+ tokenSecret?: {
742
+ type: import("../foundations/index.js").SecretType;
743
+ id: string;
744
+ userId: string;
745
+ tenantId: string;
746
+ createdAt: number;
747
+ issuer: string;
748
+ updatedAt: number;
749
+ metadata: {
750
+ hasRefreshToken: boolean;
751
+ scope?: string | undefined;
752
+ expiresAt?: number | undefined;
753
+ tokenType?: string | undefined;
754
+ };
755
+ ssoConnectorId: string;
756
+ identityId: string;
757
+ } | undefined;
758
+ }, {
759
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
760
+ tokenSecret?: {
761
+ type: import("../foundations/index.js").SecretType;
762
+ id: string;
763
+ userId: string;
764
+ tenantId: string;
765
+ createdAt: number;
766
+ issuer: string;
767
+ updatedAt: number;
768
+ metadata: {
769
+ hasRefreshToken: boolean;
770
+ scope?: string | undefined;
771
+ expiresAt?: number | undefined;
772
+ tokenType?: string | undefined;
773
+ };
774
+ ssoConnectorId: string;
775
+ identityId: string;
776
+ } | undefined;
777
+ }>;
778
+ export type GetUserSsoIdentityResponse = z.infer<typeof getUserSsoIdentityResponseGuard>;
779
+ export declare const getUserAllIdentitiesResponseGuard: z.ZodObject<{
780
+ socialIdentities: z.ZodArray<z.ZodObject<{
781
+ identity: z.ZodObject<{
782
+ userId: z.ZodString;
783
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@withtyped/server/lib/types.js").Json, z.ZodTypeDef, import("@withtyped/server/lib/types.js").Json>>>;
784
+ }, "strip", z.ZodTypeAny, {
785
+ userId: string;
786
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
787
+ }, {
788
+ userId: string;
789
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
790
+ }>;
791
+ tokenSecret: z.ZodOptional<z.ZodObject<Omit<{
792
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
793
+ id: z.ZodType<string, z.ZodTypeDef, string>;
794
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
795
+ encryptedDek: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
796
+ iv: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
797
+ authTag: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
798
+ ciphertext: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
799
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
800
+ updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
801
+ } & {
802
+ type: z.ZodLiteral<import("../foundations/index.js").SecretType>;
803
+ metadata: z.ZodObject<{
804
+ scope: z.ZodOptional<z.ZodString>;
805
+ expiresAt: z.ZodOptional<z.ZodNumber>;
806
+ tokenType: z.ZodOptional<z.ZodString>;
807
+ hasRefreshToken: z.ZodBoolean;
808
+ }, "strip", z.ZodTypeAny, {
809
+ hasRefreshToken: boolean;
810
+ scope?: string | undefined;
811
+ expiresAt?: number | undefined;
812
+ tokenType?: string | undefined;
813
+ }, {
814
+ hasRefreshToken: boolean;
815
+ scope?: string | undefined;
816
+ expiresAt?: number | undefined;
817
+ tokenType?: string | undefined;
818
+ }>;
819
+ connectorId: z.ZodString;
820
+ identityId: z.ZodString;
821
+ target: z.ZodString;
822
+ }, "encryptedDek" | "iv" | "authTag" | "ciphertext">, "strip", z.ZodTypeAny, {
823
+ type: import("../foundations/index.js").SecretType;
824
+ id: string;
825
+ userId: string;
826
+ tenantId: string;
827
+ createdAt: number;
828
+ updatedAt: number;
829
+ connectorId: string;
830
+ metadata: {
831
+ hasRefreshToken: boolean;
832
+ scope?: string | undefined;
833
+ expiresAt?: number | undefined;
834
+ tokenType?: string | undefined;
835
+ };
836
+ target: string;
837
+ identityId: string;
838
+ }, {
839
+ type: import("../foundations/index.js").SecretType;
840
+ id: string;
841
+ userId: string;
842
+ tenantId: string;
843
+ createdAt: number;
844
+ updatedAt: number;
845
+ connectorId: string;
846
+ metadata: {
847
+ hasRefreshToken: boolean;
848
+ scope?: string | undefined;
849
+ expiresAt?: number | undefined;
850
+ tokenType?: string | undefined;
851
+ };
852
+ target: string;
853
+ identityId: string;
854
+ }>>;
855
+ } & {
856
+ target: z.ZodString;
857
+ }, "strip", z.ZodTypeAny, {
858
+ target: string;
859
+ identity: {
860
+ userId: string;
861
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
862
+ };
863
+ tokenSecret?: {
864
+ type: import("../foundations/index.js").SecretType;
865
+ id: string;
866
+ userId: string;
867
+ tenantId: string;
868
+ createdAt: number;
869
+ updatedAt: number;
870
+ connectorId: string;
871
+ metadata: {
872
+ hasRefreshToken: boolean;
873
+ scope?: string | undefined;
874
+ expiresAt?: number | undefined;
875
+ tokenType?: string | undefined;
876
+ };
877
+ target: string;
878
+ identityId: string;
879
+ } | undefined;
880
+ }, {
881
+ target: string;
882
+ identity: {
883
+ userId: string;
884
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
885
+ };
886
+ tokenSecret?: {
887
+ type: import("../foundations/index.js").SecretType;
888
+ id: string;
889
+ userId: string;
890
+ tenantId: string;
891
+ createdAt: number;
892
+ updatedAt: number;
893
+ connectorId: string;
894
+ metadata: {
895
+ hasRefreshToken: boolean;
896
+ scope?: string | undefined;
897
+ expiresAt?: number | undefined;
898
+ tokenType?: string | undefined;
899
+ };
900
+ target: string;
901
+ identityId: string;
902
+ } | undefined;
903
+ }>, "many">;
904
+ ssoIdentities: z.ZodArray<z.ZodObject<{
905
+ ssoIdentity: import("../foundations/schemas.js").Guard<import("../db-entries/user-sso-identity.js").UserSsoIdentity>;
906
+ tokenSecret: z.ZodOptional<z.ZodObject<Omit<{
907
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
908
+ id: z.ZodType<string, z.ZodTypeDef, string>;
909
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
910
+ encryptedDek: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
911
+ iv: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
912
+ authTag: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
913
+ ciphertext: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
914
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
915
+ updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
916
+ } & {
917
+ type: z.ZodLiteral<import("../foundations/index.js").SecretType>;
918
+ metadata: z.ZodObject<{
919
+ scope: z.ZodOptional<z.ZodString>;
920
+ expiresAt: z.ZodOptional<z.ZodNumber>;
921
+ tokenType: z.ZodOptional<z.ZodString>;
922
+ hasRefreshToken: z.ZodBoolean;
923
+ }, "strip", z.ZodTypeAny, {
924
+ hasRefreshToken: boolean;
925
+ scope?: string | undefined;
926
+ expiresAt?: number | undefined;
927
+ tokenType?: string | undefined;
928
+ }, {
929
+ hasRefreshToken: boolean;
930
+ scope?: string | undefined;
931
+ expiresAt?: number | undefined;
932
+ tokenType?: string | undefined;
933
+ }>;
934
+ ssoConnectorId: z.ZodString;
935
+ issuer: z.ZodString;
936
+ identityId: z.ZodString;
937
+ }, "encryptedDek" | "iv" | "authTag" | "ciphertext">, "strip", z.ZodTypeAny, {
938
+ type: import("../foundations/index.js").SecretType;
939
+ id: string;
940
+ userId: string;
941
+ tenantId: string;
942
+ createdAt: number;
943
+ issuer: string;
944
+ updatedAt: number;
945
+ metadata: {
946
+ hasRefreshToken: boolean;
947
+ scope?: string | undefined;
948
+ expiresAt?: number | undefined;
949
+ tokenType?: string | undefined;
950
+ };
951
+ ssoConnectorId: string;
952
+ identityId: string;
953
+ }, {
954
+ type: import("../foundations/index.js").SecretType;
955
+ id: string;
956
+ userId: string;
957
+ tenantId: string;
958
+ createdAt: number;
959
+ issuer: string;
960
+ updatedAt: number;
961
+ metadata: {
962
+ hasRefreshToken: boolean;
963
+ scope?: string | undefined;
964
+ expiresAt?: number | undefined;
965
+ tokenType?: string | undefined;
966
+ };
967
+ ssoConnectorId: string;
968
+ identityId: string;
969
+ }>>;
970
+ } & {
971
+ ssoConnectorId: z.ZodString;
972
+ }, "strip", z.ZodTypeAny, {
973
+ ssoConnectorId: string;
974
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
975
+ tokenSecret?: {
976
+ type: import("../foundations/index.js").SecretType;
977
+ id: string;
978
+ userId: string;
979
+ tenantId: string;
980
+ createdAt: number;
981
+ issuer: string;
982
+ updatedAt: number;
983
+ metadata: {
984
+ hasRefreshToken: boolean;
985
+ scope?: string | undefined;
986
+ expiresAt?: number | undefined;
987
+ tokenType?: string | undefined;
988
+ };
989
+ ssoConnectorId: string;
990
+ identityId: string;
991
+ } | undefined;
992
+ }, {
993
+ ssoConnectorId: string;
994
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
995
+ tokenSecret?: {
996
+ type: import("../foundations/index.js").SecretType;
997
+ id: string;
998
+ userId: string;
999
+ tenantId: string;
1000
+ createdAt: number;
1001
+ issuer: string;
1002
+ updatedAt: number;
1003
+ metadata: {
1004
+ hasRefreshToken: boolean;
1005
+ scope?: string | undefined;
1006
+ expiresAt?: number | undefined;
1007
+ tokenType?: string | undefined;
1008
+ };
1009
+ ssoConnectorId: string;
1010
+ identityId: string;
1011
+ } | undefined;
1012
+ }>, "many">;
1013
+ }, "strip", z.ZodTypeAny, {
1014
+ ssoIdentities: {
1015
+ ssoConnectorId: string;
1016
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
1017
+ tokenSecret?: {
1018
+ type: import("../foundations/index.js").SecretType;
1019
+ id: string;
1020
+ userId: string;
1021
+ tenantId: string;
1022
+ createdAt: number;
1023
+ issuer: string;
1024
+ updatedAt: number;
1025
+ metadata: {
1026
+ hasRefreshToken: boolean;
1027
+ scope?: string | undefined;
1028
+ expiresAt?: number | undefined;
1029
+ tokenType?: string | undefined;
1030
+ };
1031
+ ssoConnectorId: string;
1032
+ identityId: string;
1033
+ } | undefined;
1034
+ }[];
1035
+ socialIdentities: {
1036
+ target: string;
1037
+ identity: {
1038
+ userId: string;
1039
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
1040
+ };
1041
+ tokenSecret?: {
1042
+ type: import("../foundations/index.js").SecretType;
1043
+ id: string;
1044
+ userId: string;
1045
+ tenantId: string;
1046
+ createdAt: number;
1047
+ updatedAt: number;
1048
+ connectorId: string;
1049
+ metadata: {
1050
+ hasRefreshToken: boolean;
1051
+ scope?: string | undefined;
1052
+ expiresAt?: number | undefined;
1053
+ tokenType?: string | undefined;
1054
+ };
1055
+ target: string;
1056
+ identityId: string;
1057
+ } | undefined;
1058
+ }[];
1059
+ }, {
1060
+ ssoIdentities: {
1061
+ ssoConnectorId: string;
1062
+ ssoIdentity: import("../db-entries/user-sso-identity.js").UserSsoIdentity;
1063
+ tokenSecret?: {
1064
+ type: import("../foundations/index.js").SecretType;
1065
+ id: string;
1066
+ userId: string;
1067
+ tenantId: string;
1068
+ createdAt: number;
1069
+ issuer: string;
1070
+ updatedAt: number;
1071
+ metadata: {
1072
+ hasRefreshToken: boolean;
1073
+ scope?: string | undefined;
1074
+ expiresAt?: number | undefined;
1075
+ tokenType?: string | undefined;
1076
+ };
1077
+ ssoConnectorId: string;
1078
+ identityId: string;
1079
+ } | undefined;
1080
+ }[];
1081
+ socialIdentities: {
1082
+ target: string;
1083
+ identity: {
1084
+ userId: string;
1085
+ details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
1086
+ };
1087
+ tokenSecret?: {
1088
+ type: import("../foundations/index.js").SecretType;
1089
+ id: string;
1090
+ userId: string;
1091
+ tenantId: string;
1092
+ createdAt: number;
1093
+ updatedAt: number;
1094
+ connectorId: string;
1095
+ metadata: {
1096
+ hasRefreshToken: boolean;
1097
+ scope?: string | undefined;
1098
+ expiresAt?: number | undefined;
1099
+ tokenType?: string | undefined;
1100
+ };
1101
+ target: string;
1102
+ identityId: string;
1103
+ } | undefined;
1104
+ }[];
1105
+ }>;
1106
+ export type GetUserAllIdentitiesResponse = z.infer<typeof getUserAllIdentitiesResponseGuard>;