@mudrichenkoevgeny/shared-foundation 0.0.49 → 0.0.50
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/index.d.ts +154 -154
- package/index.js +138 -138
- package/index.mjs +138 -138
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1437,14 +1437,6 @@ args: Record<string, string>;
|
|
|
1437
1437
|
}
|
|
1438
1438
|
export const apiErrorResponseSchema: z.ZodType<ApiErrorResponse>;
|
|
1439
1439
|
|
|
1440
|
-
export interface ClientInfoPayload {
|
|
1441
|
-
client_device_info: ClientDeviceInfoPayload;
|
|
1442
|
-
user_agent: string | null;
|
|
1443
|
-
ip_address: string | null;
|
|
1444
|
-
api_version: string | null;
|
|
1445
|
-
}
|
|
1446
|
-
export const clientInfoPayloadSchema: z.ZodType<ClientInfoPayload>;
|
|
1447
|
-
|
|
1448
1440
|
export interface ClientDeviceInfoPayload {
|
|
1449
1441
|
client_type: ClientType | null;
|
|
1450
1442
|
language: string | null;
|
|
@@ -1502,46 +1494,6 @@ require_special_char: boolean;
|
|
|
1502
1494
|
}
|
|
1503
1495
|
export const openPasswordPolicyPayloadSchema: z.ZodType<OpenPasswordPolicyPayload>;
|
|
1504
1496
|
|
|
1505
|
-
export interface ManagementSecuritySettingsPayload {
|
|
1506
|
-
recent_authentication_validity_seconds_for_open_user: number;
|
|
1507
|
-
recent_authentication_validity_seconds_for_management_user: number;
|
|
1508
|
-
management_password_policy: ManagementPasswordPolicyPayload;
|
|
1509
|
-
otp_confirmation: OtpConfirmationPayload;
|
|
1510
|
-
account_lockout_policy: AccountLockoutPolicyPayload;
|
|
1511
|
-
account_lockout_check_interval_seconds: number;
|
|
1512
|
-
open_ip_restriction_policy: IpRestrictionPolicyPayload;
|
|
1513
|
-
management_ip_restriction_policy: IpRestrictionPolicyPayload;
|
|
1514
|
-
expiration_seconds: number;
|
|
1515
|
-
max_requests_per_period: number;
|
|
1516
|
-
rate_limit_period_seconds: number;
|
|
1517
|
-
refresh_token_rotation_grace_period_seconds: number;
|
|
1518
|
-
}
|
|
1519
|
-
export const managementSecuritySettingsPayloadSchema: z.ZodType<ManagementSecuritySettingsPayload>;
|
|
1520
|
-
|
|
1521
|
-
export interface OpenSecuritySettingsPayload {
|
|
1522
|
-
open_password_policy: OpenPasswordPolicyPayload;
|
|
1523
|
-
otp_confirmation: OtpConfirmationPayload;
|
|
1524
|
-
}
|
|
1525
|
-
export const openSecuritySettingsPayloadSchema: z.ZodType<OpenSecuritySettingsPayload>;
|
|
1526
|
-
|
|
1527
|
-
export interface TotpRecoveryCodesPayload {
|
|
1528
|
-
totp_recovery_codes: string[];
|
|
1529
|
-
}
|
|
1530
|
-
export const totpRecoveryCodesPayloadSchema: z.ZodType<TotpRecoveryCodesPayload>;
|
|
1531
|
-
|
|
1532
|
-
export interface TotpSetupPayload {
|
|
1533
|
-
totp_secret_key: string;
|
|
1534
|
-
totp_otp_auth_url: string;
|
|
1535
|
-
mfa_token: string;
|
|
1536
|
-
}
|
|
1537
|
-
export const totpSetupPayloadSchema: z.ZodType<TotpSetupPayload>;
|
|
1538
|
-
|
|
1539
|
-
export interface VerifyTotpPayload {
|
|
1540
|
-
mfa_token: string;
|
|
1541
|
-
totp_code: string;
|
|
1542
|
-
}
|
|
1543
|
-
export const verifyTotpPayloadSchema: z.ZodType<VerifyTotpPayload>;
|
|
1544
|
-
|
|
1545
1497
|
export interface ManagementGlobalSettingsPayload {
|
|
1546
1498
|
privacy_policy_url: string | null;
|
|
1547
1499
|
terms_of_service_url: string | null;
|
|
@@ -1561,21 +1513,6 @@ min_supported_app_versions: Record<string, string>;
|
|
|
1561
1513
|
}
|
|
1562
1514
|
export const openGlobalSettingsPayloadSchema: z.ZodType<OpenGlobalSettingsPayload>;
|
|
1563
1515
|
|
|
1564
|
-
export interface AuditEventPayload {
|
|
1565
|
-
id: AuditEventId;
|
|
1566
|
-
actor_id: UserId | null;
|
|
1567
|
-
actor_type: AuditActorType;
|
|
1568
|
-
actor_user_role: UserRole | null;
|
|
1569
|
-
action: string;
|
|
1570
|
-
resource: string;
|
|
1571
|
-
resource_id: string | null;
|
|
1572
|
-
status: AuditStatus;
|
|
1573
|
-
metadata: AuditEventMetadataPayload[];
|
|
1574
|
-
message: string | null;
|
|
1575
|
-
created_at: number;
|
|
1576
|
-
}
|
|
1577
|
-
export const auditEventPayloadSchema: z.ZodType<AuditEventPayload>;
|
|
1578
|
-
|
|
1579
1516
|
export interface AuditEventMetadataPayload {
|
|
1580
1517
|
key: string;
|
|
1581
1518
|
value: string;
|
|
@@ -1583,60 +1520,12 @@ value_sensitivity: AuditValueSensitivity;
|
|
|
1583
1520
|
}
|
|
1584
1521
|
export const auditEventMetadataPayloadSchema: z.ZodType<AuditEventMetadataPayload>;
|
|
1585
1522
|
|
|
1586
|
-
export interface AuthDataPayload {
|
|
1587
|
-
user: UserDetailsPayload;
|
|
1588
|
-
session_token: SessionTokenPayload;
|
|
1589
|
-
}
|
|
1590
|
-
export const authDataPayloadSchema: z.ZodType<AuthDataPayload>;
|
|
1591
|
-
|
|
1592
1523
|
export interface AvailableAuthProvidersPayload {
|
|
1593
1524
|
primary: string[];
|
|
1594
1525
|
secondary: string[];
|
|
1595
1526
|
}
|
|
1596
1527
|
export const availableAuthProvidersPayloadSchema: z.ZodType<AvailableAuthProvidersPayload>;
|
|
1597
1528
|
|
|
1598
|
-
export interface ManagementAuthSettingsPayload {
|
|
1599
|
-
available_auth_providers: AvailableAuthProvidersPayload;
|
|
1600
|
-
max_total_identifiers: number;
|
|
1601
|
-
max_email_identifiers: number;
|
|
1602
|
-
max_phone_identifiers: number;
|
|
1603
|
-
max_identifiers_per_external_provider: number;
|
|
1604
|
-
max_active_sessions_for_open_user: number;
|
|
1605
|
-
max_active_sessions_for_management_user: number;
|
|
1606
|
-
access_token_validity_seconds: number;
|
|
1607
|
-
refresh_token_validity_seconds: number;
|
|
1608
|
-
account_deletion_grace_period_seconds: number;
|
|
1609
|
-
account_deletion_check_interval_seconds: number;
|
|
1610
|
-
is_registration_enabled: boolean;
|
|
1611
|
-
open_email_restriction_policy: EmailRestrictionPolicyPayload;
|
|
1612
|
-
management_email_restriction_policy: EmailRestrictionPolicyPayload;
|
|
1613
|
-
}
|
|
1614
|
-
export const managementAuthSettingsPayloadSchema: z.ZodType<ManagementAuthSettingsPayload>;
|
|
1615
|
-
|
|
1616
|
-
export interface OpenAuthSettingsPayload {
|
|
1617
|
-
available_auth_providers: AvailableAuthProvidersPayload;
|
|
1618
|
-
max_total_identifiers: number;
|
|
1619
|
-
max_email_identifiers: number;
|
|
1620
|
-
max_phone_identifiers: number;
|
|
1621
|
-
max_identifiers_per_external_provider: number;
|
|
1622
|
-
is_registration_enabled: boolean;
|
|
1623
|
-
}
|
|
1624
|
-
export const openAuthSettingsPayloadSchema: z.ZodType<OpenAuthSettingsPayload>;
|
|
1625
|
-
|
|
1626
|
-
export interface ManagementUserConfigurationPayload {
|
|
1627
|
-
management_global_settings: ManagementGlobalSettingsPayload;
|
|
1628
|
-
management_security_settings: ManagementSecuritySettingsPayload;
|
|
1629
|
-
management_auth_settings: ManagementAuthSettingsPayload;
|
|
1630
|
-
}
|
|
1631
|
-
export const managementUserConfigurationPayloadSchema: z.ZodType<ManagementUserConfigurationPayload>;
|
|
1632
|
-
|
|
1633
|
-
export interface OpenUserConfigurationPayload {
|
|
1634
|
-
open_global_settings: OpenGlobalSettingsPayload;
|
|
1635
|
-
open_security_settings: OpenSecuritySettingsPayload;
|
|
1636
|
-
open_auth_settings: OpenAuthSettingsPayload;
|
|
1637
|
-
}
|
|
1638
|
-
export const openUserConfigurationPayloadSchema: z.ZodType<OpenUserConfigurationPayload>;
|
|
1639
|
-
|
|
1640
1529
|
export interface EmailRestrictionPolicyPayload {
|
|
1641
1530
|
is_blacklist_enabled: boolean;
|
|
1642
1531
|
blacklist: string[];
|
|
@@ -1645,49 +1534,6 @@ whitelist: string[];
|
|
|
1645
1534
|
}
|
|
1646
1535
|
export const emailRestrictionPolicyPayloadSchema: z.ZodType<EmailRestrictionPolicyPayload>;
|
|
1647
1536
|
|
|
1648
|
-
export interface UserIdentifierPayload {
|
|
1649
|
-
id: UserIdentifierId;
|
|
1650
|
-
user_id: UserId;
|
|
1651
|
-
user_auth_provider: UserAuthProvider;
|
|
1652
|
-
identifier: string;
|
|
1653
|
-
display_name: string;
|
|
1654
|
-
external_provider_email: string | null;
|
|
1655
|
-
is_sensitive_values_masked: boolean;
|
|
1656
|
-
created_at: number;
|
|
1657
|
-
updated_at: number | null;
|
|
1658
|
-
}
|
|
1659
|
-
export const userIdentifierPayloadSchema: z.ZodType<UserIdentifierPayload>;
|
|
1660
|
-
|
|
1661
|
-
export interface DeletedSessionsPayload {
|
|
1662
|
-
deleted_session_ids: string[];
|
|
1663
|
-
}
|
|
1664
|
-
export const deletedSessionsPayloadSchema: z.ZodType<DeletedSessionsPayload>;
|
|
1665
|
-
|
|
1666
|
-
export interface UserSessionPayload {
|
|
1667
|
-
id: UserSessionId;
|
|
1668
|
-
user_id: UserId;
|
|
1669
|
-
user_role: UserRole;
|
|
1670
|
-
identifier: string;
|
|
1671
|
-
identifier_id: UserIdentifierId;
|
|
1672
|
-
identifier_display_name: string;
|
|
1673
|
-
identifier_auth_provider: UserAuthProvider;
|
|
1674
|
-
client_device_info: ClientDeviceInfoPayload;
|
|
1675
|
-
user_agent: string | null;
|
|
1676
|
-
ip_address: string | null;
|
|
1677
|
-
expires_at: number;
|
|
1678
|
-
last_accessed_at: number;
|
|
1679
|
-
last_reauthenticated_at: number;
|
|
1680
|
-
is_sensitive_values_masked: boolean;
|
|
1681
|
-
created_at: number;
|
|
1682
|
-
updated_at: number | null;
|
|
1683
|
-
}
|
|
1684
|
-
export const userSessionPayloadSchema: z.ZodType<UserSessionPayload>;
|
|
1685
|
-
|
|
1686
|
-
export interface RefreshTokenPayload {
|
|
1687
|
-
refresh_token: string;
|
|
1688
|
-
}
|
|
1689
|
-
export const refreshTokenPayloadSchema: z.ZodType<RefreshTokenPayload>;
|
|
1690
|
-
|
|
1691
1537
|
export interface SessionTokenPayload {
|
|
1692
1538
|
access_token: string;
|
|
1693
1539
|
refresh_token: string;
|
|
@@ -1723,6 +1569,47 @@ account_status: UserAccountStatus;
|
|
|
1723
1569
|
}
|
|
1724
1570
|
export const userPublicPayloadSchema: z.ZodType<UserPublicPayload>;
|
|
1725
1571
|
|
|
1572
|
+
export interface UserIdentifierPayload {
|
|
1573
|
+
id: UserIdentifierId;
|
|
1574
|
+
user_id: UserId;
|
|
1575
|
+
user_auth_provider: UserAuthProvider;
|
|
1576
|
+
identifier: string;
|
|
1577
|
+
display_name: string;
|
|
1578
|
+
external_provider_email: string | null;
|
|
1579
|
+
is_sensitive_values_masked: boolean;
|
|
1580
|
+
created_at: number;
|
|
1581
|
+
updated_at: number | null;
|
|
1582
|
+
}
|
|
1583
|
+
export const userIdentifierPayloadSchema: z.ZodType<UserIdentifierPayload>;
|
|
1584
|
+
|
|
1585
|
+
export interface DeletedSessionsPayload {
|
|
1586
|
+
deleted_session_ids: string[];
|
|
1587
|
+
}
|
|
1588
|
+
export const deletedSessionsPayloadSchema: z.ZodType<DeletedSessionsPayload>;
|
|
1589
|
+
|
|
1590
|
+
export interface RefreshTokenPayload {
|
|
1591
|
+
refresh_token: string;
|
|
1592
|
+
}
|
|
1593
|
+
export const refreshTokenPayloadSchema: z.ZodType<RefreshTokenPayload>;
|
|
1594
|
+
|
|
1595
|
+
export interface TotpRecoveryCodesPayload {
|
|
1596
|
+
totp_recovery_codes: string[];
|
|
1597
|
+
}
|
|
1598
|
+
export const totpRecoveryCodesPayloadSchema: z.ZodType<TotpRecoveryCodesPayload>;
|
|
1599
|
+
|
|
1600
|
+
export interface TotpSetupPayload {
|
|
1601
|
+
totp_secret_key: string;
|
|
1602
|
+
totp_otp_auth_url: string;
|
|
1603
|
+
mfa_token: string;
|
|
1604
|
+
}
|
|
1605
|
+
export const totpSetupPayloadSchema: z.ZodType<TotpSetupPayload>;
|
|
1606
|
+
|
|
1607
|
+
export interface VerifyTotpPayload {
|
|
1608
|
+
mfa_token: string;
|
|
1609
|
+
totp_code: string;
|
|
1610
|
+
}
|
|
1611
|
+
export const verifyTotpPayloadSchema: z.ZodType<VerifyTotpPayload>;
|
|
1612
|
+
|
|
1726
1613
|
export interface SocketFrame {
|
|
1727
1614
|
id: UserId;
|
|
1728
1615
|
type: string;
|
|
@@ -1743,6 +1630,119 @@ api_version: string | null;
|
|
|
1743
1630
|
}
|
|
1744
1631
|
export const webSocketInitializePayloadSchema: z.ZodType<WebSocketInitializePayload>;
|
|
1745
1632
|
|
|
1633
|
+
export interface ClientInfoPayload {
|
|
1634
|
+
client_device_info: ClientDeviceInfoPayload;
|
|
1635
|
+
user_agent: string | null;
|
|
1636
|
+
ip_address: string | null;
|
|
1637
|
+
api_version: string | null;
|
|
1638
|
+
}
|
|
1639
|
+
export const clientInfoPayloadSchema: z.ZodType<ClientInfoPayload>;
|
|
1640
|
+
|
|
1641
|
+
export interface UserSessionPayload {
|
|
1642
|
+
id: UserSessionId;
|
|
1643
|
+
user_id: UserId;
|
|
1644
|
+
user_role: UserRole;
|
|
1645
|
+
identifier: string;
|
|
1646
|
+
identifier_id: UserIdentifierId;
|
|
1647
|
+
identifier_display_name: string;
|
|
1648
|
+
identifier_auth_provider: UserAuthProvider;
|
|
1649
|
+
client_device_info: ClientDeviceInfoPayload;
|
|
1650
|
+
user_agent: string | null;
|
|
1651
|
+
ip_address: string | null;
|
|
1652
|
+
expires_at: number;
|
|
1653
|
+
last_accessed_at: number;
|
|
1654
|
+
last_reauthenticated_at: number;
|
|
1655
|
+
is_sensitive_values_masked: boolean;
|
|
1656
|
+
created_at: number;
|
|
1657
|
+
updated_at: number | null;
|
|
1658
|
+
}
|
|
1659
|
+
export const userSessionPayloadSchema: z.ZodType<UserSessionPayload>;
|
|
1660
|
+
|
|
1661
|
+
export interface AuditEventPayload {
|
|
1662
|
+
id: AuditEventId;
|
|
1663
|
+
actor_id: UserId | null;
|
|
1664
|
+
actor_type: AuditActorType;
|
|
1665
|
+
actor_user_role: UserRole | null;
|
|
1666
|
+
action: string;
|
|
1667
|
+
resource: string;
|
|
1668
|
+
resource_id: string | null;
|
|
1669
|
+
status: AuditStatus;
|
|
1670
|
+
metadata: AuditEventMetadataPayload[];
|
|
1671
|
+
message: string | null;
|
|
1672
|
+
created_at: number;
|
|
1673
|
+
}
|
|
1674
|
+
export const auditEventPayloadSchema: z.ZodType<AuditEventPayload>;
|
|
1675
|
+
|
|
1676
|
+
export interface AuthDataPayload {
|
|
1677
|
+
user: UserDetailsPayload;
|
|
1678
|
+
session_token: SessionTokenPayload;
|
|
1679
|
+
}
|
|
1680
|
+
export const authDataPayloadSchema: z.ZodType<AuthDataPayload>;
|
|
1681
|
+
|
|
1682
|
+
export interface ManagementAuthSettingsPayload {
|
|
1683
|
+
available_auth_providers: AvailableAuthProvidersPayload;
|
|
1684
|
+
max_total_identifiers: number;
|
|
1685
|
+
max_email_identifiers: number;
|
|
1686
|
+
max_phone_identifiers: number;
|
|
1687
|
+
max_identifiers_per_external_provider: number;
|
|
1688
|
+
max_active_sessions_for_open_user: number;
|
|
1689
|
+
max_active_sessions_for_management_user: number;
|
|
1690
|
+
access_token_validity_seconds: number;
|
|
1691
|
+
refresh_token_validity_seconds: number;
|
|
1692
|
+
account_deletion_grace_period_seconds: number;
|
|
1693
|
+
account_deletion_check_interval_seconds: number;
|
|
1694
|
+
is_registration_enabled: boolean;
|
|
1695
|
+
open_email_restriction_policy: EmailRestrictionPolicyPayload;
|
|
1696
|
+
management_email_restriction_policy: EmailRestrictionPolicyPayload;
|
|
1697
|
+
}
|
|
1698
|
+
export const managementAuthSettingsPayloadSchema: z.ZodType<ManagementAuthSettingsPayload>;
|
|
1699
|
+
|
|
1700
|
+
export interface OpenAuthSettingsPayload {
|
|
1701
|
+
available_auth_providers: AvailableAuthProvidersPayload;
|
|
1702
|
+
max_total_identifiers: number;
|
|
1703
|
+
max_email_identifiers: number;
|
|
1704
|
+
max_phone_identifiers: number;
|
|
1705
|
+
max_identifiers_per_external_provider: number;
|
|
1706
|
+
is_registration_enabled: boolean;
|
|
1707
|
+
}
|
|
1708
|
+
export const openAuthSettingsPayloadSchema: z.ZodType<OpenAuthSettingsPayload>;
|
|
1709
|
+
|
|
1710
|
+
export interface ManagementSecuritySettingsPayload {
|
|
1711
|
+
recent_authentication_validity_seconds_for_open_user: number;
|
|
1712
|
+
recent_authentication_validity_seconds_for_management_user: number;
|
|
1713
|
+
management_password_policy: ManagementPasswordPolicyPayload;
|
|
1714
|
+
otp_confirmation: OtpConfirmationPayload;
|
|
1715
|
+
account_lockout_policy: AccountLockoutPolicyPayload;
|
|
1716
|
+
account_lockout_check_interval_seconds: number;
|
|
1717
|
+
open_ip_restriction_policy: IpRestrictionPolicyPayload;
|
|
1718
|
+
management_ip_restriction_policy: IpRestrictionPolicyPayload;
|
|
1719
|
+
expiration_seconds: number;
|
|
1720
|
+
max_requests_per_period: number;
|
|
1721
|
+
rate_limit_period_seconds: number;
|
|
1722
|
+
refresh_token_rotation_grace_period_seconds: number;
|
|
1723
|
+
}
|
|
1724
|
+
export const managementSecuritySettingsPayloadSchema: z.ZodType<ManagementSecuritySettingsPayload>;
|
|
1725
|
+
|
|
1726
|
+
export interface OpenSecuritySettingsPayload {
|
|
1727
|
+
open_password_policy: OpenPasswordPolicyPayload;
|
|
1728
|
+
otp_confirmation: OtpConfirmationPayload;
|
|
1729
|
+
}
|
|
1730
|
+
export const openSecuritySettingsPayloadSchema: z.ZodType<OpenSecuritySettingsPayload>;
|
|
1731
|
+
|
|
1732
|
+
export interface ManagementUserConfigurationPayload {
|
|
1733
|
+
management_global_settings: ManagementGlobalSettingsPayload;
|
|
1734
|
+
management_security_settings: ManagementSecuritySettingsPayload;
|
|
1735
|
+
management_auth_settings: ManagementAuthSettingsPayload;
|
|
1736
|
+
}
|
|
1737
|
+
export const managementUserConfigurationPayloadSchema: z.ZodType<ManagementUserConfigurationPayload>;
|
|
1738
|
+
|
|
1739
|
+
export interface OpenUserConfigurationPayload {
|
|
1740
|
+
open_global_settings: OpenGlobalSettingsPayload;
|
|
1741
|
+
open_security_settings: OpenSecuritySettingsPayload;
|
|
1742
|
+
open_auth_settings: OpenAuthSettingsPayload;
|
|
1743
|
+
}
|
|
1744
|
+
export const openUserConfigurationPayloadSchema: z.ZodType<OpenUserConfigurationPayload>;
|
|
1745
|
+
|
|
1746
1746
|
export interface CreateByEmailRequest {
|
|
1747
1747
|
email: string;
|
|
1748
1748
|
password: string | null;
|
package/index.js
CHANGED
|
@@ -1791,13 +1791,6 @@ message: z.string(),
|
|
|
1791
1791
|
args: z.record(z.string(), z.string())
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
1794
|
-
export const clientInfoPayloadSchema = z.object({
|
|
1795
|
-
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1796
|
-
user_agent: z.string().nullable(),
|
|
1797
|
-
ip_address: z.string().nullable(),
|
|
1798
|
-
api_version: z.string().nullable()
|
|
1799
|
-
});
|
|
1800
|
-
|
|
1801
1794
|
export const clientDeviceInfoPayloadSchema = z.object({
|
|
1802
1795
|
client_type: clientTypeSchema.nullable(),
|
|
1803
1796
|
language: z.string().nullable(),
|
|
@@ -1849,41 +1842,6 @@ require_digit: z.boolean(),
|
|
|
1849
1842
|
require_special_char: z.boolean()
|
|
1850
1843
|
});
|
|
1851
1844
|
|
|
1852
|
-
export const managementSecuritySettingsPayloadSchema = z.object({
|
|
1853
|
-
recent_authentication_validity_seconds_for_open_user: z.number(),
|
|
1854
|
-
recent_authentication_validity_seconds_for_management_user: z.number(),
|
|
1855
|
-
management_password_policy: managementPasswordPolicyPayloadSchema,
|
|
1856
|
-
otp_confirmation: otpConfirmationPayloadSchema,
|
|
1857
|
-
account_lockout_policy: accountLockoutPolicyPayloadSchema,
|
|
1858
|
-
account_lockout_check_interval_seconds: z.number(),
|
|
1859
|
-
open_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
1860
|
-
management_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
1861
|
-
expiration_seconds: z.number(),
|
|
1862
|
-
max_requests_per_period: z.number(),
|
|
1863
|
-
rate_limit_period_seconds: z.number(),
|
|
1864
|
-
refresh_token_rotation_grace_period_seconds: z.number()
|
|
1865
|
-
});
|
|
1866
|
-
|
|
1867
|
-
export const openSecuritySettingsPayloadSchema = z.object({
|
|
1868
|
-
open_password_policy: openPasswordPolicyPayloadSchema,
|
|
1869
|
-
otp_confirmation: otpConfirmationPayloadSchema
|
|
1870
|
-
});
|
|
1871
|
-
|
|
1872
|
-
export const totpRecoveryCodesPayloadSchema = z.object({
|
|
1873
|
-
totp_recovery_codes: z.array(z.string())
|
|
1874
|
-
});
|
|
1875
|
-
|
|
1876
|
-
export const totpSetupPayloadSchema = z.object({
|
|
1877
|
-
totp_secret_key: z.string(),
|
|
1878
|
-
totp_otp_auth_url: z.string(),
|
|
1879
|
-
mfa_token: z.string()
|
|
1880
|
-
});
|
|
1881
|
-
|
|
1882
|
-
export const verifyTotpPayloadSchema = z.object({
|
|
1883
|
-
mfa_token: z.string(),
|
|
1884
|
-
totp_code: z.string()
|
|
1885
|
-
});
|
|
1886
|
-
|
|
1887
1845
|
export const managementGlobalSettingsPayloadSchema = z.object({
|
|
1888
1846
|
privacy_policy_url: z.string().nullable(),
|
|
1889
1847
|
terms_of_service_url: z.string().nullable(),
|
|
@@ -1901,74 +1859,17 @@ contact_support_email: z.string().nullable(),
|
|
|
1901
1859
|
min_supported_app_versions: z.record(z.string(), z.string())
|
|
1902
1860
|
});
|
|
1903
1861
|
|
|
1904
|
-
export const auditEventPayloadSchema = z.object({
|
|
1905
|
-
id: auditEventIdSchema,
|
|
1906
|
-
actor_id: userIdSchema.nullable(),
|
|
1907
|
-
actor_type: auditActorTypeSchema,
|
|
1908
|
-
actor_user_role: userRoleSchema.nullable(),
|
|
1909
|
-
action: z.string(),
|
|
1910
|
-
resource: z.string(),
|
|
1911
|
-
resource_id: z.string().nullable(),
|
|
1912
|
-
status: auditStatusSchema,
|
|
1913
|
-
metadata: z.array(auditEventMetadataPayloadSchema),
|
|
1914
|
-
message: z.string().nullable(),
|
|
1915
|
-
created_at: z.number()
|
|
1916
|
-
});
|
|
1917
|
-
|
|
1918
1862
|
export const auditEventMetadataPayloadSchema = z.object({
|
|
1919
1863
|
key: z.string(),
|
|
1920
1864
|
value: z.string(),
|
|
1921
1865
|
value_sensitivity: auditValueSensitivitySchema
|
|
1922
1866
|
});
|
|
1923
1867
|
|
|
1924
|
-
export const authDataPayloadSchema = z.object({
|
|
1925
|
-
user: userDetailsPayloadSchema,
|
|
1926
|
-
session_token: sessionTokenPayloadSchema
|
|
1927
|
-
});
|
|
1928
|
-
|
|
1929
1868
|
export const availableAuthProvidersPayloadSchema = z.object({
|
|
1930
1869
|
primary: z.array(z.string()),
|
|
1931
1870
|
secondary: z.array(z.string())
|
|
1932
1871
|
});
|
|
1933
1872
|
|
|
1934
|
-
export const managementAuthSettingsPayloadSchema = z.object({
|
|
1935
|
-
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
1936
|
-
max_total_identifiers: z.number(),
|
|
1937
|
-
max_email_identifiers: z.number(),
|
|
1938
|
-
max_phone_identifiers: z.number(),
|
|
1939
|
-
max_identifiers_per_external_provider: z.number(),
|
|
1940
|
-
max_active_sessions_for_open_user: z.number(),
|
|
1941
|
-
max_active_sessions_for_management_user: z.number(),
|
|
1942
|
-
access_token_validity_seconds: z.number(),
|
|
1943
|
-
refresh_token_validity_seconds: z.number(),
|
|
1944
|
-
account_deletion_grace_period_seconds: z.number(),
|
|
1945
|
-
account_deletion_check_interval_seconds: z.number(),
|
|
1946
|
-
is_registration_enabled: z.boolean(),
|
|
1947
|
-
open_email_restriction_policy: emailRestrictionPolicyPayloadSchema,
|
|
1948
|
-
management_email_restriction_policy: emailRestrictionPolicyPayloadSchema
|
|
1949
|
-
});
|
|
1950
|
-
|
|
1951
|
-
export const openAuthSettingsPayloadSchema = z.object({
|
|
1952
|
-
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
1953
|
-
max_total_identifiers: z.number(),
|
|
1954
|
-
max_email_identifiers: z.number(),
|
|
1955
|
-
max_phone_identifiers: z.number(),
|
|
1956
|
-
max_identifiers_per_external_provider: z.number(),
|
|
1957
|
-
is_registration_enabled: z.boolean()
|
|
1958
|
-
});
|
|
1959
|
-
|
|
1960
|
-
export const managementUserConfigurationPayloadSchema = z.object({
|
|
1961
|
-
management_global_settings: managementGlobalSettingsPayloadSchema,
|
|
1962
|
-
management_security_settings: managementSecuritySettingsPayloadSchema,
|
|
1963
|
-
management_auth_settings: managementAuthSettingsPayloadSchema
|
|
1964
|
-
});
|
|
1965
|
-
|
|
1966
|
-
export const openUserConfigurationPayloadSchema = z.object({
|
|
1967
|
-
open_global_settings: openGlobalSettingsPayloadSchema,
|
|
1968
|
-
open_security_settings: openSecuritySettingsPayloadSchema,
|
|
1969
|
-
open_auth_settings: openAuthSettingsPayloadSchema
|
|
1970
|
-
});
|
|
1971
|
-
|
|
1972
1873
|
export const emailRestrictionPolicyPayloadSchema = z.object({
|
|
1973
1874
|
is_blacklist_enabled: z.boolean(),
|
|
1974
1875
|
blacklist: z.array(z.string()),
|
|
@@ -1976,45 +1877,6 @@ is_whitelist_enabled: z.boolean(),
|
|
|
1976
1877
|
whitelist: z.array(z.string())
|
|
1977
1878
|
});
|
|
1978
1879
|
|
|
1979
|
-
export const userIdentifierPayloadSchema = z.object({
|
|
1980
|
-
id: userIdentifierIdSchema,
|
|
1981
|
-
user_id: userIdSchema,
|
|
1982
|
-
user_auth_provider: userAuthProviderSchema,
|
|
1983
|
-
identifier: z.string(),
|
|
1984
|
-
display_name: z.string(),
|
|
1985
|
-
external_provider_email: z.string().nullable(),
|
|
1986
|
-
is_sensitive_values_masked: z.boolean(),
|
|
1987
|
-
created_at: z.number(),
|
|
1988
|
-
updated_at: z.number().nullable()
|
|
1989
|
-
});
|
|
1990
|
-
|
|
1991
|
-
export const deletedSessionsPayloadSchema = z.object({
|
|
1992
|
-
deleted_session_ids: z.array(z.string())
|
|
1993
|
-
});
|
|
1994
|
-
|
|
1995
|
-
export const userSessionPayloadSchema = z.object({
|
|
1996
|
-
id: userSessionIdSchema,
|
|
1997
|
-
user_id: userIdSchema,
|
|
1998
|
-
user_role: userRoleSchema,
|
|
1999
|
-
identifier: z.string(),
|
|
2000
|
-
identifier_id: userIdentifierIdSchema,
|
|
2001
|
-
identifier_display_name: z.string(),
|
|
2002
|
-
identifier_auth_provider: userAuthProviderSchema,
|
|
2003
|
-
client_device_info: clientDeviceInfoPayloadSchema,
|
|
2004
|
-
user_agent: z.string().nullable(),
|
|
2005
|
-
ip_address: z.string().nullable(),
|
|
2006
|
-
expires_at: z.number(),
|
|
2007
|
-
last_accessed_at: z.number(),
|
|
2008
|
-
last_reauthenticated_at: z.number(),
|
|
2009
|
-
is_sensitive_values_masked: z.boolean(),
|
|
2010
|
-
created_at: z.number(),
|
|
2011
|
-
updated_at: z.number().nullable()
|
|
2012
|
-
});
|
|
2013
|
-
|
|
2014
|
-
export const refreshTokenPayloadSchema = z.object({
|
|
2015
|
-
refresh_token: z.string()
|
|
2016
|
-
});
|
|
2017
|
-
|
|
2018
1880
|
export const sessionTokenPayloadSchema = z.object({
|
|
2019
1881
|
access_token: z.string(),
|
|
2020
1882
|
refresh_token: z.string(),
|
|
@@ -2047,6 +1909,41 @@ role: userRoleSchema,
|
|
|
2047
1909
|
account_status: userAccountStatusSchema
|
|
2048
1910
|
});
|
|
2049
1911
|
|
|
1912
|
+
export const userIdentifierPayloadSchema = z.object({
|
|
1913
|
+
id: userIdentifierIdSchema,
|
|
1914
|
+
user_id: userIdSchema,
|
|
1915
|
+
user_auth_provider: userAuthProviderSchema,
|
|
1916
|
+
identifier: z.string(),
|
|
1917
|
+
display_name: z.string(),
|
|
1918
|
+
external_provider_email: z.string().nullable(),
|
|
1919
|
+
is_sensitive_values_masked: z.boolean(),
|
|
1920
|
+
created_at: z.number(),
|
|
1921
|
+
updated_at: z.number().nullable()
|
|
1922
|
+
});
|
|
1923
|
+
|
|
1924
|
+
export const deletedSessionsPayloadSchema = z.object({
|
|
1925
|
+
deleted_session_ids: z.array(z.string())
|
|
1926
|
+
});
|
|
1927
|
+
|
|
1928
|
+
export const refreshTokenPayloadSchema = z.object({
|
|
1929
|
+
refresh_token: z.string()
|
|
1930
|
+
});
|
|
1931
|
+
|
|
1932
|
+
export const totpRecoveryCodesPayloadSchema = z.object({
|
|
1933
|
+
totp_recovery_codes: z.array(z.string())
|
|
1934
|
+
});
|
|
1935
|
+
|
|
1936
|
+
export const totpSetupPayloadSchema = z.object({
|
|
1937
|
+
totp_secret_key: z.string(),
|
|
1938
|
+
totp_otp_auth_url: z.string(),
|
|
1939
|
+
mfa_token: z.string()
|
|
1940
|
+
});
|
|
1941
|
+
|
|
1942
|
+
export const verifyTotpPayloadSchema = z.object({
|
|
1943
|
+
mfa_token: z.string(),
|
|
1944
|
+
totp_code: z.string()
|
|
1945
|
+
});
|
|
1946
|
+
|
|
2050
1947
|
export const socketFrameSchema = z.object({
|
|
2051
1948
|
id: userIdSchema,
|
|
2052
1949
|
type: z.string(),
|
|
@@ -2065,6 +1962,109 @@ operation_system_version: z.string().nullable(),
|
|
|
2065
1962
|
api_version: z.string().nullable()
|
|
2066
1963
|
});
|
|
2067
1964
|
|
|
1965
|
+
export const clientInfoPayloadSchema = z.object({
|
|
1966
|
+
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1967
|
+
user_agent: z.string().nullable(),
|
|
1968
|
+
ip_address: z.string().nullable(),
|
|
1969
|
+
api_version: z.string().nullable()
|
|
1970
|
+
});
|
|
1971
|
+
|
|
1972
|
+
export const userSessionPayloadSchema = z.object({
|
|
1973
|
+
id: userSessionIdSchema,
|
|
1974
|
+
user_id: userIdSchema,
|
|
1975
|
+
user_role: userRoleSchema,
|
|
1976
|
+
identifier: z.string(),
|
|
1977
|
+
identifier_id: userIdentifierIdSchema,
|
|
1978
|
+
identifier_display_name: z.string(),
|
|
1979
|
+
identifier_auth_provider: userAuthProviderSchema,
|
|
1980
|
+
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1981
|
+
user_agent: z.string().nullable(),
|
|
1982
|
+
ip_address: z.string().nullable(),
|
|
1983
|
+
expires_at: z.number(),
|
|
1984
|
+
last_accessed_at: z.number(),
|
|
1985
|
+
last_reauthenticated_at: z.number(),
|
|
1986
|
+
is_sensitive_values_masked: z.boolean(),
|
|
1987
|
+
created_at: z.number(),
|
|
1988
|
+
updated_at: z.number().nullable()
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
export const auditEventPayloadSchema = z.object({
|
|
1992
|
+
id: auditEventIdSchema,
|
|
1993
|
+
actor_id: userIdSchema.nullable(),
|
|
1994
|
+
actor_type: auditActorTypeSchema,
|
|
1995
|
+
actor_user_role: userRoleSchema.nullable(),
|
|
1996
|
+
action: z.string(),
|
|
1997
|
+
resource: z.string(),
|
|
1998
|
+
resource_id: z.string().nullable(),
|
|
1999
|
+
status: auditStatusSchema,
|
|
2000
|
+
metadata: z.array(auditEventMetadataPayloadSchema),
|
|
2001
|
+
message: z.string().nullable(),
|
|
2002
|
+
created_at: z.number()
|
|
2003
|
+
});
|
|
2004
|
+
|
|
2005
|
+
export const authDataPayloadSchema = z.object({
|
|
2006
|
+
user: userDetailsPayloadSchema,
|
|
2007
|
+
session_token: sessionTokenPayloadSchema
|
|
2008
|
+
});
|
|
2009
|
+
|
|
2010
|
+
export const managementAuthSettingsPayloadSchema = z.object({
|
|
2011
|
+
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
2012
|
+
max_total_identifiers: z.number(),
|
|
2013
|
+
max_email_identifiers: z.number(),
|
|
2014
|
+
max_phone_identifiers: z.number(),
|
|
2015
|
+
max_identifiers_per_external_provider: z.number(),
|
|
2016
|
+
max_active_sessions_for_open_user: z.number(),
|
|
2017
|
+
max_active_sessions_for_management_user: z.number(),
|
|
2018
|
+
access_token_validity_seconds: z.number(),
|
|
2019
|
+
refresh_token_validity_seconds: z.number(),
|
|
2020
|
+
account_deletion_grace_period_seconds: z.number(),
|
|
2021
|
+
account_deletion_check_interval_seconds: z.number(),
|
|
2022
|
+
is_registration_enabled: z.boolean(),
|
|
2023
|
+
open_email_restriction_policy: emailRestrictionPolicyPayloadSchema,
|
|
2024
|
+
management_email_restriction_policy: emailRestrictionPolicyPayloadSchema
|
|
2025
|
+
});
|
|
2026
|
+
|
|
2027
|
+
export const openAuthSettingsPayloadSchema = z.object({
|
|
2028
|
+
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
2029
|
+
max_total_identifiers: z.number(),
|
|
2030
|
+
max_email_identifiers: z.number(),
|
|
2031
|
+
max_phone_identifiers: z.number(),
|
|
2032
|
+
max_identifiers_per_external_provider: z.number(),
|
|
2033
|
+
is_registration_enabled: z.boolean()
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
export const managementSecuritySettingsPayloadSchema = z.object({
|
|
2037
|
+
recent_authentication_validity_seconds_for_open_user: z.number(),
|
|
2038
|
+
recent_authentication_validity_seconds_for_management_user: z.number(),
|
|
2039
|
+
management_password_policy: managementPasswordPolicyPayloadSchema,
|
|
2040
|
+
otp_confirmation: otpConfirmationPayloadSchema,
|
|
2041
|
+
account_lockout_policy: accountLockoutPolicyPayloadSchema,
|
|
2042
|
+
account_lockout_check_interval_seconds: z.number(),
|
|
2043
|
+
open_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
2044
|
+
management_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
2045
|
+
expiration_seconds: z.number(),
|
|
2046
|
+
max_requests_per_period: z.number(),
|
|
2047
|
+
rate_limit_period_seconds: z.number(),
|
|
2048
|
+
refresh_token_rotation_grace_period_seconds: z.number()
|
|
2049
|
+
});
|
|
2050
|
+
|
|
2051
|
+
export const openSecuritySettingsPayloadSchema = z.object({
|
|
2052
|
+
open_password_policy: openPasswordPolicyPayloadSchema,
|
|
2053
|
+
otp_confirmation: otpConfirmationPayloadSchema
|
|
2054
|
+
});
|
|
2055
|
+
|
|
2056
|
+
export const managementUserConfigurationPayloadSchema = z.object({
|
|
2057
|
+
management_global_settings: managementGlobalSettingsPayloadSchema,
|
|
2058
|
+
management_security_settings: managementSecuritySettingsPayloadSchema,
|
|
2059
|
+
management_auth_settings: managementAuthSettingsPayloadSchema
|
|
2060
|
+
});
|
|
2061
|
+
|
|
2062
|
+
export const openUserConfigurationPayloadSchema = z.object({
|
|
2063
|
+
open_global_settings: openGlobalSettingsPayloadSchema,
|
|
2064
|
+
open_security_settings: openSecuritySettingsPayloadSchema,
|
|
2065
|
+
open_auth_settings: openAuthSettingsPayloadSchema
|
|
2066
|
+
});
|
|
2067
|
+
|
|
2068
2068
|
export const createByEmailRequestSchema = z.object({
|
|
2069
2069
|
email: z.string(),
|
|
2070
2070
|
password: z.string().nullable(),
|
package/index.mjs
CHANGED
|
@@ -1791,13 +1791,6 @@ message: z.string(),
|
|
|
1791
1791
|
args: z.record(z.string(), z.string())
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
1794
|
-
export const clientInfoPayloadSchema = z.object({
|
|
1795
|
-
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1796
|
-
user_agent: z.string().nullable(),
|
|
1797
|
-
ip_address: z.string().nullable(),
|
|
1798
|
-
api_version: z.string().nullable()
|
|
1799
|
-
});
|
|
1800
|
-
|
|
1801
1794
|
export const clientDeviceInfoPayloadSchema = z.object({
|
|
1802
1795
|
client_type: clientTypeSchema.nullable(),
|
|
1803
1796
|
language: z.string().nullable(),
|
|
@@ -1849,41 +1842,6 @@ require_digit: z.boolean(),
|
|
|
1849
1842
|
require_special_char: z.boolean()
|
|
1850
1843
|
});
|
|
1851
1844
|
|
|
1852
|
-
export const managementSecuritySettingsPayloadSchema = z.object({
|
|
1853
|
-
recent_authentication_validity_seconds_for_open_user: z.number(),
|
|
1854
|
-
recent_authentication_validity_seconds_for_management_user: z.number(),
|
|
1855
|
-
management_password_policy: managementPasswordPolicyPayloadSchema,
|
|
1856
|
-
otp_confirmation: otpConfirmationPayloadSchema,
|
|
1857
|
-
account_lockout_policy: accountLockoutPolicyPayloadSchema,
|
|
1858
|
-
account_lockout_check_interval_seconds: z.number(),
|
|
1859
|
-
open_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
1860
|
-
management_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
1861
|
-
expiration_seconds: z.number(),
|
|
1862
|
-
max_requests_per_period: z.number(),
|
|
1863
|
-
rate_limit_period_seconds: z.number(),
|
|
1864
|
-
refresh_token_rotation_grace_period_seconds: z.number()
|
|
1865
|
-
});
|
|
1866
|
-
|
|
1867
|
-
export const openSecuritySettingsPayloadSchema = z.object({
|
|
1868
|
-
open_password_policy: openPasswordPolicyPayloadSchema,
|
|
1869
|
-
otp_confirmation: otpConfirmationPayloadSchema
|
|
1870
|
-
});
|
|
1871
|
-
|
|
1872
|
-
export const totpRecoveryCodesPayloadSchema = z.object({
|
|
1873
|
-
totp_recovery_codes: z.array(z.string())
|
|
1874
|
-
});
|
|
1875
|
-
|
|
1876
|
-
export const totpSetupPayloadSchema = z.object({
|
|
1877
|
-
totp_secret_key: z.string(),
|
|
1878
|
-
totp_otp_auth_url: z.string(),
|
|
1879
|
-
mfa_token: z.string()
|
|
1880
|
-
});
|
|
1881
|
-
|
|
1882
|
-
export const verifyTotpPayloadSchema = z.object({
|
|
1883
|
-
mfa_token: z.string(),
|
|
1884
|
-
totp_code: z.string()
|
|
1885
|
-
});
|
|
1886
|
-
|
|
1887
1845
|
export const managementGlobalSettingsPayloadSchema = z.object({
|
|
1888
1846
|
privacy_policy_url: z.string().nullable(),
|
|
1889
1847
|
terms_of_service_url: z.string().nullable(),
|
|
@@ -1901,74 +1859,17 @@ contact_support_email: z.string().nullable(),
|
|
|
1901
1859
|
min_supported_app_versions: z.record(z.string(), z.string())
|
|
1902
1860
|
});
|
|
1903
1861
|
|
|
1904
|
-
export const auditEventPayloadSchema = z.object({
|
|
1905
|
-
id: auditEventIdSchema,
|
|
1906
|
-
actor_id: userIdSchema.nullable(),
|
|
1907
|
-
actor_type: auditActorTypeSchema,
|
|
1908
|
-
actor_user_role: userRoleSchema.nullable(),
|
|
1909
|
-
action: z.string(),
|
|
1910
|
-
resource: z.string(),
|
|
1911
|
-
resource_id: z.string().nullable(),
|
|
1912
|
-
status: auditStatusSchema,
|
|
1913
|
-
metadata: z.array(auditEventMetadataPayloadSchema),
|
|
1914
|
-
message: z.string().nullable(),
|
|
1915
|
-
created_at: z.number()
|
|
1916
|
-
});
|
|
1917
|
-
|
|
1918
1862
|
export const auditEventMetadataPayloadSchema = z.object({
|
|
1919
1863
|
key: z.string(),
|
|
1920
1864
|
value: z.string(),
|
|
1921
1865
|
value_sensitivity: auditValueSensitivitySchema
|
|
1922
1866
|
});
|
|
1923
1867
|
|
|
1924
|
-
export const authDataPayloadSchema = z.object({
|
|
1925
|
-
user: userDetailsPayloadSchema,
|
|
1926
|
-
session_token: sessionTokenPayloadSchema
|
|
1927
|
-
});
|
|
1928
|
-
|
|
1929
1868
|
export const availableAuthProvidersPayloadSchema = z.object({
|
|
1930
1869
|
primary: z.array(z.string()),
|
|
1931
1870
|
secondary: z.array(z.string())
|
|
1932
1871
|
});
|
|
1933
1872
|
|
|
1934
|
-
export const managementAuthSettingsPayloadSchema = z.object({
|
|
1935
|
-
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
1936
|
-
max_total_identifiers: z.number(),
|
|
1937
|
-
max_email_identifiers: z.number(),
|
|
1938
|
-
max_phone_identifiers: z.number(),
|
|
1939
|
-
max_identifiers_per_external_provider: z.number(),
|
|
1940
|
-
max_active_sessions_for_open_user: z.number(),
|
|
1941
|
-
max_active_sessions_for_management_user: z.number(),
|
|
1942
|
-
access_token_validity_seconds: z.number(),
|
|
1943
|
-
refresh_token_validity_seconds: z.number(),
|
|
1944
|
-
account_deletion_grace_period_seconds: z.number(),
|
|
1945
|
-
account_deletion_check_interval_seconds: z.number(),
|
|
1946
|
-
is_registration_enabled: z.boolean(),
|
|
1947
|
-
open_email_restriction_policy: emailRestrictionPolicyPayloadSchema,
|
|
1948
|
-
management_email_restriction_policy: emailRestrictionPolicyPayloadSchema
|
|
1949
|
-
});
|
|
1950
|
-
|
|
1951
|
-
export const openAuthSettingsPayloadSchema = z.object({
|
|
1952
|
-
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
1953
|
-
max_total_identifiers: z.number(),
|
|
1954
|
-
max_email_identifiers: z.number(),
|
|
1955
|
-
max_phone_identifiers: z.number(),
|
|
1956
|
-
max_identifiers_per_external_provider: z.number(),
|
|
1957
|
-
is_registration_enabled: z.boolean()
|
|
1958
|
-
});
|
|
1959
|
-
|
|
1960
|
-
export const managementUserConfigurationPayloadSchema = z.object({
|
|
1961
|
-
management_global_settings: managementGlobalSettingsPayloadSchema,
|
|
1962
|
-
management_security_settings: managementSecuritySettingsPayloadSchema,
|
|
1963
|
-
management_auth_settings: managementAuthSettingsPayloadSchema
|
|
1964
|
-
});
|
|
1965
|
-
|
|
1966
|
-
export const openUserConfigurationPayloadSchema = z.object({
|
|
1967
|
-
open_global_settings: openGlobalSettingsPayloadSchema,
|
|
1968
|
-
open_security_settings: openSecuritySettingsPayloadSchema,
|
|
1969
|
-
open_auth_settings: openAuthSettingsPayloadSchema
|
|
1970
|
-
});
|
|
1971
|
-
|
|
1972
1873
|
export const emailRestrictionPolicyPayloadSchema = z.object({
|
|
1973
1874
|
is_blacklist_enabled: z.boolean(),
|
|
1974
1875
|
blacklist: z.array(z.string()),
|
|
@@ -1976,45 +1877,6 @@ is_whitelist_enabled: z.boolean(),
|
|
|
1976
1877
|
whitelist: z.array(z.string())
|
|
1977
1878
|
});
|
|
1978
1879
|
|
|
1979
|
-
export const userIdentifierPayloadSchema = z.object({
|
|
1980
|
-
id: userIdentifierIdSchema,
|
|
1981
|
-
user_id: userIdSchema,
|
|
1982
|
-
user_auth_provider: userAuthProviderSchema,
|
|
1983
|
-
identifier: z.string(),
|
|
1984
|
-
display_name: z.string(),
|
|
1985
|
-
external_provider_email: z.string().nullable(),
|
|
1986
|
-
is_sensitive_values_masked: z.boolean(),
|
|
1987
|
-
created_at: z.number(),
|
|
1988
|
-
updated_at: z.number().nullable()
|
|
1989
|
-
});
|
|
1990
|
-
|
|
1991
|
-
export const deletedSessionsPayloadSchema = z.object({
|
|
1992
|
-
deleted_session_ids: z.array(z.string())
|
|
1993
|
-
});
|
|
1994
|
-
|
|
1995
|
-
export const userSessionPayloadSchema = z.object({
|
|
1996
|
-
id: userSessionIdSchema,
|
|
1997
|
-
user_id: userIdSchema,
|
|
1998
|
-
user_role: userRoleSchema,
|
|
1999
|
-
identifier: z.string(),
|
|
2000
|
-
identifier_id: userIdentifierIdSchema,
|
|
2001
|
-
identifier_display_name: z.string(),
|
|
2002
|
-
identifier_auth_provider: userAuthProviderSchema,
|
|
2003
|
-
client_device_info: clientDeviceInfoPayloadSchema,
|
|
2004
|
-
user_agent: z.string().nullable(),
|
|
2005
|
-
ip_address: z.string().nullable(),
|
|
2006
|
-
expires_at: z.number(),
|
|
2007
|
-
last_accessed_at: z.number(),
|
|
2008
|
-
last_reauthenticated_at: z.number(),
|
|
2009
|
-
is_sensitive_values_masked: z.boolean(),
|
|
2010
|
-
created_at: z.number(),
|
|
2011
|
-
updated_at: z.number().nullable()
|
|
2012
|
-
});
|
|
2013
|
-
|
|
2014
|
-
export const refreshTokenPayloadSchema = z.object({
|
|
2015
|
-
refresh_token: z.string()
|
|
2016
|
-
});
|
|
2017
|
-
|
|
2018
1880
|
export const sessionTokenPayloadSchema = z.object({
|
|
2019
1881
|
access_token: z.string(),
|
|
2020
1882
|
refresh_token: z.string(),
|
|
@@ -2047,6 +1909,41 @@ role: userRoleSchema,
|
|
|
2047
1909
|
account_status: userAccountStatusSchema
|
|
2048
1910
|
});
|
|
2049
1911
|
|
|
1912
|
+
export const userIdentifierPayloadSchema = z.object({
|
|
1913
|
+
id: userIdentifierIdSchema,
|
|
1914
|
+
user_id: userIdSchema,
|
|
1915
|
+
user_auth_provider: userAuthProviderSchema,
|
|
1916
|
+
identifier: z.string(),
|
|
1917
|
+
display_name: z.string(),
|
|
1918
|
+
external_provider_email: z.string().nullable(),
|
|
1919
|
+
is_sensitive_values_masked: z.boolean(),
|
|
1920
|
+
created_at: z.number(),
|
|
1921
|
+
updated_at: z.number().nullable()
|
|
1922
|
+
});
|
|
1923
|
+
|
|
1924
|
+
export const deletedSessionsPayloadSchema = z.object({
|
|
1925
|
+
deleted_session_ids: z.array(z.string())
|
|
1926
|
+
});
|
|
1927
|
+
|
|
1928
|
+
export const refreshTokenPayloadSchema = z.object({
|
|
1929
|
+
refresh_token: z.string()
|
|
1930
|
+
});
|
|
1931
|
+
|
|
1932
|
+
export const totpRecoveryCodesPayloadSchema = z.object({
|
|
1933
|
+
totp_recovery_codes: z.array(z.string())
|
|
1934
|
+
});
|
|
1935
|
+
|
|
1936
|
+
export const totpSetupPayloadSchema = z.object({
|
|
1937
|
+
totp_secret_key: z.string(),
|
|
1938
|
+
totp_otp_auth_url: z.string(),
|
|
1939
|
+
mfa_token: z.string()
|
|
1940
|
+
});
|
|
1941
|
+
|
|
1942
|
+
export const verifyTotpPayloadSchema = z.object({
|
|
1943
|
+
mfa_token: z.string(),
|
|
1944
|
+
totp_code: z.string()
|
|
1945
|
+
});
|
|
1946
|
+
|
|
2050
1947
|
export const socketFrameSchema = z.object({
|
|
2051
1948
|
id: userIdSchema,
|
|
2052
1949
|
type: z.string(),
|
|
@@ -2065,6 +1962,109 @@ operation_system_version: z.string().nullable(),
|
|
|
2065
1962
|
api_version: z.string().nullable()
|
|
2066
1963
|
});
|
|
2067
1964
|
|
|
1965
|
+
export const clientInfoPayloadSchema = z.object({
|
|
1966
|
+
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1967
|
+
user_agent: z.string().nullable(),
|
|
1968
|
+
ip_address: z.string().nullable(),
|
|
1969
|
+
api_version: z.string().nullable()
|
|
1970
|
+
});
|
|
1971
|
+
|
|
1972
|
+
export const userSessionPayloadSchema = z.object({
|
|
1973
|
+
id: userSessionIdSchema,
|
|
1974
|
+
user_id: userIdSchema,
|
|
1975
|
+
user_role: userRoleSchema,
|
|
1976
|
+
identifier: z.string(),
|
|
1977
|
+
identifier_id: userIdentifierIdSchema,
|
|
1978
|
+
identifier_display_name: z.string(),
|
|
1979
|
+
identifier_auth_provider: userAuthProviderSchema,
|
|
1980
|
+
client_device_info: clientDeviceInfoPayloadSchema,
|
|
1981
|
+
user_agent: z.string().nullable(),
|
|
1982
|
+
ip_address: z.string().nullable(),
|
|
1983
|
+
expires_at: z.number(),
|
|
1984
|
+
last_accessed_at: z.number(),
|
|
1985
|
+
last_reauthenticated_at: z.number(),
|
|
1986
|
+
is_sensitive_values_masked: z.boolean(),
|
|
1987
|
+
created_at: z.number(),
|
|
1988
|
+
updated_at: z.number().nullable()
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
export const auditEventPayloadSchema = z.object({
|
|
1992
|
+
id: auditEventIdSchema,
|
|
1993
|
+
actor_id: userIdSchema.nullable(),
|
|
1994
|
+
actor_type: auditActorTypeSchema,
|
|
1995
|
+
actor_user_role: userRoleSchema.nullable(),
|
|
1996
|
+
action: z.string(),
|
|
1997
|
+
resource: z.string(),
|
|
1998
|
+
resource_id: z.string().nullable(),
|
|
1999
|
+
status: auditStatusSchema,
|
|
2000
|
+
metadata: z.array(auditEventMetadataPayloadSchema),
|
|
2001
|
+
message: z.string().nullable(),
|
|
2002
|
+
created_at: z.number()
|
|
2003
|
+
});
|
|
2004
|
+
|
|
2005
|
+
export const authDataPayloadSchema = z.object({
|
|
2006
|
+
user: userDetailsPayloadSchema,
|
|
2007
|
+
session_token: sessionTokenPayloadSchema
|
|
2008
|
+
});
|
|
2009
|
+
|
|
2010
|
+
export const managementAuthSettingsPayloadSchema = z.object({
|
|
2011
|
+
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
2012
|
+
max_total_identifiers: z.number(),
|
|
2013
|
+
max_email_identifiers: z.number(),
|
|
2014
|
+
max_phone_identifiers: z.number(),
|
|
2015
|
+
max_identifiers_per_external_provider: z.number(),
|
|
2016
|
+
max_active_sessions_for_open_user: z.number(),
|
|
2017
|
+
max_active_sessions_for_management_user: z.number(),
|
|
2018
|
+
access_token_validity_seconds: z.number(),
|
|
2019
|
+
refresh_token_validity_seconds: z.number(),
|
|
2020
|
+
account_deletion_grace_period_seconds: z.number(),
|
|
2021
|
+
account_deletion_check_interval_seconds: z.number(),
|
|
2022
|
+
is_registration_enabled: z.boolean(),
|
|
2023
|
+
open_email_restriction_policy: emailRestrictionPolicyPayloadSchema,
|
|
2024
|
+
management_email_restriction_policy: emailRestrictionPolicyPayloadSchema
|
|
2025
|
+
});
|
|
2026
|
+
|
|
2027
|
+
export const openAuthSettingsPayloadSchema = z.object({
|
|
2028
|
+
available_auth_providers: availableAuthProvidersPayloadSchema,
|
|
2029
|
+
max_total_identifiers: z.number(),
|
|
2030
|
+
max_email_identifiers: z.number(),
|
|
2031
|
+
max_phone_identifiers: z.number(),
|
|
2032
|
+
max_identifiers_per_external_provider: z.number(),
|
|
2033
|
+
is_registration_enabled: z.boolean()
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
export const managementSecuritySettingsPayloadSchema = z.object({
|
|
2037
|
+
recent_authentication_validity_seconds_for_open_user: z.number(),
|
|
2038
|
+
recent_authentication_validity_seconds_for_management_user: z.number(),
|
|
2039
|
+
management_password_policy: managementPasswordPolicyPayloadSchema,
|
|
2040
|
+
otp_confirmation: otpConfirmationPayloadSchema,
|
|
2041
|
+
account_lockout_policy: accountLockoutPolicyPayloadSchema,
|
|
2042
|
+
account_lockout_check_interval_seconds: z.number(),
|
|
2043
|
+
open_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
2044
|
+
management_ip_restriction_policy: ipRestrictionPolicyPayloadSchema,
|
|
2045
|
+
expiration_seconds: z.number(),
|
|
2046
|
+
max_requests_per_period: z.number(),
|
|
2047
|
+
rate_limit_period_seconds: z.number(),
|
|
2048
|
+
refresh_token_rotation_grace_period_seconds: z.number()
|
|
2049
|
+
});
|
|
2050
|
+
|
|
2051
|
+
export const openSecuritySettingsPayloadSchema = z.object({
|
|
2052
|
+
open_password_policy: openPasswordPolicyPayloadSchema,
|
|
2053
|
+
otp_confirmation: otpConfirmationPayloadSchema
|
|
2054
|
+
});
|
|
2055
|
+
|
|
2056
|
+
export const managementUserConfigurationPayloadSchema = z.object({
|
|
2057
|
+
management_global_settings: managementGlobalSettingsPayloadSchema,
|
|
2058
|
+
management_security_settings: managementSecuritySettingsPayloadSchema,
|
|
2059
|
+
management_auth_settings: managementAuthSettingsPayloadSchema
|
|
2060
|
+
});
|
|
2061
|
+
|
|
2062
|
+
export const openUserConfigurationPayloadSchema = z.object({
|
|
2063
|
+
open_global_settings: openGlobalSettingsPayloadSchema,
|
|
2064
|
+
open_security_settings: openSecuritySettingsPayloadSchema,
|
|
2065
|
+
open_auth_settings: openAuthSettingsPayloadSchema
|
|
2066
|
+
});
|
|
2067
|
+
|
|
2068
2068
|
export const createByEmailRequestSchema = z.object({
|
|
2069
2069
|
email: z.string(),
|
|
2070
2070
|
password: z.string().nullable(),
|