1 | import { IDeleteableWithETag, _SPCollection, _SPInstance } from "../spqueryable.js";
|
2 | export declare class _Attachments extends _SPCollection<IAttachmentInfo[]> {
|
3 | |
4 |
|
5 |
|
6 |
|
7 |
|
8 | getByName(name: string): IAttachment;
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | add(name: string, content: string | Blob | ArrayBuffer): Promise<IAttachmentAddResult>;
|
16 | }
|
17 | export interface IAttachments extends _Attachments {
|
18 | }
|
19 | export declare const Attachments: import("../spqueryable.js").ISPInvokableFactory<IAttachments>;
|
20 | export declare class _Attachment extends _SPInstance<IAttachmentInfo> {
|
21 | delete: (this: import("../spqueryable.js").ISPQueryable<any>, eTag?: string) => Promise<void>;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | getText(): Promise<string>;
|
27 | |
28 |
|
29 |
|
30 |
|
31 | getBlob(): Promise<Blob>;
|
32 | |
33 |
|
34 |
|
35 | getBuffer(): Promise<ArrayBuffer>;
|
36 | |
37 |
|
38 |
|
39 | getJSON(): Promise<any>;
|
40 | |
41 |
|
42 |
|
43 |
|
44 |
|
45 | setContent(content: string | ArrayBuffer | Blob): Promise<IAttachment>;
|
46 | |
47 |
|
48 |
|
49 |
|
50 |
|
51 | recycle(eTag?: string): Promise<void>;
|
52 | private getParsed;
|
53 | }
|
54 | export interface IAttachment extends _Attachment, IDeleteableWithETag {
|
55 | }
|
56 | export declare const Attachment: import("../spqueryable.js").ISPInvokableFactory<IAttachment>;
|
57 | export interface IAttachmentAddResult {
|
58 | file: IAttachment;
|
59 | data: IAttachmentFileInfo;
|
60 | }
|
61 | export interface IAttachmentFileInfo {
|
62 | name: string;
|
63 | content: string | Blob | ArrayBuffer;
|
64 | }
|
65 | export interface IAttachmentInfo {
|
66 | FileName: string;
|
67 | FileNameAsPath: {
|
68 | DecodedUrl: string;
|
69 | };
|
70 | ServerRelativePath: {
|
71 | DecodedUrl: string;
|
72 | };
|
73 | ServerRelativeUrl: string;
|
74 | }
|
75 |
|
\ | No newline at end of file |