summaryrefslogtreecommitdiff
path: root/bot/node_modules/matrix-js-sdk/lib/@types/read_receipts.js.map
blob: 1edee84e0eae4e49c6713ba6fc1d9c0ff506dbfa (plain)
1
{"version":3,"file":"read_receipts.js","names":["ReceiptType","exports","MAIN_ROOM_TIMELINE"],"sources":["../../src/@types/read_receipts.ts"],"sourcesContent":["/*\nCopyright 2022 Šimon Brandner <simon.bra.ag@gmail.com>\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport enum ReceiptType {\n    Read = \"m.read\",\n    FullyRead = \"m.fully_read\",\n    ReadPrivate = \"m.read.private\",\n}\n\nexport const MAIN_ROOM_TIMELINE = \"main\";\n\nexport interface Receipt {\n    ts: number;\n    thread_id?: string;\n}\n\nexport interface WrappedReceipt {\n    eventId: string;\n    data: Receipt;\n}\n\nexport interface CachedReceipt {\n    type: ReceiptType;\n    userId: string;\n    data: Receipt;\n}\n\nexport type ReceiptCache = Map<string, CachedReceipt[]>;\n\nexport interface ReceiptContent {\n    [eventId: string]: {\n        [key in ReceiptType | string]: {\n            [userId: string]: Receipt;\n        };\n    };\n}\n\n// We will only hold a synthetic receipt if we do not have a real receipt or the synthetic is newer.\n// map: receipt type → user Id → receipt\nexport type Receipts = Map<string, Map<string, [real: WrappedReceipt | null, synthetic: WrappedReceipt | null]>>;\n\nexport type CachedReceiptStructure = {\n    eventId: string;\n    receiptType: string | ReceiptType;\n    userId: string;\n    receipt: Receipt;\n    synthetic: boolean;\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAgBYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAAC,OAAA,CAAAD,WAAA,GAAAA,WAAA;AAMhB,MAAME,kBAAkB,GAAG,MAAM;;AA4BxC;AACA;AAAAD,OAAA,CAAAC,kBAAA,GAAAA,kBAAA"}