@sentry/types 8.0.0-beta.5 → 8.0.0-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/types",
3
- "version": "8.0.0-beta.5",
3
+ "version": "8.0.0-beta.6",
4
4
  "description": "Types for all Sentry JavaScript SDKs",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types",
@@ -1,6 +1,4 @@
1
- import type { Attachment } from '../attachment';
2
- import type { Event } from '../event';
3
- import type { TransportMakeRequestResponse } from '../transport';
1
+ import type { Event, EventHint } from '../event';
4
2
  import type { User } from '../user';
5
3
  /**
6
4
  * Crash report feedback object
@@ -17,6 +15,7 @@ interface FeedbackContext extends Record<string, unknown> {
17
15
  name?: string;
18
16
  replay_id?: string;
19
17
  url?: string;
18
+ associated_event_id?: string;
20
19
  }
21
20
  /**
22
21
  * NOTE: These types are still considered Alpha and subject to change.
@@ -32,16 +31,16 @@ export interface SendFeedbackParams {
32
31
  message: string;
33
32
  name?: string;
34
33
  email?: string;
35
- attachments?: Attachment[];
36
34
  url?: string;
37
35
  source?: string;
36
+ associatedEventId?: string;
38
37
  }
39
- interface SendFeedbackOptions {
38
+ interface SendFeedbackOptions extends EventHint {
40
39
  /**
41
40
  * Should include replay with the feedback?
42
41
  */
43
42
  includeReplay?: boolean;
44
43
  }
45
- export type SendFeedback = (params: SendFeedbackParams, options?: SendFeedbackOptions) => Promise<TransportMakeRequestResponse>;
44
+ export type SendFeedback = (params: SendFeedbackParams, options?: SendFeedbackOptions) => Promise<string>;
46
45
  export {};
47
46
  //# sourceMappingURL=sendFeedback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendFeedback.d.ts","sourceRoot":"","sources":["../../../src/feedback/sendFeedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"}
@@ -12,6 +12,12 @@ export type TransportMakeRequestResponse = {
12
12
  };
13
13
  };
14
14
  export interface InternalBaseTransportOptions {
15
+ /**
16
+ * @ignore
17
+ * Users should pass the tunnel property via the init/client options.
18
+ * This is only used by the SDK to pass the tunnel to the transport.
19
+ */
20
+ tunnel?: string;
15
21
  bufferSize?: number;
16
22
  recordDroppedEvent: Client['recordDroppedEvent'];
17
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;QAC7B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IAIxE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAC;IACnE,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GA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 +7,11 @@ export interface User {
7
7
  ip_address?: string;
8
8
  email?: string;
9
9
  username?: string;
10
+ geo?: GeoLocation;
11
+ }
12
+ export interface GeoLocation {
13
+ country_code?: string;
14
+ region?: string;
15
+ city?: string;
10
16
  }
11
17
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1,6 +1,4 @@
1
- import { Attachment } from '../attachment';
2
- import { Event } from '../event';
3
- import { TransportMakeRequestResponse } from '../transport';
1
+ import { Event, EventHint } from '../event';
4
2
  import { User } from '../user';
5
3
  /**
6
4
  * Crash report feedback object
@@ -17,6 +15,7 @@ interface FeedbackContext extends Record<string, unknown> {
17
15
  name?: string;
18
16
  replay_id?: string;
19
17
  url?: string;
18
+ associated_event_id?: string;
20
19
  }
21
20
  /**
22
21
  * NOTE: These types are still considered Alpha and subject to change.
@@ -32,16 +31,16 @@ export interface SendFeedbackParams {
32
31
  message: string;
33
32
  name?: string;
34
33
  email?: string;
35
- attachments?: Attachment[];
36
34
  url?: string;
37
35
  source?: string;
36
+ associatedEventId?: string;
38
37
  }
39
- interface SendFeedbackOptions {
38
+ interface SendFeedbackOptions extends EventHint {
40
39
  /**
41
40
  * Should include replay with the feedback?
42
41
  */
43
42
  includeReplay?: boolean;
44
43
  }
45
- export type SendFeedback = (params: SendFeedbackParams, options?: SendFeedbackOptions) => Promise<TransportMakeRequestResponse>;
44
+ export type SendFeedback = (params: SendFeedbackParams, options?: SendFeedbackOptions) => Promise<string>;
46
45
  export {};
47
46
  //# sourceMappingURL=sendFeedback.d.ts.map
@@ -12,6 +12,12 @@ export type TransportMakeRequestResponse = {
12
12
  };
13
13
  };
14
14
  export interface InternalBaseTransportOptions {
15
+ /**
16
+ * @ignore
17
+ * Users should pass the tunnel property via the init/client options.
18
+ * This is only used by the SDK to pass the tunnel to the transport.
19
+ */
20
+ tunnel?: string;
15
21
  bufferSize?: number;
16
22
  recordDroppedEvent: Client['recordDroppedEvent'];
17
23
  }
@@ -7,5 +7,11 @@ export interface User {
7
7
  ip_address?: string;
8
8
  email?: string;
9
9
  username?: string;
10
+ geo?: GeoLocation;
11
+ }
12
+ export interface GeoLocation {
13
+ country_code?: string;
14
+ region?: string;
15
+ city?: string;
10
16
  }
11
17
  //# sourceMappingURL=user.d.ts.map