@logto/schemas 1.13.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alterations/1.0.0-1677208902-update-admin-console-config.ts +2 -2
- package/alterations/1.0.0-1677765137-seed-for-admin-tenant.ts +2 -2
- package/alterations/1.0.0-1677907982-allow-admin-create-multiple-tenants.ts +1 -1
- package/alterations/1.0.0-1678157950-privacy-policy-url.ts +1 -1
- package/alterations/1.0.0-1678199795-add-verification-status-table.ts +2 -2
- package/alterations/1.0.0-1678259693-remove-branding-style-config.ts +2 -2
- package/alterations/1.0.0-1678269972-use-restrictive-policies.ts +2 -2
- package/alterations/1.0.0-1678284778-restrict-internal-roles.ts +1 -1
- package/alterations/1.0.0-1678425761-m2m-app-for-tenants.ts +1 -1
- package/alterations/1.0.0-1678450233-support-custom-content.ts +1 -1
- package/alterations/1.0.0-1678716747-service-logs.ts +2 -2
- package/alterations/1.0.0-1678928481-remove-deprecated-logto-config-item.ts +2 -2
- package/alterations/1.0.0-1678953179-update-get-started-task-config.ts +2 -2
- package/alterations/1.0.0-1679209413-drop-connector-database-storage.ts +1 -1
- package/alterations/1.0.0_beta.10-1-logto-config.ts +1 -1
- package/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts +1 -1
- package/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts +1 -1
- package/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts +1 -1
- package/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts +1 -1
- package/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts +1 -1
- package/alterations/1.0.0_beta.14-1665300135-sign-in-sign-up.ts +1 -1
- package/alterations/1.0.0_beta.14-1667283640-remove-forgot-password.ts +1 -1
- package/alterations/1.0.0_beta.14-1667292082-remove-sign-in-method.ts +1 -1
- package/alterations/1.0.0_beta.14-1667374974-user-suspend.ts +1 -1
- package/alterations/1.0.0_beta.14-1667900481-add-passcode-type-continue.ts +1 -1
- package/alterations/1.0.0_beta.18-1668666590-support-multiple-connector-instances.ts +1 -1
- package/alterations/1.0.0_beta.18-1668666600-remove-connector-enabled.ts +1 -1
- package/alterations/1.0.0_beta.18-1669091623-roles-and-scopes.ts +1 -1
- package/alterations/1.0.0_beta.18-1669702299-sign-up.ts +2 -2
- package/alterations/1.0.0_beta.18-1671039448-add-user-name-index.ts +1 -1
- package/alterations/1.0.0_beta.18-1671080370-terms-of-use.ts +2 -2
- package/alterations/1.0.0_beta.18-1671336831-refactor-log-types.ts +1 -1
- package/alterations/1.0.0_beta.18-1671509870-hooks.ts +1 -1
- package/alterations/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.ts +1 -1
- package/alterations/1.0.0_rc.0-1672815959-user-roles.ts +1 -1
- package/alterations/1.0.0_rc.0-1672820345-scope-resource-id.ts +1 -1
- package/alterations/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.ts +1 -1
- package/alterations/1.0.0_rc.0-1673001922-support-generic-passcode.ts +1 -1
- package/alterations/1.0.0_rc.0-1673165463-scope-name-index.ts +1 -1
- package/alterations/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.ts +1 -1
- package/alterations/1.0.0_rc.0-1673465463-ac-scope-name.ts +1 -1
- package/alterations/1.0.0_rc.0-1673853579-ac-default-scope.ts +1 -1
- package/alterations/1.0.0_rc.0-1673863835-ac-scope-role.ts +1 -1
- package/alterations/1.0.0_rc.0-1673882867-fix-alteration-issues.ts +1 -1
- package/alterations/1.0.0_rc.0-1673940577-scope-description-not-null.ts +1 -1
- package/alterations/1.0.0_rc.0-1673941897-application-roles.ts +1 -1
- package/alterations/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.ts +1 -1
- package/alterations/1.0.0_rc.0-1674032095.2-oidc-model-pkey.ts +1 -1
- package/alterations/1.0.0_rc.0-1674032095.3-tenant-table.ts +1 -1
- package/alterations/1.0.0_rc.0-1674032095.4-add-id-column.ts +1 -1
- package/alterations/1.0.0_rc.0-1674032095.5-multi-tenancy.ts +6 -7
- package/alterations/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.ts +1 -1
- package/alterations/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.ts +1 -1
- package/alterations/1.0.0_rc.0-1675316731-update-seed-data.ts +1 -1
- package/alterations/1.0.0_rc.1-1675788753-multi-tenancy-rls.ts +3 -4
- package/alterations/1.0.0_rc.1-1676115897-add-admin-tenant.ts +3 -4
- package/alterations/1.0.0_rc.1-1676185899-fix-logs-index.ts +1 -1
- package/alterations/1.0.0_rc.1-1676190092-migrate-admin-data.ts +2 -2
- package/alterations/1.0.0_rc.1-1676823841-update-sie-primary-key.ts +1 -1
- package/alterations/1.0.0_rc.1-1676874936-support-custom-css.ts +1 -1
- package/alterations/1.0.0_rc.1-1676886855-connector-database-read-write.ts +1 -1
- package/alterations/1.0.0_rc.1-1676906977-remove-demo-app.ts +1 -1
- package/alterations/1.0.0_rc.1-1676956206-move-console-sie-to-database.ts +1 -1
- package/alterations/1.0.0_rc.1-1677059985-move-console-application-to-database.ts +1 -1
- package/alterations/1.10.1-1695647183-update-private-key-type.ts +2 -2
- package/alterations/1.10.1-1696657546-organization-tables.ts +1 -1
- package/alterations/1.10.1-1697683802-add-sso-connectors-table.ts +1 -1
- package/alterations/1.10.1-1698646271-add-organization-created-flag.ts +2 -2
- package/alterations/1.10.1-1698820410-add-user-sso-identities-table.ts +1 -1
- package/alterations/1.10.1-1698910485-user-logto-data.ts +1 -1
- package/alterations/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.ts +1 -1
- package/alterations/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.ts +1 -1
- package/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts +1 -1
- package/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts +1 -1
- package/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts +1 -1
- package/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts +1 -1
- package/alterations/1.13.0-1702372401-add-application-permissions-tables.ts +1 -1
- package/alterations/1.13.0-1702544178-sync-tenant-orgs.ts +1 -1
- package/alterations/1.13.0-1702871078-protected-application-type.ts +1 -1
- package/alterations/1.13.0-1702877515-protected-app-configs.ts +1 -1
- package/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts +1 -1
- package/alterations/1.13.0-1703229996-daily-token-usage.ts +1 -1
- package/alterations/1.13.0-1703230000-update-tenant-roles.ts +1 -1
- package/alterations/1.13.0-1704692973-remove-legacy-resources.ts +1 -1
- package/alterations/1.13.0-1704934999-add-magic-links-table.ts +1 -1
- package/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts +1 -1
- package/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts +1 -1
- package/alterations/1.13.0-1705991158-update-invitation-indices.ts +1 -1
- package/alterations/1.13.0-1706449174-update-organization-invitation-column.ts +1 -1
- package/alterations/1.13.0-1706510290-protected-app-host-index.ts +1 -1
- package/alterations/1.13.0-1706512952-restore-get-started-page.ts +1 -1
- package/alterations/1.13.0-1706528755-remove-magic-links.ts +1 -1
- package/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts +1 -1
- package/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts +1 -1
- package/alterations/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.ts +47 -0
- package/alterations/1.14.0-1709190131-enhance-dau-data-accuracy.ts +18 -0
- package/alterations/1.15.0-1709521416-user-password-encrypt-method.ts +36 -0
- package/alterations/1.15.0-1709528944-regenerate-dau-data.ts +49 -0
- package/alterations/1.15.0-1710223946-add-fetch-custom-jwt-cloud-scope.ts +92 -0
- package/alterations/1.15.0-1710408335-make-resource-scopes-description-nullable.ts +22 -0
- package/alterations/1.15.0-1710859622-add-oidc-standard-claim-properties.ts +38 -0
- package/alterations/1.15.0-1711607772-remove-invite-member-scope-from-tenant-member-role.ts +20 -0
- package/alterations/1.15.0-1711624564-add-read-member-scope-to-tenant-roles.ts +25 -0
- package/alterations/1.15.0-1711955211-organization-resource-scope.ts +39 -0
- package/alterations/1.15.0-1712041436-rename-organization-member-role-to-collaborator.ts +28 -0
- package/alterations/1.15.0-1712545011-fix-organization-resource-scope.ts +43 -0
- package/alterations/1.15.0-1712559358-fix-down-organization-resource-scope.ts +46 -0
- package/alterations/1.2.0-1681267285-fix-get-started-passwordless-status.ts +1 -1
- package/alterations/1.3.0-1683292832-update-hooks.ts +1 -1
- package/alterations/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.ts +1 -1
- package/alterations/1.5.0-1684739802-create-hook-id-index-for-logs.ts +1 -1
- package/alterations/1.5.0-1684822341-init-domains.ts +2 -2
- package/alterations/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.ts +1 -1
- package/alterations/1.5.0-1685285719-support-default-resource.ts +1 -1
- package/alterations/1.6.0-1685691718-domain-unique.ts +1 -1
- package/alterations/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.ts +1 -1
- package/alterations/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.ts +1 -1
- package/alterations/1.7.0-1688627407-daily-active-users.ts +1 -1
- package/alterations/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.ts +1 -1
- package/alterations/1.8.0-1692194751-add-affiliate-scopes.ts +1 -1
- package/alterations/1.9.0-1693554904-add-possword-policy.ts +1 -1
- package/alterations/1.9.0-1694399696-add-type-col-to-roles-table.ts +1 -1
- package/alterations/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.ts +1 -1
- package/alterations/1.9.0-1694484927-remove-deprecated-challenge-flag.ts +2 -2
- package/alterations/1.9.0-1694487524-sie-mfa.ts +1 -1
- package/alterations/1.9.0-1694509714-keep-existing-password-policy.ts +1 -1
- package/alterations/1.9.0-1694746763-user-verifications.ts +1 -1
- package/alterations/1.9.2-1694854226-init-sentinel.ts +1 -1
- package/alterations/1.9.2-1695198741-remove-m2m-app-admin-access-switch.ts +1 -1
- package/alterations/utils/1704934999-tables.ts +1 -1
- package/alterations-js/1.0.0-1677208902-update-admin-console-config.js +1 -1
- package/alterations-js/1.0.0-1677765137-seed-for-admin-tenant.js +1 -1
- package/alterations-js/1.0.0-1677907982-allow-admin-create-multiple-tenants.js +1 -1
- package/alterations-js/1.0.0-1678157950-privacy-policy-url.js +1 -1
- package/alterations-js/1.0.0-1678199795-add-verification-status-table.js +1 -1
- package/alterations-js/1.0.0-1678259693-remove-branding-style-config.js +1 -1
- package/alterations-js/1.0.0-1678269972-use-restrictive-policies.js +1 -1
- package/alterations-js/1.0.0-1678284778-restrict-internal-roles.js +1 -1
- package/alterations-js/1.0.0-1678425761-m2m-app-for-tenants.js +1 -1
- package/alterations-js/1.0.0-1678450233-support-custom-content.js +1 -1
- package/alterations-js/1.0.0-1678716747-service-logs.js +1 -1
- package/alterations-js/1.0.0-1678928481-remove-deprecated-logto-config-item.js +1 -1
- package/alterations-js/1.0.0-1678953179-update-get-started-task-config.js +1 -1
- package/alterations-js/1.0.0-1679209413-drop-connector-database-storage.js +1 -1
- package/alterations-js/1.0.0_beta.10-1-logto-config.js +1 -1
- package/alterations-js/1.0.0_beta.10-1663923211-machine-to-machine-app.js +1 -1
- package/alterations-js/1.0.0_beta.10-1664265197-custom-phrases.js +1 -1
- package/alterations-js/1.0.0_beta.11-1664347703-rename-language-key-to-tag.js +1 -1
- package/alterations-js/1.0.0_beta.11-1664356000-add-created-at-column-to-users.js +1 -1
- package/alterations-js/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.js +1 -1
- package/alterations-js/1.0.0_beta.14-1665300135-sign-in-sign-up.js +1 -1
- package/alterations-js/1.0.0_beta.14-1667283640-remove-forgot-password.js +1 -1
- package/alterations-js/1.0.0_beta.14-1667292082-remove-sign-in-method.js +1 -1
- package/alterations-js/1.0.0_beta.14-1667374974-user-suspend.js +1 -1
- package/alterations-js/1.0.0_beta.14-1667900481-add-passcode-type-continue.js +1 -1
- package/alterations-js/1.0.0_beta.18-1668666590-support-multiple-connector-instances.js +1 -1
- package/alterations-js/1.0.0_beta.18-1668666600-remove-connector-enabled.js +1 -1
- package/alterations-js/1.0.0_beta.18-1669091623-roles-and-scopes.js +1 -1
- package/alterations-js/1.0.0_beta.18-1669702299-sign-up.js +1 -1
- package/alterations-js/1.0.0_beta.18-1671039448-add-user-name-index.js +1 -1
- package/alterations-js/1.0.0_beta.18-1671080370-terms-of-use.js +1 -1
- package/alterations-js/1.0.0_beta.18-1671336831-refactor-log-types.js +1 -1
- package/alterations-js/1.0.0_beta.18-1671509870-hooks.js +1 -1
- package/alterations-js/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.js +1 -1
- package/alterations-js/1.0.0_rc.0-1672815959-user-roles.js +1 -1
- package/alterations-js/1.0.0_rc.0-1672820345-scope-resource-id.js +1 -1
- package/alterations-js/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673001922-support-generic-passcode.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673165463-scope-name-index.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673465463-ac-scope-name.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673853579-ac-default-scope.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673863835-ac-scope-role.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673882867-fix-alteration-issues.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673940577-scope-description-not-null.js +1 -1
- package/alterations-js/1.0.0_rc.0-1673941897-application-roles.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674032095.2-oidc-model-pkey.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674032095.3-tenant-table.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674032095.4-add-id-column.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674032095.5-multi-tenancy.js +6 -7
- package/alterations-js/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.js +1 -1
- package/alterations-js/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.js +1 -1
- package/alterations-js/1.0.0_rc.0-1675316731-update-seed-data.js +1 -1
- package/alterations-js/1.0.0_rc.1-1675788753-multi-tenancy-rls.js +2 -3
- package/alterations-js/1.0.0_rc.1-1676115897-add-admin-tenant.js +2 -3
- package/alterations-js/1.0.0_rc.1-1676185899-fix-logs-index.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676190092-migrate-admin-data.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676823841-update-sie-primary-key.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676874936-support-custom-css.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676886855-connector-database-read-write.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676906977-remove-demo-app.js +1 -1
- package/alterations-js/1.0.0_rc.1-1676956206-move-console-sie-to-database.js +1 -1
- package/alterations-js/1.0.0_rc.1-1677059985-move-console-application-to-database.js +1 -1
- package/alterations-js/1.10.1-1695647183-update-private-key-type.js +1 -1
- package/alterations-js/1.10.1-1696657546-organization-tables.js +1 -1
- package/alterations-js/1.10.1-1697683802-add-sso-connectors-table.js +1 -1
- package/alterations-js/1.10.1-1698646271-add-organization-created-flag.js +1 -1
- package/alterations-js/1.10.1-1698820410-add-user-sso-identities-table.js +1 -1
- package/alterations-js/1.10.1-1698910485-user-logto-data.js +1 -1
- package/alterations-js/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.js +1 -1
- package/alterations-js/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.js +1 -1
- package/alterations-js/1.12.0-1700031616-update-org-role-foreign-keys.js +1 -1
- package/alterations-js/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.js +1 -1
- package/alterations-js/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.js +1 -1
- package/alterations-js/1.13.0-1702274830-add-new-third-party-column-to-applications-table.js +1 -1
- package/alterations-js/1.13.0-1702372401-add-application-permissions-tables.js +1 -1
- package/alterations-js/1.13.0-1702544178-sync-tenant-orgs.js +1 -1
- package/alterations-js/1.13.0-1702871078-protected-application-type.js +1 -1
- package/alterations-js/1.13.0-1702877515-protected-app-configs.js +1 -1
- package/alterations-js/1.13.0-1702978120-application-sign-in-experience-table.js +1 -1
- package/alterations-js/1.13.0-1703229996-daily-token-usage.js +1 -1
- package/alterations-js/1.13.0-1703230000-update-tenant-roles.js +1 -1
- package/alterations-js/1.13.0-1704692973-remove-legacy-resources.js +1 -1
- package/alterations-js/1.13.0-1704934999-add-magic-links-table.js +1 -1
- package/alterations-js/1.13.0-1704935001-add-organization-invitation-tables.js +1 -1
- package/alterations-js/1.13.0-1705288654-add-application-user-consent-organizations-table.js +1 -1
- package/alterations-js/1.13.0-1705991158-update-invitation-indices.js +1 -1
- package/alterations-js/1.13.0-1706449174-update-organization-invitation-column.js +1 -1
- package/alterations-js/1.13.0-1706510290-protected-app-host-index.js +1 -1
- package/alterations-js/1.13.0-1706512952-restore-get-started-page.js +1 -1
- package/alterations-js/1.13.0-1706528755-remove-magic-links.js +1 -1
- package/alterations-js/1.13.0-1706585206-protected-app-custom-domain-unique.js +1 -1
- package/alterations-js/1.13.1-1707360939-grant-is-suspended-read-permission.js +1 -1
- package/alterations-js/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.d.ts +3 -0
- package/alterations-js/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.js +36 -0
- package/alterations-js/1.14.0-1709190131-enhance-dau-data-accuracy.d.ts +3 -0
- package/alterations-js/1.14.0-1709190131-enhance-dau-data-accuracy.js +14 -0
- package/alterations-js/1.15.0-1709521416-user-password-encrypt-method.d.ts +3 -0
- package/alterations-js/1.15.0-1709521416-user-password-encrypt-method.js +31 -0
- package/alterations-js/1.15.0-1709528944-regenerate-dau-data.d.ts +3 -0
- package/alterations-js/1.15.0-1709528944-regenerate-dau-data.js +34 -0
- package/alterations-js/1.15.0-1710223946-add-fetch-custom-jwt-cloud-scope.d.ts +3 -0
- package/alterations-js/1.15.0-1710223946-add-fetch-custom-jwt-cloud-scope.js +52 -0
- package/alterations-js/1.15.0-1710408335-make-resource-scopes-description-nullable.d.ts +3 -0
- package/alterations-js/1.15.0-1710408335-make-resource-scopes-description-nullable.js +18 -0
- package/alterations-js/1.15.0-1710859622-add-oidc-standard-claim-properties.d.ts +3 -0
- package/alterations-js/1.15.0-1710859622-add-oidc-standard-claim-properties.js +34 -0
- package/alterations-js/1.15.0-1711607772-remove-invite-member-scope-from-tenant-member-role.d.ts +3 -0
- package/alterations-js/1.15.0-1711607772-remove-invite-member-scope-from-tenant-member-role.js +16 -0
- package/alterations-js/1.15.0-1711624564-add-read-member-scope-to-tenant-roles.d.ts +3 -0
- package/alterations-js/1.15.0-1711624564-add-read-member-scope-to-tenant-roles.js +21 -0
- package/alterations-js/1.15.0-1711955211-organization-resource-scope.d.ts +3 -0
- package/alterations-js/1.15.0-1711955211-organization-resource-scope.js +32 -0
- package/alterations-js/1.15.0-1712041436-rename-organization-member-role-to-collaborator.d.ts +3 -0
- package/alterations-js/1.15.0-1712041436-rename-organization-member-role-to-collaborator.js +24 -0
- package/alterations-js/1.15.0-1712545011-fix-organization-resource-scope.d.ts +8 -0
- package/alterations-js/1.15.0-1712545011-fix-organization-resource-scope.js +35 -0
- package/alterations-js/1.15.0-1712559358-fix-down-organization-resource-scope.d.ts +8 -0
- package/alterations-js/1.15.0-1712559358-fix-down-organization-resource-scope.js +38 -0
- package/alterations-js/1.2.0-1681267285-fix-get-started-passwordless-status.js +1 -1
- package/alterations-js/1.3.0-1683292832-update-hooks.js +1 -1
- package/alterations-js/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.js +1 -1
- package/alterations-js/1.5.0-1684739802-create-hook-id-index-for-logs.js +1 -1
- package/alterations-js/1.5.0-1684822341-init-domains.js +1 -1
- package/alterations-js/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.js +1 -1
- package/alterations-js/1.5.0-1685285719-support-default-resource.js +1 -1
- package/alterations-js/1.6.0-1685691718-domain-unique.js +1 -1
- package/alterations-js/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.js +1 -1
- package/alterations-js/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.js +1 -1
- package/alterations-js/1.7.0-1688627407-daily-active-users.js +1 -1
- package/alterations-js/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.js +1 -1
- package/alterations-js/1.8.0-1692194751-add-affiliate-scopes.js +1 -1
- package/alterations-js/1.9.0-1693554904-add-possword-policy.js +1 -1
- package/alterations-js/1.9.0-1694399696-add-type-col-to-roles-table.js +1 -1
- package/alterations-js/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.js +1 -1
- package/alterations-js/1.9.0-1694484927-remove-deprecated-challenge-flag.js +1 -1
- package/alterations-js/1.9.0-1694487524-sie-mfa.js +1 -1
- package/alterations-js/1.9.0-1694509714-keep-existing-password-policy.js +1 -1
- package/alterations-js/1.9.0-1694746763-user-verifications.js +1 -1
- package/alterations-js/1.9.2-1694854226-init-sentinel.js +1 -1
- package/alterations-js/1.9.2-1695198741-remove-m2m-app-admin-access-switch.js +1 -1
- package/alterations-js/utils/1704934999-tables.d.ts +1 -1
- package/alterations-js/utils/1704934999-tables.js +1 -1
- package/lib/consts/experience.d.ts +8 -0
- package/lib/consts/experience.js +9 -0
- package/lib/consts/index.d.ts +1 -0
- package/lib/consts/index.js +1 -0
- package/lib/consts/oidc.d.ts +48 -0
- package/lib/consts/oidc.js +44 -0
- package/lib/consts/subscriptions.d.ts +23 -0
- package/lib/consts/subscriptions.js +23 -0
- package/lib/db-entries/custom-types.d.ts +5 -1
- package/lib/db-entries/custom-types.js +4 -0
- package/lib/db-entries/daily-active-user.d.ts +1 -1
- package/lib/db-entries/daily-active-user.js +1 -1
- package/lib/db-entries/index.d.ts +1 -0
- package/lib/db-entries/index.js +1 -0
- package/lib/db-entries/organization-role-resource-scope-relation.d.ts +20 -0
- package/lib/db-entries/organization-role-resource-scope-relation.js +29 -0
- package/lib/db-entries/scope.d.ts +2 -2
- package/lib/db-entries/scope.js +2 -2
- package/lib/db-entries/user.d.ts +10 -2
- package/lib/db-entries/user.js +9 -1
- package/lib/foundations/jsonb-types/index.d.ts +1 -5
- package/lib/foundations/jsonb-types/index.js +1 -7
- package/lib/foundations/jsonb-types/users.d.ts +103 -6
- package/lib/foundations/jsonb-types/users.js +26 -1
- package/lib/seeds/cloud-api.d.ts +6 -3
- package/lib/seeds/cloud-api.js +6 -2
- package/lib/types/alteration.d.ts +1 -1
- package/lib/types/application.d.ts +7 -7
- package/lib/types/consent.d.ts +100 -16
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.js +2 -1
- package/lib/types/log/index.d.ts +4 -1
- package/lib/types/log/index.js +1 -0
- package/lib/types/log/jwt-customizer.d.ts +8 -0
- package/lib/types/log/jwt-customizer.js +7 -0
- package/lib/types/logto-config/index.d.ts +1097 -0
- package/lib/types/{logto-config.js → logto-config/index.js} +25 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +1719 -0
- package/lib/types/logto-config/jwt-customizer.js +97 -0
- package/lib/types/logto-config/jwt-customizer.test.d.ts +1 -0
- package/lib/types/logto-config/jwt-customizer.test.js +70 -0
- package/lib/types/logto-config/oidc-provider.d.ts +67 -0
- package/lib/types/logto-config/oidc-provider.js +33 -0
- package/lib/types/onboarding.d.ts +144 -0
- package/lib/types/onboarding.js +75 -0
- package/lib/types/organization.d.ts +18 -5
- package/lib/types/organization.js +19 -0
- package/lib/types/scope.d.ts +3 -3
- package/lib/types/service-log.d.ts +2 -1
- package/lib/types/service-log.js +1 -0
- package/lib/types/sso-connector.d.ts +16 -2
- package/lib/types/sso-connector.js +17 -4
- package/lib/types/system.d.ts +2 -2
- package/lib/types/tenant-organization.d.ts +10 -6
- package/lib/types/tenant-organization.js +19 -9
- package/lib/types/user.d.ts +226 -187
- package/lib/types/user.js +5 -1
- package/lib/utils/domain.test.js +1 -0
- package/lib/utils/zod.d.ts +4 -0
- package/lib/utils/zod.js +1 -0
- package/package.json +13 -15
- package/tables/_before_all.sql +1 -1
- package/tables/_functions.sql +8 -0
- package/tables/daily_active_users.sql +1 -1
- package/tables/organization_role_resource_scope_relations.sql +12 -0
- package/tables/scopes.sql +1 -1
- package/tables/users.sql +10 -1
- package/lib/types/logto-config.d.ts +0 -154
package/lib/types/user.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type User } from '../db-entries/index.js';
|
|
3
3
|
import { MfaFactor } from '../foundations/index.js';
|
|
4
|
-
export declare const userInfoSelectFields: readonly
|
|
4
|
+
export declare const userInfoSelectFields: readonly ("name" | "id" | "applicationId" | "username" | "profile" | "createdAt" | "updatedAt" | "primaryEmail" | "primaryPhone" | "avatar" | "identities" | "customData" | "isSuspended" | "lastSignInAt")[];
|
|
5
5
|
export declare const userInfoGuard: z.ZodObject<Pick<{
|
|
6
6
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
7
7
|
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -12,13 +12,54 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
|
|
|
12
12
|
passwordEncryptionMethod: z.ZodType<import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null, z.ZodTypeDef, import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null>;
|
|
13
13
|
name: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
14
14
|
avatar: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
15
|
+
profile: z.ZodType<Partial<{
|
|
16
|
+
familyName: string;
|
|
17
|
+
givenName: string;
|
|
18
|
+
middleName: string;
|
|
19
|
+
nickname: string;
|
|
20
|
+
preferredUsername: string;
|
|
21
|
+
profile: string;
|
|
22
|
+
website: string;
|
|
23
|
+
gender: string;
|
|
24
|
+
birthdate: string;
|
|
25
|
+
zoneinfo: string;
|
|
26
|
+
locale: string;
|
|
27
|
+
address: Partial<{
|
|
28
|
+
formatted: string;
|
|
29
|
+
streetAddress: string;
|
|
30
|
+
locality: string;
|
|
31
|
+
region: string;
|
|
32
|
+
postalCode: string;
|
|
33
|
+
country: string;
|
|
34
|
+
}>;
|
|
35
|
+
}>, z.ZodTypeDef, Partial<{
|
|
36
|
+
familyName: string;
|
|
37
|
+
givenName: string;
|
|
38
|
+
middleName: string;
|
|
39
|
+
nickname: string;
|
|
40
|
+
preferredUsername: string;
|
|
41
|
+
profile: string;
|
|
42
|
+
website: string;
|
|
43
|
+
gender: string;
|
|
44
|
+
birthdate: string;
|
|
45
|
+
zoneinfo: string;
|
|
46
|
+
locale: string;
|
|
47
|
+
address: Partial<{
|
|
48
|
+
formatted: string;
|
|
49
|
+
streetAddress: string;
|
|
50
|
+
locality: string;
|
|
51
|
+
region: string;
|
|
52
|
+
postalCode: string;
|
|
53
|
+
country: string;
|
|
54
|
+
}>;
|
|
55
|
+
}>>;
|
|
15
56
|
applicationId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
16
57
|
identities: z.ZodType<Record<string, {
|
|
17
58
|
userId: string;
|
|
18
|
-
details?: Record<string,
|
|
59
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
19
60
|
}>, z.ZodTypeDef, Record<string, {
|
|
20
61
|
userId: string;
|
|
21
|
-
details?: Record<string,
|
|
62
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
22
63
|
}>>;
|
|
23
64
|
customData: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
24
65
|
logtoConfig: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
@@ -76,96 +117,81 @@ export declare const userInfoGuard: z.ZodObject<Pick<{
|
|
|
76
117
|
isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
77
118
|
lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
|
|
78
119
|
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
79
|
-
|
|
120
|
+
updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
121
|
+
}, "name" | "id" | "applicationId" | "username" | "profile" | "createdAt" | "updatedAt" | "primaryEmail" | "primaryPhone" | "avatar" | "identities" | "customData" | "isSuspended" | "lastSignInAt">, "strip", z.ZodTypeAny, {
|
|
80
122
|
name: string | null;
|
|
81
123
|
id: string;
|
|
82
124
|
applicationId: string | null;
|
|
83
|
-
tenantId: string;
|
|
84
125
|
username: string | null;
|
|
126
|
+
profile: Partial<{
|
|
127
|
+
familyName: string;
|
|
128
|
+
givenName: string;
|
|
129
|
+
middleName: string;
|
|
130
|
+
nickname: string;
|
|
131
|
+
preferredUsername: string;
|
|
132
|
+
profile: string;
|
|
133
|
+
website: string;
|
|
134
|
+
gender: string;
|
|
135
|
+
birthdate: string;
|
|
136
|
+
zoneinfo: string;
|
|
137
|
+
locale: string;
|
|
138
|
+
address: Partial<{
|
|
139
|
+
formatted: string;
|
|
140
|
+
streetAddress: string;
|
|
141
|
+
locality: string;
|
|
142
|
+
region: string;
|
|
143
|
+
postalCode: string;
|
|
144
|
+
country: string;
|
|
145
|
+
}>;
|
|
146
|
+
}>;
|
|
85
147
|
createdAt: number;
|
|
148
|
+
updatedAt: number;
|
|
86
149
|
primaryEmail: string | null;
|
|
87
150
|
primaryPhone: string | null;
|
|
88
|
-
passwordEncrypted: string | null;
|
|
89
|
-
passwordEncryptionMethod: import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null;
|
|
90
151
|
avatar: string | null;
|
|
91
152
|
identities: Record<string, {
|
|
92
153
|
userId: string;
|
|
93
|
-
details?: Record<string,
|
|
154
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
94
155
|
}>;
|
|
95
156
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
96
|
-
logtoConfig: import("@withtyped/server/lib/types.js").JsonObject;
|
|
97
|
-
mfaVerifications: ({
|
|
98
|
-
type: MfaFactor.TOTP;
|
|
99
|
-
id: string;
|
|
100
|
-
key: string;
|
|
101
|
-
createdAt: string;
|
|
102
|
-
lastUsedAt?: string | undefined;
|
|
103
|
-
} | {
|
|
104
|
-
type: MfaFactor.WebAuthn;
|
|
105
|
-
id: string;
|
|
106
|
-
createdAt: string;
|
|
107
|
-
credentialId: string;
|
|
108
|
-
publicKey: string;
|
|
109
|
-
counter: number;
|
|
110
|
-
agent: string;
|
|
111
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
112
|
-
lastUsedAt?: string | undefined;
|
|
113
|
-
} | {
|
|
114
|
-
type: MfaFactor.BackupCode;
|
|
115
|
-
id: string;
|
|
116
|
-
createdAt: string;
|
|
117
|
-
codes: {
|
|
118
|
-
code: string;
|
|
119
|
-
usedAt?: string | undefined;
|
|
120
|
-
}[];
|
|
121
|
-
lastUsedAt?: string | undefined;
|
|
122
|
-
})[];
|
|
123
157
|
isSuspended: boolean;
|
|
124
158
|
lastSignInAt: number | null;
|
|
125
159
|
}, {
|
|
126
160
|
name: string | null;
|
|
127
161
|
id: string;
|
|
128
162
|
applicationId: string | null;
|
|
129
|
-
tenantId: string;
|
|
130
163
|
username: string | null;
|
|
164
|
+
profile: Partial<{
|
|
165
|
+
familyName: string;
|
|
166
|
+
givenName: string;
|
|
167
|
+
middleName: string;
|
|
168
|
+
nickname: string;
|
|
169
|
+
preferredUsername: string;
|
|
170
|
+
profile: string;
|
|
171
|
+
website: string;
|
|
172
|
+
gender: string;
|
|
173
|
+
birthdate: string;
|
|
174
|
+
zoneinfo: string;
|
|
175
|
+
locale: string;
|
|
176
|
+
address: Partial<{
|
|
177
|
+
formatted: string;
|
|
178
|
+
streetAddress: string;
|
|
179
|
+
locality: string;
|
|
180
|
+
region: string;
|
|
181
|
+
postalCode: string;
|
|
182
|
+
country: string;
|
|
183
|
+
}>;
|
|
184
|
+
}>;
|
|
131
185
|
createdAt: number;
|
|
186
|
+
updatedAt: number;
|
|
132
187
|
primaryEmail: string | null;
|
|
133
188
|
primaryPhone: string | null;
|
|
134
|
-
passwordEncrypted: string | null;
|
|
135
|
-
passwordEncryptionMethod: import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null;
|
|
136
189
|
avatar: string | null;
|
|
137
190
|
identities: Record<string, {
|
|
138
191
|
userId: string;
|
|
139
|
-
details?: Record<string,
|
|
192
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
140
193
|
}>;
|
|
141
194
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
142
|
-
logtoConfig: import("@withtyped/server/lib/types.js").JsonObject;
|
|
143
|
-
mfaVerifications: ({
|
|
144
|
-
type: MfaFactor.TOTP;
|
|
145
|
-
id: string;
|
|
146
|
-
key: string;
|
|
147
|
-
createdAt: string;
|
|
148
|
-
lastUsedAt?: string | undefined;
|
|
149
|
-
} | {
|
|
150
|
-
type: MfaFactor.WebAuthn;
|
|
151
|
-
id: string;
|
|
152
|
-
createdAt: string;
|
|
153
|
-
credentialId: string;
|
|
154
|
-
publicKey: string;
|
|
155
|
-
counter: number;
|
|
156
|
-
agent: string;
|
|
157
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
158
|
-
lastUsedAt?: string | undefined;
|
|
159
|
-
} | {
|
|
160
|
-
type: MfaFactor.BackupCode;
|
|
161
|
-
id: string;
|
|
162
|
-
createdAt: string;
|
|
163
|
-
codes: {
|
|
164
|
-
code: string;
|
|
165
|
-
usedAt?: string | undefined;
|
|
166
|
-
}[];
|
|
167
|
-
lastUsedAt?: string | undefined;
|
|
168
|
-
})[];
|
|
169
195
|
isSuspended: boolean;
|
|
170
196
|
lastSignInAt: number | null;
|
|
171
197
|
}>;
|
|
@@ -174,74 +200,61 @@ export declare const userProfileResponseGuard: z.ZodObject<{
|
|
|
174
200
|
name: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
175
201
|
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
176
202
|
applicationId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
177
|
-
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
178
203
|
username: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
204
|
+
profile: z.ZodType<Partial<{
|
|
205
|
+
familyName: string;
|
|
206
|
+
givenName: string;
|
|
207
|
+
middleName: string;
|
|
208
|
+
nickname: string;
|
|
209
|
+
preferredUsername: string;
|
|
210
|
+
profile: string;
|
|
211
|
+
website: string;
|
|
212
|
+
gender: string;
|
|
213
|
+
birthdate: string;
|
|
214
|
+
zoneinfo: string;
|
|
215
|
+
locale: string;
|
|
216
|
+
address: Partial<{
|
|
217
|
+
formatted: string;
|
|
218
|
+
streetAddress: string;
|
|
219
|
+
locality: string;
|
|
220
|
+
region: string;
|
|
221
|
+
postalCode: string;
|
|
222
|
+
country: string;
|
|
223
|
+
}>;
|
|
224
|
+
}>, z.ZodTypeDef, Partial<{
|
|
225
|
+
familyName: string;
|
|
226
|
+
givenName: string;
|
|
227
|
+
middleName: string;
|
|
228
|
+
nickname: string;
|
|
229
|
+
preferredUsername: string;
|
|
230
|
+
profile: string;
|
|
231
|
+
website: string;
|
|
232
|
+
gender: string;
|
|
233
|
+
birthdate: string;
|
|
234
|
+
zoneinfo: string;
|
|
235
|
+
locale: string;
|
|
236
|
+
address: Partial<{
|
|
237
|
+
formatted: string;
|
|
238
|
+
streetAddress: string;
|
|
239
|
+
locality: string;
|
|
240
|
+
region: string;
|
|
241
|
+
postalCode: string;
|
|
242
|
+
country: string;
|
|
243
|
+
}>;
|
|
244
|
+
}>>;
|
|
179
245
|
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
246
|
+
updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
180
247
|
primaryEmail: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
181
248
|
primaryPhone: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
182
|
-
passwordEncrypted: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
183
|
-
passwordEncryptionMethod: z.ZodType<import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null, z.ZodTypeDef, import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null>;
|
|
184
249
|
avatar: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
185
250
|
identities: z.ZodType<Record<string, {
|
|
186
251
|
userId: string;
|
|
187
|
-
details?: Record<string,
|
|
252
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
188
253
|
}>, z.ZodTypeDef, Record<string, {
|
|
189
254
|
userId: string;
|
|
190
|
-
details?: Record<string,
|
|
255
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
191
256
|
}>>;
|
|
192
257
|
customData: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
193
|
-
logtoConfig: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
194
|
-
mfaVerifications: z.ZodType<({
|
|
195
|
-
type: MfaFactor.TOTP;
|
|
196
|
-
id: string;
|
|
197
|
-
key: string;
|
|
198
|
-
createdAt: string;
|
|
199
|
-
lastUsedAt?: string | undefined;
|
|
200
|
-
} | {
|
|
201
|
-
type: MfaFactor.WebAuthn;
|
|
202
|
-
id: string;
|
|
203
|
-
createdAt: string;
|
|
204
|
-
credentialId: string;
|
|
205
|
-
publicKey: string;
|
|
206
|
-
counter: number;
|
|
207
|
-
agent: string;
|
|
208
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
209
|
-
lastUsedAt?: string | undefined;
|
|
210
|
-
} | {
|
|
211
|
-
type: MfaFactor.BackupCode;
|
|
212
|
-
id: string;
|
|
213
|
-
createdAt: string;
|
|
214
|
-
codes: {
|
|
215
|
-
code: string;
|
|
216
|
-
usedAt?: string | undefined;
|
|
217
|
-
}[];
|
|
218
|
-
lastUsedAt?: string | undefined;
|
|
219
|
-
})[], z.ZodTypeDef, ({
|
|
220
|
-
type: MfaFactor.TOTP;
|
|
221
|
-
id: string;
|
|
222
|
-
key: string;
|
|
223
|
-
createdAt: string;
|
|
224
|
-
lastUsedAt?: string | undefined;
|
|
225
|
-
} | {
|
|
226
|
-
type: MfaFactor.WebAuthn;
|
|
227
|
-
id: string;
|
|
228
|
-
createdAt: string;
|
|
229
|
-
credentialId: string;
|
|
230
|
-
publicKey: string;
|
|
231
|
-
counter: number;
|
|
232
|
-
agent: string;
|
|
233
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
234
|
-
lastUsedAt?: string | undefined;
|
|
235
|
-
} | {
|
|
236
|
-
type: MfaFactor.BackupCode;
|
|
237
|
-
id: string;
|
|
238
|
-
createdAt: string;
|
|
239
|
-
codes: {
|
|
240
|
-
code: string;
|
|
241
|
-
usedAt?: string | undefined;
|
|
242
|
-
}[];
|
|
243
|
-
lastUsedAt?: string | undefined;
|
|
244
|
-
})[]>;
|
|
245
258
|
isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
246
259
|
lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
|
|
247
260
|
hasPassword: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -250,46 +263,38 @@ export declare const userProfileResponseGuard: z.ZodObject<{
|
|
|
250
263
|
name: string | null;
|
|
251
264
|
id: string;
|
|
252
265
|
applicationId: string | null;
|
|
253
|
-
tenantId: string;
|
|
254
266
|
username: string | null;
|
|
267
|
+
profile: Partial<{
|
|
268
|
+
familyName: string;
|
|
269
|
+
givenName: string;
|
|
270
|
+
middleName: string;
|
|
271
|
+
nickname: string;
|
|
272
|
+
preferredUsername: string;
|
|
273
|
+
profile: string;
|
|
274
|
+
website: string;
|
|
275
|
+
gender: string;
|
|
276
|
+
birthdate: string;
|
|
277
|
+
zoneinfo: string;
|
|
278
|
+
locale: string;
|
|
279
|
+
address: Partial<{
|
|
280
|
+
formatted: string;
|
|
281
|
+
streetAddress: string;
|
|
282
|
+
locality: string;
|
|
283
|
+
region: string;
|
|
284
|
+
postalCode: string;
|
|
285
|
+
country: string;
|
|
286
|
+
}>;
|
|
287
|
+
}>;
|
|
255
288
|
createdAt: number;
|
|
289
|
+
updatedAt: number;
|
|
256
290
|
primaryEmail: string | null;
|
|
257
291
|
primaryPhone: string | null;
|
|
258
|
-
passwordEncrypted: string | null;
|
|
259
|
-
passwordEncryptionMethod: import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null;
|
|
260
292
|
avatar: string | null;
|
|
261
293
|
identities: Record<string, {
|
|
262
294
|
userId: string;
|
|
263
|
-
details?: Record<string,
|
|
295
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
264
296
|
}>;
|
|
265
297
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
266
|
-
logtoConfig: import("@withtyped/server/lib/types.js").JsonObject;
|
|
267
|
-
mfaVerifications: ({
|
|
268
|
-
type: MfaFactor.TOTP;
|
|
269
|
-
id: string;
|
|
270
|
-
key: string;
|
|
271
|
-
createdAt: string;
|
|
272
|
-
lastUsedAt?: string | undefined;
|
|
273
|
-
} | {
|
|
274
|
-
type: MfaFactor.WebAuthn;
|
|
275
|
-
id: string;
|
|
276
|
-
createdAt: string;
|
|
277
|
-
credentialId: string;
|
|
278
|
-
publicKey: string;
|
|
279
|
-
counter: number;
|
|
280
|
-
agent: string;
|
|
281
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
282
|
-
lastUsedAt?: string | undefined;
|
|
283
|
-
} | {
|
|
284
|
-
type: MfaFactor.BackupCode;
|
|
285
|
-
id: string;
|
|
286
|
-
createdAt: string;
|
|
287
|
-
codes: {
|
|
288
|
-
code: string;
|
|
289
|
-
usedAt?: string | undefined;
|
|
290
|
-
}[];
|
|
291
|
-
lastUsedAt?: string | undefined;
|
|
292
|
-
})[];
|
|
293
298
|
isSuspended: boolean;
|
|
294
299
|
lastSignInAt: number | null;
|
|
295
300
|
hasPassword?: boolean | undefined;
|
|
@@ -298,46 +303,38 @@ export declare const userProfileResponseGuard: z.ZodObject<{
|
|
|
298
303
|
name: string | null;
|
|
299
304
|
id: string;
|
|
300
305
|
applicationId: string | null;
|
|
301
|
-
tenantId: string;
|
|
302
306
|
username: string | null;
|
|
307
|
+
profile: Partial<{
|
|
308
|
+
familyName: string;
|
|
309
|
+
givenName: string;
|
|
310
|
+
middleName: string;
|
|
311
|
+
nickname: string;
|
|
312
|
+
preferredUsername: string;
|
|
313
|
+
profile: string;
|
|
314
|
+
website: string;
|
|
315
|
+
gender: string;
|
|
316
|
+
birthdate: string;
|
|
317
|
+
zoneinfo: string;
|
|
318
|
+
locale: string;
|
|
319
|
+
address: Partial<{
|
|
320
|
+
formatted: string;
|
|
321
|
+
streetAddress: string;
|
|
322
|
+
locality: string;
|
|
323
|
+
region: string;
|
|
324
|
+
postalCode: string;
|
|
325
|
+
country: string;
|
|
326
|
+
}>;
|
|
327
|
+
}>;
|
|
303
328
|
createdAt: number;
|
|
329
|
+
updatedAt: number;
|
|
304
330
|
primaryEmail: string | null;
|
|
305
331
|
primaryPhone: string | null;
|
|
306
|
-
passwordEncrypted: string | null;
|
|
307
|
-
passwordEncryptionMethod: import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null;
|
|
308
332
|
avatar: string | null;
|
|
309
333
|
identities: Record<string, {
|
|
310
334
|
userId: string;
|
|
311
|
-
details?: Record<string,
|
|
335
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
312
336
|
}>;
|
|
313
337
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
314
|
-
logtoConfig: import("@withtyped/server/lib/types.js").JsonObject;
|
|
315
|
-
mfaVerifications: ({
|
|
316
|
-
type: MfaFactor.TOTP;
|
|
317
|
-
id: string;
|
|
318
|
-
key: string;
|
|
319
|
-
createdAt: string;
|
|
320
|
-
lastUsedAt?: string | undefined;
|
|
321
|
-
} | {
|
|
322
|
-
type: MfaFactor.WebAuthn;
|
|
323
|
-
id: string;
|
|
324
|
-
createdAt: string;
|
|
325
|
-
credentialId: string;
|
|
326
|
-
publicKey: string;
|
|
327
|
-
counter: number;
|
|
328
|
-
agent: string;
|
|
329
|
-
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
330
|
-
lastUsedAt?: string | undefined;
|
|
331
|
-
} | {
|
|
332
|
-
type: MfaFactor.BackupCode;
|
|
333
|
-
id: string;
|
|
334
|
-
createdAt: string;
|
|
335
|
-
codes: {
|
|
336
|
-
code: string;
|
|
337
|
-
usedAt?: string | undefined;
|
|
338
|
-
}[];
|
|
339
|
-
lastUsedAt?: string | undefined;
|
|
340
|
-
})[];
|
|
341
338
|
isSuspended: boolean;
|
|
342
339
|
lastSignInAt: number | null;
|
|
343
340
|
hasPassword?: boolean | undefined;
|
|
@@ -398,13 +395,54 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
|
|
|
398
395
|
passwordEncryptionMethod: z.ZodType<import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null, z.ZodTypeDef, import("../db-entries/custom-types.js").UsersPasswordEncryptionMethod | null>;
|
|
399
396
|
name: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
400
397
|
avatar: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
398
|
+
profile: z.ZodType<Partial<{
|
|
399
|
+
familyName: string;
|
|
400
|
+
givenName: string;
|
|
401
|
+
middleName: string;
|
|
402
|
+
nickname: string;
|
|
403
|
+
preferredUsername: string;
|
|
404
|
+
profile: string;
|
|
405
|
+
website: string;
|
|
406
|
+
gender: string;
|
|
407
|
+
birthdate: string;
|
|
408
|
+
zoneinfo: string;
|
|
409
|
+
locale: string;
|
|
410
|
+
address: Partial<{
|
|
411
|
+
formatted: string;
|
|
412
|
+
streetAddress: string;
|
|
413
|
+
locality: string;
|
|
414
|
+
region: string;
|
|
415
|
+
postalCode: string;
|
|
416
|
+
country: string;
|
|
417
|
+
}>;
|
|
418
|
+
}>, z.ZodTypeDef, Partial<{
|
|
419
|
+
familyName: string;
|
|
420
|
+
givenName: string;
|
|
421
|
+
middleName: string;
|
|
422
|
+
nickname: string;
|
|
423
|
+
preferredUsername: string;
|
|
424
|
+
profile: string;
|
|
425
|
+
website: string;
|
|
426
|
+
gender: string;
|
|
427
|
+
birthdate: string;
|
|
428
|
+
zoneinfo: string;
|
|
429
|
+
locale: string;
|
|
430
|
+
address: Partial<{
|
|
431
|
+
formatted: string;
|
|
432
|
+
streetAddress: string;
|
|
433
|
+
locality: string;
|
|
434
|
+
region: string;
|
|
435
|
+
postalCode: string;
|
|
436
|
+
country: string;
|
|
437
|
+
}>;
|
|
438
|
+
}>>;
|
|
401
439
|
applicationId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
402
440
|
identities: z.ZodType<Record<string, {
|
|
403
441
|
userId: string;
|
|
404
|
-
details?: Record<string,
|
|
442
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
405
443
|
}>, z.ZodTypeDef, Record<string, {
|
|
406
444
|
userId: string;
|
|
407
|
-
details?: Record<string,
|
|
445
|
+
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
|
408
446
|
}>>;
|
|
409
447
|
customData: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
410
448
|
logtoConfig: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
@@ -462,6 +500,7 @@ export declare const featuredUserGuard: z.ZodObject<Pick<{
|
|
|
462
500
|
isSuspended: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
463
501
|
lastSignInAt: z.ZodType<number | null, z.ZodTypeDef, number | null>;
|
|
464
502
|
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
503
|
+
updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
465
504
|
}, "name" | "id" | "avatar">, "strip", z.ZodTypeAny, {
|
|
466
505
|
name: string | null;
|
|
467
506
|
id: string;
|
package/lib/types/user.js
CHANGED
|
@@ -12,10 +12,14 @@ export const userInfoSelectFields = Object.freeze([
|
|
|
12
12
|
'identities',
|
|
13
13
|
'lastSignInAt',
|
|
14
14
|
'createdAt',
|
|
15
|
+
'updatedAt',
|
|
16
|
+
'profile',
|
|
15
17
|
'applicationId',
|
|
16
18
|
'isSuspended',
|
|
17
19
|
]);
|
|
18
|
-
export const userInfoGuard = Users.guard.pick(
|
|
20
|
+
export const userInfoGuard = Users.guard.pick(
|
|
21
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
+
Object.fromEntries(userInfoSelectFields.map((field) => [field, true])));
|
|
19
23
|
export const userProfileResponseGuard = userInfoGuard.extend({
|
|
20
24
|
hasPassword: z.boolean().optional(),
|
|
21
25
|
ssoIdentities: z.array(UserSsoIdentities.guard).optional(),
|
package/lib/utils/domain.test.js
CHANGED
package/lib/utils/zod.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -26,22 +26,21 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@silverhand/eslint-config": "5.0.0",
|
|
28
28
|
"@silverhand/essentials": "^2.9.0",
|
|
29
|
+
"@silverhand/slonik": "31.0.0-beta.2",
|
|
29
30
|
"@silverhand/ts-config": "5.0.0",
|
|
30
31
|
"@types/inquirer": "^9.0.0",
|
|
31
|
-
"@types/jest": "^29.4.0",
|
|
32
32
|
"@types/node": "^20.9.5",
|
|
33
33
|
"@types/pluralize": "^0.0.33",
|
|
34
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
34
35
|
"camelcase": "^8.0.0",
|
|
35
36
|
"chalk": "^5.0.0",
|
|
36
37
|
"eslint": "^8.44.0",
|
|
37
|
-
"jest": "^29.7.0",
|
|
38
38
|
"lint-staged": "^15.0.0",
|
|
39
39
|
"pluralize": "^8.0.0",
|
|
40
40
|
"prettier": "^3.0.0",
|
|
41
41
|
"roarr": "^7.11.0",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"typescript": "^5.3.3"
|
|
42
|
+
"typescript": "^5.3.3",
|
|
43
|
+
"vitest": "^1.4.0"
|
|
45
44
|
},
|
|
46
45
|
"eslintConfig": {
|
|
47
46
|
"extends": "@silverhand",
|
|
@@ -64,13 +63,13 @@
|
|
|
64
63
|
},
|
|
65
64
|
"prettier": "@silverhand/eslint-config/.prettierrc",
|
|
66
65
|
"dependencies": {
|
|
67
|
-
"@logto/connector-kit": "^
|
|
68
|
-
"@logto/core-kit": "^2.
|
|
66
|
+
"@logto/connector-kit": "^3.0.0",
|
|
67
|
+
"@logto/core-kit": "^2.4.0",
|
|
69
68
|
"@logto/language-kit": "^1.1.0",
|
|
70
|
-
"@logto/phrases": "^1.
|
|
71
|
-
"@logto/phrases-experience": "^1.6.
|
|
69
|
+
"@logto/phrases": "^1.10.0",
|
|
70
|
+
"@logto/phrases-experience": "^1.6.1",
|
|
72
71
|
"@logto/shared": "^3.1.0",
|
|
73
|
-
"@withtyped/server": "^0.
|
|
72
|
+
"@withtyped/server": "^0.13.3"
|
|
74
73
|
},
|
|
75
74
|
"peerDependencies": {
|
|
76
75
|
"zod": "^3.22.4"
|
|
@@ -81,12 +80,11 @@
|
|
|
81
80
|
"generate": "./generate.sh",
|
|
82
81
|
"build:alterations": "rm -rf alterations-js && tsc -p tsconfig.build.alterations.json",
|
|
83
82
|
"build": "pnpm generate && rm -rf lib/ && tsc -p tsconfig.build.json && pnpm build:alterations",
|
|
84
|
-
"build:test": "pnpm
|
|
83
|
+
"build:test": "pnpm build",
|
|
85
84
|
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
|
86
85
|
"lint": "eslint --ext .ts src",
|
|
87
86
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
88
|
-
"test
|
|
89
|
-
"test": "pnpm
|
|
90
|
-
"test:ci": "pnpm test:only"
|
|
87
|
+
"test": "vitest src",
|
|
88
|
+
"test:ci": "pnpm run test --silent --coverage"
|
|
91
89
|
}
|
|
92
90
|
}
|
package/tables/_before_all.sql
CHANGED
package/tables/_functions.sql
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* init_order = 0.5 */
|
|
2
2
|
|
|
3
|
+
/** A function to set the tenant_id column based on the current user. */
|
|
3
4
|
create function set_tenant_id() returns trigger as
|
|
4
5
|
$$ begin
|
|
5
6
|
if new.tenant_id is not null then
|
|
@@ -13,4 +14,11 @@ $$ begin
|
|
|
13
14
|
return new;
|
|
14
15
|
end; $$ language plpgsql;
|
|
15
16
|
|
|
17
|
+
/** A function to set the `updated_at` column to the current time. */
|
|
18
|
+
create function set_updated_at() returns trigger as
|
|
19
|
+
$$ begin
|
|
20
|
+
new.updated_at = now();
|
|
21
|
+
return new;
|
|
22
|
+
end; $$ language plpgsql;
|
|
23
|
+
|
|
16
24
|
/* no_after_each */
|
|
@@ -3,7 +3,7 @@ create table daily_active_users (
|
|
|
3
3
|
tenant_id varchar(21) not null
|
|
4
4
|
references tenants (id) on update cascade on delete cascade,
|
|
5
5
|
user_id varchar(21) not null,
|
|
6
|
-
date timestamptz not null,
|
|
6
|
+
date timestamptz not null default (now()),
|
|
7
7
|
primary key (id),
|
|
8
8
|
constraint daily_active_users__user_id_date
|
|
9
9
|
unique (user_id, date)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* init_order = 3 */
|
|
2
|
+
|
|
3
|
+
/** The relations between organization roles and resource scopes (normal scopes). It indicates which resource scopes are available to which organization roles. */
|
|
4
|
+
create table organization_role_resource_scope_relations (
|
|
5
|
+
tenant_id varchar(21) not null
|
|
6
|
+
references tenants (id) on update cascade on delete cascade,
|
|
7
|
+
organization_role_id varchar(21) not null
|
|
8
|
+
references organization_roles (id) on update cascade on delete cascade,
|
|
9
|
+
scope_id varchar(21) not null
|
|
10
|
+
references scopes (id) on update cascade on delete cascade,
|
|
11
|
+
primary key (tenant_id, organization_role_id, scope_id)
|
|
12
|
+
);
|