Adds relationships and loads secrets into the session details
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
import type { RecordModel } from "pocketbase";
|
||||
|
||||
export type Id<T extends string> = string & { __type: T };
|
||||
|
||||
export type UserId = Id<"User">;
|
||||
export type CampaignId = Id<"Campaign">;
|
||||
export type DocumentId = Id<"Document">;
|
||||
|
||||
export type Campaign = {
|
||||
export type Campaign = RecordModel & {
|
||||
id: CampaignId;
|
||||
name: string;
|
||||
owner: UserId;
|
||||
};
|
||||
|
||||
export type Document = {
|
||||
export type Document = RecordModel & {
|
||||
id: DocumentId;
|
||||
campaign: Campaign;
|
||||
data: {};
|
||||
@@ -35,6 +37,12 @@ export type Secret = Document &
|
||||
"secret",
|
||||
{
|
||||
text: string;
|
||||
discoveredOn: ISO8601Date;
|
||||
discoveredOn: ISO8601Date | null;
|
||||
}
|
||||
>;
|
||||
|
||||
export type Relationship = RecordModel & {
|
||||
primary: DocumentId;
|
||||
secondary: DocumentId[];
|
||||
type: "plannedSecrets" | "discoveredIn";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user