{ "version": 3, "sources": ["../../../lib.web.utils/query_param.ts", "../../../lib.shared.model.patch/index.ts", "../../../lib.shared.model.patch/apply/apply_add_board.ts", "../../../lib.shared.model.patch/changelog.ts", "../../../lib.shared.model.patch/apply/apply_add.ts", "../../../lib.shared.model.patch/apply/apply_set.ts", "../../../lib.shared.model.patch/apply/apply_paste.ts", "../../../lib.shared.model.patch/apply/apply_custom.ts", "../../../lib.shared.model.patch/apply/apply_remove.ts", "../../../lib.shared.model.patch/apply/index.ts"], "sourcesContent": ["/**\n * Extract query parameter from given `search` or `location.search`.\n */\nexport function query_param(name: string): string | undefined\nexport function query_param(name: string, default_value: string | (() => string)): string\nexport function query_param(\n name: string,\n default_value: string | (() => string),\n opts: {search: string},\n): string\nexport function query_param(\n name: string,\n default_value?: string | (() => string),\n opts: {search?: string} = {},\n) {\n name = name.replace(/[[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\")\n const regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\")\n const results = regex.exec(typeof opts.search !== \"undefined\" ? opts.search : location.search)\n if (results) {\n return decodeURIComponent(results[1].replace(/\\+/g, \" \"))\n }\n return typeof default_value === \"function\" ? default_value() : default_value\n}\n", "/**\n * Apply patches to a board.\n */\nimport type {BoardUID, ItemUID, PatchOp} from \"@cling/lib.shared.model\"\nimport {class_name} from \"@cling/lib.shared.utils\"\nimport {ClingError, ErrorOpts} from \"@cling/lib.shared.error/errors\"\n\nexport class PatchFailed extends ClingError {\n constructor(message: string, http_status_code: number, opts: ErrorOpts = {}) {\n super(message, http_status_code, opts)\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, PatchFailed.prototype)\n const error = opts instanceof Error ? opts : opts.error\n if (error && error.stack) {\n this.stack = this.stack!.split(\"\\n\").slice(0, 2).join(\"\\n\") + \"\\n\" + error.stack\n }\n }\n}\n\nexport class InvalidPatchOp extends PatchFailed {\n constructor(\n public op: PatchOp,\n message: string,\n ) {\n super(`Operation ${class_name(op)} is invalid: ${message}`, 400)\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, InvalidPatchOp.prototype)\n }\n}\n\nexport class PatchOpNotExpanded extends PatchFailed {\n constructor(\n public op: PatchOp,\n error?: Error,\n ) {\n super(`Operation ${class_name(op)} needs to be expanded first`, 400, {error, extra: {op}})\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, PatchOpNotExpanded.prototype)\n }\n}\n\nexport class ItemConflict extends PatchFailed {\n constructor(board_uid: BoardUID, item_uid: ItemUID) {\n super(`Item ${item_uid} already exists in board ${board_uid}`, 400, {\n uids: [item_uid],\n extra: {board_uid},\n })\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, ItemConflict.prototype)\n }\n}\n\nexport class BoardConflict extends PatchFailed {\n constructor(board_uid: BoardUID) {\n super(`Board ${board_uid} already exists`, 409, {uids: [board_uid]})\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, BoardConflict.prototype)\n }\n}\n\nexport class BoardNotFound extends PatchFailed {\n constructor(board_uid: BoardUID) {\n super(`Board ${board_uid} does not exist`, 404, {uids: [board_uid]})\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, BoardNotFound.prototype)\n }\n}\n\nexport class UnknownPatchOp extends PatchFailed {\n constructor(op: PatchOp) {\n super(`Unknown patch operation ${class_name(op)}`, 400, {extra: {op}})\n // This is needed according to https://goo.gl/N2zvkR ...\n Object.setPrototypeOf(this, UnknownPatchOp.prototype)\n }\n}\n", "import {\n ACL,\n AddBoard,\n AddPeopleBoard,\n AddSystemBoard,\n Board,\n board_uid_type,\n BoardChangelogEntry,\n BoardPatchOpType,\n BoardStyle,\n BoardType,\n BoardUID,\n Card,\n CardChangelogEntry,\n CardPatchOpType,\n ChangeMetadata,\n CLING_BOT,\n derive_CardUID,\n derive_system_board_uid,\n Inbox,\n Root,\n} from \"@cling/lib.shared.model\"\nimport {BoardConflict, InvalidPatchOp} from \"../index\"\nimport {assert, assert_never} from \"@cling/lib.shared.utils\"\nimport type {ChangelogMetadata} from \"../changelog\"\n\nexport default function apply_add_board(\n board_uid: BoardUID,\n board_: Board | \"added\" | \"removed\",\n op: AddBoard | AddPeopleBoard | AddSystemBoard,\n changelog_metadata: ChangelogMetadata,\n): Board {\n if (board_ !== \"added\") {\n throw new BoardConflict(board_uid)\n }\n assert(\n changelog_metadata.board_version === 1,\n `Unexpected next_version: ${changelog_metadata.board_version}`,\n )\n const owner = changelog_metadata.account_uid\n assert(owner !== CLING_BOT, `Unexpected owner: ${owner}`)\n let name\n let board_type\n let patch_op_type\n const board_style = op.value.board_style || new BoardStyle({})\n const acl = new ACL({_full_access: [owner]})\n if (op instanceof AddBoard) {\n name = op.value.name\n board_type = BoardType.regular\n patch_op_type = BoardPatchOpType.AddBoard\n assert(\n board_uid_type(board_uid) === BoardType.regular,\n \"Board type does not match board-uid\",\n )\n } else if (op instanceof AddPeopleBoard) {\n if (op.value.account_uid === changelog_metadata.account_uid) {\n throw new InvalidPatchOp(op, \"Cannot create a people-board with the board-owner\")\n }\n name = \"Conversation\"\n board_type = BoardType.people\n patch_op_type = BoardPatchOpType.AddPeopleBoard\n acl._full_access.push(op.value.account_uid)\n assert(\n board_uid_type(board_uid) === BoardType.people,\n \"`board_type` does not match `board_uid`\",\n )\n } else if (op instanceof AddSystemBoard) {\n name = BoardType[op.value.board_type]\n name = name[0].toUpperCase() + name.slice(1)\n board_type = op.value.board_type\n patch_op_type = BoardPatchOpType.AddSystemBoard\n assert(board_uid_type(board_uid) === board_type, \"`board_type` does not match `board_uid`\")\n assert(\n derive_system_board_uid(owner, board_type) === board_uid,\n \"Unexpected system board_uid\",\n )\n } else {\n throw assert_never(op)\n }\n const board_changelog_entry = new BoardChangelogEntry({\n patch_op_type,\n ...changelog_metadata,\n board_version: 1,\n })\n const card_changelog_entry = new CardChangelogEntry({\n patch_op_type: CardPatchOpType.AddCard,\n ...changelog_metadata,\n board_version: 1,\n })\n return new Board({\n uid: board_uid,\n version: 1,\n changelog: [board_changelog_entry],\n first_change: new ChangeMetadata({...board_changelog_entry}),\n last_change: new ChangeMetadata({...board_changelog_entry}),\n owner,\n name,\n acl,\n board_type,\n board_style,\n root: new Card({\n uid: derive_CardUID(board_uid, \"Root\"),\n root: new Root({}),\n changelog: [card_changelog_entry],\n children: [\n new Card({\n uid: derive_CardUID(board_uid, \"Inbox\"),\n inbox: new Inbox({}),\n changelog: [card_changelog_entry],\n }),\n ],\n }),\n })\n}\n", "import {\n PatchOpContainer,\n BoardChangelogEntry,\n TaskStatus,\n BoardUID,\n CardChangelogEntry,\n CommentChangelogEntry,\n CardPatchOpType,\n BoardPatchOpType,\n CommentPatchOpType,\n AccountUID,\n CardColor,\n SetBoardName,\n AddBoard,\n AddPeopleBoard,\n AddSystemBoard,\n RemoveBoard,\n CustomAddBoardACL,\n CustomRemoveBoardACL,\n CustomSetBoardACLAccessLevel,\n CustomSetBoardOwner,\n SetBoardBoardStyleBackgroundColor,\n SetBoardBoardStyleBackgroundImageURL,\n SetBoardBoardStyle,\n CustomAddBoardInvite,\n RemoveBoardInvite,\n SetCardArchived,\n SetCardColor,\n CustomAddTask,\n CustomRemoveTask,\n SetTaskStatus,\n SetTaskAssignee,\n SetTaskDate,\n AddCard,\n PasteCard,\n SetCardNoteSafeHtml,\n SetCardNoteTitle,\n SetCardLinkURL,\n SetCardLinkStyle,\n SetCardLinkTitle,\n SetCardFileFileName,\n SetCardFileTitle,\n SetCardFileDisplay,\n AddComment,\n CustomRemoveComment,\n MoveCard,\n CopyCard,\n RemoveCard,\n SetCardFileBlob,\n SetCardFilePreviewImageBlob,\n CopyBoard,\n} from \"@cling/lib.shared.model\"\nimport {SetBoardIndexedBySearchEngines} from \"@cling/lib.shared.model\"\nimport {assert_never} from \"@cling/lib.shared.utils\"\nimport {InvalidPatchOp} from \"./index\"\n\nexport type ChangelogMetadata = {\n account_uid: AccountUID\n date: Date\n board_version: number\n}\n\n/**\n * This code might seem tideous and overly explicit. But this is exactly what we are\n * aiming for here.\n * We want this to be fully statically checked, so that we cannot miss new operations.\n */\nexport function changelog_entry(\n op: typeof patch_op_container.op,\n changelog_metadata: ChangelogMetadata,\n): BoardChangelogEntry | CardChangelogEntry | CommentChangelogEntry {\n function board_entry(type: BoardPatchOpType) {\n return new BoardChangelogEntry({\n patch_op_type: type,\n account_uid: changelog_metadata.account_uid,\n date: changelog_metadata.date,\n board_version: changelog_metadata.board_version,\n })\n }\n\n function card_entry(\n type: CardPatchOpType,\n extra: {\n extra_archived?: boolean\n extra_task_status?: TaskStatus\n extra_src_board_uid?: BoardUID\n extra_card_color?: CardColor\n extra_task_assignee?: AccountUID\n extra_task_date?: Date\n } = {},\n ) {\n return new CardChangelogEntry({\n patch_op_type: type,\n account_uid: changelog_metadata.account_uid,\n date: changelog_metadata.date,\n board_version: changelog_metadata.board_version,\n extra_archived: extra.extra_archived,\n extra_task_status: extra.extra_task_status,\n extra_src_board_uid: extra.extra_src_board_uid,\n extra_card_color: extra.extra_card_color,\n extra_task_assignee: extra.extra_task_assignee,\n extra_task_date: extra.extra_task_date,\n })\n }\n\n function comment_entry(type: CommentPatchOpType) {\n return new CommentChangelogEntry({\n patch_op_type: type,\n account_uid: changelog_metadata.account_uid,\n date: changelog_metadata.date,\n board_version: changelog_metadata.board_version,\n })\n }\n if (op instanceof AddBoard) {\n return board_entry(BoardPatchOpType.AddBoard)\n } else if (op instanceof AddPeopleBoard) {\n return board_entry(BoardPatchOpType.AddPeopleBoard)\n } else if (op instanceof AddSystemBoard) {\n return board_entry(BoardPatchOpType.AddSystemBoard)\n } else if (op instanceof RemoveBoard) {\n return board_entry(BoardPatchOpType.RemoveBoard)\n } else if (op instanceof SetBoardName) {\n return board_entry(BoardPatchOpType.SetBoardName)\n } else if (op instanceof SetBoardIndexedBySearchEngines) {\n return board_entry(BoardPatchOpType.SetBoardIndexedBySearchEngines)\n } else if (op instanceof CustomAddBoardACL) {\n return board_entry(BoardPatchOpType.CustomAddBoardACL)\n } else if (op instanceof CustomRemoveBoardACL) {\n return board_entry(BoardPatchOpType.CustomRemoveBoardACL)\n } else if (op instanceof CustomSetBoardACLAccessLevel) {\n return board_entry(BoardPatchOpType.CustomSetBoardACLAccessLevel)\n } else if (op instanceof CustomSetBoardOwner) {\n return board_entry(BoardPatchOpType.CustomSetBoardOwner)\n } else if (op instanceof SetBoardBoardStyleBackgroundColor) {\n return board_entry(BoardPatchOpType.SetBoardBoardStyleBackgroundColor)\n } else if (op instanceof SetBoardBoardStyleBackgroundImageURL) {\n return board_entry(BoardPatchOpType.SetBoardBoardStyleBackgroundImageURL)\n } else if (op instanceof SetBoardBoardStyle) {\n return board_entry(BoardPatchOpType.SetBoardBoardStyleBackgroundColor)\n } else if (op instanceof CustomAddBoardInvite) {\n return board_entry(BoardPatchOpType.CustomAddBoardInvite)\n } else if (op instanceof RemoveBoardInvite) {\n return board_entry(BoardPatchOpType.RemoveBoardInvite)\n } else if (op instanceof SetCardArchived) {\n return card_entry(CardPatchOpType.SetCardArchived, {extra_archived: op.value})\n } else if (op instanceof SetCardColor) {\n return card_entry(CardPatchOpType.SetCardColor, {extra_card_color: op.value})\n } else if (op instanceof CustomAddTask) {\n return card_entry(CardPatchOpType.CustomAddTask)\n } else if (op instanceof CustomRemoveTask) {\n return card_entry(CardPatchOpType.CustomRemoveTask)\n } else if (op instanceof SetTaskStatus) {\n return card_entry(CardPatchOpType.SetTaskStatus, {extra_task_status: op.value})\n } else if (op instanceof SetTaskAssignee) {\n return card_entry(CardPatchOpType.SetTaskAssignee, {extra_task_assignee: op.value})\n } else if (op instanceof SetTaskDate) {\n return card_entry(CardPatchOpType.SetTaskDate, {extra_task_date: op.value})\n } else if (op instanceof AddCard) {\n return card_entry(CardPatchOpType.AddCard)\n } else if (op instanceof PasteCard) {\n return card_entry(CardPatchOpType.PasteCard, {extra_src_board_uid: op.src_board_uid})\n } else if (op instanceof SetCardNoteSafeHtml) {\n return card_entry(CardPatchOpType.SetCardNoteSafeHtml)\n } else if (op instanceof SetCardNoteTitle) {\n return card_entry(CardPatchOpType.SetCardNoteTitle)\n } else if (op instanceof SetCardLinkURL) {\n return card_entry(CardPatchOpType.SetCardLinkURL)\n } else if (op instanceof SetCardLinkStyle) {\n return card_entry(CardPatchOpType.SetCardLinkStyle)\n } else if (op instanceof SetCardLinkTitle) {\n return card_entry(CardPatchOpType.SetCardLinkTitle)\n } else if (op instanceof SetCardFileFileName) {\n return card_entry(CardPatchOpType.SetCardFileFileName)\n } else if (op instanceof SetCardFileTitle) {\n return card_entry(CardPatchOpType.SetCardFileTitle)\n } else if (op instanceof SetCardFileDisplay) {\n return card_entry(CardPatchOpType.SetCardFileDisplay)\n } else if (op instanceof SetCardFileBlob) {\n return card_entry(CardPatchOpType.SetCardFileBlob)\n } else if (op instanceof SetCardFilePreviewImageBlob) {\n return card_entry(CardPatchOpType.SetCardFilePreviewImageBlob)\n } else if (op instanceof AddComment) {\n return comment_entry(CommentPatchOpType.AddComment)\n } else if (op instanceof CustomRemoveComment) {\n return comment_entry(CommentPatchOpType.CustomRemoveComment)\n } else if (op instanceof MoveCard) {\n throw new InvalidPatchOp(op, \"Did not expect a `MoveCard` op in a transformed patch\")\n } else if (op instanceof CopyCard) {\n throw new InvalidPatchOp(op, \"Did not expect a `CopyCard` op in a transformed patch\")\n } else if (op instanceof RemoveCard) {\n throw new InvalidPatchOp(op, \"Did not expect a `RemoveCard` op in a transformed patch\")\n } else if (op instanceof CopyBoard) {\n throw new InvalidPatchOp(op, \"Did not expect a `CopyBoard` op in a transformed patch\")\n } else {\n throw assert_never(op)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst patch_op_container = new PatchOpContainer({SetBoardName: new SetBoardName({value: \"_\"})})\n", "import {\n AddCard,\n AddComment,\n AddOp,\n Board,\n BoardUID,\n Card,\n Comment,\n is_ContentItemUID,\n} from \"@cling/lib.shared.model\"\nimport {BoardNotFound, InvalidPatchOp, UnknownPatchOp, ItemConflict} from \"../index\"\nimport {changelog_entry, ChangelogMetadata} from \"../changelog\"\n\nexport default function apply_add(\n board_uid: BoardUID,\n board: Board | \"added\" | \"removed\",\n op: AddOp,\n changelog_metadata: ChangelogMetadata,\n): Board {\n if (board === \"added\" || board === \"removed\") {\n throw new BoardNotFound(board_uid)\n }\n const {value} = op as any\n if (!value) {\n throw new InvalidPatchOp(op, \"no value\")\n }\n if (!is_ContentItemUID(value.uid)) {\n throw new InvalidPatchOp(op, \"value.uid is not a ContentItemUID\")\n }\n if (board.contains(value.uid)) {\n throw new ItemConflict(board_uid, value.uid)\n }\n if (op instanceof AddCard) {\n const card = new Card({...value, changelog: [changelog_entry(op, changelog_metadata)]})\n let container: Card[]\n if (op.target_card_uid === board.root.uid) {\n container = board.root.children\n } else if (op.target_card_uid) {\n container = board.card(op.target_card_uid).children\n } else {\n container = board.inbox.children\n }\n insert(card, container, op.target_pos)\n board.sanitize()\n card.archived = card.parent.archived\n } else if (op instanceof AddComment) {\n const comment = new Comment({\n ...value,\n changelog: [changelog_entry(op, changelog_metadata)],\n })\n const container = board.card(op.target_card_uid).comments\n insert(comment, container, op.target_pos)\n board.sanitize()\n } else {\n throw new UnknownPatchOp(op)\n }\n return board\n}\n\nfunction insert<T>(new_item: T, container: T[], target_pos: number) {\n const pos = Math.min(target_pos || 0, container.length)\n container.splice(pos, 0, new_item)\n}\n", "import {Board, BoardUID, ContentItemUID, ItemNotFound, SetOp} from \"@cling/lib.shared.model\"\nimport {BoardNotFound, InvalidPatchOp, PatchFailed} from \"../index\"\nimport {assert, class_name} from \"@cling/lib.shared.utils\"\nimport {changelog_entry, ChangelogMetadata} from \"../changelog\"\n\nexport default function apply_set(\n board_uid: BoardUID,\n board: Board | \"added\" | \"removed\",\n op: SetOp,\n changelog_metadata: ChangelogMetadata,\n): Board {\n if (board === \"added\" || board === \"removed\") {\n throw new BoardNotFound(board_uid)\n }\n const uid = (op as any).uid\n if (uid === board.root.uid) {\n throw new InvalidPatchOp(op, \"The root card is immutable\")\n }\n if (uid === board.inbox.uid) {\n throw new InvalidPatchOp(op, \"The inbox card is immutable\")\n }\n const value = (op as any).value\n const path = (op as any).constructor._FIELD_PATH.split(\".\")\n try {\n set_by_path(board, uid || \"self\", path, value)\n const content_item = uid ? board.content_item(uid) : board\n content_item.changelog.push(changelog_entry(op as any, changelog_metadata) as any)\n content_item.verify()\n } catch (error) {\n if (error instanceof ItemNotFound) {\n throw error\n }\n throw new PatchFailed(`${class_name(op)} is invalid: ${error.message}`, 400, error)\n }\n board.sanitize()\n return board\n}\n\n/**\n * Set a value with strict type-checking.\n */\nexport function set_by_path(\n board: Board,\n uid: ContentItemUID | \"self\",\n path: Array<string>,\n value: any,\n) {\n assert(path.length > 0, \"Path cannot be empty\")\n let obj: any\n if (uid === \"self\") {\n obj = board\n } else {\n obj = board.item(uid)\n }\n for (let i = 0; i < path.length; i += 1) {\n const field = path[i]\n if (i === path.length - 1) {\n if (!Object.prototype.hasOwnProperty.call(obj, field)) {\n throw new Error(`Field ${field} not found in class ${class_name(obj)}`)\n }\n obj[field] = value\n if (obj.verify) {\n obj.verify()\n }\n return\n }\n obj = obj[field]\n }\n}\n", "import {\n Board,\n BoardUID,\n PasteCard,\n PasteOp,\n traverse_cards,\n CardChangelogEntry,\n deep_copy,\n Card,\n Comment,\n} from \"@cling/lib.shared.model\"\nimport {BoardNotFound, InvalidPatchOp, UnknownPatchOp} from \"../index\"\nimport {ChangelogMetadata, changelog_entry} from \"../changelog\"\n\nexport default function apply_paste(\n board_uid: BoardUID,\n board: Board | \"added\" | \"removed\",\n op: PasteOp,\n changelog_metadata: ChangelogMetadata,\n): Board {\n if (board === \"added\" || board === \"removed\") {\n throw new BoardNotFound(board_uid)\n }\n if (op instanceof PasteCard) {\n let target_card\n if (op.target_card_uid) {\n target_card = board.card(op.target_card_uid)\n } else if (op.into_root) {\n target_card = board.root\n } else if (op.into_inbox) {\n target_card = board.inbox\n } else {\n throw new InvalidPatchOp(op, \"Unknown target\")\n }\n const pos = Math.min(op.target_pos || 0, target_card.children.length)\n const card = deep_copy(op.value)\n const changelog_entry_ = changelog_entry(op, changelog_metadata) as CardChangelogEntry\n card.changelog.push(changelog_entry_)\n target_card.children.splice(pos, 0, card)\n const set_archived = target_card.archived\n if (set_archived) {\n card.archived = true\n }\n if (op.src_board_uid) {\n changelog_entry_.board_uid = board_uid\n adapt_changelog(card, op.src_board_uid, board_uid)\n for (const x of card.comments) {\n adapt_changelog(x, op.src_board_uid, board_uid)\n }\n }\n if (set_archived || op.src_board_uid) {\n traverse_cards(card, (x) => {\n if (set_archived && !x.archived) {\n x.archived = true\n }\n if (op.src_board_uid) {\n adapt_changelog(x, op.src_board_uid, board_uid)\n for (const y of x.comments) {\n adapt_changelog(y, op.src_board_uid, board_uid)\n }\n }\n })\n }\n } else {\n throw new UnknownPatchOp(op)\n }\n board.sanitize()\n return board\n}\n\nfunction adapt_changelog(\n item: Card | Comment,\n src_board_uid: BoardUID,\n target_board_uid: BoardUID,\n) {\n for (const x of item.changelog) {\n if (!x.board_uid) {\n x.board_uid = src_board_uid\n } else if (x.board_uid === target_board_uid) {\n x.board_uid = undefined\n }\n }\n}\n", "import {\n AccessLevel,\n Board,\n BoardChangelogEntry,\n BoardUID,\n Card,\n CardChangelogEntry,\n CustomAddBoardACL,\n CustomAddBoardInvite,\n CustomAddTask,\n CustomOp,\n CustomRemoveBoardACL,\n CustomRemoveTask,\n CustomSetBoardACLAccessLevel,\n BoardInvite,\n PrincipalUID,\n Task,\n TaskStatus,\n BoardType,\n CLING_PUBLIC,\n CustomSetBoardOwner,\n PatchOp,\n CustomRemoveComment,\n CommentChangelogEntry,\n Removed,\n BoardChangeMetadata,\n} from \"@cling/lib.shared.model\"\nimport {BoardNotFound, InvalidPatchOp, UnknownPatchOp} from \"../index\"\nimport {assert, assert_never, normalize_email} from \"@cling/lib.shared.utils\"\nimport {changelog_entry, ChangelogMetadata} from \"../changelog\"\nimport {Forbidden} from \"@cling/lib.shared.error/errors\"\n\nexport default function apply_custom(\n board_uid: BoardUID,\n board: Board | \"added\" | \"removed\",\n op: CustomOp,\n changelog_metadata: ChangelogMetadata,\n): Board {\n if (board === \"added\" || board === \"removed\") {\n throw new BoardNotFound(board_uid)\n }\n function assert_card_type(card: Card) {\n if (card.uid === (board as Board).root.uid) {\n throw new InvalidPatchOp(op, \"The root card is immutable\")\n }\n if (card.uid === (board as Board).inbox.uid) {\n throw new InvalidPatchOp(op, \"The inbox card is immutable\")\n }\n }\n function assert_regular_board(\n msg = \"Cannot modify ACL of board with type other than `regular`\",\n ) {\n if ((board as Board).board_type !== BoardType.regular) {\n throw new InvalidPatchOp(op, msg)\n }\n }\n if (op instanceof CustomAddBoardACL) {\n // We could implement this in a much shorter and more clever way, but we do not do this\n // on purpose. We want the code to be clear and most importantly, we want the compile-time\n // safety ...\n assert_regular_board()\n const {principal_uid, access_level} = op\n if (principal_uid === CLING_PUBLIC && access_level !== AccessLevel.read) {\n throw new Forbidden(\"For now, CLING_PUBLIC can only have access-level `read`\")\n }\n const current_access_level = board.acl.entry(principal_uid)\n const doit = (array: PrincipalUID[], target_access_level: AccessLevel) => {\n if (!current_access_level) {\n array.push(principal_uid)\n } else if (current_access_level !== target_access_level) {\n throw new InvalidPatchOp(\n op,\n \"Principal is already on ACL with a different access-level\",\n )\n }\n }\n if (access_level === AccessLevel.full_access) {\n doit(board.acl._full_access, AccessLevel.full_access)\n } else if (access_level === AccessLevel.edit) {\n doit(board.acl._edit, AccessLevel.edit)\n } else if (access_level === AccessLevel.comment) {\n doit(board.acl._comment, AccessLevel.comment)\n } else if (access_level === AccessLevel.read) {\n doit(board.acl._read, AccessLevel.read)\n } else {\n assert_never(access_level)\n }\n board.changelog.push(changelog_entry(op, changelog_metadata) as BoardChangelogEntry)\n } else if (op instanceof CustomSetBoardACLAccessLevel) {\n assert_regular_board()\n // We could implement this in a much shorter and more clever way, but we do not do this\n // on purpose. We want the code to be clear and most importantly, we want the compile-time\n // safety ...\n const {principal_uid, access_level} = op\n if (principal_uid === CLING_PUBLIC && access_level !== AccessLevel.read) {\n throw new Forbidden(\"For now, CLING_PUBLIC can only have access-level `read`\")\n }\n const current_access_level = board.acl.entry(principal_uid)\n if (!current_access_level) {\n throw new InvalidPatchOp(op, `There is no ACL entry for ${principal_uid}`)\n }\n if (current_access_level !== access_level) {\n const remove = (array: PrincipalUID[]) => {\n const index = array.indexOf(principal_uid)\n assert(index >= 0, \"Tried to remove non-existing entry\")\n array.splice(index, 1)\n }\n if (current_access_level === AccessLevel.full_access) {\n remove(board.acl._full_access)\n } else if (current_access_level === AccessLevel.edit) {\n remove(board.acl._edit)\n } else if (current_access_level === AccessLevel.comment) {\n remove(board.acl._comment)\n } else if (current_access_level === AccessLevel.read) {\n remove(board.acl._read)\n } else {\n assert_never(current_access_level)\n }\n if (access_level === AccessLevel.full_access) {\n board.acl._full_access.push(principal_uid)\n } else if (access_level === AccessLevel.edit) {\n board.acl._edit.push(principal_uid)\n } else if (access_level === AccessLevel.comment) {\n board.acl._comment.push(principal_uid)\n } else if (access_level === AccessLevel.read) {\n board.acl._read.push(principal_uid)\n } else {\n assert_never(access_level)\n }\n }\n board.changelog.push(changelog_entry(op, changelog_metadata) as BoardChangelogEntry)\n } else if (op instanceof CustomRemoveBoardACL) {\n assert_regular_board()\n // We could implement this in a much shorter and more clever way, but we do not do this\n // on purpose. We want the code to be clear and most importantly, we want the compile-time\n // safety ...\n const principal_uid = op.value\n if (principal_uid === board.owner) {\n throw new InvalidPatchOp(op, \"Cannot remove board owner from ACL\")\n }\n remove_from_board_acl(board, principal_uid, op)\n board.changelog.push(changelog_entry(op, changelog_metadata) as BoardChangelogEntry)\n } else if (op instanceof CustomSetBoardOwner) {\n assert_regular_board()\n const {account_uid} = op\n if (board.owner !== account_uid) {\n const current_access_level = board.acl.entry(account_uid)\n if (!current_access_level) {\n throw new InvalidPatchOp(op, \"The new owner must already have access to the board\")\n } else if (current_access_level !== AccessLevel.full_access) {\n remove_from_board_acl(board, account_uid, op)\n board.acl._full_access.push(account_uid)\n }\n board.owner = account_uid\n }\n board.changelog.push(changelog_entry(op, changelog_metadata) as BoardChangelogEntry)\n } else if (op instanceof CustomAddBoardInvite) {\n assert_regular_board(\"Only boards with type `regular` can have invites\")\n const {email, principal_uid} = op.value\n if (\n !board.board_invites.some((board_invite) => {\n if (email) {\n return normalize_email(board_invite.email) === normalize_email(email)\n }\n return board_invite.principal_uid === principal_uid\n })\n ) {\n const invite = new BoardInvite({\n ...op.value,\n created_by: changelog_metadata.account_uid,\n created_at: changelog_metadata.date,\n })\n board.board_invites.unshift(invite)\n }\n board.changelog.push(changelog_entry(op, changelog_metadata) as BoardChangelogEntry)\n } else if (op instanceof CustomAddTask) {\n const card = board.card(op.uid)\n assert_card_type(card)\n if (!card.task) {\n card.task = new Task({status: TaskStatus.task_open})\n card.changelog.push(changelog_entry(op, changelog_metadata) as CardChangelogEntry)\n }\n } else if (op instanceof CustomRemoveTask) {\n const card = board.card(op.uid)\n assert_card_type(card)\n if (card.task) {\n card.changelog.push(changelog_entry(op, changelog_metadata) as CardChangelogEntry)\n }\n card.task = undefined\n } else if (op instanceof CustomRemoveComment) {\n const comment = board.comment(op.uid)\n comment.file = undefined\n comment.note = undefined\n comment.link = undefined\n comment.removed = new Removed({change: new BoardChangeMetadata({...changelog_metadata})})\n comment.changelog.push(changelog_entry(op, changelog_metadata) as CommentChangelogEntry)\n } else {\n throw new UnknownPatchOp(op)\n }\n return board\n}\n\nfunction remove_from_board_acl(board: Board, principal_uid: PrincipalUID, op: PatchOp) {\n const current_access_level = board.acl.entry(principal_uid)\n const remove = (array: PrincipalUID[]) => {\n const index = array.indexOf(principal_uid)\n assert(index >= 0, \"Tried to remove non-existing entry\")\n array.splice(index, 1)\n }\n if (current_access_level === AccessLevel.full_access) {\n remove(board.acl._full_access)\n } else if (current_access_level === AccessLevel.edit) {\n remove(board.acl._edit)\n } else if (current_access_level === AccessLevel.comment) {\n remove(board.acl._comment)\n } else if (current_access_level === AccessLevel.read) {\n remove(board.acl._read)\n } else {\n throw new InvalidPatchOp(op, `There is no ACL entry for ${principal_uid}`)\n }\n}\n", "import {\n Board,\n BoardUID,\n RemoveBoard,\n RemoveOp,\n RemoveBoardInvite,\n CLING_BOT,\n RemoveCard,\n BoardType,\n} from \"@cling/lib.shared.model\"\nimport {BoardNotFound, UnknownPatchOp, InvalidPatchOp} from \"../index\"\nimport {Forbidden} from \"@cling/lib.shared.error/errors\"\nimport {log} from \"@cling/lib.shared.logging\"\nimport type {ChangelogMetadata} from \"../changelog\"\n\nexport default function apply_remove(\n board_uid: BoardUID,\n board: Board | \"added\" | \"removed\",\n op: RemoveOp,\n changelog_metadata: ChangelogMetadata,\n): Board | \"removed\" {\n if (board === \"added\" || board === \"removed\") {\n throw new BoardNotFound(board_uid)\n }\n const {account_uid} = changelog_metadata\n if (op instanceof RemoveBoard) {\n if (account_uid !== CLING_BOT && account_uid !== board.owner) {\n throw new Forbidden(\"Only the owner of a board or CLING_BOT is allowed to remove it\")\n }\n if (board.board_type === BoardType.people) {\n throw new Forbidden(\"People boards can be removed\")\n }\n return \"removed\"\n } else if (op instanceof RemoveCard) {\n if (op.uid === board.root.uid) {\n throw new InvalidPatchOp(op, \"The root folder cannot be removed\")\n }\n let card\n try {\n card = board.card(op.uid)\n } catch (error) {\n // TODO: Don't catch any error here, when we don't have any inconsistencies anymore.\n if (account_uid === CLING_BOT) {\n log.warn(\"Ignoring inconsistency: card not found\")\n return board\n } else {\n throw error\n }\n }\n const parent = card.parent\n parent.children = parent.children.filter((x) => x.uid !== op.uid)\n } else if (op instanceof RemoveBoardInvite) {\n board.board_invites = board.board_invites.filter((x) => x.uid !== op.uid)\n } else {\n throw new UnknownPatchOp(op)\n }\n return board\n}\n", "/**\n * Apply the given patch to the given board **in place**.\n * Note: Application of a single patch can only affect a single board.\n */\nimport {\n AddBoard,\n AddOp,\n Board,\n CustomOp,\n MoveCopyOp,\n PasteOp,\n Patch,\n RemoveOp,\n SetOp,\n AddSystemBoard,\n check_board_consistency,\n ChangeMetadata,\n AddPeopleBoard,\n} from \"@cling/lib.shared.model\"\nimport {PatchFailed, PatchOpNotExpanded} from \"../index\"\nimport apply_add_board from \"./apply_add_board\"\nimport apply_add from \"./apply_add\"\nimport apply_set from \"./apply_set\"\nimport apply_paste from \"./apply_paste\"\nimport apply_custom from \"./apply_custom\"\nimport apply_remove from \"./apply_remove\"\nimport {assert_never} from \"@cling/lib.shared.utils\"\nimport type {ChangelogMetadata} from \"../changelog\"\n\nexport default function apply_patch(\n patch: Patch,\n board: Board | \"added\" | \"removed\",\n): Board | \"removed\" {\n if (board === \"removed\") {\n throw new PatchFailed(\"Cannot patch a removed board\", 400)\n }\n if (!patch.ops.length) {\n throw new PatchFailed(\"Patch has no operations\", 400)\n }\n if (!board && !patch.will_create_new_board) {\n throw new PatchFailed(\n \"Patch cannot not by applied to a not-existing board if the first \" +\n \"operation is not AddBoard, AddPeopleBoard or AddSystemBoard\",\n 400,\n )\n }\n if (board !== \"added\" && board.uid !== patch.board_uid) {\n throw new PatchFailed(\n `Patch is for board ${patch.board_uid} but board ${board.uid} is given`,\n 400,\n )\n }\n const next_version = board instanceof Board ? board.version + 1 : 1\n const changelog_metadata: ChangelogMetadata = {\n account_uid: patch.created_by,\n date: patch.applied_at,\n board_version: next_version,\n }\n for (const op_container of patch.ops) {\n const op = op_container.op\n if (!op) {\n throw new PatchFailed(\"Unknown operation (even to protobuf)\", 400)\n } else if (op instanceof MoveCopyOp) {\n throw new PatchOpNotExpanded(op)\n } else if (\n op instanceof AddBoard ||\n op instanceof AddSystemBoard ||\n op instanceof AddPeopleBoard\n ) {\n board = apply_add_board(patch.board_uid, board, op, changelog_metadata)\n } else if (op instanceof AddOp) {\n board = apply_add(patch.board_uid, board, op, changelog_metadata)\n } else if (op instanceof PasteOp) {\n board = apply_paste(patch.board_uid, board, op, changelog_metadata)\n } else if (op instanceof RemoveOp) {\n board = apply_remove(patch.board_uid, board, op, changelog_metadata)\n } else if (op instanceof SetOp) {\n board = apply_set(patch.board_uid, board, op, changelog_metadata)\n } else if (op instanceof CustomOp) {\n board = apply_custom(patch.board_uid, board, op, changelog_metadata)\n } else {\n assert_never(op)\n }\n }\n if (board instanceof Board) {\n board.version = next_version\n board.last_change = new ChangeMetadata({\n account_uid: changelog_metadata.account_uid,\n date: changelog_metadata.date,\n })\n check_board_consistency(board)\n }\n return board as Board | \"removed\"\n}\n"], "mappings": "qzBAUO,SAASA,GACZC,EACAC,EACAC,EAA0B,CAAC,EAC7B,CACEF,EAAOA,EAAK,QAAQ,MAAO,KAAK,EAAE,QAAQ,OAAQ,KAAK,EAEvD,IAAMG,EADQ,IAAI,OAAO,SAAWH,EAAO,WAAW,EAChC,KAAK,OAAOE,EAAK,OAAW,IAAcA,EAAK,OAAS,SAAS,MAAM,EAC7F,OAAIC,EACO,mBAAmBA,EAAQ,CAAC,EAAE,QAAQ,MAAO,GAAG,CAAC,EAErD,OAAOF,GAAkB,WAAaA,EAAc,EAAIA,CACnE,CAZgBG,EAAAL,GAAA,eCHT,IAAMM,EAAN,MAAMA,UAAoBC,EAAW,CACxC,YAAYC,EAAiBC,EAA0BC,EAAkB,CAAC,EAAG,CACzE,MAAMF,EAASC,EAAkBC,CAAI,EAErC,OAAO,eAAe,KAAMJ,EAAY,SAAS,EACjD,IAAMK,EAAQD,aAAgB,MAAQA,EAAOA,EAAK,MAC9CC,GAASA,EAAM,QACf,KAAK,MAAQ,KAAK,MAAO,MAAM;AAAA,CAAI,EAAE,MAAM,EAAG,CAAC,EAAE,KAAK;AAAA,CAAI,EAAI;AAAA,EAAOA,EAAM,MAEnF,CACJ,EAV4CC,EAAAN,EAAA,eAArC,IAAMO,EAANP,EAYMQ,EAAN,MAAMA,UAAuBD,CAAY,CAC5C,YACWE,EACPP,EACF,CACE,MAAM,aAAaQ,EAAWD,CAAE,CAAC,gBAAgBP,CAAO,GAAI,GAAG,EAHxD,QAAAO,EAKP,OAAO,eAAe,KAAMD,EAAe,SAAS,CACx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B,GAAUrB,EAAM,UAAWC,EAAOM,EAAIF,CAAkB,EACzDE,aAAce,GACrBrB,EAAQsB,GAAavB,EAAM,UAAWC,EAAOM,EAAIF,CAAkB,EAEnEmB,EAAajB,CAAE,MApBf,OAAM,IAAIL,EAAY,uCAAwC,GAAG,CAsBzE,CACA,OAAID,aAAiBG,IACjBH,EAAM,QAAUE,EAChBF,EAAM,YAAc,IAAIwB,EAAe,CACnC,YAAapB,EAAmB,YAChC,KAAMA,EAAmB,IAC7B,CAAC,EACDqB,GAAwBzB,CAAK,GAE1BA,CACX,CAhEwB0B,EAAA5B,GAAA", "names": ["query_param", "name", "default_value", "opts", "results", "__name", "_PatchFailed", "ClingError", "message", "http_status_code", "opts", "error", "__name", "PatchFailed", "_InvalidPatchOp", "op", "class_name", "InvalidPatchOp", "_PatchOpNotExpanded", "PatchOpNotExpanded", "_ItemConflict", "board_uid", "item_uid", "ItemConflict", "_BoardConflict", "BoardConflict", "_BoardNotFound", "BoardNotFound", "_UnknownPatchOp", "UnknownPatchOp", "apply_add_board", "board_uid", "board_", "op", "changelog_metadata", "BoardConflict", "assert", "owner", "CLING_BOT", "name", "board_type", "patch_op_type", "board_style", "BoardStyle", "acl", "ACL", "AddBoard", "board_uid_type", "AddPeopleBoard", "InvalidPatchOp", "AddSystemBoard", "BoardType", "derive_system_board_uid", "assert_never", "board_changelog_entry", "BoardChangelogEntry", "card_changelog_entry", "CardChangelogEntry", "Board", "ChangeMetadata", "Card", "derive_CardUID", "Root", "Inbox", "__name", "changelog_entry", "op", "changelog_metadata", "board_entry", "type", "BoardChangelogEntry", "__name", "card_entry", "extra", "CardChangelogEntry", "comment_entry", "CommentChangelogEntry", "AddBoard", "AddPeopleBoard", "AddSystemBoard", "RemoveBoard", "SetBoardName", "SetBoardIndexedBySearchEngines", "CustomAddBoardACL", "CustomRemoveBoardACL", "CustomSetBoardACLAccessLevel", "CustomSetBoardOwner", "SetBoardBoardStyleBackgroundColor", "SetBoardBoardStyleBackgroundImageURL", "SetBoardBoardStyle", "CustomAddBoardInvite", "RemoveBoardInvite", "SetCardArchived", "SetCardColor", "CustomAddTask", "CustomRemoveTask", "SetTaskStatus", "SetTaskAssignee", "SetTaskDate", "AddCard", "PasteCard", "SetCardNoteSafeHtml", "SetCardNoteTitle", "SetCardLinkURL", "SetCardLinkStyle", "SetCardLinkTitle", "SetCardFileFileName", "SetCardFileTitle", "SetCardFileDisplay", "SetCardFileBlob", "SetCardFilePreviewImageBlob", "AddComment", "CustomRemoveComment", "MoveCard", "InvalidPatchOp", "CopyCard", "RemoveCard", "CopyBoard", "assert_never", "patch_op_container", "PatchOpContainer", "apply_add", "board_uid", "board", "op", "changelog_metadata", "BoardNotFound", "value", "InvalidPatchOp", "is_ContentItemUID", "ItemConflict", "AddCard", "card", "Card", "changelog_entry", "container", "insert", "AddComment", "comment", "Comment", "UnknownPatchOp", "__name", "new_item", "target_pos", "pos", "apply_set", "board_uid", "board", "op", "changelog_metadata", "BoardNotFound", "uid", "InvalidPatchOp", "value", "path", "set_by_path", "content_item", "changelog_entry", "error", "ItemNotFound", "PatchFailed", "class_name", "__name", "assert", "obj", "i", "field", "apply_paste", "board_uid", "board", "op", "changelog_metadata", "BoardNotFound", "PasteCard", "target_card", "InvalidPatchOp", "pos", "card", "deep_copy", "changelog_entry_", "changelog_entry", "set_archived", "adapt_changelog", "x", "traverse_cards", "y", "UnknownPatchOp", "__name", "item", "src_board_uid", "target_board_uid", "apply_custom", "board_uid", "board", "op", "changelog_metadata", "BoardNotFound", "assert_card_type", "card", "InvalidPatchOp", "__name", "assert_regular_board", "msg", "CustomAddBoardACL", "principal_uid", "access_level", "CLING_PUBLIC", "Forbidden", "current_access_level", "doit", "array", "target_access_level", "assert_never", "changelog_entry", "CustomSetBoardACLAccessLevel", "remove", "index", "assert", "CustomRemoveBoardACL", "remove_from_board_acl", "CustomSetBoardOwner", "account_uid", "CustomAddBoardInvite", "email", "board_invite", "normalize_email", "invite", "BoardInvite", "CustomAddTask", "Task", "CustomRemoveTask", "CustomRemoveComment", "comment", "Removed", "BoardChangeMetadata", "UnknownPatchOp", "apply_remove", "board_uid", "board", "op", "changelog_metadata", "BoardNotFound", "account_uid", "RemoveBoard", "CLING_BOT", "Forbidden", "RemoveCard", "InvalidPatchOp", "card", "error", "log", "parent", "x", "RemoveBoardInvite", "UnknownPatchOp", "__name", "apply_patch", "patch", "board", "PatchFailed", "next_version", "Board", "changelog_metadata", "op_container", "op", "MoveCopyOp", "PatchOpNotExpanded", "AddBoard", "AddSystemBoard", "AddPeopleBoard", "apply_add_board", "AddOp", "apply_add", "PasteOp", "apply_paste", "RemoveOp", "apply_remove", "SetOp", "apply_set", "CustomOp", "apply_custom", "assert_never", "ChangeMetadata", "check_board_consistency", "__name"] }