@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
|
@@ -40,4 +40,8 @@ export var SignInMode;
|
|
|
40
40
|
export var UsersPasswordEncryptionMethod;
|
|
41
41
|
(function (UsersPasswordEncryptionMethod) {
|
|
42
42
|
UsersPasswordEncryptionMethod["Argon2i"] = "Argon2i";
|
|
43
|
+
UsersPasswordEncryptionMethod["SHA1"] = "SHA1";
|
|
44
|
+
UsersPasswordEncryptionMethod["SHA256"] = "SHA256";
|
|
45
|
+
UsersPasswordEncryptionMethod["MD5"] = "MD5";
|
|
46
|
+
UsersPasswordEncryptionMethod["Bcrypt"] = "Bcrypt";
|
|
43
47
|
})(UsersPasswordEncryptionMethod || (UsersPasswordEncryptionMethod = {}));
|
|
@@ -21,6 +21,7 @@ export * from './logto-config.js';
|
|
|
21
21
|
export * from './oidc-model-instance.js';
|
|
22
22
|
export * from './organization-invitation-role-relation.js';
|
|
23
23
|
export * from './organization-invitation.js';
|
|
24
|
+
export * from './organization-role-resource-scope-relation.js';
|
|
24
25
|
export * from './organization-role-scope-relation.js';
|
|
25
26
|
export * from './organization-role-user-relation.js';
|
|
26
27
|
export * from './organization-role.js';
|
package/lib/db-entries/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from './logto-config.js';
|
|
|
22
22
|
export * from './oidc-model-instance.js';
|
|
23
23
|
export * from './organization-invitation-role-relation.js';
|
|
24
24
|
export * from './organization-invitation.js';
|
|
25
|
+
export * from './organization-role-resource-scope-relation.js';
|
|
25
26
|
export * from './organization-role-scope-relation.js';
|
|
26
27
|
export * from './organization-role-user-relation.js';
|
|
27
28
|
export * from './organization-role.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The relations between organization roles and resource scopes (normal scopes). It indicates which resource scopes are available to which organization roles.
|
|
4
|
+
*
|
|
5
|
+
* @remarks This is a type for database creation.
|
|
6
|
+
* @see {@link OrganizationRoleResourceScopeRelation} for the original type.
|
|
7
|
+
*/
|
|
8
|
+
export type CreateOrganizationRoleResourceScopeRelation = {
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
organizationRoleId: string;
|
|
11
|
+
scopeId: string;
|
|
12
|
+
};
|
|
13
|
+
/** The relations between organization roles and resource scopes (normal scopes). It indicates which resource scopes are available to which organization roles. */
|
|
14
|
+
export type OrganizationRoleResourceScopeRelation = {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
organizationRoleId: string;
|
|
17
|
+
scopeId: string;
|
|
18
|
+
};
|
|
19
|
+
export type OrganizationRoleResourceScopeRelationKeys = 'tenantId' | 'organizationRoleId' | 'scopeId';
|
|
20
|
+
export declare const OrganizationRoleResourceScopeRelations: GeneratedSchema<OrganizationRoleResourceScopeRelationKeys, CreateOrganizationRoleResourceScopeRelation, OrganizationRoleResourceScopeRelation, 'organization_role_resource_scope_relations', 'organization_role_resource_scope_relation'>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const createGuard = z.object({
|
|
4
|
+
tenantId: z.string().max(21).optional(),
|
|
5
|
+
organizationRoleId: z.string().min(1).max(21),
|
|
6
|
+
scopeId: z.string().min(1).max(21),
|
|
7
|
+
});
|
|
8
|
+
const guard = z.object({
|
|
9
|
+
tenantId: z.string().max(21),
|
|
10
|
+
organizationRoleId: z.string().min(1).max(21),
|
|
11
|
+
scopeId: z.string().min(1).max(21),
|
|
12
|
+
});
|
|
13
|
+
export const OrganizationRoleResourceScopeRelations = Object.freeze({
|
|
14
|
+
table: 'organization_role_resource_scope_relations',
|
|
15
|
+
tableSingular: 'organization_role_resource_scope_relation',
|
|
16
|
+
fields: {
|
|
17
|
+
tenantId: 'tenant_id',
|
|
18
|
+
organizationRoleId: 'organization_role_id',
|
|
19
|
+
scopeId: 'scope_id',
|
|
20
|
+
},
|
|
21
|
+
fieldKeys: [
|
|
22
|
+
'tenantId',
|
|
23
|
+
'organizationRoleId',
|
|
24
|
+
'scopeId',
|
|
25
|
+
],
|
|
26
|
+
createGuard,
|
|
27
|
+
guard,
|
|
28
|
+
updateGuard: guard.partial(),
|
|
29
|
+
});
|
|
@@ -9,7 +9,7 @@ export type CreateScope = {
|
|
|
9
9
|
id: string;
|
|
10
10
|
resourceId: string;
|
|
11
11
|
name: string;
|
|
12
|
-
description
|
|
12
|
+
description?: string | null;
|
|
13
13
|
createdAt?: number;
|
|
14
14
|
};
|
|
15
15
|
export type Scope = {
|
|
@@ -17,7 +17,7 @@ export type Scope = {
|
|
|
17
17
|
id: string;
|
|
18
18
|
resourceId: string;
|
|
19
19
|
name: string;
|
|
20
|
-
description: string;
|
|
20
|
+
description: string | null;
|
|
21
21
|
createdAt: number;
|
|
22
22
|
};
|
|
23
23
|
export type ScopeKeys = 'tenantId' | 'id' | 'resourceId' | 'name' | 'description' | 'createdAt';
|
package/lib/db-entries/scope.js
CHANGED
|
@@ -5,7 +5,7 @@ const createGuard = z.object({
|
|
|
5
5
|
id: z.string().min(1).max(21),
|
|
6
6
|
resourceId: z.string().min(1).max(21),
|
|
7
7
|
name: z.string().min(1).max(256),
|
|
8
|
-
description: z.string().
|
|
8
|
+
description: z.string().nullable().optional(),
|
|
9
9
|
createdAt: z.number().optional(),
|
|
10
10
|
});
|
|
11
11
|
const guard = z.object({
|
|
@@ -13,7 +13,7 @@ const guard = z.object({
|
|
|
13
13
|
id: z.string().min(1).max(21),
|
|
14
14
|
resourceId: z.string().min(1).max(21),
|
|
15
15
|
name: z.string().min(1).max(256),
|
|
16
|
-
description: z.string().
|
|
16
|
+
description: z.string().nullable(),
|
|
17
17
|
createdAt: z.number(),
|
|
18
18
|
});
|
|
19
19
|
export const Scopes = Object.freeze({
|
package/lib/db-entries/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Identities, JsonObject, MfaVerifications, GeneratedSchema } from './../foundations/index.js';
|
|
1
|
+
import { UserProfile, Identities, JsonObject, MfaVerifications, GeneratedSchema } from './../foundations/index.js';
|
|
2
2
|
import { UsersPasswordEncryptionMethod } from './custom-types.js';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
@@ -14,7 +14,10 @@ export type CreateUser = {
|
|
|
14
14
|
passwordEncrypted?: string | null;
|
|
15
15
|
passwordEncryptionMethod?: UsersPasswordEncryptionMethod | null;
|
|
16
16
|
name?: string | null;
|
|
17
|
+
/** The URL that points to the user's profile picture. Mapped to OpenID Connect's `picture` claim. */
|
|
17
18
|
avatar?: string | null;
|
|
19
|
+
/** Additional OpenID Connect standard claims that are not included in user's properties. */
|
|
20
|
+
profile?: UserProfile;
|
|
18
21
|
applicationId?: string | null;
|
|
19
22
|
identities?: Identities;
|
|
20
23
|
customData?: JsonObject;
|
|
@@ -23,6 +26,7 @@ export type CreateUser = {
|
|
|
23
26
|
isSuspended?: boolean;
|
|
24
27
|
lastSignInAt?: number | null;
|
|
25
28
|
createdAt?: number;
|
|
29
|
+
updatedAt?: number;
|
|
26
30
|
};
|
|
27
31
|
export type User = {
|
|
28
32
|
tenantId: string;
|
|
@@ -33,7 +37,10 @@ export type User = {
|
|
|
33
37
|
passwordEncrypted: string | null;
|
|
34
38
|
passwordEncryptionMethod: UsersPasswordEncryptionMethod | null;
|
|
35
39
|
name: string | null;
|
|
40
|
+
/** The URL that points to the user's profile picture. Mapped to OpenID Connect's `picture` claim. */
|
|
36
41
|
avatar: string | null;
|
|
42
|
+
/** Additional OpenID Connect standard claims that are not included in user's properties. */
|
|
43
|
+
profile: UserProfile;
|
|
37
44
|
applicationId: string | null;
|
|
38
45
|
identities: Identities;
|
|
39
46
|
customData: JsonObject;
|
|
@@ -42,6 +49,7 @@ export type User = {
|
|
|
42
49
|
isSuspended: boolean;
|
|
43
50
|
lastSignInAt: number | null;
|
|
44
51
|
createdAt: number;
|
|
52
|
+
updatedAt: number;
|
|
45
53
|
};
|
|
46
|
-
export type UserKeys = 'tenantId' | 'id' | 'username' | 'primaryEmail' | 'primaryPhone' | 'passwordEncrypted' | 'passwordEncryptionMethod' | 'name' | 'avatar' | 'applicationId' | 'identities' | 'customData' | 'logtoConfig' | 'mfaVerifications' | 'isSuspended' | 'lastSignInAt' | 'createdAt';
|
|
54
|
+
export type UserKeys = 'tenantId' | 'id' | 'username' | 'primaryEmail' | 'primaryPhone' | 'passwordEncrypted' | 'passwordEncryptionMethod' | 'name' | 'avatar' | 'profile' | 'applicationId' | 'identities' | 'customData' | 'logtoConfig' | 'mfaVerifications' | 'isSuspended' | 'lastSignInAt' | 'createdAt' | 'updatedAt';
|
|
47
55
|
export declare const Users: GeneratedSchema<UserKeys, CreateUser, User, 'users', 'user'>;
|
package/lib/db-entries/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { identitiesGuard, jsonObjectGuard, mfaVerificationsGuard } from './../foundations/index.js';
|
|
3
|
+
import { userProfileGuard, identitiesGuard, jsonObjectGuard, mfaVerificationsGuard } from './../foundations/index.js';
|
|
4
4
|
import { UsersPasswordEncryptionMethod } from './custom-types.js';
|
|
5
5
|
const createGuard = z.object({
|
|
6
6
|
tenantId: z.string().max(21).optional(),
|
|
@@ -12,6 +12,7 @@ const createGuard = z.object({
|
|
|
12
12
|
passwordEncryptionMethod: z.nativeEnum(UsersPasswordEncryptionMethod).nullable().optional(),
|
|
13
13
|
name: z.string().max(128).nullable().optional(),
|
|
14
14
|
avatar: z.string().max(2048).nullable().optional(),
|
|
15
|
+
profile: userProfileGuard.optional(),
|
|
15
16
|
applicationId: z.string().max(21).nullable().optional(),
|
|
16
17
|
identities: identitiesGuard.optional(),
|
|
17
18
|
customData: jsonObjectGuard.optional(),
|
|
@@ -20,6 +21,7 @@ const createGuard = z.object({
|
|
|
20
21
|
isSuspended: z.boolean().optional(),
|
|
21
22
|
lastSignInAt: z.number().nullable().optional(),
|
|
22
23
|
createdAt: z.number().optional(),
|
|
24
|
+
updatedAt: z.number().optional(),
|
|
23
25
|
});
|
|
24
26
|
const guard = z.object({
|
|
25
27
|
tenantId: z.string().max(21),
|
|
@@ -31,6 +33,7 @@ const guard = z.object({
|
|
|
31
33
|
passwordEncryptionMethod: z.nativeEnum(UsersPasswordEncryptionMethod).nullable(),
|
|
32
34
|
name: z.string().max(128).nullable(),
|
|
33
35
|
avatar: z.string().max(2048).nullable(),
|
|
36
|
+
profile: userProfileGuard,
|
|
34
37
|
applicationId: z.string().max(21).nullable(),
|
|
35
38
|
identities: identitiesGuard,
|
|
36
39
|
customData: jsonObjectGuard,
|
|
@@ -39,6 +42,7 @@ const guard = z.object({
|
|
|
39
42
|
isSuspended: z.boolean(),
|
|
40
43
|
lastSignInAt: z.number().nullable(),
|
|
41
44
|
createdAt: z.number(),
|
|
45
|
+
updatedAt: z.number(),
|
|
42
46
|
});
|
|
43
47
|
export const Users = Object.freeze({
|
|
44
48
|
table: 'users',
|
|
@@ -53,6 +57,7 @@ export const Users = Object.freeze({
|
|
|
53
57
|
passwordEncryptionMethod: 'password_encryption_method',
|
|
54
58
|
name: 'name',
|
|
55
59
|
avatar: 'avatar',
|
|
60
|
+
profile: 'profile',
|
|
56
61
|
applicationId: 'application_id',
|
|
57
62
|
identities: 'identities',
|
|
58
63
|
customData: 'custom_data',
|
|
@@ -61,6 +66,7 @@ export const Users = Object.freeze({
|
|
|
61
66
|
isSuspended: 'is_suspended',
|
|
62
67
|
lastSignInAt: 'last_sign_in_at',
|
|
63
68
|
createdAt: 'created_at',
|
|
69
|
+
updatedAt: 'updated_at',
|
|
64
70
|
},
|
|
65
71
|
fieldKeys: [
|
|
66
72
|
'tenantId',
|
|
@@ -72,6 +78,7 @@ export const Users = Object.freeze({
|
|
|
72
78
|
'passwordEncryptionMethod',
|
|
73
79
|
'name',
|
|
74
80
|
'avatar',
|
|
81
|
+
'profile',
|
|
75
82
|
'applicationId',
|
|
76
83
|
'identities',
|
|
77
84
|
'customData',
|
|
@@ -80,6 +87,7 @@ export const Users = Object.freeze({
|
|
|
80
87
|
'isSuspended',
|
|
81
88
|
'lastSignInAt',
|
|
82
89
|
'createdAt',
|
|
90
|
+
'updatedAt',
|
|
83
91
|
],
|
|
84
92
|
createGuard,
|
|
85
93
|
guard,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { Json } from '@withtyped/server';
|
|
2
|
-
import { z } from 'zod';
|
|
3
1
|
export * from './custom-domain.js';
|
|
4
2
|
export * from './hooks.js';
|
|
5
3
|
export * from './logs.js';
|
|
@@ -10,7 +8,5 @@ export * from './sentinel.js';
|
|
|
10
8
|
export * from './users.js';
|
|
11
9
|
export * from './sso-connector.js';
|
|
12
10
|
export * from './applications.js';
|
|
13
|
-
export { configurableConnectorMetadataGuard, type ConfigurableConnectorMetadata, } from '@logto/connector-kit';
|
|
11
|
+
export { configurableConnectorMetadataGuard, type ConfigurableConnectorMetadata, jsonGuard, jsonObjectGuard, } from '@logto/connector-kit';
|
|
14
12
|
export type { Json, JsonObject } from '@withtyped/server';
|
|
15
|
-
export declare const jsonGuard: z.ZodType<Json>;
|
|
16
|
-
export declare const jsonObjectGuard: z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
export * from './custom-domain.js';
|
|
3
2
|
export * from './hooks.js';
|
|
4
3
|
export * from './logs.js';
|
|
@@ -9,9 +8,4 @@ export * from './sentinel.js';
|
|
|
9
8
|
export * from './users.js';
|
|
10
9
|
export * from './sso-connector.js';
|
|
11
10
|
export * from './applications.js';
|
|
12
|
-
export { configurableConnectorMetadataGuard, } from '@logto/connector-kit';
|
|
13
|
-
/* === Commonly Used === */
|
|
14
|
-
// Copied from https://github.com/colinhacks/zod#json-type
|
|
15
|
-
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
16
|
-
export const jsonGuard = z.lazy(() => z.union([literalSchema, z.array(jsonGuard), z.record(jsonGuard)]));
|
|
17
|
-
export const jsonObjectGuard = z.record(jsonGuard);
|
|
11
|
+
export { configurableConnectorMetadataGuard, jsonGuard, jsonObjectGuard, } from '@logto/connector-kit';
|
|
@@ -1,25 +1,122 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MfaFactor } from './sign-in-experience.js';
|
|
3
|
+
export type UserProfile = Partial<{
|
|
4
|
+
familyName: string;
|
|
5
|
+
givenName: string;
|
|
6
|
+
middleName: string;
|
|
7
|
+
nickname: string;
|
|
8
|
+
preferredUsername: string;
|
|
9
|
+
profile: string;
|
|
10
|
+
website: string;
|
|
11
|
+
gender: string;
|
|
12
|
+
birthdate: string;
|
|
13
|
+
zoneinfo: string;
|
|
14
|
+
locale: string;
|
|
15
|
+
address: Partial<{
|
|
16
|
+
formatted: string;
|
|
17
|
+
streetAddress: string;
|
|
18
|
+
locality: string;
|
|
19
|
+
region: string;
|
|
20
|
+
postalCode: string;
|
|
21
|
+
country: string;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const userProfileGuard: z.ZodObject<{
|
|
25
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
26
|
+
givenName: z.ZodOptional<z.ZodString>;
|
|
27
|
+
middleName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
29
|
+
preferredUsername: z.ZodOptional<z.ZodString>;
|
|
30
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
31
|
+
website: z.ZodOptional<z.ZodString>;
|
|
32
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
33
|
+
birthdate: z.ZodOptional<z.ZodString>;
|
|
34
|
+
zoneinfo: z.ZodOptional<z.ZodString>;
|
|
35
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
36
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
formatted: z.ZodOptional<z.ZodString>;
|
|
38
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
39
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
40
|
+
region: z.ZodOptional<z.ZodString>;
|
|
41
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
42
|
+
country: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
formatted?: string | undefined;
|
|
45
|
+
streetAddress?: string | undefined;
|
|
46
|
+
locality?: string | undefined;
|
|
47
|
+
region?: string | undefined;
|
|
48
|
+
postalCode?: string | undefined;
|
|
49
|
+
country?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
formatted?: string | undefined;
|
|
52
|
+
streetAddress?: string | undefined;
|
|
53
|
+
locality?: string | undefined;
|
|
54
|
+
region?: string | undefined;
|
|
55
|
+
postalCode?: string | undefined;
|
|
56
|
+
country?: string | undefined;
|
|
57
|
+
}>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
familyName?: string | undefined;
|
|
60
|
+
givenName?: string | undefined;
|
|
61
|
+
middleName?: string | undefined;
|
|
62
|
+
nickname?: string | undefined;
|
|
63
|
+
preferredUsername?: string | undefined;
|
|
64
|
+
profile?: string | undefined;
|
|
65
|
+
website?: string | undefined;
|
|
66
|
+
gender?: string | undefined;
|
|
67
|
+
birthdate?: string | undefined;
|
|
68
|
+
zoneinfo?: string | undefined;
|
|
69
|
+
locale?: string | undefined;
|
|
70
|
+
address?: {
|
|
71
|
+
formatted?: string | undefined;
|
|
72
|
+
streetAddress?: string | undefined;
|
|
73
|
+
locality?: string | undefined;
|
|
74
|
+
region?: string | undefined;
|
|
75
|
+
postalCode?: string | undefined;
|
|
76
|
+
country?: string | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
familyName?: string | undefined;
|
|
80
|
+
givenName?: string | undefined;
|
|
81
|
+
middleName?: string | undefined;
|
|
82
|
+
nickname?: string | undefined;
|
|
83
|
+
preferredUsername?: string | undefined;
|
|
84
|
+
profile?: string | undefined;
|
|
85
|
+
website?: string | undefined;
|
|
86
|
+
gender?: string | undefined;
|
|
87
|
+
birthdate?: string | undefined;
|
|
88
|
+
zoneinfo?: string | undefined;
|
|
89
|
+
locale?: string | undefined;
|
|
90
|
+
address?: {
|
|
91
|
+
formatted?: string | undefined;
|
|
92
|
+
streetAddress?: string | undefined;
|
|
93
|
+
locality?: string | undefined;
|
|
94
|
+
region?: string | undefined;
|
|
95
|
+
postalCode?: string | undefined;
|
|
96
|
+
country?: string | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
export declare const userProfileKeys: readonly ["familyName", "givenName", "middleName", "nickname", "preferredUsername", "profile", "website", "gender", "birthdate", "zoneinfo", "locale", "address"];
|
|
3
100
|
export declare const roleNamesGuard: z.ZodArray<z.ZodString, "many">;
|
|
4
101
|
export declare const identityGuard: z.ZodObject<{
|
|
5
102
|
userId: z.ZodString;
|
|
6
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
103
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@withtyped/server").Json, z.ZodTypeDef, import("@withtyped/server").Json>>>;
|
|
7
104
|
}, "strip", z.ZodTypeAny, {
|
|
8
105
|
userId: string;
|
|
9
|
-
details?: Record<string,
|
|
106
|
+
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
10
107
|
}, {
|
|
11
108
|
userId: string;
|
|
12
|
-
details?: Record<string,
|
|
109
|
+
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
13
110
|
}>;
|
|
14
111
|
export declare const identitiesGuard: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
15
112
|
userId: z.ZodString;
|
|
16
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
113
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@withtyped/server").Json, z.ZodTypeDef, import("@withtyped/server").Json>>>;
|
|
17
114
|
}, "strip", z.ZodTypeAny, {
|
|
18
115
|
userId: string;
|
|
19
|
-
details?: Record<string,
|
|
116
|
+
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
20
117
|
}, {
|
|
21
118
|
userId: string;
|
|
22
|
-
details?: Record<string,
|
|
119
|
+
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
23
120
|
}>>;
|
|
24
121
|
export type Identity = z.infer<typeof identityGuard>;
|
|
25
122
|
export type Identities = z.infer<typeof identitiesGuard>;
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
+
import { jsonObjectGuard } from '@logto/connector-kit';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { MfaFactor } from './sign-in-experience.js';
|
|
4
|
+
export const userProfileGuard = (z.object({
|
|
5
|
+
familyName: z.string(),
|
|
6
|
+
givenName: z.string(),
|
|
7
|
+
middleName: z.string(),
|
|
8
|
+
nickname: z.string(),
|
|
9
|
+
preferredUsername: z.string(),
|
|
10
|
+
profile: z.string(),
|
|
11
|
+
website: z.string(),
|
|
12
|
+
gender: z.string(),
|
|
13
|
+
birthdate: z.string(),
|
|
14
|
+
zoneinfo: z.string(),
|
|
15
|
+
locale: z.string(),
|
|
16
|
+
address: z
|
|
17
|
+
.object({
|
|
18
|
+
formatted: z.string(),
|
|
19
|
+
streetAddress: z.string(),
|
|
20
|
+
locality: z.string(),
|
|
21
|
+
region: z.string(),
|
|
22
|
+
postalCode: z.string(),
|
|
23
|
+
country: z.string(),
|
|
24
|
+
})
|
|
25
|
+
.partial(),
|
|
26
|
+
})).partial();
|
|
27
|
+
export const userProfileKeys = Object.freeze(userProfileGuard.keyof().options);
|
|
3
28
|
export const roleNamesGuard = z.string().array();
|
|
4
29
|
export const identityGuard = z.object({
|
|
5
30
|
userId: z.string(),
|
|
6
|
-
details:
|
|
31
|
+
details: jsonObjectGuard.optional(), // Connector's userinfo details, schemaless
|
|
7
32
|
});
|
|
8
33
|
export const identitiesGuard = z.record(identityGuard);
|
|
9
34
|
export const baseMfaVerification = {
|
package/lib/seeds/cloud-api.d.ts
CHANGED
|
@@ -9,12 +9,15 @@ export declare enum CloudScope {
|
|
|
9
9
|
ManageTenantSelf = "manage:tenant:self",
|
|
10
10
|
SendSms = "send:sms",
|
|
11
11
|
SendEmail = "send:email",
|
|
12
|
+
/**
|
|
13
|
+
* The user can access external (independent from Logto instance) resource to run JWT payload customizer
|
|
14
|
+
* scripts and fetch the parsed token payload.
|
|
15
|
+
*/
|
|
16
|
+
FetchCustomJwt = "fetch:custom:jwt",
|
|
12
17
|
/** The user can see and manage affiliates, including create, update, and delete. */
|
|
13
18
|
ManageAffiliate = "manage:affiliate",
|
|
14
19
|
/** The user can create new affiliates and logs. */
|
|
15
|
-
CreateAffiliate = "create:affiliate"
|
|
16
|
-
/** The user can cleanup outdated logs. */
|
|
17
|
-
CleanupOutdatedLogs = "cleanup:outdated-logs"
|
|
20
|
+
CreateAffiliate = "create:affiliate"
|
|
18
21
|
}
|
|
19
22
|
export declare const createCloudApi: () => readonly [UpdateAdminData, ...CreateScope[]];
|
|
20
23
|
export declare const createTenantApplicationRole: () => Readonly<Role>;
|
package/lib/seeds/cloud-api.js
CHANGED
|
@@ -12,12 +12,15 @@ export var CloudScope;
|
|
|
12
12
|
CloudScope["ManageTenantSelf"] = "manage:tenant:self";
|
|
13
13
|
CloudScope["SendSms"] = "send:sms";
|
|
14
14
|
CloudScope["SendEmail"] = "send:email";
|
|
15
|
+
/**
|
|
16
|
+
* The user can access external (independent from Logto instance) resource to run JWT payload customizer
|
|
17
|
+
* scripts and fetch the parsed token payload.
|
|
18
|
+
*/
|
|
19
|
+
CloudScope["FetchCustomJwt"] = "fetch:custom:jwt";
|
|
15
20
|
/** The user can see and manage affiliates, including create, update, and delete. */
|
|
16
21
|
CloudScope["ManageAffiliate"] = "manage:affiliate";
|
|
17
22
|
/** The user can create new affiliates and logs. */
|
|
18
23
|
CloudScope["CreateAffiliate"] = "create:affiliate";
|
|
19
|
-
/** The user can cleanup outdated logs. */
|
|
20
|
-
CloudScope["CleanupOutdatedLogs"] = "cleanup:outdated-logs";
|
|
21
24
|
})(CloudScope || (CloudScope = {}));
|
|
22
25
|
export const createCloudApi = () => {
|
|
23
26
|
const resourceId = generateStandardId();
|
|
@@ -47,6 +50,7 @@ export const createCloudApi = () => {
|
|
|
47
50
|
},
|
|
48
51
|
buildScope(CloudScope.SendEmail, 'Allow sending emails. This scope is only available to M2M application.'),
|
|
49
52
|
buildScope(CloudScope.SendSms, 'Allow sending SMS. This scope is only available to M2M application.'),
|
|
53
|
+
buildScope(CloudScope.FetchCustomJwt, 'Allow accessing external resource to execute JWT payload customizer script and fetch the parsed token payload.'),
|
|
50
54
|
buildScope(CloudScope.CreateAffiliate, 'Allow creating new affiliates and logs.'),
|
|
51
55
|
buildScope(CloudScope.ManageAffiliate, 'Allow managing affiliates, including create, update, and delete.'),
|
|
52
56
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DatabaseTransactionConnection } from 'slonik';
|
|
1
|
+
import type { DatabaseTransactionConnection } from '@silverhand/slonik';
|
|
2
2
|
export type AlterationScript = {
|
|
3
3
|
up: (connection: DatabaseTransactionConnection) => Promise<void>;
|
|
4
4
|
down: (connection: DatabaseTransactionConnection) => Promise<void>;
|
|
@@ -514,16 +514,16 @@ export declare const applicationUserConsentScopesResponseGuard: z.ZodObject<{
|
|
|
514
514
|
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
515
515
|
resourceId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
516
516
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
517
|
-
description: z.ZodType<string, z.ZodTypeDef, string>;
|
|
517
|
+
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
518
518
|
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
519
519
|
}, "name" | "id" | "description">, "strip", z.ZodTypeAny, {
|
|
520
520
|
name: string;
|
|
521
521
|
id: string;
|
|
522
|
-
description: string;
|
|
522
|
+
description: string | null;
|
|
523
523
|
}, {
|
|
524
524
|
name: string;
|
|
525
525
|
id: string;
|
|
526
|
-
description: string;
|
|
526
|
+
description: string | null;
|
|
527
527
|
}>, "many">;
|
|
528
528
|
}, "strip", z.ZodTypeAny, {
|
|
529
529
|
resource: {
|
|
@@ -534,7 +534,7 @@ export declare const applicationUserConsentScopesResponseGuard: z.ZodObject<{
|
|
|
534
534
|
scopes: {
|
|
535
535
|
name: string;
|
|
536
536
|
id: string;
|
|
537
|
-
description: string;
|
|
537
|
+
description: string | null;
|
|
538
538
|
}[];
|
|
539
539
|
}, {
|
|
540
540
|
resource: {
|
|
@@ -545,7 +545,7 @@ export declare const applicationUserConsentScopesResponseGuard: z.ZodObject<{
|
|
|
545
545
|
scopes: {
|
|
546
546
|
name: string;
|
|
547
547
|
id: string;
|
|
548
|
-
description: string;
|
|
548
|
+
description: string | null;
|
|
549
549
|
}[];
|
|
550
550
|
}>, "many">;
|
|
551
551
|
userScopes: z.ZodArray<z.ZodNativeEnum<typeof UserScope>, "many">;
|
|
@@ -564,7 +564,7 @@ export declare const applicationUserConsentScopesResponseGuard: z.ZodObject<{
|
|
|
564
564
|
scopes: {
|
|
565
565
|
name: string;
|
|
566
566
|
id: string;
|
|
567
|
-
description: string;
|
|
567
|
+
description: string | null;
|
|
568
568
|
}[];
|
|
569
569
|
}[];
|
|
570
570
|
userScopes: UserScope[];
|
|
@@ -583,7 +583,7 @@ export declare const applicationUserConsentScopesResponseGuard: z.ZodObject<{
|
|
|
583
583
|
scopes: {
|
|
584
584
|
name: string;
|
|
585
585
|
id: string;
|
|
586
|
-
description: string;
|
|
586
|
+
description: string | null;
|
|
587
587
|
}[];
|
|
588
588
|
}[];
|
|
589
589
|
userScopes: UserScope[];
|