logto-io / logto

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

feat(core,schemas): add post custom ui assets api #6118

Closed charIeszhao closed 7 hours ago

charIeszhao commented 2 weeks ago

Summary

Add POST /sign-in-exp/custom-ui-assets API, to allow users to upload a zipped package of custom UI assets to Logto Cloud.

The zip package will be uploaded to experience-zips azure storage container, where a blob trigger is configured and will call an unzipping azure function on blob received. (These code logics are implemented in the cloud repo.)

Testing

Tests will be added in follow up PRs

Checklist

github-actions[bot] commented 2 weeks ago

COMPARE TO master

Total Size Diff :warning: :chart_with_upwards_trend: +16.92 KB

Diff by File |Name|Diff| |---|---| |packages/core/package.json|:chart_with_upwards_trend: +58 Bytes| |packages/core/src/__mocks__/sign-in-experience.ts|:chart_with_upwards_trend: +1 Bytes| |packages/core/src/queries/sign-in-experience.test.ts|:chart_with_upwards_trend: +71 Bytes| |packages/core/src/routes-me/user-assets.ts|:chart_with_upwards_trend: +45 Bytes| |packages/core/src/routes/sign-in-experience/custom-ui-assets/index.openapi.json|:chart_with_upwards_trend: +1.41 KB| |packages/core/src/routes/sign-in-experience/custom-ui-assets/index.test.ts|:chart_with_upwards_trend: +4.49 KB| |packages/core/src/routes/sign-in-experience/custom-ui-assets/index.ts|:chart_with_upwards_trend: +4.04 KB| |packages/core/src/routes/sign-in-experience/index.ts|:chart_with_upwards_trend: +120 Bytes| |packages/core/src/routes/swagger/index.ts|:chart_with_upwards_trend: +62 Bytes| |packages/core/src/routes/swagger/utils/operation-id.ts|:chart_with_upwards_trend: +94 Bytes| |packages/core/src/routes/user-assets.ts|:chart_with_upwards_trend: +45 Bytes| |packages/core/src/tenants/SystemContext.ts|:chart_with_upwards_trend: +555 Bytes| |packages/core/src/utils/file.test.ts|:chart_with_upwards_trend: +508 Bytes| |packages/core/src/utils/file.ts|:chart_with_upwards_trend: +592 Bytes| |packages/core/src/utils/storage/azure-storage.ts|:chart_with_upwards_trend: +580 Bytes| |packages/core/src/utils/storage/consts.ts|:chart_with_upwards_trend: +183 Bytes| |packages/experience/src/__mocks__/logto.tsx|:chart_with_upwards_trend: +2 Bytes| |packages/schemas/alterations/next-1720505152-update-custom-ui-assets.ts|:chart_with_upwards_trend: +602 Bytes| |packages/schemas/src/foundations/jsonb-types/sign-in-experience.ts|:chart_with_upwards_trend: +161 Bytes| |packages/schemas/src/seeds/sign-in-experience.ts|:chart_with_upwards_trend: +1 Bytes| |packages/schemas/src/types/system.ts|:chart_with_upwards_trend: +392 Bytes| |packages/schemas/src/types/user-assets.ts|:chart_with_upwards_trend: +147 Bytes| |packages/schemas/tables/sign_in_experiences.sql|:chart_with_upwards_trend: +18 Bytes| |pnpm-lock.yaml|:chart_with_upwards_trend: +3.39 KB|