{"version":3,"file":"get-background-events.mjs","sourceRoot":"","sources":["../../../src/types/methods/get-background-events.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json } from '@metamask/utils';\n\nimport type { SnapId } from '../snap';\n\n/**\n * Background event type.\n *\n * Note: The date generated when scheduling an event with a duration will be\n * represented in UTC.\n *\n * @property id - The unique ID representing the event.\n * @property scheduledAt - The ISO 8601 timestamp of when the event was\n * scheduled.\n * @property snapId - The ID of the Snap that scheduled the event.\n * @property date - The ISO 8601 date of when the event is scheduled for.\n * @property request - The request that is supplied to the `onCronjob` handler\n * when the event is fired.\n */\nexport type BackgroundEvent = {\n  id: string;\n  scheduledAt: string;\n  snapId: SnapId;\n  date: string;\n  request: {\n    /**\n     * The method to be called when the event is fired.\n     */\n    method: string;\n\n    /**\n     * The optional JSON-RPC version for the request, which is always \"2.0\" if\n     * provided.\n     */\n    jsonrpc?: '2.0' | undefined;\n\n    /**\n     * The optional ID for the request.\n     */\n    id?: string | number | null | undefined;\n\n    /**\n     * The optional parameters for the request.\n     */\n    params?: Json[] | Record<string, Json> | undefined;\n  };\n};\n\n/**\n * An array of scheduled background events.\n */\nexport type GetBackgroundEventsResult = BackgroundEvent[];\n\n/**\n * This method does not accept any parameters.\n */\nexport type GetBackgroundEventsParams = never;\n"]}