Release v0.1.4
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { FileSpace } from "../../../api/files";
|
||||
import { asArray, asRecord, isRecord } from "./campaignView";
|
||||
import { getBool, getText } from "./draftEditor";
|
||||
|
||||
@@ -98,9 +97,14 @@ export type ManagedAttachmentSource = {
|
||||
ownerId: string;
|
||||
};
|
||||
|
||||
type ManagedAttachmentSourceSpace = {
|
||||
owner_type: "user" | "group";
|
||||
owner_id: string;
|
||||
};
|
||||
|
||||
const MANAGED_ATTACHMENT_SOURCE_PREFIX = "managed:";
|
||||
|
||||
export function encodeManagedAttachmentSource(space: Pick<FileSpace, "owner_type" | "owner_id">): string {
|
||||
export function encodeManagedAttachmentSource(space: ManagedAttachmentSourceSpace): string {
|
||||
return `${MANAGED_ATTACHMENT_SOURCE_PREFIX}${space.owner_type}:${space.owner_id}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user