UNPKG

@artinet/sdk

Version:

A TypeScript SDK for building collaborative AI agents.

27 lines (26 loc) 1.35 kB
/** * Copyright 2025 The Artinet Project * SPDX-License-Identifier: Apache-2.0 */ import { PushNotificationStore, PushNotificationSender } from "@a2a-js/sdk/server"; import { A2A, core } from "../../types/index.js"; import { Manager } from "../../services/core/manager.js"; export interface Notifications extends core.Manager<A2A.PushNotificationConfig[]> { save: (taskId: string, pushNotificationConfig: A2A.PushNotificationConfig) => Promise<void>; load: (taskId: string) => Promise<A2A.PushNotificationConfig[]>; delete: (taskId: string, configId?: string) => Promise<void>; send: (task: A2A.Task) => Promise<void>; } /** Cached Push Notifications Manager */ export declare class PushNotifications extends Manager<A2A.PushNotificationConfig[]> implements Notifications { private readonly _store; private _sender; constructor(store?: PushNotificationStore, sender?: PushNotificationSender); get store(): PushNotificationStore | undefined; get sender(): PushNotificationSender | undefined; set sender(sender: PushNotificationSender | undefined); save(taskId: string, pushNotificationConfig: A2A.PushNotificationConfig): Promise<void>; load(taskId: string): Promise<A2A.PushNotificationConfig[]>; delete(taskId: string, configId?: string): Promise<void>; send(task: A2A.Task): Promise<void>; }