@jitsu/types
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -163,3 +163,3 @@ import { DefaultJitsuEvent } from "./event"; | ||
*/ | ||
configurationParameters: ConfigurationParameter<keyof Config>[]; | ||
configurationParameters?: ConfigurationParameter<keyof Config>[]; | ||
}; |
{ | ||
"name": "@jitsu/types", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"author": "Jitsu Dev Team <dev@jitsu.com>", | ||
@@ -5,0 +5,0 @@ "description": "Types for Jitsu (👉 https://jitsu.com)", |
@@ -45,3 +45,10 @@ /** | ||
declare type JitsuDataMessageType = "record" | "clear_stream" | "delete_records" | "new_transaction" | "state" | "log"; | ||
declare type JitsuDataMessageType = | ||
| "record" | ||
| "clear_stream" | ||
| "delete_records" | ||
| "new_transaction" | ||
| "state" | ||
| "log" | ||
| "schema"; | ||
@@ -80,7 +87,2 @@ declare type JitsuLogLevel = "INFO" | "WARN" | "DEBUG" | "ERROR"; | ||
/** | ||
* Each field may have an optional SQL type hint to help | ||
* executor to create SQL table column and properly convert the value | ||
*/ | ||
[hints: SqlTypeHintKey]: SqlTypeHint; | ||
/** | ||
* Values. | ||
@@ -91,2 +93,6 @@ */ | ||
declare type StreamSchema = { | ||
[prop: string]: SqlTypeHint | StreamSchema; | ||
}; | ||
declare type LogRecord = { | ||
@@ -135,2 +141,13 @@ level: JitsuLogLevel; | ||
/** | ||
* Declares a schema for stream. Schema is merely a suggestion for Jitsu how | ||
* to treat the data. If field is not present in schema, the data type will | ||
* be inferred automatically. | ||
* | ||
* During the executing of streamReader, the source can send several "schema" messages, | ||
* however those messages shouldn't contradict each other (e.g. first message defines 'a' as VARCHAR(100), | ||
* and the next message defines it as NUMERIC) | ||
*/ | ||
declare type SchemaMessage = JitsuDataMessage<"schema", StreamSchema>; | ||
declare type LogMessage = JitsuDataMessage<"log", LogRecord>; | ||
@@ -174,3 +191,8 @@ /** | ||
addRecord(record: DataRecord); | ||
/** | ||
* See SchemaMessage | ||
*/ | ||
schema(schema: StreamSchema); | ||
/** | ||
* Report that persistent state was changed and provide an object representing current state. | ||
@@ -177,0 +199,0 @@ */ |
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
23759
615