Skip to content

Commit

Permalink
refactor(experience): migrate profile fulfillment flow (migration-4) (#…
Browse files Browse the repository at this point in the history
…6414)

* refactor(experience): migrate profile fulfillment flow

migrate the profile fulfillment flow

* refactor(experience): remove unused hook

remove unused hook

* fix(experience): fix password policy checker

fix password policy checker error display

* fix(experience): fix the api name

fix the api name

* refactor(experience): migrate mfa flow (migration-5) (#6417)

* refactor(experience): migrate mfa binding flow

migrate mfa binding flow

* test(experience): update unit tests (migration-6) (#6420)

* test(experience): update unit tests

update unit tests

* chore(experience): remove legacy APIs

remove legacy APIs
  • Loading branch information
simeng-li authored Aug 14, 2024
1 parent 6ec9f4b commit b0b7902
Show file tree
Hide file tree
Showing 61 changed files with 1,171 additions and 996 deletions.
3 changes: 3 additions & 0 deletions packages/experience/src/apis/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import i18next from 'i18next';
import ky from 'ky';

import { kyPrefixUrl } from './const';

export default ky.extend({
prefixUrl: kyPrefixUrl,
hooks: {
beforeRequest: [
(request) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/experience/src/apis/consent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const consent = async (organizationId?: string) => {
};

return api
.post('/api/interaction/consent', {
.post('api/interaction/consent', {
json: {
organizationIds: organizationId && [organizationId],
},
Expand All @@ -17,5 +17,5 @@ export const consent = async (organizationId?: string) => {
};

export const getConsentInfo = async () => {
return api.get('/api/interaction/consent').json<ConsentInfoResponse>();
return api.get('api/interaction/consent').json<ConsentInfoResponse>();
};
1 change: 1 addition & 0 deletions packages/experience/src/apis/const.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const kyPrefixUrl = '/';
225 changes: 0 additions & 225 deletions packages/experience/src/apis/experience.ts

This file was deleted.

13 changes: 13 additions & 0 deletions packages/experience/src/apis/experience/const.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const prefix = 'api/experience';

export const experienceRoutes = Object.freeze({
prefix,
identification: `${prefix}/identification`,
verification: `${prefix}/verification`,
profile: `${prefix}/profile`,
mfa: `${prefix}/profile/mfa`,
});

export type VerificationResponse = {
verificationId: string;
};
Loading

0 comments on commit b0b7902

Please sign in to comment.