@jitsu/protocols 1.3.1-canary.300.20231019132232 → 1.3.1-canary.300.20231019133936

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.
@@ -1,5 +1,5 @@
1
1
  import { ISO8601Date } from "./iso8601";
2
- import { Geo } from "./functions";
2
+ import type { Geo } from "./functions";
3
3
 
4
4
  export type IngestType = "s2s" | "browser";
5
5
 
@@ -5,7 +5,7 @@ export type SetOpts = { ttlMs?: number } | { ttlSec?: number };
5
5
  /**
6
6
  * A key value store that exposed to a function
7
7
  */
8
- interface Store {
8
+ export interface Store {
9
9
  get(key: string): Promise<any>;
10
10
  del(key: string): Promise<void>;
11
11
  set(key: string, value: any, opts?: SetOpts): Promise<void>;
@@ -14,7 +14,7 @@ interface Store {
14
14
  /**
15
15
  * Store for incoming events, destination results and function log messages
16
16
  */
17
- interface EventsStore {
17
+ export interface EventsStore {
18
18
  log(connectionId: string, error: boolean, msg: Record<string, any>): void;
19
19
  }
20
20
  /**
@@ -217,3 +217,13 @@ export interface JitsuFunction<E extends AnyEvent = AnyEvent, P extends AnyProps
217
217
  export type BuiltinFunctionName<T extends string = string> = `builtin.${T}`;
218
218
  export type BuiltinDestinationFunctionName = BuiltinFunctionName<`destination.${string}`>;
219
219
  export type BuiltinTransformationFunctionName = BuiltinFunctionName<`transformation.${string}`>;
220
+
221
+ export const DropRetryErrorName = "Drop & RetryError";
222
+ export const RetryErrorName = "RetryError";
223
+
224
+ export class RetryError extends Error {
225
+ constructor(message?: any, options?: { drop: boolean }) {
226
+ super(message);
227
+ this.name = options?.drop ? `${DropRetryErrorName}` : `${RetryErrorName}`;
228
+ }
229
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/protocols",
3
- "version": "1.3.1-canary.300.20231019132232",
3
+ "version": "1.3.1-canary.300.20231019133936",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "publishConfig": {