UNPKG

2.81 kBSource Map (JSON)View Raw
1{"version":3,"file":"BackgroundFetch.types.js","sourceRoot":"","sources":["../src/BackgroundFetch.types.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;GAKG;AACH,MAAM,CAAN,IAAY,qBAaX;AAbD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,qEAAU,CAAA;IACV;;OAEG;IACH,uEAAW,CAAA;IACX;;OAEG;IACH,qEAAU,CAAA;AACZ,CAAC,EAbW,qBAAqB,KAArB,qBAAqB,QAahC;AAED,cAAc;AACd,MAAM,CAAN,IAAY,qBAcX;AAdD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,qEAAU,CAAA;IACV;;;OAGG;IACH,6EAAc,CAAA;IACd;;OAEG;IACH,2EAAa,CAAA;AACf,CAAC,EAdW,qBAAqB,KAArB,qBAAqB,QAchC","sourcesContent":["// @needsAudit\n/**\n * This return value is to let iOS know what the result of your background fetch was, so the\n * platform can better schedule future background fetches. Also, your app has up to 30 seconds\n * to perform the task, otherwise your app will be terminated and future background fetches\n * may be delayed.\n */\nexport enum BackgroundFetchResult {\n /**\n * There was no new data to download.\n */\n NoData = 1,\n /**\n * New data was successfully downloaded.\n */\n NewData = 2,\n /**\n * An attempt to download data was made but that attempt failed.\n */\n Failed = 3,\n}\n\n// @needsAudit\nexport enum BackgroundFetchStatus {\n /**\n * The user explicitly disabled background behavior for this app or for the whole system.\n */\n Denied = 1,\n /**\n * Background updates are unavailable and the user cannot enable them again. This status can occur\n * when, for example, parental controls are in effect for the current user.\n */\n Restricted = 2,\n /**\n * Background updates are available for the app.\n */\n Available = 3,\n}\n\n// @needsAudit\nexport interface BackgroundFetchOptions {\n /**\n * Inexact interval in seconds between subsequent repeats of the background fetch alarm. The final\n * interval may differ from the specified one to minimize wakeups and battery usage.\n * - On Android it defaults to __10 minutes__,\n * - On iOS it calls [`BackgroundFetch.setMinimumIntervalAsync`](#backgroundfetchsetminimumintervalasyncminimuminterval)\n * behind the scenes and the default value is the smallest fetch interval supported by the system __(10-15 minutes)__.\n * Background fetch task receives no data, but your task should return a value that best describes\n * the results of your background fetch work.\n * @return Returns a promise that fulfils once the task is registered and rejects in case of any errors.\n */\n minimumInterval?: number;\n /**\n * Whether to stop receiving background fetch events after user terminates the app.\n * @default true\n * @platform android\n */\n stopOnTerminate?: boolean;\n /**\n * Whether to restart background fetch events when the device has finished booting.\n * @default false\n * @platform android\n */\n startOnBoot?: boolean;\n}\n"]}
\No newline at end of file