logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.66k stars 439 forks source link

refactor(core): make the interaction event mandatory #6337

Closed simeng-li closed 2 months ago

simeng-li commented 3 months ago

Summary

To better guard the experience interaction status, this PR makes the interactionEvent property mandatory.

For new experience interaction initiation endpoint (PUT /experience):

For existing experience interaction endpoints:

Testing

integration test added

Checklist

github-actions[bot] commented 3 months ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +272 Bytes

Diff by File |Name|Diff| |---|---| |packages/core/src/routes/experience/classes/experience-interaction.test.ts|:chart_with_upwards_trend: +23 Bytes| |packages/core/src/routes/experience/classes/experience-interaction.ts|:chart_with_upwards_trend: +86 Bytes| |packages/core/src/routes/experience/index.ts|:chart_with_upwards_trend: +117 Bytes| |packages/core/src/routes/experience/middleware/koa-experience-interaction.ts|:chart_with_upwards_trend: +381 Bytes| |packages/integration-tests/src/helpers/client.ts|:chart_with_upwards_trend: +169 Bytes| |packages/integration-tests/src/helpers/experience/index.ts|:chart_with_upwards_trend: +511 Bytes| |packages/integration-tests/src/tests/api/experience-api/bind-mfa/happpy-path.test.ts|:chart_with_upwards_trend: +180 Bytes| |packages/integration-tests/src/tests/api/experience-api/bind-mfa/sad-path.test.ts|:chart_with_upwards_trend: +143 Bytes| |packages/integration-tests/src/tests/api/experience-api/interaction.test.ts|:chart_with_upwards_trend: +970 Bytes| |packages/integration-tests/src/tests/api/experience-api/profile/fulfill-user-profiles.test.ts|:chart_with_upwards_trend: +141 Bytes| |packages/integration-tests/src/tests/api/experience-api/profile/reset-password.test.ts|:chart_with_upwards_trend: +226 Bytes| |packages/integration-tests/src/tests/api/experience-api/register-interaction/verification-code.test.ts|:chart_with_upwards_trend: +60 Bytes| |packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/social.test.ts|:chart_with_upwards_trend: +84 Bytes| |packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/verification-code.test.ts|:chart_with_upwards_trend: +83 Bytes|