@kwiz/common 1.0.78 → 1.0.79

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