@@ -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 = {
@@ -69,12 +69,12 @@ export class RequestData implements Integration {
69
69
*/
70
70
public name : string = RequestData . id ;
71
71
72
- private _options : RequestDataIntegrationOptions ;
72
+ private _options : Required < RequestDataIntegrationOptions > ;
73
73
74
74
/**
75
75
* @inheritDoc
76
76
*/
77
- public constructor ( options : Partial < RequestDataIntegrationOptions > = { } ) {
77
+ public constructor ( options : RequestDataIntegrationOptions = { } ) {
78
78
this . _options = {
79
79
...DEFAULT_OPTIONS ,
80
80
...options ,
@@ -154,7 +154,7 @@ export class RequestData implements Integration {
154
154
/** Convert this integration's options to match what `addRequestDataToEvent` expects */
155
155
/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */
156
156
function convertReqDataIntegrationOptsToAddReqDataOpts (
157
- integrationOptions : RequestDataIntegrationOptions ,
157
+ integrationOptions : Required < RequestDataIntegrationOptions > ,
158
158
) : AddRequestDataToEventOptions {
159
159
const { transactionNamingScheme } = integrationOptions ;
160
160
const { ip, user, ...requestOptions } = integrationOptions . include ;
0 commit comments