feat(smart-app): implement complete mobile app MVP

- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,6 @@
declare const _default: {
registerTaskAsync(taskName: string): Promise<null>;
unregisterTaskAsync(taskName: string): Promise<null>;
};
export default _default;
//# sourceMappingURL=BackgroundNotificationTasksModule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.ts"],"names":[],"mappings":";gCACoC,MAAM,GAAG,QAAQ,IAAI,CAAC;kCAGpB,MAAM,GAAG,QAAQ,IAAI,CAAC;;AAJ5D,wBAOE"}

View File

@@ -0,0 +1,9 @@
export default {
async registerTaskAsync(taskName) {
return null;
},
async unregisterTaskAsync(taskName) {
return null;
},
};
//# sourceMappingURL=BackgroundNotificationTasksModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.js","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,CAAC,iBAAiB,CAAC,QAAgB;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,mBAAmB,CAAC,QAAgB;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC","sourcesContent":["export default {\n async registerTaskAsync(taskName: string): Promise<null> {\n return null;\n },\n async unregisterTaskAsync(taskName: string): Promise<null> {\n return null;\n },\n};\n"]}

View File

@@ -0,0 +1,4 @@
import { BackgroundNotificationTasksModule } from './BackgroundNotificationTasksModule.types';
declare const _default: BackgroundNotificationTasksModule;
export default _default;
//# sourceMappingURL=BackgroundNotificationTasksModule.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.native.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;;AAE9F,wBAEE"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoBackgroundNotificationTasksModule');
//# sourceMappingURL=BackgroundNotificationTasksModule.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.native.js","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAChC,uCAAuC,CACxC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { BackgroundNotificationTasksModule } from './BackgroundNotificationTasksModule.types';\n\nexport default requireNativeModule<BackgroundNotificationTasksModule>(\n 'ExpoBackgroundNotificationTasksModule'\n);\n"]}

View File

@@ -0,0 +1,11 @@
import { ProxyNativeModule } from 'expo-modules-core';
export interface BackgroundNotificationTasksModule extends ProxyNativeModule {
registerTaskAsync: (taskName: string) => Promise<null>;
unregisterTaskAsync: (taskName: string) => Promise<null>;
}
export declare enum BackgroundNotificationResult {
NoData = 1,
NewData = 2,
Failed = 3
}
//# sourceMappingURL=BackgroundNotificationTasksModule.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.types.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,iCAAkC,SAAQ,iBAAiB;IAC1E,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAED,oBAAY,4BAA4B;IACtC,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;CACX"}

View File

@@ -0,0 +1,7 @@
export var BackgroundNotificationResult;
(function (BackgroundNotificationResult) {
BackgroundNotificationResult[BackgroundNotificationResult["NoData"] = 1] = "NoData";
BackgroundNotificationResult[BackgroundNotificationResult["NewData"] = 2] = "NewData";
BackgroundNotificationResult[BackgroundNotificationResult["Failed"] = 3] = "Failed";
})(BackgroundNotificationResult || (BackgroundNotificationResult = {}));
//# sourceMappingURL=BackgroundNotificationTasksModule.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BackgroundNotificationTasksModule.types.js","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,mFAAU,CAAA;IACV,qFAAW,CAAA;IACX,mFAAU,CAAA;AACZ,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nexport interface BackgroundNotificationTasksModule extends ProxyNativeModule {\n registerTaskAsync: (taskName: string) => Promise<null>;\n unregisterTaskAsync: (taskName: string) => Promise<null>;\n}\n\nexport enum BackgroundNotificationResult {\n NoData = 1,\n NewData = 2,\n Failed = 3,\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { BadgeModule } from './BadgeModule.types';
declare const _default: BadgeModule;
export default _default;
//# sourceMappingURL=BadgeModule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.d.ts","sourceRoot":"","sources":["../src/BadgeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;AAElD,wBAGiB"}

View File

@@ -0,0 +1,5 @@
export default {
addListener: () => { },
removeListeners: () => { },
};
//# sourceMappingURL=BadgeModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.js","sourceRoot":"","sources":["../src/BadgeModule.ts"],"names":[],"mappings":"AAEA,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACX,CAAC","sourcesContent":["import { BadgeModule } from './BadgeModule.types';\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n} as BadgeModule;\n"]}

View File

@@ -0,0 +1,4 @@
import { BadgeModule } from './BadgeModule.types';
declare const _default: BadgeModule;
export default _default;
//# sourceMappingURL=BadgeModule.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.native.d.ts","sourceRoot":"","sources":["../src/BadgeModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;AAIlD,wBAQiB"}

View File

@@ -0,0 +1,12 @@
import { requireNativeModule } from 'expo-modules-core';
const nativeModule = requireNativeModule('ExpoBadgeModule');
export default {
...nativeModule,
// We overwrite setBadgeCountAsync to omit
// an obsolete options argument when calling
// the native function.
setBadgeCountAsync: async (badgeCount, options) => {
return await nativeModule.setBadgeCountAsync(badgeCount);
},
};
//# sourceMappingURL=BadgeModule.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.native.js","sourceRoot":"","sources":["../src/BadgeModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,YAAY,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAE5D,eAAe;IACb,GAAG,YAAY;IACf,0CAA0C;IAC1C,4CAA4C;IAC5C,uBAAuB;IACvB,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAChD,OAAO,MAAM,YAAY,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;CACa,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { BadgeModule } from './BadgeModule.types';\n\nconst nativeModule = requireNativeModule('ExpoBadgeModule');\n\nexport default {\n ...nativeModule,\n // We overwrite setBadgeCountAsync to omit\n // an obsolete options argument when calling\n // the native function.\n setBadgeCountAsync: async (badgeCount, options) => {\n return await nativeModule.setBadgeCountAsync(badgeCount);\n },\n} as BadgeModule;\n"]}

View File

@@ -0,0 +1,10 @@
import { Options as BadginOptions } from 'badgin';
import { ProxyNativeModule } from 'expo-modules-core';
export type WebSetBadgeCountOptions = BadginOptions;
type SetBadgeCountOptions = WebSetBadgeCountOptions | undefined;
export interface BadgeModule extends ProxyNativeModule {
getBadgeCountAsync?: () => Promise<number>;
setBadgeCountAsync?: (badgeCount: number, options: SetBadgeCountOptions) => Promise<boolean>;
}
export {};
//# sourceMappingURL=BadgeModule.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.types.d.ts","sourceRoot":"","sources":["../src/BadgeModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC;AACpD,KAAK,oBAAoB,GAAG,uBAAuB,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9F"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=BadgeModule.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.types.js","sourceRoot":"","sources":["../src/BadgeModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options as BadginOptions } from 'badgin';\nimport { ProxyNativeModule } from 'expo-modules-core';\n\nexport type WebSetBadgeCountOptions = BadginOptions;\ntype SetBadgeCountOptions = WebSetBadgeCountOptions | undefined;\n\nexport interface BadgeModule extends ProxyNativeModule {\n getBadgeCountAsync?: () => Promise<number>;\n setBadgeCountAsync?: (badgeCount: number, options: SetBadgeCountOptions) => Promise<boolean>;\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { BadgeModule } from './BadgeModule.types';
declare const badgeModule: BadgeModule;
export default badgeModule;
//# sourceMappingURL=BadgeModule.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.web.d.ts","sourceRoot":"","sources":["../src/BadgeModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,QAAA,MAAM,WAAW,EAAE,WAqBlB,CAAC;AAEF,eAAe,WAAW,CAAC"}

View File

@@ -0,0 +1,26 @@
let lastSetBadgeCount = 0;
const badgeModule = {
addListener: () => { },
removeListeners: () => { },
getBadgeCountAsync: async () => {
return lastSetBadgeCount;
},
setBadgeCountAsync: async (badgeCount, options) => {
// If this module is loaded in SSR (NextJS), we can't modify the badge.
// It also can't load the badgin module, that instantly invokes methods on window.
if (typeof window === 'undefined') {
return false;
}
const badgin = require('badgin');
if (badgeCount > 0) {
badgin.set(badgeCount, options);
}
else {
badgin.clear();
}
lastSetBadgeCount = badgeCount;
return true;
},
};
export default badgeModule;
//# sourceMappingURL=BadgeModule.web.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BadgeModule.web.js","sourceRoot":"","sources":["../src/BadgeModule.web.ts"],"names":[],"mappings":"AAEA,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,MAAM,WAAW,GAAgB;IAC/B,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC7B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAChD,uEAAuE;QACvE,kFAAkF;QAClF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,OAAO,KAAK,CAAC;SACd;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,UAAU,GAAG,CAAC,EAAE;YAClB,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;SACjC;aAAM;YACL,MAAM,CAAC,KAAK,EAAE,CAAC;SAChB;QACD,iBAAiB,GAAG,UAAU,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { BadgeModule } from './BadgeModule.types';\n\nlet lastSetBadgeCount = 0;\n\nconst badgeModule: BadgeModule = {\n addListener: () => {},\n removeListeners: () => {},\n getBadgeCountAsync: async () => {\n return lastSetBadgeCount;\n },\n setBadgeCountAsync: async (badgeCount, options) => {\n // If this module is loaded in SSR (NextJS), we can't modify the badge.\n // It also can't load the badgin module, that instantly invokes methods on window.\n if (typeof window === 'undefined') {\n return false;\n }\n const badgin = require('badgin');\n if (badgeCount > 0) {\n badgin.set(badgeCount, options);\n } else {\n badgin.clear();\n }\n lastSetBadgeCount = badgeCount;\n return true;\n },\n};\n\nexport default badgeModule;\n"]}

View File

@@ -0,0 +1,15 @@
import 'abort-controller/polyfill';
/**
* Encapsulates device server registration data
*/
export type DevicePushTokenRegistration = {
isEnabled: boolean;
};
/**
* Sets the registration information so that the device push token gets pushed
* to the given registration endpoint
* @param enabled
*/
export declare function setAutoServerRegistrationEnabledAsync(enabled: boolean): Promise<void>;
export declare function __handlePersistedRegistrationInfoAsync(registrationInfo: string | null | undefined): Promise<void>;
//# sourceMappingURL=DevicePushTokenAutoRegistration.fx.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DevicePushTokenAutoRegistration.fx.d.ts","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAiBnC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,qCAAqC,CAAC,OAAO,EAAE,OAAO,iBAY3E;AAGD,wBAAsB,sCAAsC,CAC1D,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,iBAiC5C"}

View File

@@ -0,0 +1,87 @@
import 'abort-controller/polyfill';
import { UnavailabilityError } from 'expo-modules-core';
import ServerRegistrationModule from './ServerRegistrationModule';
import { addPushTokenListener } from './TokenEmitter';
import getDevicePushTokenAsync from './getDevicePushTokenAsync';
import { updateDevicePushTokenAsync as updateDevicePushTokenAsyncWithSignal } from './utils/updateDevicePushTokenAsync';
let lastAbortController = null;
async function updatePushTokenAsync(token) {
// Abort current update process
lastAbortController?.abort();
lastAbortController = new AbortController();
return await updateDevicePushTokenAsyncWithSignal(lastAbortController.signal, token);
}
/**
* Sets the registration information so that the device push token gets pushed
* to the given registration endpoint
* @param enabled
*/
export async function setAutoServerRegistrationEnabledAsync(enabled) {
// We are overwriting registration, so we shouldn't let
// any pending request complete.
lastAbortController?.abort();
if (!ServerRegistrationModule.setRegistrationInfoAsync) {
throw new UnavailabilityError('ServerRegistrationModule', 'setRegistrationInfoAsync');
}
await ServerRegistrationModule.setRegistrationInfoAsync(enabled ? JSON.stringify({ isEnabled: enabled }) : null);
}
// note(Chmiela): This function is exported only for testing purposes.
export async function __handlePersistedRegistrationInfoAsync(registrationInfo) {
if (!registrationInfo) {
// No registration info, nothing to do
return;
}
let registration = null;
try {
registration = JSON.parse(registrationInfo);
}
catch (e) {
console.warn('[expo-notifications] Error encountered while fetching registration information for auto token updates.', e);
}
if (!registration?.isEnabled) {
// Registration is invalid or not enabled, nothing more to do
return;
}
try {
// Since the registration is enabled, fetching a "new" device token
// shouldn't be a problem.
const latestDevicePushToken = await getDevicePushTokenAsync();
await updatePushTokenAsync(latestDevicePushToken);
}
catch (e) {
console.warn('[expo-notifications] Error encountered while updating server registration with latest device push token.', e);
}
}
if (ServerRegistrationModule.getRegistrationInfoAsync) {
// A global scope (to get all the updates) device push token
// subscription, never cleared.
addPushTokenListener(async (token) => {
try {
// Before updating the push token on server we always check if we should
// Since modules can't change their method availability while running, we
// can assert it's defined.
const registrationInfo = await ServerRegistrationModule.getRegistrationInfoAsync();
if (!registrationInfo) {
// Registration is not enabled
return;
}
const registration = JSON.parse(registrationInfo);
if (registration?.isEnabled) {
// Dispatch an abortable task to update
// registration with new token.
await updatePushTokenAsync(token);
}
}
catch (e) {
console.warn('[expo-notifications] Error encountered while updating server registration with latest device push token.', e);
}
});
// Verify if persisted registration
// has successfully uploaded last known
// device push token. If not, retry.
ServerRegistrationModule.getRegistrationInfoAsync().then(__handlePersistedRegistrationInfoAsync);
}
else {
console.warn(`[expo-notifications] Error encountered while fetching auto-registration state, new tokens will not be automatically registered on server.`, new UnavailabilityError('ServerRegistrationModule', 'getRegistrationInfoAsync'));
}
//# sourceMappingURL=DevicePushTokenAutoRegistration.fx.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
import { NotificationCategoriesModule } from './NotificationCategoriesModule.types';
declare const notificationCategoriesModule: NotificationCategoriesModule;
export default notificationCategoriesModule;
//# sourceMappingURL=NotificationCategoriesModule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAEpF,QAAA,MAAM,4BAA4B,EAAE,4BAYnC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}

View File

@@ -0,0 +1,16 @@
import { UnavailabilityError } from 'expo-modules-core';
const notificationCategoriesModule = {
async getNotificationCategoriesAsync() {
return [];
},
async setNotificationCategoryAsync() {
throw new UnavailabilityError('Notifications', 'setNotificationCategoryAsync');
},
async deleteNotificationCategoryAsync() {
return false;
},
addListener() { },
removeListeners() { },
};
export default notificationCategoriesModule;
//# sourceMappingURL=NotificationCategoriesModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.js","sourceRoot":"","sources":["../src/NotificationCategoriesModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,4BAA4B,GAAiC;IACjE,KAAK,CAAC,8BAA8B;QAClC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,KAAK,CAAC,4BAA4B;QAChC,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,8BAA8B,CAAC,CAAC;IACjF,CAAC;IACD,KAAK,CAAC,+BAA+B;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,WAAW,KAAI,CAAC;IAChB,eAAe,KAAI,CAAC;CACrB,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport { NotificationCategoriesModule } from './NotificationCategoriesModule.types';\n\nconst notificationCategoriesModule: NotificationCategoriesModule = {\n async getNotificationCategoriesAsync() {\n return [];\n },\n async setNotificationCategoryAsync() {\n throw new UnavailabilityError('Notifications', 'setNotificationCategoryAsync');\n },\n async deleteNotificationCategoryAsync() {\n return false;\n },\n addListener() {},\n removeListeners() {},\n};\n\nexport default notificationCategoriesModule;\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationCategoriesModule } from './NotificationCategoriesModule.types';
declare const _default: NotificationCategoriesModule;
export default _default;
//# sourceMappingURL=NotificationCategoriesModule.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;;AAEpF,wBAEE"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoNotificationCategoriesModule');
//# sourceMappingURL=NotificationCategoriesModule.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.native.js","sourceRoot":"","sources":["../src/NotificationCategoriesModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAChC,kCAAkC,CACnC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationCategoriesModule } from './NotificationCategoriesModule.types';\n\nexport default requireNativeModule<NotificationCategoriesModule>(\n 'ExpoNotificationCategoriesModule'\n);\n"]}

View File

@@ -0,0 +1,17 @@
import { ProxyNativeModule } from 'expo-modules-core';
import { NotificationCategory, NotificationAction } from './Notifications.types';
export interface NotificationCategoriesModule extends ProxyNativeModule {
getNotificationCategoriesAsync: () => Promise<NotificationCategory[]>;
setNotificationCategoryAsync: (identifier: string, actions: NotificationAction[], options?: {
previewPlaceholder?: string;
intentIdentifiers?: string[];
categorySummaryFormat?: string;
customDismissAction?: boolean;
allowInCarPlay?: boolean;
showTitle?: boolean;
showSubtitle?: boolean;
allowAnnouncement?: boolean;
}) => Promise<NotificationCategory>;
deleteNotificationCategoryAsync: (identifier: string) => Promise<boolean>;
}
//# sourceMappingURL=NotificationCategoriesModule.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationCategoriesModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,8BAA8B,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACtE,4BAA4B,EAAE,CAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,OAAO,CAAC,EAAE;QACR,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,KACE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,+BAA+B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3E"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=NotificationCategoriesModule.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationCategoriesModule.types.js","sourceRoot":"","sources":["../src/NotificationCategoriesModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport { NotificationCategory, NotificationAction } from './Notifications.types';\n\nexport interface NotificationCategoriesModule extends ProxyNativeModule {\n getNotificationCategoriesAsync: () => Promise<NotificationCategory[]>;\n setNotificationCategoryAsync: (\n identifier: string,\n actions: NotificationAction[],\n options?: {\n previewPlaceholder?: string;\n intentIdentifiers?: string[];\n categorySummaryFormat?: string;\n customDismissAction?: boolean;\n allowInCarPlay?: boolean;\n showTitle?: boolean;\n showSubtitle?: boolean;\n allowAnnouncement?: boolean;\n }\n ) => Promise<NotificationCategory>;\n deleteNotificationCategoryAsync: (identifier: string) => Promise<boolean>;\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationChannelGroupManager } from './NotificationChannelGroupManager.types';
declare const _default: NotificationChannelGroupManager;
export default _default;
//# sourceMappingURL=NotificationChannelGroupManager.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;;AAE1F,wBAGqC"}

View File

@@ -0,0 +1,5 @@
export default {
addListener: () => { },
removeListeners: () => { },
};
//# sourceMappingURL=NotificationChannelGroupManager.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.js","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.ts"],"names":[],"mappings":"AAEA,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACS,CAAC","sourcesContent":["import { NotificationChannelGroupManager } from './NotificationChannelGroupManager.types';\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n} as NotificationChannelGroupManager;\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationChannelGroupManager } from './NotificationChannelGroupManager.types';
declare const _default: NotificationChannelGroupManager;
export default _default;
//# sourceMappingURL=NotificationChannelGroupManager.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.native.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;;AAE1F,wBAEE"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoNotificationChannelGroupManager');
//# sourceMappingURL=NotificationChannelGroupManager.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.native.js","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAChC,qCAAqC,CACtC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationChannelGroupManager } from './NotificationChannelGroupManager.types';\n\nexport default requireNativeModule<NotificationChannelGroupManager>(\n 'ExpoNotificationChannelGroupManager'\n);\n"]}

View File

@@ -0,0 +1,28 @@
import { ProxyNativeModule } from 'expo-modules-core';
import { NotificationChannel } from './NotificationChannelManager.types';
/**
* An object represents a notification channel group.
* @platform android
*/
export interface NotificationChannelGroup {
id: string;
name: string | null;
description?: string | null;
isBlocked?: boolean;
channels: NotificationChannel[];
}
/**
* An object represents a notification channel group to be set.
* @platform android
*/
export interface NotificationChannelGroupInput {
name: string | null;
description?: string | null;
}
export interface NotificationChannelGroupManager extends ProxyNativeModule {
getNotificationChannelGroupsAsync?: () => Promise<NotificationChannelGroup[]>;
getNotificationChannelGroupAsync?: (groupId: string) => Promise<NotificationChannelGroup | null>;
setNotificationChannelGroupAsync?: (groupId: string, group: NotificationChannelGroupInput) => Promise<NotificationChannelGroup | null>;
deleteNotificationChannelGroupAsync?: (groupId: string) => Promise<void>;
}
//# sourceMappingURL=NotificationChannelGroupManager.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.types.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,+BAAgC,SAAQ,iBAAiB;IACxE,iCAAiC,CAAC,EAAE,MAAM,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC9E,gCAAgC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IACjG,gCAAgC,CAAC,EAAE,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,6BAA6B,KACjC,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IAC9C,mCAAmC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=NotificationChannelGroupManager.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelGroupManager.types.js","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport { NotificationChannel } from './NotificationChannelManager.types';\n\n/**\n * An object represents a notification channel group.\n * @platform android\n */\nexport interface NotificationChannelGroup {\n id: string;\n name: string | null;\n description?: string | null;\n isBlocked?: boolean;\n channels: NotificationChannel[];\n}\n\n/**\n * An object represents a notification channel group to be set.\n * @platform android\n */\nexport interface NotificationChannelGroupInput {\n name: string | null;\n description?: string | null;\n}\n\nexport interface NotificationChannelGroupManager extends ProxyNativeModule {\n getNotificationChannelGroupsAsync?: () => Promise<NotificationChannelGroup[]>;\n getNotificationChannelGroupAsync?: (groupId: string) => Promise<NotificationChannelGroup | null>;\n setNotificationChannelGroupAsync?: (\n groupId: string,\n group: NotificationChannelGroupInput\n ) => Promise<NotificationChannelGroup | null>;\n deleteNotificationChannelGroupAsync?: (groupId: string) => Promise<void>;\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationChannelManager } from './NotificationChannelManager.types';
declare const _default: NotificationChannelManager;
export default _default;
//# sourceMappingURL=NotificationChannelManager.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAGgC"}

View File

@@ -0,0 +1,5 @@
export default {
addListener: () => { },
removeListeners: () => { },
};
//# sourceMappingURL=NotificationChannelManager.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.js","sourceRoot":"","sources":["../src/NotificationChannelManager.ts"],"names":[],"mappings":"AAEA,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACI,CAAC","sourcesContent":["import { NotificationChannelManager } from './NotificationChannelManager.types';\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n} as NotificationChannelManager;\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationChannelManager } from './NotificationChannelManager.types';
declare const _default: NotificationChannelManager;
export default _default;
//# sourceMappingURL=NotificationChannelManager.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.native.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;;AAEhF,wBAAiG"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoNotificationChannelManager');
//# sourceMappingURL=NotificationChannelManager.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.native.js","sourceRoot":"","sources":["../src/NotificationChannelManager.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAA6B,gCAAgC,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationChannelManager } from './NotificationChannelManager.types';\n\nexport default requireNativeModule<NotificationChannelManager>('ExpoNotificationChannelManager');\n"]}

View File

@@ -0,0 +1,90 @@
import { ProxyNativeModule } from 'expo-modules-core';
export declare enum AndroidNotificationVisibility {
UNKNOWN = 0,
PUBLIC = 1,
PRIVATE = 2,
SECRET = 3
}
export declare enum AndroidAudioContentType {
UNKNOWN = 0,
SPEECH = 1,
MUSIC = 2,
MOVIE = 3,
SONIFICATION = 4
}
export declare enum AndroidImportance {
UNKNOWN = 0,
UNSPECIFIED = 1,
NONE = 2,
MIN = 3,
LOW = 4,
DEFAULT = 5,
/**
* @deprecated Use `DEFAULT` instead.
*/
DEEFAULT = 5,
HIGH = 6,
MAX = 7
}
export declare enum AndroidAudioUsage {
UNKNOWN = 0,
MEDIA = 1,
VOICE_COMMUNICATION = 2,
VOICE_COMMUNICATION_SIGNALLING = 3,
ALARM = 4,
NOTIFICATION = 5,
NOTIFICATION_RINGTONE = 6,
NOTIFICATION_COMMUNICATION_REQUEST = 7,
NOTIFICATION_COMMUNICATION_INSTANT = 8,
NOTIFICATION_COMMUNICATION_DELAYED = 9,
NOTIFICATION_EVENT = 10,
ASSISTANCE_ACCESSIBILITY = 11,
ASSISTANCE_NAVIGATION_GUIDANCE = 12,
ASSISTANCE_SONIFICATION = 13,
GAME = 14
}
export interface AudioAttributes {
usage: AndroidAudioUsage;
contentType: AndroidAudioContentType;
flags: {
enforceAudibility: boolean;
requestHardwareAudioVideoSynchronization: boolean;
};
}
export type AudioAttributesInput = Partial<AudioAttributes>;
/**
* An object represents a notification channel.
* @platform android
*/
export interface NotificationChannel {
id: string;
name: string | null;
importance: AndroidImportance;
bypassDnd: boolean;
description: string | null;
groupId?: string | null;
lightColor: string;
lockscreenVisibility: AndroidNotificationVisibility;
showBadge: boolean;
sound: 'default' | 'custom' | null;
audioAttributes: AudioAttributes;
vibrationPattern: number[] | null;
enableLights: boolean;
enableVibrate: boolean;
}
export type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>;
/**
* An object represents a notification channel to be set.
* @platform android
*/
export type NotificationChannelInput = RequiredBy<Omit<NotificationChannel, 'id' | 'audioAttributes' | 'sound'> & {
audioAttributes?: AudioAttributesInput;
sound?: string | null;
}, 'name' | 'importance'>;
export interface NotificationChannelManager extends ProxyNativeModule {
getNotificationChannelsAsync?: () => Promise<NotificationChannel[] | null>;
getNotificationChannelAsync?: (channelId: string) => Promise<NotificationChannel | null>;
setNotificationChannelAsync?: (channelId: string, channelConfiguration: NotificationChannelInput) => Promise<NotificationChannel | null>;
deleteNotificationChannelAsync?: (channelId: string) => Promise<void>;
}
//# sourceMappingURL=NotificationChannelManager.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.types.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,oBAAY,6BAA6B;IACvC,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAGD,oBAAY,uBAAuB;IACjC,OAAO,IAAI;IACX,MAAM,IAAI;IACV,KAAK,IAAI;IACT,KAAK,IAAI;IACT,YAAY,IAAI;CACjB;AAGD,oBAAY,iBAAiB;IAC3B,OAAO,IAAI;IACX,WAAW,IAAI;IACf,IAAI,IAAI;IACR,GAAG,IAAI;IACP,GAAG,IAAI;IACP,OAAO,IAAI;IACX;;OAEG;IACH,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,GAAG,IAAI;CACR;AAGD,oBAAY,iBAAiB;IAC3B,OAAO,IAAI;IACX,KAAK,IAAI;IACT,mBAAmB,IAAI;IACvB,8BAA8B,IAAI;IAClC,KAAK,IAAI;IACT,YAAY,IAAI;IAChB,qBAAqB,IAAI;IACzB,kCAAkC,IAAI;IACtC,kCAAkC,IAAI;IACtC,kCAAkC,IAAI;IACtC,kBAAkB,KAAK;IACvB,wBAAwB,KAAK;IAC7B,8BAA8B,KAAK;IACnC,uBAAuB,KAAK;IAC5B,IAAI,KAAK;CACV;AAGD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,iBAAiB,CAAC;IACzB,WAAW,EAAE,uBAAuB,CAAC;IACrC,KAAK,EAAE;QACL,iBAAiB,EAAE,OAAO,CAAC;QAC3B,wCAAwC,EAAE,OAAO,CAAC;KACnD,CAAC;CACH;AAKD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,6BAA6B,CAAC;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE1F;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,IAAI,CACF,mBAAmB,EACjB,IAAI,GACJ,iBAAiB,GACjB,OAAO,CACV,GAAG;IAAE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrE,MAAM,GAAG,YAAY,CACtB,CAAC;AAEF,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,4BAA4B,CAAC,EAAE,MAAM,OAAO,CAAC,mBAAmB,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3E,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzF,2BAA2B,CAAC,EAAE,CAC5B,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,wBAAwB,KAC3C,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzC,8BAA8B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE"}

View File

@@ -0,0 +1,53 @@
// @docsMissing
export var AndroidNotificationVisibility;
(function (AndroidNotificationVisibility) {
AndroidNotificationVisibility[AndroidNotificationVisibility["UNKNOWN"] = 0] = "UNKNOWN";
AndroidNotificationVisibility[AndroidNotificationVisibility["PUBLIC"] = 1] = "PUBLIC";
AndroidNotificationVisibility[AndroidNotificationVisibility["PRIVATE"] = 2] = "PRIVATE";
AndroidNotificationVisibility[AndroidNotificationVisibility["SECRET"] = 3] = "SECRET";
})(AndroidNotificationVisibility || (AndroidNotificationVisibility = {}));
// @docsMissing
export var AndroidAudioContentType;
(function (AndroidAudioContentType) {
AndroidAudioContentType[AndroidAudioContentType["UNKNOWN"] = 0] = "UNKNOWN";
AndroidAudioContentType[AndroidAudioContentType["SPEECH"] = 1] = "SPEECH";
AndroidAudioContentType[AndroidAudioContentType["MUSIC"] = 2] = "MUSIC";
AndroidAudioContentType[AndroidAudioContentType["MOVIE"] = 3] = "MOVIE";
AndroidAudioContentType[AndroidAudioContentType["SONIFICATION"] = 4] = "SONIFICATION";
})(AndroidAudioContentType || (AndroidAudioContentType = {}));
// @docsMissing
export var AndroidImportance;
(function (AndroidImportance) {
AndroidImportance[AndroidImportance["UNKNOWN"] = 0] = "UNKNOWN";
AndroidImportance[AndroidImportance["UNSPECIFIED"] = 1] = "UNSPECIFIED";
AndroidImportance[AndroidImportance["NONE"] = 2] = "NONE";
AndroidImportance[AndroidImportance["MIN"] = 3] = "MIN";
AndroidImportance[AndroidImportance["LOW"] = 4] = "LOW";
AndroidImportance[AndroidImportance["DEFAULT"] = 5] = "DEFAULT";
/**
* @deprecated Use `DEFAULT` instead.
*/
AndroidImportance[AndroidImportance["DEEFAULT"] = 5] = "DEEFAULT";
AndroidImportance[AndroidImportance["HIGH"] = 6] = "HIGH";
AndroidImportance[AndroidImportance["MAX"] = 7] = "MAX";
})(AndroidImportance || (AndroidImportance = {}));
// @docsMissing
export var AndroidAudioUsage;
(function (AndroidAudioUsage) {
AndroidAudioUsage[AndroidAudioUsage["UNKNOWN"] = 0] = "UNKNOWN";
AndroidAudioUsage[AndroidAudioUsage["MEDIA"] = 1] = "MEDIA";
AndroidAudioUsage[AndroidAudioUsage["VOICE_COMMUNICATION"] = 2] = "VOICE_COMMUNICATION";
AndroidAudioUsage[AndroidAudioUsage["VOICE_COMMUNICATION_SIGNALLING"] = 3] = "VOICE_COMMUNICATION_SIGNALLING";
AndroidAudioUsage[AndroidAudioUsage["ALARM"] = 4] = "ALARM";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION"] = 5] = "NOTIFICATION";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION_RINGTONE"] = 6] = "NOTIFICATION_RINGTONE";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION_COMMUNICATION_REQUEST"] = 7] = "NOTIFICATION_COMMUNICATION_REQUEST";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION_COMMUNICATION_INSTANT"] = 8] = "NOTIFICATION_COMMUNICATION_INSTANT";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION_COMMUNICATION_DELAYED"] = 9] = "NOTIFICATION_COMMUNICATION_DELAYED";
AndroidAudioUsage[AndroidAudioUsage["NOTIFICATION_EVENT"] = 10] = "NOTIFICATION_EVENT";
AndroidAudioUsage[AndroidAudioUsage["ASSISTANCE_ACCESSIBILITY"] = 11] = "ASSISTANCE_ACCESSIBILITY";
AndroidAudioUsage[AndroidAudioUsage["ASSISTANCE_NAVIGATION_GUIDANCE"] = 12] = "ASSISTANCE_NAVIGATION_GUIDANCE";
AndroidAudioUsage[AndroidAudioUsage["ASSISTANCE_SONIFICATION"] = 13] = "ASSISTANCE_SONIFICATION";
AndroidAudioUsage[AndroidAudioUsage["GAME"] = 14] = "GAME";
})(AndroidAudioUsage || (AndroidAudioUsage = {}));
//# sourceMappingURL=NotificationChannelManager.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationChannelManager.types.js","sourceRoot":"","sources":["../src/NotificationChannelManager.types.ts"],"names":[],"mappings":"AAEA,eAAe;AACf,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,uFAAW,CAAA;IACX,qFAAU,CAAA;IACV,uFAAW,CAAA;IACX,qFAAU,CAAA;AACZ,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAKxC;AAED,eAAe;AACf,MAAM,CAAN,IAAY,uBAMX;AAND,WAAY,uBAAuB;IACjC,2EAAW,CAAA;IACX,yEAAU,CAAA;IACV,uEAAS,CAAA;IACT,uEAAS,CAAA;IACT,qFAAgB,CAAA;AAClB,CAAC,EANW,uBAAuB,KAAvB,uBAAuB,QAMlC;AAED,eAAe;AACf,MAAM,CAAN,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,+DAAW,CAAA;IACX,uEAAe,CAAA;IACf,yDAAQ,CAAA;IACR,uDAAO,CAAA;IACP,uDAAO,CAAA;IACP,+DAAW,CAAA;IACX;;OAEG;IACH,iEAAY,CAAA;IACZ,yDAAQ,CAAA;IACR,uDAAO,CAAA;AACT,CAAC,EAbW,iBAAiB,KAAjB,iBAAiB,QAa5B;AAED,eAAe;AACf,MAAM,CAAN,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC3B,+DAAW,CAAA;IACX,2DAAS,CAAA;IACT,uFAAuB,CAAA;IACvB,6GAAkC,CAAA;IAClC,2DAAS,CAAA;IACT,yEAAgB,CAAA;IAChB,2FAAyB,CAAA;IACzB,qHAAsC,CAAA;IACtC,qHAAsC,CAAA;IACtC,qHAAsC,CAAA;IACtC,sFAAuB,CAAA;IACvB,kGAA6B,CAAA;IAC7B,8GAAmC,CAAA;IACnC,gGAA4B,CAAA;IAC5B,0DAAS,CAAA;AACX,CAAC,EAhBW,iBAAiB,KAAjB,iBAAiB,QAgB5B","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\n// @docsMissing\nexport enum AndroidNotificationVisibility {\n UNKNOWN = 0,\n PUBLIC = 1,\n PRIVATE = 2,\n SECRET = 3,\n}\n\n// @docsMissing\nexport enum AndroidAudioContentType {\n UNKNOWN = 0,\n SPEECH = 1,\n MUSIC = 2,\n MOVIE = 3,\n SONIFICATION = 4,\n}\n\n// @docsMissing\nexport enum AndroidImportance {\n UNKNOWN = 0,\n UNSPECIFIED = 1,\n NONE = 2,\n MIN = 3,\n LOW = 4,\n DEFAULT = 5,\n /**\n * @deprecated Use `DEFAULT` instead.\n */\n DEEFAULT = 5,\n HIGH = 6,\n MAX = 7,\n}\n\n// @docsMissing\nexport enum AndroidAudioUsage {\n UNKNOWN = 0,\n MEDIA = 1,\n VOICE_COMMUNICATION = 2,\n VOICE_COMMUNICATION_SIGNALLING = 3,\n ALARM = 4,\n NOTIFICATION = 5,\n NOTIFICATION_RINGTONE = 6,\n NOTIFICATION_COMMUNICATION_REQUEST = 7,\n NOTIFICATION_COMMUNICATION_INSTANT = 8,\n NOTIFICATION_COMMUNICATION_DELAYED = 9,\n NOTIFICATION_EVENT = 10,\n ASSISTANCE_ACCESSIBILITY = 11,\n ASSISTANCE_NAVIGATION_GUIDANCE = 12,\n ASSISTANCE_SONIFICATION = 13,\n GAME = 14,\n}\n\n// @docsMissing\nexport interface AudioAttributes {\n usage: AndroidAudioUsage;\n contentType: AndroidAudioContentType;\n flags: {\n enforceAudibility: boolean;\n requestHardwareAudioVideoSynchronization: boolean;\n };\n}\n\n// We're making inner flags required to set intentionally.\n// Not providing `true` for a flag makes it false, it doesn't make sense\n// to let it be left undefined.\nexport type AudioAttributesInput = Partial<AudioAttributes>;\n\n/**\n * An object represents a notification channel.\n * @platform android\n */\nexport interface NotificationChannel {\n id: string;\n name: string | null;\n importance: AndroidImportance;\n bypassDnd: boolean;\n description: string | null;\n groupId?: string | null;\n lightColor: string;\n lockscreenVisibility: AndroidNotificationVisibility;\n showBadge: boolean;\n sound: 'default' | 'custom' | null;\n audioAttributes: AudioAttributes;\n vibrationPattern: number[] | null;\n enableLights: boolean;\n enableVibrate: boolean;\n}\n\nexport type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>;\n\n/**\n * An object represents a notification channel to be set.\n * @platform android\n */\nexport type NotificationChannelInput = RequiredBy<\n Omit<\n NotificationChannel,\n | 'id' // id is handled separately as a function argument\n | 'audioAttributes' // need to make it AudioAttributesInput\n | 'sound'\n > & { audioAttributes?: AudioAttributesInput; sound?: string | null },\n 'name' | 'importance'\n>;\n\nexport interface NotificationChannelManager extends ProxyNativeModule {\n getNotificationChannelsAsync?: () => Promise<NotificationChannel[] | null>;\n getNotificationChannelAsync?: (channelId: string) => Promise<NotificationChannel | null>;\n setNotificationChannelAsync?: (\n channelId: string,\n channelConfiguration: NotificationChannelInput\n ) => Promise<NotificationChannel | null>;\n deleteNotificationChannelAsync?: (channelId: string) => Promise<void>;\n}\n"]}

View File

@@ -0,0 +1,56 @@
import { NotificationPermissionsRequest, NotificationPermissionsStatus } from './NotificationPermissions.types';
/**
* Calling this function checks current permissions settings related to notifications.
* It lets you verify whether the app is currently allowed to display alerts, play sounds, etc.
* There is no user-facing effect of calling this.
* @return It returns a `Promise` resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).
* On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).
* @example Check if the app is allowed to send any type of notifications (interrupting and non-interruptingprovisional on iOS).
* ```ts
* import * as Notifications from 'expo-notifications';
*
* export async function allowsNotificationsAsync() {
* const settings = await Notifications.getPermissionsAsync();
* return (
* settings.granted || settings.ios?.status === Notifications.IosAuthorizationStatus.PROVISIONAL
* );
* }
* ```
* @header permissions
*/
export declare function getPermissionsAsync(): Promise<NotificationPermissionsStatus>;
/**
* Prompts the user for notification permissions according to request. **Request defaults to asking the user to allow displaying alerts,
* setting badge count and playing sounds**.
* @param permissions An object representing configuration for the request scope.
* @return It returns a Promise resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).
* On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).
* @example Prompts the user to allow the app to show alerts, play sounds, set badge count and let Siri read out messages through AirPods.
* ```ts
* import * as Notifications from 'expo-notifications';
*
* export function requestPermissionsAsync() {
* return await Notifications.requestPermissionsAsync({
* ios: {
* allowAlert: true,
* allowBadge: true,
* allowSound: true,
* allowAnnouncements: true,
* },
* });
* }
* ```
* @header permissions
*/
export declare function requestPermissionsAsync(permissions?: NotificationPermissionsRequest): Promise<NotificationPermissionsStatus>;
/**
* Check or request permissions to send and receive push notifications.
* This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.
* @example
* ```ts
* const [permissionResponse, requestPermission] = Notifications.usePermissions();
* ```
* @header permission
*/
export declare const usePermissions: (options?: import("expo-modules-core").PermissionHookOptions<NotificationPermissionsRequest> | undefined) => [NotificationPermissionsStatus | null, () => Promise<NotificationPermissionsStatus>, () => Promise<NotificationPermissionsStatus>];
//# sourceMappingURL=NotificationPermissions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissions.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,2CAMxC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,CAAC,EAAE,8BAA8B,0CAczF;AAGD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,iPAMzB,CAAC"}

View File

@@ -0,0 +1,79 @@
import { createPermissionHook, Platform, UnavailabilityError } from 'expo-modules-core';
import NotificationPermissionsModule from './NotificationPermissionsModule';
/**
* Calling this function checks current permissions settings related to notifications.
* It lets you verify whether the app is currently allowed to display alerts, play sounds, etc.
* There is no user-facing effect of calling this.
* @return It returns a `Promise` resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).
* On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).
* @example Check if the app is allowed to send any type of notifications (interrupting and non-interruptingprovisional on iOS).
* ```ts
* import * as Notifications from 'expo-notifications';
*
* export async function allowsNotificationsAsync() {
* const settings = await Notifications.getPermissionsAsync();
* return (
* settings.granted || settings.ios?.status === Notifications.IosAuthorizationStatus.PROVISIONAL
* );
* }
* ```
* @header permissions
*/
export async function getPermissionsAsync() {
if (!NotificationPermissionsModule.getPermissionsAsync) {
throw new UnavailabilityError('Notifications', 'getPermissionsAsync');
}
return await NotificationPermissionsModule.getPermissionsAsync();
}
/**
* Prompts the user for notification permissions according to request. **Request defaults to asking the user to allow displaying alerts,
* setting badge count and playing sounds**.
* @param permissions An object representing configuration for the request scope.
* @return It returns a Promise resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).
* On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).
* @example Prompts the user to allow the app to show alerts, play sounds, set badge count and let Siri read out messages through AirPods.
* ```ts
* import * as Notifications from 'expo-notifications';
*
* export function requestPermissionsAsync() {
* return await Notifications.requestPermissionsAsync({
* ios: {
* allowAlert: true,
* allowBadge: true,
* allowSound: true,
* allowAnnouncements: true,
* },
* });
* }
* ```
* @header permissions
*/
export async function requestPermissionsAsync(permissions) {
if (!NotificationPermissionsModule.requestPermissionsAsync) {
throw new UnavailabilityError('Notifications', 'requestPermissionsAsync');
}
const requestedPermissions = permissions ?? {
ios: {
allowAlert: true,
allowBadge: true,
allowSound: true,
},
};
const requestedPlatformPermissions = requestedPermissions[Platform.OS];
return await NotificationPermissionsModule.requestPermissionsAsync(requestedPlatformPermissions);
}
// @needsAudit
/**
* Check or request permissions to send and receive push notifications.
* This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.
* @example
* ```ts
* const [permissionResponse, requestPermission] = Notifications.usePermissions();
* ```
* @header permission
*/
export const usePermissions = createPermissionHook({
requestMethod: requestPermissionsAsync,
getMethod: getPermissionsAsync,
});
//# sourceMappingURL=NotificationPermissions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissions.js","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxF,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,EAAE;QACtD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;KACvE;IAED,OAAO,MAAM,6BAA6B,CAAC,mBAAmB,EAAE,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,WAA4C;IACxF,IAAI,CAAC,6BAA6B,CAAC,uBAAuB,EAAE;QAC1D,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAC;KAC3E;IAED,MAAM,oBAAoB,GAAG,WAAW,IAAI;QAC1C,GAAG,EAAE;YACH,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;IACF,MAAM,4BAA4B,GAAG,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvE,OAAO,MAAM,6BAA6B,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAC;AACnG,CAAC;AAED,cAAc;AACd;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAGhD;IACA,aAAa,EAAE,uBAAuB;IACtC,SAAS,EAAE,mBAAmB;CAC/B,CAAC,CAAC","sourcesContent":["import { createPermissionHook, Platform, UnavailabilityError } from 'expo-modules-core';\n\nimport {\n NotificationPermissionsRequest,\n NotificationPermissionsStatus,\n} from './NotificationPermissions.types';\nimport NotificationPermissionsModule from './NotificationPermissionsModule';\n\n/**\n * Calling this function checks current permissions settings related to notifications.\n * It lets you verify whether the app is currently allowed to display alerts, play sounds, etc.\n * There is no user-facing effect of calling this.\n * @return It returns a `Promise` resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).\n * On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).\n * @example Check if the app is allowed to send any type of notifications (interrupting and non-interruptingprovisional on iOS).\n * ```ts\n * import * as Notifications from 'expo-notifications';\n *\n * export async function allowsNotificationsAsync() {\n * const settings = await Notifications.getPermissionsAsync();\n * return (\n * settings.granted || settings.ios?.status === Notifications.IosAuthorizationStatus.PROVISIONAL\n * );\n * }\n * ```\n * @header permissions\n */\nexport async function getPermissionsAsync() {\n if (!NotificationPermissionsModule.getPermissionsAsync) {\n throw new UnavailabilityError('Notifications', 'getPermissionsAsync');\n }\n\n return await NotificationPermissionsModule.getPermissionsAsync();\n}\n\n/**\n * Prompts the user for notification permissions according to request. **Request defaults to asking the user to allow displaying alerts,\n * setting badge count and playing sounds**.\n * @param permissions An object representing configuration for the request scope.\n * @return It returns a Promise resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).\n * On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).\n * @example Prompts the user to allow the app to show alerts, play sounds, set badge count and let Siri read out messages through AirPods.\n * ```ts\n * import * as Notifications from 'expo-notifications';\n *\n * export function requestPermissionsAsync() {\n * return await Notifications.requestPermissionsAsync({\n * ios: {\n * allowAlert: true,\n * allowBadge: true,\n * allowSound: true,\n * allowAnnouncements: true,\n * },\n * });\n * }\n * ```\n * @header permissions\n */\nexport async function requestPermissionsAsync(permissions?: NotificationPermissionsRequest) {\n if (!NotificationPermissionsModule.requestPermissionsAsync) {\n throw new UnavailabilityError('Notifications', 'requestPermissionsAsync');\n }\n\n const requestedPermissions = permissions ?? {\n ios: {\n allowAlert: true,\n allowBadge: true,\n allowSound: true,\n },\n };\n const requestedPlatformPermissions = requestedPermissions[Platform.OS];\n return await NotificationPermissionsModule.requestPermissionsAsync(requestedPlatformPermissions);\n}\n\n// @needsAudit\n/**\n * Check or request permissions to send and receive push notifications.\n * This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.\n * @example\n * ```ts\n * const [permissionResponse, requestPermission] = Notifications.usePermissions();\n * ```\n * @header permission\n */\nexport const usePermissions = createPermissionHook<\n NotificationPermissionsStatus,\n NotificationPermissionsRequest\n>({\n requestMethod: requestPermissionsAsync,\n getMethod: getPermissionsAsync,\n});\n"]}

View File

@@ -0,0 +1,94 @@
import { PermissionResponse, PermissionHookOptions } from 'expo-modules-core';
export declare enum IosAlertStyle {
NONE = 0,
BANNER = 1,
ALERT = 2
}
export declare enum IosAllowsPreviews {
NEVER = 0,
ALWAYS = 1,
WHEN_AUTHENTICATED = 2
}
export declare enum IosAuthorizationStatus {
NOT_DETERMINED = 0,
DENIED = 1,
AUTHORIZED = 2,
PROVISIONAL = 3,
EPHEMERAL = 4
}
export { PermissionHookOptions };
export interface NotificationPermissionsStatus extends PermissionResponse {
android?: {
importance: number;
interruptionFilter?: number;
};
ios?: {
status: IosAuthorizationStatus;
allowsDisplayInNotificationCenter: boolean | null;
allowsDisplayOnLockScreen: boolean | null;
allowsDisplayInCarPlay: boolean | null;
allowsAlert: boolean | null;
allowsBadge: boolean | null;
allowsSound: boolean | null;
allowsCriticalAlerts?: boolean | null;
alertStyle: IosAlertStyle;
allowsPreviews?: IosAllowsPreviews;
providesAppNotificationSettings?: boolean;
allowsAnnouncements?: boolean | null;
};
}
/**
* Available configuration for permission request on iOS platform.
* See Apple documentation for [`UNAuthorizationOptions`](https://developer.apple.com/documentation/usernotifications/unauthorizationoptions) to learn more.
*/
export interface IosNotificationPermissionsRequest {
/**
* The ability to display alerts.
*/
allowAlert?: boolean;
/**
* The ability to update the apps badge.
*/
allowBadge?: boolean;
/**
* The ability to play sounds.
*/
allowSound?: boolean;
/**
* The ability to display notifications in a CarPlay environment.
*/
allowDisplayInCarPlay?: boolean;
/**
* The ability to play sounds for critical alerts.
*/
allowCriticalAlerts?: boolean;
/**
* An option indicating the system should display a button for in-app notification settings.
*/
provideAppNotificationSettings?: boolean;
/**
* The ability to post noninterrupting notifications provisionally to the Notification Center.
*/
allowProvisional?: boolean;
/**
* The ability for Siri to automatically read out messages over AirPods.
* @deprecated
*/
allowAnnouncements?: boolean;
}
export type NativeNotificationPermissionsRequest = IosNotificationPermissionsRequest | object;
/**
* An interface representing the permissions request scope configuration.
* Each option corresponds to a different native platform authorization option.
*/
export interface NotificationPermissionsRequest {
/**
* Available configuration for permission request on iOS platform.
*/
ios?: IosNotificationPermissionsRequest;
/**
* On Android, all available permissions are granted by default, and if a user declines any permission, an app cannot prompt the user to change.
*/
android?: object;
}
//# sourceMappingURL=NotificationPermissions.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissions.types.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,oBAAY,aAAa;IACvB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;CACV;AAED,oBAAY,iBAAiB;IAC3B,KAAK,IAAI;IACT,MAAM,IAAI;IACV,kBAAkB,IAAI;CACvB;AAED,oBAAY,sBAAsB;IAChC,cAAc,IAAI;IAClB,MAAM,IAAI;IACV,UAAU,IAAI;IACd,WAAW,IAAI;IACf,SAAS,IAAI;CACd;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAGjC,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,OAAO,CAAC,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,MAAM,EAAE,sBAAsB,CAAC;QAC/B,iCAAiC,EAAE,OAAO,GAAG,IAAI,CAAC;QAClD,yBAAyB,EAAE,OAAO,GAAG,IAAI,CAAC;QAC1C,sBAAsB,EAAE,OAAO,GAAG,IAAI,CAAC;QACvC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACtC,UAAU,EAAE,aAAa,CAAC;QAC1B,cAAc,CAAC,EAAE,iBAAiB,CAAC;QACnC,+BAA+B,CAAC,EAAE,OAAO,CAAC;QAC1C,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACtC,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,oCAAoC,GAAG,iCAAiC,GAAG,MAAM,CAAC;AAE9F;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,CAAC,EAAE,iCAAiC,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}

View File

@@ -0,0 +1,21 @@
export var IosAlertStyle;
(function (IosAlertStyle) {
IosAlertStyle[IosAlertStyle["NONE"] = 0] = "NONE";
IosAlertStyle[IosAlertStyle["BANNER"] = 1] = "BANNER";
IosAlertStyle[IosAlertStyle["ALERT"] = 2] = "ALERT";
})(IosAlertStyle || (IosAlertStyle = {}));
export var IosAllowsPreviews;
(function (IosAllowsPreviews) {
IosAllowsPreviews[IosAllowsPreviews["NEVER"] = 0] = "NEVER";
IosAllowsPreviews[IosAllowsPreviews["ALWAYS"] = 1] = "ALWAYS";
IosAllowsPreviews[IosAllowsPreviews["WHEN_AUTHENTICATED"] = 2] = "WHEN_AUTHENTICATED";
})(IosAllowsPreviews || (IosAllowsPreviews = {}));
export var IosAuthorizationStatus;
(function (IosAuthorizationStatus) {
IosAuthorizationStatus[IosAuthorizationStatus["NOT_DETERMINED"] = 0] = "NOT_DETERMINED";
IosAuthorizationStatus[IosAuthorizationStatus["DENIED"] = 1] = "DENIED";
IosAuthorizationStatus[IosAuthorizationStatus["AUTHORIZED"] = 2] = "AUTHORIZED";
IosAuthorizationStatus[IosAuthorizationStatus["PROVISIONAL"] = 3] = "PROVISIONAL";
IosAuthorizationStatus[IosAuthorizationStatus["EPHEMERAL"] = 4] = "EPHEMERAL";
})(IosAuthorizationStatus || (IosAuthorizationStatus = {}));
//# sourceMappingURL=NotificationPermissions.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissions.types.js","sourceRoot":"","sources":["../src/NotificationPermissions.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,iDAAQ,CAAA;IACR,qDAAU,CAAA;IACV,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,2DAAS,CAAA;IACT,6DAAU,CAAA;IACV,qFAAsB,CAAA;AACxB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED,MAAM,CAAN,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,uFAAkB,CAAA;IAClB,uEAAU,CAAA;IACV,+EAAc,CAAA;IACd,iFAAe,CAAA;IACf,6EAAa,CAAA;AACf,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,QAMjC","sourcesContent":["import { PermissionResponse, PermissionHookOptions } from 'expo-modules-core';\n\nexport enum IosAlertStyle {\n NONE = 0,\n BANNER = 1,\n ALERT = 2,\n}\n\nexport enum IosAllowsPreviews {\n NEVER = 0,\n ALWAYS = 1,\n WHEN_AUTHENTICATED = 2,\n}\n\nexport enum IosAuthorizationStatus {\n NOT_DETERMINED = 0,\n DENIED = 1,\n AUTHORIZED = 2,\n PROVISIONAL = 3,\n EPHEMERAL = 4,\n}\n\nexport { PermissionHookOptions };\n\n// @docsMissing\nexport interface NotificationPermissionsStatus extends PermissionResponse {\n android?: {\n importance: number;\n interruptionFilter?: number;\n };\n ios?: {\n status: IosAuthorizationStatus;\n allowsDisplayInNotificationCenter: boolean | null;\n allowsDisplayOnLockScreen: boolean | null;\n allowsDisplayInCarPlay: boolean | null;\n allowsAlert: boolean | null;\n allowsBadge: boolean | null;\n allowsSound: boolean | null;\n allowsCriticalAlerts?: boolean | null;\n alertStyle: IosAlertStyle;\n allowsPreviews?: IosAllowsPreviews;\n providesAppNotificationSettings?: boolean;\n allowsAnnouncements?: boolean | null;\n };\n}\n\n/**\n * Available configuration for permission request on iOS platform.\n * See Apple documentation for [`UNAuthorizationOptions`](https://developer.apple.com/documentation/usernotifications/unauthorizationoptions) to learn more.\n */\nexport interface IosNotificationPermissionsRequest {\n /**\n * The ability to display alerts.\n */\n allowAlert?: boolean;\n /**\n * The ability to update the apps badge.\n */\n allowBadge?: boolean;\n /**\n * The ability to play sounds.\n */\n allowSound?: boolean;\n /**\n * The ability to display notifications in a CarPlay environment.\n */\n allowDisplayInCarPlay?: boolean;\n /**\n * The ability to play sounds for critical alerts.\n */\n allowCriticalAlerts?: boolean;\n /**\n * An option indicating the system should display a button for in-app notification settings.\n */\n provideAppNotificationSettings?: boolean;\n /**\n * The ability to post noninterrupting notifications provisionally to the Notification Center.\n */\n allowProvisional?: boolean;\n /**\n * The ability for Siri to automatically read out messages over AirPods.\n * @deprecated\n */\n allowAnnouncements?: boolean;\n}\n\nexport type NativeNotificationPermissionsRequest = IosNotificationPermissionsRequest | object;\n\n/**\n * An interface representing the permissions request scope configuration.\n * Each option corresponds to a different native platform authorization option.\n */\nexport interface NotificationPermissionsRequest {\n /**\n * Available configuration for permission request on iOS platform.\n */\n ios?: IosNotificationPermissionsRequest;\n /**\n * On Android, all available permissions are granted by default, and if a user declines any permission, an app cannot prompt the user to change.\n */\n android?: object;\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationPermissionsModule } from './NotificationPermissionsModule.types';
declare const _default: NotificationPermissionsModule;
export default _default;
//# sourceMappingURL=NotificationPermissionsModule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;;AAiEtF,wBAWmC"}

View File

@@ -0,0 +1,67 @@
import { PermissionStatus, Platform } from 'expo-modules-core';
function convertPermissionStatus(status) {
switch (status) {
case 'granted':
return {
status: PermissionStatus.GRANTED,
expires: 'never',
canAskAgain: false,
granted: true,
};
case 'denied':
return {
status: PermissionStatus.DENIED,
expires: 'never',
canAskAgain: false,
granted: false,
};
default:
return {
status: PermissionStatus.UNDETERMINED,
expires: 'never',
canAskAgain: true,
granted: false,
};
}
}
async function resolvePermissionAsync({ shouldAsk, }) {
if (!Platform.isDOMAvailable) {
return convertPermissionStatus('denied');
}
const { Notification = {} } = window;
if (typeof Notification.requestPermission !== 'undefined') {
let status = Notification.permission;
if (shouldAsk) {
status = await new Promise((resolve, reject) => {
let resolved = false;
function resolveOnce(status) {
if (!resolved) {
resolved = true;
resolve(status);
}
}
// Some browsers require a callback argument and some return a Promise
Notification.requestPermission(resolveOnce)?.then(resolveOnce)?.catch(reject);
});
}
return convertPermissionStatus(status);
}
else if (typeof navigator !== 'undefined' && navigator?.permissions?.query) {
// TODO(Bacon): Support `push` in the future when it's stable.
const query = await navigator.permissions.query({ name: 'notifications' });
return convertPermissionStatus(query.state);
}
// Platforms like iOS Safari don't support Notifications so return denied.
return convertPermissionStatus('denied');
}
export default {
addListener: () => { },
removeListeners: () => { },
async getPermissionsAsync() {
return resolvePermissionAsync({ shouldAsk: false });
},
async requestPermissionsAsync(request) {
return resolvePermissionAsync({ shouldAsk: true });
},
};
//# sourceMappingURL=NotificationPermissionsModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.js","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,SAAS,uBAAuB,CAC9B,MAA0C;IAE1C,QAAQ,MAAM,EAAE;QACd,KAAK,SAAS;YACZ,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,OAAO;gBAChC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,KAAK;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;gBAC/B,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,KAAK;gBAClB,OAAO,EAAE,KAAK;aACf,CAAC;QACJ;YACE,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,YAAY;gBACrC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,KAAK;aACf,CAAC;KACL;AACH,CAAC;AAED,KAAK,UAAU,sBAAsB,CAAC,EACpC,SAAS,GAGV;IACC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE;QAC5B,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;KAC1C;IAED,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,MAAa,CAAC;IAC5C,IAAI,OAAO,YAAY,CAAC,iBAAiB,KAAK,WAAW,EAAE;QACzD,IAAI,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC;QACrC,IAAI,SAAS,EAAE;YACb,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC7C,IAAI,QAAQ,GAAG,KAAK,CAAC;gBACrB,SAAS,WAAW,CAAC,MAAc;oBACjC,IAAI,CAAC,QAAQ,EAAE;wBACb,QAAQ,GAAG,IAAI,CAAC;wBAChB,OAAO,CAAC,MAAM,CAAC,CAAC;qBACjB;gBACH,CAAC;gBACD,sEAAsE;gBACtE,YAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAChF,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;KACxC;SAAM,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE;QAC5E,8DAA8D;QAC9D,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QAC3E,OAAO,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC7C;IACD,0EAA0E;IAC1E,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,KAAK,CAAC,mBAAmB;QACvB,OAAO,sBAAsB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,KAAK,CAAC,uBAAuB,CAC3B,OAA6C;QAE7C,OAAO,sBAAsB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;CAC+B,CAAC","sourcesContent":["import { PermissionStatus, Platform } from 'expo-modules-core';\n\nimport {\n NativeNotificationPermissionsRequest,\n NotificationPermissionsStatus,\n} from './NotificationPermissions.types';\nimport { NotificationPermissionsModule } from './NotificationPermissionsModule.types';\n\nfunction convertPermissionStatus(\n status?: NotificationPermission | 'prompt'\n): NotificationPermissionsStatus {\n switch (status) {\n case 'granted':\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: false,\n granted: true,\n };\n case 'denied':\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: false,\n granted: false,\n };\n default:\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n\nasync function resolvePermissionAsync({\n shouldAsk,\n}: {\n shouldAsk: boolean;\n}): Promise<NotificationPermissionsStatus> {\n if (!Platform.isDOMAvailable) {\n return convertPermissionStatus('denied');\n }\n\n const { Notification = {} } = window as any;\n if (typeof Notification.requestPermission !== 'undefined') {\n let status = Notification.permission;\n if (shouldAsk) {\n status = await new Promise((resolve, reject) => {\n let resolved = false;\n function resolveOnce(status: string) {\n if (!resolved) {\n resolved = true;\n resolve(status);\n }\n }\n // Some browsers require a callback argument and some return a Promise\n Notification.requestPermission(resolveOnce)?.then(resolveOnce)?.catch(reject);\n });\n }\n return convertPermissionStatus(status);\n } else if (typeof navigator !== 'undefined' && navigator?.permissions?.query) {\n // TODO(Bacon): Support `push` in the future when it's stable.\n const query = await navigator.permissions.query({ name: 'notifications' });\n return convertPermissionStatus(query.state);\n }\n // Platforms like iOS Safari don't support Notifications so return denied.\n return convertPermissionStatus('denied');\n}\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n async getPermissionsAsync(): Promise<NotificationPermissionsStatus> {\n return resolvePermissionAsync({ shouldAsk: false });\n },\n async requestPermissionsAsync(\n request: NativeNotificationPermissionsRequest\n ): Promise<NotificationPermissionsStatus> {\n return resolvePermissionAsync({ shouldAsk: true });\n },\n} as NotificationPermissionsModule;\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationPermissionsModule } from './NotificationPermissionsModule.types';
declare const _default: NotificationPermissionsModule;
export default _default;
//# sourceMappingURL=NotificationPermissionsModule.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;;AAEtF,wBAEE"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoNotificationPermissionsModule');
//# sourceMappingURL=NotificationPermissionsModule.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.native.js","sourceRoot":"","sources":["../src/NotificationPermissionsModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAChC,mCAAmC,CACpC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationPermissionsModule } from './NotificationPermissionsModule.types';\n\nexport default requireNativeModule<NotificationPermissionsModule>(\n 'ExpoNotificationPermissionsModule'\n);\n"]}

View File

@@ -0,0 +1,7 @@
import { ProxyNativeModule } from 'expo-modules-core';
import { NotificationPermissionsStatus, NativeNotificationPermissionsRequest } from './NotificationPermissions.types';
export interface NotificationPermissionsModule extends ProxyNativeModule {
getPermissionsAsync?: () => Promise<NotificationPermissionsStatus>;
requestPermissionsAsync?: (request: NativeNotificationPermissionsRequest) => Promise<NotificationPermissionsStatus>;
}
//# sourceMappingURL=NotificationPermissionsModule.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACL,6BAA6B,EAC7B,oCAAoC,EACrC,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,6BAA6B,CAAC,CAAC;IACnE,uBAAuB,CAAC,EAAE,CACxB,OAAO,EAAE,oCAAoC,KAC1C,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC7C"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=NotificationPermissionsModule.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPermissionsModule.types.js","sourceRoot":"","sources":["../src/NotificationPermissionsModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport {\n NotificationPermissionsStatus,\n NativeNotificationPermissionsRequest,\n} from './NotificationPermissions.types';\n\nexport interface NotificationPermissionsModule extends ProxyNativeModule {\n getPermissionsAsync?: () => Promise<NotificationPermissionsStatus>;\n requestPermissionsAsync?: (\n request: NativeNotificationPermissionsRequest\n ) => Promise<NotificationPermissionsStatus>;\n}\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationPresenterModule } from './NotificationPresenterModule.types';
declare const _default: NotificationPresenterModule;
export default _default;
//# sourceMappingURL=NotificationPresenterModule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;;AAElF,wBAGiC"}

View File

@@ -0,0 +1,5 @@
export default {
addListener: () => { },
removeListeners: () => { },
};
//# sourceMappingURL=NotificationPresenterModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.js","sourceRoot":"","sources":["../src/NotificationPresenterModule.ts"],"names":[],"mappings":"AAEA,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACK,CAAC","sourcesContent":["import { NotificationPresenterModule } from './NotificationPresenterModule.types';\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n} as NotificationPresenterModule;\n"]}

View File

@@ -0,0 +1,4 @@
import { NotificationPresenterModule } from './NotificationPresenterModule.types';
declare const _default: NotificationPresenterModule;
export default _default;
//# sourceMappingURL=NotificationPresenterModule.native.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.native.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;;AAElF,wBAA6F"}

View File

@@ -0,0 +1,3 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoNotificationPresenter');
//# sourceMappingURL=NotificationPresenterModule.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.native.js","sourceRoot":"","sources":["../src/NotificationPresenterModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,eAAe,mBAAmB,CAA8B,2BAA2B,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NotificationPresenterModule } from './NotificationPresenterModule.types';\n\nexport default requireNativeModule<NotificationPresenterModule>('ExpoNotificationPresenter');\n"]}

View File

@@ -0,0 +1,9 @@
import { ProxyNativeModule } from 'expo-modules-core';
import { Notification, NotificationContentInput } from './Notifications.types';
export interface NotificationPresenterModule extends ProxyNativeModule {
getPresentedNotificationsAsync?: () => Promise<Notification[]>;
presentNotificationAsync?: (identifier: string, content: NotificationContentInput) => Promise<string>;
dismissNotificationAsync?: (identifier: string) => Promise<void>;
dismissAllNotificationsAsync?: () => Promise<void>;
}
//# sourceMappingURL=NotificationPresenterModule.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.types.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,8BAA8B,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC/D,wBAAwB,CAAC,EAAE,CACzB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,4BAA4B,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=NotificationPresenterModule.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationPresenterModule.types.js","sourceRoot":"","sources":["../src/NotificationPresenterModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProxyNativeModule } from 'expo-modules-core';\n\nimport { Notification, NotificationContentInput } from './Notifications.types';\n\nexport interface NotificationPresenterModule extends ProxyNativeModule {\n getPresentedNotificationsAsync?: () => Promise<Notification[]>;\n presentNotificationAsync?: (\n identifier: string,\n content: NotificationContentInput\n ) => Promise<string>;\n dismissNotificationAsync?: (identifier: string) => Promise<void>;\n dismissAllNotificationsAsync?: () => Promise<void>;\n}\n"]}

Some files were not shown because too many files have changed in this diff Show More