@jitsu/types
Advanced tools
Comparing version 0.2.2-alpha.56 to 0.3.0-alpha.0
@@ -57,5 +57,5 @@ /** | ||
/** | ||
* Event object | ||
* Default structure of Jitsu event object | ||
*/ | ||
export type JitsuEvent = { | ||
export type DefaultJitsuEvent = { | ||
event_type: string; //event type | ||
@@ -62,0 +62,0 @@ source_ip?: string; //IP address. Do not set this field on a client side, it will be rewritten on the server |
@@ -1,3 +0,4 @@ | ||
import { JitsuEvent } from "./event"; | ||
import { DefaultJitsuEvent } from "./event"; | ||
import { ConfigurationParameter } from "./parameters"; | ||
import { Config } from "prettier"; | ||
@@ -37,8 +38,2 @@ /** | ||
/** | ||
* Destination configuration built out of ExtensionDescriptor.configurationParameters | ||
*/ | ||
type ExtensionConfiguration = { [key: string]: any }; | ||
/** | ||
* A loose definition of set. Includes singleton, array or null / undefined (meaning empty set) | ||
@@ -56,3 +51,3 @@ */ | ||
*/ | ||
export declare type TransformationFunction<E = JitsuEvent> = (event: E) => ObjectSet<E>; | ||
export declare type TransformationFunction<E = DefaultJitsuEvent> = (event: E) => ObjectSet<E>; | ||
@@ -63,3 +58,3 @@ /** | ||
*/ | ||
export declare type JitsuDestinationContext = { | ||
export declare type JitsuDestinationContext<Config = Record<string, any>> = { | ||
/** | ||
@@ -76,3 +71,3 @@ * Unique Id of configured destination instance on Jitsu server | ||
*/ | ||
config: ExtensionConfiguration; | ||
config: Config; | ||
}; | ||
@@ -102,3 +97,3 @@ | ||
*/ | ||
export declare type ConfigValidator = (config: ExtensionConfiguration) => Promise<ConfigValidationResult>; | ||
export declare type ConfigValidator<Config = Record<string, any>> = (config: Config) => Promise<ConfigValidationResult>; | ||
@@ -109,8 +104,8 @@ /** | ||
* Avoid using `fetch` if possible. Just return | ||
* @param JitsuEvent incoming event | ||
* @param JitsuDestination context of the processing | ||
* @param event incoming event | ||
* @param context context of the processing | ||
*/ | ||
export declare type DestinationFunction<E = JitsuEvent> = ( | ||
export declare type DestinationFunction<E = DefaultJitsuEvent, Config = Record<string, any>> = ( | ||
event: E, | ||
context: JitsuDestinationContext | ||
context: JitsuDestinationContext<Config> | ||
) => ObjectSet<DestinationMessage>; | ||
@@ -117,0 +112,0 @@ |
{ | ||
"name": "@jitsu/types", | ||
"version": "0.2.2-alpha.56+8467fb2", | ||
"version": "0.3.0-alpha.0", | ||
"publishConfig": { | ||
@@ -20,3 +20,3 @@ "access": "public" | ||
}, | ||
"gitHead": "8467fb2d0d16e4dca62094075715150c71d91c8e" | ||
"gitHead": "ce408e69992f569f34a71e3383a1b958538ffce4" | ||
} |
import { DestinationFunction, DestinationMessage, JitsuDestinationContext, ObjectSet } from "./extension"; | ||
import { JitsuEvent } from "./event"; | ||
import { DefaultJitsuEvent } from "./event"; | ||
@@ -8,4 +8,4 @@ export declare type DestinationTestParams = { | ||
destination: DestinationFunction; | ||
event: JitsuEvent; | ||
event: DefaultJitsuEvent; | ||
expectedResult: ObjectSet<DestinationMessage>; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
0
10046
243