@amplitude/analytics-core 2.40.2 → 2.41.1

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.
Files changed (81) hide show
  1. package/lib/cjs/index.d.ts +2 -0
  2. package/lib/cjs/index.d.ts.map +1 -1
  3. package/lib/cjs/index.js +8 -2
  4. package/lib/cjs/index.js.map +1 -1
  5. package/lib/cjs/messenger/constants.d.ts +1 -1
  6. package/lib/cjs/messenger/constants.js +1 -1
  7. package/lib/cjs/messenger/constants.js.map +1 -1
  8. package/lib/cjs/plugins/destination.d.ts.map +1 -1
  9. package/lib/cjs/plugins/destination.js +16 -2
  10. package/lib/cjs/plugins/destination.js.map +1 -1
  11. package/lib/cjs/storage/cookie.d.ts.map +1 -1
  12. package/lib/cjs/storage/cookie.js +33 -12
  13. package/lib/cjs/storage/cookie.js.map +1 -1
  14. package/lib/cjs/transports/base.d.ts +1 -1
  15. package/lib/cjs/transports/base.d.ts.map +1 -1
  16. package/lib/cjs/transports/base.js +1 -1
  17. package/lib/cjs/transports/base.js.map +1 -1
  18. package/lib/cjs/transports/gzip.d.ts +12 -0
  19. package/lib/cjs/transports/gzip.d.ts.map +1 -0
  20. package/lib/cjs/transports/gzip.js +43 -0
  21. package/lib/cjs/transports/gzip.js.map +1 -0
  22. package/lib/cjs/types/client/browser-client.d.ts +6 -0
  23. package/lib/cjs/types/client/browser-client.d.ts.map +1 -1
  24. package/lib/cjs/types/client/browser-client.js.map +1 -1
  25. package/lib/cjs/types/config/browser-config.d.ts +18 -1
  26. package/lib/cjs/types/config/browser-config.d.ts.map +1 -1
  27. package/lib/cjs/types/config/browser-config.js +5 -0
  28. package/lib/cjs/types/config/browser-config.js.map +1 -1
  29. package/lib/cjs/types/config/core-config.d.ts +16 -0
  30. package/lib/cjs/types/config/core-config.d.ts.map +1 -1
  31. package/lib/cjs/types/config/core-config.js.map +1 -1
  32. package/lib/cjs/types/config/node-config.d.ts +1 -1
  33. package/lib/cjs/types/config/node-config.d.ts.map +1 -1
  34. package/lib/cjs/types/config/node-config.js.map +1 -1
  35. package/lib/cjs/types/config/react-native-config.d.ts +1 -1
  36. package/lib/cjs/types/config/react-native-config.d.ts.map +1 -1
  37. package/lib/cjs/types/config/react-native-config.js.map +1 -1
  38. package/lib/cjs/types/transport.d.ts +1 -1
  39. package/lib/cjs/types/transport.d.ts.map +1 -1
  40. package/lib/cjs/types/transport.js.map +1 -1
  41. package/lib/esm/index.d.ts +2 -0
  42. package/lib/esm/index.d.ts.map +1 -1
  43. package/lib/esm/index.js +2 -0
  44. package/lib/esm/index.js.map +1 -1
  45. package/lib/esm/messenger/constants.d.ts +1 -1
  46. package/lib/esm/messenger/constants.js +1 -1
  47. package/lib/esm/messenger/constants.js.map +1 -1
  48. package/lib/esm/plugins/destination.d.ts.map +1 -1
  49. package/lib/esm/plugins/destination.js +17 -3
  50. package/lib/esm/plugins/destination.js.map +1 -1
  51. package/lib/esm/storage/cookie.d.ts.map +1 -1
  52. package/lib/esm/storage/cookie.js +33 -12
  53. package/lib/esm/storage/cookie.js.map +1 -1
  54. package/lib/esm/transports/base.d.ts +1 -1
  55. package/lib/esm/transports/base.d.ts.map +1 -1
  56. package/lib/esm/transports/base.js +1 -1
  57. package/lib/esm/transports/base.js.map +1 -1
  58. package/lib/esm/transports/gzip.d.ts +12 -0
  59. package/lib/esm/transports/gzip.d.ts.map +1 -0
  60. package/lib/esm/transports/gzip.js +38 -0
  61. package/lib/esm/transports/gzip.js.map +1 -0
  62. package/lib/esm/types/client/browser-client.d.ts +6 -0
  63. package/lib/esm/types/client/browser-client.d.ts.map +1 -1
  64. package/lib/esm/types/client/browser-client.js.map +1 -1
  65. package/lib/esm/types/config/browser-config.d.ts +18 -1
  66. package/lib/esm/types/config/browser-config.d.ts.map +1 -1
  67. package/lib/esm/types/config/browser-config.js +4 -1
  68. package/lib/esm/types/config/browser-config.js.map +1 -1
  69. package/lib/esm/types/config/core-config.d.ts +16 -0
  70. package/lib/esm/types/config/core-config.d.ts.map +1 -1
  71. package/lib/esm/types/config/core-config.js.map +1 -1
  72. package/lib/esm/types/config/node-config.d.ts +1 -1
  73. package/lib/esm/types/config/node-config.d.ts.map +1 -1
  74. package/lib/esm/types/config/node-config.js.map +1 -1
  75. package/lib/esm/types/config/react-native-config.d.ts +1 -1
  76. package/lib/esm/types/config/react-native-config.d.ts.map +1 -1
  77. package/lib/esm/types/config/react-native-config.js.map +1 -1
  78. package/lib/esm/types/transport.d.ts +1 -1
  79. package/lib/esm/types/transport.d.ts.map +1 -1
  80. package/lib/esm/types/transport.js.map +1 -1
  81. package/package.json +1 -1
@@ -61,6 +61,22 @@ export interface IConfig {
61
61
  * Amplitude internal use.
62
62
  */
63
63
  ingestionMetadata?: IngestionMetadata;
64
+ /**
65
+ * Compress network request body payloads with gzip.
66
+ *
67
+ * For custom `serverUrl` values, this option controls whether compression is attempted.
68
+ * For default Amplitude endpoints, compression remains enabled.
69
+ * Compression is best-effort and only applies when the platform supports it,
70
+ * the payload meets the minimum size threshold, and the transport can set request headers.
71
+ * @defaultValue `false`
72
+ */
73
+ enableRequestBodyCompression?: boolean;
74
+ /**
75
+ * @experimental
76
+ * WARNING: This config is for internal testing only and is not part of the public API.
77
+ * It may be changed or removed at any time without notice.
78
+ */
79
+ _enableRequestBodyCompressionExperimental?: boolean;
64
80
  /**
65
81
  * The URL where events are upload to.
66
82
  */
@@ -1 +1 @@
1
- {"version":3,"file":"core-config.d.ts","sourceRoot":"","sources":["../../../../src/types/config/core-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MA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AAC;IACtC,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAC9C,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,OAAO,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,SAAS,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"core-config.js","sourceRoot":"","sources":["../../../../src/types/config/core-config.ts"],"names":[],"mappings":"","sourcesContent":["import { LogLevel } from '../loglevel';\nimport { ILogger } from '../../logger';\nimport { OfflineDisabled } from '../offline';\nimport { Plan } from '../event/plan';\nimport { IngestionMetadata } from '../event/ingestion-metadata';\nimport { ServerZoneType } from '../server-zone';\nimport { Transport } from '../transport';\nimport { Storage } from '../storage';\nimport { Event } from '../event/event';\nimport { IIdentify } from '../../identify';\n\nexport interface IConfig {\n /**\n * Your Amplitude Project API key.\n */\n apiKey: string;\n /**\n * The interval of uploading events to Amplitude in milliseconds.\n */\n flushIntervalMillis: number;\n /**\n * The maximum number of retries for failed upload attempts. This is only applicable to retryable errors.\n */\n flushMaxRetries: number;\n /**\n * The maximum number of events that are batched in a single upload attempt.\n */\n flushQueueSize: number;\n /**\n * The instance name. For tracking events to multiple Amplitude projects in your application.\n */\n instanceName?: string;\n /**\n * Level of logs to be printed in the developer console.\n * Valid values are `LogLevel.None`, `LogLevel.Error`, `LogLevel.Warn`, `LogLevel.Verbose`, `LogLevel.Debug`\n */\n logLevel: LogLevel;\n /**\n * A custom Logger class to emit log messages to desired destination.\n */\n loggerProvider: ILogger;\n /**\n * The minimum length for the value of userId and deviceId properties.\n */\n minIdLength?: number;\n /**\n * Whether the SDK is connected to network.\n */\n offline?: boolean | typeof OfflineDisabled;\n /**\n * The flag to opt this device out of Amplitude tracking.\n * If this flag is set, no additional information will be stored for the user.\n */\n optOut: boolean;\n /**\n * Tracking plan properties.\n * Amplitude internal use.\n */\n plan?: Plan;\n /**\n * Ingestion metadata.\n * Amplitude internal use.\n */\n ingestionMetadata?: IngestionMetadata;\n /**\n * The URL where events are upload to.\n */\n serverUrl?: string;\n /**\n * The Amplitude server zone.\n * Set this to EU for Amplitude projects created in EU data center.\n */\n serverZone?: ServerZoneType;\n /**\n * The storage provider to persist unsent events.\n */\n storageProvider?: Storage<Event[]>;\n /**\n * A customer Transport Class for sending data to a server.\n */\n transportProvider: Transport;\n /**\n * The flag of whether to upload events to Batch API instead of the default HTTP V2 API.\n */\n useBatch: boolean;\n /**\n * Metrics of the SDK.\n */\n requestMetadata?: IRequestMetadata;\n /**\n * Invokes identify on this Identify object prior to initializing the SDK.\n */\n identify?: IIdentify;\n}\n\nexport interface IRequestMetadata {\n sdk: {\n metrics: {\n histogram: IHistogramOptions;\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: IHistogramOptions[T]): void;\n}\n\nexport interface IHistogramOptions {\n remote_config_fetch_time_IDB?: number;\n remote_config_fetch_time_API_success?: number;\n remote_config_fetch_time_API_fail?: number;\n}\n\nexport type HistogramKey = keyof IHistogramOptions;\n\nexport interface ConfigOptions extends Partial<IConfig> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
1
+ {"version":3,"file":"core-config.js","sourceRoot":"","sources":["../../../../src/types/config/core-config.ts"],"names":[],"mappings":"","sourcesContent":["import { LogLevel } from '../loglevel';\nimport { ILogger } from '../../logger';\nimport { OfflineDisabled } from '../offline';\nimport { Plan } from '../event/plan';\nimport { IngestionMetadata } from '../event/ingestion-metadata';\nimport { ServerZoneType } from '../server-zone';\nimport { Transport } from '../transport';\nimport { Storage } from '../storage';\nimport { Event } from '../event/event';\nimport { IIdentify } from '../../identify';\n\nexport interface IConfig {\n /**\n * Your Amplitude Project API key.\n */\n apiKey: string;\n /**\n * The interval of uploading events to Amplitude in milliseconds.\n */\n flushIntervalMillis: number;\n /**\n * The maximum number of retries for failed upload attempts. This is only applicable to retryable errors.\n */\n flushMaxRetries: number;\n /**\n * The maximum number of events that are batched in a single upload attempt.\n */\n flushQueueSize: number;\n /**\n * The instance name. For tracking events to multiple Amplitude projects in your application.\n */\n instanceName?: string;\n /**\n * Level of logs to be printed in the developer console.\n * Valid values are `LogLevel.None`, `LogLevel.Error`, `LogLevel.Warn`, `LogLevel.Verbose`, `LogLevel.Debug`\n */\n logLevel: LogLevel;\n /**\n * A custom Logger class to emit log messages to desired destination.\n */\n loggerProvider: ILogger;\n /**\n * The minimum length for the value of userId and deviceId properties.\n */\n minIdLength?: number;\n /**\n * Whether the SDK is connected to network.\n */\n offline?: boolean | typeof OfflineDisabled;\n /**\n * The flag to opt this device out of Amplitude tracking.\n * If this flag is set, no additional information will be stored for the user.\n */\n optOut: boolean;\n /**\n * Tracking plan properties.\n * Amplitude internal use.\n */\n plan?: Plan;\n /**\n * Ingestion metadata.\n * Amplitude internal use.\n */\n ingestionMetadata?: IngestionMetadata;\n /**\n * Compress network request body payloads with gzip.\n *\n * For custom `serverUrl` values, this option controls whether compression is attempted.\n * For default Amplitude endpoints, compression remains enabled.\n * Compression is best-effort and only applies when the platform supports it,\n * the payload meets the minimum size threshold, and the transport can set request headers.\n * @defaultValue `false`\n */\n enableRequestBodyCompression?: boolean;\n /**\n * @experimental\n * WARNING: This config is for internal testing only and is not part of the public API.\n * It may be changed or removed at any time without notice.\n */\n _enableRequestBodyCompressionExperimental?: boolean;\n /**\n * The URL where events are upload to.\n */\n serverUrl?: string;\n /**\n * The Amplitude server zone.\n * Set this to EU for Amplitude projects created in EU data center.\n */\n serverZone?: ServerZoneType;\n /**\n * The storage provider to persist unsent events.\n */\n storageProvider?: Storage<Event[]>;\n /**\n * A customer Transport Class for sending data to a server.\n */\n transportProvider: Transport;\n /**\n * The flag of whether to upload events to Batch API instead of the default HTTP V2 API.\n */\n useBatch: boolean;\n /**\n * Metrics of the SDK.\n */\n requestMetadata?: IRequestMetadata;\n /**\n * Invokes identify on this Identify object prior to initializing the SDK.\n */\n identify?: IIdentify;\n}\n\nexport interface IRequestMetadata {\n sdk: {\n metrics: {\n histogram: IHistogramOptions;\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: IHistogramOptions[T]): void;\n}\n\nexport interface IHistogramOptions {\n remote_config_fetch_time_IDB?: number;\n remote_config_fetch_time_API_success?: number;\n remote_config_fetch_time_API_fail?: number;\n}\n\nexport type HistogramKey = keyof IHistogramOptions;\n\nexport interface ConfigOptions extends Partial<IConfig> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import { IConfig } from './core-config';
2
2
  export type NodeConfig = IConfig;
3
- export type NodeOptions = Omit<Partial<NodeConfig>, 'apiKey'>;
3
+ export type NodeOptions = Omit<Partial<NodeConfig>, 'apiKey' | '_enableRequestBodyCompressionExperimental'>;
4
4
  //# sourceMappingURL=node-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-config.d.ts","sourceRoot":"","sources":["../../../../src/types/config/node-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC;AAEjC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"node-config.d.ts","sourceRoot":"","sources":["../../../../src/types/config/node-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC;AAEjC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,2CAA2C,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"node-config.js","sourceRoot":"","sources":["../../../../src/types/config/node-config.ts"],"names":[],"mappings":"","sourcesContent":["import { IConfig } from './core-config';\n\nexport type NodeConfig = IConfig;\n\nexport type NodeOptions = Omit<Partial<NodeConfig>, 'apiKey'>;\n"]}
1
+ {"version":3,"file":"node-config.js","sourceRoot":"","sources":["../../../../src/types/config/node-config.ts"],"names":[],"mappings":"","sourcesContent":["import { IConfig } from './core-config';\n\nexport type NodeConfig = IConfig;\n\nexport type NodeOptions = Omit<Partial<NodeConfig>, 'apiKey' | '_enableRequestBodyCompressionExperimental'>;\n"]}
@@ -1,7 +1,7 @@
1
1
  import { IConfig } from './core-config';
2
2
  import { Storage } from '../storage';
3
3
  import { UserSession } from '../user-session';
4
- type HiddenOptions = 'apiKey' | 'lastEventId';
4
+ type HiddenOptions = 'apiKey' | 'lastEventId' | '_enableRequestBodyCompressionExperimental';
5
5
  export type ReactNativeOptions = Omit<Partial<ReactNativeConfig>, HiddenOptions>;
6
6
  export interface ReactNativeConfig extends Omit<IConfig, 'offline' | 'requestMetadata'> {
7
7
  trackingOptions: ReactNativeTrackingOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"react-native-config.d.ts","sourceRoot":"","sources":["../../../../src/types/config/react-native-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,KAAK,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,CAAC;AAEjF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACrF,eAAe,EAAE,0BAA0B,CAAC;IAC5C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EA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AC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACpC"}
1
+ {"version":3,"file":"react-native-config.d.ts","sourceRoot":"","sources":["../../../../src/types/config/react-native-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,KAAK,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,2CAA2C,CAAC;AAE5F,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,CAAC;AAEjF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACrF,eAAe,EAAE,0BAA0B,CAAC;IAC5C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,6BAA6B,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-native-config.js","sourceRoot":"","sources":["../../../../src/types/config/react-native-config.ts"],"names":[],"mappings":"","sourcesContent":["import { IConfig } from './core-config';\nimport { Storage } from '../storage';\nimport { UserSession } from '../user-session';\n\ntype HiddenOptions = 'apiKey' | 'lastEventId';\n\nexport type ReactNativeOptions = Omit<Partial<ReactNativeConfig>, HiddenOptions>;\n\nexport interface ReactNativeConfig extends Omit<IConfig, 'offline' | 'requestMetadata'> {\n trackingOptions: ReactNativeTrackingOptions;\n trackingSessionEvents?: boolean;\n migrateLegacyData?: boolean;\n appVersion?: string;\n attribution?: ReactNativeAttributionOptions;\n deviceId?: string;\n cookieExpiration: number;\n cookieSameSite: string;\n cookieSecure: boolean;\n cookieStorage: Storage<UserSession>;\n cookieUpgrade: boolean;\n disableCookies: boolean;\n domain: string;\n lastEventTime?: number;\n lastEventId?: number;\n partnerId?: string;\n sessionId?: number;\n sessionTimeout: number;\n userId?: string;\n}\n\nexport interface ReactNativeAttributionOptions {\n disabled?: boolean;\n excludeReferrers?: string[];\n initialEmptyValue?: string;\n trackNewCampaigns?: boolean;\n trackPageViews?: boolean;\n resetSessionOnNewCampaign?: boolean;\n}\n\nexport interface ReactNativeTrackingOptions {\n adid?: boolean;\n carrier?: boolean;\n appSetId?: boolean;\n idfv?: boolean;\n country?: boolean;\n\n deviceManufacturer?: boolean;\n deviceModel?: boolean;\n ipAddress?: boolean;\n language?: boolean;\n osName?: boolean;\n osVersion?: boolean;\n platform?: boolean;\n [key: string]: boolean | undefined;\n}\n"]}
1
+ {"version":3,"file":"react-native-config.js","sourceRoot":"","sources":["../../../../src/types/config/react-native-config.ts"],"names":[],"mappings":"","sourcesContent":["import { IConfig } from './core-config';\nimport { Storage } from '../storage';\nimport { UserSession } from '../user-session';\n\ntype HiddenOptions = 'apiKey' | 'lastEventId' | '_enableRequestBodyCompressionExperimental';\n\nexport type ReactNativeOptions = Omit<Partial<ReactNativeConfig>, HiddenOptions>;\n\nexport interface ReactNativeConfig extends Omit<IConfig, 'offline' | 'requestMetadata'> {\n trackingOptions: ReactNativeTrackingOptions;\n trackingSessionEvents?: boolean;\n migrateLegacyData?: boolean;\n appVersion?: string;\n attribution?: ReactNativeAttributionOptions;\n deviceId?: string;\n cookieExpiration: number;\n cookieSameSite: string;\n cookieSecure: boolean;\n cookieStorage: Storage<UserSession>;\n cookieUpgrade: boolean;\n disableCookies: boolean;\n domain: string;\n lastEventTime?: number;\n lastEventId?: number;\n partnerId?: string;\n sessionId?: number;\n sessionTimeout: number;\n userId?: string;\n}\n\nexport interface ReactNativeAttributionOptions {\n disabled?: boolean;\n excludeReferrers?: string[];\n initialEmptyValue?: string;\n trackNewCampaigns?: boolean;\n trackPageViews?: boolean;\n resetSessionOnNewCampaign?: boolean;\n}\n\nexport interface ReactNativeTrackingOptions {\n adid?: boolean;\n carrier?: boolean;\n appSetId?: boolean;\n idfv?: boolean;\n country?: boolean;\n\n deviceManufacturer?: boolean;\n deviceModel?: boolean;\n ipAddress?: boolean;\n language?: boolean;\n osName?: boolean;\n osVersion?: boolean;\n platform?: boolean;\n [key: string]: boolean | undefined;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { Payload } from './payload';
2
2
  import { Response } from './response';
3
3
  export interface Transport {
4
- send(serverUrl: string, payload: Payload): Promise<Response | null>;
4
+ send(serverUrl: string, payload: Payload, enableRequestBodyCompression?: boolean): Promise<Response | null>;
5
5
  }
6
6
  export type TransportType = 'xhr' | 'beacon' | 'fetch';
7
7
  export interface TransportOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/types/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACrE;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/types/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,4BAA4B,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CAC7G;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/types/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { Payload } from './payload';\nimport { Response } from './response';\n\nexport interface Transport {\n send(serverUrl: string, payload: Payload): Promise<Response | null>;\n}\n\nexport type TransportType = 'xhr' | 'beacon' | 'fetch';\n\nexport interface TransportOptions {\n type?: TransportType;\n headers?: Record<string, string>;\n}\n\nexport type TransportTypeOrOptions = TransportType | TransportOptions;\n"]}
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/types/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { Payload } from './payload';\nimport { Response } from './response';\n\nexport interface Transport {\n send(serverUrl: string, payload: Payload, enableRequestBodyCompression?: boolean): Promise<Response | null>;\n}\n\nexport type TransportType = 'xhr' | 'beacon' | 'fetch';\n\nexport interface TransportOptions {\n type?: TransportType;\n headers?: Record<string, string>;\n}\n\nexport type TransportTypeOrOptions = TransportType | TransportOptions;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/analytics-core",
3
- "version": "2.40.2",
3
+ "version": "2.41.1",
4
4
  "description": "",
5
5
  "author": "Amplitude Inc",
6
6
  "homepage": "https://github.com/amplitude/Amplitude-TypeScript",