1 | import { _SPCollection, _SPInstance, IDeleteable } from "../spqueryable.js";
|
2 | export declare class _Fields extends _SPCollection<IFieldInfo[]> {
|
3 | |
4 |
|
5 |
|
6 |
|
7 |
|
8 | createFieldAsXml(xml: string | IXmlSchemaFieldCreationInformation): Promise<IFieldAddResult>;
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 | getById(id: string): IField;
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | getByTitle(title: string): IField;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 | getByInternalNameOrTitle(name: string): IField;
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | add(title: string, fieldTypeKind: number, properties?: IFieldCreationProperties): Promise<IFieldAddResult>;
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | addField(title: string, fieldTypeKind: number, properties?: IAddFieldProperties): Promise<IFieldAddResult>;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | addText(title: string, properties?: IFieldCreationProperties & AddTextProps): Promise<IFieldAddResult>;
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | addCalculated(title: string, properties?: IFieldCreationProperties & AddCalculatedProps): Promise<IFieldAddResult>;
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | addDateTime(title: string, properties?: IFieldCreationProperties & AddDateTimeProps): Promise<IFieldAddResult>;
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | addNumber(title: string, properties?: IFieldCreationProperties & AddNumberProps): Promise<IFieldAddResult>;
|
69 | |
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | addCurrency(title: string, properties?: IFieldCreationProperties & AddCurrencyProps): Promise<IFieldAddResult>;
|
76 | |
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | addMultilineText(title: string, properties?: IFieldCreationProperties & AddMultilineTextProps): Promise<IFieldAddResult>;
|
84 | |
85 |
|
86 |
|
87 |
|
88 |
|
89 | addUrl(title: string, properties?: IFieldCreationProperties & AddUrlProps): Promise<IFieldAddResult>;
|
90 | |
91 |
|
92 |
|
93 |
|
94 |
|
95 | addUser(title: string, properties?: IFieldCreationProperties & AddUserProps): Promise<IFieldAddResult>;
|
96 | |
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 | addLookup(title: string, properties?: IAddFieldProperties): Promise<IFieldAddResult>;
|
103 | |
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | addChoice(title: string, properties?: IFieldCreationProperties & AddChoiceProps): Promise<IFieldAddResult>;
|
110 | |
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | addMultiChoice(title: string, properties?: IFieldCreationProperties & AddMultiChoiceProps): Promise<IFieldAddResult>;
|
117 | |
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 | addBoolean(title: string, properties?: IFieldCreationProperties): Promise<IFieldAddResult>;
|
124 | |
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 | addDependentLookupField(displayName: string, primaryLookupFieldId: string, showField: string): Promise<IFieldAddResult>;
|
132 | |
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | addLocation(title: string, properties?: IFieldCreationProperties): Promise<IFieldAddResult>;
|
139 | |
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 | addImageField(title: string, properties?: IFieldCreationProperties): Promise<IFieldAddResult>;
|
146 | }
|
147 | export interface IFields extends _Fields {
|
148 | }
|
149 | export declare const Fields: import("../spqueryable.js").ISPInvokableFactory<IFields>;
|
150 | export declare class _Field extends _SPInstance<IFieldInfo> {
|
151 | delete: (this: import("../spqueryable.js").ISPQueryable<any>) => Promise<void>;
|
152 | |
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 | update(properties: any, fieldType?: string): Promise<IFieldUpdateResult>;
|
159 | |
160 |
|
161 |
|
162 | setShowInDisplayForm(show: boolean): Promise<void>;
|
163 | |
164 |
|
165 |
|
166 | setShowInEditForm(show: boolean): Promise<void>;
|
167 | |
168 |
|
169 |
|
170 | setShowInNewForm(show: boolean): Promise<void>;
|
171 | }
|
172 | export interface IField extends _Field, IDeleteable {
|
173 | }
|
174 | export declare const Field: import("../spqueryable.js").ISPInvokableFactory<IField>;
|
175 |
|
176 |
|
177 |
|
178 | export interface IFieldAddResult {
|
179 | data: Partial<IFieldInfo>;
|
180 | field: IField;
|
181 | }
|
182 |
|
183 |
|
184 |
|
185 | export interface IFieldUpdateResult {
|
186 | data: Partial<IFieldInfo>;
|
187 | field: IField;
|
188 | }
|
189 | export declare type AddTextProps = {
|
190 | MaxLength?: number;
|
191 | };
|
192 | export declare type AddCalculatedProps = {
|
193 | DateFormat?: DateTimeFieldFormatType;
|
194 | FieldTypeKind?: number;
|
195 | Formula?: string;
|
196 | OutputType?: FieldTypes;
|
197 | };
|
198 | export declare type AddDateTimeProps = {
|
199 | DateTimeCalendarType?: CalendarType;
|
200 | DisplayFormat?: DateTimeFieldFormatType;
|
201 | FriendlyDisplayFormat?: DateTimeFieldFriendlyFormatType;
|
202 | };
|
203 | export declare type AddNumberProps = {
|
204 | MinimumValue?: number;
|
205 | MaximumValue?: number;
|
206 | };
|
207 | export declare type AddCurrencyProps = AddNumberProps & {
|
208 | CurrencyLocaleId?: number;
|
209 | };
|
210 | export declare type AddMultilineTextProps = {
|
211 | AllowHyperlink?: boolean;
|
212 | AppendOnly?: boolean;
|
213 | NumberOfLines?: number;
|
214 | RestrictedMode?: boolean;
|
215 | RichText?: boolean;
|
216 | };
|
217 | export declare type AddUrlProps = {
|
218 | DisplayFormat?: UrlFieldFormatType;
|
219 | };
|
220 | export declare type AddUserProps = {
|
221 | SelectionMode?: FieldUserSelectionMode;
|
222 | };
|
223 | export declare type AddChoiceProps = {
|
224 | Choices: string[];
|
225 | EditFormat?: ChoiceFieldFormatType;
|
226 | FillInChoice?: boolean;
|
227 | };
|
228 | export declare type AddMultiChoiceProps = {
|
229 | Choices: string[];
|
230 | FillInChoice?: boolean;
|
231 | };
|
232 |
|
233 |
|
234 |
|
235 | export declare const enum FieldTypes {
|
236 | Invalid = 0,
|
237 | Integer = 1,
|
238 | Text = 2,
|
239 | Note = 3,
|
240 | DateTime = 4,
|
241 | Counter = 5,
|
242 | Choice = 6,
|
243 | Lookup = 7,
|
244 | Boolean = 8,
|
245 | Number = 9,
|
246 | Currency = 10,
|
247 | URL = 11,
|
248 | Computed = 12,
|
249 | Threading = 13,
|
250 | Guid = 14,
|
251 | MultiChoice = 15,
|
252 | GridChoice = 16,
|
253 | Calculated = 17,
|
254 | File = 18,
|
255 | Attachments = 19,
|
256 | User = 20,
|
257 | Recurrence = 21,
|
258 | CrossProjectLink = 22,
|
259 | ModStat = 23,
|
260 | Error = 24,
|
261 | ContentTypeId = 25,
|
262 | PageSeparator = 26,
|
263 | ThreadIndex = 27,
|
264 | WorkflowStatus = 28,
|
265 | AllDayEvent = 29,
|
266 | WorkflowEventType = 30,
|
267 | Location = 33,
|
268 | Image = 34
|
269 | }
|
270 | export declare enum DateTimeFieldFormatType {
|
271 | DateOnly = 0,
|
272 | DateTime = 1
|
273 | }
|
274 | export declare enum DateTimeFieldFriendlyFormatType {
|
275 | Unspecified = 0,
|
276 | Disabled = 1,
|
277 | Relative = 2
|
278 | }
|
279 |
|
280 |
|
281 |
|
282 | export declare const enum AddFieldOptions {
|
283 | |
284 |
|
285 |
|
286 | DefaultValue = 0,
|
287 | |
288 |
|
289 |
|
290 | AddToDefaultContentType = 1,
|
291 | |
292 |
|
293 |
|
294 | AddToNoContentType = 2,
|
295 | |
296 |
|
297 |
|
298 | AddToAllContentTypes = 4,
|
299 | |
300 |
|
301 |
|
302 | AddFieldInternalNameHint = 8,
|
303 | |
304 |
|
305 |
|
306 | AddFieldToDefaultView = 16,
|
307 | |
308 |
|
309 |
|
310 | AddFieldCheckDisplayName = 32
|
311 | }
|
312 | export interface IXmlSchemaFieldCreationInformation {
|
313 | Options?: AddFieldOptions;
|
314 | SchemaXml: string;
|
315 | }
|
316 | export declare const enum CalendarType {
|
317 | Gregorian = 1,
|
318 | Japan = 3,
|
319 | Taiwan = 4,
|
320 | Korea = 5,
|
321 | Hijri = 6,
|
322 | Thai = 7,
|
323 | Hebrew = 8,
|
324 | GregorianMEFrench = 9,
|
325 | GregorianArabic = 10,
|
326 | GregorianXLITEnglish = 11,
|
327 | GregorianXLITFrench = 12,
|
328 | KoreaJapanLunar = 14,
|
329 | ChineseLunar = 15,
|
330 | SakaEra = 16,
|
331 | UmAlQura = 23
|
332 | }
|
333 | export declare enum UrlFieldFormatType {
|
334 | Hyperlink = 0,
|
335 | Image = 1
|
336 | }
|
337 | export declare enum FieldUserSelectionMode {
|
338 | PeopleAndGroups = 1,
|
339 | PeopleOnly = 0
|
340 | }
|
341 | export interface IFieldCreationProperties {
|
342 | DefaultFormula?: string;
|
343 | Description?: string;
|
344 | EnforceUniqueValues?: boolean;
|
345 | FieldTypeKind?: number;
|
346 | Group?: string;
|
347 | Hidden?: boolean;
|
348 | Indexed?: boolean;
|
349 | Required?: boolean;
|
350 | Title?: string;
|
351 | ValidationFormula?: string;
|
352 | ValidationMessage?: string;
|
353 | }
|
354 | export interface IAddFieldProperties {
|
355 | Title?: string;
|
356 | Type?: number;
|
357 | Required?: boolean;
|
358 | IsCompactName?: boolean;
|
359 | LookupListId?: string;
|
360 | LookupWebId?: string;
|
361 | Choices?: string[];
|
362 | LookupFieldName?: string;
|
363 | }
|
364 | export declare enum ChoiceFieldFormatType {
|
365 | Dropdown = 0,
|
366 | RadioButtons = 1
|
367 | }
|
368 | export interface IFieldInfo {
|
369 | Choices?: string[];
|
370 | DefaultFormula: string | null;
|
371 | DefaultValue: string | null;
|
372 | Description: string;
|
373 | Direction: string;
|
374 | EnforceUniqueValues: boolean;
|
375 | EntityPropertyName: string;
|
376 | FieldTypeKind: FieldTypes;
|
377 | Filterable: boolean;
|
378 | FromBaseType: boolean;
|
379 | Group: string;
|
380 | Hidden: boolean;
|
381 | Id: string;
|
382 | Indexed: boolean;
|
383 | IndexStatus: number;
|
384 | InternalName: string;
|
385 | JSLink: string;
|
386 | PinnedToFiltersPane: boolean;
|
387 | ReadOnlyField: boolean;
|
388 | Required: boolean;
|
389 | SchemaXml: string;
|
390 | Scope: string;
|
391 | Sealed: boolean;
|
392 | ShowInFiltersPane: number;
|
393 | Sortable: boolean;
|
394 | StaticName: string;
|
395 | Title: string;
|
396 | TypeAsString: string;
|
397 | TypeDisplayName: string;
|
398 | TypeShortDescription: string;
|
399 | ValidationFormula: string | null;
|
400 | ValidationMessage: string | null;
|
401 | }
|
402 |
|
\ | No newline at end of file |