1 | /**
|
2 | * Deprecated functions which are slated for removal in v8. When the time comes, this entire file can be deleted.
|
3 | *
|
4 | * See https://github.com/getsentry/sentry-javascript/pull/5257.
|
5 | */
|
6 | import type { Event, ExtractedNodeRequestData, PolymorphicRequest } from '@sentry/types';
|
7 | import type { AddRequestDataToEventOptions } from './requestdata';
|
8 | /**
|
9 | * @deprecated `Handlers.ExpressRequest` is deprecated and will be removed in v8. Use `PolymorphicRequest` instead.
|
10 | */
|
11 | export type ExpressRequest = PolymorphicRequest;
|
12 | /**
|
13 | * Normalizes data from the request object, accounting for framework differences.
|
14 | *
|
15 | * @deprecated `Handlers.extractRequestData` is deprecated and will be removed in v8. Use `extractRequestData` instead.
|
16 | *
|
17 | * @param req The request object from which to extract data
|
18 | * @param keys An optional array of keys to include in the normalized data.
|
19 | * @returns An object containing normalized request data
|
20 | */
|
21 | export declare function extractRequestData(req: {
|
22 | [key: string]: any;
|
23 | }, keys?: string[]): ExtractedNodeRequestData;
|
24 | /**
|
25 | * Options deciding what parts of the request to use when enhancing an event
|
26 | *
|
27 | * @deprecated `Handlers.ParseRequestOptions` is deprecated and will be removed in v8. Use
|
28 | * `AddRequestDataToEventOptions` in `@sentry/utils` instead.
|
29 | */
|
30 | export type ParseRequestOptions = AddRequestDataToEventOptions['include'] & {
|
31 | serverName?: boolean;
|
32 | version?: boolean;
|
33 | };
|
34 | /**
|
35 | * Enriches passed event with request data.
|
36 | *
|
37 | * @deprecated `Handlers.parseRequest` is deprecated and will be removed in v8. Use `addRequestDataToEvent` instead.
|
38 | *
|
39 | * @param event Will be mutated and enriched with req data
|
40 | * @param req Request object
|
41 | * @param options object containing flags to enable functionality
|
42 | * @hidden
|
43 | */
|
44 | export declare function parseRequest(event: Event, req: ExpressRequest, options?: ParseRequestOptions): Event;
|
45 | //# sourceMappingURL=requestDataDeprecated.d.ts.map |
\ | No newline at end of file |