@logto/schemas 1.23.1 → 1.24.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.
@@ -1,7 +1,7 @@
1
1
  import { type UserClaim } from '@logto/core-kit';
2
2
  import { z } from 'zod';
3
- export type SamlAttributeMapping = Partial<Record<UserClaim | 'id', string>>;
4
- export declare const samlAttributeMappingKeys: readonly ("name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at")[];
3
+ export type SamlAttributeMapping = Partial<Record<UserClaim | 'sub', string>>;
4
+ export declare const samlAttributeMappingKeys: readonly ("name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub")[];
5
5
  export declare const samlAttributeMappingGuard: z.ZodObject<{
6
6
  [x: string]: z.ZodOptional<z.ZodString>;
7
7
  }, "strip", z.ZodTypeAny, {
@@ -1,6 +1,6 @@
1
- import { completeUserClaims } from '@logto/core-kit';
1
+ import { userClaimsList } from '@logto/core-kit';
2
2
  import { z } from 'zod';
3
- export const samlAttributeMappingKeys = Object.freeze(['id', ...completeUserClaims]);
3
+ export const samlAttributeMappingKeys = Object.freeze(['sub', ...userClaimsList]);
4
4
  export const samlAttributeMappingGuard = z
5
5
  .object(Object.fromEntries(samlAttributeMappingKeys.map((claim) => [claim, z.string()])))
6
6
  .partial();
@@ -167,7 +167,7 @@ export declare const samlApplicationCreateGuard: z.ZodObject<z.objectUtil.extend
167
167
  isThirdParty: z.ZodOptional<z.ZodType<boolean, z.ZodTypeDef, boolean>>;
168
168
  createdAt: z.ZodOptional<z.ZodType<number, z.ZodTypeDef, number>>;
169
169
  }, "type" | "name">>, "name" | "customData" | "description">, {
170
- attributeMapping: z.ZodOptional<z.ZodType<Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>, z.ZodTypeDef, Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>>>;
170
+ attributeMapping: z.ZodOptional<z.ZodType<Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>, z.ZodTypeDef, Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>>>;
171
171
  entityId: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
172
172
  acsUrl: z.ZodOptional<z.ZodType<import("../foundations/index.js").SamlAcsUrl | null, z.ZodTypeDef, import("../foundations/index.js").SamlAcsUrl | null>>;
173
173
  encryption: z.ZodOptional<z.ZodType<{
@@ -187,7 +187,7 @@ export declare const samlApplicationCreateGuard: z.ZodObject<z.objectUtil.extend
187
187
  nameIdFormat: NameIdFormat;
188
188
  customData?: import("@withtyped/server/lib/types.js").JsonObject;
189
189
  description?: string | null;
190
- attributeMapping?: Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>> | undefined;
190
+ attributeMapping?: Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>> | undefined;
191
191
  entityId?: string | null | undefined;
192
192
  acsUrl?: import("../foundations/index.js").SamlAcsUrl | null | undefined;
193
193
  encryption?: {
@@ -199,7 +199,7 @@ export declare const samlApplicationCreateGuard: z.ZodObject<z.objectUtil.extend
199
199
  name: string;
200
200
  customData?: import("@withtyped/server/lib/types.js").JsonObject;
201
201
  description?: string | null;
202
- attributeMapping?: Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>> | undefined;
202
+ attributeMapping?: Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>> | undefined;
203
203
  entityId?: string | null | undefined;
204
204
  acsUrl?: import("../foundations/index.js").SamlAcsUrl | null | undefined;
205
205
  encryption?: {
@@ -292,7 +292,7 @@ export declare const samlApplicationPatchGuard: z.ZodObject<z.objectUtil.extendS
292
292
  type: z.ZodOptional<z.ZodType<import("../index.js").ApplicationType, z.ZodTypeDef, import("../index.js").ApplicationType>>;
293
293
  name: z.ZodOptional<z.ZodType<string, z.ZodTypeDef, string>>;
294
294
  }, "type" | "isThirdParty">, "name" | "customData" | "description">, {
295
- attributeMapping: z.ZodOptional<z.ZodType<Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>, z.ZodTypeDef, Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>>>;
295
+ attributeMapping: z.ZodOptional<z.ZodType<Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>, z.ZodTypeDef, Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>>>;
296
296
  entityId: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
297
297
  acsUrl: z.ZodOptional<z.ZodType<import("../foundations/index.js").SamlAcsUrl | null, z.ZodTypeDef, import("../foundations/index.js").SamlAcsUrl | null>>;
298
298
  encryption: z.ZodOptional<z.ZodType<{
@@ -311,7 +311,7 @@ export declare const samlApplicationPatchGuard: z.ZodObject<z.objectUtil.extendS
311
311
  name?: string | undefined;
312
312
  customData?: import("@withtyped/server/lib/types.js").JsonObject;
313
313
  description?: string | null;
314
- attributeMapping?: Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>> | undefined;
314
+ attributeMapping?: Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>> | undefined;
315
315
  entityId?: string | null | undefined;
316
316
  acsUrl?: import("../foundations/index.js").SamlAcsUrl | null | undefined;
317
317
  encryption?: {
@@ -324,7 +324,7 @@ export declare const samlApplicationPatchGuard: z.ZodObject<z.objectUtil.extendS
324
324
  name?: string | undefined;
325
325
  customData?: import("@withtyped/server/lib/types.js").JsonObject;
326
326
  description?: string | null;
327
- attributeMapping?: Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>> | undefined;
327
+ attributeMapping?: Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>> | undefined;
328
328
  entityId?: string | null | undefined;
329
329
  acsUrl?: import("../foundations/index.js").SamlAcsUrl | null | undefined;
330
330
  encryption?: {
@@ -423,7 +423,7 @@ export declare const samlApplicationResponseGuard: z.ZodObject<z.objectUtil.exte
423
423
  }, "secret" | "oidcClientMetadata" | "customClientMetadata" | "protectedAppMetadata">, Pick<{
424
424
  applicationId: z.ZodType<string, z.ZodTypeDef, string>;
425
425
  tenantId: z.ZodType<string, z.ZodTypeDef, string>;
426
- attributeMapping: z.ZodType<Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>, z.ZodTypeDef, Partial<Record<"name" | "id" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at", string>>>;
426
+ attributeMapping: z.ZodType<Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>, z.ZodTypeDef, Partial<Record<"name" | "username" | "email" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "roles" | "organizations" | "organization_data" | "organization_roles" | "custom_data" | "identities" | "sso_identities" | "created_at" | "sub", string>>>;
427
427
  entityId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
428
428
  acsUrl: z.ZodType<import("../foundations/index.js").SamlAcsUrl | null, z.ZodTypeDef, import("../foundations/index.js").SamlAcsUrl | null>;
429
429
  encryption: z.ZodType<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/schemas",
3
- "version": "1.23.1",
3
+ "version": "1.24.0",
4
4
  "author": "Silverhand Inc. <contact@silverhand.io>",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
@@ -66,7 +66,7 @@
66
66
  "@logto/connector-kit": "^4.1.0",
67
67
  "@logto/core-kit": "^2.5.2",
68
68
  "@logto/language-kit": "^1.1.0",
69
- "@logto/phrases": "^1.16.0",
69
+ "@logto/phrases": "^1.17.0",
70
70
  "@logto/phrases-experience": "^1.9.0",
71
71
  "@logto/shared": "^3.1.2",
72
72
  "@withtyped/server": "^0.14.0",