@@ -10,7 +10,7 @@ type RequestDataIntegrationOptions = {
10
10
/**
11
11
* Controls what data is pulled from the request and added to the event
12
12
*/
13
- include : {
13
+ include ? : {
14
14
cookies ?: boolean ;
15
15
data ?: boolean ;
16
16
headers ?: boolean ;
@@ -27,15 +27,15 @@ type RequestDataIntegrationOptions = {
27
27
} ;
28
28
29
29
/** Whether to identify transactions by parameterized path, parameterized path with method, or handler name */
30
- transactionNamingScheme : TransactionNamingScheme ;
30
+ transactionNamingScheme ? : TransactionNamingScheme ;
31
31
32
32
/**
33
33
* Function for adding request data to event. Defaults to `addRequestDataToEvent` from `@sentry/node` for now, but
34
34
* left injectable so this integration can be moved to `@sentry/core` and used in browser-based SDKs in the future.
35
35
*
36
36
* @hidden
37
37
*/
38
- addRequestData : typeof addRequestDataToEvent ;
38
+ addRequestData ? : typeof addRequestDataToEvent ;
39
39
} ;
40
40
41
41
const DEFAULT_OPTIONS = {
@@ -65,12 +65,12 @@ export class RequestData implements Integration {
65
65
*/
66
66
public name : string = RequestData . id ;
67
67
68
- private _options : RequestDataIntegrationOptions ;
68
+ private _options : Required < RequestDataIntegrationOptions > ;
69
69
70
70
/**
71
71
* @inheritDoc
72
72
*/
73
- public constructor ( options : Partial < RequestDataIntegrationOptions > = { } ) {
73
+ public constructor ( options : RequestDataIntegrationOptions = { } ) {
74
74
this . _options = {
75
75
...DEFAULT_OPTIONS ,
76
76
...options ,
@@ -142,7 +142,7 @@ export class RequestData implements Integration {
142
142
/** Convert this integration's options to match what `addRequestDataToEvent` expects */
143
143
/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */
144
144
function convertReqDataIntegrationOptsToAddReqDataOpts (
145
- integrationOptions : RequestDataIntegrationOptions ,
145
+ integrationOptions : Required < RequestDataIntegrationOptions > ,
146
146
) : AddRequestDataToEventOptions {
147
147
const { transactionNamingScheme } = integrationOptions ;
148
148
const { ip, user, ...requestOptions } = integrationOptions . include ;
0 commit comments