From 7ccfbd33c714232dae4adbdf96288aa7b3ffa10b Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Tue, 25 Mar 2025 16:01:58 +0000 Subject: [PATCH 1/2] fix(types): add missing `ServiceDB` interface any property of `type: "$.service.db"` becomes an instance of `ServiceDB` at runtime. --- types/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/src/index.ts b/types/src/index.ts index efcf1b25083d7..46dfff399d2ba 100644 --- a/types/src/index.ts +++ b/types/src/index.ts @@ -247,6 +247,11 @@ export interface ServiceDBProp extends BasePropInterface { type: "$.service.db"; } +export interface ServiceDB { + get(key: string): T | undefined; + set(key: string, value: JSONValue): void; +} + // https://pipedream.com/docs/code/nodejs/using-data-stores/#using-the-data-store export interface DataStoreProp extends BasePropInterface { type: "data_store"; From 0f141bf72a4ac041b4611ddbf64c720327d90227 Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Tue, 25 Mar 2025 16:03:25 +0000 Subject: [PATCH 2/2] Update types/src/index.ts --- types/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/src/index.ts b/types/src/index.ts index 46dfff399d2ba..baf2324057cf0 100644 --- a/types/src/index.ts +++ b/types/src/index.ts @@ -249,7 +249,7 @@ export interface ServiceDBProp extends BasePropInterface { export interface ServiceDB { get(key: string): T | undefined; - set(key: string, value: JSONValue): void; + set(key: string, value: JSONValue | undefined): void; } // https://pipedream.com/docs/code/nodejs/using-data-stores/#using-the-data-store