UNPKG

@sprucelabs/mercury-client

Version:

The simple way to interact with the Spruce Experience Platform

104 lines (103 loc) 3.87 kB
declare const statusChangePayloadSchema: { id: string; fields: { status: { type: "select"; isRequired: true; options: { choices: ({ readonly label: "Connecting"; readonly value: "connecting"; } | { readonly label: "Connected"; readonly value: "connected"; } | { readonly label: "Disconnected"; readonly value: "disconnected"; })[]; }; }; }; }; declare const statusChangeTargetAndPayloadSchema: { id: string; fields: { payload: { type: "schema"; isRequired: true; options: { schema: { id: string; fields: { status: { type: "select"; isRequired: true; options: { choices: ({ readonly label: "Connecting"; readonly value: "connecting"; } | { readonly label: "Connected"; readonly value: "connected"; } | { readonly label: "Disconnected"; readonly value: "disconnected"; })[]; }; }; }; }; }; }; }; }; type StatusChangeTargetAndPayloadSchema = typeof statusChangeTargetAndPayloadSchema; type StatusChangePayloadSchema = typeof statusChangePayloadSchema; declare module '@sprucelabs/mercury-types/build/types/mercury.types' { interface SkillEventSignatures { 'connection-status-change': { emitPayloadSchema: StatusChangeTargetAndPayloadSchema; }; } } export declare const connectionStatusContract: { id: string; eventSignatures: { 'connection-status-change': { emitPayloadSchema: { id: string; fields: { payload: { type: "schema"; isRequired: true; options: { schema: { id: string; fields: { status: { type: "select"; isRequired: true; options: { choices: ({ readonly label: "Connecting"; readonly value: "connecting"; } | { readonly label: "Connected"; readonly value: "connected"; } | { readonly label: "Disconnected"; readonly value: "disconnected"; })[]; }; }; }; }; }; }; }; }; }; }; }; export type ConnectionStatus = StatusChangePayloadSchema['fields']['status']['options']['choices'][number]['value']; export {};