{"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 represented in UTC.\n *\n * @property id - The unique id representing the event.\n * @property scheduledAt - The ISO 8601 time stamp of when the event was 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 when the event is fired.\n */\nexport type BackgroundEvent = {\n  id: string;\n  scheduledAt: string;\n  snapId: SnapId;\n  date: string;\n  request: {\n    method: string;\n    jsonrpc?: '2.0' | undefined;\n    id?: string | number | null | undefined;\n    params?: Json[] | Record<string, Json> | undefined;\n  };\n};\n\n/**\n * The result returned by the `snap_getBackgroundEvents` method.\n *\n * It consists of an array background events (if any) for a snap.\n */\nexport type GetBackgroundEventsResult = BackgroundEvent[];\n\n/**\n * The request parameters for the `snap_getBackgroundEvents` method.\n *\n * This method does not accept any parameters.\n */\nexport type GetBackgroundEventsParams = never;\n"]}