@lindle/sharepoint_requests 0.1.9-beta.0

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.
@@ -0,0 +1,342 @@
1
+ export type Metadata = {
2
+ id?: string;
3
+ type?: string;
4
+ uri?: string;
5
+ etag?: string;
6
+ };
7
+
8
+ export type SPItem = {
9
+ Attachments: string;
10
+ ContentType: string;
11
+ ContentTypeID: string;
12
+ Created: string;
13
+ CreatedBy: PersonField & _Deferred;
14
+ CreatedById: string;
15
+ Modified: string;
16
+ ModifiedBy: PersonField & _Deferred;
17
+ ModifiedById: string;
18
+ Id: number;
19
+ Title: string;
20
+ Path: string;
21
+ Version: string;
22
+ Owshiddenversion: number;
23
+ __metadata: Metadata;
24
+ };
25
+
26
+ type ListFields<K> = Extract<keyof K, string> | keyof SPItem;
27
+
28
+ export interface Options<K = any> {
29
+ expand?: ListFields<K>[] | ListFields<K>;
30
+ orderBy?: ListFields<K> | [ListFields<K>, 'asc' | 'desc'];
31
+ limit?: number;
32
+ filter?: string;
33
+ cols?: ListFields<K>[] | ListFields<K>;
34
+ skip?: number;
35
+ }
36
+ export interface Folder_Options<K = any> {
37
+ type: 'Files' | 'Folders';
38
+ expand?: Extract<keyof K, string>[] | Extract<keyof K, string>;
39
+ orderBy?:
40
+ | Extract<keyof K, string>
41
+ | [Extract<keyof K, string>, 'asc' | 'desc'];
42
+ limit?: number;
43
+ filter?: string;
44
+ cols?: Extract<keyof K, string>[] | Extract<keyof K, string>;
45
+ skip?: number;
46
+ }
47
+
48
+ export interface Field_Options<K> extends Omit<Options<K>, 'filter'> {
49
+ fieldName?: Extract<keyof K, string>;
50
+ }
51
+
52
+ export type SHAREPOINT_VER = '2010' | '2013';
53
+
54
+ export type IListName<T> = Extract<keyof T, string>;
55
+
56
+ export type ItemID = string | number;
57
+ export type CreateFileProps = {
58
+ file: File;
59
+ itemId: ItemID;
60
+ };
61
+
62
+ export type ListData =
63
+ | {
64
+ [key: string]: any;
65
+ __metadata?: {
66
+ type: string;
67
+ };
68
+ }
69
+ | any;
70
+
71
+ export type EmailProps = {
72
+ From: string;
73
+ To: string[] | string;
74
+ Subject?: string;
75
+ Body: string;
76
+ };
77
+
78
+ export type _Deferred = {
79
+ __deferred: {
80
+ uri: string;
81
+ };
82
+ };
83
+
84
+ export type LookupField<T> = _Deferred & T;
85
+ export type ChoiceField<T> = _Deferred & {
86
+ Value: T;
87
+ __metadata: Metadata;
88
+ };
89
+
90
+ export type PersonField = {
91
+ AboutMe?: string;
92
+ Account: string;
93
+ AccountName: string;
94
+ AdministrativeSupervisor: string;
95
+ AskMeAbout?: string;
96
+ AskMeAbout0?: string;
97
+ Assistant?: string;
98
+ Attachments: unknown;
99
+ BuildingName: string;
100
+ BusinessLine: string;
101
+ CellPhone?: string;
102
+ City?: string;
103
+ Company: string;
104
+ CompanyCode: string;
105
+ ContentType: string;
106
+ ContentTypeID: string;
107
+ CostCenter: string;
108
+ Country: string;
109
+ Created: string; // Datum ve formátu "/Date(1723530019000)/"
110
+ CreatedBy: PersonField;
111
+ CreatedById: number;
112
+ Deleted: boolean;
113
+ Department: string;
114
+ Department0?: string;
115
+ Division: string;
116
+ Fax?: string;
117
+ FirstName: string;
118
+ Hidden: boolean;
119
+ Id?: string;
120
+ Id0: number;
121
+ Interests?: string;
122
+ IsSiteAdmin: boolean;
123
+ JobTitle?: string;
124
+ LANID: string;
125
+ LastName: string;
126
+ Manager: string;
127
+ MobilePhone: string;
128
+ Modified: string; // Datum ve formátu "/Date(1731958716000)/"
129
+ ModifiedBy: PersonField;
130
+ ModifiedById: number;
131
+ Name: string;
132
+ Office: string;
133
+ OfficeLocation?: string;
134
+ Owshiddenversion: number;
135
+ Pager?: string;
136
+ Path: string;
137
+ Picture: string;
138
+ PictureExchangeSyncState: number;
139
+ PicturePlaceholderState: number;
140
+ PictureTimestamp: string;
141
+ SIPAddress?: string;
142
+ Schools?: string;
143
+ Skills?: string;
144
+ State: string;
145
+ Title: string;
146
+ UserName: string;
147
+ Version: string;
148
+ WebSite?: string;
149
+ WorkEmail: string;
150
+ WorkHistory?: string;
151
+ WorkPhone?: string;
152
+ __metadata: Metadata;
153
+ };
154
+
155
+ export type MultiPersonField = {
156
+ results: PersonField[];
157
+ };
158
+
159
+ export type PermissionLabel = 'Full Control' | 'Edit' | 'Contribute' | 'Read';
160
+
161
+ export type UserPermision = {
162
+ BasePermissions: {
163
+ High: string;
164
+ Low: string;
165
+ __metadata: {
166
+ type: 'SP.BasePermissions';
167
+ };
168
+ };
169
+ Description: string;
170
+ Hidden: boolean;
171
+ Id: number;
172
+ Name: PermissionLabel;
173
+ Order: number;
174
+ RoleTypeKind: number;
175
+ __metadata: Metadata;
176
+ };
177
+
178
+ export type CurrentUser = {
179
+ Email: string;
180
+ Id: number;
181
+ IsHiddenInUI: boolean;
182
+ LoginName: string;
183
+ PrincipalType: number;
184
+ Title: string;
185
+ __metadata: Metadata;
186
+ };
187
+
188
+ export type UserProfilePropKey =
189
+ | 'UserProfile_GUID'
190
+ | 'SID'
191
+ | 'FirstName'
192
+ | 'ADGuid'
193
+ | 'SPS-PhoneticFirstName'
194
+ | 'LastName'
195
+ | 'XOM-LANID'
196
+ | 'UserName'
197
+ | 'SPS-PhoneticLastName'
198
+ | 'AccountName'
199
+ | 'PictureURL'
200
+ | 'MiddleName'
201
+ | 'PreferredName'
202
+ | 'PhoenticName'
203
+ | 'SPS-PhoneticDisplayName'
204
+ | 'SPS-JobTitle'
205
+ | 'Title'
206
+ | 'BuildingName'
207
+ | 'Office'
208
+ | 'WorkPhone'
209
+ | 'SPS-SipAddress'
210
+ | 'CellPhone'
211
+ | 'HomePhone'
212
+ | 'Pager'
213
+ | 'Fax'
214
+ | 'WorkEmail'
215
+ | 'SPS-Location'
216
+ | 'State'
217
+ | 'Country'
218
+ | 'Assistant'
219
+ | 'SPS-RegionalSettings-FollowWeb'
220
+ | 'SPS-Locale'
221
+ | 'SPS-CalendarType'
222
+ | 'SPS-AltCalendarType'
223
+ | 'SPS-AdjustHijriDays'
224
+ | 'SPS-ShowWeeks'
225
+ | 'SPS-WorkDays'
226
+ | 'SPS-WorkDayStartHour'
227
+ | 'SPS-WorkDayEndHour'
228
+ | 'SPS-Time24'
229
+ | 'SPS-FirstDayOfWeek'
230
+ | 'SPS-FirstWeekOfYear'
231
+ | 'SPS-RegionalSettings-Initialized'
232
+ | 'SPS-TimeZone'
233
+ | 'Company'
234
+ | 'Division'
235
+ | 'BusinessLine'
236
+ | 'SPS-Department'
237
+ | 'Department'
238
+ | 'XOM-CompanyCode'
239
+ | 'Manager'
240
+ | 'SPS-Dotted-line'
241
+ | 'XOM-CostCenter'
242
+ | 'SPS-HireDate'
243
+ | 'AboutMe'
244
+ | 'SPS-Responsibility'
245
+ | 'SPS-PastProjects'
246
+ | 'WorkHistory'
247
+ | 'SPS-Skills'
248
+ | 'SPS-Interests'
249
+ | 'SPS-School'
250
+ | 'SPS-Birthday'
251
+ | 'WebSite'
252
+ | 'PersonalSpace'
253
+ | 'PublicSiteRedirect'
254
+ | 'QuickLinks'
255
+ | 'SPS-DataSource'
256
+ | 'SPS-Memberof'
257
+ | 'SPS-Peers'
258
+ | 'SPS-MySiteUpgrade'
259
+ | 'SPS-DontSuggestList'
260
+ | 'SPS-ProxyAddresses'
261
+ | 'SPS-LastColleagueAdded'
262
+ | 'SPS-OWAUrl'
263
+ | 'SPS-ResourceSID'
264
+ | 'SPS-ResourceAccountName'
265
+ | 'SPS-MasterAccountName'
266
+ | 'SPS-DistinguishedName'
267
+ | 'SPS-SourceObjectDN'
268
+ | 'SPS-LastKeywordAdded'
269
+ | 'SPS-StatusNotes'
270
+ | 'SPS-DisplayOrder'
271
+ | 'SPS-ClaimID'
272
+ | 'SPS-ClaimProviderID'
273
+ | 'SPS-ClaimProviderType'
274
+ | 'SPS-SavedAccountName'
275
+ | 'SPS-SavedSID'
276
+ | 'SPS-ObjectExists'
277
+ | 'SPS-PersonalSiteCapabilities'
278
+ | 'SPS-UserPrincipalName'
279
+ | 'SPS-O15FirstRunExperience'
280
+ | 'SPS-PersonalSiteInstantiationState'
281
+ | 'SPS-PersonalSiteFirstCreationTime'
282
+ | 'SPS-PersonalSiteLastCreationTime'
283
+ | 'SPS-PersonalSiteNumberOfRetries'
284
+ | 'SPS-PersonalSiteFirstCreationError'
285
+ | 'SPS-FeedIdentifier'
286
+ | 'SPS-HashTags'
287
+ | 'SPS-PrivacyPeople'
288
+ | 'SPS-EmailOptin'
289
+ | 'SPS-PrivacyActivity'
290
+ | 'SPS-PictureTimestamp'
291
+ | 'SPS-PicturePlaceholderState'
292
+ | 'SPS-PictureExchangeSyncState'
293
+ | 'SPS-MUILanguages'
294
+ | 'SPS-ContentLanguages'
295
+ | 'OfficeGraphEnabled'
296
+ | 'SPS-UserType'
297
+ | 'SPS-HideFromAddressLists'
298
+ | 'SPS-RecipientTypeDetails'
299
+ | 'DelveFlags'
300
+ | 'PulseMRUPeople'
301
+ | 'msOnline-ObjectId'
302
+ | 'SPS-PointPublishingUrl'
303
+ | 'SPS-TenantInstanceId'
304
+ | 'SPS-SharePointHomeExperienceState'
305
+ | 'SPS-MultiGeoFlags'
306
+ | 'PreferredDataLocation'
307
+ | 'PrivacyNotified'
308
+ | 'PrivacyNotifiedDate'
309
+ | 'O365'
310
+ | 'O365MigrationDate';
311
+
312
+ export type UserProfile = {
313
+ AccountName: string;
314
+ Country: string;
315
+ DisplayName: string;
316
+ Email: string;
317
+ ExtendedManagers: {
318
+ results: string[];
319
+ __metadata: Metadata;
320
+ };
321
+ ExtendedReports: {
322
+ results: string[];
323
+ __metadata: Metadata;
324
+ };
325
+ FirstName: string;
326
+ IsFollowed: boolean;
327
+ LastName: string;
328
+ PersonalUrl: string;
329
+ PictureUrl: string;
330
+ Title: string;
331
+ UserName: string;
332
+ UserProfileProperties: {
333
+ results: {
334
+ Key: UserProfilePropKey;
335
+ Value: string;
336
+ ValueType: string;
337
+ __metadata: { type: string };
338
+ }[];
339
+ };
340
+ UserUrl: string;
341
+ __metadata: Metadata;
342
+ };