Skip to content

Commit b5a62a4

Browse files
committed
chore(cmc/formSpec): delete dead stampFormSpecOnTriggerEvent (plan 61 C4)
Marked @deprecated 2026-05-21 with zero workspace callers. The capability offer event snapshots content at mint-time, so post-creation stamping never propagated. createInviteWithFormSpec already lands the snapshot at events.create time, which the offer event copies — that's the path.
1 parent 0636735 commit b5a62a4

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

ts/cmc/formSpec.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -194,29 +194,6 @@ export async function createInviteWithFormSpec (
194194
};
195195
}
196196

197-
/**
198-
* @deprecated 2026-05-21 — does NOT propagate to the capability offer event
199-
* (the capability-mint hook snapshots content once at mint time). Use
200-
* `createInviteWithFormSpec` instead so the snapshot lands at events.create
201-
* time and the offer event copies it. Kept only for doctor-side analytics
202-
* (the doctor can read the trigger event directly; the patient cannot via
203-
* the capability access).
204-
*/
205-
export async function stampFormSpecOnTriggerEvent (
206-
connection: pryv.Connection,
207-
triggerEventId: string,
208-
formSpec: FormSpec
209-
): Promise<pryv.Event> {
210-
const current = await connection.apiOne('events.getOne', {
211-
id: triggerEventId
212-
}, 'event') as any;
213-
const mergedContent = { ...(current?.content || {}), hdsFormSpec: formSpec };
214-
return await connection.apiOne('events.update', {
215-
id: triggerEventId,
216-
update: { content: mergedContent } as any
217-
}, 'event');
218-
}
219-
220197
/**
221198
* Patient-side: mirror the FormSpec snapshot onto the patient's own
222199
* `consent/accept-cmc` event content post-accept. Without this the

0 commit comments

Comments
 (0)