diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-24 14:03:36 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-24 14:03:36 +0200 |
commit | 633c92eae865e957121e08de634aeee11a8b3992 (patch) | |
tree | 09d881bee1dae0b6eee49db1dfaf0f500240606c /includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts | |
parent | c4657e4509733699c0f26a3c900bab47e915d5a0 (diff) | |
download | pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.gz pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.bz2 pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.zip |
Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated)
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts')
-rw-r--r-- | includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts b/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts new file mode 100644 index 0000000..11722ab --- /dev/null +++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts @@ -0,0 +1,86 @@ +import { MatrixClient } from "../client"; +import { IEncryptedFile } from "../@types/event"; +import { IContent, MatrixEvent } from "./event"; +import { MSC3089TreeSpace } from "./MSC3089TreeSpace"; +import { FileType } from "../http-api"; +import type { ISendEventResponse } from "../@types/requests"; +/** + * Represents a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) branch - a reference + * to a file (leaf) in the tree. Note that this is UNSTABLE and subject to breaking changes + * without notice. + */ +export declare class MSC3089Branch { + private client; + readonly indexEvent: MatrixEvent; + readonly directory: MSC3089TreeSpace; + constructor(client: MatrixClient, indexEvent: MatrixEvent, directory: MSC3089TreeSpace); + /** + * The file ID. + */ + get id(): string; + /** + * Whether this branch is active/valid. + */ + get isActive(): boolean; + /** + * Version for the file, one-indexed. + */ + get version(): number; + private get roomId(); + /** + * Deletes the file from the tree, including all prior edits/versions. + * @returns Promise which resolves when complete. + */ + delete(): Promise<void>; + /** + * Gets the name for this file. + * @returns The name, or "Unnamed File" if unknown. + */ + getName(): string; + /** + * Sets the name for this file. + * @param name - The new name for this file. + * @returns Promise which resolves when complete. + */ + setName(name: string): Promise<void>; + /** + * Gets whether or not a file is locked. + * @returns True if locked, false otherwise. + */ + isLocked(): boolean; + /** + * Sets a file as locked or unlocked. + * @param locked - True to lock the file, false otherwise. + * @returns Promise which resolves when complete. + */ + setLocked(locked: boolean): Promise<void>; + /** + * Gets information about the file needed to download it. + * @returns Information about the file. + */ + getFileInfo(): Promise<{ + info: IEncryptedFile; + httpUrl: string; + }>; + /** + * Gets the event the file points to. + * @returns Promise which resolves to the file's event. + */ + getFileEvent(): Promise<MatrixEvent>; + /** + * Creates a new version of this file with contents in a type that is compatible with MatrixClient.uploadContent(). + * @param name - The name of the file. + * @param encryptedContents - The encrypted contents. + * @param info - The encrypted file information. + * @param additionalContent - Optional event content fields to include in the message. + * @returns Promise which resolves to the file event's sent response. + */ + createNewVersion(name: string, encryptedContents: FileType, info: Partial<IEncryptedFile>, additionalContent?: IContent): Promise<ISendEventResponse>; + /** + * Gets the file's version history, starting at this file. + * @returns Promise which resolves to the file's version history, with the + * first element being the current version and the last element being the first version. + */ + getVersionHistory(): Promise<MSC3089Branch[]>; +} +//# sourceMappingURL=MSC3089Branch.d.ts.map
\ No newline at end of file |