Skip to main content

Module push_notification_methods

Module push_notification_methods 

Source
Expand description

A2A push-notification method envelopes — the four methods that read and write a task’s push-notification configurations.

§What these are

CreateTaskPushNotificationConfigRequest and CreateTaskPushNotificationConfigResponse are the typed shapes for the CreateTaskPushNotificationConfig JSON-RPC method — register a new webhook for a task.

GetTaskPushNotificationConfigRequest and GetTaskPushNotificationConfigResponse are the typed shapes for the GetTaskPushNotificationConfig JSON-RPC method — fetch a single config by id.

ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse are the typed shapes for the ListTaskPushNotificationConfigs JSON-RPC method — list all configs for a task.

DeleteTaskPushNotificationConfigRequest and DeleteTaskPushNotificationConfigResponse are the typed shapes for the DeleteTaskPushNotificationConfig JSON-RPC method — remove a config by id.

§Why the response is TaskPushNotificationConfig

directly, not a wrapper

Each of the three read/write methods returns a TaskPushNotificationConfig value. The shape is the inner value directly — no wrapper object — so the wire form is the spec’s {"id": "...", "taskId": "...", "url": "..."}. A newtype with transparent is the cheapest shape that keeps the type distinct from a raw TaskPushNotificationConfig (and lets the consumer pattern-match on the response type if they want to).

§Why the delete response is {}

The spec uses google.protobuf.Empty for the delete response, which serialises to {} on the wire. A handler that wants to signal success does not have to write a payload; the JSON-RPC layer’s result: null or result: {} is the success signal.

Structs§

CreateTaskPushNotificationConfigRequest
A typed CreateTaskPushNotificationConfig request. The wire form is the TaskPushNotificationConfig object directly.
CreateTaskPushNotificationConfigResponse
A typed CreateTaskPushNotificationConfig response. The wire form is the TaskPushNotificationConfig object directly.
DeleteTaskPushNotificationConfigRequest
A typed DeleteTaskPushNotificationConfig request. Wire form:
DeleteTaskPushNotificationConfigResponse
A typed DeleteTaskPushNotificationConfig response. The wire form is {} (the spec’s google.protobuf.Empty).
GetTaskPushNotificationConfigRequest
A typed GetTaskPushNotificationConfig request. Wire form:
GetTaskPushNotificationConfigResponse
A typed GetTaskPushNotificationConfig response. The wire form is the TaskPushNotificationConfig object directly.
ListTaskPushNotificationConfigsRequest
A typed ListTaskPushNotificationConfigs request. Wire form:
ListTaskPushNotificationConfigsResponse
A typed ListTaskPushNotificationConfigs response. Wire form: