@lindle/sharepoint_requests 0.1.18 → 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.
Files changed (56) hide show
  1. package/README.md +121 -116
  2. package/dist/index.d.mts +469 -0
  3. package/dist/index.d.ts +460 -8
  4. package/dist/index.js +892 -5
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +863 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +5 -5
  9. package/src/index.ts +3 -5
  10. package/src/root/index.ts +281 -146
  11. package/src/root/instance.ts +7 -0
  12. package/src/root/internal/context.ts +2 -3
  13. package/src/root/internal/digest.ts +18 -11
  14. package/src/root/internal/emailRequests.ts +5 -11
  15. package/src/root/internal/listRequests/createAttachment.ts +16 -5
  16. package/src/root/internal/listRequests/createListItem.ts +18 -27
  17. package/src/root/internal/listRequests/deleteFile.ts +5 -5
  18. package/src/root/internal/listRequests/deleteItem.ts +17 -3
  19. package/src/root/internal/listRequests/getFiles.ts +4 -10
  20. package/src/root/internal/listRequests/getListItems.ts +43 -9
  21. package/src/root/internal/listRequests/getOnly.ts +10 -7
  22. package/src/root/internal/listRequests/normalizePayload.ts +1 -1
  23. package/src/root/internal/listRequests/resolveMetadataType.ts +14 -0
  24. package/src/root/internal/listRequests/updateListItem.ts +24 -30
  25. package/src/root/internal/listRequests/uploadFile.ts +13 -21
  26. package/src/root/internal/listRequests/utils.ts +1 -1
  27. package/src/root/internal/odata.ts +2 -4
  28. package/src/root/internal/sharepointUrl.ts +7 -0
  29. package/src/root/internal/userRequests.ts +93 -37
  30. package/src/types.ts +154 -149
  31. package/dist/root/index.d.ts +0 -88
  32. package/dist/root/instance.d.ts +0 -3
  33. package/dist/root/internal/context.d.ts +0 -11
  34. package/dist/root/internal/digest.d.ts +0 -2
  35. package/dist/root/internal/emailRequests.d.ts +0 -10
  36. package/dist/root/internal/listRequests/createAttachment.d.ts +0 -3
  37. package/dist/root/internal/listRequests/createListItem.d.ts +0 -3
  38. package/dist/root/internal/listRequests/deleteFile.d.ts +0 -3
  39. package/dist/root/internal/listRequests/deleteItem.d.ts +0 -3
  40. package/dist/root/internal/listRequests/getFiles.d.ts +0 -8
  41. package/dist/root/internal/listRequests/getListItems.d.ts +0 -8
  42. package/dist/root/internal/listRequests/getOnly.d.ts +0 -3
  43. package/dist/root/internal/listRequests/index.d.ts +0 -9
  44. package/dist/root/internal/listRequests/normalizePayload.d.ts +0 -4
  45. package/dist/root/internal/listRequests/updateListItem.d.ts +0 -3
  46. package/dist/root/internal/listRequests/uploadFile.d.ts +0 -6
  47. package/dist/root/internal/listRequests/utils.d.ts +0 -2
  48. package/dist/root/internal/odata.d.ts +0 -5
  49. package/dist/root/internal/userRequests.d.ts +0 -15
  50. package/dist/sharepoint_requests.cjs.development.js +0 -1325
  51. package/dist/sharepoint_requests.cjs.development.js.map +0 -1
  52. package/dist/sharepoint_requests.cjs.production.min.js +0 -2
  53. package/dist/sharepoint_requests.cjs.production.min.js.map +0 -1
  54. package/dist/sharepoint_requests.esm.js +0 -1318
  55. package/dist/sharepoint_requests.esm.js.map +0 -1
  56. package/dist/types.d.ts +0 -256
package/src/types.ts CHANGED
@@ -1,118 +1,119 @@
1
- export type Metadata = {
2
- id?: string;
3
- type?: string;
4
- uri?: string;
5
- etag?: string;
6
- };
7
-
8
- export type SPItem2010 = {
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
- export type SPItem2013 = {
27
- __metadata: Metadata;
28
- FirstUniqueAncestorSecurableObject: _Deferred;
29
- RoleAssignments: _Deferred;
30
- AttachmentFiles: _Deferred;
31
- ContentType: _Deferred;
32
- GetDlpPolicyTip: _Deferred;
33
- FieldValuesAsHtml: _Deferred;
34
- FieldValuesAsText: _Deferred;
35
- FieldValuesForEdit: _Deferred;
36
- File: _Deferred;
37
- Folder: _Deferred;
38
- ParentList: _Deferred;
39
- FileSystemObjectType: number;
40
- Id: number;
41
- ContentTypeId: string;
42
- Title: string;
43
- PhotoRefId?: number;
44
- ID: number;
45
- Modified: string;
46
- Created: string;
47
- AuthorId: number;
48
- EditorId: number;
49
- OData__UIVersionString?: string;
50
- Attachments: boolean;
51
- GUID: string;
52
- Author?: PersonField & _Deferred;
53
- Editor?: PersonField & _Deferred;
54
- [key: string]: unknown;
55
- };
56
-
57
- export type SPItem<V extends SHAREPOINT_VER = '2013'> = V extends '2010'
58
- ? SPItem2010
59
- : SPItem2013;
60
-
61
- type ListFields<K, V extends SHAREPOINT_VER = '2013'> =
62
- | Extract<keyof K, string>
63
- | Extract<keyof SPItem<V>, string>;
64
-
65
- export interface Options<K = any, V extends SHAREPOINT_VER = '2013'> {
66
- expand?: ListFields<K, V>[] | ListFields<K, V>;
67
- orderBy?: ListFields<K, V> | [ListFields<K, V>, 'asc' | 'desc'];
68
- limit?: number;
69
- filter?: string;
70
- cols?: ListFields<K, V>[] | ListFields<K, V>;
1
+ export type Metadata = {
2
+ id?: string;
3
+ type?: string;
4
+ uri?: string;
5
+ etag?: string;
6
+ };
7
+
8
+ export type SPItem2010 = {
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
+ export type SPItem2013 = {
27
+ __metadata: Metadata;
28
+ FirstUniqueAncestorSecurableObject: _Deferred;
29
+ RoleAssignments: _Deferred;
30
+ AttachmentFiles: _Deferred;
31
+ ContentType: _Deferred;
32
+ GetDlpPolicyTip: _Deferred;
33
+ FieldValuesAsHtml: _Deferred;
34
+ FieldValuesAsText: _Deferred;
35
+ FieldValuesForEdit: _Deferred;
36
+ File: _Deferred;
37
+ Folder: _Deferred;
38
+ ParentList: _Deferred;
39
+ FileSystemObjectType: number;
40
+ Id: number;
41
+ ContentTypeId: string;
42
+ Title: string;
43
+ PhotoRefId?: number;
44
+ ID: number;
45
+ Modified: string;
46
+ Created: string;
47
+ AuthorId: number;
48
+ EditorId: number;
49
+ OData__UIVersionString?: string;
50
+ Attachments: boolean;
51
+ GUID: string;
52
+ Author?: PersonField & _Deferred;
53
+ Editor?: PersonField & _Deferred;
54
+ [key: string]: unknown;
55
+ };
56
+
57
+ export type SPItem<V extends SHAREPOINT_VER = '2013'> = V extends '2010'
58
+ ? SPItem2010
59
+ : SPItem2013;
60
+
61
+ type ListFields<K, V extends SHAREPOINT_VER = '2013'> =
62
+ | Extract<keyof K, string>
63
+ | Extract<keyof SPItem<V>, string>;
64
+
65
+ type OrderByDirection = 'asc' | 'desc';
66
+ type OrderByExpression<F extends string> = F | (F | OrderByDirection)[];
67
+
68
+ export interface Options<K = any, V extends SHAREPOINT_VER = '2013'> {
69
+ expand?: ListFields<K, V>[] | ListFields<K, V>;
70
+ orderBy?: OrderByExpression<ListFields<K, V>>;
71
+ limit?: number;
72
+ filter?: string;
73
+ cols?: ListFields<K, V>[] | ListFields<K, V>;
71
74
  skip?: number;
72
75
  }
73
76
  export interface Folder_Options<K = any> {
74
- type: 'Files' | 'Folders';
77
+ type?: 'Files' | 'Folders';
75
78
  expand?: Extract<keyof K, string>[] | Extract<keyof K, string>;
76
- orderBy?:
77
- | Extract<keyof K, string>
78
- | [Extract<keyof K, string>, 'asc' | 'desc'];
79
+ orderBy?: OrderByExpression<Extract<keyof K, string>>;
79
80
  limit?: number;
80
81
  filter?: string;
81
82
  cols?: Extract<keyof K, string>[] | Extract<keyof K, string>;
82
83
  skip?: number;
83
84
  }
84
85
 
85
- export interface Field_Options<
86
- K,
87
- V extends SHAREPOINT_VER = '2013'
88
- > extends Omit<Options<K, V>, 'filter'> {
89
- fieldName?: Extract<keyof K, string>;
90
- }
86
+ export interface Field_Options<K, V extends SHAREPOINT_VER = '2013'>
87
+ extends Omit<Options<K, V>, 'filter'> {
88
+ fieldName?: Extract<keyof K, string>;
89
+ }
91
90
 
92
91
  export type SHAREPOINT_VER = '2010' | '2013';
93
92
 
94
- export type IListName<T> = Extract<keyof T, string>;
93
+ export type IListName<T> = T extends { LISTS: Record<string, unknown> }
94
+ ? Extract<keyof T['LISTS'], string>
95
+ : Extract<keyof T, string>;
95
96
 
96
- export type ItemID = string | number;
97
- export type CreateFileProps = {
98
- file: File;
99
- itemId: ItemID;
100
- };
101
- export type UploadFileProps = {
102
- file: File;
103
- folderPath?: string | string[];
104
- overwrite?: boolean;
105
- };
106
- export type DeleteFileProps = {
107
- fileName: string;
108
- folderPath?: string | string[];
109
- };
97
+ export type ItemID = string | number;
98
+ export type CreateFileProps = {
99
+ file: File;
100
+ itemId: ItemID;
101
+ };
102
+ export type UploadFileProps = {
103
+ file: File;
104
+ folderPath?: string | string[];
105
+ overwrite?: boolean;
106
+ };
107
+ export type DeleteFileProps = {
108
+ fileName: string;
109
+ folderPath?: string | string[];
110
+ };
110
111
 
111
- export type EmailProps = {
112
- From: string;
113
- To: string[] | string;
114
- Subject?: string;
115
- Body: string;
112
+ export type EmailProps = {
113
+ From: string;
114
+ To: string[] | string;
115
+ Subject?: string;
116
+ Body: string;
116
117
  };
117
118
 
118
119
  export type _Deferred = {
@@ -121,54 +122,55 @@ export type _Deferred = {
121
122
  };
122
123
  };
123
124
 
124
- declare const LOOKUP_FIELD_TAG: unique symbol;
125
- type LookupFieldMarker = {
126
- [LOOKUP_FIELD_TAG]?: true;
127
- };
128
-
129
- export type LookupField<T> = _Deferred & T & LookupFieldMarker;
130
- export type ChoiceField<T> = _Deferred & {
131
- Value: T;
132
- __metadata: Metadata;
133
- };
134
-
135
- type MetadataEnvelope = {
136
- __metadata?: {
137
- type: string;
138
- };
139
- };
140
-
141
- type EnsureRecord<T> = T extends Record<string, unknown>
142
- ? T
143
- : Record<string, unknown>;
144
-
145
- type LookupCreateValue =
146
- | number
147
- | string
148
- | null
149
- | {
150
- lookupId: number | string;
151
- }
152
- | {
153
- LookupId: number | string;
154
- }
155
- | {
156
- results: (number | string)[];
157
- };
158
-
159
- type NormalizeField<T> = T extends LookupField<unknown>
160
- ? LookupCreateValue | LookupField<unknown>
161
- : T;
162
-
163
- export type ListData<T = Record<string, unknown>> = Partial<{
164
- [K in keyof EnsureRecord<T>]: NormalizeField<EnsureRecord<T>[K]>;
165
- }> &
166
- MetadataEnvelope;
167
-
168
- export type PersonField = {
169
- AboutMe?: string;
170
- Account: string;
171
- AccountName: string;
125
+ type LookupFieldMarker = {
126
+ __lookupFieldBrand?: true;
127
+ };
128
+
129
+ export type LookupField<T> = _Deferred & T & LookupFieldMarker;
130
+ export type ChoiceField<T> = _Deferred & {
131
+ Value: T;
132
+ __metadata: Metadata;
133
+ };
134
+
135
+ type MetadataEnvelope = {
136
+ __metadata?: {
137
+ type: string;
138
+ };
139
+ };
140
+
141
+ type EnsureRecord<T> = T extends Record<string, unknown>
142
+ ? T
143
+ : Record<string, unknown>;
144
+
145
+ type LookupCreateValue =
146
+ | number
147
+ | string
148
+ | null
149
+ | {
150
+ lookupId: number | string;
151
+ }
152
+ | {
153
+ LookupId: number | string;
154
+ }
155
+ | {
156
+ results: (number | string)[];
157
+ };
158
+
159
+ type NormalizeField<T> = T extends LookupField<unknown>
160
+ ? LookupCreateValue | LookupField<unknown>
161
+ : T;
162
+
163
+ export type ListData<T = Record<string, unknown>> = Partial<
164
+ {
165
+ [K in keyof EnsureRecord<T>]: NormalizeField<EnsureRecord<T>[K]>;
166
+ }
167
+ > &
168
+ MetadataEnvelope;
169
+
170
+ export type PersonField = {
171
+ AboutMe?: string;
172
+ Account: string;
173
+ AccountName: string;
172
174
  AdministrativeSupervisor: string;
173
175
  AskMeAbout?: string;
174
176
  AskMeAbout0?: string;
@@ -236,7 +238,7 @@ export type MultiPersonField = {
236
238
 
237
239
  export type PermissionLabel = 'Full Control' | 'Edit' | 'Contribute' | 'Read';
238
240
 
239
- export type UserPermision = {
241
+ export type UserPermission = {
240
242
  BasePermissions: {
241
243
  High: string;
242
244
  Low: string;
@@ -253,6 +255,9 @@ export type UserPermision = {
253
255
  __metadata: Metadata;
254
256
  };
255
257
 
258
+ /** @deprecated Use `UserPermission` instead. */
259
+ export type UserPermision = UserPermission;
260
+
256
261
  export type CurrentUser = {
257
262
  Email: string;
258
263
  Id: number;
@@ -1,88 +0,0 @@
1
- import { CreateAxiosDefaults as AxiosConfig } from 'axios';
2
- import { CreateFileProps, DeleteFileProps, CurrentUser, EmailProps, Field_Options, Folder_Options, UploadFileProps, IListName, ItemID, ListData, Options, PersonField, SHAREPOINT_VER, UserPermision, UserProfile } from '../types';
3
- declare class HTTPSharePointRequests<T extends {
4
- LISTS: Record<string, unknown>;
5
- FOLDERS?: Record<string, unknown>;
6
- }> {
7
- private baseURL;
8
- private endpoint;
9
- private listName;
10
- private instance;
11
- private sharepointVersion;
12
- private listItemEntityTypeFullName?;
13
- constructor(baseURL: string, config?: AxiosConfig);
14
- private getContext;
15
- private resolveListItemEntityTypeFullName;
16
- /**
17
- * @deprecated Use `from` instead.
18
- */
19
- list(listName: IListName<T>): this;
20
- readonly lists: {
21
- get: () => Promise<{
22
- data: Partial<import("../types").SPItem2013>[];
23
- meta: {
24
- url: URL;
25
- };
26
- }>;
27
- };
28
- getDigest(): Promise<string>;
29
- from<K extends Extract<keyof T['LISTS'], string>, V extends SHAREPOINT_VER = '2013'>(listName: K, sharepoint_ver?: V): {
30
- create: (data: ListData<T["LISTS"][K]>) => Promise<import("axios").AxiosResponse<any, any, {}>>;
31
- get: (options?: Options<T["LISTS"][K], V>) => Promise<{
32
- data: (T["LISTS"][K] & Partial<import("../types").SPItem<V>>)[];
33
- meta: {
34
- url: URL;
35
- };
36
- }>;
37
- update: (id: ItemID, data: ListData<T["LISTS"][K]>, digest?: string) => Promise<import("axios").AxiosResponse<any, any, {}>>;
38
- delete: (id: ItemID) => Promise<import("axios").AxiosResponse<any, any, {}>>;
39
- createFile: (props: CreateFileProps) => Promise<import("axios").AxiosResponse<any, any, {}>>;
40
- uploadFile: (props: UploadFileProps) => Promise<import("axios").AxiosResponse<any, any, {}> & {
41
- itemId?: ItemID;
42
- }>;
43
- deleteFile: (props: DeleteFileProps) => Promise<import("axios").AxiosResponse<any, any, {}>>;
44
- fields: (options?: Field_Options<T["LISTS"][K], V>) => {
45
- get: () => Promise<any>;
46
- };
47
- };
48
- folders: {
49
- get: () => void;
50
- };
51
- folder(folderName?: string | string[]): {
52
- get: (options?: Folder_Options<any>) => Promise<{
53
- data: any;
54
- meta: {
55
- url: URL;
56
- };
57
- }>;
58
- };
59
- users(options?: Options<any>): {
60
- get: () => Promise<{
61
- data: any[];
62
- meta: {
63
- url: URL;
64
- };
65
- }>;
66
- };
67
- email: {
68
- send: (props: EmailProps) => Promise<import("axios").AxiosResponse<{
69
- d: {
70
- SendEmail: null;
71
- };
72
- }, any, {}>>;
73
- };
74
- user: {
75
- properties: () => {
76
- get: () => Promise<UserProfile>;
77
- };
78
- searchSiteUser: (searchValue: string) => Promise<any>;
79
- searchUser: (input: string, filter?: string) => Promise<PersonField>;
80
- current: () => {
81
- get: () => Promise<CurrentUser>;
82
- };
83
- currentPermission: () => {
84
- get: () => Promise<UserPermision>;
85
- };
86
- };
87
- }
88
- export default HTTPSharePointRequests;
@@ -1,3 +0,0 @@
1
- import { CreateAxiosDefaults as AxiosConfig } from 'axios';
2
- export declare const instance: (baseURL: string, config?: AxiosConfig) => import("axios").AxiosInstance;
3
- export default instance;
@@ -1,11 +0,0 @@
1
- import type { AxiosInstance } from 'axios';
2
- import type { SHAREPOINT_VER } from '../../types';
3
- export interface RequestContext<V extends SHAREPOINT_VER = '2013'> {
4
- instance: AxiosInstance;
5
- baseURL: string;
6
- endpoint: string;
7
- listName: string;
8
- sharepointVersion: V;
9
- listItemEntityTypeFullName?: string;
10
- resolveListItemEntityType?: () => Promise<string>;
11
- }
@@ -1,2 +0,0 @@
1
- import type { AxiosInstance } from 'axios';
2
- export declare function fetchDigest(instance: AxiosInstance, baseURL: string): Promise<string>;
@@ -1,10 +0,0 @@
1
- import type { AxiosResponse } from 'axios';
2
- import type { EmailProps } from '../../types';
3
- import type { RequestContext } from './context';
4
- type SendEmailResponse = AxiosResponse<{
5
- d: {
6
- SendEmail: null;
7
- };
8
- }>;
9
- export declare function sendEmail(context: RequestContext, { From, To, Subject, Body }: EmailProps): Promise<SendEmailResponse>;
10
- export {};
@@ -1,3 +0,0 @@
1
- import type { CreateFileProps, SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function createAttachment<V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, { file, itemId }: CreateFileProps): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -1,3 +0,0 @@
1
- import type { ListData, SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function createListItem<D = Record<string, unknown>, V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, listData: ListData<D>): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -1,3 +0,0 @@
1
- import type { SHAREPOINT_VER, DeleteFileProps } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function deleteFile<V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, { fileName, folderPath }: DeleteFileProps): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -1,3 +0,0 @@
1
- import type { SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function deleteItem<V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, id: number | string): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -1,8 +0,0 @@
1
- import type { Folder_Options, SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function getFiles<T, V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, options?: Folder_Options<T>): Promise<{
4
- data: any;
5
- meta: {
6
- url: URL;
7
- };
8
- }>;
@@ -1,8 +0,0 @@
1
- import type { Options, SPItem, SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function getListItems<K, V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, options?: Options<K, V>): Promise<{
4
- data: (K & Partial<SPItem<V>>)[];
5
- meta: {
6
- url: URL;
7
- };
8
- }>;
@@ -1,3 +0,0 @@
1
- import type { AxiosInstance } from 'axios';
2
- import type { Options, SHAREPOINT_VER } from '../../../types';
3
- export declare function getOnly<T, V extends SHAREPOINT_VER = '2013'>(instance: AxiosInstance, endpoint: string, options?: Options<T, V>): Promise<any>;
@@ -1,9 +0,0 @@
1
- export { createListItem } from './createListItem';
2
- export { createAttachment } from './createAttachment';
3
- export { deleteItem } from './deleteItem';
4
- export { deleteFile } from './deleteFile';
5
- export { getFiles } from './getFiles';
6
- export { getListItems } from './getListItems';
7
- export { getOnly } from './getOnly';
8
- export { updateListItem } from './updateListItem';
9
- export { uploadFile } from './uploadFile';
@@ -1,4 +0,0 @@
1
- import type { ListData } from '../../../types';
2
- type AnyRecord = Record<string, unknown>;
3
- export declare function normalizeListPayload<D = Record<string, unknown>>(data: ListData<D>): AnyRecord;
4
- export {};
@@ -1,3 +0,0 @@
1
- import type { ListData, SHAREPOINT_VER } from '../../../types';
2
- import type { RequestContext } from '../context';
3
- export declare function updateListItem<D = Record<string, unknown>, V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, id: number | string, data: ListData<D>, digest?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -1,6 +0,0 @@
1
- import type { AxiosResponse } from 'axios';
2
- import type { ItemID, SHAREPOINT_VER, UploadFileProps } from '../../../types';
3
- import type { RequestContext } from '../context';
4
- export declare function uploadFile<V extends SHAREPOINT_VER = '2013'>(context: RequestContext<V>, { file, folderPath, overwrite }: UploadFileProps): Promise<AxiosResponse & {
5
- itemId?: ItemID;
6
- }>;
@@ -1,2 +0,0 @@
1
- export declare function buildLibraryPath(folderPath?: string | string[]): string;
2
- export declare function encodeFileName(fileName: string): string;
@@ -1,5 +0,0 @@
1
- import type { Folder_Options, Options, SHAREPOINT_VER } from '../../types';
2
- type QueryableOptions<T, V extends SHAREPOINT_VER = '2013'> = Options<T, V> | Folder_Options<T>;
3
- export declare function buildODataParams<T, V extends SHAREPOINT_VER = '2013'>(options: QueryableOptions<T, V> | undefined, orderBySeparator?: ',' | ' '): Record<string, string | number>;
4
- export declare function appendParamsToUrl(baseUrl: URL, params: Record<string, string | number | undefined | null>): void;
5
- export {};
@@ -1,15 +0,0 @@
1
- import type { AxiosInstance } from 'axios';
2
- import type { PersonField, UserPermision, UserProfile } from '../../types';
3
- import type { RequestContext } from './context';
4
- type RoleDefinition = {
5
- BasePermissions: {
6
- High: string;
7
- };
8
- };
9
- export declare function typeAhead(instance: AxiosInstance, input: string, filter?: string): Promise<PersonField>;
10
- export declare function currentUserProperties(instance: AxiosInstance): Promise<UserProfile>;
11
- export declare function getSiteUser(instance: AxiosInstance, searchValue: string): Promise<any>;
12
- export declare function roleDefinitions(instance: AxiosInstance): Promise<RoleDefinition[]>;
13
- export declare function getEffectiveBasePermissions(instance: AxiosInstance): Promise<any>;
14
- export declare function currentUserPermissions(context: RequestContext): Promise<UserPermision>;
15
- export {};