@types/aws-cloudfront-function 1.0.7 → 1.0.8

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.
@@ -8,7 +8,7 @@ This package contains type definitions for aws-cloudfront-function (https://docs
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aws-cloudfront-function.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 13 Mar 2026 23:40:50 GMT
11
+ * Last updated: Tue, 17 Mar 2026 00:53:22 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -3,7 +3,7 @@ declare namespace AWSCloudFrontFunction {
3
3
  version: "1.0";
4
4
  context: Context;
5
5
  viewer: Viewer;
6
- request: Request;
6
+ request: Request & RequestMethods;
7
7
  response: Response;
8
8
  }
9
9
 
@@ -26,6 +26,17 @@ declare namespace AWSCloudFrontFunction {
26
26
  cookies: ValueObject;
27
27
  }
28
28
 
29
+ interface RequestMethods {
30
+ /**
31
+ * Use the rawQueryString() method to retrieve the unparsed and unaltered query string as a string.
32
+ * @returns Returns the full query string of the incoming request as a string value without the leading ?.
33
+ * - If there isn't a query string, but the ? is present, the functions returns an empty string.
34
+ * - If there isn't a query string and the ? isn't present, the function returns undefined.
35
+ * @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/general-helper-methods.html#raw-query-string-method
36
+ */
37
+ rawQueryString(): string | undefined;
38
+ }
39
+
29
40
  interface Response {
30
41
  statusCode: number;
31
42
  statusDescription?: string;
@@ -225,11 +236,35 @@ declare module "cloudfront" {
225
236
  */
226
237
  function createRequestOriginGroup(params: CreateRequestOriginGroupParams): void;
227
238
 
239
+ /**
240
+ * Use this JavaScript object to obtain the edge location airport code,
241
+ * expected Regional Edge Cache region or the CloudFront server IP address used to handle the request.
242
+ * This metadata is available only the viewer request event trigger.
243
+ * @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/general-helper-methods.html#edge-location-metadata
244
+ */
245
+ interface EdgeLocation {
246
+ /**
247
+ * The three-letter IATA code of the edge location that handled the request.
248
+ */
249
+ name: string;
250
+ /**
251
+ * The IPv4 or IPv6 address of the server that handled the request.
252
+ */
253
+ serverIp: string;
254
+ /**
255
+ * The CloudFront Regional Edge Cache (REC) that the request is expected to use if there is a cache miss.
256
+ * This value is not updated in the event that the expected REC is unavailable and a backup REC is used for the request.
257
+ * This doesn't include the Origin Shield location being used, except in cases when the primary REC and the Origin Shield are the same location.
258
+ */
259
+ region: string;
260
+ }
261
+
228
262
  const cf: {
229
263
  kvs: typeof kvs;
230
264
  updateRequestOrigin: typeof updateRequestOrigin;
231
265
  selectRequestOriginById: typeof selectRequestOriginById;
232
266
  createRequestOriginGroup: typeof createRequestOriginGroup;
267
+ edgeLocation: EdgeLocation;
233
268
  };
234
269
 
235
270
  export default cf;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/aws-cloudfront-function",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "TypeScript definitions for aws-cloudfront-function",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aws-cloudfront-function",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "scripts": {},
22
22
  "dependencies": {},
23
23
  "peerDependencies": {},
24
- "typesPublisherContentHash": "780b1770be43bb615190ae71f0b6a60d8521e2c6fc89f9135d4ac23adbd9a5bb",
24
+ "typesPublisherContentHash": "2c71e6e8e1bae20debbcee2b85aef10e0c10fc39fc4847e1b87f3d8af4a9201b",
25
25
  "typeScriptVersion": "5.2",
26
26
  "nonNpm": true
27
27
  }