@lindle/sharepoint_requests 0.1.19 → 0.1.20
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.
- package/dist/index.d.mts +469 -0
- package/dist/index.d.ts +460 -8
- package/dist/index.js +892 -5
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +863 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -5
- package/src/root/index.ts +29 -9
- package/src/root/instance.ts +7 -0
- package/src/root/internal/context.ts +0 -1
- package/src/root/internal/digest.ts +16 -10
- package/src/root/internal/emailRequests.ts +2 -5
- package/src/root/internal/listRequests/createAttachment.ts +2 -2
- package/src/root/internal/listRequests/createListItem.ts +3 -18
- package/src/root/internal/listRequests/deleteFile.ts +1 -2
- package/src/root/internal/listRequests/deleteItem.ts +1 -1
- package/src/root/internal/listRequests/getListItems.ts +34 -7
- package/src/root/internal/listRequests/resolveMetadataType.ts +14 -0
- package/src/root/internal/listRequests/updateListItem.ts +3 -19
- package/src/root/internal/listRequests/uploadFile.ts +8 -13
- package/src/root/internal/userRequests.ts +52 -28
- package/src/types.ts +3 -2
- package/dist/root/index.d.ts +0 -163
- package/dist/root/instance.d.ts +0 -3
- package/dist/root/internal/context.d.ts +0 -11
- package/dist/root/internal/digest.d.ts +0 -2
- package/dist/root/internal/emailRequests.d.ts +0 -10
- package/dist/root/internal/listRequests/createAttachment.d.ts +0 -3
- package/dist/root/internal/listRequests/createListItem.d.ts +0 -3
- package/dist/root/internal/listRequests/deleteFile.d.ts +0 -3
- package/dist/root/internal/listRequests/deleteItem.d.ts +0 -3
- package/dist/root/internal/listRequests/getFiles.d.ts +0 -8
- package/dist/root/internal/listRequests/getListItems.d.ts +0 -8
- package/dist/root/internal/listRequests/getOnly.d.ts +0 -3
- package/dist/root/internal/listRequests/index.d.ts +0 -9
- package/dist/root/internal/listRequests/normalizePayload.d.ts +0 -4
- package/dist/root/internal/listRequests/updateListItem.d.ts +0 -3
- package/dist/root/internal/listRequests/uploadFile.d.ts +0 -6
- package/dist/root/internal/listRequests/utils.d.ts +0 -2
- package/dist/root/internal/odata.d.ts +0 -5
- package/dist/root/internal/sharepointUrl.d.ts +0 -2
- package/dist/root/internal/userRequests.d.ts +0 -15
- package/dist/sharepoint_requests.cjs.development.js +0 -1497
- package/dist/sharepoint_requests.cjs.development.js.map +0 -1
- package/dist/sharepoint_requests.cjs.production.min.js +0 -2
- package/dist/sharepoint_requests.cjs.production.min.js.map +0 -1
- package/dist/sharepoint_requests.esm.js +0 -1490
- package/dist/sharepoint_requests.esm.js.map +0 -1
- package/dist/types.d.ts +0 -260
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import * as axios from 'axios';
|
|
2
|
+
import { AxiosInstance, AxiosResponse, CreateAxiosDefaults } from 'axios';
|
|
3
|
+
|
|
4
|
+
type Metadata = {
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
uri?: string;
|
|
8
|
+
etag?: string;
|
|
9
|
+
};
|
|
10
|
+
type SPItem2010 = {
|
|
11
|
+
Attachments: string;
|
|
12
|
+
ContentType: string;
|
|
13
|
+
ContentTypeID: string;
|
|
14
|
+
Created: string;
|
|
15
|
+
CreatedBy: PersonField & _Deferred;
|
|
16
|
+
CreatedById: string;
|
|
17
|
+
Modified: string;
|
|
18
|
+
ModifiedBy: PersonField & _Deferred;
|
|
19
|
+
ModifiedById: string;
|
|
20
|
+
Id: number;
|
|
21
|
+
Title: string;
|
|
22
|
+
Path: string;
|
|
23
|
+
Version: string;
|
|
24
|
+
Owshiddenversion: number;
|
|
25
|
+
__metadata: Metadata;
|
|
26
|
+
};
|
|
27
|
+
type SPItem2013 = {
|
|
28
|
+
__metadata: Metadata;
|
|
29
|
+
FirstUniqueAncestorSecurableObject: _Deferred;
|
|
30
|
+
RoleAssignments: _Deferred;
|
|
31
|
+
AttachmentFiles: _Deferred;
|
|
32
|
+
ContentType: _Deferred;
|
|
33
|
+
GetDlpPolicyTip: _Deferred;
|
|
34
|
+
FieldValuesAsHtml: _Deferred;
|
|
35
|
+
FieldValuesAsText: _Deferred;
|
|
36
|
+
FieldValuesForEdit: _Deferred;
|
|
37
|
+
File: _Deferred;
|
|
38
|
+
Folder: _Deferred;
|
|
39
|
+
ParentList: _Deferred;
|
|
40
|
+
FileSystemObjectType: number;
|
|
41
|
+
Id: number;
|
|
42
|
+
ContentTypeId: string;
|
|
43
|
+
Title: string;
|
|
44
|
+
PhotoRefId?: number;
|
|
45
|
+
ID: number;
|
|
46
|
+
Modified: string;
|
|
47
|
+
Created: string;
|
|
48
|
+
AuthorId: number;
|
|
49
|
+
EditorId: number;
|
|
50
|
+
OData__UIVersionString?: string;
|
|
51
|
+
Attachments: boolean;
|
|
52
|
+
GUID: string;
|
|
53
|
+
Author?: PersonField & _Deferred;
|
|
54
|
+
Editor?: PersonField & _Deferred;
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
type SPItem<V extends SHAREPOINT_VER = '2013'> = V extends '2010' ? SPItem2010 : SPItem2013;
|
|
58
|
+
type ListFields<K, V extends SHAREPOINT_VER = '2013'> = Extract<keyof K, string> | Extract<keyof SPItem<V>, string>;
|
|
59
|
+
type OrderByDirection = 'asc' | 'desc';
|
|
60
|
+
type OrderByExpression<F extends string> = F | (F | OrderByDirection)[];
|
|
61
|
+
interface Options<K = any, V extends SHAREPOINT_VER = '2013'> {
|
|
62
|
+
expand?: ListFields<K, V>[] | ListFields<K, V>;
|
|
63
|
+
orderBy?: OrderByExpression<ListFields<K, V>>;
|
|
64
|
+
limit?: number;
|
|
65
|
+
filter?: string;
|
|
66
|
+
cols?: ListFields<K, V>[] | ListFields<K, V>;
|
|
67
|
+
skip?: number;
|
|
68
|
+
}
|
|
69
|
+
interface Folder_Options<K = any> {
|
|
70
|
+
type?: 'Files' | 'Folders';
|
|
71
|
+
expand?: Extract<keyof K, string>[] | Extract<keyof K, string>;
|
|
72
|
+
orderBy?: OrderByExpression<Extract<keyof K, string>>;
|
|
73
|
+
limit?: number;
|
|
74
|
+
filter?: string;
|
|
75
|
+
cols?: Extract<keyof K, string>[] | Extract<keyof K, string>;
|
|
76
|
+
skip?: number;
|
|
77
|
+
}
|
|
78
|
+
interface Field_Options<K, V extends SHAREPOINT_VER = '2013'> extends Omit<Options<K, V>, 'filter'> {
|
|
79
|
+
fieldName?: Extract<keyof K, string>;
|
|
80
|
+
}
|
|
81
|
+
type SHAREPOINT_VER = '2010' | '2013';
|
|
82
|
+
type ItemID = string | number;
|
|
83
|
+
type CreateFileProps = {
|
|
84
|
+
file: File;
|
|
85
|
+
itemId: ItemID;
|
|
86
|
+
};
|
|
87
|
+
type UploadFileProps = {
|
|
88
|
+
file: File;
|
|
89
|
+
folderPath?: string | string[];
|
|
90
|
+
overwrite?: boolean;
|
|
91
|
+
};
|
|
92
|
+
type DeleteFileProps = {
|
|
93
|
+
fileName: string;
|
|
94
|
+
folderPath?: string | string[];
|
|
95
|
+
};
|
|
96
|
+
type EmailProps = {
|
|
97
|
+
From: string;
|
|
98
|
+
To: string[] | string;
|
|
99
|
+
Subject?: string;
|
|
100
|
+
Body: string;
|
|
101
|
+
};
|
|
102
|
+
type _Deferred = {
|
|
103
|
+
__deferred: {
|
|
104
|
+
uri: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
type LookupFieldMarker = {
|
|
108
|
+
__lookupFieldBrand?: true;
|
|
109
|
+
};
|
|
110
|
+
type LookupField<T> = _Deferred & T & LookupFieldMarker;
|
|
111
|
+
type ChoiceField<T> = _Deferred & {
|
|
112
|
+
Value: T;
|
|
113
|
+
__metadata: Metadata;
|
|
114
|
+
};
|
|
115
|
+
type MetadataEnvelope = {
|
|
116
|
+
__metadata?: {
|
|
117
|
+
type: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
type EnsureRecord<T> = T extends Record<string, unknown> ? T : Record<string, unknown>;
|
|
121
|
+
type LookupCreateValue = number | string | null | {
|
|
122
|
+
lookupId: number | string;
|
|
123
|
+
} | {
|
|
124
|
+
LookupId: number | string;
|
|
125
|
+
} | {
|
|
126
|
+
results: (number | string)[];
|
|
127
|
+
};
|
|
128
|
+
type NormalizeField<T> = T extends LookupField<unknown> ? LookupCreateValue | LookupField<unknown> : T;
|
|
129
|
+
type ListData<T = Record<string, unknown>> = Partial<{
|
|
130
|
+
[K in keyof EnsureRecord<T>]: NormalizeField<EnsureRecord<T>[K]>;
|
|
131
|
+
}> & MetadataEnvelope;
|
|
132
|
+
type PersonField = {
|
|
133
|
+
AboutMe?: string;
|
|
134
|
+
Account: string;
|
|
135
|
+
AccountName: string;
|
|
136
|
+
AdministrativeSupervisor: string;
|
|
137
|
+
AskMeAbout?: string;
|
|
138
|
+
AskMeAbout0?: string;
|
|
139
|
+
Assistant?: string;
|
|
140
|
+
Attachments: unknown;
|
|
141
|
+
BuildingName: string;
|
|
142
|
+
BusinessLine: string;
|
|
143
|
+
CellPhone?: string;
|
|
144
|
+
City?: string;
|
|
145
|
+
Company: string;
|
|
146
|
+
CompanyCode: string;
|
|
147
|
+
ContentType: string;
|
|
148
|
+
ContentTypeID: string;
|
|
149
|
+
CostCenter: string;
|
|
150
|
+
Country: string;
|
|
151
|
+
Created: string;
|
|
152
|
+
CreatedBy: PersonField;
|
|
153
|
+
CreatedById: number;
|
|
154
|
+
Deleted: boolean;
|
|
155
|
+
Department: string;
|
|
156
|
+
Department0?: string;
|
|
157
|
+
Division: string;
|
|
158
|
+
Fax?: string;
|
|
159
|
+
FirstName: string;
|
|
160
|
+
Hidden: boolean;
|
|
161
|
+
Id?: string;
|
|
162
|
+
Id0: number;
|
|
163
|
+
Interests?: string;
|
|
164
|
+
IsSiteAdmin: boolean;
|
|
165
|
+
JobTitle?: string;
|
|
166
|
+
LANID: string;
|
|
167
|
+
LastName: string;
|
|
168
|
+
Manager: string;
|
|
169
|
+
MobilePhone: string;
|
|
170
|
+
Modified: string;
|
|
171
|
+
ModifiedBy: PersonField;
|
|
172
|
+
ModifiedById: number;
|
|
173
|
+
Name: string;
|
|
174
|
+
Office: string;
|
|
175
|
+
OfficeLocation?: string;
|
|
176
|
+
Owshiddenversion: number;
|
|
177
|
+
Pager?: string;
|
|
178
|
+
Path: string;
|
|
179
|
+
Picture: string;
|
|
180
|
+
PictureExchangeSyncState: number;
|
|
181
|
+
PicturePlaceholderState: number;
|
|
182
|
+
PictureTimestamp: string;
|
|
183
|
+
SIPAddress?: string;
|
|
184
|
+
Schools?: string;
|
|
185
|
+
Skills?: string;
|
|
186
|
+
State: string;
|
|
187
|
+
Title: string;
|
|
188
|
+
UserName: string;
|
|
189
|
+
Version: string;
|
|
190
|
+
WebSite?: string;
|
|
191
|
+
WorkEmail: string;
|
|
192
|
+
WorkHistory?: string;
|
|
193
|
+
WorkPhone?: string;
|
|
194
|
+
__metadata: Metadata;
|
|
195
|
+
};
|
|
196
|
+
type PermissionLabel = 'Full Control' | 'Edit' | 'Contribute' | 'Read';
|
|
197
|
+
type UserPermission = {
|
|
198
|
+
BasePermissions: {
|
|
199
|
+
High: string;
|
|
200
|
+
Low: string;
|
|
201
|
+
__metadata: {
|
|
202
|
+
type: 'SP.BasePermissions';
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
Description: string;
|
|
206
|
+
Hidden: boolean;
|
|
207
|
+
Id: number;
|
|
208
|
+
Name: PermissionLabel;
|
|
209
|
+
Order: number;
|
|
210
|
+
RoleTypeKind: number;
|
|
211
|
+
__metadata: Metadata;
|
|
212
|
+
};
|
|
213
|
+
/** @deprecated Use `UserPermission` instead. */
|
|
214
|
+
type UserPermision = UserPermission;
|
|
215
|
+
type CurrentUser = {
|
|
216
|
+
Email: string;
|
|
217
|
+
Id: number;
|
|
218
|
+
IsHiddenInUI: boolean;
|
|
219
|
+
LoginName: string;
|
|
220
|
+
PrincipalType: number;
|
|
221
|
+
Title: string;
|
|
222
|
+
__metadata: Metadata;
|
|
223
|
+
};
|
|
224
|
+
type UserProfilePropKey = 'UserProfile_GUID' | 'SID' | 'FirstName' | 'ADGuid' | 'SPS-PhoneticFirstName' | 'LastName' | 'XOM-LANID' | 'UserName' | 'SPS-PhoneticLastName' | 'AccountName' | 'PictureURL' | 'MiddleName' | 'PreferredName' | 'PhoenticName' | 'SPS-PhoneticDisplayName' | 'SPS-JobTitle' | 'Title' | 'BuildingName' | 'Office' | 'WorkPhone' | 'SPS-SipAddress' | 'CellPhone' | 'HomePhone' | 'Pager' | 'Fax' | 'WorkEmail' | 'SPS-Location' | 'State' | 'Country' | 'Assistant' | 'SPS-RegionalSettings-FollowWeb' | 'SPS-Locale' | 'SPS-CalendarType' | 'SPS-AltCalendarType' | 'SPS-AdjustHijriDays' | 'SPS-ShowWeeks' | 'SPS-WorkDays' | 'SPS-WorkDayStartHour' | 'SPS-WorkDayEndHour' | 'SPS-Time24' | 'SPS-FirstDayOfWeek' | 'SPS-FirstWeekOfYear' | 'SPS-RegionalSettings-Initialized' | 'SPS-TimeZone' | 'Company' | 'Division' | 'BusinessLine' | 'SPS-Department' | 'Department' | 'XOM-CompanyCode' | 'Manager' | 'SPS-Dotted-line' | 'XOM-CostCenter' | 'SPS-HireDate' | 'AboutMe' | 'SPS-Responsibility' | 'SPS-PastProjects' | 'WorkHistory' | 'SPS-Skills' | 'SPS-Interests' | 'SPS-School' | 'SPS-Birthday' | 'WebSite' | 'PersonalSpace' | 'PublicSiteRedirect' | 'QuickLinks' | 'SPS-DataSource' | 'SPS-Memberof' | 'SPS-Peers' | 'SPS-MySiteUpgrade' | 'SPS-DontSuggestList' | 'SPS-ProxyAddresses' | 'SPS-LastColleagueAdded' | 'SPS-OWAUrl' | 'SPS-ResourceSID' | 'SPS-ResourceAccountName' | 'SPS-MasterAccountName' | 'SPS-DistinguishedName' | 'SPS-SourceObjectDN' | 'SPS-LastKeywordAdded' | 'SPS-StatusNotes' | 'SPS-DisplayOrder' | 'SPS-ClaimID' | 'SPS-ClaimProviderID' | 'SPS-ClaimProviderType' | 'SPS-SavedAccountName' | 'SPS-SavedSID' | 'SPS-ObjectExists' | 'SPS-PersonalSiteCapabilities' | 'SPS-UserPrincipalName' | 'SPS-O15FirstRunExperience' | 'SPS-PersonalSiteInstantiationState' | 'SPS-PersonalSiteFirstCreationTime' | 'SPS-PersonalSiteLastCreationTime' | 'SPS-PersonalSiteNumberOfRetries' | 'SPS-PersonalSiteFirstCreationError' | 'SPS-FeedIdentifier' | 'SPS-HashTags' | 'SPS-PrivacyPeople' | 'SPS-EmailOptin' | 'SPS-PrivacyActivity' | 'SPS-PictureTimestamp' | 'SPS-PicturePlaceholderState' | 'SPS-PictureExchangeSyncState' | 'SPS-MUILanguages' | 'SPS-ContentLanguages' | 'OfficeGraphEnabled' | 'SPS-UserType' | 'SPS-HideFromAddressLists' | 'SPS-RecipientTypeDetails' | 'DelveFlags' | 'PulseMRUPeople' | 'msOnline-ObjectId' | 'SPS-PointPublishingUrl' | 'SPS-TenantInstanceId' | 'SPS-SharePointHomeExperienceState' | 'SPS-MultiGeoFlags' | 'PreferredDataLocation' | 'PrivacyNotified' | 'PrivacyNotifiedDate' | 'O365' | 'O365MigrationDate';
|
|
225
|
+
type UserProfile = {
|
|
226
|
+
AccountName: string;
|
|
227
|
+
Country: string;
|
|
228
|
+
DisplayName: string;
|
|
229
|
+
Email: string;
|
|
230
|
+
ExtendedManagers: {
|
|
231
|
+
results: string[];
|
|
232
|
+
__metadata: Metadata;
|
|
233
|
+
};
|
|
234
|
+
ExtendedReports: {
|
|
235
|
+
results: string[];
|
|
236
|
+
__metadata: Metadata;
|
|
237
|
+
};
|
|
238
|
+
FirstName: string;
|
|
239
|
+
IsFollowed: boolean;
|
|
240
|
+
LastName: string;
|
|
241
|
+
PersonalUrl: string;
|
|
242
|
+
PictureUrl: string;
|
|
243
|
+
Title: string;
|
|
244
|
+
UserName: string;
|
|
245
|
+
UserProfileProperties: {
|
|
246
|
+
results: {
|
|
247
|
+
Key: UserProfilePropKey;
|
|
248
|
+
Value: string;
|
|
249
|
+
ValueType: string;
|
|
250
|
+
__metadata: {
|
|
251
|
+
type: string;
|
|
252
|
+
};
|
|
253
|
+
}[];
|
|
254
|
+
};
|
|
255
|
+
UserUrl: string;
|
|
256
|
+
__metadata: Metadata;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
interface RequestContext<V extends SHAREPOINT_VER = '2013'> {
|
|
260
|
+
instance: AxiosInstance;
|
|
261
|
+
endpoint: string;
|
|
262
|
+
listName: string;
|
|
263
|
+
sharepointVersion: V;
|
|
264
|
+
listItemEntityTypeFullName?: string;
|
|
265
|
+
resolveListItemEntityType?: () => Promise<string>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type SendEmailResponse = AxiosResponse<{
|
|
269
|
+
d: {
|
|
270
|
+
SendEmail: null;
|
|
271
|
+
};
|
|
272
|
+
}>;
|
|
273
|
+
declare function sendEmail(context: RequestContext, { From, To, Subject, Body }: EmailProps): Promise<SendEmailResponse>;
|
|
274
|
+
|
|
275
|
+
type ListKey<T extends {
|
|
276
|
+
LISTS: Record<string, unknown>;
|
|
277
|
+
}> = Extract<keyof T['LISTS'], string>;
|
|
278
|
+
/**
|
|
279
|
+
* @deprecated SP.Utilities.Utility.SendEmail was retired by Microsoft on 2025-10-31
|
|
280
|
+
* and no longer sends emails. Migrate to Microsoft Graph API:
|
|
281
|
+
* POST /v1.0/me/sendMail (delegated) or POST /v1.0/users/{id}/sendMail (app)
|
|
282
|
+
* https://learn.microsoft.com/en-us/graph/api/user-sendmail
|
|
283
|
+
*/
|
|
284
|
+
type EmailApi = ((from: string, to: string[] | string, subject: string | undefined, body: string) => ReturnType<typeof sendEmail>) & {
|
|
285
|
+
send: (props: EmailProps) => ReturnType<typeof sendEmail>;
|
|
286
|
+
};
|
|
287
|
+
declare class HTTPSharePointRequests<T extends {
|
|
288
|
+
LISTS: Record<string, unknown>;
|
|
289
|
+
FOLDERS?: Record<string, unknown>;
|
|
290
|
+
}> {
|
|
291
|
+
private readonly baseURL;
|
|
292
|
+
private readonly instance;
|
|
293
|
+
private readonly listItemEntityTypeCache;
|
|
294
|
+
/**
|
|
295
|
+
* @deprecated SP.Utilities.Utility.SendEmail was retired by Microsoft on 2025-10-31.
|
|
296
|
+
* Migrate to Microsoft Graph API POST /v1.0/me/sendMail
|
|
297
|
+
* https://learn.microsoft.com/en-us/graph/api/user-sendmail
|
|
298
|
+
*/
|
|
299
|
+
readonly email: EmailApi;
|
|
300
|
+
constructor(baseURL: string, config?: CreateAxiosDefaults);
|
|
301
|
+
private createContext;
|
|
302
|
+
private resolveListItemEntityTypeFullName;
|
|
303
|
+
private buildListScope;
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated Use `from(listName, '2010')` instead.
|
|
306
|
+
*/
|
|
307
|
+
list<K extends ListKey<T>>(listName: K): {
|
|
308
|
+
create: (data: ListData<T["LISTS"][K]>) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
309
|
+
get: (options?: Options<T["LISTS"][K], "2010">) => Promise<{
|
|
310
|
+
data: ([(Extract<keyof T["LISTS"][K], string> extends infer T_1 ? T_1 extends Extract<keyof T["LISTS"][K], string> ? T_1 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_1, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>] extends [never] ? T["LISTS"][K] & Partial<SPItem2010> : Pick<T["LISTS"][K] & Partial<SPItem2010>, (Extract<keyof T["LISTS"][K], string> extends infer T_2 ? T_2 extends Extract<keyof T["LISTS"][K], string> ? T_2 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_2, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>>) | ([(Extract<keyof T["LISTS"][K], string> extends infer T_3 ? T_3 extends Extract<keyof T["LISTS"][K], string> ? T_3 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_3, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>] extends [never] ? T["LISTS"][K] & Partial<SPItem2010> : Pick<T["LISTS"][K] & Partial<SPItem2010>, (Extract<keyof T["LISTS"][K], string> extends infer T_4 ? T_4 extends Extract<keyof T["LISTS"][K], string> ? T_4 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_4, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>>)[];
|
|
311
|
+
meta: {
|
|
312
|
+
url: URL;
|
|
313
|
+
};
|
|
314
|
+
}>;
|
|
315
|
+
update: (id: ItemID, data: ListData<T["LISTS"][K]>, digest?: string) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
316
|
+
delete: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
317
|
+
remove: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
318
|
+
createFile: (props: CreateFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
319
|
+
uploadFile: (props: UploadFileProps) => Promise<{
|
|
320
|
+
response: axios.AxiosResponse;
|
|
321
|
+
itemId?: ItemID;
|
|
322
|
+
}>;
|
|
323
|
+
deleteFile: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
324
|
+
removeFile: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
325
|
+
fields: (options?: Field_Options<T["LISTS"][K], "2010">) => {
|
|
326
|
+
get: () => Promise<any>;
|
|
327
|
+
};
|
|
328
|
+
items: {
|
|
329
|
+
create: (data: ListData<T["LISTS"][K]>) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
330
|
+
get: (options?: Options<T["LISTS"][K], "2010">) => Promise<{
|
|
331
|
+
data: ([(Extract<keyof T["LISTS"][K], string> extends infer T_1 ? T_1 extends Extract<keyof T["LISTS"][K], string> ? T_1 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_1, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>] extends [never] ? T["LISTS"][K] & Partial<SPItem2010> : Pick<T["LISTS"][K] & Partial<SPItem2010>, (Extract<keyof T["LISTS"][K], string> extends infer T_2 ? T_2 extends Extract<keyof T["LISTS"][K], string> ? T_2 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_2, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>>) | ([(Extract<keyof T["LISTS"][K], string> extends infer T_3 ? T_3 extends Extract<keyof T["LISTS"][K], string> ? T_3 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_3, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>] extends [never] ? T["LISTS"][K] & Partial<SPItem2010> : Pick<T["LISTS"][K] & Partial<SPItem2010>, (Extract<keyof T["LISTS"][K], string> extends infer T_4 ? T_4 extends Extract<keyof T["LISTS"][K], string> ? T_4 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem2010> : Extract<T_4, keyof T["LISTS"][K] | keyof SPItem2010> : never : never) | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"__metadata", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentType", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Id", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Title", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Modified", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Created", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Attachments", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ContentTypeID", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"CreatedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedBy", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"ModifiedById", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Path", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Version", keyof T["LISTS"][K] | keyof SPItem2010> | Extract<"Owshiddenversion", keyof T["LISTS"][K] | keyof SPItem2010>>)[];
|
|
332
|
+
meta: {
|
|
333
|
+
url: URL;
|
|
334
|
+
};
|
|
335
|
+
}>;
|
|
336
|
+
update: (id: ItemID, data: ListData<T["LISTS"][K]>, digest?: string) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
337
|
+
delete: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
338
|
+
remove: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
339
|
+
};
|
|
340
|
+
files: {
|
|
341
|
+
attach: (props: CreateFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
342
|
+
upload: (props: UploadFileProps) => Promise<{
|
|
343
|
+
response: axios.AxiosResponse;
|
|
344
|
+
itemId?: ItemID;
|
|
345
|
+
}>;
|
|
346
|
+
delete: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
347
|
+
remove: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
from<K extends ListKey<T>, V extends SHAREPOINT_VER = '2013'>(listName: K, sharepointVersion?: V): {
|
|
351
|
+
create: (data: ListData<T["LISTS"][K]>) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
352
|
+
get: (options?: Options<T["LISTS"][K], V>) => Promise<{
|
|
353
|
+
data: ([(Extract<keyof T["LISTS"][K], string> extends infer T_1 ? T_1 extends Extract<keyof T["LISTS"][K], string> ? T_1 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_1, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_2 ? T_2 extends Extract<keyof SPItem<V>, string> ? T_2 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_2, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>] extends [never] ? T["LISTS"][K] & Partial<SPItem<V>> : Pick<T["LISTS"][K] & Partial<SPItem<V>>, (Extract<keyof T["LISTS"][K], string> extends infer T_3 ? T_3 extends Extract<keyof T["LISTS"][K], string> ? T_3 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_3, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_4 ? T_4 extends Extract<keyof SPItem<V>, string> ? T_4 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_4, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>>) | ([(Extract<keyof T["LISTS"][K], string> extends infer T_5 ? T_5 extends Extract<keyof T["LISTS"][K], string> ? T_5 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_5, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_6 ? T_6 extends Extract<keyof SPItem<V>, string> ? T_6 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_6, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>] extends [never] ? T["LISTS"][K] & Partial<SPItem<V>> : Pick<T["LISTS"][K] & Partial<SPItem<V>>, (Extract<keyof T["LISTS"][K], string> extends infer T_7 ? T_7 extends Extract<keyof T["LISTS"][K], string> ? T_7 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_7, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_8 ? T_8 extends Extract<keyof SPItem<V>, string> ? T_8 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_8, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>>)[];
|
|
354
|
+
meta: {
|
|
355
|
+
url: URL;
|
|
356
|
+
};
|
|
357
|
+
}>;
|
|
358
|
+
update: (id: ItemID, data: ListData<T["LISTS"][K]>, digest?: string) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
359
|
+
delete: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
360
|
+
remove: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
361
|
+
createFile: (props: CreateFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
362
|
+
uploadFile: (props: UploadFileProps) => Promise<{
|
|
363
|
+
response: axios.AxiosResponse;
|
|
364
|
+
itemId?: ItemID;
|
|
365
|
+
}>;
|
|
366
|
+
deleteFile: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
367
|
+
removeFile: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
368
|
+
fields: (options?: Field_Options<T["LISTS"][K], V>) => {
|
|
369
|
+
get: () => Promise<any>;
|
|
370
|
+
};
|
|
371
|
+
items: {
|
|
372
|
+
create: (data: ListData<T["LISTS"][K]>) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
373
|
+
get: (options?: Options<T["LISTS"][K], V>) => Promise<{
|
|
374
|
+
data: ([(Extract<keyof T["LISTS"][K], string> extends infer T_1 ? T_1 extends Extract<keyof T["LISTS"][K], string> ? T_1 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_1, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_2 ? T_2 extends Extract<keyof SPItem<V>, string> ? T_2 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_2, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>] extends [never] ? T["LISTS"][K] & Partial<SPItem<V>> : Pick<T["LISTS"][K] & Partial<SPItem<V>>, (Extract<keyof T["LISTS"][K], string> extends infer T_3 ? T_3 extends Extract<keyof T["LISTS"][K], string> ? T_3 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_3, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_4 ? T_4 extends Extract<keyof SPItem<V>, string> ? T_4 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_4, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>>) | ([(Extract<keyof T["LISTS"][K], string> extends infer T_5 ? T_5 extends Extract<keyof T["LISTS"][K], string> ? T_5 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_5, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_6 ? T_6 extends Extract<keyof SPItem<V>, string> ? T_6 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_6, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>] extends [never] ? T["LISTS"][K] & Partial<SPItem<V>> : Pick<T["LISTS"][K] & Partial<SPItem<V>>, (Extract<keyof T["LISTS"][K], string> extends infer T_7 ? T_7 extends Extract<keyof T["LISTS"][K], string> ? T_7 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_7, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | (Extract<keyof SPItem<V>, string> extends infer T_8 ? T_8 extends Extract<keyof SPItem<V>, string> ? T_8 extends readonly (infer Key)[] ? Extract<Key, keyof T["LISTS"][K] | keyof SPItem<V>> : Extract<T_8, keyof T["LISTS"][K] | keyof SPItem<V>> : never : never) | Extract<Extract<keyof T["LISTS"][K], string>, keyof T["LISTS"][K] | keyof SPItem<V>> | Extract<Extract<keyof SPItem<V>, string>, keyof T["LISTS"][K] | keyof SPItem<V>>>)[];
|
|
375
|
+
meta: {
|
|
376
|
+
url: URL;
|
|
377
|
+
};
|
|
378
|
+
}>;
|
|
379
|
+
update: (id: ItemID, data: ListData<T["LISTS"][K]>, digest?: string) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
380
|
+
delete: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
381
|
+
remove: (id: ItemID) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
382
|
+
};
|
|
383
|
+
files: {
|
|
384
|
+
attach: (props: CreateFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
385
|
+
upload: (props: UploadFileProps) => Promise<{
|
|
386
|
+
response: axios.AxiosResponse;
|
|
387
|
+
itemId?: ItemID;
|
|
388
|
+
}>;
|
|
389
|
+
delete: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
390
|
+
remove: (props: DeleteFileProps) => Promise<axios.AxiosResponse<any, any, {}>>;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
field<K extends ListKey<T>, V extends SHAREPOINT_VER = '2013'>(listName: K, fieldName?: Extract<keyof T['LISTS'][K], string>, sharepointVersion?: V): Promise<any>;
|
|
394
|
+
lists(options?: Options<Record<string, unknown>, '2013'>): {
|
|
395
|
+
get: () => Promise<{
|
|
396
|
+
data: Pick<Record<string, unknown> & Partial<SPItem2013>, string> | Pick<Record<string, unknown> & Partial<SPItem2013>, string>[];
|
|
397
|
+
meta: {
|
|
398
|
+
url: URL;
|
|
399
|
+
};
|
|
400
|
+
}>;
|
|
401
|
+
};
|
|
402
|
+
getDigest(): Promise<string>;
|
|
403
|
+
folders(options?: Folder_Options<Record<string, unknown>>): {
|
|
404
|
+
get: () => Promise<{
|
|
405
|
+
data: any;
|
|
406
|
+
meta: {
|
|
407
|
+
url: URL;
|
|
408
|
+
};
|
|
409
|
+
}>;
|
|
410
|
+
};
|
|
411
|
+
folder(folderName?: string | string[]): {
|
|
412
|
+
get: (options?: Folder_Options<Record<string, unknown>>) => Promise<{
|
|
413
|
+
data: any;
|
|
414
|
+
meta: {
|
|
415
|
+
url: URL;
|
|
416
|
+
};
|
|
417
|
+
}>;
|
|
418
|
+
};
|
|
419
|
+
users(options?: Options<Record<string, unknown>, '2013'>): {
|
|
420
|
+
get: () => Promise<{
|
|
421
|
+
data: Pick<Record<string, unknown> & Partial<SPItem2013>, string> | Pick<Record<string, unknown> & Partial<SPItem2013>, string>[];
|
|
422
|
+
meta: {
|
|
423
|
+
url: URL;
|
|
424
|
+
};
|
|
425
|
+
}>;
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* @deprecated SP.Utilities.Utility.SendEmail was retired by Microsoft on 2025-10-31.
|
|
429
|
+
* Migrate to Microsoft Graph API POST /v1.0/me/sendMail
|
|
430
|
+
* https://learn.microsoft.com/en-us/graph/api/user-sendmail
|
|
431
|
+
*/
|
|
432
|
+
sendEmail(props: EmailProps): Promise<axios.AxiosResponse<{
|
|
433
|
+
d: {
|
|
434
|
+
SendEmail: null;
|
|
435
|
+
};
|
|
436
|
+
}, any, {}>>;
|
|
437
|
+
readonly user: {
|
|
438
|
+
properties: () => {
|
|
439
|
+
get: () => Promise<UserProfile>;
|
|
440
|
+
};
|
|
441
|
+
searchSiteUser: (searchValue: string) => Promise<any>;
|
|
442
|
+
searchUser: (input: string, filter?: string) => Promise<PersonField>;
|
|
443
|
+
current: () => {
|
|
444
|
+
get: () => Promise<CurrentUser>;
|
|
445
|
+
};
|
|
446
|
+
currentPermission: () => {
|
|
447
|
+
get: () => Promise<UserPermision>;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
getCurrentUser(): Promise<CurrentUser>;
|
|
451
|
+
currentUserProperties(): Promise<UserProfile>;
|
|
452
|
+
currentUserPermission(): Promise<UserPermission>;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
declare function createBase<T extends {
|
|
456
|
+
LISTS: Record<string, any>;
|
|
457
|
+
FOLDERS?: Record<string, any>;
|
|
458
|
+
} = any>(): {
|
|
459
|
+
/**
|
|
460
|
+
* @deprecated Use `create` instead.
|
|
461
|
+
*/
|
|
462
|
+
baseURL(url: string, config?: CreateAxiosDefaults): HTTPSharePointRequests<T>;
|
|
463
|
+
create: ({ baseURL, config, }: {
|
|
464
|
+
baseURL: string;
|
|
465
|
+
config?: CreateAxiosDefaults;
|
|
466
|
+
}) => HTTPSharePointRequests<T>;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
export { type ChoiceField, type LookupField, type PersonField, createBase as default };
|