@artinet/sdk 0.6.9 → 0.6.10
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/dist/storage/sqlite.d.ts
CHANGED
|
@@ -346,6 +346,8 @@ export type TaskTable = typeof TaskTable.$inferSelect;
|
|
|
346
346
|
export declare class SQLiteStore extends Tasks {
|
|
347
347
|
private db;
|
|
348
348
|
constructor(db: BaseSQLiteDatabase<`sync` | `async`, any, TaskTable>, tasks?: Map<string, A2A.Task>);
|
|
349
|
+
has(id: string): Promise<boolean>;
|
|
350
|
+
list(): Promise<A2A.Task[]>;
|
|
349
351
|
get(id: string): Promise<A2A.Task | undefined>;
|
|
350
352
|
set(id: string, data?: A2A.Task): Promise<void>;
|
|
351
353
|
delete(id: string): Promise<void>;
|
package/dist/storage/sqlite.js
CHANGED
|
@@ -33,6 +33,13 @@ export class SQLiteStore extends Tasks {
|
|
|
33
33
|
this.db = db;
|
|
34
34
|
createTaskTable(db);
|
|
35
35
|
}
|
|
36
|
+
async has(id) {
|
|
37
|
+
return ((await super.has(id)) ||
|
|
38
|
+
(await this.db.select().from(TaskTable).where(eq(TaskTable.id, id)).get()) !== undefined);
|
|
39
|
+
}
|
|
40
|
+
async list() {
|
|
41
|
+
return await this.db.select().from(TaskTable).execute();
|
|
42
|
+
}
|
|
36
43
|
async get(id) {
|
|
37
44
|
let task = await super.get(id);
|
|
38
45
|
if (task) {
|