feat: Add private links to API (#22943)

* --init

* address change requests

* adding further changes

* address feedback

* further changes

* further clean-up

* clean up

* fix module import and others

* add guards

* remove unnecessary comments

* remove unnecessary comments

* cleanup

* sort coderabbig suggestions

* improve check

* chore: bump platform libraries

---------

Co-authored-by: Lauris Skraucis <[email protected]>
Co-authored-by: supalarry <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-08-11 11:04:23 +00:00
1 parent 076e93ca56
commit af51df2b4d
23 files changed
+5286 -862

No files matched your search

@@ -129,6 +129,24 @@ export class HashedLinkService {
return hashedLink;
}
async createLinkForEventType(eventTypeId: number, input: string | HashedLinkInputType) {
const normalized = this.normalizeLinkInput(input);
return this.hashedLinkRepository.createLink(eventTypeId, normalized);
}
async updateLinkForEventType(eventTypeId: number, input: string | HashedLinkInputType) {
const normalized = this.normalizeLinkInput(input);
return this.hashedLinkRepository.updateLink(eventTypeId, normalized);
}
async deleteLinkForEventType(eventTypeId: number, linkId: string) {
return this.hashedLinkRepository.deleteLinks(eventTypeId, [linkId]);
}
async listLinksByEventType(eventTypeId: number) {
return this.hashedLinkRepository.findLinksByEventTypeId(eventTypeId);
}
/**
* Checks if a user has permission to access a link
* @param link - Link object with event type information