@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.
package/async-request.d.ts
CHANGED
|
@@ -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
|
+
}
|