@kwiz/common 1.0.129 → 1.0.132

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 (100) hide show
  1. package/.github/workflows/npm-publish.yml +24 -24
  2. package/LICENSE +21 -21
  3. package/lib/cjs/config.js +2 -0
  4. package/lib/cjs/config.js.map +1 -1
  5. package/lib/cjs/types/libs/msal.types.js +26 -26
  6. package/lib/cjs/utils/sharepoint.rest/user.js +11 -11
  7. package/lib/esm/config.js +2 -0
  8. package/lib/esm/config.js.map +1 -1
  9. package/lib/esm/types/libs/msal.types.js +26 -26
  10. package/lib/esm/utils/sharepoint.rest/user.js +11 -11
  11. package/lib/types/config.d.ts +2 -0
  12. package/package.json +81 -81
  13. package/readme.md +17 -17
  14. package/src/_dependencies.ts +12 -12
  15. package/src/config.ts +19 -17
  16. package/src/helpers/Guid.ts +181 -181
  17. package/src/helpers/base64.ts +173 -173
  18. package/src/helpers/browser.test.js +13 -13
  19. package/src/helpers/browser.ts +1504 -1504
  20. package/src/helpers/browserinfo.ts +292 -292
  21. package/src/helpers/collections.base.test.js +25 -25
  22. package/src/helpers/collections.base.ts +437 -437
  23. package/src/helpers/collections.ts +107 -107
  24. package/src/helpers/color.ts +54 -54
  25. package/src/helpers/cookies.ts +59 -59
  26. package/src/helpers/date.test.js +119 -119
  27. package/src/helpers/date.ts +188 -188
  28. package/src/helpers/debug.ts +186 -186
  29. package/src/helpers/diagrams.ts +43 -43
  30. package/src/helpers/emails.ts +6 -6
  31. package/src/helpers/eval.ts +5 -5
  32. package/src/helpers/file.test.js +50 -50
  33. package/src/helpers/file.ts +63 -63
  34. package/src/helpers/flatted.ts +149 -149
  35. package/src/helpers/functions.ts +16 -16
  36. package/src/helpers/graph/calendar.types.ts +10 -10
  37. package/src/helpers/http.ts +69 -69
  38. package/src/helpers/images.ts +22 -22
  39. package/src/helpers/json.ts +44 -44
  40. package/src/helpers/md5.ts +189 -189
  41. package/src/helpers/objects.test.js +33 -33
  42. package/src/helpers/objects.ts +274 -274
  43. package/src/helpers/promises.test.js +37 -37
  44. package/src/helpers/promises.ts +165 -165
  45. package/src/helpers/random.ts +27 -27
  46. package/src/helpers/scheduler/scheduler.test.js +103 -103
  47. package/src/helpers/scheduler/scheduler.ts +131 -131
  48. package/src/helpers/sharepoint.ts +796 -796
  49. package/src/helpers/strings.test.js +122 -122
  50. package/src/helpers/strings.ts +337 -337
  51. package/src/helpers/typecheckers.test.js +34 -34
  52. package/src/helpers/typecheckers.ts +266 -266
  53. package/src/helpers/url.test.js +43 -43
  54. package/src/helpers/url.ts +207 -207
  55. package/src/helpers/urlhelper.ts +111 -111
  56. package/src/index.ts +6 -6
  57. package/src/types/auth.ts +62 -62
  58. package/src/types/common.types.ts +15 -15
  59. package/src/types/flatted.types.ts +59 -59
  60. package/src/types/globals.types.ts +6 -6
  61. package/src/types/graph/calendar.types.ts +80 -80
  62. package/src/types/knownscript.types.ts +18 -18
  63. package/src/types/libs/datajs.types.ts +28 -28
  64. package/src/types/libs/ics.types.ts +30 -30
  65. package/src/types/libs/msal.types.ts +57 -57
  66. package/src/types/locales.ts +125 -125
  67. package/src/types/localstoragecache.types.ts +8 -8
  68. package/src/types/location.types.ts +27 -27
  69. package/src/types/moment.ts +11 -11
  70. package/src/types/regex.types.ts +16 -16
  71. package/src/types/rest.types.ts +95 -95
  72. package/src/types/sharepoint.types.ts +1466 -1466
  73. package/src/types/sharepoint.utils.types.ts +306 -306
  74. package/src/utils/auth/common.ts +118 -118
  75. package/src/utils/auth/discovery.test.js +12 -12
  76. package/src/utils/auth/discovery.ts +132 -132
  77. package/src/utils/base64.ts +27 -27
  78. package/src/utils/consolelogger.ts +333 -333
  79. package/src/utils/date.ts +172 -172
  80. package/src/utils/emails.ts +24 -24
  81. package/src/utils/knownscript.ts +286 -286
  82. package/src/utils/localstoragecache.ts +446 -446
  83. package/src/utils/rest.ts +501 -501
  84. package/src/utils/script.ts +170 -170
  85. package/src/utils/sharepoint.rest/common.ts +159 -159
  86. package/src/utils/sharepoint.rest/date.ts +62 -62
  87. package/src/utils/sharepoint.rest/file.folder.ts +685 -685
  88. package/src/utils/sharepoint.rest/item.ts +547 -547
  89. package/src/utils/sharepoint.rest/list.ts +1572 -1572
  90. package/src/utils/sharepoint.rest/listutils/GetListItemsByCaml.ts +774 -774
  91. package/src/utils/sharepoint.rest/listutils/GetListItemsById.ts +275 -275
  92. package/src/utils/sharepoint.rest/listutils/common.ts +206 -206
  93. package/src/utils/sharepoint.rest/location.ts +141 -141
  94. package/src/utils/sharepoint.rest/navigation-links.ts +86 -86
  95. package/src/utils/sharepoint.rest/user-search.ts +252 -252
  96. package/src/utils/sharepoint.rest/user.ts +558 -558
  97. package/src/utils/sharepoint.rest/web.ts +1384 -1384
  98. package/src/utils/sod.ts +194 -194
  99. package/.madgerc +0 -3
  100. package/fix-folder-imports.js +0 -27
@@ -1,307 +1,307 @@
1
- /** types for KWIZ sharepoint API */
2
- import { IDictionary } from "./common.types";
3
- import { AttachmentFilesRESTValue, BaseTypes, FileSystemObjectTypes, IFieldInfoEX, ISPEventReceiver, ListTemplateTypes, PrincipalType, RoleType } from "./sharepoint.types";
4
-
5
- export interface ISiteInfo { Id: string; ServerRelativeUrl: string; }
6
- export interface IRootWebInfo { Id: string; ServerRelativeUrl: string; }
7
-
8
- export interface ISPRestError {
9
- code: string;
10
- message: string;
11
- }
12
-
13
- export interface IUserInfo {
14
- Id: number;
15
- LoginName: string;
16
- UserPrincipalName: string;
17
- Title: string;
18
- IsSiteAdmin: boolean;
19
- Email: string;
20
- Groups?: IUserGroupInfo[];
21
- PrincipalType: PrincipalType;
22
- }
23
- export interface IUserGroupInfo {
24
- Id: number;
25
- LoginName: string;
26
- Title: string;
27
- Description: string;
28
- }
29
-
30
- export interface IGroupInfo {
31
- Id: number;
32
- Title: string;
33
- Description: string;
34
- CanCurrentUserViewMembership: boolean;
35
- OnlyAllowMembersViewMembership: boolean;
36
- LoginName: string;
37
- Users?: IUserInfo[];
38
- PrincipalType: PrincipalType.SharePointGroup;
39
- IsHiddenInUI?: boolean;
40
- OwnerTitle?: string;
41
- }
42
-
43
- // eslint-disable-next-line no-shadow
44
- export enum ListExperienceOptions {
45
- Default = 0,
46
- Modern = 1,
47
- Classic = 2
48
- }
49
-
50
- export interface iList {
51
- Title: string;
52
- Description: string;
53
- EnableAttachments: boolean;
54
- EnableModeration: boolean;
55
- BaseTemplate: ListTemplateTypes;
56
- BaseType: BaseTypes;
57
- Id: string;
58
- Hidden: boolean;
59
- IsApplicationList: boolean;
60
- IsPrivate: boolean;
61
- IsCatalog: boolean;
62
- ImageUrl: string;
63
- ItemCount: number;
64
- ParentWebUrl: string;
65
- EntityTypeName: string;
66
- DefaultViewUrl: string;
67
- ParentWeb: { Id: string; Title: string; };
68
- Views?: iListView[];
69
- ContentTypes?: iContentType[];
70
- EffectiveBasePermissions: { High: number; Low: number; },
71
- RootFolder?: {
72
- ServerRelativeUrl: string;
73
- Name: string;
74
- };
75
- EventReceivers?: ISPEventReceiver[];
76
- ListExperienceOptions?: ListExperienceOptions;
77
- }
78
-
79
- export enum DraftVisibilityType {
80
- Reader = 0,
81
- /** default */
82
- Author = 1,
83
- /** approvers, and the person who submitted the draft */
84
- Approver = 2
85
- }
86
-
87
- export interface iListVersionSettings {
88
- /** saving creates a draft */
89
- EnableMinorVersions: boolean;
90
- /** @deprecated versioning is enabled. (this is now always on in M365 libraries) */
91
- EnableVersioning: boolean;
92
- DraftVersionVisibility: DraftVisibilityType;
93
- MajorWithMinorVersionsLimit: number;
94
- MajorVersionLimit: number;
95
- EnableModeration: boolean;
96
- }
97
-
98
- export interface iListView {
99
- Title: string;
100
- Id: string;
101
- ServerRelativeUrl: string;
102
- RowLimit: number;
103
- Paged: boolean;
104
- ViewQuery: string;
105
- ListViewXml: string;
106
- PersonalView: boolean;
107
- MobileView: boolean;
108
- MobileDefaultView: boolean;
109
- Hidden: boolean;
110
- DefaultView: boolean;
111
- ReadOnlyView: boolean;
112
- ViewFields?: string[];
113
- }
114
-
115
- export interface IListWorkflowAssociation {
116
- AllowManual: boolean;
117
- BaseId: string;//guid
118
- Created: string;
119
- Description: string;
120
- Enabled: boolean;
121
- HistoryListTitle: string;
122
- Id: string;//guid
123
- InstantiationUrl?: string;
124
- InternalName: string;
125
- IsDeclarative: boolean;
126
- ListId: string;//guid
127
- Modified: string;
128
- Name: string;
129
- RunningInstances: number;
130
- TaskListTitle: string;
131
- WebId: string;//guid
132
- }
133
-
134
- export interface iContentType {
135
- Name: string;
136
- Description: string;
137
- StringId: string;
138
- Group: string;
139
- Hidden: boolean;
140
- ReadOnly: boolean;
141
- NewFormUrl: string;
142
- DisplayFormUrl: string;
143
- EditFormUrl: string;
144
- Fields?: IFieldInfoEX[];
145
- Sealed: boolean;
146
- MobileNewFormUrl: string;
147
- MobileDisplayFormUrl: string;
148
- MobileEditFormUrl: string;
149
- NewFormTemplateName: string;
150
- DisplayFormTemplateName: string;
151
- EditFormTemplateName: string;
152
- }
153
-
154
- // eslint-disable-next-line no-shadow
155
- export enum WebTypes {
156
- Team = 0,
157
- Group = 1,
158
- App = 2,
159
- Other = 3
160
- }
161
- export interface IWebBasicInfo {
162
- Title: string;
163
- ServerRelativeUrl: string;
164
- WebId: string;
165
- /**STS, APP, WIKI, MPS, APPCATALOG, DEV, PWA, PWS, SPS, GROUP or other... */
166
- WebTemplate: "STS" | "APP" | "WIKI" | "MPS" | "APPCATALOG" | "DEV" | "PWA" | "PWS" | "SPS" | "GROUP" | string;
167
- WebType: WebTypes;
168
- Description?: string;
169
- SiteLogoUrl?: string;
170
- }
171
-
172
- export interface IRestRoleDefinition {
173
- BasePermissions: { High: number; Low: number; };
174
- Description: string;
175
- Hidden: boolean;
176
- Id: number;
177
- Name: string;
178
- Order: number;
179
- RoleTypeKind: RoleType;
180
- }
181
-
182
- export interface IAppTile {
183
- Title: string;
184
- ProductId: string;
185
- }
186
-
187
- export interface IFileInfo {
188
- Exists: boolean;
189
- Name: string;
190
- ServerRelativeUrl: string;
191
- TimeCreated: Date;
192
- TimeLastModified: Date;
193
- Title: string;
194
- Level: FileLevel;
195
- }
196
-
197
- export interface IFileInfoWithModerationStatus extends IFileInfo {
198
- ListItemAllFields?: {
199
- OData__ModerationStatus?: ModerationStatus
200
- }
201
- }
202
-
203
- export interface ITimeZone {
204
- Description: string;
205
- Id: number;
206
- Information: { Bias: number; DaylightBias: number; StandardBias: number; };
207
- }
208
-
209
- // eslint-disable-next-line no-shadow
210
- export enum GeListItemsFoldersBehaviour { AllItemsNoFolders, ItemsAndFoldersFlat, ItemsInsideFolders }
211
-
212
- export interface IRestItem {
213
- Id: number;
214
- FileRef: string;
215
- FileDirRef: string;
216
- FileLeafRef: string;
217
- /** file type (lower case) or 'folder' or 'listitem' */
218
- FileType: 'folder' | 'listitem' | string;
219
- /** Folder=1, list item=0 */
220
- FileSystemObjectType: FileSystemObjectTypes;
221
- [InternalName: string]: any;
222
- FieldValuesAsText?: IDictionary<string>;
223
- FieldValuesForEdit?: IDictionary<any>;
224
- AttachmentFiles?: AttachmentFilesRESTValue;
225
-
226
- /** File name (no extension) for files or folders, Title for list items or 'Item #ID' for items with an empty title */
227
- __DisplayTitle: string;
228
- /** For a folder, this will have items inside the folder */
229
- __Items?: IRestItem[];
230
- /** For an item inside a folder, this will be the parent folder */
231
- __ParentFolder?: IRestItem;
232
- }
233
-
234
- export interface IRestItemExpandedLookupValue {
235
- Id: number;
236
- Title: string;
237
- }
238
-
239
- export type UserEntityValueType = {
240
- principalType: PrincipalType.User | PrincipalType.SecurityGroup | PrincipalType.SharePointGroup;
241
- spId: number;
242
- loginOrPrincipalName?: string;
243
- /** not saved in settings. pre-loaded when loading settings. */
244
- title?: string;
245
- /** not saved in settings. pre-loaded when loading settings. */
246
- email?: string;
247
- };
248
-
249
- export interface IWebRegionalSettings {
250
- AdjustHijriDays: number;
251
- AlternateCalendarType: number;
252
- AM: string;
253
- CalendarType: number;
254
- Collation: number;
255
- CollationLCID: number;
256
- DateFormat: number;
257
- DateSeparator: string;
258
- DecimalSeparator: string;
259
- DigitGrouping: string;
260
- FirstDayOfWeek: number;
261
- FirstWeekOfYear: number;
262
- IsEastAsia: boolean;
263
- IsRightToLeft: boolean;
264
- IsUIRightToLeft: boolean;
265
- ListSeparator: string;
266
- LocaleId: number;
267
- NegativeSign: string;
268
- NegNumberMode: number;
269
- PM: string;
270
- PositiveSign: string;
271
- ShowWeeks: boolean;
272
- ThousandSeparator: string;
273
- Time24: boolean;
274
- TimeMarkerPosition: number;
275
- TimeSeparator: string;
276
- WorkDayEndHour: number;
277
- WorkDays: number;
278
- WorkDayStartHour: number;
279
- }
280
-
281
- /**
282
- * Specifies the moderation status for a file/item (https://learn.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wssfo3/4342322d-6fab-4dc5-8ccd-b808a5e25acf)
283
- */
284
- export enum ModerationStatus {
285
- /** The list item is approved. */
286
- Approved,
287
- /** The list item has been denied approval. */
288
- Rejected,
289
- /** The list item is pending approval. */
290
- Pending,
291
- /** The list item is in the draft or checked out state. */
292
- Draft,
293
- /** The list item is scheduled for automatic approval at a future date. */
294
- Scheduled
295
- }
296
-
297
- /**
298
- * Specifies the publishing level for a file (https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-visio/jj246272(v=office.15))
299
- */
300
- export enum FileLevel {
301
- /** Enumeration whose values specify whether the file is a published version. */
302
- Published = 1,
303
- /** Enumeration whose values specify whether the file is a draft.. */
304
- Draft = 2,
305
- /** Enumeration whose values specify whether the file is checked out to the current user. */
306
- Checkout = 255
1
+ /** types for KWIZ sharepoint API */
2
+ import { IDictionary } from "./common.types";
3
+ import { AttachmentFilesRESTValue, BaseTypes, FileSystemObjectTypes, IFieldInfoEX, ISPEventReceiver, ListTemplateTypes, PrincipalType, RoleType } from "./sharepoint.types";
4
+
5
+ export interface ISiteInfo { Id: string; ServerRelativeUrl: string; }
6
+ export interface IRootWebInfo { Id: string; ServerRelativeUrl: string; }
7
+
8
+ export interface ISPRestError {
9
+ code: string;
10
+ message: string;
11
+ }
12
+
13
+ export interface IUserInfo {
14
+ Id: number;
15
+ LoginName: string;
16
+ UserPrincipalName: string;
17
+ Title: string;
18
+ IsSiteAdmin: boolean;
19
+ Email: string;
20
+ Groups?: IUserGroupInfo[];
21
+ PrincipalType: PrincipalType;
22
+ }
23
+ export interface IUserGroupInfo {
24
+ Id: number;
25
+ LoginName: string;
26
+ Title: string;
27
+ Description: string;
28
+ }
29
+
30
+ export interface IGroupInfo {
31
+ Id: number;
32
+ Title: string;
33
+ Description: string;
34
+ CanCurrentUserViewMembership: boolean;
35
+ OnlyAllowMembersViewMembership: boolean;
36
+ LoginName: string;
37
+ Users?: IUserInfo[];
38
+ PrincipalType: PrincipalType.SharePointGroup;
39
+ IsHiddenInUI?: boolean;
40
+ OwnerTitle?: string;
41
+ }
42
+
43
+ // eslint-disable-next-line no-shadow
44
+ export enum ListExperienceOptions {
45
+ Default = 0,
46
+ Modern = 1,
47
+ Classic = 2
48
+ }
49
+
50
+ export interface iList {
51
+ Title: string;
52
+ Description: string;
53
+ EnableAttachments: boolean;
54
+ EnableModeration: boolean;
55
+ BaseTemplate: ListTemplateTypes;
56
+ BaseType: BaseTypes;
57
+ Id: string;
58
+ Hidden: boolean;
59
+ IsApplicationList: boolean;
60
+ IsPrivate: boolean;
61
+ IsCatalog: boolean;
62
+ ImageUrl: string;
63
+ ItemCount: number;
64
+ ParentWebUrl: string;
65
+ EntityTypeName: string;
66
+ DefaultViewUrl: string;
67
+ ParentWeb: { Id: string; Title: string; };
68
+ Views?: iListView[];
69
+ ContentTypes?: iContentType[];
70
+ EffectiveBasePermissions: { High: number; Low: number; },
71
+ RootFolder?: {
72
+ ServerRelativeUrl: string;
73
+ Name: string;
74
+ };
75
+ EventReceivers?: ISPEventReceiver[];
76
+ ListExperienceOptions?: ListExperienceOptions;
77
+ }
78
+
79
+ export enum DraftVisibilityType {
80
+ Reader = 0,
81
+ /** default */
82
+ Author = 1,
83
+ /** approvers, and the person who submitted the draft */
84
+ Approver = 2
85
+ }
86
+
87
+ export interface iListVersionSettings {
88
+ /** saving creates a draft */
89
+ EnableMinorVersions: boolean;
90
+ /** @deprecated versioning is enabled. (this is now always on in M365 libraries) */
91
+ EnableVersioning: boolean;
92
+ DraftVersionVisibility: DraftVisibilityType;
93
+ MajorWithMinorVersionsLimit: number;
94
+ MajorVersionLimit: number;
95
+ EnableModeration: boolean;
96
+ }
97
+
98
+ export interface iListView {
99
+ Title: string;
100
+ Id: string;
101
+ ServerRelativeUrl: string;
102
+ RowLimit: number;
103
+ Paged: boolean;
104
+ ViewQuery: string;
105
+ ListViewXml: string;
106
+ PersonalView: boolean;
107
+ MobileView: boolean;
108
+ MobileDefaultView: boolean;
109
+ Hidden: boolean;
110
+ DefaultView: boolean;
111
+ ReadOnlyView: boolean;
112
+ ViewFields?: string[];
113
+ }
114
+
115
+ export interface IListWorkflowAssociation {
116
+ AllowManual: boolean;
117
+ BaseId: string;//guid
118
+ Created: string;
119
+ Description: string;
120
+ Enabled: boolean;
121
+ HistoryListTitle: string;
122
+ Id: string;//guid
123
+ InstantiationUrl?: string;
124
+ InternalName: string;
125
+ IsDeclarative: boolean;
126
+ ListId: string;//guid
127
+ Modified: string;
128
+ Name: string;
129
+ RunningInstances: number;
130
+ TaskListTitle: string;
131
+ WebId: string;//guid
132
+ }
133
+
134
+ export interface iContentType {
135
+ Name: string;
136
+ Description: string;
137
+ StringId: string;
138
+ Group: string;
139
+ Hidden: boolean;
140
+ ReadOnly: boolean;
141
+ NewFormUrl: string;
142
+ DisplayFormUrl: string;
143
+ EditFormUrl: string;
144
+ Fields?: IFieldInfoEX[];
145
+ Sealed: boolean;
146
+ MobileNewFormUrl: string;
147
+ MobileDisplayFormUrl: string;
148
+ MobileEditFormUrl: string;
149
+ NewFormTemplateName: string;
150
+ DisplayFormTemplateName: string;
151
+ EditFormTemplateName: string;
152
+ }
153
+
154
+ // eslint-disable-next-line no-shadow
155
+ export enum WebTypes {
156
+ Team = 0,
157
+ Group = 1,
158
+ App = 2,
159
+ Other = 3
160
+ }
161
+ export interface IWebBasicInfo {
162
+ Title: string;
163
+ ServerRelativeUrl: string;
164
+ WebId: string;
165
+ /**STS, APP, WIKI, MPS, APPCATALOG, DEV, PWA, PWS, SPS, GROUP or other... */
166
+ WebTemplate: "STS" | "APP" | "WIKI" | "MPS" | "APPCATALOG" | "DEV" | "PWA" | "PWS" | "SPS" | "GROUP" | string;
167
+ WebType: WebTypes;
168
+ Description?: string;
169
+ SiteLogoUrl?: string;
170
+ }
171
+
172
+ export interface IRestRoleDefinition {
173
+ BasePermissions: { High: number; Low: number; };
174
+ Description: string;
175
+ Hidden: boolean;
176
+ Id: number;
177
+ Name: string;
178
+ Order: number;
179
+ RoleTypeKind: RoleType;
180
+ }
181
+
182
+ export interface IAppTile {
183
+ Title: string;
184
+ ProductId: string;
185
+ }
186
+
187
+ export interface IFileInfo {
188
+ Exists: boolean;
189
+ Name: string;
190
+ ServerRelativeUrl: string;
191
+ TimeCreated: Date;
192
+ TimeLastModified: Date;
193
+ Title: string;
194
+ Level: FileLevel;
195
+ }
196
+
197
+ export interface IFileInfoWithModerationStatus extends IFileInfo {
198
+ ListItemAllFields?: {
199
+ OData__ModerationStatus?: ModerationStatus
200
+ }
201
+ }
202
+
203
+ export interface ITimeZone {
204
+ Description: string;
205
+ Id: number;
206
+ Information: { Bias: number; DaylightBias: number; StandardBias: number; };
207
+ }
208
+
209
+ // eslint-disable-next-line no-shadow
210
+ export enum GeListItemsFoldersBehaviour { AllItemsNoFolders, ItemsAndFoldersFlat, ItemsInsideFolders }
211
+
212
+ export interface IRestItem {
213
+ Id: number;
214
+ FileRef: string;
215
+ FileDirRef: string;
216
+ FileLeafRef: string;
217
+ /** file type (lower case) or 'folder' or 'listitem' */
218
+ FileType: 'folder' | 'listitem' | string;
219
+ /** Folder=1, list item=0 */
220
+ FileSystemObjectType: FileSystemObjectTypes;
221
+ [InternalName: string]: any;
222
+ FieldValuesAsText?: IDictionary<string>;
223
+ FieldValuesForEdit?: IDictionary<any>;
224
+ AttachmentFiles?: AttachmentFilesRESTValue;
225
+
226
+ /** File name (no extension) for files or folders, Title for list items or 'Item #ID' for items with an empty title */
227
+ __DisplayTitle: string;
228
+ /** For a folder, this will have items inside the folder */
229
+ __Items?: IRestItem[];
230
+ /** For an item inside a folder, this will be the parent folder */
231
+ __ParentFolder?: IRestItem;
232
+ }
233
+
234
+ export interface IRestItemExpandedLookupValue {
235
+ Id: number;
236
+ Title: string;
237
+ }
238
+
239
+ export type UserEntityValueType = {
240
+ principalType: PrincipalType.User | PrincipalType.SecurityGroup | PrincipalType.SharePointGroup;
241
+ spId: number;
242
+ loginOrPrincipalName?: string;
243
+ /** not saved in settings. pre-loaded when loading settings. */
244
+ title?: string;
245
+ /** not saved in settings. pre-loaded when loading settings. */
246
+ email?: string;
247
+ };
248
+
249
+ export interface IWebRegionalSettings {
250
+ AdjustHijriDays: number;
251
+ AlternateCalendarType: number;
252
+ AM: string;
253
+ CalendarType: number;
254
+ Collation: number;
255
+ CollationLCID: number;
256
+ DateFormat: number;
257
+ DateSeparator: string;
258
+ DecimalSeparator: string;
259
+ DigitGrouping: string;
260
+ FirstDayOfWeek: number;
261
+ FirstWeekOfYear: number;
262
+ IsEastAsia: boolean;
263
+ IsRightToLeft: boolean;
264
+ IsUIRightToLeft: boolean;
265
+ ListSeparator: string;
266
+ LocaleId: number;
267
+ NegativeSign: string;
268
+ NegNumberMode: number;
269
+ PM: string;
270
+ PositiveSign: string;
271
+ ShowWeeks: boolean;
272
+ ThousandSeparator: string;
273
+ Time24: boolean;
274
+ TimeMarkerPosition: number;
275
+ TimeSeparator: string;
276
+ WorkDayEndHour: number;
277
+ WorkDays: number;
278
+ WorkDayStartHour: number;
279
+ }
280
+
281
+ /**
282
+ * Specifies the moderation status for a file/item (https://learn.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wssfo3/4342322d-6fab-4dc5-8ccd-b808a5e25acf)
283
+ */
284
+ export enum ModerationStatus {
285
+ /** The list item is approved. */
286
+ Approved,
287
+ /** The list item has been denied approval. */
288
+ Rejected,
289
+ /** The list item is pending approval. */
290
+ Pending,
291
+ /** The list item is in the draft or checked out state. */
292
+ Draft,
293
+ /** The list item is scheduled for automatic approval at a future date. */
294
+ Scheduled
295
+ }
296
+
297
+ /**
298
+ * Specifies the publishing level for a file (https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-visio/jj246272(v=office.15))
299
+ */
300
+ export enum FileLevel {
301
+ /** Enumeration whose values specify whether the file is a published version. */
302
+ Published = 1,
303
+ /** Enumeration whose values specify whether the file is a draft.. */
304
+ Draft = 2,
305
+ /** Enumeration whose values specify whether the file is checked out to the current user. */
306
+ Checkout = 255
307
307
  }