microsoft-graph 2.35.0 → 2.36.0
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/.vscode/settings.json +8 -1
- package/dist/cjs/errors/BadRequestError.d.ts +9 -0
- package/dist/cjs/errors/BadRequestError.d.ts.map +1 -0
- package/dist/cjs/errors/BadRequestError.js +14 -0
- package/dist/cjs/errors/BandwidthLimitExceededError.d.ts +9 -0
- package/dist/cjs/errors/BandwidthLimitExceededError.d.ts.map +1 -0
- package/dist/cjs/errors/BandwidthLimitExceededError.js +14 -0
- package/dist/cjs/errors/ConflictError.d.ts +10 -0
- package/dist/cjs/errors/ConflictError.d.ts.map +1 -0
- package/dist/cjs/errors/ConflictError.js +15 -0
- package/dist/cjs/errors/ForbiddenError.d.ts +11 -0
- package/dist/cjs/errors/ForbiddenError.d.ts.map +1 -0
- package/dist/cjs/errors/ForbiddenError.js +16 -0
- package/dist/cjs/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/cjs/errors/GatewayTimeoutError.d.ts.map +1 -0
- package/dist/cjs/errors/GatewayTimeoutError.js +14 -0
- package/dist/cjs/errors/GoneError.d.ts +9 -0
- package/dist/cjs/errors/GoneError.d.ts.map +1 -0
- package/dist/cjs/errors/GoneError.js +14 -0
- package/dist/cjs/errors/InsufficientStorageError.d.ts +9 -0
- package/dist/cjs/errors/InsufficientStorageError.d.ts.map +1 -0
- package/dist/cjs/errors/InsufficientStorageError.js +14 -0
- package/dist/cjs/errors/InternalServerError.d.ts +9 -0
- package/dist/cjs/errors/InternalServerError.d.ts.map +1 -0
- package/dist/cjs/errors/InternalServerError.js +14 -0
- package/dist/cjs/errors/LengthRequiredError.d.ts +9 -0
- package/dist/cjs/errors/LengthRequiredError.d.ts.map +1 -0
- package/dist/cjs/errors/LengthRequiredError.js +14 -0
- package/dist/cjs/errors/LockedError.d.ts +9 -0
- package/dist/cjs/errors/LockedError.d.ts.map +1 -0
- package/dist/cjs/errors/LockedError.js +14 -0
- package/dist/cjs/errors/MethodNotAllowedError.d.ts +9 -0
- package/dist/cjs/errors/MethodNotAllowedError.d.ts.map +1 -0
- package/dist/cjs/errors/MethodNotAllowedError.js +14 -0
- package/dist/cjs/errors/NotAcceptableError.d.ts +9 -0
- package/dist/cjs/errors/NotAcceptableError.d.ts.map +1 -0
- package/dist/cjs/errors/NotAcceptableError.js +14 -0
- package/dist/cjs/errors/PaymentRequiredError.d.ts +9 -0
- package/dist/cjs/errors/PaymentRequiredError.d.ts.map +1 -0
- package/dist/cjs/errors/PaymentRequiredError.js +14 -0
- package/dist/cjs/errors/PreconditionFailedError.d.ts +9 -0
- package/dist/cjs/errors/PreconditionFailedError.d.ts.map +1 -0
- package/dist/cjs/errors/PreconditionFailedError.js +14 -0
- package/dist/cjs/errors/RequestEntityTooLargeError.d.ts +9 -0
- package/dist/cjs/errors/RequestEntityTooLargeError.d.ts.map +1 -0
- package/dist/cjs/errors/RequestEntityTooLargeError.js +14 -0
- package/dist/cjs/errors/RequestFailedError.d.ts +1 -2
- package/dist/cjs/errors/RequestFailedError.d.ts.map +1 -1
- package/dist/cjs/errors/RequestFailedError.js +1 -8
- package/dist/cjs/errors/RequestedRangeNotSatisfiableError.d.ts +9 -0
- package/dist/cjs/errors/RequestedRangeNotSatisfiableError.d.ts.map +1 -0
- package/dist/cjs/errors/RequestedRangeNotSatisfiableError.js +14 -0
- package/dist/cjs/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/cjs/errors/ServiceUnavailableError.d.ts.map +1 -0
- package/dist/cjs/errors/ServiceUnavailableError.js +14 -0
- package/dist/cjs/errors/TooManyRequestsError.d.ts +9 -0
- package/dist/cjs/errors/TooManyRequestsError.d.ts.map +1 -0
- package/dist/cjs/errors/TooManyRequestsError.js +14 -0
- package/dist/cjs/errors/UnauthorizedError.d.ts +9 -0
- package/dist/cjs/errors/UnauthorizedError.d.ts.map +1 -0
- package/dist/cjs/errors/UnauthorizedError.js +14 -0
- package/dist/cjs/errors/UnprocessableEntityError.d.ts +9 -0
- package/dist/cjs/errors/UnprocessableEntityError.d.ts.map +1 -0
- package/dist/cjs/errors/UnprocessableEntityError.js +14 -0
- package/dist/cjs/errors/UnsupportedMediaTypeError.d.ts +9 -0
- package/dist/cjs/errors/UnsupportedMediaTypeError.d.ts.map +1 -0
- package/dist/cjs/errors/UnsupportedMediaTypeError.js +14 -0
- package/dist/cjs/operations/driveItem/getDriveItemByPath.d.ts.map +1 -1
- package/dist/cjs/operations/driveItem/getDriveItemByPath.js +7 -0
- package/dist/cjs/operations/driveItem/getDriveItemContent.js +1 -1
- package/dist/cjs/operations/driveItem/streamDriveItemContent.d.ts.map +1 -1
- package/dist/cjs/operations/driveItem/streamDriveItemContent.js +4 -0
- package/dist/cjs/services/drive.d.ts +0 -2
- package/dist/cjs/services/drive.d.ts.map +1 -1
- package/dist/cjs/services/drive.js +3 -8
- package/dist/cjs/services/httpStatus.d.ts +130 -3
- package/dist/cjs/services/httpStatus.d.ts.map +1 -1
- package/dist/cjs/services/httpStatus.js +206 -6
- package/dist/cjs/services/operationInvoker.d.ts +20 -3
- package/dist/cjs/services/operationInvoker.d.ts.map +1 -1
- package/dist/cjs/services/operationInvoker.js +192 -57
- package/dist/esm/errors/BadRequestError.d.ts +9 -0
- package/dist/esm/errors/BadRequestError.d.ts.map +1 -0
- package/dist/esm/errors/BadRequestError.js +11 -0
- package/dist/esm/errors/BandwidthLimitExceededError.d.ts +9 -0
- package/dist/esm/errors/BandwidthLimitExceededError.d.ts.map +1 -0
- package/dist/esm/errors/BandwidthLimitExceededError.js +11 -0
- package/dist/esm/errors/ConflictError.d.ts +10 -0
- package/dist/esm/errors/ConflictError.d.ts.map +1 -0
- package/dist/esm/errors/ConflictError.js +12 -0
- package/dist/esm/errors/ForbiddenError.d.ts +11 -0
- package/dist/esm/errors/ForbiddenError.d.ts.map +1 -0
- package/dist/esm/errors/ForbiddenError.js +13 -0
- package/dist/esm/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/esm/errors/GatewayTimeoutError.d.ts.map +1 -0
- package/dist/esm/errors/GatewayTimeoutError.js +11 -0
- package/dist/esm/errors/GoneError.d.ts +9 -0
- package/dist/esm/errors/GoneError.d.ts.map +1 -0
- package/dist/esm/errors/GoneError.js +11 -0
- package/dist/esm/errors/InsufficientStorageError.d.ts +9 -0
- package/dist/esm/errors/InsufficientStorageError.d.ts.map +1 -0
- package/dist/esm/errors/InsufficientStorageError.js +11 -0
- package/dist/esm/errors/InternalServerError.d.ts +9 -0
- package/dist/esm/errors/InternalServerError.d.ts.map +1 -0
- package/dist/esm/errors/InternalServerError.js +11 -0
- package/dist/esm/errors/LengthRequiredError.d.ts +9 -0
- package/dist/esm/errors/LengthRequiredError.d.ts.map +1 -0
- package/dist/esm/errors/LengthRequiredError.js +11 -0
- package/dist/esm/errors/LockedError.d.ts +9 -0
- package/dist/esm/errors/LockedError.d.ts.map +1 -0
- package/dist/esm/errors/LockedError.js +11 -0
- package/dist/esm/errors/MethodNotAllowedError.d.ts +9 -0
- package/dist/esm/errors/MethodNotAllowedError.d.ts.map +1 -0
- package/dist/esm/errors/MethodNotAllowedError.js +11 -0
- package/dist/esm/errors/NotAcceptableError.d.ts +9 -0
- package/dist/esm/errors/NotAcceptableError.d.ts.map +1 -0
- package/dist/esm/errors/NotAcceptableError.js +11 -0
- package/dist/esm/errors/PaymentRequiredError.d.ts +9 -0
- package/dist/esm/errors/PaymentRequiredError.d.ts.map +1 -0
- package/dist/esm/errors/PaymentRequiredError.js +11 -0
- package/dist/esm/errors/PreconditionFailedError.d.ts +9 -0
- package/dist/esm/errors/PreconditionFailedError.d.ts.map +1 -0
- package/dist/esm/errors/PreconditionFailedError.js +11 -0
- package/dist/esm/errors/RequestEntityTooLargeError.d.ts +9 -0
- package/dist/esm/errors/RequestEntityTooLargeError.d.ts.map +1 -0
- package/dist/esm/errors/RequestEntityTooLargeError.js +11 -0
- package/dist/esm/errors/RequestFailedError.d.ts +1 -2
- package/dist/esm/errors/RequestFailedError.d.ts.map +1 -1
- package/dist/esm/errors/RequestFailedError.js +1 -8
- package/dist/esm/errors/RequestedRangeNotSatisfiableError.d.ts +9 -0
- package/dist/esm/errors/RequestedRangeNotSatisfiableError.d.ts.map +1 -0
- package/dist/esm/errors/RequestedRangeNotSatisfiableError.js +11 -0
- package/dist/esm/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/esm/errors/ServiceUnavailableError.d.ts.map +1 -0
- package/dist/esm/errors/ServiceUnavailableError.js +11 -0
- package/dist/esm/errors/TooManyRequestsError.d.ts +9 -0
- package/dist/esm/errors/TooManyRequestsError.d.ts.map +1 -0
- package/dist/esm/errors/TooManyRequestsError.js +11 -0
- package/dist/esm/errors/UnauthorizedError.d.ts +9 -0
- package/dist/esm/errors/UnauthorizedError.d.ts.map +1 -0
- package/dist/esm/errors/UnauthorizedError.js +11 -0
- package/dist/esm/errors/UnprocessableEntityError.d.ts +9 -0
- package/dist/esm/errors/UnprocessableEntityError.d.ts.map +1 -0
- package/dist/esm/errors/UnprocessableEntityError.js +11 -0
- package/dist/esm/errors/UnsupportedMediaTypeError.d.ts +9 -0
- package/dist/esm/errors/UnsupportedMediaTypeError.d.ts.map +1 -0
- package/dist/esm/errors/UnsupportedMediaTypeError.js +11 -0
- package/dist/esm/operations/driveItem/getDriveItemByPath.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/getDriveItemByPath.js +4 -0
- package/dist/esm/operations/driveItem/getDriveItemContent.js +2 -2
- package/dist/esm/operations/driveItem/streamDriveItemContent.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/streamDriveItemContent.js +5 -1
- package/dist/esm/services/drive.d.ts +0 -2
- package/dist/esm/services/drive.d.ts.map +1 -1
- package/dist/esm/services/drive.js +4 -9
- package/dist/esm/services/httpStatus.d.ts +130 -3
- package/dist/esm/services/httpStatus.d.ts.map +1 -1
- package/dist/esm/services/httpStatus.js +182 -3
- package/dist/esm/services/operationInvoker.d.ts +20 -3
- package/dist/esm/services/operationInvoker.d.ts.map +1 -1
- package/dist/esm/services/operationInvoker.js +192 -58
- package/docs/api/BadRequestError.md +191 -0
- package/docs/api/BandwidthLimitExceededError.md +191 -0
- package/docs/api/ConflictError.md +195 -0
- package/docs/api/ForbiddenError.md +193 -0
- package/docs/api/GatewayTimeoutError.md +191 -0
- package/docs/api/GoneError.md +191 -0
- package/docs/api/InsufficientStorageError.md +191 -0
- package/docs/api/InternalServerError.md +191 -0
- package/docs/api/LengthRequiredError.md +191 -0
- package/docs/api/LockedError.md +191 -0
- package/docs/api/MethodNotAllowedError.md +191 -0
- package/docs/api/NotAcceptableError.md +191 -0
- package/docs/api/PaymentRequiredError.md +191 -0
- package/docs/api/PreconditionFailedError.md +191 -0
- package/docs/api/README.md +22 -1
- package/docs/api/RequestEntityTooLargeError.md +191 -0
- package/docs/api/RequestFailedError.md +1 -19
- package/docs/api/RequestedRangeNotSatisfiableError.md +191 -0
- package/docs/api/ServiceUnavailableError.md +191 -0
- package/docs/api/TooManyRequestsError.md +191 -0
- package/docs/api/UnauthorizedError.md +191 -0
- package/docs/api/UnprocessableEntityError.md +191 -0
- package/docs/api/UnsupportedMediaTypeError.md +191 -0
- package/docs/api/drive.md +20 -0
- package/docs/api/getDriveItemByPath.md +1 -1
- package/docs/api/httpStatus.md +475 -12
- package/docs/api/operationInvoker.md +50 -27
- package/docs/api/streamDriveItemContent.md +1 -1
- package/package.json +526 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The payment requirements for the API haven't been met.
|
|
3
|
+
* @module PaymentRequiredError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class PaymentRequiredError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=PaymentRequiredError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentRequiredError.d.ts","sourceRoot":"","sources":["../../../src/errors/PaymentRequiredError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The payment requirements for the API haven't been met.
|
|
3
|
+
* @module PaymentRequiredError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class PaymentRequiredError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "PaymentRequiredError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A precondition provided in the request (such as an if-match header) doesn't match the resource's current state.
|
|
3
|
+
* @module PreconditionFailedError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class PreconditionFailedError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=PreconditionFailedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreconditionFailedError.d.ts","sourceRoot":"","sources":["../../../src/errors/PreconditionFailedError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A precondition provided in the request (such as an if-match header) doesn't match the resource's current state.
|
|
3
|
+
* @module PreconditionFailedError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class PreconditionFailedError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "PreconditionFailedError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request size exceeds the maximum limit.
|
|
3
|
+
* @module RequestEntityTooLargeError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class RequestEntityTooLargeError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=RequestEntityTooLargeError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestEntityTooLargeError.d.ts","sourceRoot":"","sources":["../../../src/errors/RequestEntityTooLargeError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,KAAK;gBACzC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request size exceeds the maximum limit.
|
|
3
|
+
* @module RequestEntityTooLargeError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class RequestEntityTooLargeError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "RequestEntityTooLargeError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Can't process the request because it's malformed or incorrect.
|
|
3
3
|
* @module RequestFailedError
|
|
4
4
|
* @category Errors
|
|
5
5
|
*/
|
|
6
6
|
export default class RequestFailedError extends Error {
|
|
7
7
|
constructor(message: string);
|
|
8
|
-
static throw(message: string, request: unknown, response?: unknown): never;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=RequestFailedError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestFailedError.d.ts","sourceRoot":"","sources":["../../../src/errors/RequestFailedError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"RequestFailedError.d.ts","sourceRoot":"","sources":["../../../src/errors/RequestFailedError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Can't process the request because it's malformed or incorrect.
|
|
3
3
|
* @module RequestFailedError
|
|
4
4
|
* @category Errors
|
|
5
5
|
*/
|
|
@@ -8,11 +8,4 @@ export default class RequestFailedError extends Error {
|
|
|
8
8
|
super(message);
|
|
9
9
|
this.name = "RequestFailedError";
|
|
10
10
|
}
|
|
11
|
-
static throw(message, request, response) {
|
|
12
|
-
const r = request;
|
|
13
|
-
if (r?.headers?.authorization) {
|
|
14
|
-
r.headers.authorization = "<REDACTED>";
|
|
15
|
-
}
|
|
16
|
-
throw new RequestFailedError(`${message}\n\nREQUEST: ${JSON.stringify(r, null, 2)}\n\nRESPONSE: ${JSON.stringify(response, null, 2)}`);
|
|
17
|
-
}
|
|
18
11
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The specified byte range is invalid or unavailable.
|
|
3
|
+
* @module RequestedRangeNotSatisfiableError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class RequestedRangeNotSatisfiableError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=RequestedRangeNotSatisfiableError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestedRangeNotSatisfiableError.d.ts","sourceRoot":"","sources":["../../../src/errors/RequestedRangeNotSatisfiableError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iCAAkC,SAAQ,KAAK;gBAChD,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The specified byte range is invalid or unavailable.
|
|
3
|
+
* @module RequestedRangeNotSatisfiableError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class RequestedRangeNotSatisfiableError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "RequestedRangeNotSatisfiableError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The service is temporarily unavailable for maintenance or is overloaded. You may repeat the request after a delay, the length of which may be specified in a Retry-After header.
|
|
3
|
+
* @module ServiceUnavailableError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class ServiceUnavailableError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ServiceUnavailableError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceUnavailableError.d.ts","sourceRoot":"","sources":["../../../src/errors/ServiceUnavailableError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The service is temporarily unavailable for maintenance or is overloaded. You may repeat the request after a delay, the length of which may be specified in a Retry-After header.
|
|
3
|
+
* @module ServiceUnavailableError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class ServiceUnavailableError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "ServiceUnavailableError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client application has been throttled and shouldn't attempt to repeat the request until an amount of time has elapsed.
|
|
3
|
+
* @module TooManyRequestsError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class TooManyRequestsError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TooManyRequestsError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooManyRequestsError.d.ts","sourceRoot":"","sources":["../../../src/errors/TooManyRequestsError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client application has been throttled and shouldn't attempt to repeat the request until an amount of time has elapsed.
|
|
3
|
+
* @module TooManyRequestsError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class TooManyRequestsError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "TooManyRequestsError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Required authentication information is either missing or not valid for the resource.
|
|
3
|
+
* @module UnauthorizedError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnauthorizedError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=UnauthorizedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnauthorizedError.d.ts","sourceRoot":"","sources":["../../../src/errors/UnauthorizedError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Required authentication information is either missing or not valid for the resource.
|
|
3
|
+
* @module UnauthorizedError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnauthorizedError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "UnauthorizedError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Can't process the request because it is semantically incorrect.
|
|
3
|
+
* @module UnprocessableEntityError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnprocessableEntityError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=UnprocessableEntityError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnprocessableEntityError.d.ts","sourceRoot":"","sources":["../../../src/errors/UnprocessableEntityError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,KAAK;gBACvC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Can't process the request because it is semantically incorrect.
|
|
3
|
+
* @module UnprocessableEntityError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnprocessableEntityError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "UnprocessableEntityError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The content type of the request is a format that isn't supported by the service.
|
|
3
|
+
* @module UnsupportedMediaTypeError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnsupportedMediaTypeError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=UnsupportedMediaTypeError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsupportedMediaTypeError.d.ts","sourceRoot":"","sources":["../../../src/errors/UnsupportedMediaTypeError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAIlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The content type of the request is a format that isn't supported by the service.
|
|
3
|
+
* @module UnsupportedMediaTypeError
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export default class UnsupportedMediaTypeError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "UnsupportedMediaTypeError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.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;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAqBhI"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module getDriveItemByPath
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
|
+
import InvalidArgumentError from "../../errors/InvalidArgumentError.js";
|
|
6
7
|
import { createDriveItemRef } from "../../services/driveItem.js";
|
|
7
8
|
import { operation } from "../../services/operationInvoker.js";
|
|
8
9
|
import { generatePath } from "../../services/templatedPaths.js";
|
|
@@ -14,6 +15,9 @@ import { generatePath } from "../../services/templatedPaths.js";
|
|
|
14
15
|
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-get
|
|
15
16
|
*/
|
|
16
17
|
export default function getDriveItemByPath(driveRef, itemPath) {
|
|
18
|
+
if (!itemPath.startsWith("/")) {
|
|
19
|
+
throw new InvalidArgumentError("itemPath must start with a forward slash (/)");
|
|
20
|
+
}
|
|
17
21
|
return operation({
|
|
18
22
|
context: driveRef.context,
|
|
19
23
|
method: "GET",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { executeHttpRequest } from "../../services/http.js";
|
|
8
8
|
import { isHttpSuccess } from "../../services/httpStatus.js";
|
|
9
|
-
import { endpoint } from "../../services/operationInvoker.js";
|
|
9
|
+
import { endpoint, throwException } from "../../services/operationInvoker.js";
|
|
10
10
|
import { generatePath } from "../../services/templatedPaths.js";
|
|
11
11
|
/**
|
|
12
12
|
* Download the content of a drive item.
|
|
@@ -31,7 +31,7 @@ export default async function getDriveItemContent(itemRef) {
|
|
|
31
31
|
responseType: "arraybuffer",
|
|
32
32
|
});
|
|
33
33
|
if (!isHttpSuccess(response.status)) {
|
|
34
|
-
|
|
34
|
+
throwException(response.status, "Failed to get content");
|
|
35
35
|
}
|
|
36
36
|
if (!Buffer.isBuffer(response.data)) {
|
|
37
37
|
throw new Error(`Unexpected response type: ${typeof response.data}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D;;;;;;;GAOG;AACH,wBAA8B,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAsB1G"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
6
|
import { executeHttpRequest } from "../../services/http.js";
|
|
7
|
-
import {
|
|
7
|
+
import { isHttpSuccess } from "../../services/httpStatus.js";
|
|
8
|
+
import { endpoint, throwException } from "../../services/operationInvoker.js";
|
|
8
9
|
import { generatePath } from "../../services/templatedPaths.js";
|
|
9
10
|
/**
|
|
10
11
|
* Stream the content of a drive item.
|
|
@@ -25,6 +26,9 @@ export default async function streamDriveItemContent(itemRef) {
|
|
|
25
26
|
},
|
|
26
27
|
responseType: "stream",
|
|
27
28
|
});
|
|
29
|
+
if (!isHttpSuccess(response.status)) {
|
|
30
|
+
throwException(response.status, "Failed to stream content");
|
|
31
|
+
}
|
|
28
32
|
if (!response || typeof response.data?.pipe !== "function") {
|
|
29
33
|
throw new Error("Failed to get a streamable response");
|
|
30
34
|
}
|
|
@@ -20,8 +20,6 @@ export declare function createClientSecretContextWithDriveRef(tenantId: AzureTen
|
|
|
20
20
|
* Retrieves the opinionated default drive reference. NOT RECOMMENDED FOR PRODUCTION USE.
|
|
21
21
|
* @returns A reference to the default drive.
|
|
22
22
|
* @remarks This method is opinionated and not recommended for production use.
|
|
23
|
-
* @deprecated Use `createClientSecretContextWithDriveRef()` instead.
|
|
24
|
-
* @hidden
|
|
25
23
|
*/
|
|
26
24
|
export declare function getDefaultDriveRef(): DriveRef;
|
|
27
25
|
//# sourceMappingURL=drive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/services/drive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAChH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKzD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAUvF;AAED,qDAAqD;AACrD,wBAAgB,qCAAqC,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,CAKnL;AAED
|
|
1
|
+
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/services/drive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAChH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKzD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAUvF;AAED,qDAAqD;AACrD,wBAAgB,qCAAqC,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,CAKnL;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAS7C"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @category Services
|
|
5
5
|
*/
|
|
6
6
|
import ProtocolError from "../errors/ProtocolError.js";
|
|
7
|
-
import { createClientSecretContext,
|
|
7
|
+
import { createClientSecretContext, createDefaultClientSecretContext } from "./context.js";
|
|
8
8
|
import { getEnvironmentVariable } from "./environmentVariable.js";
|
|
9
9
|
import { createSiteRef } from "./site.js";
|
|
10
10
|
/**
|
|
@@ -35,16 +35,11 @@ export function createClientSecretContextWithDriveRef(tenantId, clientId, client
|
|
|
35
35
|
* Retrieves the opinionated default drive reference. NOT RECOMMENDED FOR PRODUCTION USE.
|
|
36
36
|
* @returns A reference to the default drive.
|
|
37
37
|
* @remarks This method is opinionated and not recommended for production use.
|
|
38
|
-
* @deprecated Use `createClientSecretContextWithDriveRef()` instead.
|
|
39
|
-
* @hidden
|
|
40
38
|
*/
|
|
41
39
|
export function getDefaultDriveRef() {
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const siteId = getEnvironmentVariable("SHAREPOINT_DEFAULT_SITE_ID");
|
|
46
|
-
const driveId = getEnvironmentVariable("SHAREPOINT_DEFAULT_DRIVE_ID");
|
|
47
|
-
const contextRef = register(tenantId, clientId, clientSecret);
|
|
40
|
+
const contextRef = createDefaultClientSecretContext();
|
|
41
|
+
const siteId = getEnvironmentVariable("SHAREPOINT_SITE_ID");
|
|
42
|
+
const driveId = getEnvironmentVariable("SHAREPOINT_DRIVE_ID");
|
|
48
43
|
const siteRef = createSiteRef(contextRef, siteId);
|
|
49
44
|
const driveRef = createDriveRef(siteRef, driveId);
|
|
50
45
|
return driveRef;
|
|
@@ -32,17 +32,144 @@ export declare function isHttpTooManyRequests(status: number): boolean;
|
|
|
32
32
|
* @param status - The HTTP status code.
|
|
33
33
|
* @returns True if the status code is 503, otherwise false.
|
|
34
34
|
*/
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function isHttpServiceUnavailable(status: number): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Checks if the HTTP status code indicates a gateway has timed out.
|
|
38
38
|
* @param status - The HTTP status code.
|
|
39
39
|
* @returns True if the status code is 504, otherwise false.
|
|
40
40
|
*/
|
|
41
|
-
export declare function
|
|
41
|
+
export declare function isHttpGatewayTimeout(status: number): boolean;
|
|
42
42
|
/**
|
|
43
43
|
* Checks if the HTTP status code indicates the resource is locked
|
|
44
44
|
* @param status - The HTTP status code.
|
|
45
45
|
* @returns True if the status code is 423, otherwise false.
|
|
46
46
|
*/
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function isHttpLocked(status: number): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Checks if the HTTP status code indicates a bad request.
|
|
50
|
+
* @param status - The HTTP status code.
|
|
51
|
+
* @returns True if the status code is 400, otherwise false.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isHttpBadRequest(status: number): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Checks if the HTTP status code indicates unauthorized access.
|
|
56
|
+
* @param status - The HTTP status code.
|
|
57
|
+
* @returns True if the status code is 401, otherwise false.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isHttpUnauthorized(status: number): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Checks if the HTTP status code indicates payment required.
|
|
62
|
+
* @param status - The HTTP status code.
|
|
63
|
+
* @returns True if the status code is 402, otherwise false.
|
|
64
|
+
*/
|
|
65
|
+
export declare function isHttpPaymentRequired(status: number): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Checks if the HTTP status code indicates forbidden access.
|
|
68
|
+
* @param status - The HTTP status code.
|
|
69
|
+
* @returns True if the status code is 403, otherwise false.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isHttpForbidden(status: number): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if the HTTP status code indicates method not allowed.
|
|
74
|
+
* @param status - The HTTP status code.
|
|
75
|
+
* @returns True if the status code is 405, otherwise false.
|
|
76
|
+
*/
|
|
77
|
+
export declare function isHttpMethodNotAllowed(status: number): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if the HTTP status code indicates not acceptable.
|
|
80
|
+
* @param status - The HTTP status code.
|
|
81
|
+
* @returns True if the status code is 406, otherwise false.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isHttpNotAcceptable(status: number): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Checks if the HTTP status code indicates a conflict.
|
|
86
|
+
* @param status - The HTTP status code.
|
|
87
|
+
* @returns True if the status code is 409, otherwise false.
|
|
88
|
+
*/
|
|
89
|
+
export declare function isHttpConflict(status: number): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Checks if the HTTP status code indicates gone.
|
|
92
|
+
* @param status - The HTTP status code.
|
|
93
|
+
* @returns True if the status code is 410, otherwise false.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isHttpGone(status: number): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Checks if the HTTP status code indicates length required.
|
|
98
|
+
* @param status - The HTTP status code.
|
|
99
|
+
* @returns True if the status code is 411, otherwise false.
|
|
100
|
+
*/
|
|
101
|
+
export declare function isHttpLengthRequired(status: number): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Checks if the HTTP status code indicates precondition failed.
|
|
104
|
+
* @param status - The HTTP status code.
|
|
105
|
+
* @returns True if the status code is 412, otherwise false.
|
|
106
|
+
*/
|
|
107
|
+
export declare function isHttpPreconditionFailed(status: number): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Checks if the HTTP status code indicates request entity too large.
|
|
110
|
+
* @param status - The HTTP status code.
|
|
111
|
+
* @returns True if the status code is 413, otherwise false.
|
|
112
|
+
*/
|
|
113
|
+
export declare function isHttpRequestEntityTooLarge(status: number): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Checks if the HTTP status code indicates unsupported media type.
|
|
116
|
+
* @param status - The HTTP status code.
|
|
117
|
+
* @returns True if the status code is 415, otherwise false.
|
|
118
|
+
*/
|
|
119
|
+
export declare function isHttpUnsupportedMediaType(status: number): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Checks if the HTTP status code indicates requested range not satisfiable.
|
|
122
|
+
* @param status - The HTTP status code.
|
|
123
|
+
* @returns True if the status code is 416, otherwise false.
|
|
124
|
+
*/
|
|
125
|
+
export declare function isHttpRequestedRangeNotSatisfiable(status: number): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Checks if the HTTP status code indicates unprocessable entity.
|
|
128
|
+
* @param status - The HTTP status code.
|
|
129
|
+
* @returns True if the status code is 422, otherwise false.
|
|
130
|
+
*/
|
|
131
|
+
export declare function isHttpUnprocessableEntity(status: number): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Checks if the HTTP status code indicates insufficient storage.
|
|
134
|
+
* @param status - The HTTP status code.
|
|
135
|
+
* @returns True if the status code is 507, otherwise false.
|
|
136
|
+
*/
|
|
137
|
+
export declare function isHttpInsufficientStorage(status: number): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if the HTTP status code indicates bandwidth limit exceeded.
|
|
140
|
+
* @param status - The HTTP status code.
|
|
141
|
+
* @returns True if the status code is 509, otherwise false.
|
|
142
|
+
*/
|
|
143
|
+
export declare function isHttpBandwidthLimitExceeded(status: number): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Checks if the HTTP status code indicates internal server error.
|
|
146
|
+
* @param status - The HTTP status code.
|
|
147
|
+
* @returns True if the status code is 500, otherwise false.
|
|
148
|
+
*/
|
|
149
|
+
export declare function isHttpInternalServerError(status: number): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Checks if the HTTP status code indicates not implemented.
|
|
152
|
+
* @param status - The HTTP status code.
|
|
153
|
+
* @returns True if the status code is 501, otherwise false.
|
|
154
|
+
*/
|
|
155
|
+
export declare function isHttpNotImplemented(status: number): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Checks if the HTTP status code indicates a request timeout.
|
|
158
|
+
* @param status - The HTTP status code.
|
|
159
|
+
* @returns True if the status code is 408, otherwise false.
|
|
160
|
+
*/
|
|
161
|
+
export declare function isHttpRequestTimeout(status: number): boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Checks if the HTTP status code indicates a bad gateway.
|
|
164
|
+
* @param status - The HTTP status code.
|
|
165
|
+
* @returns True if the status code is 502, otherwise false.
|
|
166
|
+
*/
|
|
167
|
+
export declare function isHttpBadGateway(status: number): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Checks if the HTTP status code is considered retryable.
|
|
170
|
+
* Retryable status codes typically indicate a temporary condition.
|
|
171
|
+
* @param status - The HTTP status code.
|
|
172
|
+
* @returns True if the status code is retryable, otherwise false.
|
|
173
|
+
*/
|
|
174
|
+
export declare function isRetryable(status: number): boolean;
|
|
48
175
|
//# sourceMappingURL=httpStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;GAIG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAcnD"}
|