Skip to content

Commit

Permalink
Fixed the intellisense for a site.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjandatta committed Dec 13, 2024
1 parent e621c56 commit fe35ad2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
9 changes: 4 additions & 5 deletions @types/v2/sites.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { IBaseExecution, IBaseQuery } from "gd-sprest-def/lib/base";
import { sites } from "gd-sprest-def/lib/Microsoft/Graph/api";
import {
drive, driveMethods, listItem, listItemMethods,
list, listMethods, siteMethods
drive, driveMethods, list, listMethods,
listItem, listItemMethods, site, siteMethods
} from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
import { ITargetInfoProps } from "../utils";

Expand Down Expand Up @@ -56,7 +55,7 @@ export interface Isites {
* @param webId - (Optional) The sub-site id to target.
* @param targetInfo - (Optional) The target information.
*/
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): siteMethods & sites;
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<site> & siteMethods;

/** Returns the current web. */
static getCurrentWeb(): IBaseQuery<site> & siteMethods;
Expand All @@ -65,7 +64,7 @@ export interface Isites {
static getDrive(props: IsiteGetDriveProps): PromiseLike<IBaseQuery<drive> & driveMethods>;

/** Returns a drive for a site. */
static getFile(props: IsiteProps & { fileUrl: string }): PromiseLike<IBaseQuery<item> & itemMethods>;
static getFile(props: IsiteProps & { fileUrl: string }): PromiseLike<IBaseQuery<driveItem> & driveItemMethods>;

/** Returns a list for a site. */
static getList(props: IsiteProps & { listId?: string }): PromiseLike<IBaseQuery<list> & listMethods>;
Expand Down
10 changes: 4 additions & 6 deletions dist/gd-sprest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// ../gd-sprest-def/base
// ../gd-sprest-def/lib/SP/Taxonomy/entitytypes
// ../gd-sprest-def/lib/Microsoft/Graph/entityTypes
// ../gd-sprest-def/lib/Microsoft/Graph/api
// ../gd-sprest-def/lib/SP/UI/ApplicationPages/complextypes
// ../gd-sprest-def/lib/Microsoft/SharePoint/Utilities
// ../gd-sprest-def/lib/SP
Expand Down Expand Up @@ -4513,10 +4512,9 @@ declare module 'gd-sprest/v2/drives' {

declare module 'gd-sprest/v2/sites' {
import { IBaseExecution, IBaseQuery } from "gd-sprest-def/lib/base";
import { sites } from "gd-sprest-def/lib/Microsoft/Graph/api";
import {
drive, driveMethods, listItem, listItemMethods,
list, listMethods, siteMethods
drive, driveMethods, list, listMethods,
listItem, listItemMethods, site, siteMethods
} from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
import { ITargetInfoProps } from "gd-sprest/utils";

Expand Down Expand Up @@ -4570,7 +4568,7 @@ declare module 'gd-sprest/v2/sites' {
* @param webId - (Optional) The sub-site id to target.
* @param targetInfo - (Optional) The target information.
*/
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): siteMethods & sites;
(props?: { siteId?: string, webId?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<site> & siteMethods;

/** Returns the current web. */
static getCurrentWeb(): IBaseQuery<site> & siteMethods;
Expand All @@ -4579,7 +4577,7 @@ declare module 'gd-sprest/v2/sites' {
static getDrive(props: IsiteGetDriveProps): PromiseLike<IBaseQuery<drive> & driveMethods>;

/** Returns a drive for a site. */
static getFile(props: IsiteProps & { fileUrl: string }): PromiseLike<IBaseQuery<item> & itemMethods>;
static getFile(props: IsiteProps & { fileUrl: string }): PromiseLike<IBaseQuery<driveItem> & driveItemMethods>;

/** Returns a list for a site. */
static getList(props: IsiteProps & { listId?: string }): PromiseLike<IBaseQuery<list> & listMethods>;
Expand Down
2 changes: 1 addition & 1 deletion dist/gd-sprest.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gd-sprest.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gd-sprest",
"version": "8.5.8",
"version": "8.5.9",
"description": "An easy way to develop against the SharePoint REST API.",
"author": "Gunjan Datta <[email protected]> (https://gunjandatta.github.io)",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IREST } from "../@types";
* SharePoint REST Library
*/
export const $REST: IREST = {
__ver: 8.58,
__ver: 8.59,
AppContext: (siteUrl: string) => { return Lib.Site.getAppContext(siteUrl); },
Apps: Lib.Apps,
ContextInfo: Lib.ContextInfo,
Expand Down

0 comments on commit fe35ad2

Please sign in to comment.