@kwiz/common 1.0.78 → 1.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.github/workflows/npm-publish.yml +24 -0
  2. package/.madgerc +2 -2
  3. package/LICENSE +21 -21
  4. package/fix-folder-imports.js +26 -26
  5. package/lib/cjs/helpers/sharepoint.js +5 -1
  6. package/lib/cjs/helpers/sharepoint.js.map +1 -1
  7. package/lib/cjs/helpers/typecheckers.js +5 -1
  8. package/lib/cjs/helpers/typecheckers.js.map +1 -1
  9. package/lib/cjs/types/libs/msal.types.js +26 -26
  10. package/lib/cjs/utils/sharepoint.rest/list.js +1 -1
  11. package/lib/cjs/utils/sharepoint.rest/list.js.map +1 -1
  12. package/lib/cjs/utils/sharepoint.rest/user.js +11 -11
  13. package/lib/esm/helpers/sharepoint.js +3 -0
  14. package/lib/esm/helpers/sharepoint.js.map +1 -1
  15. package/lib/esm/helpers/typecheckers.js +3 -0
  16. package/lib/esm/helpers/typecheckers.js.map +1 -1
  17. package/lib/esm/types/libs/msal.types.js +26 -26
  18. package/lib/esm/utils/sharepoint.rest/list.js +2 -2
  19. package/lib/esm/utils/sharepoint.rest/list.js.map +1 -1
  20. package/lib/esm/utils/sharepoint.rest/user.js +11 -11
  21. package/lib/types/helpers/sharepoint.d.ts +1 -0
  22. package/lib/types/helpers/typecheckers.d.ts +1 -0
  23. package/package.json +77 -77
  24. package/readme.md +17 -17
  25. package/src/_dependencies.ts +12 -12
  26. package/src/config.ts +17 -17
  27. package/src/helpers/Guid.ts +181 -181
  28. package/src/helpers/base64.ts +173 -173
  29. package/src/helpers/browser.test.js +13 -13
  30. package/src/helpers/browser.ts +1348 -1348
  31. package/src/helpers/browserinfo.ts +292 -292
  32. package/src/helpers/collections.base.test.js +25 -25
  33. package/src/helpers/collections.base.ts +437 -437
  34. package/src/helpers/collections.ts +107 -107
  35. package/src/helpers/color.ts +54 -54
  36. package/src/helpers/cookies.ts +59 -59
  37. package/src/helpers/date.test.js +119 -119
  38. package/src/helpers/date.ts +188 -188
  39. package/src/helpers/debug.ts +186 -186
  40. package/src/helpers/emails.ts +6 -6
  41. package/src/helpers/eval.ts +5 -5
  42. package/src/helpers/file.test.js +50 -50
  43. package/src/helpers/file.ts +58 -58
  44. package/src/helpers/flatted.ts +149 -149
  45. package/src/helpers/functions.ts +16 -16
  46. package/src/helpers/graph/calendar.types.ts +10 -10
  47. package/src/helpers/http.ts +69 -69
  48. package/src/helpers/images.ts +22 -22
  49. package/src/helpers/json.ts +38 -38
  50. package/src/helpers/md5.ts +189 -189
  51. package/src/helpers/objects.test.js +33 -33
  52. package/src/helpers/objects.ts +270 -270
  53. package/src/helpers/promises.test.js +37 -37
  54. package/src/helpers/promises.ts +165 -165
  55. package/src/helpers/random.ts +27 -27
  56. package/src/helpers/scheduler/scheduler.test.js +103 -103
  57. package/src/helpers/scheduler/scheduler.ts +131 -131
  58. package/src/helpers/sharepoint.ts +776 -772
  59. package/src/helpers/strings.test.js +101 -101
  60. package/src/helpers/strings.ts +317 -317
  61. package/src/helpers/typecheckers.test.js +34 -34
  62. package/src/helpers/typecheckers.ts +266 -262
  63. package/src/helpers/url.test.js +43 -43
  64. package/src/helpers/url.ts +207 -207
  65. package/src/helpers/urlhelper.ts +111 -111
  66. package/src/index.ts +6 -6
  67. package/src/types/auth.ts +54 -54
  68. package/src/types/common.types.ts +15 -15
  69. package/src/types/flatted.types.ts +59 -59
  70. package/src/types/globals.types.ts +6 -6
  71. package/src/types/graph/calendar.types.ts +80 -80
  72. package/src/types/knownscript.types.ts +18 -18
  73. package/src/types/libs/datajs.types.ts +28 -28
  74. package/src/types/libs/ics.types.ts +30 -30
  75. package/src/types/libs/msal.types.ts +49 -49
  76. package/src/types/locales.ts +124 -124
  77. package/src/types/localstoragecache.types.ts +8 -8
  78. package/src/types/location.types.ts +27 -27
  79. package/src/types/moment.ts +11 -11
  80. package/src/types/regex.types.ts +16 -16
  81. package/src/types/rest.types.ts +95 -95
  82. package/src/types/sharepoint.types.ts +1465 -1465
  83. package/src/types/sharepoint.utils.types.ts +287 -287
  84. package/src/utils/auth/common.ts +74 -74
  85. package/src/utils/auth/discovery.test.js +12 -12
  86. package/src/utils/auth/discovery.ts +132 -132
  87. package/src/utils/base64.ts +27 -27
  88. package/src/utils/consolelogger.ts +320 -320
  89. package/src/utils/date.ts +35 -35
  90. package/src/utils/emails.ts +24 -24
  91. package/src/utils/knownscript.ts +286 -286
  92. package/src/utils/localstoragecache.ts +441 -441
  93. package/src/utils/rest.ts +501 -501
  94. package/src/utils/script.ts +170 -170
  95. package/src/utils/sharepoint.rest/common.ts +154 -154
  96. package/src/utils/sharepoint.rest/date.ts +62 -62
  97. package/src/utils/sharepoint.rest/file.folder.ts +598 -598
  98. package/src/utils/sharepoint.rest/item.ts +547 -547
  99. package/src/utils/sharepoint.rest/list.ts +1388 -1388
  100. package/src/utils/sharepoint.rest/listutils/GetListItemsByCaml.ts +774 -774
  101. package/src/utils/sharepoint.rest/listutils/GetListItemsById.ts +275 -275
  102. package/src/utils/sharepoint.rest/listutils/common.ts +206 -206
  103. package/src/utils/sharepoint.rest/location.ts +141 -141
  104. package/src/utils/sharepoint.rest/navigation-links.ts +86 -86
  105. package/src/utils/sharepoint.rest/user-search.ts +252 -252
  106. package/src/utils/sharepoint.rest/user.ts +491 -491
  107. package/src/utils/sharepoint.rest/web.ts +1384 -1384
  108. package/src/utils/sod.ts +194 -194
  109. package/lib/cjs/helpers/_dependencies.js +0 -21
  110. package/lib/cjs/helpers/_dependencies.js.map +0 -1
  111. package/lib/cjs/utils/_dependencies.js +0 -24
  112. package/lib/cjs/utils/_dependencies.js.map +0 -1
  113. package/lib/esm/helpers/_dependencies.js +0 -3
  114. package/lib/esm/helpers/_dependencies.js.map +0 -1
  115. package/lib/esm/utils/_dependencies.js +0 -4
  116. package/lib/esm/utils/_dependencies.js.map +0 -1
  117. package/lib/types/helpers/_dependencies.d.ts +0 -2
  118. package/lib/types/utils/_dependencies.d.ts +0 -3
@@ -1,1466 +1,1466 @@
1
- /** types for known OOB SharePoint objects - do not import */
2
- //todo: Kevin - make a disctinction between this file and the utils.types file
3
- //keep full SP objects here, move the ones our API created to the utils types
4
- //have a consistent naming convention, usually I[]Info refers to our objects, but iList is our API object and IListInfo seems to be the full object
5
- export interface IFieldJsonSchema {
6
- Attributes: {
7
- ID?: string;
8
- Name?: string;
9
- StaticName?: string;
10
- [key: string]: string;
11
- };
12
- Customizations: { [PropertyName: string]: string; };
13
- }
14
-
15
- export interface IFieldJsonSchemaLookup extends IFieldJsonSchema {
16
- Attributes: {
17
- Mult?: "TRUE" | "FALSE";
18
- WebId?: string;
19
- List?: string;
20
- ShowField?: string;
21
- };
22
- }
23
-
24
- // eslint-disable-next-line no-shadow
25
- export enum PageType {
26
- Invalid = -1,
27
- DefaultView = 0,
28
- NormalView = 1,
29
- DialogView = 2,
30
- View = 3,
31
- DisplayForm = 4,
32
- DisplayFormDialog = 5,
33
- EditForm = 6,
34
- EditFormDialog = 7,
35
- NewForm = 8,
36
- NewFormDialog = 9,
37
- SolutionForm = 10,
38
- PAGE_MAXITEMS = 11
39
- }
40
-
41
- export interface IContentTypeInfo {
42
- Description: string;
43
- DisplayFormTemplateName: string;
44
- DisplayFormUrl: string;
45
- DocumentTemplate: string;
46
- DocumentTemplateUrl: string;
47
- EditFormTemplateName: string;
48
- EditFormUrl: string;
49
- Group: string;
50
- Hidden: boolean;
51
- Id: {
52
- StringValue: string;
53
- };
54
- JSLink: string;
55
- MobileDisplayFormUrl: string;
56
- MobileEditFormUrl: string;
57
- MobileNewFormUrl: string;
58
- Name: string;
59
- NewFormTemplateName: string;
60
- NewFormUrl: string;
61
- ReadOnly: boolean;
62
- SchemaXml: string;
63
- Scope: string;
64
- Sealed: boolean;
65
- StringId: string;
66
- }
67
-
68
- // eslint-disable-next-line no-shadow
69
- export enum ChoiceFieldFormatType {
70
- Dropdown = 0,
71
- RadioButtons = 1
72
- }
73
-
74
- export interface IFieldInfo {
75
- DefaultFormula: string | null;
76
- DefaultValue: string | null;
77
- Description: string;
78
- //Direction: string;
79
- EnforceUniqueValues: boolean;
80
- //EntityPropertyName: string;
81
- FieldTypeKind: FieldTypes;
82
- //Filterable: boolean;
83
- //FromBaseType: boolean;
84
- Group: string;
85
- Hidden: boolean;
86
- Id: string;
87
- Indexed: boolean;
88
- //IndexStatus: number;
89
- InternalName: string;
90
- JSLink: string;
91
- //PinnedToFiltersPane: boolean;
92
- ReadOnlyField: boolean;
93
- Required: boolean;
94
- SchemaXml: string;
95
- //Scope: string;
96
- //Sealed: boolean;
97
- //ShowInFiltersPane: number;
98
- //Sortable: boolean;
99
- StaticName: string;
100
- Title: string;
101
- TypeAsString: string | FieldTypeAsString;
102
- ClientSideComponentProperties?: string;
103
- ClientSideComponentId?: string;
104
- //TypeDisplayName: string;
105
- //TypeShortDescription: string;
106
- //ValidationFormula: string | null;
107
- //ValidationMessage: string | null;
108
- }
109
-
110
- // eslint-disable-next-line no-shadow
111
- export enum DateTimeFieldFormatType {
112
- DateOnly = 0,
113
- DateTime = 1
114
- }
115
-
116
- // eslint-disable-next-line no-shadow
117
- export enum DateTimeFieldFriendlyFormatType {
118
- // Undefined. The default rendering will be used.
119
- Unspecified = 0,
120
- // The standard absolute representation will be used.
121
- Disabled = 1,
122
- // The standard friendly relative representation will be used (for example, "today at 3:00 PM").
123
- Relative = 2
124
- }
125
-
126
- // eslint-disable-next-line no-shadow
127
- export enum UrlFieldFormatType {
128
- Hyperlink = 0,
129
- Image = 1
130
- }
131
-
132
- // eslint-disable-next-line no-shadow
133
- export enum FieldTypes {
134
- Invalid = 0,
135
- Integer = 1,
136
- Text = 2,
137
- Note = 3,
138
- DateTime = 4,
139
- Counter = 5,
140
- Choice = 6,
141
- Lookup = 7,
142
- Boolean = 8,
143
- Number = 9,
144
- Currency = 10,
145
- URL = 11,
146
- Computed = 12,
147
- Threading = 13,
148
- Guid = 14,
149
- MultiChoice = 15,
150
- GridChoice = 16,
151
- Calculated = 17,
152
- File = 18,
153
- Attachments = 19,
154
- User = 20,
155
- Recurrence = 21,
156
- CrossProjectLink = 22,
157
- ModStat = 23,
158
- Error = 24,
159
- ContentTypeId = 25,
160
- PageSeparator = 26,
161
- ThreadIndex = 27,
162
- WorkflowStatus = 28,
163
- AllDayEvent = 29,
164
- WorkflowEventType = 30,
165
- Geolocation = 31,
166
- Location = 33
167
- }
168
-
169
- // eslint-disable-next-line no-shadow
170
- export enum ListTemplateTypes {
171
- AccessRequest = 160,
172
- AdminTasks = 1200,
173
- Agenda = 201,
174
- Announcements = 104,
175
- AppDataCatalog = 125,
176
- CallTrack = 404,
177
- Categories = 303,
178
- Circulation = 405,
179
- Comments = 302,
180
- Contacts = 105,
181
- CustomGrid = 120,
182
- DataConnectionLibrary = 130,
183
- DataSources = 110,
184
- Decision = 204,
185
- DesignCatalog = 124,
186
- DeveloperSiteDraftApps = 1230,
187
- DiscussionBoard = 108,
188
- DocumentLibrary = 101,
189
- Events = 106,
190
- ExternalList = 600,
191
- Facility = 402,
192
- GanttTasks = 150,
193
- GenericList = 100,
194
- HealthReports = 1221,
195
- HealthRules = 1220,
196
- HelpLibrary = 151,
197
- Holidays = 421,
198
- HomePageLibrary = 212,
199
- IMEDic = 499,
200
- InvalidType = -1,
201
- IssueTracking = 1100,
202
- Links = 103,
203
- ListTemplateCatalog = 114,
204
- MaintenanceLogs = 175,
205
- MasterPageCatalog = 116,
206
- MeetingObjective = 207,
207
- Meetings = 200,
208
- MeetingUser = 202,
209
- MySiteDocumentLibrary = 700,
210
- NoCodePublic = 122,
211
- NoCodeWorkflows = 117,
212
- NoListTemplate = 0,
213
- PictureLibrary = 109,
214
- Posts = 301,
215
- SolutionCatalog = 121,
216
- Survey = 102,
217
- Tasks = 107,
218
- TasksWithTimelineAndHierarchy = 171,
219
- TextBox = 210,
220
- ThemeCatalog = 123,
221
- ThingsToBring = 211,
222
- Timecard = 420,
223
- UserInformation = 112,
224
- WebPageLibrary = 119,
225
- WebPartCatalog = 113,
226
- WebTemplateCatalog = 111,
227
- Whereabouts = 403,
228
- WorkflowHistory = 140,
229
- WorkflowProcess = 118,
230
- XMLForm = 115
231
- }
232
- // eslint-disable-next-line no-shadow
233
- export enum BaseTypes {
234
- DiscussionBoard = 3,
235
- DocumentLibrary = 1,
236
- GenericList = 0,
237
- Issue = 5,
238
- Survey = 4,
239
- UnspecifiedBaseType = -1,
240
- Unused = 2
241
- }
242
-
243
- export interface ISiteUserProps {
244
- /**
245
- * Contains Site user email
246
- *
247
- */
248
- Email: string;
249
- /**
250
- * Contains Site user Id
251
- *
252
- */
253
- Id: number;
254
- /**
255
- * Site user IsHiddenInUI
256
- *
257
- */
258
- IsHiddenInUI: boolean;
259
- /**
260
- * Site user IsShareByEmailGuestUser
261
- *
262
- */
263
- IsShareByEmailGuestUser: boolean;
264
- /**
265
- * Describes if Site user Is Site Admin
266
- *
267
- */
268
- IsSiteAdmin: boolean;
269
- /**
270
- * Site user LoginName
271
- *
272
- */
273
- LoginName: string;
274
- /**
275
- * Site user Principal type
276
- *
277
- */
278
- PrincipalType: number | PrincipalType;
279
- /**
280
- * Site user Title
281
- *
282
- */
283
- Title: string;
284
- }
285
-
286
- export interface ISiteUserInfo extends ISiteUserProps {
287
- Expiration: string;
288
- IsEmailAuthenticationGuestUser: boolean;
289
- UserId: {
290
- NameId: string;
291
- NameIdIssuer: string;
292
- };
293
- UserPrincipalName: string | null;
294
- }
295
-
296
- export interface IAttachmentInfo {
297
- //EntityTypeName: string;
298
- FileName: string;
299
- FileNameAsPath: {
300
- DecodedUrl: string;
301
- };
302
- ServerRelativePath: {
303
- DecodedUrl: string;
304
- };
305
- ServerRelativeUrl: string;
306
- }
307
-
308
- export interface IWebInfo {
309
- AlternateCssUrl: string;
310
- AppInstanceId: string;
311
- ClassicWelcomePage: string | null;
312
- Configuration: number;
313
- Created: string;
314
- CurrentChangeToken: {
315
- StringValue: string;
316
- };
317
- CustomMasterUrl: string;
318
- Description: string;
319
- DesignPackageId: string;
320
- DocumentLibraryCalloutOfficeWebAppPreviewersDisabled: boolean;
321
- EnableMinimalDownload: boolean;
322
- FooterEmphasis: number;
323
- FooterEnabled: boolean;
324
- FooterLayout: number;
325
- HeaderEmphasis: number;
326
- HeaderLayout: number;
327
- HorizontalQuickLaunch: boolean;
328
- Id: string;
329
- IsHomepageModernized: boolean;
330
- IsMultilingual: boolean;
331
- IsRevertHomepageLinkHidden: boolean;
332
- Language: number;
333
- LastItemModifiedDate: string;
334
- LastItemUserModifiedDate: string;
335
- MasterUrl: string;
336
- MegaMenuEnabled: boolean;
337
- NavAudienceTargetingEnabled: boolean;
338
- NoCrawl: boolean;
339
- ObjectCacheEnabled: boolean;
340
- OverwriteTranslationsOnChange: boolean;
341
- QuickLaunchEnabled: boolean;
342
- RecycleBinEnabled: boolean;
343
- ResourcePath: {
344
- DecodedUrl: string;
345
- };
346
- SearchScope: number;
347
- ServerRelativeUrl: string;
348
- SiteLogoUrl: string | null;
349
- SyndicationEnabled: boolean;
350
- TenantAdminMembersCanShare: number;
351
- Title: string;
352
- TreeViewEnabled: boolean;
353
- UIVersion: number;
354
- UIVersionConfigurationEnabled: boolean;
355
- Url: string;
356
- /**STS, APP, WIKI, MPS, APPCATALOG, DEV, PWA, PWS, SPS, GROUP or other... */
357
- WebTemplate: "STS" | "APP" | "WIKI" | "MPS" | "APPCATALOG" | "DEV" | "PWA" | "PWS" | "SPS" | "GROUP" | string;
358
- WelcomePage: string;
359
- }
360
-
361
- export interface ISiteGroupInfo {
362
- AllowMembersEditMembership: boolean;
363
- AllowRequestToJoinLeave: boolean;
364
- AutoAcceptRequestToJoinLeave: boolean;
365
- Description: string;
366
- Id: number;
367
- IsHiddenInUI: boolean;
368
- LoginName: string;
369
- OnlyAllowMembersViewMembership: boolean;
370
- OwnerTitle: string;
371
- PrincipalType: PrincipalType.SharePointGroup;
372
- RequestToJoinLeaveEmailSetting: string | null;
373
- Title: string;
374
- }
375
-
376
- export interface IContentTypeInfo {
377
- Description: string;
378
- DisplayFormTemplateName: string;
379
- DisplayFormUrl: string;
380
- DocumentTemplate: string;
381
- DocumentTemplateUrl: string;
382
- EditFormTemplateName: string;
383
- EditFormUrl: string;
384
- Group: string;
385
- Hidden: boolean;
386
- Id: {
387
- StringValue: string;
388
- };
389
- JSLink: string;
390
- MobileDisplayFormUrl: string;
391
- MobileEditFormUrl: string;
392
- MobileNewFormUrl: string;
393
- Name: string;
394
- NewFormTemplateName: string;
395
- NewFormUrl: string;
396
- ReadOnly: boolean;
397
- SchemaXml: string;
398
- Scope: string;
399
- Sealed: boolean;
400
- StringId: string;
401
- }
402
-
403
- // eslint-disable-next-line no-shadow
404
- export enum ViewScope {
405
- DefaultValue = 0,
406
- Recursive = 1,
407
- RecursiveAll = 2,
408
- FilesOnly = 3
409
- }
410
-
411
- export interface IViewInfo {
412
- EditorModified: boolean;
413
- Formats: string | null;
414
- Hidden: boolean;
415
- HtmlSchemaXml: string;
416
- Id: string;
417
- ImageUrl: string;
418
- IncludeRootFolder: boolean;
419
- JSLink: string;
420
- ListViewXml: string;
421
- Method: string | null;
422
- MobileDefaultView: boolean;
423
- MobileView: boolean;
424
- ModerationType: string | null;
425
- NewDocumentTemplates: string;
426
- OrderedView: boolean;
427
- Paged: boolean;
428
- PersonalView: boolean;
429
- ReadOnlyView: boolean;
430
- RequiresClientIntegration: boolean;
431
- RowLimit: number;
432
- Scope: ViewScope;
433
- ServerRelativePath: {
434
- DecodedUrl: string;
435
- };
436
- ServerRelativeUrl: string;
437
- StyleId: string | null;
438
- TabularView: boolean;
439
- Threaded: boolean;
440
- Title: string;
441
- Toolbar: string;
442
- ToolbarTemplateName: string | null;
443
- ViewData: string | null;
444
- ViewJoins: string | null;
445
- ViewProjectedFields: {
446
- SchemaXml: string;
447
- } | null;
448
- ViewQuery: string;
449
- ViewType: string;
450
- VisualizationInfo: any | null;
451
- DefaultView?: boolean;
452
- }
453
-
454
- export interface ICamlQuery {
455
- /**
456
- * Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format.
457
- */
458
- DatesInUtc?: boolean;
459
- /**
460
- * Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned.
461
- */
462
- FolderServerRelativeUrl?: string;
463
- /**
464
- * Gets or sets a value that specifies the information required to get the next page of data for the list view.
465
- */
466
- ListItemCollectionPosition?: IListItemCollectionPosition;
467
- /**
468
- * Gets or sets value that specifies the XML schema that defines the list view.
469
- */
470
- ViewXml?: string;
471
- }
472
- /**
473
- * Specifies the information required to get the next page of data for a list view.
474
- */
475
- export interface IListItemCollectionPosition {
476
- /**
477
- * Gets or sets a value that specifies information, as name-value pairs, required to get the next page of data for a list view.
478
- */
479
- PagingInfo: string;
480
- }
481
-
482
- export interface IListInfo {
483
- AllowContentTypes: boolean;
484
- AllowDeletion: boolean;
485
- BaseTemplate: ListTemplateTypes;
486
- BaseType: BaseTypes;
487
- BrowserFileHandling: any;
488
- ContentTypes: any[];
489
- ContentTypesEnabled: boolean;
490
- CrawlNonDefaultViews: boolean;
491
- CreatablesInfo: any;
492
- Created: string;
493
- CurrentChangeToken: any;
494
- CustomActionElements: any[];
495
- DataSource: any;
496
- DefaultContentApprovalWorkflowId: string;
497
- DefaultDisplayFormUrl: string;
498
- DefaultEditFormUrl: string;
499
- DefaultNewFormUrl: string;
500
- DefaultView: any;
501
- DefaultViewPath: any;
502
- DefaultViewUrl: string;
503
- Description: string;
504
- DescriptionResource: any;
505
- Direction: string;
506
- DocumentTemplateUrl: string;
507
- DraftVersionVisibility: any;
508
- EffectiveBasePermissions: IBasePermissions;
509
- EffectiveBasePermissionsForUI: IBasePermissions;
510
- EnableAssignToEmail: boolean;
511
- EnableAttachments: boolean;
512
- EnableFolderCreation: boolean;
513
- EnableMinorVersions: boolean;
514
- EnableModeration: boolean;
515
- EnableRequestSignOff: boolean;
516
- EnableVersioning: boolean;
517
- EntityTypeName: string;
518
- EventReceivers: any[];
519
- ExcludeFromOfflineClient: boolean;
520
- ExemptFromBlockDownloadOfNonViewableFiles: boolean;
521
- Fields: Partial<IFieldInfo>[];
522
- FileSavePostProcessingEnabled: boolean;
523
- ForceCheckout: boolean;
524
- Forms: IFormInfo[];
525
- HasExternalDataSource: boolean;
526
- Hidden: boolean;
527
- Id: string;
528
- ImagePath: {
529
- DecodedUrl: string;
530
- };
531
- ImageUrl: string;
532
- InformationRightsManagementSettings: any[];
533
- IrmEnabled: boolean;
534
- IrmExpire: boolean;
535
- IrmReject: boolean;
536
- IsApplicationList: boolean;
537
- IsCatalog: boolean;
538
- IsPrivate: boolean;
539
- IsSiteAssetsLibrary: boolean;
540
- IsSystemList: boolean;
541
- ItemCount: number;
542
- LastItemDeletedDate: string;
543
- LastItemModifiedDate: string;
544
- LastItemUserModifiedDate: string;
545
- ListExperienceOptions: number;
546
- ListItemEntityTypeFullName: string;
547
- MajorVersionLimit: number;
548
- MajorWithMinorVersionsLimit: number;
549
- MultipleDataList: boolean;
550
- NoCrawl: boolean;
551
- OnQuickLaunch: boolean;
552
- ParentWebPath: {
553
- DecodedUrl: string;
554
- };
555
- ParentWebUrl: string;
556
- ParserDisabled: boolean;
557
- ReadSecurity: number;
558
- RootFolder: IFolderInfo;
559
- SchemaXml: string;
560
- ServerTemplateCanCreateFolders: boolean;
561
- TemplateFeatureId: string;
562
- Title: string;
563
- UserCustomActions: IUserCustomActionInfo[];
564
- ValidationFormula: string;
565
- ValidationMessage: string;
566
- Views: IViewInfo[];
567
- WorkflowAssociations: any[];
568
- WriteSecurity: number;
569
- }
570
-
571
- export interface IBasePermissions {
572
- Low: number;
573
- High: number;
574
- }
575
-
576
- export interface IFormInfo {
577
- FormType: PageType;
578
- Id: string;
579
- ResourcePath: {
580
- DecodedUrl: string;
581
- };
582
- DecodedUrl: string;
583
- ServerRelativeUrl: string;
584
- }
585
-
586
- export interface IFolderBasicInfo {
587
- Name: string;
588
- ServerRelativeUrl: string;
589
- }
590
- export interface IFolderInfo extends IFolderBasicInfo {
591
- readonly "odata.id": string;
592
- Exists: boolean;
593
- IsWOPIEnabled: boolean;
594
- ItemCount: number;
595
- ProgID: string | null;
596
- TimeCreated: string;
597
- TimeLastModified: string;
598
- UniqueId: string;
599
- WelcomePage: string;
600
- Folders?: IFolderInfo[]
601
- }
602
-
603
- // eslint-disable-next-line no-shadow
604
- export enum UserCustomActionRegistrationType {
605
- None = 0,
606
- List = 1,
607
- ContentType = 2,
608
- ProgId = 3,
609
- FileType = 4
610
- }
611
-
612
- // eslint-disable-next-line no-shadow
613
- export enum UserCustomActionScope {
614
- Unknown = 0,
615
- Site = 2,
616
- Web = 3,
617
- List = 4
618
- }
619
-
620
- export interface IUserCustomActionInfo {
621
- CommandUIExtension: string;
622
- Description: string;
623
- Group: string;
624
- Id: string;
625
- ImageUrl: string;
626
- Location: string;
627
- Name: string;
628
- RegistrationId: string;
629
- RegistrationType: UserCustomActionRegistrationType;
630
- Rights: IBasePermissions;
631
- Scope: UserCustomActionScope;
632
- ScriptBlock: string;
633
- ScriptSrc: string;
634
- Sequence: number;
635
- Title: string;
636
- Url: string;
637
- VersionOfUserCustomAction: string;
638
- }
639
-
640
- /**
641
- * Specifies the type of a principal. Use $PrincipalType when isolatedModules is true
642
- */
643
- // eslint-disable-next-line no-shadow
644
- export enum PrincipalType {
645
- /**
646
- * Enumeration whose value specifies no principal type.
647
- */
648
- None = 0,
649
- /**
650
- * Enumeration whose value specifies a user as the principal type.
651
- */
652
- User = 1,
653
- /**
654
- * Enumeration whose value specifies a distribution list as the principal type.
655
- */
656
- DistributionList = 2,
657
- /**
658
- * Enumeration whose value specifies a security group as the principal type.
659
- */
660
- SecurityGroup = 4,
661
- /**
662
- * Enumeration whose value specifies a group as the principal type.
663
- */
664
- SharePointGroup = 8,
665
- /**
666
- * Enumeration whose value specifies all principal types.
667
- */
668
- All = 15
669
- }
670
-
671
- /** PrincipalType enum values for projects that can't use enums (when isolatedModules is true)
672
- * @deprecated use PrincipalType
673
- */
674
- export const $PrincipalType = {
675
- /**
676
- * Enumeration whose value specifies no principal type.
677
- */
678
- None: PrincipalType.None,
679
- /**
680
- * Enumeration whose value specifies a user as the principal type.
681
- */
682
- User: PrincipalType.User,
683
- /**
684
- * Enumeration whose value specifies a distribution list as the principal type.
685
- */
686
- DistributionList: PrincipalType.DistributionList,
687
- /**
688
- * Enumeration whose value specifies a security group as the principal type.
689
- */
690
- SecurityGroup: PrincipalType.SecurityGroup,
691
- /**
692
- * Enumeration whose value specifies a group as the principal type.
693
- */
694
- SharePointGroup: PrincipalType.SharePointGroup,
695
- /**
696
- * Enumeration whose value specifies all principal types.
697
- */
698
- All: PrincipalType.All
699
- }
700
-
701
-
702
- // eslint-disable-next-line no-shadow
703
- export enum SPBasePermissionKind {
704
- /**
705
- * Has no permissions on the Site. Not available through the user interface.
706
- */
707
- EmptyMask = 0,
708
- /**
709
- * View items in lists, documents in document libraries, and Web discussion comments.
710
- */
711
- ViewListItems = 1,
712
- /**
713
- * Add items to lists, documents to document libraries, and Web discussion comments.
714
- */
715
- AddListItems = 2,
716
- /**
717
- * Edit items in lists, edit documents in document libraries, edit Web discussion comments
718
- * in documents, and customize Web Part Pages in document libraries.
719
- */
720
- EditListItems = 3,
721
- /**
722
- * Delete items from a list, documents from a document library, and Web discussion
723
- * comments in documents.
724
- */
725
- DeleteListItems = 4,
726
- /**
727
- * Approve a minor version of a list item or document.
728
- */
729
- ApproveItems = 5,
730
- /**
731
- * View the source of documents with server-side file handlers.
732
- */
733
- OpenItems = 6,
734
- /**
735
- * View past versions of a list item or document.
736
- */
737
- ViewVersions = 7,
738
- /**
739
- * Delete past versions of a list item or document.
740
- */
741
- DeleteVersions = 8,
742
- /**
743
- * Discard or check in a document which is checked out to another user.
744
- */
745
- CancelCheckout = 9,
746
- /**
747
- * Create, change, and delete personal views of lists.
748
- */
749
- ManagePersonalViews = 10,
750
- /**
751
- * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
752
- */
753
- ManageLists = 12,
754
- /**
755
- * View forms, views, and application pages, and enumerate lists.
756
- */
757
- ViewFormPages = 13,
758
- /**
759
- * Make content of a list or document library retrieveable for anonymous users through SharePoint search.
760
- * The list permissions in the site do not change.
761
- */
762
- AnonymousSearchAccessList = 14,
763
- /**
764
- * Allow users to open a Site, list, or folder to access items inside that container.
765
- */
766
- Open = 17,
767
- /**
768
- * View pages in a Site.
769
- */
770
- ViewPages = 18,
771
- /**
772
- * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using
773
- * a Windows SharePoint Services compatible editor.
774
- */
775
- AddAndCustomizePages = 19,
776
- /**
777
- * Apply a theme or borders to the entire Site.
778
- */
779
- ApplyThemeAndBorder = 20,
780
- /**
781
- * Apply a style sheet (.css file) to the Site.
782
- */
783
- ApplyStyleSheets = 21,
784
- /**
785
- * View reports on Site usage.
786
- */
787
- ViewUsageData = 22,
788
- /**
789
- * Create a Site using Self-Service Site Creation.
790
- */
791
- CreateSSCSite = 23,
792
- /**
793
- * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
794
- */
795
- ManageSubwebs = 24,
796
- /**
797
- * Create a group of users that can be used anywhere within the site collection.
798
- */
799
- CreateGroups = 25,
800
- /**
801
- * Create and change permission levels on the Site and assign permissions to users
802
- * and groups.
803
- */
804
- ManagePermissions = 26,
805
- /**
806
- * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer
807
- * and WebDAV interfaces.
808
- */
809
- BrowseDirectories = 27,
810
- /**
811
- * View information about users of the Site.
812
- */
813
- BrowseUserInfo = 28,
814
- /**
815
- * Add or remove personal Web Parts on a Web Part Page.
816
- */
817
- AddDelPrivateWebParts = 29,
818
- /**
819
- * Update Web Parts to display personalized information.
820
- */
821
- UpdatePersonalWebParts = 30,
822
- /**
823
- * Grant the ability to perform all administration tasks for the Site as well as
824
- * manage content, activate, deactivate, or edit properties of Site scoped Features
825
- * through the object model or through the user interface (UI). When granted on the
826
- * root Site of a Site Collection, activate, deactivate, or edit properties of
827
- * site collection scoped Features through the object model. To browse to the Site
828
- * Collection Features page and activate or deactivate Site Collection scoped Features
829
- * through the UI, you must be a Site Collection administrator.
830
- */
831
- ManageWeb = 31,
832
- /**
833
- * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through
834
- * SharePoint search if the list or document library has AnonymousSearchAccessList set.
835
- */
836
- AnonymousSearchAccessWebLists = 32,
837
- /**
838
- * Use features that launch client applications. Otherwise, users must work on documents
839
- * locally and upload changes.
840
- */
841
- UseClientIntegration = 37,
842
- /**
843
- * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.
844
- */
845
- UseRemoteAPIs = 38,
846
- /**
847
- * Manage alerts for all users of the Site.
848
- */
849
- ManageAlerts = 39,
850
- /**
851
- * Create e-mail alerts.
852
- */
853
- CreateAlerts = 40,
854
- /**
855
- * Allows a user to change his or her user information, such as adding a picture.
856
- */
857
- EditMyUserInfo = 41,
858
- /**
859
- * Enumerate permissions on Site, list, folder, document, or list item.
860
- */
861
- EnumeratePermissions = 63,
862
- /**
863
- * Has all permissions on the Site. Not available through the user interface.
864
- */
865
- FullMask = 65
866
- }
867
-
868
- export const SPBasePermissionMask = {
869
- EmptyMask: { High: 0x0, Low: 0x0 },
870
- ViewListItems: { High: 0x0, Low: 0x1 },
871
- AddListItems: { High: 0x0, Low: 0x2 },
872
- EditListItems: { High: 0x0, Low: 0x4 },
873
- DeleteListItems: { High: 0x0, Low: 0x8 },
874
- ApproveItems: { High: 0x0, Low: 0x10 },
875
- OpenItems: { High: 0x0, Low: 0x20 },
876
- ViewVersions: { High: 0x0, Low: 0x40 },
877
- DeleteVersions: { High: 0x0, Low: 0x80 },
878
- CancelCheckout: { High: 0x0, Low: 0x100 },
879
- ManagePersonalViews: { High: 0x0, Low: 0x200 },
880
- ManageLists: { High: 0x0, Low: 0x800 },
881
- ViewFormPages: { High: 0x0, Low: 0x1000 },
882
- Open: { High: 0x0, Low: 0x20000 },
883
- ViewPages: { High: 0x0, Low: 0x20000 },
884
- LayoutsPage: { High: 0x0, Low: 0x21000 },
885
- AddAndCustomizePages: { High: 0x0, Low: 0x40000 },
886
- ApplyThemeAndBorder: { High: 0x0, Low: 0x80000 },
887
- ApplyStyleSheets: { High: 0x0, Low: 0x100000 },
888
- ViewUsageData: { High: 0x0, Low: 0x200000 },
889
- CreateSSCSite: { High: 0x0, Low: 0x400000 },
890
- ManageSubwebs: { High: 0x0, Low: 0x800000 },
891
- CreateGroups: { High: 0x0, Low: 0x1000000 },
892
- ManagePermissions: { High: 0x0, Low: 0x2000000 },
893
- BrowseDirectories: { High: 0x0, Low: 0x4000000 },
894
- BrowserUserInfo: { High: 0x0, Low: 0x8000000 },
895
- AddDelPrivateWebParts: { High: 0x0, Low: 0x10000000 },
896
- UpdatePersonalWebParts: { High: 0x0, Low: 0x20000000 },
897
- ManageWeb: { High: 0x0, Low: 0x40000000 },
898
- UseClientIntegration: { High: 0x10, Low: 0x0 },
899
- UseRemoteAPIs: { High: 0x20, Low: 0x0 },
900
- ManageAlerts: { High: 0x40, Low: 0x0 },
901
- CreateAlerts: { High: 0x80, Low: 0x0 },
902
- EditMyUserInfo: { High: 0x100, Low: 0x0 },
903
- EnumeratePermissions: { High: 0x40000000, Low: 0x0 },
904
- FullMask: { High: 0x7FFFFFFF, Low: 0xFFFFFFFF }
905
- };
906
-
907
- // eslint-disable-next-line no-shadow
908
- export enum PersonSelectionMode {
909
- Users = 0,
910
- UsersAndGroups = 1
911
- }
912
-
913
- // eslint-disable-next-line no-shadow
914
- export enum ItemFormDialogResult {
915
- Closed = 0,
916
- Created = 1,
917
- Saved = 2
918
- }
919
-
920
- // eslint-disable-next-line no-shadow
921
- export enum FileSystemObjectTypes {
922
- ListItemOrFile = 0,
923
- Folder = 1
924
- }
925
-
926
- // eslint-disable-next-line no-shadow
927
- export enum SPFileSystemObjectType {
928
- invalid,
929
- file,
930
- folder,
931
- web,
932
- }
933
-
934
- export interface ISpfxBaseComponentContext {
935
- pageContext: {
936
- user: { email: string; };
937
- list: {
938
- title: string;
939
- id: { toString: () => string; };
940
- };
941
- web: {
942
- serverRelativeUrl: string;
943
- //used by taxonomy picker spfx pnp react
944
- absoluteUrl: string;
945
- //used by taxonomy picker spfx pnp react issue 8129
946
- language: number;
947
- id: { toString: () => string; };
948
- };
949
- //used by taxonomy picker spfx pnp react issue 886
950
- cultureInfo: {
951
- currentCultureName: string;
952
- currentUICultureName: string;
953
- isRightToLeft: boolean;
954
- };
955
- };
956
- //used by taxonomy picker spfx pnp react
957
- spHttpClient: {
958
- post: (url: string,
959
- configuration: any,
960
- postOptions: {
961
- body?: BodyInit;
962
- headers?: HeadersInit;
963
- }) => Promise<{ json: () => Promise<any>; }>;
964
- get: (url: string,
965
- configuration: any,
966
- postOptions: {
967
- body?: BodyInit;
968
- headers?: HeadersInit;
969
- }) => Promise<{ json: () => Promise<any>; }>;
970
- };
971
- }
972
-
973
- export interface ISettingsFormContext {
974
- webUrl: string;
975
- /** if we are configuring a specific list, this will have the list ID */
976
- listId?: string;
977
- /** context as we get it from the SPFx control */
978
- spfx: ISpfxBaseComponentContext;
979
- }
980
-
981
- // eslint-disable-next-line no-shadow
982
- export enum MissingOptionsType {
983
- /** No missing options */
984
- None = 0,
985
- /** Optional missing options, can render and load them later */
986
- MissingOptional = 1,
987
- /** Required missing options, cannot render until these options are loaded */
988
- MissingRequired = 2
989
- }
990
-
991
- export interface IItemFormContext {
992
- pageType: PageType;
993
- /** specify web ID, in case of working on a different web */
994
- webId?: string;
995
- listId: string;
996
- itemId?: number;
997
- /** optional, additional items to update */
998
- otherItems?: number[];
999
- /** optional, content type ID for a new item */
1000
- contentTypeId?: string;
1001
- /** optional, root folder to save the new item in */
1002
- rootFolder?: string;
1003
- context: ISpfxBaseComponentContext;
1004
- /** optional, if a custom action was clicked */
1005
- isInfoPane?: boolean;
1006
- /** optional, form is open in side panel */
1007
- isSidePanel?: boolean;
1008
- actionId?: string;
1009
- }
1010
-
1011
- /** Calculated - a calculated column created by the user. Computed - a system column, such as content type, edit menu, select column */
1012
- export type FieldTypeAsString = "Text" | "Note" | "Choice" | "MultiChoice" |
1013
- "Boolean" | "DateTime" | "User" | "UserMulti" | "Lookup" |
1014
- "LookupMulti" | "URL" | "Number" | "Currency" |
1015
- "TaxonomyFieldType" | "TaxonomyFieldTypeMulti" |
1016
- "Attachments" | "File" | "Calculated" | "Counter" | "Computed" |
1017
- "Geolocation" | "Recurrence" | "CrossProjectLink" | "AllDayEvent" | "Integer" |
1018
- /** OutcomeChoice from workflow task outcome modified PercentComplete and Stauts fields */
1019
- "OutcomeChoice" |
1020
- /** Thumbnail is an image field, see issue 7553 */
1021
- "Thumbnail"
1022
- |
1023
- /** Location field */
1024
- "Location";
1025
- export interface IFieldInfoEX extends IFieldInfo {
1026
- TypeAsString: FieldTypeAsString;
1027
- SchemaJson: IFieldJsonSchema;
1028
- OutputTypeAsString: FieldTypeAsString;
1029
- }
1030
- export interface IFieldInfoExHash { [InternalName: string]: IFieldInfoEX; }
1031
-
1032
- export interface IFieldContentType extends IFieldInfoEX {
1033
- Options: IContentTypeInfo[];
1034
- }
1035
- export interface IFieldNoteInfo extends IFieldInfoEX {
1036
- RichText: boolean;
1037
- NumberOfLines: number;
1038
- AppendOnly: boolean;
1039
- }
1040
- export interface IFieldUrlInfo extends IFieldInfoEX {
1041
- DisplayFormat: UrlFieldFormatType;
1042
- }
1043
- export interface IFieldLookupInfo extends IFieldInfoEX {
1044
- AllowMultipleValues: boolean;
1045
- LookupField: string;
1046
- LookupList: string;
1047
- LookupWebId: string;
1048
- }
1049
-
1050
- export interface IFieldUserInfo extends IFieldInfoEX {
1051
- AllowMultipleValues: boolean;
1052
- Presence: boolean;
1053
- SelectionMode: PersonSelectionMode;
1054
- SelectionGroup: number;
1055
- }
1056
- export interface IFieldDateTimeInfo extends IFieldInfoEX {
1057
- DisplayFormat: DateTimeFieldFormatType;
1058
- FriendlyDisplayFormat: DateTimeFieldFriendlyFormatType;
1059
- }
1060
- export interface IFieldTaxonomyInfo extends IFieldLookupInfo {
1061
- CreateValuesInEditForm: boolean;
1062
- IsAnchorValid: boolean;
1063
- IsKeyword: boolean;
1064
- IsPathRendered: boolean;
1065
- IsTermSetValid: boolean;
1066
- Open: boolean;
1067
- SspId: string;
1068
- TermSetId: string;
1069
- AnchorId: string;
1070
- /** The hidden text field id used to update multi value.
1071
- * Warning: Issue 7585 do not use this.
1072
- * Instead use UpdateMultiTaxonomyValue endpoint
1073
- */
1074
- TextField: string;
1075
- UserCreated: boolean;
1076
- /** The hidden text field internal name used to update multi value.
1077
- * Warning: Issue 7585 do not use this.
1078
- * Instead use UpdateMultiTaxonomyValue endpoint
1079
- */
1080
- HiddenMultiValueFieldName: string;
1081
- }
1082
- export interface IFieldNumberInfo extends IFieldInfoEX {
1083
- /** number of decimals to show. -1 for automatic. */
1084
- DisplayFormat: number;
1085
- ShowAsPercentage: boolean;
1086
- MinimumValue: number;
1087
- MaximumValue: number;
1088
- }
1089
- export interface IFieldCurrencyInfo extends IFieldNumberInfo {
1090
- CurrencyLocaleId: number;
1091
- }
1092
- export interface IFieldChoiceInfo extends IFieldInfoEX {
1093
- Choices: string[];
1094
- FillInChoice: boolean;
1095
- EditFormat: ChoiceFieldFormatType;
1096
- }
1097
-
1098
- export interface IFieldCalculatedInfo extends IFieldInfoEX {
1099
- OutputType: FieldTypes.Boolean | FieldTypes.Currency | FieldTypes.DateTime | FieldTypes.Number | FieldTypes.Text;
1100
- DateFormat?: DateTimeFieldFormatType;
1101
- ShowAsPercentage?: boolean;
1102
- }
1103
-
1104
- export type UrlValueType = { Url: string; Description?: string; };
1105
- export type TaxonomyValueType = { Label?: string; TermGuid?: string; WssId: number; };
1106
- export type ThumbnailValueType = {
1107
- type?: "thumbnail";
1108
- fileName: string;
1109
- fieldName?: string;
1110
- serverUrl: string;//example: "https://kwizcom.sharepoint.com"
1111
- serverRelativeUrl: string;//"/sites/n2/dvp/SiteAssets/Lists/6fb9e25a-a709-4ecd-aba1-e61efd8ec8e6/gas-chainsaw-20.jpg",
1112
- id: string;//guid, like "6698ff8d-8f08-4c58-a917-ed65a6cf53d0"
1113
- };
1114
-
1115
- export type RententionLabelFieldValueType = {
1116
- TagId: string;
1117
- TagName: string;
1118
- };
1119
-
1120
- // eslint-disable-next-line no-shadow
1121
- export enum RoleType {
1122
- none,
1123
- guest,
1124
- reader,
1125
- contributor,
1126
- webDesigner,
1127
- administrator,
1128
- editor
1129
- }
1130
-
1131
- // eslint-disable-next-line no-shadow
1132
- export enum SPEventReceiverTypes {
1133
- invalidReceiver = -1,
1134
- itemAdding = 1,
1135
- itemUpdating = 2,
1136
- itemDeleting = 3,
1137
- itemCheckingIn = 4,
1138
- itemCheckingOut = 5,
1139
- itemUncheckingOut = 6,
1140
- itemAttachmentAdding = 7,
1141
- itemAttachmentDeleting = 8,
1142
- itemFileMoving = 9,
1143
- itemVersionDeleting = 11,
1144
- fieldAdding = 101,
1145
- fieldUpdating = 102,
1146
- fieldDeleting = 103,
1147
- listAdding = 104,
1148
- listDeleting = 105,
1149
- siteDeleting = 201,
1150
- webDeleting = 202,
1151
- webMoving = 203,
1152
- webAdding = 204,
1153
- siteMovingFromGeoLocation = 206,
1154
- groupAdding = 301,
1155
- groupUpdating = 302,
1156
- groupDeleting = 303,
1157
- groupUserAdding = 304,
1158
- groupUserDeleting = 305,
1159
- roleDefinitionAdding = 306,
1160
- roleDefinitionUpdating = 307,
1161
- roleDefinitionDeleting = 308,
1162
- roleAssignmentAdding = 309,
1163
- roleAssignmentDeleting = 310,
1164
- inheritanceBreaking = 311,
1165
- inheritanceResetting = 312,
1166
- workflowStarting = 501,
1167
- itemAdded = 10001,
1168
- itemUpdated = 10002,
1169
- itemDeleted = 10003,
1170
- itemCheckedIn = 10004,
1171
- itemCheckedOut = 10005,
1172
- itemUncheckedOut = 10006,
1173
- itemAttachmentAdded = 10007,
1174
- itemAttachmentDeleted = 10008,
1175
- itemFileMoved = 10009,
1176
- itemFileConverted = 10010,
1177
- itemVersionDeleted = 10011,
1178
- fieldAdded = 10101,
1179
- fieldUpdated = 10102,
1180
- fieldDeleted = 10103,
1181
- listAdded = 10104,
1182
- listDeleted = 10105,
1183
- siteDeleted = 10201,
1184
- webDeleted = 10202,
1185
- webRestored = 10205,
1186
- webMoved = 10203,
1187
- webProvisioned = 10204,
1188
- groupAdded = 10301,
1189
- groupUpdated = 10302,
1190
- groupDeleted = 10303,
1191
- groupUserAdded = 10304,
1192
- groupUserDeleted = 10305,
1193
- roleDefinitionAdded = 10306,
1194
- roleDefinitionUpdated = 10307,
1195
- roleDefinitionDeleted = 10308,
1196
- roleAssignmentAdded = 10309,
1197
- roleAssignmentDeleted = 10310,
1198
- inheritanceBroken = 10311,
1199
- inheritanceReset = 10312,
1200
- workflowStarted = 10501,
1201
- workflowPostponed = 10502,
1202
- workflowCompleted = 10503,
1203
- entityInstanceAdded = 10601,
1204
- entityInstanceUpdated = 10602,
1205
- entityInstanceDeleted = 10603,
1206
- appInstalled = 10701,
1207
- appUpgraded = 10702,
1208
- appUninstalling = 10703,
1209
- emailReceived = 20000,
1210
- contextEvent = 32766
1211
- }
1212
-
1213
- export interface ISPEventReceiver {
1214
- EventType: SPEventReceiverTypes;
1215
- ReceiverAssembly: string;
1216
- ReceiverClass: string;
1217
- ReceiverId: string;
1218
- ReceiverName: string;
1219
- ReceiverUrl: string;
1220
- SequenceNumber: number;
1221
- Synchronization: number;
1222
- }
1223
-
1224
- export interface IContextWebInformation {
1225
- FormDigestTimeoutSeconds: number;
1226
- FormDigestValue: string;
1227
- LibraryVersion: string;
1228
- SiteFullUrl: string;
1229
- WebFullUrl: string;
1230
- }
1231
-
1232
- // eslint-disable-next-line no-shadow
1233
- export enum SPFxDisplayMode {
1234
- Read = 1,
1235
- Edit = 2,
1236
- }
1237
-
1238
- /** SharePoint calendar list item EventType */
1239
- // eslint-disable-next-line no-shadow
1240
- export enum SPCalendarEventType {
1241
- SingleEvent = 0,
1242
- RecurringEvent = 1,
1243
- /** A recurrence instance that was deleted */
1244
- RecurrenceDeleted = 3,
1245
- /** A recurrence instance that was modified */
1246
- RecurrenceException = 4
1247
- }
1248
-
1249
- // eslint-disable-next-line no-shadow
1250
- export enum SPDateTimeDisplayFormat {
1251
- DateOnly,
1252
- DateTime,
1253
- TimeOnly
1254
- }
1255
-
1256
- // eslint-disable-next-line no-shadow
1257
- export enum SPDateTimeCalendarType {
1258
- None,
1259
- Gregorian,
1260
- Japan,
1261
- Taiwan,
1262
- Korea,
1263
- Hijri,
1264
- Thai,
1265
- Hebrew,
1266
- GregorianMEFrench,
1267
- GregorianArabic,
1268
- GregorianXLITEnglish,
1269
- GregorianXLITFrench,
1270
- KoreaJapanLunar,
1271
- ChineseLunar,
1272
- SakaEra,
1273
- UmAlQura
1274
- }
1275
-
1276
- // eslint-disable-next-line no-shadow
1277
- export enum SPJsGridEditMode {
1278
- ReadOnly, // 0,
1279
- ReadWrite, // 1,
1280
- ReadOnlyDefer, // 2,
1281
- ReadWriteDefer, // 3,
1282
- Defer // 4
1283
- }
1284
-
1285
- //full name is SP.JsGrid.JsGridControl
1286
- export interface ISPJsGridControl {
1287
- GetColumns(optPaneId?: string): {
1288
- /** Column title */
1289
- name: string;
1290
- /** Column identifier */
1291
- columnKey: string;
1292
- /** this is used when you need to make some of the cells in the column readonly, but at the same time keep others editable */
1293
- fnGetCellEditMode: (record: any, fieldKey: string) => SPJsGridEditMode;
1294
- }[];
1295
- /** Hide the specified column from grid */
1296
- HideColumn(columnKey: string): void;
1297
- /** Show a previously hidden column at a specified position.
1298
- If atIdx is not defined, column will be shown at it's previous position. */
1299
- ShowColumn(columnKey: string, atIdx?: number): void;
1300
- }
1301
-
1302
- // eslint-disable-next-line no-shadow
1303
- export enum UserProfileBuiltinProperty {
1304
- Department = "Department",
1305
- DisplayName = "DisplayName",
1306
- Email = "Email",
1307
- FirstName = "FirstName",
1308
- HireDate = "HireDate",
1309
- JobTitle = "JobTitle",
1310
- Manager = "Manager",
1311
- MobilePhone = "MobilePhone",
1312
- Office = "Office",
1313
- Phone = "Phone",
1314
- WorkEmail = "WorkEmail",
1315
- WorkPhone = "WorkPhone"
1316
- }
1317
-
1318
- // eslint-disable-next-line no-shadow
1319
- export enum BuiltInFields {
1320
- Attachments = "Attachments",
1321
- AttachmentFiles = "AttachmentFiles"
1322
- }
1323
- export type AttachmentFilesRESTValue = {
1324
- results: {
1325
- FileName: string;
1326
- ServerRelativeUrl: string;
1327
- }[];
1328
- };
1329
-
1330
- interface _spPageContextInfo {
1331
- aadTenantId: string; // Tennatn ID
1332
- portalUrl: string;
1333
- alertsEnabled: boolean; // true
1334
- allowSilverlightPrompt: string; // "True"
1335
- blockDownloadsExperienceEnabled: boolean; // true
1336
- canUserCreateMicrosoftForm: boolean; // true
1337
- cdnPrefix: string; // "static.sharepointonline.com/bld"
1338
- clientServerTimeDelta: number; // -182
1339
- CorrelationId: string; // "6161f99d-10e5-4000-ad30-1016270fe31d"
1340
- crossDomainPhotosEnabled: boolean; // true
1341
- currentCultureName: string; // "ru-RU"
1342
- currentLanguage: number; // 1049
1343
- currentUICultureName: string; // "ru-RU"
1344
- disableAppViews: boolean; // true
1345
- disableFlows: boolean; // true
1346
- env: string; // "prod"
1347
- farmLabel: string; // "US_4_Content"
1348
- formDigestValue: string; // "0x5F3FE84E7EE9089C7D11DCDAFFB9E69CF8241E68B9EF071FA92CD419E878AC4F7C16E34696EFA667EFD0712FC1DF4945DDC0D09B5D23153A698A727AF076B5DE,07 Jun 2017 18:55:22 -0000"
1349
- formDigestTimeoutSeconds: number; // 1800
1350
- groupColor: string; // "#d40ac7"
1351
- groupHasHomepage: boolean; // true
1352
- groupId: string; //
1353
- guestsEnabled: boolean; // true
1354
- hasManageWebPermissions: boolean; // true
1355
- isAnonymousGuestUser: boolean; // true
1356
- isAppWeb: boolean; // true
1357
- isExternalGuestUser: boolean; // true
1358
- isNoScriptEnabled: boolean; // true
1359
- isSiteAdmin: boolean; // true
1360
- isSPO: boolean; // true
1361
- isTenantDevSite: boolean; // true
1362
- isWebWelcomePage: boolean; // true
1363
- layoutsUrl: string; // "_layouts/15"
1364
- listBaseTemplate: number; // 119
1365
- listId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1366
- listPermsMask: { High: number; Low: number };
1367
- listTitle: string; // "Site Pages"
1368
- listUrl: string; // "/sites/site/list"
1369
- maximumFileSize: number; // 15360
1370
- openInClient: boolean; // true
1371
- pageListId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1372
- pageItemId: number;
1373
- pagePermsMask: { High: number; Low: number };
1374
- pagePersonalizationScope: string; // 1
1375
- PreviewFeaturesEnabled: boolean; // true
1376
- preferUserTimeZone: boolean; // false
1377
- ProfileUrl: string; // "https://tenant-my.sharepoint.com/person.aspx"
1378
- PublishingFeatureOn: boolean; // true
1379
- RecycleBinItemCount: number; // -1
1380
- serverRedirectedUrl: string;
1381
- serverRequestPath: string; // "/SPTypeScript/Lists/ConditionalFormattingTasksList/AllItems.aspx"
1382
- serverTime: string; // "2017-06-07T18:55:22.3499459Z"
1383
- siteAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com"
1384
- siteClassification: string; //
1385
- siteClientTag: string; // "0$$15.0.4454.1021"
1386
- siteColor: string; // "#d40ac7"
1387
- siteId: string; // "{3e09a056-f68f-44a3-8e0f-ff2c123b82cb}"
1388
- sitePagesEnabled: boolean; // true
1389
- siteServerRelativeUrl: string; // "/"
1390
- siteSubscriptionId: string; // 4eedf5f3-f71f-4e73-82ee-e19081363c8c
1391
- supportPoundStorePath: boolean; // true
1392
- supportPercentStorePath: boolean; // true
1393
- systemUserKey: string; // "i:0h.f|membership|10033fff84e7cb2b@live.com"
1394
- tenantAppVersion: string; // "0"
1395
- themeCacheToken: string; // "/sites/site::0:16.0.6525.1206"
1396
- themedCssFolderUrl: string;
1397
- themedImageFileNames: string;
1398
- updateFormDigestPageLoaded: string; // "2017-06-07T18:55:25.821Z"
1399
- userDisplayName: string; // "John Doe"
1400
- userEmail: string; // "john.doe@fabrikam.onmicrosoft.com"
1401
- userId: number; // 12
1402
- userLoginName: string; // "john.doe@fabrikam.onmicrosoft.com"
1403
- userPrincipalName: string;
1404
- viewOnlyExperienceEnabled: boolean; // true
1405
- viewId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1406
- webAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com/SPTypeScript"
1407
- webDescription: string; // "Some description"
1408
- webId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1409
- webLanguage: number; // 1049
1410
- webLogoUrl: string; // "/_layouts/15/images/siteIcon.png?rev=23"
1411
- webPermMasks: { High: number; Low: number };
1412
- webServerRelativeUrl: string; // "/SPTypeScript"
1413
- webTemplate: string; // "17"
1414
- webTitle: string; // "SPTypeScript"
1415
- webUIVersion: number; // 15
1416
- }
1417
- declare global {
1418
- var _spPageContextInfo: _spPageContextInfo;
1419
- }
1420
-
1421
- export enum SPClientControlMode {
1422
- Invalid,
1423
- DisplayForm,
1424
- EditForm,
1425
- NewForm,
1426
- View
1427
- }
1428
-
1429
- export type IRententionLabel = {
1430
- AcceptMessagesOnlyFromSendersOrMembers: boolean;
1431
- AccessType: string;
1432
- AllowAccessFromUnmanagedDevice: string;
1433
- AutoDelete: boolean;
1434
- BlockDelete: boolean;
1435
- BlockEdit: boolean;
1436
- ComplianceFlags: number;
1437
- ContainsSiteLabel: boolean;
1438
- DisplayName: string;
1439
- EncryptionRMSTemplateId: string;
1440
- HasRetentionAction: boolean;
1441
- IsEventTag: boolean;
1442
- MultiStageReviewerEmail: string;
1443
- NextStageComplianceTag: string;
1444
- Notes: string;
1445
- RequireSenderAuthenticationEnabled: boolean;
1446
- ReviewerEmail: string;
1447
- SharingCapabilities: string;
1448
- SuperLock: boolean;
1449
- TagDuration: number;
1450
- TagId: string;
1451
- TagName: string;
1452
- TagRetentionBasedOn: string;
1453
- UnlockedAsDefault: boolean;
1454
- }
1455
-
1456
- export type spNavLinkLocation = "quicklaunch" | "topnavigationbar" | "none";
1457
-
1458
- export interface INavLinkInfo {
1459
- Id: number;
1460
- IsDocLib: boolean;
1461
- IsExternal: boolean;
1462
- IsVisible: boolean;
1463
- Title: string;
1464
- Url: string;
1465
- Location: spNavLinkLocation;
1
+ /** types for known OOB SharePoint objects - do not import */
2
+ //todo: Kevin - make a disctinction between this file and the utils.types file
3
+ //keep full SP objects here, move the ones our API created to the utils types
4
+ //have a consistent naming convention, usually I[]Info refers to our objects, but iList is our API object and IListInfo seems to be the full object
5
+ export interface IFieldJsonSchema {
6
+ Attributes: {
7
+ ID?: string;
8
+ Name?: string;
9
+ StaticName?: string;
10
+ [key: string]: string;
11
+ };
12
+ Customizations: { [PropertyName: string]: string; };
13
+ }
14
+
15
+ export interface IFieldJsonSchemaLookup extends IFieldJsonSchema {
16
+ Attributes: {
17
+ Mult?: "TRUE" | "FALSE";
18
+ WebId?: string;
19
+ List?: string;
20
+ ShowField?: string;
21
+ };
22
+ }
23
+
24
+ // eslint-disable-next-line no-shadow
25
+ export enum PageType {
26
+ Invalid = -1,
27
+ DefaultView = 0,
28
+ NormalView = 1,
29
+ DialogView = 2,
30
+ View = 3,
31
+ DisplayForm = 4,
32
+ DisplayFormDialog = 5,
33
+ EditForm = 6,
34
+ EditFormDialog = 7,
35
+ NewForm = 8,
36
+ NewFormDialog = 9,
37
+ SolutionForm = 10,
38
+ PAGE_MAXITEMS = 11
39
+ }
40
+
41
+ export interface IContentTypeInfo {
42
+ Description: string;
43
+ DisplayFormTemplateName: string;
44
+ DisplayFormUrl: string;
45
+ DocumentTemplate: string;
46
+ DocumentTemplateUrl: string;
47
+ EditFormTemplateName: string;
48
+ EditFormUrl: string;
49
+ Group: string;
50
+ Hidden: boolean;
51
+ Id: {
52
+ StringValue: string;
53
+ };
54
+ JSLink: string;
55
+ MobileDisplayFormUrl: string;
56
+ MobileEditFormUrl: string;
57
+ MobileNewFormUrl: string;
58
+ Name: string;
59
+ NewFormTemplateName: string;
60
+ NewFormUrl: string;
61
+ ReadOnly: boolean;
62
+ SchemaXml: string;
63
+ Scope: string;
64
+ Sealed: boolean;
65
+ StringId: string;
66
+ }
67
+
68
+ // eslint-disable-next-line no-shadow
69
+ export enum ChoiceFieldFormatType {
70
+ Dropdown = 0,
71
+ RadioButtons = 1
72
+ }
73
+
74
+ export interface IFieldInfo {
75
+ DefaultFormula: string | null;
76
+ DefaultValue: string | null;
77
+ Description: string;
78
+ //Direction: string;
79
+ EnforceUniqueValues: boolean;
80
+ //EntityPropertyName: string;
81
+ FieldTypeKind: FieldTypes;
82
+ //Filterable: boolean;
83
+ //FromBaseType: boolean;
84
+ Group: string;
85
+ Hidden: boolean;
86
+ Id: string;
87
+ Indexed: boolean;
88
+ //IndexStatus: number;
89
+ InternalName: string;
90
+ JSLink: string;
91
+ //PinnedToFiltersPane: boolean;
92
+ ReadOnlyField: boolean;
93
+ Required: boolean;
94
+ SchemaXml: string;
95
+ //Scope: string;
96
+ //Sealed: boolean;
97
+ //ShowInFiltersPane: number;
98
+ //Sortable: boolean;
99
+ StaticName: string;
100
+ Title: string;
101
+ TypeAsString: string | FieldTypeAsString;
102
+ ClientSideComponentProperties?: string;
103
+ ClientSideComponentId?: string;
104
+ //TypeDisplayName: string;
105
+ //TypeShortDescription: string;
106
+ //ValidationFormula: string | null;
107
+ //ValidationMessage: string | null;
108
+ }
109
+
110
+ // eslint-disable-next-line no-shadow
111
+ export enum DateTimeFieldFormatType {
112
+ DateOnly = 0,
113
+ DateTime = 1
114
+ }
115
+
116
+ // eslint-disable-next-line no-shadow
117
+ export enum DateTimeFieldFriendlyFormatType {
118
+ // Undefined. The default rendering will be used.
119
+ Unspecified = 0,
120
+ // The standard absolute representation will be used.
121
+ Disabled = 1,
122
+ // The standard friendly relative representation will be used (for example, "today at 3:00 PM").
123
+ Relative = 2
124
+ }
125
+
126
+ // eslint-disable-next-line no-shadow
127
+ export enum UrlFieldFormatType {
128
+ Hyperlink = 0,
129
+ Image = 1
130
+ }
131
+
132
+ // eslint-disable-next-line no-shadow
133
+ export enum FieldTypes {
134
+ Invalid = 0,
135
+ Integer = 1,
136
+ Text = 2,
137
+ Note = 3,
138
+ DateTime = 4,
139
+ Counter = 5,
140
+ Choice = 6,
141
+ Lookup = 7,
142
+ Boolean = 8,
143
+ Number = 9,
144
+ Currency = 10,
145
+ URL = 11,
146
+ Computed = 12,
147
+ Threading = 13,
148
+ Guid = 14,
149
+ MultiChoice = 15,
150
+ GridChoice = 16,
151
+ Calculated = 17,
152
+ File = 18,
153
+ Attachments = 19,
154
+ User = 20,
155
+ Recurrence = 21,
156
+ CrossProjectLink = 22,
157
+ ModStat = 23,
158
+ Error = 24,
159
+ ContentTypeId = 25,
160
+ PageSeparator = 26,
161
+ ThreadIndex = 27,
162
+ WorkflowStatus = 28,
163
+ AllDayEvent = 29,
164
+ WorkflowEventType = 30,
165
+ Geolocation = 31,
166
+ Location = 33
167
+ }
168
+
169
+ // eslint-disable-next-line no-shadow
170
+ export enum ListTemplateTypes {
171
+ AccessRequest = 160,
172
+ AdminTasks = 1200,
173
+ Agenda = 201,
174
+ Announcements = 104,
175
+ AppDataCatalog = 125,
176
+ CallTrack = 404,
177
+ Categories = 303,
178
+ Circulation = 405,
179
+ Comments = 302,
180
+ Contacts = 105,
181
+ CustomGrid = 120,
182
+ DataConnectionLibrary = 130,
183
+ DataSources = 110,
184
+ Decision = 204,
185
+ DesignCatalog = 124,
186
+ DeveloperSiteDraftApps = 1230,
187
+ DiscussionBoard = 108,
188
+ DocumentLibrary = 101,
189
+ Events = 106,
190
+ ExternalList = 600,
191
+ Facility = 402,
192
+ GanttTasks = 150,
193
+ GenericList = 100,
194
+ HealthReports = 1221,
195
+ HealthRules = 1220,
196
+ HelpLibrary = 151,
197
+ Holidays = 421,
198
+ HomePageLibrary = 212,
199
+ IMEDic = 499,
200
+ InvalidType = -1,
201
+ IssueTracking = 1100,
202
+ Links = 103,
203
+ ListTemplateCatalog = 114,
204
+ MaintenanceLogs = 175,
205
+ MasterPageCatalog = 116,
206
+ MeetingObjective = 207,
207
+ Meetings = 200,
208
+ MeetingUser = 202,
209
+ MySiteDocumentLibrary = 700,
210
+ NoCodePublic = 122,
211
+ NoCodeWorkflows = 117,
212
+ NoListTemplate = 0,
213
+ PictureLibrary = 109,
214
+ Posts = 301,
215
+ SolutionCatalog = 121,
216
+ Survey = 102,
217
+ Tasks = 107,
218
+ TasksWithTimelineAndHierarchy = 171,
219
+ TextBox = 210,
220
+ ThemeCatalog = 123,
221
+ ThingsToBring = 211,
222
+ Timecard = 420,
223
+ UserInformation = 112,
224
+ WebPageLibrary = 119,
225
+ WebPartCatalog = 113,
226
+ WebTemplateCatalog = 111,
227
+ Whereabouts = 403,
228
+ WorkflowHistory = 140,
229
+ WorkflowProcess = 118,
230
+ XMLForm = 115
231
+ }
232
+ // eslint-disable-next-line no-shadow
233
+ export enum BaseTypes {
234
+ DiscussionBoard = 3,
235
+ DocumentLibrary = 1,
236
+ GenericList = 0,
237
+ Issue = 5,
238
+ Survey = 4,
239
+ UnspecifiedBaseType = -1,
240
+ Unused = 2
241
+ }
242
+
243
+ export interface ISiteUserProps {
244
+ /**
245
+ * Contains Site user email
246
+ *
247
+ */
248
+ Email: string;
249
+ /**
250
+ * Contains Site user Id
251
+ *
252
+ */
253
+ Id: number;
254
+ /**
255
+ * Site user IsHiddenInUI
256
+ *
257
+ */
258
+ IsHiddenInUI: boolean;
259
+ /**
260
+ * Site user IsShareByEmailGuestUser
261
+ *
262
+ */
263
+ IsShareByEmailGuestUser: boolean;
264
+ /**
265
+ * Describes if Site user Is Site Admin
266
+ *
267
+ */
268
+ IsSiteAdmin: boolean;
269
+ /**
270
+ * Site user LoginName
271
+ *
272
+ */
273
+ LoginName: string;
274
+ /**
275
+ * Site user Principal type
276
+ *
277
+ */
278
+ PrincipalType: number | PrincipalType;
279
+ /**
280
+ * Site user Title
281
+ *
282
+ */
283
+ Title: string;
284
+ }
285
+
286
+ export interface ISiteUserInfo extends ISiteUserProps {
287
+ Expiration: string;
288
+ IsEmailAuthenticationGuestUser: boolean;
289
+ UserId: {
290
+ NameId: string;
291
+ NameIdIssuer: string;
292
+ };
293
+ UserPrincipalName: string | null;
294
+ }
295
+
296
+ export interface IAttachmentInfo {
297
+ //EntityTypeName: string;
298
+ FileName: string;
299
+ FileNameAsPath: {
300
+ DecodedUrl: string;
301
+ };
302
+ ServerRelativePath: {
303
+ DecodedUrl: string;
304
+ };
305
+ ServerRelativeUrl: string;
306
+ }
307
+
308
+ export interface IWebInfo {
309
+ AlternateCssUrl: string;
310
+ AppInstanceId: string;
311
+ ClassicWelcomePage: string | null;
312
+ Configuration: number;
313
+ Created: string;
314
+ CurrentChangeToken: {
315
+ StringValue: string;
316
+ };
317
+ CustomMasterUrl: string;
318
+ Description: string;
319
+ DesignPackageId: string;
320
+ DocumentLibraryCalloutOfficeWebAppPreviewersDisabled: boolean;
321
+ EnableMinimalDownload: boolean;
322
+ FooterEmphasis: number;
323
+ FooterEnabled: boolean;
324
+ FooterLayout: number;
325
+ HeaderEmphasis: number;
326
+ HeaderLayout: number;
327
+ HorizontalQuickLaunch: boolean;
328
+ Id: string;
329
+ IsHomepageModernized: boolean;
330
+ IsMultilingual: boolean;
331
+ IsRevertHomepageLinkHidden: boolean;
332
+ Language: number;
333
+ LastItemModifiedDate: string;
334
+ LastItemUserModifiedDate: string;
335
+ MasterUrl: string;
336
+ MegaMenuEnabled: boolean;
337
+ NavAudienceTargetingEnabled: boolean;
338
+ NoCrawl: boolean;
339
+ ObjectCacheEnabled: boolean;
340
+ OverwriteTranslationsOnChange: boolean;
341
+ QuickLaunchEnabled: boolean;
342
+ RecycleBinEnabled: boolean;
343
+ ResourcePath: {
344
+ DecodedUrl: string;
345
+ };
346
+ SearchScope: number;
347
+ ServerRelativeUrl: string;
348
+ SiteLogoUrl: string | null;
349
+ SyndicationEnabled: boolean;
350
+ TenantAdminMembersCanShare: number;
351
+ Title: string;
352
+ TreeViewEnabled: boolean;
353
+ UIVersion: number;
354
+ UIVersionConfigurationEnabled: boolean;
355
+ Url: string;
356
+ /**STS, APP, WIKI, MPS, APPCATALOG, DEV, PWA, PWS, SPS, GROUP or other... */
357
+ WebTemplate: "STS" | "APP" | "WIKI" | "MPS" | "APPCATALOG" | "DEV" | "PWA" | "PWS" | "SPS" | "GROUP" | string;
358
+ WelcomePage: string;
359
+ }
360
+
361
+ export interface ISiteGroupInfo {
362
+ AllowMembersEditMembership: boolean;
363
+ AllowRequestToJoinLeave: boolean;
364
+ AutoAcceptRequestToJoinLeave: boolean;
365
+ Description: string;
366
+ Id: number;
367
+ IsHiddenInUI: boolean;
368
+ LoginName: string;
369
+ OnlyAllowMembersViewMembership: boolean;
370
+ OwnerTitle: string;
371
+ PrincipalType: PrincipalType.SharePointGroup;
372
+ RequestToJoinLeaveEmailSetting: string | null;
373
+ Title: string;
374
+ }
375
+
376
+ export interface IContentTypeInfo {
377
+ Description: string;
378
+ DisplayFormTemplateName: string;
379
+ DisplayFormUrl: string;
380
+ DocumentTemplate: string;
381
+ DocumentTemplateUrl: string;
382
+ EditFormTemplateName: string;
383
+ EditFormUrl: string;
384
+ Group: string;
385
+ Hidden: boolean;
386
+ Id: {
387
+ StringValue: string;
388
+ };
389
+ JSLink: string;
390
+ MobileDisplayFormUrl: string;
391
+ MobileEditFormUrl: string;
392
+ MobileNewFormUrl: string;
393
+ Name: string;
394
+ NewFormTemplateName: string;
395
+ NewFormUrl: string;
396
+ ReadOnly: boolean;
397
+ SchemaXml: string;
398
+ Scope: string;
399
+ Sealed: boolean;
400
+ StringId: string;
401
+ }
402
+
403
+ // eslint-disable-next-line no-shadow
404
+ export enum ViewScope {
405
+ DefaultValue = 0,
406
+ Recursive = 1,
407
+ RecursiveAll = 2,
408
+ FilesOnly = 3
409
+ }
410
+
411
+ export interface IViewInfo {
412
+ EditorModified: boolean;
413
+ Formats: string | null;
414
+ Hidden: boolean;
415
+ HtmlSchemaXml: string;
416
+ Id: string;
417
+ ImageUrl: string;
418
+ IncludeRootFolder: boolean;
419
+ JSLink: string;
420
+ ListViewXml: string;
421
+ Method: string | null;
422
+ MobileDefaultView: boolean;
423
+ MobileView: boolean;
424
+ ModerationType: string | null;
425
+ NewDocumentTemplates: string;
426
+ OrderedView: boolean;
427
+ Paged: boolean;
428
+ PersonalView: boolean;
429
+ ReadOnlyView: boolean;
430
+ RequiresClientIntegration: boolean;
431
+ RowLimit: number;
432
+ Scope: ViewScope;
433
+ ServerRelativePath: {
434
+ DecodedUrl: string;
435
+ };
436
+ ServerRelativeUrl: string;
437
+ StyleId: string | null;
438
+ TabularView: boolean;
439
+ Threaded: boolean;
440
+ Title: string;
441
+ Toolbar: string;
442
+ ToolbarTemplateName: string | null;
443
+ ViewData: string | null;
444
+ ViewJoins: string | null;
445
+ ViewProjectedFields: {
446
+ SchemaXml: string;
447
+ } | null;
448
+ ViewQuery: string;
449
+ ViewType: string;
450
+ VisualizationInfo: any | null;
451
+ DefaultView?: boolean;
452
+ }
453
+
454
+ export interface ICamlQuery {
455
+ /**
456
+ * Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format.
457
+ */
458
+ DatesInUtc?: boolean;
459
+ /**
460
+ * Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned.
461
+ */
462
+ FolderServerRelativeUrl?: string;
463
+ /**
464
+ * Gets or sets a value that specifies the information required to get the next page of data for the list view.
465
+ */
466
+ ListItemCollectionPosition?: IListItemCollectionPosition;
467
+ /**
468
+ * Gets or sets value that specifies the XML schema that defines the list view.
469
+ */
470
+ ViewXml?: string;
471
+ }
472
+ /**
473
+ * Specifies the information required to get the next page of data for a list view.
474
+ */
475
+ export interface IListItemCollectionPosition {
476
+ /**
477
+ * Gets or sets a value that specifies information, as name-value pairs, required to get the next page of data for a list view.
478
+ */
479
+ PagingInfo: string;
480
+ }
481
+
482
+ export interface IListInfo {
483
+ AllowContentTypes: boolean;
484
+ AllowDeletion: boolean;
485
+ BaseTemplate: ListTemplateTypes;
486
+ BaseType: BaseTypes;
487
+ BrowserFileHandling: any;
488
+ ContentTypes: any[];
489
+ ContentTypesEnabled: boolean;
490
+ CrawlNonDefaultViews: boolean;
491
+ CreatablesInfo: any;
492
+ Created: string;
493
+ CurrentChangeToken: any;
494
+ CustomActionElements: any[];
495
+ DataSource: any;
496
+ DefaultContentApprovalWorkflowId: string;
497
+ DefaultDisplayFormUrl: string;
498
+ DefaultEditFormUrl: string;
499
+ DefaultNewFormUrl: string;
500
+ DefaultView: any;
501
+ DefaultViewPath: any;
502
+ DefaultViewUrl: string;
503
+ Description: string;
504
+ DescriptionResource: any;
505
+ Direction: string;
506
+ DocumentTemplateUrl: string;
507
+ DraftVersionVisibility: any;
508
+ EffectiveBasePermissions: IBasePermissions;
509
+ EffectiveBasePermissionsForUI: IBasePermissions;
510
+ EnableAssignToEmail: boolean;
511
+ EnableAttachments: boolean;
512
+ EnableFolderCreation: boolean;
513
+ EnableMinorVersions: boolean;
514
+ EnableModeration: boolean;
515
+ EnableRequestSignOff: boolean;
516
+ EnableVersioning: boolean;
517
+ EntityTypeName: string;
518
+ EventReceivers: any[];
519
+ ExcludeFromOfflineClient: boolean;
520
+ ExemptFromBlockDownloadOfNonViewableFiles: boolean;
521
+ Fields: Partial<IFieldInfo>[];
522
+ FileSavePostProcessingEnabled: boolean;
523
+ ForceCheckout: boolean;
524
+ Forms: IFormInfo[];
525
+ HasExternalDataSource: boolean;
526
+ Hidden: boolean;
527
+ Id: string;
528
+ ImagePath: {
529
+ DecodedUrl: string;
530
+ };
531
+ ImageUrl: string;
532
+ InformationRightsManagementSettings: any[];
533
+ IrmEnabled: boolean;
534
+ IrmExpire: boolean;
535
+ IrmReject: boolean;
536
+ IsApplicationList: boolean;
537
+ IsCatalog: boolean;
538
+ IsPrivate: boolean;
539
+ IsSiteAssetsLibrary: boolean;
540
+ IsSystemList: boolean;
541
+ ItemCount: number;
542
+ LastItemDeletedDate: string;
543
+ LastItemModifiedDate: string;
544
+ LastItemUserModifiedDate: string;
545
+ ListExperienceOptions: number;
546
+ ListItemEntityTypeFullName: string;
547
+ MajorVersionLimit: number;
548
+ MajorWithMinorVersionsLimit: number;
549
+ MultipleDataList: boolean;
550
+ NoCrawl: boolean;
551
+ OnQuickLaunch: boolean;
552
+ ParentWebPath: {
553
+ DecodedUrl: string;
554
+ };
555
+ ParentWebUrl: string;
556
+ ParserDisabled: boolean;
557
+ ReadSecurity: number;
558
+ RootFolder: IFolderInfo;
559
+ SchemaXml: string;
560
+ ServerTemplateCanCreateFolders: boolean;
561
+ TemplateFeatureId: string;
562
+ Title: string;
563
+ UserCustomActions: IUserCustomActionInfo[];
564
+ ValidationFormula: string;
565
+ ValidationMessage: string;
566
+ Views: IViewInfo[];
567
+ WorkflowAssociations: any[];
568
+ WriteSecurity: number;
569
+ }
570
+
571
+ export interface IBasePermissions {
572
+ Low: number;
573
+ High: number;
574
+ }
575
+
576
+ export interface IFormInfo {
577
+ FormType: PageType;
578
+ Id: string;
579
+ ResourcePath: {
580
+ DecodedUrl: string;
581
+ };
582
+ DecodedUrl: string;
583
+ ServerRelativeUrl: string;
584
+ }
585
+
586
+ export interface IFolderBasicInfo {
587
+ Name: string;
588
+ ServerRelativeUrl: string;
589
+ }
590
+ export interface IFolderInfo extends IFolderBasicInfo {
591
+ readonly "odata.id": string;
592
+ Exists: boolean;
593
+ IsWOPIEnabled: boolean;
594
+ ItemCount: number;
595
+ ProgID: string | null;
596
+ TimeCreated: string;
597
+ TimeLastModified: string;
598
+ UniqueId: string;
599
+ WelcomePage: string;
600
+ Folders?: IFolderInfo[]
601
+ }
602
+
603
+ // eslint-disable-next-line no-shadow
604
+ export enum UserCustomActionRegistrationType {
605
+ None = 0,
606
+ List = 1,
607
+ ContentType = 2,
608
+ ProgId = 3,
609
+ FileType = 4
610
+ }
611
+
612
+ // eslint-disable-next-line no-shadow
613
+ export enum UserCustomActionScope {
614
+ Unknown = 0,
615
+ Site = 2,
616
+ Web = 3,
617
+ List = 4
618
+ }
619
+
620
+ export interface IUserCustomActionInfo {
621
+ CommandUIExtension: string;
622
+ Description: string;
623
+ Group: string;
624
+ Id: string;
625
+ ImageUrl: string;
626
+ Location: string;
627
+ Name: string;
628
+ RegistrationId: string;
629
+ RegistrationType: UserCustomActionRegistrationType;
630
+ Rights: IBasePermissions;
631
+ Scope: UserCustomActionScope;
632
+ ScriptBlock: string;
633
+ ScriptSrc: string;
634
+ Sequence: number;
635
+ Title: string;
636
+ Url: string;
637
+ VersionOfUserCustomAction: string;
638
+ }
639
+
640
+ /**
641
+ * Specifies the type of a principal. Use $PrincipalType when isolatedModules is true
642
+ */
643
+ // eslint-disable-next-line no-shadow
644
+ export enum PrincipalType {
645
+ /**
646
+ * Enumeration whose value specifies no principal type.
647
+ */
648
+ None = 0,
649
+ /**
650
+ * Enumeration whose value specifies a user as the principal type.
651
+ */
652
+ User = 1,
653
+ /**
654
+ * Enumeration whose value specifies a distribution list as the principal type.
655
+ */
656
+ DistributionList = 2,
657
+ /**
658
+ * Enumeration whose value specifies a security group as the principal type.
659
+ */
660
+ SecurityGroup = 4,
661
+ /**
662
+ * Enumeration whose value specifies a group as the principal type.
663
+ */
664
+ SharePointGroup = 8,
665
+ /**
666
+ * Enumeration whose value specifies all principal types.
667
+ */
668
+ All = 15
669
+ }
670
+
671
+ /** PrincipalType enum values for projects that can't use enums (when isolatedModules is true)
672
+ * @deprecated use PrincipalType
673
+ */
674
+ export const $PrincipalType = {
675
+ /**
676
+ * Enumeration whose value specifies no principal type.
677
+ */
678
+ None: PrincipalType.None,
679
+ /**
680
+ * Enumeration whose value specifies a user as the principal type.
681
+ */
682
+ User: PrincipalType.User,
683
+ /**
684
+ * Enumeration whose value specifies a distribution list as the principal type.
685
+ */
686
+ DistributionList: PrincipalType.DistributionList,
687
+ /**
688
+ * Enumeration whose value specifies a security group as the principal type.
689
+ */
690
+ SecurityGroup: PrincipalType.SecurityGroup,
691
+ /**
692
+ * Enumeration whose value specifies a group as the principal type.
693
+ */
694
+ SharePointGroup: PrincipalType.SharePointGroup,
695
+ /**
696
+ * Enumeration whose value specifies all principal types.
697
+ */
698
+ All: PrincipalType.All
699
+ }
700
+
701
+
702
+ // eslint-disable-next-line no-shadow
703
+ export enum SPBasePermissionKind {
704
+ /**
705
+ * Has no permissions on the Site. Not available through the user interface.
706
+ */
707
+ EmptyMask = 0,
708
+ /**
709
+ * View items in lists, documents in document libraries, and Web discussion comments.
710
+ */
711
+ ViewListItems = 1,
712
+ /**
713
+ * Add items to lists, documents to document libraries, and Web discussion comments.
714
+ */
715
+ AddListItems = 2,
716
+ /**
717
+ * Edit items in lists, edit documents in document libraries, edit Web discussion comments
718
+ * in documents, and customize Web Part Pages in document libraries.
719
+ */
720
+ EditListItems = 3,
721
+ /**
722
+ * Delete items from a list, documents from a document library, and Web discussion
723
+ * comments in documents.
724
+ */
725
+ DeleteListItems = 4,
726
+ /**
727
+ * Approve a minor version of a list item or document.
728
+ */
729
+ ApproveItems = 5,
730
+ /**
731
+ * View the source of documents with server-side file handlers.
732
+ */
733
+ OpenItems = 6,
734
+ /**
735
+ * View past versions of a list item or document.
736
+ */
737
+ ViewVersions = 7,
738
+ /**
739
+ * Delete past versions of a list item or document.
740
+ */
741
+ DeleteVersions = 8,
742
+ /**
743
+ * Discard or check in a document which is checked out to another user.
744
+ */
745
+ CancelCheckout = 9,
746
+ /**
747
+ * Create, change, and delete personal views of lists.
748
+ */
749
+ ManagePersonalViews = 10,
750
+ /**
751
+ * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
752
+ */
753
+ ManageLists = 12,
754
+ /**
755
+ * View forms, views, and application pages, and enumerate lists.
756
+ */
757
+ ViewFormPages = 13,
758
+ /**
759
+ * Make content of a list or document library retrieveable for anonymous users through SharePoint search.
760
+ * The list permissions in the site do not change.
761
+ */
762
+ AnonymousSearchAccessList = 14,
763
+ /**
764
+ * Allow users to open a Site, list, or folder to access items inside that container.
765
+ */
766
+ Open = 17,
767
+ /**
768
+ * View pages in a Site.
769
+ */
770
+ ViewPages = 18,
771
+ /**
772
+ * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using
773
+ * a Windows SharePoint Services compatible editor.
774
+ */
775
+ AddAndCustomizePages = 19,
776
+ /**
777
+ * Apply a theme or borders to the entire Site.
778
+ */
779
+ ApplyThemeAndBorder = 20,
780
+ /**
781
+ * Apply a style sheet (.css file) to the Site.
782
+ */
783
+ ApplyStyleSheets = 21,
784
+ /**
785
+ * View reports on Site usage.
786
+ */
787
+ ViewUsageData = 22,
788
+ /**
789
+ * Create a Site using Self-Service Site Creation.
790
+ */
791
+ CreateSSCSite = 23,
792
+ /**
793
+ * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
794
+ */
795
+ ManageSubwebs = 24,
796
+ /**
797
+ * Create a group of users that can be used anywhere within the site collection.
798
+ */
799
+ CreateGroups = 25,
800
+ /**
801
+ * Create and change permission levels on the Site and assign permissions to users
802
+ * and groups.
803
+ */
804
+ ManagePermissions = 26,
805
+ /**
806
+ * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer
807
+ * and WebDAV interfaces.
808
+ */
809
+ BrowseDirectories = 27,
810
+ /**
811
+ * View information about users of the Site.
812
+ */
813
+ BrowseUserInfo = 28,
814
+ /**
815
+ * Add or remove personal Web Parts on a Web Part Page.
816
+ */
817
+ AddDelPrivateWebParts = 29,
818
+ /**
819
+ * Update Web Parts to display personalized information.
820
+ */
821
+ UpdatePersonalWebParts = 30,
822
+ /**
823
+ * Grant the ability to perform all administration tasks for the Site as well as
824
+ * manage content, activate, deactivate, or edit properties of Site scoped Features
825
+ * through the object model or through the user interface (UI). When granted on the
826
+ * root Site of a Site Collection, activate, deactivate, or edit properties of
827
+ * site collection scoped Features through the object model. To browse to the Site
828
+ * Collection Features page and activate or deactivate Site Collection scoped Features
829
+ * through the UI, you must be a Site Collection administrator.
830
+ */
831
+ ManageWeb = 31,
832
+ /**
833
+ * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through
834
+ * SharePoint search if the list or document library has AnonymousSearchAccessList set.
835
+ */
836
+ AnonymousSearchAccessWebLists = 32,
837
+ /**
838
+ * Use features that launch client applications. Otherwise, users must work on documents
839
+ * locally and upload changes.
840
+ */
841
+ UseClientIntegration = 37,
842
+ /**
843
+ * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.
844
+ */
845
+ UseRemoteAPIs = 38,
846
+ /**
847
+ * Manage alerts for all users of the Site.
848
+ */
849
+ ManageAlerts = 39,
850
+ /**
851
+ * Create e-mail alerts.
852
+ */
853
+ CreateAlerts = 40,
854
+ /**
855
+ * Allows a user to change his or her user information, such as adding a picture.
856
+ */
857
+ EditMyUserInfo = 41,
858
+ /**
859
+ * Enumerate permissions on Site, list, folder, document, or list item.
860
+ */
861
+ EnumeratePermissions = 63,
862
+ /**
863
+ * Has all permissions on the Site. Not available through the user interface.
864
+ */
865
+ FullMask = 65
866
+ }
867
+
868
+ export const SPBasePermissionMask = {
869
+ EmptyMask: { High: 0x0, Low: 0x0 },
870
+ ViewListItems: { High: 0x0, Low: 0x1 },
871
+ AddListItems: { High: 0x0, Low: 0x2 },
872
+ EditListItems: { High: 0x0, Low: 0x4 },
873
+ DeleteListItems: { High: 0x0, Low: 0x8 },
874
+ ApproveItems: { High: 0x0, Low: 0x10 },
875
+ OpenItems: { High: 0x0, Low: 0x20 },
876
+ ViewVersions: { High: 0x0, Low: 0x40 },
877
+ DeleteVersions: { High: 0x0, Low: 0x80 },
878
+ CancelCheckout: { High: 0x0, Low: 0x100 },
879
+ ManagePersonalViews: { High: 0x0, Low: 0x200 },
880
+ ManageLists: { High: 0x0, Low: 0x800 },
881
+ ViewFormPages: { High: 0x0, Low: 0x1000 },
882
+ Open: { High: 0x0, Low: 0x20000 },
883
+ ViewPages: { High: 0x0, Low: 0x20000 },
884
+ LayoutsPage: { High: 0x0, Low: 0x21000 },
885
+ AddAndCustomizePages: { High: 0x0, Low: 0x40000 },
886
+ ApplyThemeAndBorder: { High: 0x0, Low: 0x80000 },
887
+ ApplyStyleSheets: { High: 0x0, Low: 0x100000 },
888
+ ViewUsageData: { High: 0x0, Low: 0x200000 },
889
+ CreateSSCSite: { High: 0x0, Low: 0x400000 },
890
+ ManageSubwebs: { High: 0x0, Low: 0x800000 },
891
+ CreateGroups: { High: 0x0, Low: 0x1000000 },
892
+ ManagePermissions: { High: 0x0, Low: 0x2000000 },
893
+ BrowseDirectories: { High: 0x0, Low: 0x4000000 },
894
+ BrowserUserInfo: { High: 0x0, Low: 0x8000000 },
895
+ AddDelPrivateWebParts: { High: 0x0, Low: 0x10000000 },
896
+ UpdatePersonalWebParts: { High: 0x0, Low: 0x20000000 },
897
+ ManageWeb: { High: 0x0, Low: 0x40000000 },
898
+ UseClientIntegration: { High: 0x10, Low: 0x0 },
899
+ UseRemoteAPIs: { High: 0x20, Low: 0x0 },
900
+ ManageAlerts: { High: 0x40, Low: 0x0 },
901
+ CreateAlerts: { High: 0x80, Low: 0x0 },
902
+ EditMyUserInfo: { High: 0x100, Low: 0x0 },
903
+ EnumeratePermissions: { High: 0x40000000, Low: 0x0 },
904
+ FullMask: { High: 0x7FFFFFFF, Low: 0xFFFFFFFF }
905
+ };
906
+
907
+ // eslint-disable-next-line no-shadow
908
+ export enum PersonSelectionMode {
909
+ Users = 0,
910
+ UsersAndGroups = 1
911
+ }
912
+
913
+ // eslint-disable-next-line no-shadow
914
+ export enum ItemFormDialogResult {
915
+ Closed = 0,
916
+ Created = 1,
917
+ Saved = 2
918
+ }
919
+
920
+ // eslint-disable-next-line no-shadow
921
+ export enum FileSystemObjectTypes {
922
+ ListItemOrFile = 0,
923
+ Folder = 1
924
+ }
925
+
926
+ // eslint-disable-next-line no-shadow
927
+ export enum SPFileSystemObjectType {
928
+ invalid,
929
+ file,
930
+ folder,
931
+ web,
932
+ }
933
+
934
+ export interface ISpfxBaseComponentContext {
935
+ pageContext: {
936
+ user: { email: string; };
937
+ list: {
938
+ title: string;
939
+ id: { toString: () => string; };
940
+ };
941
+ web: {
942
+ serverRelativeUrl: string;
943
+ //used by taxonomy picker spfx pnp react
944
+ absoluteUrl: string;
945
+ //used by taxonomy picker spfx pnp react issue 8129
946
+ language: number;
947
+ id: { toString: () => string; };
948
+ };
949
+ //used by taxonomy picker spfx pnp react issue 886
950
+ cultureInfo: {
951
+ currentCultureName: string;
952
+ currentUICultureName: string;
953
+ isRightToLeft: boolean;
954
+ };
955
+ };
956
+ //used by taxonomy picker spfx pnp react
957
+ spHttpClient: {
958
+ post: (url: string,
959
+ configuration: any,
960
+ postOptions: {
961
+ body?: BodyInit;
962
+ headers?: HeadersInit;
963
+ }) => Promise<{ json: () => Promise<any>; }>;
964
+ get: (url: string,
965
+ configuration: any,
966
+ postOptions: {
967
+ body?: BodyInit;
968
+ headers?: HeadersInit;
969
+ }) => Promise<{ json: () => Promise<any>; }>;
970
+ };
971
+ }
972
+
973
+ export interface ISettingsFormContext {
974
+ webUrl: string;
975
+ /** if we are configuring a specific list, this will have the list ID */
976
+ listId?: string;
977
+ /** context as we get it from the SPFx control */
978
+ spfx: ISpfxBaseComponentContext;
979
+ }
980
+
981
+ // eslint-disable-next-line no-shadow
982
+ export enum MissingOptionsType {
983
+ /** No missing options */
984
+ None = 0,
985
+ /** Optional missing options, can render and load them later */
986
+ MissingOptional = 1,
987
+ /** Required missing options, cannot render until these options are loaded */
988
+ MissingRequired = 2
989
+ }
990
+
991
+ export interface IItemFormContext {
992
+ pageType: PageType;
993
+ /** specify web ID, in case of working on a different web */
994
+ webId?: string;
995
+ listId: string;
996
+ itemId?: number;
997
+ /** optional, additional items to update */
998
+ otherItems?: number[];
999
+ /** optional, content type ID for a new item */
1000
+ contentTypeId?: string;
1001
+ /** optional, root folder to save the new item in */
1002
+ rootFolder?: string;
1003
+ context: ISpfxBaseComponentContext;
1004
+ /** optional, if a custom action was clicked */
1005
+ isInfoPane?: boolean;
1006
+ /** optional, form is open in side panel */
1007
+ isSidePanel?: boolean;
1008
+ actionId?: string;
1009
+ }
1010
+
1011
+ /** Calculated - a calculated column created by the user. Computed - a system column, such as content type, edit menu, select column */
1012
+ export type FieldTypeAsString = "Text" | "Note" | "Choice" | "MultiChoice" |
1013
+ "Boolean" | "DateTime" | "User" | "UserMulti" | "Lookup" |
1014
+ "LookupMulti" | "URL" | "Number" | "Currency" |
1015
+ "TaxonomyFieldType" | "TaxonomyFieldTypeMulti" |
1016
+ "Attachments" | "File" | "Calculated" | "Counter" | "Computed" |
1017
+ "Geolocation" | "Recurrence" | "CrossProjectLink" | "AllDayEvent" | "Integer" |
1018
+ /** OutcomeChoice from workflow task outcome modified PercentComplete and Stauts fields */
1019
+ "OutcomeChoice" |
1020
+ /** Thumbnail is an image field, see issue 7553 */
1021
+ "Thumbnail"
1022
+ |
1023
+ /** Location field */
1024
+ "Location";
1025
+ export interface IFieldInfoEX extends IFieldInfo {
1026
+ TypeAsString: FieldTypeAsString;
1027
+ SchemaJson: IFieldJsonSchema;
1028
+ OutputTypeAsString: FieldTypeAsString;
1029
+ }
1030
+ export interface IFieldInfoExHash { [InternalName: string]: IFieldInfoEX; }
1031
+
1032
+ export interface IFieldContentType extends IFieldInfoEX {
1033
+ Options: IContentTypeInfo[];
1034
+ }
1035
+ export interface IFieldNoteInfo extends IFieldInfoEX {
1036
+ RichText: boolean;
1037
+ NumberOfLines: number;
1038
+ AppendOnly: boolean;
1039
+ }
1040
+ export interface IFieldUrlInfo extends IFieldInfoEX {
1041
+ DisplayFormat: UrlFieldFormatType;
1042
+ }
1043
+ export interface IFieldLookupInfo extends IFieldInfoEX {
1044
+ AllowMultipleValues: boolean;
1045
+ LookupField: string;
1046
+ LookupList: string;
1047
+ LookupWebId: string;
1048
+ }
1049
+
1050
+ export interface IFieldUserInfo extends IFieldInfoEX {
1051
+ AllowMultipleValues: boolean;
1052
+ Presence: boolean;
1053
+ SelectionMode: PersonSelectionMode;
1054
+ SelectionGroup: number;
1055
+ }
1056
+ export interface IFieldDateTimeInfo extends IFieldInfoEX {
1057
+ DisplayFormat: DateTimeFieldFormatType;
1058
+ FriendlyDisplayFormat: DateTimeFieldFriendlyFormatType;
1059
+ }
1060
+ export interface IFieldTaxonomyInfo extends IFieldLookupInfo {
1061
+ CreateValuesInEditForm: boolean;
1062
+ IsAnchorValid: boolean;
1063
+ IsKeyword: boolean;
1064
+ IsPathRendered: boolean;
1065
+ IsTermSetValid: boolean;
1066
+ Open: boolean;
1067
+ SspId: string;
1068
+ TermSetId: string;
1069
+ AnchorId: string;
1070
+ /** The hidden text field id used to update multi value.
1071
+ * Warning: Issue 7585 do not use this.
1072
+ * Instead use UpdateMultiTaxonomyValue endpoint
1073
+ */
1074
+ TextField: string;
1075
+ UserCreated: boolean;
1076
+ /** The hidden text field internal name used to update multi value.
1077
+ * Warning: Issue 7585 do not use this.
1078
+ * Instead use UpdateMultiTaxonomyValue endpoint
1079
+ */
1080
+ HiddenMultiValueFieldName: string;
1081
+ }
1082
+ export interface IFieldNumberInfo extends IFieldInfoEX {
1083
+ /** number of decimals to show. -1 for automatic. */
1084
+ DisplayFormat: number;
1085
+ ShowAsPercentage: boolean;
1086
+ MinimumValue: number;
1087
+ MaximumValue: number;
1088
+ }
1089
+ export interface IFieldCurrencyInfo extends IFieldNumberInfo {
1090
+ CurrencyLocaleId: number;
1091
+ }
1092
+ export interface IFieldChoiceInfo extends IFieldInfoEX {
1093
+ Choices: string[];
1094
+ FillInChoice: boolean;
1095
+ EditFormat: ChoiceFieldFormatType;
1096
+ }
1097
+
1098
+ export interface IFieldCalculatedInfo extends IFieldInfoEX {
1099
+ OutputType: FieldTypes.Boolean | FieldTypes.Currency | FieldTypes.DateTime | FieldTypes.Number | FieldTypes.Text;
1100
+ DateFormat?: DateTimeFieldFormatType;
1101
+ ShowAsPercentage?: boolean;
1102
+ }
1103
+
1104
+ export type UrlValueType = { Url: string; Description?: string; };
1105
+ export type TaxonomyValueType = { Label?: string; TermGuid?: string; WssId: number; };
1106
+ export type ThumbnailValueType = {
1107
+ type?: "thumbnail";
1108
+ fileName: string;
1109
+ fieldName?: string;
1110
+ serverUrl: string;//example: "https://kwizcom.sharepoint.com"
1111
+ serverRelativeUrl: string;//"/sites/n2/dvp/SiteAssets/Lists/6fb9e25a-a709-4ecd-aba1-e61efd8ec8e6/gas-chainsaw-20.jpg",
1112
+ id: string;//guid, like "6698ff8d-8f08-4c58-a917-ed65a6cf53d0"
1113
+ };
1114
+
1115
+ export type RententionLabelFieldValueType = {
1116
+ TagId: string;
1117
+ TagName: string;
1118
+ };
1119
+
1120
+ // eslint-disable-next-line no-shadow
1121
+ export enum RoleType {
1122
+ none,
1123
+ guest,
1124
+ reader,
1125
+ contributor,
1126
+ webDesigner,
1127
+ administrator,
1128
+ editor
1129
+ }
1130
+
1131
+ // eslint-disable-next-line no-shadow
1132
+ export enum SPEventReceiverTypes {
1133
+ invalidReceiver = -1,
1134
+ itemAdding = 1,
1135
+ itemUpdating = 2,
1136
+ itemDeleting = 3,
1137
+ itemCheckingIn = 4,
1138
+ itemCheckingOut = 5,
1139
+ itemUncheckingOut = 6,
1140
+ itemAttachmentAdding = 7,
1141
+ itemAttachmentDeleting = 8,
1142
+ itemFileMoving = 9,
1143
+ itemVersionDeleting = 11,
1144
+ fieldAdding = 101,
1145
+ fieldUpdating = 102,
1146
+ fieldDeleting = 103,
1147
+ listAdding = 104,
1148
+ listDeleting = 105,
1149
+ siteDeleting = 201,
1150
+ webDeleting = 202,
1151
+ webMoving = 203,
1152
+ webAdding = 204,
1153
+ siteMovingFromGeoLocation = 206,
1154
+ groupAdding = 301,
1155
+ groupUpdating = 302,
1156
+ groupDeleting = 303,
1157
+ groupUserAdding = 304,
1158
+ groupUserDeleting = 305,
1159
+ roleDefinitionAdding = 306,
1160
+ roleDefinitionUpdating = 307,
1161
+ roleDefinitionDeleting = 308,
1162
+ roleAssignmentAdding = 309,
1163
+ roleAssignmentDeleting = 310,
1164
+ inheritanceBreaking = 311,
1165
+ inheritanceResetting = 312,
1166
+ workflowStarting = 501,
1167
+ itemAdded = 10001,
1168
+ itemUpdated = 10002,
1169
+ itemDeleted = 10003,
1170
+ itemCheckedIn = 10004,
1171
+ itemCheckedOut = 10005,
1172
+ itemUncheckedOut = 10006,
1173
+ itemAttachmentAdded = 10007,
1174
+ itemAttachmentDeleted = 10008,
1175
+ itemFileMoved = 10009,
1176
+ itemFileConverted = 10010,
1177
+ itemVersionDeleted = 10011,
1178
+ fieldAdded = 10101,
1179
+ fieldUpdated = 10102,
1180
+ fieldDeleted = 10103,
1181
+ listAdded = 10104,
1182
+ listDeleted = 10105,
1183
+ siteDeleted = 10201,
1184
+ webDeleted = 10202,
1185
+ webRestored = 10205,
1186
+ webMoved = 10203,
1187
+ webProvisioned = 10204,
1188
+ groupAdded = 10301,
1189
+ groupUpdated = 10302,
1190
+ groupDeleted = 10303,
1191
+ groupUserAdded = 10304,
1192
+ groupUserDeleted = 10305,
1193
+ roleDefinitionAdded = 10306,
1194
+ roleDefinitionUpdated = 10307,
1195
+ roleDefinitionDeleted = 10308,
1196
+ roleAssignmentAdded = 10309,
1197
+ roleAssignmentDeleted = 10310,
1198
+ inheritanceBroken = 10311,
1199
+ inheritanceReset = 10312,
1200
+ workflowStarted = 10501,
1201
+ workflowPostponed = 10502,
1202
+ workflowCompleted = 10503,
1203
+ entityInstanceAdded = 10601,
1204
+ entityInstanceUpdated = 10602,
1205
+ entityInstanceDeleted = 10603,
1206
+ appInstalled = 10701,
1207
+ appUpgraded = 10702,
1208
+ appUninstalling = 10703,
1209
+ emailReceived = 20000,
1210
+ contextEvent = 32766
1211
+ }
1212
+
1213
+ export interface ISPEventReceiver {
1214
+ EventType: SPEventReceiverTypes;
1215
+ ReceiverAssembly: string;
1216
+ ReceiverClass: string;
1217
+ ReceiverId: string;
1218
+ ReceiverName: string;
1219
+ ReceiverUrl: string;
1220
+ SequenceNumber: number;
1221
+ Synchronization: number;
1222
+ }
1223
+
1224
+ export interface IContextWebInformation {
1225
+ FormDigestTimeoutSeconds: number;
1226
+ FormDigestValue: string;
1227
+ LibraryVersion: string;
1228
+ SiteFullUrl: string;
1229
+ WebFullUrl: string;
1230
+ }
1231
+
1232
+ // eslint-disable-next-line no-shadow
1233
+ export enum SPFxDisplayMode {
1234
+ Read = 1,
1235
+ Edit = 2,
1236
+ }
1237
+
1238
+ /** SharePoint calendar list item EventType */
1239
+ // eslint-disable-next-line no-shadow
1240
+ export enum SPCalendarEventType {
1241
+ SingleEvent = 0,
1242
+ RecurringEvent = 1,
1243
+ /** A recurrence instance that was deleted */
1244
+ RecurrenceDeleted = 3,
1245
+ /** A recurrence instance that was modified */
1246
+ RecurrenceException = 4
1247
+ }
1248
+
1249
+ // eslint-disable-next-line no-shadow
1250
+ export enum SPDateTimeDisplayFormat {
1251
+ DateOnly,
1252
+ DateTime,
1253
+ TimeOnly
1254
+ }
1255
+
1256
+ // eslint-disable-next-line no-shadow
1257
+ export enum SPDateTimeCalendarType {
1258
+ None,
1259
+ Gregorian,
1260
+ Japan,
1261
+ Taiwan,
1262
+ Korea,
1263
+ Hijri,
1264
+ Thai,
1265
+ Hebrew,
1266
+ GregorianMEFrench,
1267
+ GregorianArabic,
1268
+ GregorianXLITEnglish,
1269
+ GregorianXLITFrench,
1270
+ KoreaJapanLunar,
1271
+ ChineseLunar,
1272
+ SakaEra,
1273
+ UmAlQura
1274
+ }
1275
+
1276
+ // eslint-disable-next-line no-shadow
1277
+ export enum SPJsGridEditMode {
1278
+ ReadOnly, // 0,
1279
+ ReadWrite, // 1,
1280
+ ReadOnlyDefer, // 2,
1281
+ ReadWriteDefer, // 3,
1282
+ Defer // 4
1283
+ }
1284
+
1285
+ //full name is SP.JsGrid.JsGridControl
1286
+ export interface ISPJsGridControl {
1287
+ GetColumns(optPaneId?: string): {
1288
+ /** Column title */
1289
+ name: string;
1290
+ /** Column identifier */
1291
+ columnKey: string;
1292
+ /** this is used when you need to make some of the cells in the column readonly, but at the same time keep others editable */
1293
+ fnGetCellEditMode: (record: any, fieldKey: string) => SPJsGridEditMode;
1294
+ }[];
1295
+ /** Hide the specified column from grid */
1296
+ HideColumn(columnKey: string): void;
1297
+ /** Show a previously hidden column at a specified position.
1298
+ If atIdx is not defined, column will be shown at it's previous position. */
1299
+ ShowColumn(columnKey: string, atIdx?: number): void;
1300
+ }
1301
+
1302
+ // eslint-disable-next-line no-shadow
1303
+ export enum UserProfileBuiltinProperty {
1304
+ Department = "Department",
1305
+ DisplayName = "DisplayName",
1306
+ Email = "Email",
1307
+ FirstName = "FirstName",
1308
+ HireDate = "HireDate",
1309
+ JobTitle = "JobTitle",
1310
+ Manager = "Manager",
1311
+ MobilePhone = "MobilePhone",
1312
+ Office = "Office",
1313
+ Phone = "Phone",
1314
+ WorkEmail = "WorkEmail",
1315
+ WorkPhone = "WorkPhone"
1316
+ }
1317
+
1318
+ // eslint-disable-next-line no-shadow
1319
+ export enum BuiltInFields {
1320
+ Attachments = "Attachments",
1321
+ AttachmentFiles = "AttachmentFiles"
1322
+ }
1323
+ export type AttachmentFilesRESTValue = {
1324
+ results: {
1325
+ FileName: string;
1326
+ ServerRelativeUrl: string;
1327
+ }[];
1328
+ };
1329
+
1330
+ interface _spPageContextInfo {
1331
+ aadTenantId: string; // Tennatn ID
1332
+ portalUrl: string;
1333
+ alertsEnabled: boolean; // true
1334
+ allowSilverlightPrompt: string; // "True"
1335
+ blockDownloadsExperienceEnabled: boolean; // true
1336
+ canUserCreateMicrosoftForm: boolean; // true
1337
+ cdnPrefix: string; // "static.sharepointonline.com/bld"
1338
+ clientServerTimeDelta: number; // -182
1339
+ CorrelationId: string; // "6161f99d-10e5-4000-ad30-1016270fe31d"
1340
+ crossDomainPhotosEnabled: boolean; // true
1341
+ currentCultureName: string; // "ru-RU"
1342
+ currentLanguage: number; // 1049
1343
+ currentUICultureName: string; // "ru-RU"
1344
+ disableAppViews: boolean; // true
1345
+ disableFlows: boolean; // true
1346
+ env: string; // "prod"
1347
+ farmLabel: string; // "US_4_Content"
1348
+ formDigestValue: string; // "0x5F3FE84E7EE9089C7D11DCDAFFB9E69CF8241E68B9EF071FA92CD419E878AC4F7C16E34696EFA667EFD0712FC1DF4945DDC0D09B5D23153A698A727AF076B5DE,07 Jun 2017 18:55:22 -0000"
1349
+ formDigestTimeoutSeconds: number; // 1800
1350
+ groupColor: string; // "#d40ac7"
1351
+ groupHasHomepage: boolean; // true
1352
+ groupId: string; //
1353
+ guestsEnabled: boolean; // true
1354
+ hasManageWebPermissions: boolean; // true
1355
+ isAnonymousGuestUser: boolean; // true
1356
+ isAppWeb: boolean; // true
1357
+ isExternalGuestUser: boolean; // true
1358
+ isNoScriptEnabled: boolean; // true
1359
+ isSiteAdmin: boolean; // true
1360
+ isSPO: boolean; // true
1361
+ isTenantDevSite: boolean; // true
1362
+ isWebWelcomePage: boolean; // true
1363
+ layoutsUrl: string; // "_layouts/15"
1364
+ listBaseTemplate: number; // 119
1365
+ listId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1366
+ listPermsMask: { High: number; Low: number };
1367
+ listTitle: string; // "Site Pages"
1368
+ listUrl: string; // "/sites/site/list"
1369
+ maximumFileSize: number; // 15360
1370
+ openInClient: boolean; // true
1371
+ pageListId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1372
+ pageItemId: number;
1373
+ pagePermsMask: { High: number; Low: number };
1374
+ pagePersonalizationScope: string; // 1
1375
+ PreviewFeaturesEnabled: boolean; // true
1376
+ preferUserTimeZone: boolean; // false
1377
+ ProfileUrl: string; // "https://tenant-my.sharepoint.com/person.aspx"
1378
+ PublishingFeatureOn: boolean; // true
1379
+ RecycleBinItemCount: number; // -1
1380
+ serverRedirectedUrl: string;
1381
+ serverRequestPath: string; // "/SPTypeScript/Lists/ConditionalFormattingTasksList/AllItems.aspx"
1382
+ serverTime: string; // "2017-06-07T18:55:22.3499459Z"
1383
+ siteAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com"
1384
+ siteClassification: string; //
1385
+ siteClientTag: string; // "0$$15.0.4454.1021"
1386
+ siteColor: string; // "#d40ac7"
1387
+ siteId: string; // "{3e09a056-f68f-44a3-8e0f-ff2c123b82cb}"
1388
+ sitePagesEnabled: boolean; // true
1389
+ siteServerRelativeUrl: string; // "/"
1390
+ siteSubscriptionId: string; // 4eedf5f3-f71f-4e73-82ee-e19081363c8c
1391
+ supportPoundStorePath: boolean; // true
1392
+ supportPercentStorePath: boolean; // true
1393
+ systemUserKey: string; // "i:0h.f|membership|10033fff84e7cb2b@live.com"
1394
+ tenantAppVersion: string; // "0"
1395
+ themeCacheToken: string; // "/sites/site::0:16.0.6525.1206"
1396
+ themedCssFolderUrl: string;
1397
+ themedImageFileNames: string;
1398
+ updateFormDigestPageLoaded: string; // "2017-06-07T18:55:25.821Z"
1399
+ userDisplayName: string; // "John Doe"
1400
+ userEmail: string; // "john.doe@fabrikam.onmicrosoft.com"
1401
+ userId: number; // 12
1402
+ userLoginName: string; // "john.doe@fabrikam.onmicrosoft.com"
1403
+ userPrincipalName: string;
1404
+ viewOnlyExperienceEnabled: boolean; // true
1405
+ viewId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1406
+ webAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com/SPTypeScript"
1407
+ webDescription: string; // "Some description"
1408
+ webId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
1409
+ webLanguage: number; // 1049
1410
+ webLogoUrl: string; // "/_layouts/15/images/siteIcon.png?rev=23"
1411
+ webPermMasks: { High: number; Low: number };
1412
+ webServerRelativeUrl: string; // "/SPTypeScript"
1413
+ webTemplate: string; // "17"
1414
+ webTitle: string; // "SPTypeScript"
1415
+ webUIVersion: number; // 15
1416
+ }
1417
+ declare global {
1418
+ var _spPageContextInfo: _spPageContextInfo;
1419
+ }
1420
+
1421
+ export enum SPClientControlMode {
1422
+ Invalid,
1423
+ DisplayForm,
1424
+ EditForm,
1425
+ NewForm,
1426
+ View
1427
+ }
1428
+
1429
+ export type IRententionLabel = {
1430
+ AcceptMessagesOnlyFromSendersOrMembers: boolean;
1431
+ AccessType: string;
1432
+ AllowAccessFromUnmanagedDevice: string;
1433
+ AutoDelete: boolean;
1434
+ BlockDelete: boolean;
1435
+ BlockEdit: boolean;
1436
+ ComplianceFlags: number;
1437
+ ContainsSiteLabel: boolean;
1438
+ DisplayName: string;
1439
+ EncryptionRMSTemplateId: string;
1440
+ HasRetentionAction: boolean;
1441
+ IsEventTag: boolean;
1442
+ MultiStageReviewerEmail: string;
1443
+ NextStageComplianceTag: string;
1444
+ Notes: string;
1445
+ RequireSenderAuthenticationEnabled: boolean;
1446
+ ReviewerEmail: string;
1447
+ SharingCapabilities: string;
1448
+ SuperLock: boolean;
1449
+ TagDuration: number;
1450
+ TagId: string;
1451
+ TagName: string;
1452
+ TagRetentionBasedOn: string;
1453
+ UnlockedAsDefault: boolean;
1454
+ }
1455
+
1456
+ export type spNavLinkLocation = "quicklaunch" | "topnavigationbar" | "none";
1457
+
1458
+ export interface INavLinkInfo {
1459
+ Id: number;
1460
+ IsDocLib: boolean;
1461
+ IsExternal: boolean;
1462
+ IsVisible: boolean;
1463
+ Title: string;
1464
+ Url: string;
1465
+ Location: spNavLinkLocation;
1466
1466
  }