@lindle/sharepoint_requests 0.1.9-beta.0 → 0.1.10

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/README.md CHANGED
@@ -7,7 +7,7 @@ This package is a TypeScript library for interacting with SharePoint REST APIs.
7
7
  Install the package using npm:
8
8
 
9
9
  ```bash
10
- npm install sharepoint-requests
10
+ npm install @lindle/sharepoint_requests
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -15,7 +15,7 @@ npm install sharepoint-requests
15
15
  ### Create a SharePoint Request Instance
16
16
 
17
17
  ```typescript
18
- import createBase from 'sharepoint-requests';
18
+ import createBase from '@lindle/sharepoint_requests';
19
19
 
20
20
  const sharepoint = createBase().create({
21
21
  baseURL: 'https://your-sharepoint-site.com',
@@ -23,16 +23,16 @@ declare class HTTPSharePointRequests<T extends {
23
23
  }>;
24
24
  };
25
25
  from<K extends Extract<keyof T['LISTS'], string>>(listName: K, sharepoint_ver?: SHAREPOINT_VER): {
26
- create: (data: ListData) => Promise<AxiosResponse<any, any>>;
26
+ create: (data: ListData) => Promise<AxiosResponse<any, any, {}>>;
27
27
  get: (options?: Options<T['LISTS'][K]>) => Promise<{
28
28
  data: (T["LISTS"][K] & Partial<SPItem>)[];
29
29
  meta: {
30
30
  url: URL;
31
31
  };
32
32
  }>;
33
- update: (id: ItemID, data: ListData, digest?: string) => Promise<AxiosResponse<any, any>>;
34
- delete: (id: ItemID) => Promise<AxiosResponse<any, any>>;
35
- createFile: (props: CreateFileProps) => Promise<AxiosResponse<any, any>>;
33
+ update: (id: ItemID, data: ListData, digest?: string) => Promise<AxiosResponse<any, any, {}>>;
34
+ delete: (id: ItemID) => Promise<AxiosResponse<any, any, {}>>;
35
+ createFile: (props: CreateFileProps) => Promise<AxiosResponse<any, any, {}>>;
36
36
  fields: (options?: Field_Options<T['LISTS'][K]>) => {
37
37
  get: () => Promise<any>;
38
38
  };
@@ -48,8 +48,8 @@ declare class HTTPSharePointRequests<T extends {
48
48
  };
49
49
  }>;
50
50
  };
51
- users: {
52
- get: (options?: Options<any>) => Promise<{
51
+ users(options?: Options<any>): {
52
+ get: () => Promise<{
53
53
  data: any[];
54
54
  meta: {
55
55
  url: URL;
@@ -99,7 +99,7 @@ declare class HTTPSharePointRequests<T extends {
99
99
  d: {
100
100
  SendEmail: null;
101
101
  };
102
- }, any>>;
102
+ }, any, {}>>;
103
103
  };
104
104
  private sendEmail;
105
105
  private typeAhead;
@@ -0,0 +1,3 @@
1
+ import { CreateAxiosDefaults } from 'axios';
2
+ export declare const instance: (baseURL: string, config?: CreateAxiosDefaults) => import("axios").AxiosInstance;
3
+ export default instance;