Skip to content

Commit 5a1cd6a

Browse files
markgohoclaude
andcommitted
refactor: remove unclaimed profile invitation flow
Drop the legacy invitation and change-email resend flow for unclaimed profiles so the admin UI and API match the new onboarding direction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 00dc3fe commit 5a1cd6a

34 files changed

Lines changed: 64 additions & 2840 deletions

functions/src/admin-match-requests-api/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## (2026-03-13)
1+
## (2026-03-14)
22

33
### Features
44

@@ -10,4 +10,5 @@
1010
### Bug Fixes
1111

1212
* add typed handleRequest wrapper to resolve 898 lint errors in test files ([e9015f4](https://github.com/markgoho/doula-cooperative/commit/e9015f43e8a885496f4a658465d50ed3756c08d4))
13+
* **profile-webhook-api:** bcc webmaster on profile update emails ([9774f4a](https://github.com/markgoho/doula-cooperative/commit/9774f4a557aa281fa7ff45ee5f77084b0be5f4c9))
1314
* remove unnecessary type assertions in test files ([f774f3b](https://github.com/markgoho/doula-cooperative/commit/f774f3b3cab00ca2afc3e24d0f6ff50e52cd6ff6))

functions/src/admin-messages-api/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## (2026-03-13)
1+
## (2026-03-14)
22

33
### Features
44

@@ -9,4 +9,5 @@
99
### Bug Fixes
1010

1111
* add typed handleRequest wrapper to resolve 898 lint errors in test files ([e9015f4](https://github.com/markgoho/doula-cooperative/commit/e9015f43e8a885496f4a658465d50ed3756c08d4))
12+
* **profile-webhook-api:** bcc webmaster on profile update emails ([9774f4a](https://github.com/markgoho/doula-cooperative/commit/9774f4a557aa281fa7ff45ee5f77084b0be5f4c9))
1213
* remove unnecessary type assertions in test files ([f774f3b](https://github.com/markgoho/doula-cooperative/commit/f774f3b3cab00ca2afc3e24d0f6ff50e52cd6ff6))

functions/src/admin-unclaimed-profiles-api/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## (2026-03-13)
1+
## (2026-03-14)
22

33
### Features
44

@@ -19,4 +19,5 @@
1919
### Bug Fixes
2020

2121
* add typed handleRequest wrapper to resolve 898 lint errors in test files ([e9015f4](https://github.com/markgoho/doula-cooperative/commit/e9015f43e8a885496f4a658465d50ed3756c08d4))
22+
* **profile-webhook-api:** bcc webmaster on profile update emails ([9774f4a](https://github.com/markgoho/doula-cooperative/commit/9774f4a557aa281fa7ff45ee5f77084b0be5f4c9))
2223
* remove unnecessary type assertions in test files ([f774f3b](https://github.com/markgoho/doula-cooperative/commit/f774f3b3cab00ca2afc3e24d0f6ff50e52cd6ff6))

functions/src/admin-unclaimed-profiles-api/plugins/admin-unclaimed-profiles-plugin.ts

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,19 @@ import { adminDerive } from "../../shared-api/utils/admin-derive.js";
66
import { adminGuard } from "../../shared-api/utils/admin-guard.js";
77
import { getAdminUid } from "../../shared-api/utils/get-admin-uid.js";
88
import {
9-
changeEmailAndResendLogic,
109
deleteUnclaimedProfileLogic,
1110
getUnclaimedProfileLogic,
1211
listUnclaimedProfilesLogic,
1312
refreshPaymentDatesLogic,
14-
sendInvitationLogic,
1513
updateEmailLogic,
1614
} from "../routes/index.js";
1715
import {
18-
ChangeEmailAndResendResponseSchema,
1916
ChangeEmailBodySchema,
2017
DeleteUnclaimedProfileResponseSchema,
2118
EmailParameterSchema,
2219
ListUnclaimedProfilesQuerySchema,
2320
ListUnclaimedProfilesResponseSchema,
2421
RefreshPaymentDatesResponseSchema,
25-
SendInvitationResponseSchema,
2622
UnclaimedProfileResponseSchema,
2723
UpdateEmailResponseSchema,
2824
} from "../schemas/unclaimed-profile-schemas.js";
@@ -113,58 +109,7 @@ export function createAdminUnclaimedProfilesPlugin(services?: PartialServices) {
113109
response: UnclaimedProfileResponseSchema,
114110
},
115111
)
116-
// POST /:email/invitation - Send invitation email to unclaimed profile
117-
.post(
118-
"/:email/invitation",
119-
async ({
120-
params,
121-
adminToken,
122-
unclaimedProfileAdminService,
123-
emailService,
124-
logger,
125-
set,
126-
}) =>
127-
sendInvitationLogic({
128-
email: params.email,
129-
adminUid: getAdminUid(adminToken, logger),
130-
unclaimedProfileAdminService,
131-
emailService,
132-
logger,
133-
set,
134-
}),
135-
{
136-
params: EmailParameterSchema,
137-
response: SendInvitationResponseSchema,
138-
},
139-
)
140-
// POST /:email/change-email - Change email and resend invitation
141-
.post(
142-
"/:email/change-email",
143-
async ({
144-
params,
145-
body,
146-
adminToken,
147-
unclaimedProfileAdminService,
148-
emailService,
149-
logger,
150-
set,
151-
}) =>
152-
changeEmailAndResendLogic({
153-
oldEmail: params.email,
154-
newEmail: body.newEmail,
155-
adminUid: getAdminUid(adminToken, logger),
156-
unclaimedProfileAdminService,
157-
emailService,
158-
logger,
159-
set,
160-
}),
161-
{
162-
params: EmailParameterSchema,
163-
body: ChangeEmailBodySchema,
164-
response: ChangeEmailAndResendResponseSchema,
165-
},
166-
)
167-
// PATCH /:email - Update email (pre-invitation only)
112+
// PATCH /:email - Update email
168113
.patch(
169114
"/:email",
170115
async ({

0 commit comments

Comments
 (0)