@amplitude/analytics-types 2.7.0 → 2.8.0

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.
@@ -88,15 +88,15 @@ export interface Config {
88
88
  export interface RequestMetadata {
89
89
  sdk: {
90
90
  metrics: {
91
- histogram: {
92
- remote_config_fetch_time?: number;
93
- };
91
+ histogram: HistogramOptions;
94
92
  };
95
93
  };
96
94
  recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;
97
95
  }
98
96
  export interface HistogramOptions {
99
- remote_config_fetch_time?: number;
97
+ remote_config_fetch_time_IDB?: number;
98
+ remote_config_fetch_time_API_success?: number;
99
+ remote_config_fetch_time_API_fail?: number;
100
100
  }
101
101
  export type HistogramKey = keyof HistogramOptions;
102
102
  export interface Options extends Partial<Config> {
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAA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EG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE;QACH,OAAO,EAAE;YACP,SAAS,EAAE,gBAAgB,CAAC;SAC7B,CAAC;KACH,CAAC;IAEF,eAAe,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CACnF;AAED,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAC9C,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,OAAQ,SAAQ,OAAO,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,SAAS,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from '../event';\nimport { IngestionMetadata } from '../ingestion-metadata';\nimport { Plan } from '../plan';\nimport { ServerZoneType } from '../server-zone';\nimport { Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Logger, LogLevel } from '../logger';\nimport { OfflineDisabled } from '../offline';\n\nexport interface Config {\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: Logger;\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?: RequestMetadata;\n}\n\nexport interface RequestMetadata {\n sdk: {\n metrics: {\n histogram: {\n remote_config_fetch_time?: number;\n };\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;\n}\n\nexport interface HistogramOptions {\n remote_config_fetch_time?: number;\n}\n\nexport type HistogramKey = keyof HistogramOptions;\n\nexport interface Options extends Partial<Config> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from '../event';\nimport { IngestionMetadata } from '../ingestion-metadata';\nimport { Plan } from '../plan';\nimport { ServerZoneType } from '../server-zone';\nimport { Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Logger, LogLevel } from '../logger';\nimport { OfflineDisabled } from '../offline';\n\nexport interface Config {\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: Logger;\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?: RequestMetadata;\n}\n\nexport interface RequestMetadata {\n sdk: {\n metrics: {\n histogram: HistogramOptions;\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;\n}\n\nexport interface HistogramOptions {\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 HistogramOptions;\n\nexport interface Options extends Partial<Config> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
@@ -88,15 +88,15 @@ export interface Config {
88
88
  export interface RequestMetadata {
89
89
  sdk: {
90
90
  metrics: {
91
- histogram: {
92
- remote_config_fetch_time?: number;
93
- };
91
+ histogram: HistogramOptions;
94
92
  };
95
93
  };
96
94
  recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;
97
95
  }
98
96
  export interface HistogramOptions {
99
- remote_config_fetch_time?: number;
97
+ remote_config_fetch_time_IDB?: number;
98
+ remote_config_fetch_time_API_success?: number;
99
+ remote_config_fetch_time_API_fail?: number;
100
100
  }
101
101
  export type HistogramKey = keyof HistogramOptions;
102
102
  export interface Options extends Partial<Config> {
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACx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H,eAAe,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC;;OAEG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE;QACH,OAAO,EAAE;YACP,SAAS,EAAE,gBAAgB,CAAC;SAC7B,CAAC;KACH,CAAC;IAEF,eAAe,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CACnF;AAED,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAC9C,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,OAAQ,SAAQ,OAAO,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,SAAS,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from '../event';\nimport { IngestionMetadata } from '../ingestion-metadata';\nimport { Plan } from '../plan';\nimport { ServerZoneType } from '../server-zone';\nimport { Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Logger, LogLevel } from '../logger';\nimport { OfflineDisabled } from '../offline';\n\nexport interface Config {\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: Logger;\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?: RequestMetadata;\n}\n\nexport interface RequestMetadata {\n sdk: {\n metrics: {\n histogram: {\n remote_config_fetch_time?: number;\n };\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;\n}\n\nexport interface HistogramOptions {\n remote_config_fetch_time?: number;\n}\n\nexport type HistogramKey = keyof HistogramOptions;\n\nexport interface Options extends Partial<Config> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/config/core.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from '../event';\nimport { IngestionMetadata } from '../ingestion-metadata';\nimport { Plan } from '../plan';\nimport { ServerZoneType } from '../server-zone';\nimport { Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Logger, LogLevel } from '../logger';\nimport { OfflineDisabled } from '../offline';\n\nexport interface Config {\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: Logger;\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?: RequestMetadata;\n}\n\nexport interface RequestMetadata {\n sdk: {\n metrics: {\n histogram: HistogramOptions;\n };\n };\n\n recordHistogram<T extends HistogramKey>(key: T, value: HistogramOptions[T]): void;\n}\n\nexport interface HistogramOptions {\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 HistogramOptions;\n\nexport interface Options extends Partial<Config> {\n apiKey: string;\n transportProvider: Transport;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/analytics-types",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "",
5
5
  "author": "Amplitude Inc",
6
6
  "homepage": "https://github.com/amplitude/Amplitude-TypeScript",
@@ -35,5 +35,5 @@
35
35
  "files": [
36
36
  "lib"
37
37
  ],
38
- "gitHead": "e9e623419f257678acac7f70402c4683d1c8107a"
38
+ "gitHead": "1a070ad8aa0b2d274802acbac5a92bbbe38d2257"
39
39
  }