@contember/engine-tenant-api 1.2.1 → 1.3.0-alpha.13
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/dist/src/TenantContainer.d.ts +1 -1
- package/dist/src/TenantContainer.d.ts.map +1 -1
- package/dist/src/TenantContainer.js +2 -0
- package/dist/src/TenantContainer.js.map +1 -1
- package/dist/src/bin/runMigrations.d.ts +2 -0
- package/dist/src/bin/runMigrations.d.ts.map +1 -0
- package/dist/src/bin/runMigrations.js +28 -0
- package/dist/src/bin/runMigrations.js.map +1 -0
- package/dist/src/migrations/2018-08-02-174310-init.d.ts +3 -0
- package/dist/src/migrations/2018-08-02-174310-init.d.ts.map +1 -0
- package/dist/src/migrations/2018-08-02-174310-init.js +64 -0
- package/dist/src/migrations/2018-08-02-174310-init.js.map +1 -0
- package/dist/src/migrations/2018-09-03-140621-identity-project.d.ts +3 -0
- package/dist/src/migrations/2018-09-03-140621-identity-project.d.ts.map +1 -0
- package/dist/src/migrations/2018-09-03-140621-identity-project.js +33 -0
- package/dist/src/migrations/2018-09-03-140621-identity-project.js.map +1 -0
- package/dist/src/migrations/2018-10-26-165450-setup-api-key.d.ts +3 -0
- package/dist/src/migrations/2018-10-26-165450-setup-api-key.d.ts.map +1 -0
- package/dist/src/migrations/2018-10-26-165450-setup-api-key.js +27 -0
- package/dist/src/migrations/2018-10-26-165450-setup-api-key.js.map +1 -0
- package/dist/src/migrations/2018-10-26-175155-variables.d.ts +3 -0
- package/dist/src/migrations/2018-10-26-175155-variables.d.ts.map +1 -0
- package/dist/src/migrations/2018-10-26-175155-variables.js +23 -0
- package/dist/src/migrations/2018-10-26-175155-variables.js.map +1 -0
- package/dist/src/migrations/2019-02-18-110949-project-slug.d.ts +3 -0
- package/dist/src/migrations/2019-02-18-110949-project-slug.d.ts.map +1 -0
- package/dist/src/migrations/2019-02-18-110949-project-slug.js +18 -0
- package/dist/src/migrations/2019-02-18-110949-project-slug.js.map +1 -0
- package/dist/src/migrations/2019-02-18-160155-session-expiration.d.ts +3 -0
- package/dist/src/migrations/2019-02-18-160155-session-expiration.d.ts.map +1 -0
- package/dist/src/migrations/2019-02-18-160155-session-expiration.js +11 -0
- package/dist/src/migrations/2019-02-18-160155-session-expiration.js.map +1 -0
- package/dist/src/migrations/2019-05-03-163729-api-key-disabled-at.d.ts +3 -0
- package/dist/src/migrations/2019-05-03-163729-api-key-disabled-at.d.ts.map +1 -0
- package/dist/src/migrations/2019-05-03-163729-api-key-disabled-at.js +18 -0
- package/dist/src/migrations/2019-05-03-163729-api-key-disabled-at.js.map +1 -0
- package/dist/src/migrations/2019-08-14-153300-project-slug-unique.d.ts +3 -0
- package/dist/src/migrations/2019-08-14-153300-project-slug-unique.d.ts.map +1 -0
- package/dist/src/migrations/2019-08-14-153300-project-slug-unique.js +11 -0
- package/dist/src/migrations/2019-08-14-153300-project-slug-unique.js.map +1 -0
- package/dist/src/migrations/2019-09-06-111000-membership.d.ts +3 -0
- package/dist/src/migrations/2019-09-06-111000-membership.d.ts.map +1 -0
- package/dist/src/migrations/2019-09-06-111000-membership.js +51 -0
- package/dist/src/migrations/2019-09-06-111000-membership.js.map +1 -0
- package/dist/src/migrations/2019-09-06-111001-drop-old-member.d.ts +3 -0
- package/dist/src/migrations/2019-09-06-111001-drop-old-member.d.ts.map +1 -0
- package/dist/src/migrations/2019-09-06-111001-drop-old-member.js +11 -0
- package/dist/src/migrations/2019-09-06-111001-drop-old-member.js.map +1 -0
- package/dist/src/migrations/2020-01-29-idenity-note.d.ts +3 -0
- package/dist/src/migrations/2020-01-29-idenity-note.d.ts.map +1 -0
- package/dist/src/migrations/2020-01-29-idenity-note.js +18 -0
- package/dist/src/migrations/2020-01-29-idenity-note.js.map +1 -0
- package/dist/src/migrations/2020-04-17-fix-person-index.d.ts +3 -0
- package/dist/src/migrations/2020-04-17-fix-person-index.d.ts.map +1 -0
- package/dist/src/migrations/2020-04-17-fix-person-index.js +12 -0
- package/dist/src/migrations/2020-04-17-fix-person-index.js.map +1 -0
- package/dist/src/migrations/2020-05-01-170000-api-key-index.d.ts +3 -0
- package/dist/src/migrations/2020-05-01-170000-api-key-index.d.ts.map +1 -0
- package/dist/src/migrations/2020-05-01-170000-api-key-index.js +10 -0
- package/dist/src/migrations/2020-05-01-170000-api-key-index.js.map +1 -0
- package/dist/src/migrations/2020-06-08-134000-tenant-credentials.d.ts.map +1 -1
- package/dist/src/migrations/2020-06-08-134000-tenant-credentials.js +2 -50
- package/dist/src/migrations/2020-06-08-134000-tenant-credentials.js.map +1 -1
- package/dist/src/migrations/2020-08-07-110000-person-otp.d.ts +3 -0
- package/dist/src/migrations/2020-08-07-110000-person-otp.d.ts.map +1 -0
- package/dist/src/migrations/2020-08-07-110000-person-otp.js +12 -0
- package/dist/src/migrations/2020-08-07-110000-person-otp.js.map +1 -0
- package/dist/src/migrations/2020-08-17-162200-mail-templates.d.ts +3 -0
- package/dist/src/migrations/2020-08-17-162200-mail-templates.d.ts.map +1 -0
- package/dist/src/migrations/2020-08-17-162200-mail-templates.js +23 -0
- package/dist/src/migrations/2020-08-17-162200-mail-templates.js.map +1 -0
- package/dist/src/migrations/2020-08-21-143400-person-password-reset.d.ts +3 -0
- package/dist/src/migrations/2020-08-21-143400-person-password-reset.d.ts.map +1 -0
- package/dist/src/migrations/2020-08-21-143400-person-password-reset.js +23 -0
- package/dist/src/migrations/2020-08-21-143400-person-password-reset.js.map +1 -0
- package/dist/src/migrations/2020-09-07-094200-identity-provider.d.ts +3 -0
- package/dist/src/migrations/2020-09-07-094200-identity-provider.d.ts.map +1 -0
- package/dist/src/migrations/2020-09-07-094200-identity-provider.js +17 -0
- package/dist/src/migrations/2020-09-07-094200-identity-provider.js.map +1 -0
- package/dist/src/migrations/2021-03-28-134000-timestamp.d.ts +3 -0
- package/dist/src/migrations/2021-03-28-134000-timestamp.d.ts.map +1 -0
- package/dist/src/migrations/2021-03-28-134000-timestamp.js +27 -0
- package/dist/src/migrations/2021-03-28-134000-timestamp.js.map +1 -0
- package/dist/src/migrations/2021-07-26-105000-project-config.d.ts +3 -0
- package/dist/src/migrations/2021-07-26-105000-project-config.d.ts.map +1 -0
- package/dist/src/migrations/2021-07-26-105000-project-config.js +12 -0
- package/dist/src/migrations/2021-07-26-105000-project-config.js.map +1 -0
- package/dist/src/migrations/2021-07-26-132000-project-secrets.d.ts +3 -0
- package/dist/src/migrations/2021-07-26-132000-project-secrets.d.ts.map +1 -0
- package/dist/src/migrations/2021-07-26-132000-project-secrets.js +24 -0
- package/dist/src/migrations/2021-07-26-132000-project-secrets.js.map +1 -0
- package/dist/src/migrations/2021-07-27-174000-project-alias-index.d.ts +3 -0
- package/dist/src/migrations/2021-07-27-174000-project-alias-index.d.ts.map +1 -0
- package/dist/src/migrations/2021-07-27-174000-project-alias-index.js +10 -0
- package/dist/src/migrations/2021-07-27-174000-project-alias-index.js.map +1 -0
- package/dist/src/migrations/2021-11-24-130000-person-password-null.d.ts +3 -0
- package/dist/src/migrations/2021-11-24-130000-person-password-null.d.ts.map +1 -0
- package/dist/src/migrations/2021-11-24-130000-person-password-null.js +10 -0
- package/dist/src/migrations/2021-11-24-130000-person-password-null.js.map +1 -0
- package/dist/src/migrations/2021-11-24-161500-mail-template-project-null.d.ts +3 -0
- package/dist/src/migrations/2021-11-24-161500-mail-template-project-null.d.ts.map +1 -0
- package/dist/src/migrations/2021-11-24-161500-mail-template-project-null.js +18 -0
- package/dist/src/migrations/2021-11-24-161500-mail-template-project-null.js.map +1 -0
- package/dist/src/migrations/2022-01-04-144000-person-unique-identity.d.ts +3 -0
- package/dist/src/migrations/2022-01-04-144000-person-unique-identity.d.ts.map +1 -0
- package/dist/src/migrations/2022-01-04-144000-person-unique-identity.js +11 -0
- package/dist/src/migrations/2022-01-04-144000-person-unique-identity.js.map +1 -0
- package/dist/src/migrations/2022-02-09-111800-fix-crypted.d.ts +3 -0
- package/dist/src/migrations/2022-02-09-111800-fix-crypted.d.ts.map +1 -0
- package/dist/src/migrations/2022-02-09-111800-fix-crypted.js +22 -0
- package/dist/src/migrations/2022-02-09-111800-fix-crypted.js.map +1 -0
- package/dist/src/migrations/2022-02-11-153000-idp-auto-sign-up.d.ts +3 -0
- package/dist/src/migrations/2022-02-11-153000-idp-auto-sign-up.d.ts.map +1 -0
- package/dist/src/migrations/2022-02-11-153000-idp-auto-sign-up.js +11 -0
- package/dist/src/migrations/2022-02-11-153000-idp-auto-sign-up.js.map +1 -0
- package/dist/src/migrations/2022-06-29-105000-person-idp.d.ts +3 -0
- package/dist/src/migrations/2022-06-29-105000-person-idp.d.ts.map +1 -0
- package/dist/src/migrations/2022-06-29-105000-person-idp.js +23 -0
- package/dist/src/migrations/2022-06-29-105000-person-idp.js.map +1 -0
- package/dist/src/migrations/2022-07-07-135000-person-email-opt-uniq.d.ts +3 -0
- package/dist/src/migrations/2022-07-07-135000-person-email-opt-uniq.d.ts.map +1 -0
- package/dist/src/migrations/2022-07-07-135000-person-email-opt-uniq.js +12 -0
- package/dist/src/migrations/2022-07-07-135000-person-email-opt-uniq.js.map +1 -0
- package/dist/src/migrations/2022-07-07-141000-person-display-name.d.ts +3 -0
- package/dist/src/migrations/2022-07-07-141000-person-display-name.d.ts.map +1 -0
- package/dist/src/migrations/2022-07-07-141000-person-display-name.js +13 -0
- package/dist/src/migrations/2022-07-07-141000-person-display-name.js.map +1 -0
- package/dist/src/migrations/2022-07-14-145000-person-login-options.d.ts +3 -0
- package/dist/src/migrations/2022-07-14-145000-person-login-options.d.ts.map +1 -0
- package/dist/src/migrations/2022-07-14-145000-person-login-options.js +15 -0
- package/dist/src/migrations/2022-07-14-145000-person-login-options.js.map +1 -0
- package/dist/src/migrations/2022-11-08-project-update-notification.d.ts +3 -0
- package/dist/src/migrations/2022-11-08-project-update-notification.d.ts.map +1 -0
- package/dist/src/migrations/2022-11-08-project-update-notification.js +64 -0
- package/dist/src/migrations/2022-11-08-project-update-notification.js.map +1 -0
- package/dist/src/migrations/runner.d.ts +1 -1
- package/dist/src/migrations/runner.d.ts.map +1 -1
- package/dist/src/migrations/runner.js +68 -5
- package/dist/src/migrations/runner.js.map +1 -1
- package/dist/src/migrations/snapshot-factory.d.ts +5 -0
- package/dist/src/migrations/snapshot-factory.d.ts.map +1 -0
- package/dist/src/migrations/snapshot-factory.js +18 -0
- package/dist/src/migrations/snapshot-factory.js.map +1 -0
- package/dist/src/migrations/snapshot.d.ts +4 -0
- package/dist/src/migrations/snapshot.d.ts.map +1 -0
- package/dist/src/migrations/snapshot.js +202 -0
- package/dist/src/migrations/snapshot.js.map +1 -0
- package/dist/src/migrations/tenantCredentials.d.ts +4 -0
- package/dist/src/migrations/tenantCredentials.d.ts.map +1 -0
- package/dist/src/migrations/tenantCredentials.js +57 -0
- package/dist/src/migrations/tenantCredentials.js.map +1 -0
- package/dist/src/migrations/types.d.ts +2 -0
- package/dist/src/migrations/types.d.ts.map +1 -1
- package/dist/src/model/commands/idp/UpdateIdpCommand.d.ts +1 -0
- package/dist/src/model/commands/idp/UpdateIdpCommand.d.ts.map +1 -1
- package/dist/src/model/queries/membership/ProjectMembersQuery.d.ts +3 -3
- package/dist/src/model/queries/membership/ProjectMembersQuery.d.ts.map +1 -1
- package/dist/src/model/queries/membership/ProjectMembersQuery.js +22 -10
- package/dist/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/src/model/service/IDPSignInManager.d.ts +3 -3
- package/dist/src/model/service/IDPSignInManager.d.ts.map +1 -1
- package/dist/src/model/service/IDPSignInManager.js +13 -5
- package/dist/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/src/model/service/ProjectMemberManager.d.ts +2 -2
- package/dist/src/model/service/ProjectMemberManager.d.ts.map +1 -1
- package/dist/src/model/service/ProjectMemberManager.js +2 -2
- package/dist/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/src/model/service/idp/IDPHandlerRegistry.d.ts +2 -2
- package/dist/src/model/service/idp/IDPHandlerRegistry.d.ts.map +1 -1
- package/dist/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/src/model/service/idp/IDPManager.d.ts.map +1 -1
- package/dist/src/model/service/idp/IDPManager.js +7 -2
- package/dist/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/src/model/service/idp/IdentityProviderHandler.d.ts +6 -9
- package/dist/src/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
- package/dist/src/model/service/idp/index.d.ts +3 -1
- package/dist/src/model/service/idp/index.d.ts.map +1 -1
- package/dist/src/model/service/idp/index.js +3 -1
- package/dist/src/model/service/idp/index.js.map +1 -1
- package/dist/src/model/service/idp/providers/AppleProvider.d.ts +29 -0
- package/dist/src/model/service/idp/providers/AppleProvider.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/AppleProvider.js +79 -0
- package/dist/src/model/service/idp/providers/AppleProvider.js.map +1 -0
- package/dist/src/model/service/idp/providers/FacebookProvider.d.ts +27 -0
- package/dist/src/model/service/idp/providers/FacebookProvider.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/FacebookProvider.js +137 -0
- package/dist/src/model/service/idp/providers/FacebookProvider.js.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCHelpers.d.ts +10 -0
- package/dist/src/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCHelpers.js +56 -0
- package/dist/src/model/service/idp/providers/OIDCHelpers.js.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCProvider.d.ts +19 -0
- package/dist/src/model/service/idp/providers/OIDCProvider.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCProvider.js +40 -0
- package/dist/src/model/service/idp/providers/OIDCProvider.js.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCTypes.d.ts +62 -0
- package/dist/src/model/service/idp/providers/OIDCTypes.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/OIDCTypes.js +56 -0
- package/dist/src/model/service/idp/providers/OIDCTypes.js.map +1 -0
- package/dist/src/model/service/idp/providers/helpers.d.ts +3 -0
- package/dist/src/model/service/idp/providers/helpers.d.ts.map +1 -0
- package/dist/src/model/service/idp/providers/helpers.js +40 -0
- package/dist/src/model/service/idp/providers/helpers.js.map +1 -0
- package/dist/src/model/utils/DatabaseContext.d.ts +1 -0
- package/dist/src/model/utils/DatabaseContext.d.ts.map +1 -1
- package/dist/src/model/utils/DatabaseContext.js +5 -0
- package/dist/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/src/resolvers/mutation/idp/UpdateIDPMutationResolver.d.ts.map +1 -1
- package/dist/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js +4 -3
- package/dist/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/src/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
- package/dist/src/resolvers/mutation/person/IDPMutationResolver.js +10 -3
- package/dist/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/src/resolvers/types/ProjectTypeResolver.d.ts.map +1 -1
- package/dist/src/resolvers/types/ProjectTypeResolver.js +14 -6
- package/dist/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/src/schema/index.d.ts +26 -8
- package/dist/src/schema/index.d.ts.map +1 -1
- package/dist/src/schema/index.js +1 -0
- package/dist/src/schema/index.js.map +1 -1
- package/dist/src/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/src/schema/tenant.graphql.js +32 -6
- package/dist/src/schema/tenant.graphql.js.map +1 -1
- package/dist/src/tsconfig.tsbuildinfo +1 -1
- package/dist/tests/cases/integration/db/invite.test.js +2 -2
- package/dist/tests/cases/integration/db/unmanagedInvite.test.js +2 -2
- package/dist/{src → tests/cases}/migrations/2020-06-08-134000-tenant-credentials.test.d.ts +1 -1
- package/dist/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.d.ts.map +1 -0
- package/dist/{src → tests/cases}/migrations/2020-06-08-134000-tenant-credentials.test.js +19 -9
- package/dist/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.js.map +1 -0
- package/dist/tests/src/IdPMock.d.ts +4 -4
- package/dist/tests/src/IdPMock.d.ts.map +1 -1
- package/dist/tests/src/IdPMock.js +2 -2
- package/dist/tests/src/IdPMock.js.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -14
- package/src/TenantContainer.ts +4 -2
- package/src/bin/runMigrations.ts +32 -0
- package/src/migrations/{2018-08-02-174310-init.sql → 2018-08-02-174310-init.ts} +8 -1
- package/src/migrations/{2018-09-03-140621-identity-project.sql → 2018-09-03-140621-identity-project.ts} +8 -0
- package/src/migrations/{2018-10-26-165450-setup-api-key.sql → 2018-10-26-165450-setup-api-key.ts} +8 -0
- package/src/migrations/{2018-10-26-175155-variables.sql → 2018-10-26-175155-variables.ts} +7 -0
- package/src/migrations/{2019-02-18-110949-project-slug.sql → 2019-02-18-110949-project-slug.ts} +8 -0
- package/src/migrations/2019-02-18-160155-session-expiration.ts +10 -0
- package/src/migrations/{2019-05-03-163729-api-key-disabled-at.sql → 2019-05-03-163729-api-key-disabled-at.ts} +8 -0
- package/src/migrations/2019-08-14-153300-project-slug-unique.ts +10 -0
- package/src/migrations/{2019-09-06-111000-membership.sql → 2019-09-06-111000-membership.ts} +8 -0
- package/src/migrations/2019-09-06-111001-drop-old-member.ts +10 -0
- package/src/migrations/2020-01-29-idenity-note.ts +18 -0
- package/src/migrations/2020-04-17-fix-person-index.ts +12 -0
- package/src/migrations/2020-05-01-170000-api-key-index.ts +10 -0
- package/src/migrations/2020-06-08-134000-tenant-credentials.ts +3 -54
- package/src/migrations/2020-08-07-110000-person-otp.ts +12 -0
- package/src/migrations/{2020-08-17-162200-mail-templates.sql → 2020-08-17-162200-mail-templates.ts} +8 -0
- package/src/migrations/{2020-08-21-143400-person-password-reset.sql → 2020-08-21-143400-person-password-reset.ts} +8 -0
- package/src/migrations/{2020-09-07-094200-identity-provider.sql → 2020-09-07-094200-identity-provider.ts} +8 -0
- package/src/migrations/{2021-03-28-134000-timestamp.sql → 2021-03-28-134000-timestamp.ts} +9 -0
- package/src/migrations/2021-07-26-105000-project-config.ts +12 -0
- package/src/migrations/{2021-07-26-132000-project-secrets.sql → 2021-07-26-132000-project-secrets.ts} +8 -0
- package/src/migrations/2021-07-27-174000-project-alias-index.ts +10 -0
- package/src/migrations/2021-11-24-130000-person-password-null.ts +10 -0
- package/src/migrations/{2021-11-24-161500-mail-template-project-null.sql → 2021-11-24-161500-mail-template-project-null.ts} +8 -0
- package/src/migrations/2022-01-04-144000-person-unique-identity.ts +10 -0
- package/src/migrations/{2022-02-09-111800-fix-crypted.sql → 2022-02-09-111800-fix-crypted.ts} +8 -0
- package/src/migrations/2022-02-11-153000-idp-auto-sign-up.ts +10 -0
- package/src/migrations/{2022-06-29-105000-person-idp.sql → 2022-06-29-105000-person-idp.ts} +8 -0
- package/src/migrations/2022-07-07-135000-person-email-opt-uniq.ts +11 -0
- package/src/migrations/2022-07-07-141000-person-display-name.ts +13 -0
- package/src/migrations/{2022-07-14-145000-person-login-options.sql → 2022-07-14-145000-person-login-options.ts} +9 -0
- package/src/migrations/2022-11-08-project-update-notification.ts +64 -0
- package/src/migrations/runner.ts +72 -8
- package/src/migrations/snapshot-factory.ts +21 -0
- package/src/migrations/snapshot-template-end.txt +10 -0
- package/src/migrations/snapshot-template-start.txt +6 -0
- package/src/migrations/snapshot.ts +202 -0
- package/src/migrations/tenantCredentials.ts +58 -0
- package/src/migrations/types.ts +3 -0
- package/src/model/commands/idp/UpdateIdpCommand.ts +1 -0
- package/src/model/queries/membership/ProjectMembersQuery.ts +23 -14
- package/src/model/service/IDPSignInManager.ts +13 -10
- package/src/model/service/ProjectMemberManager.ts +3 -3
- package/src/model/service/idp/IDPHandlerRegistry.ts +3 -3
- package/src/model/service/idp/IDPManager.ts +6 -2
- package/src/model/service/idp/IdentityProviderHandler.ts +7 -15
- package/src/model/service/idp/index.ts +3 -1
- package/src/model/service/idp/providers/AppleProvider.ts +65 -0
- package/src/model/service/idp/providers/FacebookProvider.ts +125 -0
- package/src/model/service/idp/providers/OIDCHelpers.ts +54 -0
- package/src/model/service/idp/providers/OIDCProvider.ts +40 -0
- package/src/model/service/idp/providers/OIDCTypes.ts +61 -0
- package/src/model/service/idp/providers/helpers.ts +12 -0
- package/src/model/utils/DatabaseContext.ts +6 -0
- package/src/resolvers/mutation/idp/UpdateIDPMutationResolver.ts +1 -0
- package/src/resolvers/mutation/person/IDPMutationResolver.ts +9 -7
- package/src/resolvers/types/ProjectTypeResolver.ts +9 -2
- package/src/schema/index.ts +28 -8
- package/src/schema/tenant.graphql.ts +32 -6
- package/src/tsconfig.json +10 -30
- package/tests/cases/integration/db/invite.test.ts +2 -2
- package/tests/cases/integration/db/unmanagedInvite.test.ts +2 -2
- package/{src → tests/cases}/migrations/2020-06-08-134000-tenant-credentials.test.ts +17 -9
- package/tests/src/IdPMock.ts +4 -4
- package/tests/tsconfig.json +2 -6
- package/tsconfig.json +2 -6
- package/dist/src/migrations/2020-06-08-134000-tenant-credentials.test.d.ts.map +0 -1
- package/dist/src/migrations/2020-06-08-134000-tenant-credentials.test.js.map +0 -1
- package/dist/src/model/service/idp/OIDCProvider.d.ts +0 -25
- package/dist/src/model/service/idp/OIDCProvider.d.ts.map +0 -1
- package/dist/src/model/service/idp/OIDCProvider.js +0 -108
- package/dist/src/model/service/idp/OIDCProvider.js.map +0 -1
- package/src/migrations/2019-02-18-160155-session-expiration.sql +0 -2
- package/src/migrations/2019-08-14-153300-project-slug-unique.sql +0 -2
- package/src/migrations/2019-09-06-111001-drop-old-member.sql +0 -2
- package/src/migrations/2020-01-29-idenity-note.sql +0 -9
- package/src/migrations/2020-04-17-fix-person-index.sql +0 -3
- package/src/migrations/2020-05-01-170000-api-key-index.sql +0 -1
- package/src/migrations/2020-08-07-110000-person-otp.sql +0 -3
- package/src/migrations/2021-07-26-105000-project-config.sql +0 -3
- package/src/migrations/2021-07-27-174000-project-alias-index.sql +0 -1
- package/src/migrations/2021-11-24-130000-person-password-null.sql +0 -1
- package/src/migrations/2022-01-04-144000-person-unique-identity.sql +0 -2
- package/src/migrations/2022-02-11-153000-idp-auto-sign-up.sql +0 -2
- package/src/migrations/2022-07-07-135000-person-email-opt-uniq.sql +0 -3
- package/src/migrations/2022-07-07-141000-person-display-name.sql +0 -4
- package/src/model/service/idp/OIDCProvider.ts +0 -100
|
@@ -1,56 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tenantCredentials_1 = require("./tenantCredentials");
|
|
4
4
|
async function default_1(builder, args) {
|
|
5
|
-
|
|
6
|
-
if (credentials.loginTokenHash) {
|
|
7
|
-
const tokenHash = credentials.loginTokenHash;
|
|
8
|
-
builder.sql(`
|
|
9
|
-
WITH identity AS (
|
|
10
|
-
INSERT INTO identity(id, parent_id, roles, description, created_at)
|
|
11
|
-
VALUES (public."uuid_generate_v4"(), NULL, '["login"]'::JSONB, 'Login key', now()) RETURNING id
|
|
12
|
-
)
|
|
13
|
-
INSERT INTO api_key (id, token_hash, type, identity_id, disabled_at, expires_at, expiration, created_at)
|
|
14
|
-
SELECT public."uuid_generate_v4"(), ${(0, database_migrations_1.escapeValue)(tokenHash)}, 'permanent', identity.id, NULL, NULL, NULL, now()
|
|
15
|
-
FROM identity
|
|
16
|
-
`);
|
|
17
|
-
}
|
|
18
|
-
if (!credentials.rootTokenHash) {
|
|
19
|
-
throw 'Please specify a root token using CONTEMBER_ROOT_TOKEN env variable.';
|
|
20
|
-
}
|
|
21
|
-
if (credentials.rootEmail && !credentials.rootPasswordBcrypted) {
|
|
22
|
-
throw 'Please specify a root password using CONTEMBER_ROOT_PASSWORD env variable.';
|
|
23
|
-
}
|
|
24
|
-
const rootEmail = credentials.rootPasswordBcrypted ? credentials.rootEmail || 'root@localhost' : null;
|
|
25
|
-
const rootPasswordHash = credentials.rootPasswordBcrypted || null;
|
|
26
|
-
const rootTokenHash = credentials.rootTokenHash;
|
|
27
|
-
builder.sql(`
|
|
28
|
-
WITH identity AS (
|
|
29
|
-
INSERT INTO identity(id, parent_id, roles, description, created_at)
|
|
30
|
-
VALUES (
|
|
31
|
-
public."uuid_generate_v4"(),
|
|
32
|
-
NULL,
|
|
33
|
-
'["super_admin"]'::JSONB
|
|
34
|
-
|| (CASE WHEN ${(0, database_migrations_1.escapeValue)(rootEmail)} IS NOT NULL THEN '["person"]'::JSONB ELSE '[]'::JSONB END),
|
|
35
|
-
'Superadmin',
|
|
36
|
-
now()
|
|
37
|
-
) RETURNING id
|
|
38
|
-
),
|
|
39
|
-
person AS (
|
|
40
|
-
INSERT INTO person(id, email, password_hash, identity_id)
|
|
41
|
-
SELECT public."uuid_generate_v4"(), ${(0, database_migrations_1.escapeValue)(rootEmail)}, ${(0, database_migrations_1.escapeValue)(rootPasswordHash)}, identity.id
|
|
42
|
-
FROM identity
|
|
43
|
-
WHERE ${(0, database_migrations_1.escapeValue)(rootEmail)} IS NOT NULL
|
|
44
|
-
RETURNING id
|
|
45
|
-
),
|
|
46
|
-
api_key AS (
|
|
47
|
-
INSERT INTO api_key (id, token_hash, type, identity_id, disabled_at, expires_at, expiration, created_at)
|
|
48
|
-
SELECT public."uuid_generate_v4"(), ${(0, database_migrations_1.escapeValue)(rootTokenHash)}, 'permanent', identity.id, NULL, NULL, NULL, now()
|
|
49
|
-
FROM identity WHERE ${(0, database_migrations_1.escapeValue)(rootTokenHash)} IS NOT NULL
|
|
50
|
-
RETURNING id
|
|
51
|
-
)
|
|
52
|
-
SELECT * FROM person, api_key
|
|
53
|
-
`);
|
|
5
|
+
await (0, tenantCredentials_1.createCredentials)(builder, args);
|
|
54
6
|
}
|
|
55
7
|
exports.default = default_1;
|
|
56
8
|
//# sourceMappingURL=2020-06-08-134000-tenant-credentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2020-06-08-134000-tenant-credentials.js","sourceRoot":"","sources":["../../../src/migrations/2020-06-08-134000-tenant-credentials.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"2020-06-08-134000-tenant-credentials.js","sourceRoot":"","sources":["../../../src/migrations/2020-06-08-134000-tenant-credentials.ts"],"names":[],"mappings":";;AAEA,2DAAuD;AAExC,KAAK,oBAAW,OAAyB,EAAE,IAAyB;IAClF,MAAM,IAAA,qCAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACvC,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-07-110000-person-otp.d.ts","sourceRoot":"","sources":["../../../src/migrations/2020-08-07-110000-person-otp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAQjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE "person"
|
|
5
|
+
ADD COLUMN otp_uri TEXT DEFAULT NULL,
|
|
6
|
+
ADD COLUMN otp_activated_at TIMESTAMP DEFAULT NULL
|
|
7
|
+
`;
|
|
8
|
+
async function default_1(builder) {
|
|
9
|
+
builder.sql(sql);
|
|
10
|
+
}
|
|
11
|
+
exports.default = default_1;
|
|
12
|
+
//# sourceMappingURL=2020-08-07-110000-person-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-07-110000-person-otp.js","sourceRoot":"","sources":["../../../src/migrations/2020-08-07-110000-person-otp.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;CAIX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-17-162200-mail-templates.d.ts","sourceRoot":"","sources":["../../../src/migrations/2020-08-17-162200-mail-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAmBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE TABLE mail_template (
|
|
5
|
+
id UUID NOT NULL PRIMARY KEY,
|
|
6
|
+
project_id UUID NOT NULL,
|
|
7
|
+
mail_type TEXT NOT NULL,
|
|
8
|
+
variant TEXT NOT NULL,
|
|
9
|
+
subject TEXT NOT NULL,
|
|
10
|
+
content TEXT NOT NULL,
|
|
11
|
+
use_layout BOOL NOT NULL,
|
|
12
|
+
CONSTRAINT mail_template_project FOREIGN KEY (project_id) REFERENCES project(id) ON DELETE CASCADE
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE UNIQUE INDEX mail_template_identifier ON mail_template(project_id, mail_type, variant);
|
|
16
|
+
CREATE INDEX mail_template_project_index
|
|
17
|
+
ON mail_template(project_id);
|
|
18
|
+
`;
|
|
19
|
+
async function default_1(builder) {
|
|
20
|
+
builder.sql(sql);
|
|
21
|
+
}
|
|
22
|
+
exports.default = default_1;
|
|
23
|
+
//# sourceMappingURL=2020-08-17-162200-mail-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-17-162200-mail-templates.js","sourceRoot":"","sources":["../../../src/migrations/2020-08-17-162200-mail-templates.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;CAeX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-21-143400-person-password-reset.d.ts","sourceRoot":"","sources":["../../../src/migrations/2020-08-21-143400-person-password-reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAoBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE TABLE person_password_reset (
|
|
5
|
+
id UUID NOT NULL,
|
|
6
|
+
token_hash TEXT NOT NULL,
|
|
7
|
+
person_id UUID NOT NULL,
|
|
8
|
+
expires_at TIMESTAMP NOT NULL,
|
|
9
|
+
created_at TIMESTAMP NOT NULL,
|
|
10
|
+
used_at TIMESTAMP,
|
|
11
|
+
CONSTRAINT person_password_reset_id PRIMARY KEY ("id"),
|
|
12
|
+
CONSTRAINT person_password_reset_person FOREIGN KEY ("person_id")
|
|
13
|
+
REFERENCES person("id") ON DELETE CASCADE
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
CREATE UNIQUE INDEX person_password_reset_token
|
|
17
|
+
ON person_password_reset(token_hash);
|
|
18
|
+
`;
|
|
19
|
+
async function default_1(builder) {
|
|
20
|
+
builder.sql(sql);
|
|
21
|
+
}
|
|
22
|
+
exports.default = default_1;
|
|
23
|
+
//# sourceMappingURL=2020-08-21-143400-person-password-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-08-21-143400-person-password-reset.js","sourceRoot":"","sources":["../../../src/migrations/2020-08-21-143400-person-password-reset.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;CAeX,CAAA;AAGc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-09-07-094200-identity-provider.d.ts","sourceRoot":"","sources":["../../../src/migrations/2020-09-07-094200-identity-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAajE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE TABLE identity_provider (
|
|
5
|
+
id UUID NOT NULL,
|
|
6
|
+
slug TEXT UNIQUE NOT NULL,
|
|
7
|
+
type TEXT NOT NULL,
|
|
8
|
+
configuration JSONB NOT NULL,
|
|
9
|
+
disabled_at TIMESTAMP DEFAULT NULL,
|
|
10
|
+
CONSTRAINT identity_provider_id PRIMARY KEY ("id")
|
|
11
|
+
);
|
|
12
|
+
`;
|
|
13
|
+
async function default_1(builder) {
|
|
14
|
+
builder.sql(sql);
|
|
15
|
+
}
|
|
16
|
+
exports.default = default_1;
|
|
17
|
+
//# sourceMappingURL=2020-09-07-094200-identity-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2020-09-07-094200-identity-provider.js","sourceRoot":"","sources":["../../../src/migrations/2020-09-07-094200-identity-provider.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;CASX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-03-28-134000-timestamp.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-03-28-134000-timestamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAuBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE identity_provider
|
|
5
|
+
ALTER disabled_at TYPE TIMESTAMPTZ;
|
|
6
|
+
|
|
7
|
+
ALTER TABLE api_key
|
|
8
|
+
ALTER disabled_at TYPE TIMESTAMPTZ,
|
|
9
|
+
ALTER created_at TYPE TIMESTAMPTZ,
|
|
10
|
+
ALTER expires_at TYPE TIMESTAMPTZ;
|
|
11
|
+
|
|
12
|
+
ALTER TABLE identity
|
|
13
|
+
ALTER created_at TYPE TIMESTAMPTZ;
|
|
14
|
+
|
|
15
|
+
ALTER TABLE person
|
|
16
|
+
ALTER otp_activated_at TYPE TIMESTAMPTZ;
|
|
17
|
+
|
|
18
|
+
ALTER TABLE person_password_reset
|
|
19
|
+
ALTER expires_at TYPE TIMESTAMPTZ,
|
|
20
|
+
ALTER created_at TYPE TIMESTAMPTZ,
|
|
21
|
+
ALTER used_at TYPE TIMESTAMPTZ;
|
|
22
|
+
`;
|
|
23
|
+
async function default_1(builder) {
|
|
24
|
+
builder.sql(sql);
|
|
25
|
+
}
|
|
26
|
+
exports.default = default_1;
|
|
27
|
+
//# sourceMappingURL=2021-03-28-134000-timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-03-28-134000-timestamp.js","sourceRoot":"","sources":["../../../src/migrations/2021-03-28-134000-timestamp.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;CAmBX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-26-105000-project-config.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-07-26-105000-project-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAQjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE project
|
|
5
|
+
ADD COLUMN config JSONB NOT NULL DEFAULT '{}'::JSONB,
|
|
6
|
+
add column updated_at timestamptz not null DEFAULT now();
|
|
7
|
+
`;
|
|
8
|
+
async function default_1(builder) {
|
|
9
|
+
builder.sql(sql);
|
|
10
|
+
}
|
|
11
|
+
exports.default = default_1;
|
|
12
|
+
//# sourceMappingURL=2021-07-26-105000-project-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-26-105000-project-config.js","sourceRoot":"","sources":["../../../src/migrations/2021-07-26-105000-project-config.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;CAIX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-26-132000-project-secrets.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-07-26-132000-project-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAoBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE TABLE project_secret
|
|
5
|
+
(
|
|
6
|
+
id UUID NOT NULL PRIMARY KEY,
|
|
7
|
+
project_id UUID NOT NULL,
|
|
8
|
+
key TEXT NOT NULL,
|
|
9
|
+
value_encrypted TEXT NOT NULL,
|
|
10
|
+
iv TEXT NOT NULL,
|
|
11
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
12
|
+
updated_at TIMESTAMPTZ NOT NULL,
|
|
13
|
+
CONSTRAINT project_secret_project FOREIGN KEY (project_id) REFERENCES project (id) ON DELETE CASCADE
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
CREATE UNIQUE INDEX project_secret_unique ON project_secret (project_id, key);
|
|
17
|
+
CREATE INDEX project_secret_project_index
|
|
18
|
+
ON project_secret (project_id);
|
|
19
|
+
`;
|
|
20
|
+
async function default_1(builder) {
|
|
21
|
+
builder.sql(sql);
|
|
22
|
+
}
|
|
23
|
+
exports.default = default_1;
|
|
24
|
+
//# sourceMappingURL=2021-07-26-132000-project-secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-26-132000-project-secrets.js","sourceRoot":"","sources":["../../../src/migrations/2021-07-26-132000-project-secrets.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;CAgBX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-27-174000-project-alias-index.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-07-27-174000-project-alias-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAMjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE INDEX project_alias ON project USING gin ((config -> 'alias'));
|
|
5
|
+
`;
|
|
6
|
+
async function default_1(builder) {
|
|
7
|
+
builder.sql(sql);
|
|
8
|
+
}
|
|
9
|
+
exports.default = default_1;
|
|
10
|
+
//# sourceMappingURL=2021-07-27-174000-project-alias-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-07-27-174000-project-alias-index.js","sourceRoot":"","sources":["../../../src/migrations/2021-07-27-174000-project-alias-index.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;CAEX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-11-24-130000-person-password-null.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-11-24-130000-person-password-null.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAMjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE person ALTER COLUMN password_hash DROP NOT NULL;
|
|
5
|
+
`;
|
|
6
|
+
async function default_1(builder) {
|
|
7
|
+
builder.sql(sql);
|
|
8
|
+
}
|
|
9
|
+
exports.default = default_1;
|
|
10
|
+
//# sourceMappingURL=2021-11-24-130000-person-password-null.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-11-24-130000-person-password-null.js","sourceRoot":"","sources":["../../../src/migrations/2021-11-24-130000-person-password-null.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;CAEX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-11-24-161500-mail-template-project-null.d.ts","sourceRoot":"","sources":["../../../src/migrations/2021-11-24-161500-mail-template-project-null.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAcjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE "mail_template" ALTER COLUMN "project_id" DROP NOT NULL;
|
|
5
|
+
|
|
6
|
+
DROP INDEX mail_template_identifier;
|
|
7
|
+
|
|
8
|
+
CREATE UNIQUE INDEX mail_template_identifier
|
|
9
|
+
ON mail_template (project_id, mail_type, variant) WHERE project_id IS NOT NULL;
|
|
10
|
+
|
|
11
|
+
CREATE UNIQUE INDEX mail_template_identifier_global
|
|
12
|
+
ON mail_template (mail_type, variant) WHERE project_id IS NULL;
|
|
13
|
+
`;
|
|
14
|
+
async function default_1(builder) {
|
|
15
|
+
builder.sql(sql);
|
|
16
|
+
}
|
|
17
|
+
exports.default = default_1;
|
|
18
|
+
//# sourceMappingURL=2021-11-24-161500-mail-template-project-null.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2021-11-24-161500-mail-template-project-null.js","sourceRoot":"","sources":["../../../src/migrations/2021-11-24-161500-mail-template-project-null.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;CAUX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-01-04-144000-person-unique-identity.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-01-04-144000-person-unique-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAOjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE person
|
|
5
|
+
ADD UNIQUE (identity_id);
|
|
6
|
+
`;
|
|
7
|
+
async function default_1(builder) {
|
|
8
|
+
builder.sql(sql);
|
|
9
|
+
}
|
|
10
|
+
exports.default = default_1;
|
|
11
|
+
//# sourceMappingURL=2022-01-04-144000-person-unique-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-01-04-144000-person-unique-identity.js","sourceRoot":"","sources":["../../../src/migrations/2022-01-04-144000-person-unique-identity.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;CAGX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-02-09-111800-fix-crypted.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-02-09-111800-fix-crypted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAkBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE project_secret
|
|
5
|
+
ADD COLUMN value BYTEA,
|
|
6
|
+
ADD COLUMN version SMALLINT;
|
|
7
|
+
|
|
8
|
+
UPDATE project_secret SET
|
|
9
|
+
value = DECODE(value_encrypted, 'base64') || DECODE(iv, 'base64'),
|
|
10
|
+
version = 1;
|
|
11
|
+
|
|
12
|
+
ALTER TABLE project_secret
|
|
13
|
+
ALTER value SET NOT NULL,
|
|
14
|
+
ALTER version SET NOT NULL,
|
|
15
|
+
DROP value_encrypted,
|
|
16
|
+
DROP iv;
|
|
17
|
+
`;
|
|
18
|
+
async function default_1(builder) {
|
|
19
|
+
builder.sql(sql);
|
|
20
|
+
}
|
|
21
|
+
exports.default = default_1;
|
|
22
|
+
//# sourceMappingURL=2022-02-09-111800-fix-crypted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-02-09-111800-fix-crypted.js","sourceRoot":"","sources":["../../../src/migrations/2022-02-09-111800-fix-crypted.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;CAcX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-02-11-153000-idp-auto-sign-up.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-02-11-153000-idp-auto-sign-up.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAOjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE identity_provider
|
|
5
|
+
ADD COLUMN auto_sign_up BOOLEAN NOT NULL DEFAULT FALSE;
|
|
6
|
+
`;
|
|
7
|
+
async function default_1(builder) {
|
|
8
|
+
builder.sql(sql);
|
|
9
|
+
}
|
|
10
|
+
exports.default = default_1;
|
|
11
|
+
//# sourceMappingURL=2022-02-11-153000-idp-auto-sign-up.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-02-11-153000-idp-auto-sign-up.js","sourceRoot":"","sources":["../../../src/migrations/2022-02-11-153000-idp-auto-sign-up.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;CAGX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-06-29-105000-person-idp.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-06-29-105000-person-idp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAmBjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
CREATE TABLE person_identity_provider
|
|
5
|
+
(
|
|
6
|
+
id UUID NOT NULL PRIMARY KEY,
|
|
7
|
+
person_id UUID NOT NULL,
|
|
8
|
+
identity_provider_id UUID NOT NULL,
|
|
9
|
+
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
10
|
+
external_identifier TEXT NOT NULL,
|
|
11
|
+
CONSTRAINT person_identity_provider_person FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE,
|
|
12
|
+
CONSTRAINT person_identity_provider_idp FOREIGN KEY (identity_provider_id) REFERENCES identity_provider (id) ON DELETE CASCADE
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE INDEX person_identity_provider_person_id ON person_identity_provider (person_id);
|
|
16
|
+
CREATE UNIQUE INDEX person_identity_provider_identifier
|
|
17
|
+
ON person_identity_provider (identity_provider_id, external_identifier);
|
|
18
|
+
`;
|
|
19
|
+
async function default_1(builder) {
|
|
20
|
+
builder.sql(sql);
|
|
21
|
+
}
|
|
22
|
+
exports.default = default_1;
|
|
23
|
+
//# sourceMappingURL=2022-06-29-105000-person-idp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-06-29-105000-person-idp.js","sourceRoot":"","sources":["../../../src/migrations/2022-06-29-105000-person-idp.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;CAeX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-07-135000-person-email-opt-uniq.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-07-07-135000-person-email-opt-uniq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAQjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE person
|
|
5
|
+
ALTER email DROP NOT NULL,
|
|
6
|
+
ADD CONSTRAINT email_unique UNIQUE (email);
|
|
7
|
+
`;
|
|
8
|
+
async function default_1(builder) {
|
|
9
|
+
builder.sql(sql);
|
|
10
|
+
}
|
|
11
|
+
exports.default = default_1;
|
|
12
|
+
//# sourceMappingURL=2022-07-07-135000-person-email-opt-uniq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-07-135000-person-email-opt-uniq.js","sourceRoot":"","sources":["../../../src/migrations/2022-07-07-135000-person-email-opt-uniq.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;CAIX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-07-141000-person-display-name.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-07-07-141000-person-display-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AASjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE person
|
|
5
|
+
ADD name TEXT;
|
|
6
|
+
UPDATE person
|
|
7
|
+
SET name = SPLIT_PART(email, '@', 1);
|
|
8
|
+
`;
|
|
9
|
+
async function default_1(builder) {
|
|
10
|
+
builder.sql(sql);
|
|
11
|
+
}
|
|
12
|
+
exports.default = default_1;
|
|
13
|
+
//# sourceMappingURL=2022-07-07-141000-person-display-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-07-141000-person-display-name.js","sourceRoot":"","sources":["../../../src/migrations/2022-07-07-141000-person-display-name.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;CAKX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-14-145000-person-login-options.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-07-14-145000-person-login-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAWjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sql = `
|
|
4
|
+
ALTER TABLE person
|
|
5
|
+
ADD idp_only BOOLEAN NOT NULL DEFAULT FALSE,
|
|
6
|
+
ADD CONSTRAINT idp_only_no_email CHECK ( idp_only = FALSE OR (idp_only = TRUE AND email IS NULL));
|
|
7
|
+
|
|
8
|
+
ALTER TABLE identity_provider
|
|
9
|
+
ADD exclusive BOOLEAN DEFAULT FALSE;
|
|
10
|
+
`;
|
|
11
|
+
async function default_1(builder) {
|
|
12
|
+
builder.sql(sql);
|
|
13
|
+
}
|
|
14
|
+
exports.default = default_1;
|
|
15
|
+
//# sourceMappingURL=2022-07-14-145000-person-login-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-07-14-145000-person-login-options.js","sourceRoot":"","sources":["../../../src/migrations/2022-07-14-145000-person-login-options.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG;;;;;;;CAOX,CAAA;AAEc,KAAK,oBAAW,OAAyB;IACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAFD,4BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2022-11-08-project-update-notification.d.ts","sourceRoot":"","sources":["../../../src/migrations/2022-11-08-project-update-notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AA4DjE,yBAA+B,OAAO,EAAE,gBAAgB,iBAEvD"}
|