microsoft-graph 3.12.23 → 3.12.25
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/cjs/operations/driveItem/createDriveItemLink.d.ts.map +1 -1
- package/dist/cjs/operations/driveItem/createDriveItemLink.js +2 -0
- package/dist/cjs/operations/driveItem/findDriveItem.d.ts +28 -0
- package/dist/cjs/operations/driveItem/findDriveItem.d.ts.map +1 -0
- package/dist/cjs/operations/driveItem/findDriveItem.js +56 -0
- package/dist/cjs/services/http.d.ts +1 -1
- package/dist/cjs/services/http.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/createDriveItemLink.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/createDriveItemLink.js +2 -0
- package/dist/esm/operations/driveItem/findDriveItem.d.ts +28 -0
- package/dist/esm/operations/driveItem/findDriveItem.d.ts.map +1 -0
- package/dist/esm/operations/driveItem/findDriveItem.js +50 -0
- package/dist/esm/services/http.d.ts +1 -1
- package/dist/esm/services/http.d.ts.map +1 -1
- package/docs/api/BadRequestError.md +4 -4
- package/docs/api/BadTemplateError.md +4 -4
- package/docs/api/BandwidthLimitExceededError.md +4 -4
- package/docs/api/ConflictError.md +4 -4
- package/docs/api/EnvironmentVariableMissingError.md +4 -4
- package/docs/api/ForbiddenError.md +4 -4
- package/docs/api/GatewayTimeoutError.md +4 -4
- package/docs/api/GoneError.md +4 -4
- package/docs/api/InconsistentContextError.md +4 -4
- package/docs/api/InsufficientStorageError.md +4 -4
- package/docs/api/InternalServerError.md +4 -4
- package/docs/api/InvalidArgumentError.md +4 -4
- package/docs/api/InvalidOperationError.md +4 -4
- package/docs/api/LengthRequiredError.md +4 -4
- package/docs/api/LockedError.md +4 -4
- package/docs/api/MethodNotAllowedError.md +4 -4
- package/docs/api/NeverError.md +4 -4
- package/docs/api/NotAcceptableError.md +4 -4
- package/docs/api/NotFoundError.md +4 -4
- package/docs/api/NotImplementedError.md +4 -4
- package/docs/api/PaymentRequiredError.md +4 -4
- package/docs/api/PreconditionFailedError.md +4 -4
- package/docs/api/ProtocolError.md +4 -4
- package/docs/api/README.md +1 -0
- package/docs/api/RequestEntityTooLargeError.md +4 -4
- package/docs/api/RequestFailedError.md +4 -4
- package/docs/api/RequestTimeoutError.md +4 -4
- package/docs/api/RequestedRangeNotSatisfiableError.md +4 -4
- package/docs/api/ServiceUnavailableError.md +4 -4
- package/docs/api/TooManyRequestsError.md +4 -4
- package/docs/api/UnauthorizedError.md +4 -4
- package/docs/api/UnprocessableEntityError.md +4 -4
- package/docs/api/UnsupportedAddressTypeError.md +4 -4
- package/docs/api/UnsupportedMediaTypeError.md +4 -4
- package/docs/api/createDriveItemContent.md +1 -1
- package/docs/api/findDriveItem.md +64 -0
- package/docs/api/http.md +2 -2
- package/docs/api/streamDriveItemContent.md +2 -2
- package/package.json +18 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,CAqBlI"}
|
|
@@ -22,8 +22,10 @@ function createDriveItemLink(itemRef, options) {
|
|
|
22
22
|
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
23
23
|
if (scope)
|
|
24
24
|
body["scope"] = scope;
|
|
25
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
25
26
|
if (password)
|
|
26
27
|
body["password"] = password;
|
|
28
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
27
29
|
if (expirationDateTime)
|
|
28
30
|
body["expirationDateTime"] = expirationDateTime;
|
|
29
31
|
return (0, operationInvoker_ts_1.operation)({
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
|
+
import type { DriveItemPath, DriveItemRef } from "../../models/DriveItem.ts";
|
|
9
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
10
|
+
export type FindDriveItemResponse = {
|
|
11
|
+
value: DriveItem[];
|
|
12
|
+
"@odata.nextLink"?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveItemSearchList = {
|
|
15
|
+
items: (DriveItem & DriveItemRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
20
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
21
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
22
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
23
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
24
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
25
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
26
|
+
*/
|
|
27
|
+
export default function findDriveItem(parentRef: DriveRef, query: string, parentPath?: DriveItemPath, take?: number): GraphOperation<DriveItemSearchList>;
|
|
28
|
+
//# sourceMappingURL=findDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/findDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,aAAoC,EAAE,IAAI,SAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAmC3K"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Search for drive items under a given parent path.
|
|
4
|
+
* @module findDriveItem
|
|
5
|
+
* @category Operations
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.default = findDriveItem;
|
|
12
|
+
const InvalidArgumentError_ts_1 = __importDefault(require("../../errors/InvalidArgumentError.js"));
|
|
13
|
+
const driveItem_ts_1 = require("../../services/driveItem.js");
|
|
14
|
+
const operationInvoker_ts_1 = require("../../services/operationInvoker.js");
|
|
15
|
+
const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
16
|
+
/**
|
|
17
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
18
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
19
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
20
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
21
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
22
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
23
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
24
|
+
*/
|
|
25
|
+
function findDriveItem(parentRef, query, parentPath = "/", take = 100) {
|
|
26
|
+
if (!parentPath.startsWith("/")) {
|
|
27
|
+
throw new InvalidArgumentError_ts_1.default("parentPath must start with a forward slash (/)");
|
|
28
|
+
}
|
|
29
|
+
if (take <= 0) {
|
|
30
|
+
throw new InvalidArgumentError_ts_1.default("take must be greater than 0");
|
|
31
|
+
}
|
|
32
|
+
const encodedParentPath = parentPath
|
|
33
|
+
.split("/")
|
|
34
|
+
.map((seg, i) => (i === 0 ? seg : encodeURIComponent(seg)))
|
|
35
|
+
.join("/");
|
|
36
|
+
const encodedQuery = encodeURIComponent(query);
|
|
37
|
+
const scopeSegment = encodedParentPath === "/" ? "/root" : `/root:${encodedParentPath}:`;
|
|
38
|
+
const searchPath = `/sites/{site-id}/drives/{drive-id}${scopeSegment}/search(q='${encodedQuery}')?$top=${take}`;
|
|
39
|
+
return (0, operationInvoker_ts_1.operation)({
|
|
40
|
+
context: parentRef.context,
|
|
41
|
+
method: "GET",
|
|
42
|
+
path: (0, templatedPaths_ts_1.generatePath)(searchPath, parentRef),
|
|
43
|
+
headers: {},
|
|
44
|
+
body: null,
|
|
45
|
+
responseTransform: (response) => {
|
|
46
|
+
const result = response;
|
|
47
|
+
return {
|
|
48
|
+
items: (result.value ?? []).map((item) => ({
|
|
49
|
+
...item,
|
|
50
|
+
...(0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id),
|
|
51
|
+
})),
|
|
52
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -14,5 +14,5 @@ export type Request = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare function execute<TResponse>(request: Request): Promise<TResponse>;
|
|
16
16
|
export declare function throwHttpException(responseCode: number, message: string): never;
|
|
17
|
-
export declare function executeRaw(request: Request): Promise<AxiosResponse<any, any>>;
|
|
17
|
+
export declare function executeRaw(request: Request): Promise<AxiosResponse<any, any, {}>>;
|
|
18
18
|
//# sourceMappingURL=http.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/services/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAc,EAA+C,KAAK,aAAa,EAA4B,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA0BzK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkCpD,MAAM,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAkD7E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAwE/E;AAID,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/services/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAc,EAA+C,KAAK,aAAa,EAA4B,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA0BzK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkCpD,MAAM,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAkD7E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAwE/E;AAID,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,wCAMhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,CAqBlI"}
|
|
@@ -19,8 +19,10 @@ export default function createDriveItemLink(itemRef, options) {
|
|
|
19
19
|
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
20
20
|
if (scope)
|
|
21
21
|
body["scope"] = scope;
|
|
22
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
22
23
|
if (password)
|
|
23
24
|
body["password"] = password;
|
|
25
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
24
26
|
if (expirationDateTime)
|
|
25
27
|
body["expirationDateTime"] = expirationDateTime;
|
|
26
28
|
return operation({
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
|
+
import type { DriveItemPath, DriveItemRef } from "../../models/DriveItem.ts";
|
|
9
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
10
|
+
export type FindDriveItemResponse = {
|
|
11
|
+
value: DriveItem[];
|
|
12
|
+
"@odata.nextLink"?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveItemSearchList = {
|
|
15
|
+
items: (DriveItem & DriveItemRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
20
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
21
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
22
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
23
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
24
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
25
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
26
|
+
*/
|
|
27
|
+
export default function findDriveItem(parentRef: DriveRef, query: string, parentPath?: DriveItemPath, take?: number): GraphOperation<DriveItemSearchList>;
|
|
28
|
+
//# sourceMappingURL=findDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/findDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,aAAoC,EAAE,IAAI,SAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAmC3K"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import InvalidArgumentError from "../../errors/InvalidArgumentError.js";
|
|
7
|
+
import { createDriveItemRef } from "../../services/driveItem.js";
|
|
8
|
+
import { operation } from "../../services/operationInvoker.js";
|
|
9
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
10
|
+
/**
|
|
11
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
12
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
13
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
14
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
15
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
16
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
17
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
18
|
+
*/
|
|
19
|
+
export default function findDriveItem(parentRef, query, parentPath = "/", take = 100) {
|
|
20
|
+
if (!parentPath.startsWith("/")) {
|
|
21
|
+
throw new InvalidArgumentError("parentPath must start with a forward slash (/)");
|
|
22
|
+
}
|
|
23
|
+
if (take <= 0) {
|
|
24
|
+
throw new InvalidArgumentError("take must be greater than 0");
|
|
25
|
+
}
|
|
26
|
+
const encodedParentPath = parentPath
|
|
27
|
+
.split("/")
|
|
28
|
+
.map((seg, i) => (i === 0 ? seg : encodeURIComponent(seg)))
|
|
29
|
+
.join("/");
|
|
30
|
+
const encodedQuery = encodeURIComponent(query);
|
|
31
|
+
const scopeSegment = encodedParentPath === "/" ? "/root" : `/root:${encodedParentPath}:`;
|
|
32
|
+
const searchPath = `/sites/{site-id}/drives/{drive-id}${scopeSegment}/search(q='${encodedQuery}')?$top=${take}`;
|
|
33
|
+
return operation({
|
|
34
|
+
context: parentRef.context,
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: generatePath(searchPath, parentRef),
|
|
37
|
+
headers: {},
|
|
38
|
+
body: null,
|
|
39
|
+
responseTransform: (response) => {
|
|
40
|
+
const result = response;
|
|
41
|
+
return {
|
|
42
|
+
items: (result.value ?? []).map((item) => ({
|
|
43
|
+
...item,
|
|
44
|
+
...createDriveItemRef(parentRef, item.id),
|
|
45
|
+
})),
|
|
46
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -14,5 +14,5 @@ export type Request = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare function execute<TResponse>(request: Request): Promise<TResponse>;
|
|
16
16
|
export declare function throwHttpException(responseCode: number, message: string): never;
|
|
17
|
-
export declare function executeRaw(request: Request): Promise<AxiosResponse<any, any>>;
|
|
17
|
+
export declare function executeRaw(request: Request): Promise<AxiosResponse<any, any, {}>>;
|
|
18
18
|
//# sourceMappingURL=http.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/services/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAc,EAA+C,KAAK,aAAa,EAA4B,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA0BzK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkCpD,MAAM,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAkD7E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAwE/E;AAID,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/services/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAc,EAA+C,KAAK,aAAa,EAA4B,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA0BzK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkCpD,MAAM,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAkD7E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAwE/E;AAID,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,wCAMhD"}
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -86,7 +86,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
86
86
|
|
|
87
87
|
> `static` **stackTraceLimit**: `number`
|
|
88
88
|
|
|
89
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
89
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
90
90
|
|
|
91
91
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
92
92
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -108,7 +108,7 @@ not capture any frames.
|
|
|
108
108
|
|
|
109
109
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
110
110
|
|
|
111
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
111
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
112
112
|
|
|
113
113
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
114
114
|
a string representing the location in the code at which
|
|
@@ -173,14 +173,14 @@ a();
|
|
|
173
173
|
|
|
174
174
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
175
175
|
|
|
176
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
176
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
177
177
|
|
|
178
178
|
###### Parameters
|
|
179
179
|
|
|
180
180
|
| Parameter | Type |
|
|
181
181
|
| ------ | ------ |
|
|
182
182
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
183
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
183
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
184
184
|
|
|
185
185
|
###### Returns
|
|
186
186
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -84,7 +84,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
84
84
|
|
|
85
85
|
> `static` **stackTraceLimit**: `number`
|
|
86
86
|
|
|
87
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
87
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
88
88
|
|
|
89
89
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
90
90
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -106,7 +106,7 @@ not capture any frames.
|
|
|
106
106
|
|
|
107
107
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
108
108
|
|
|
109
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
109
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
110
110
|
|
|
111
111
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
112
112
|
a string representing the location in the code at which
|
|
@@ -171,14 +171,14 @@ a();
|
|
|
171
171
|
|
|
172
172
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
173
173
|
|
|
174
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
174
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
175
175
|
|
|
176
176
|
###### Parameters
|
|
177
177
|
|
|
178
178
|
| Parameter | Type |
|
|
179
179
|
| ------ | ------ |
|
|
180
180
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
181
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
181
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
182
182
|
|
|
183
183
|
###### Returns
|
|
184
184
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
package/docs/api/GoneError.md
CHANGED
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|
|
@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
|
82
82
|
|
|
83
83
|
> `static` **stackTraceLimit**: `number`
|
|
84
84
|
|
|
85
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
85
|
+
Defined in: node\_modules/@types/node/globals.d.ts:68
|
|
86
86
|
|
|
87
87
|
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
88
88
|
collected by a stack trace (whether generated by `new Error().stack` or
|
|
@@ -104,7 +104,7 @@ not capture any frames.
|
|
|
104
104
|
|
|
105
105
|
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
106
106
|
|
|
107
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
107
|
+
Defined in: node\_modules/@types/node/globals.d.ts:52
|
|
108
108
|
|
|
109
109
|
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
110
110
|
a string representing the location in the code at which
|
|
@@ -169,14 +169,14 @@ a();
|
|
|
169
169
|
|
|
170
170
|
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
171
171
|
|
|
172
|
-
Defined in: node\_modules/@types/node/globals.d.ts:
|
|
172
|
+
Defined in: node\_modules/@types/node/globals.d.ts:56
|
|
173
173
|
|
|
174
174
|
###### Parameters
|
|
175
175
|
|
|
176
176
|
| Parameter | Type |
|
|
177
177
|
| ------ | ------ |
|
|
178
178
|
| `err` | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
179
|
-
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/
|
|
179
|
+
| `stackTraces` | [`CallSite`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L77)[] |
|
|
180
180
|
|
|
181
181
|
###### Returns
|
|
182
182
|
|