@amplitude/analytics-types 0.17.0 → 0.18.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.
- package/lib/cjs/base-event.d.ts +4 -4
- package/lib/cjs/base-event.d.ts.map +1 -1
- package/lib/cjs/base-event.js.map +1 -1
- package/lib/cjs/plugin.d.ts +2 -2
- package/lib/cjs/plugin.d.ts.map +1 -1
- package/lib/cjs/plugin.js.map +1 -1
- package/lib/esm/base-event.d.ts +4 -4
- package/lib/esm/base-event.d.ts.map +1 -1
- package/lib/esm/base-event.js.map +1 -1
- package/lib/esm/plugin.d.ts +2 -2
- package/lib/esm/plugin.d.ts.map +1 -1
- package/lib/esm/plugin.js.map +1 -1
- package/package.json +2 -2
package/lib/cjs/base-event.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export interface BaseEvent extends EventOptions {
|
|
|
4
4
|
event_type: string;
|
|
5
5
|
event_properties?: {
|
|
6
6
|
[key: string]: any;
|
|
7
|
-
};
|
|
7
|
+
} | undefined;
|
|
8
8
|
user_properties?: {
|
|
9
9
|
[key: string]: any;
|
|
10
|
-
};
|
|
10
|
+
} | undefined;
|
|
11
11
|
group_properties?: {
|
|
12
12
|
[key: string]: any;
|
|
13
|
-
};
|
|
13
|
+
} | undefined;
|
|
14
14
|
groups?: {
|
|
15
15
|
[key: string]: any;
|
|
16
|
-
};
|
|
16
|
+
} | undefined;
|
|
17
17
|
}
|
|
18
18
|
export interface EventOptions {
|
|
19
19
|
user_id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-event.d.ts","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,C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AC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,kBAAkB,CAAC,EAAE,8BAA8B,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-event.js","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"","sourcesContent":["import { Plan } from './plan';\nimport { IngestionMetadataEventProperty } from './ingestion-metadata';\n\nexport interface BaseEvent extends EventOptions {\n event_type: string;\n event_properties?: { [key: string]: any };\n user_properties?: { [key: string]: any };\n group_properties?: { [key: string]: any };\n groups?: { [key: string]: any };\n}\n\nexport interface EventOptions {\n user_id?: string;\n device_id?: string;\n time?: number;\n location_lat?: number;\n location_lng?: number;\n app_version?: string;\n version_name?: string;\n library?: string;\n platform?: string;\n os_name?: string;\n os_version?: string;\n device_brand?: string;\n device_manufacturer?: string;\n device_model?: string;\n carrier?: string;\n country?: string;\n region?: string;\n city?: string;\n dma?: string;\n idfa?: string;\n idfv?: string;\n adid?: string;\n android_id?: string;\n language?: string;\n ip?: string;\n price?: number;\n quantity?: number;\n revenue?: number;\n productId?: string;\n revenueType?: string;\n event_id?: number;\n session_id?: number;\n insert_id?: string;\n plan?: Plan;\n ingestion_metadata?: IngestionMetadataEventProperty;\n partner_id?: string;\n extra?: { [key: string]: any };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-event.js","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"","sourcesContent":["import { Plan } from './plan';\nimport { IngestionMetadataEventProperty } from './ingestion-metadata';\n\nexport interface BaseEvent extends EventOptions {\n event_type: string;\n event_properties?: { [key: string]: any } | undefined;\n user_properties?: { [key: string]: any } | undefined;\n group_properties?: { [key: string]: any } | undefined;\n groups?: { [key: string]: any } | undefined;\n}\n\nexport interface EventOptions {\n user_id?: string;\n device_id?: string;\n time?: number;\n location_lat?: number;\n location_lng?: number;\n app_version?: string;\n version_name?: string;\n library?: string;\n platform?: string;\n os_name?: string;\n os_version?: string;\n device_brand?: string;\n device_manufacturer?: string;\n device_model?: string;\n carrier?: string;\n country?: string;\n region?: string;\n city?: string;\n dma?: string;\n idfa?: string;\n idfv?: string;\n adid?: string;\n android_id?: string;\n language?: string;\n ip?: string;\n price?: number;\n quantity?: number;\n revenue?: number;\n productId?: string;\n revenueType?: string;\n event_id?: number;\n session_id?: number;\n insert_id?: string;\n plan?: Plan;\n ingestion_metadata?: IngestionMetadataEventProperty;\n partner_id?: string;\n extra?: { [key: string]: any };\n}\n"]}
|
package/lib/cjs/plugin.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export interface BeforePlugin<T = CoreClient> {
|
|
|
11
11
|
name: string;
|
|
12
12
|
type: PluginType.BEFORE;
|
|
13
13
|
setup(config: Config, client?: T): Promise<void>;
|
|
14
|
-
execute(context: Event): Promise<Event>;
|
|
14
|
+
execute(context: Event): Promise<Event | null>;
|
|
15
15
|
}
|
|
16
16
|
export interface EnrichmentPlugin<T = CoreClient> {
|
|
17
17
|
name: string;
|
|
18
18
|
type: PluginType.ENRICHMENT;
|
|
19
19
|
setup(config: Config, client?: T): Promise<void>;
|
|
20
|
-
execute(context: Event): Promise<Event>;
|
|
20
|
+
execute(context: Event): Promise<Event | null>;
|
|
21
21
|
}
|
|
22
22
|
export interface DestinationPlugin<T = CoreClient> {
|
|
23
23
|
name: string;
|
package/lib/cjs/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,UAAU;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;IACxB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CA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M,MAAM,GAAG,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,CAAC"}
|
package/lib/cjs/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":";;AAKA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;IACzB,yCAA2B,CAAA;AAC7B,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB","sourcesContent":["import { Event } from './event';\nimport { Config } from './config';\nimport { Result } from './result';\nimport { CoreClient } from './client/core-client';\n\nexport enum PluginType {\n BEFORE = 'before',\n ENRICHMENT = 'enrichment',\n DESTINATION = 'destination',\n}\n\nexport interface BeforePlugin<T = CoreClient> {\n name: string;\n type: PluginType.BEFORE;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event>;\n}\n\nexport interface EnrichmentPlugin<T = CoreClient> {\n name: string;\n type: PluginType.ENRICHMENT;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event>;\n}\n\nexport interface DestinationPlugin<T = CoreClient> {\n name: string;\n type: PluginType.DESTINATION;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Result>;\n flush?(): Promise<void>;\n}\n\nexport type Plugin = BeforePlugin | EnrichmentPlugin | DestinationPlugin;\n"]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":";;AAKA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;IACzB,yCAA2B,CAAA;AAC7B,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB","sourcesContent":["import { Event } from './event';\nimport { Config } from './config';\nimport { Result } from './result';\nimport { CoreClient } from './client/core-client';\n\nexport enum PluginType {\n BEFORE = 'before',\n ENRICHMENT = 'enrichment',\n DESTINATION = 'destination',\n}\n\nexport interface BeforePlugin<T = CoreClient> {\n name: string;\n type: PluginType.BEFORE;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event | null>;\n}\n\nexport interface EnrichmentPlugin<T = CoreClient> {\n name: string;\n type: PluginType.ENRICHMENT;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event | null>;\n}\n\nexport interface DestinationPlugin<T = CoreClient> {\n name: string;\n type: PluginType.DESTINATION;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Result>;\n flush?(): Promise<void>;\n}\n\nexport type Plugin = BeforePlugin | EnrichmentPlugin | DestinationPlugin;\n"]}
|
package/lib/esm/base-event.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export interface BaseEvent extends EventOptions {
|
|
|
4
4
|
event_type: string;
|
|
5
5
|
event_properties?: {
|
|
6
6
|
[key: string]: any;
|
|
7
|
-
};
|
|
7
|
+
} | undefined;
|
|
8
8
|
user_properties?: {
|
|
9
9
|
[key: string]: any;
|
|
10
|
-
};
|
|
10
|
+
} | undefined;
|
|
11
11
|
group_properties?: {
|
|
12
12
|
[key: string]: any;
|
|
13
|
-
};
|
|
13
|
+
} | undefined;
|
|
14
14
|
groups?: {
|
|
15
15
|
[key: string]: any;
|
|
16
|
-
};
|
|
16
|
+
} | undefined;
|
|
17
17
|
}
|
|
18
18
|
export interface EventOptions {
|
|
19
19
|
user_id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-event.d.ts","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAA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,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,kBAAkB,CAAC,EAAE,8BAA8B,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-event.js","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"","sourcesContent":["import { Plan } from './plan';\nimport { IngestionMetadataEventProperty } from './ingestion-metadata';\n\nexport interface BaseEvent extends EventOptions {\n event_type: string;\n event_properties?: { [key: string]: any };\n user_properties?: { [key: string]: any };\n group_properties?: { [key: string]: any };\n groups?: { [key: string]: any };\n}\n\nexport interface EventOptions {\n user_id?: string;\n device_id?: string;\n time?: number;\n location_lat?: number;\n location_lng?: number;\n app_version?: string;\n version_name?: string;\n library?: string;\n platform?: string;\n os_name?: string;\n os_version?: string;\n device_brand?: string;\n device_manufacturer?: string;\n device_model?: string;\n carrier?: string;\n country?: string;\n region?: string;\n city?: string;\n dma?: string;\n idfa?: string;\n idfv?: string;\n adid?: string;\n android_id?: string;\n language?: string;\n ip?: string;\n price?: number;\n quantity?: number;\n revenue?: number;\n productId?: string;\n revenueType?: string;\n event_id?: number;\n session_id?: number;\n insert_id?: string;\n plan?: Plan;\n ingestion_metadata?: IngestionMetadataEventProperty;\n partner_id?: string;\n extra?: { [key: string]: any };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-event.js","sourceRoot":"","sources":["../../src/base-event.ts"],"names":[],"mappings":"","sourcesContent":["import { Plan } from './plan';\nimport { IngestionMetadataEventProperty } from './ingestion-metadata';\n\nexport interface BaseEvent extends EventOptions {\n event_type: string;\n event_properties?: { [key: string]: any } | undefined;\n user_properties?: { [key: string]: any } | undefined;\n group_properties?: { [key: string]: any } | undefined;\n groups?: { [key: string]: any } | undefined;\n}\n\nexport interface EventOptions {\n user_id?: string;\n device_id?: string;\n time?: number;\n location_lat?: number;\n location_lng?: number;\n app_version?: string;\n version_name?: string;\n library?: string;\n platform?: string;\n os_name?: string;\n os_version?: string;\n device_brand?: string;\n device_manufacturer?: string;\n device_model?: string;\n carrier?: string;\n country?: string;\n region?: string;\n city?: string;\n dma?: string;\n idfa?: string;\n idfv?: string;\n adid?: string;\n android_id?: string;\n language?: string;\n ip?: string;\n price?: number;\n quantity?: number;\n revenue?: number;\n productId?: string;\n revenueType?: string;\n event_id?: number;\n session_id?: number;\n insert_id?: string;\n plan?: Plan;\n ingestion_metadata?: IngestionMetadataEventProperty;\n partner_id?: string;\n extra?: { [key: string]: any };\n}\n"]}
|
package/lib/esm/plugin.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export interface BeforePlugin<T = CoreClient> {
|
|
|
11
11
|
name: string;
|
|
12
12
|
type: PluginType.BEFORE;
|
|
13
13
|
setup(config: Config, client?: T): Promise<void>;
|
|
14
|
-
execute(context: Event): Promise<Event>;
|
|
14
|
+
execute(context: Event): Promise<Event | null>;
|
|
15
15
|
}
|
|
16
16
|
export interface EnrichmentPlugin<T = CoreClient> {
|
|
17
17
|
name: string;
|
|
18
18
|
type: PluginType.ENRICHMENT;
|
|
19
19
|
setup(config: Config, client?: T): Promise<void>;
|
|
20
|
-
execute(context: Event): Promise<Event>;
|
|
20
|
+
execute(context: Event): Promise<Event | null>;
|
|
21
21
|
}
|
|
22
22
|
export interface DestinationPlugin<T = CoreClient> {
|
|
23
23
|
name: string;
|
package/lib/esm/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,UAAU;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;IACxB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,M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GAAG,iBAAiB,CAAC"}
|
package/lib/esm/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;IACzB,yCAA2B,CAAA;AAC7B,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB","sourcesContent":["import { Event } from './event';\nimport { Config } from './config';\nimport { Result } from './result';\nimport { CoreClient } from './client/core-client';\n\nexport enum PluginType {\n BEFORE = 'before',\n ENRICHMENT = 'enrichment',\n DESTINATION = 'destination',\n}\n\nexport interface BeforePlugin<T = CoreClient> {\n name: string;\n type: PluginType.BEFORE;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event>;\n}\n\nexport interface EnrichmentPlugin<T = CoreClient> {\n name: string;\n type: PluginType.ENRICHMENT;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event>;\n}\n\nexport interface DestinationPlugin<T = CoreClient> {\n name: string;\n type: PluginType.DESTINATION;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Result>;\n flush?(): Promise<void>;\n}\n\nexport type Plugin = BeforePlugin | EnrichmentPlugin | DestinationPlugin;\n"]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,uCAAyB,CAAA;IACzB,yCAA2B,CAAA;AAC7B,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB","sourcesContent":["import { Event } from './event';\nimport { Config } from './config';\nimport { Result } from './result';\nimport { CoreClient } from './client/core-client';\n\nexport enum PluginType {\n BEFORE = 'before',\n ENRICHMENT = 'enrichment',\n DESTINATION = 'destination',\n}\n\nexport interface BeforePlugin<T = CoreClient> {\n name: string;\n type: PluginType.BEFORE;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event | null>;\n}\n\nexport interface EnrichmentPlugin<T = CoreClient> {\n name: string;\n type: PluginType.ENRICHMENT;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Event | null>;\n}\n\nexport interface DestinationPlugin<T = CoreClient> {\n name: string;\n type: PluginType.DESTINATION;\n setup(config: Config, client?: T): Promise<void>;\n execute(context: Event): Promise<Result>;\n flush?(): Promise<void>;\n}\n\nexport type Plugin = BeforePlugin | EnrichmentPlugin | DestinationPlugin;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"lib"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "5873e5d604445490dd9fcbfe80dc3cbb19a17c2d"
|
|
38
38
|
}
|