finos / FDC3

An open standard for the financial desktop.
https://fdc3.finos.org
Other
201 stars 132 forks source link

Adding Event Listeners on Private Channel #1293

Closed robmoffat closed 3 months ago

robmoffat commented 3 months ago

Maybe I've got my wires crossed, but I don't think this is right:

/**
 * An event message from the Desktop Agent to an app indicating that another app has added a
 * context listener to a specific PrivateChannel.
 *
 * A request message from an FDC3-enabled app to a Desktop Agent.
 */
export interface PrivateChannelAddEventListenerRequest {
    /**
     * Metadata for a request message sent by an FDC3-enabled app to a Desktop Agent.
     */
    meta: AddContextListenerRequestMeta;
    /**
     * The message payload typically contains the arguments to FDC3 API functions.
     */
    payload: TPayload;
    /**
     * Identifies the type of the message and it is typically set to the FDC3 function name that
     * the message relates to, e.g. 'findIntent', with 'Request' appended.
     */
    type: "privateChannelAddEventListenerRequest";
}

/**
 * The message payload typically contains the arguments to FDC3 API functions.
 */
export interface TPayload {
    /**
     * The type of the context listener to add to the channel, or null if it should listen to
     * all types.
     */
    contextType: null | string;
    /**
     * The Id of the PrivateChannel that the listener should be added to.
     */
    privateChannelId: string;
}
kriswest commented 3 months ago

The first thing to do if you see one of these is to check the corresponding schema for errors: In this case the description is indeed wrong - it looks like I copy/pasted PrivateChannelAddContextListenerRequest and then didn't save my changes to it.

Should be fixed by 5deeb5da870ee5b31e0c573f60c81e234a503be1