@buoy-gg/notifications 7.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +58 -0
- package/README.md +28 -0
- package/lib/commonjs/components/LocalNotificationTest.js +185 -0
- package/lib/commonjs/components/LocalNotificationTest.js.map +1 -0
- package/lib/commonjs/components/NotificationTestView.js +329 -0
- package/lib/commonjs/components/NotificationTestView.js.map +1 -0
- package/lib/commonjs/components/NotificationToolView.js +673 -0
- package/lib/commonjs/components/NotificationToolView.js.map +1 -0
- package/lib/commonjs/components/notificationStyles.js +292 -0
- package/lib/commonjs/components/notificationStyles.js.map +1 -0
- package/lib/commonjs/expo.js +247 -0
- package/lib/commonjs/expo.js.map +1 -0
- package/lib/commonjs/index.js +148 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/json.js +58 -0
- package/lib/commonjs/json.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/payload.js +68 -0
- package/lib/commonjs/payload.js.map +1 -0
- package/lib/commonjs/preset.js +56 -0
- package/lib/commonjs/preset.js.map +1 -0
- package/lib/commonjs/preview.js +18 -0
- package/lib/commonjs/preview.js.map +1 -0
- package/lib/commonjs/recorder.js +339 -0
- package/lib/commonjs/recorder.js.map +1 -0
- package/lib/commonjs/runtime.js +110 -0
- package/lib/commonjs/runtime.js.map +1 -0
- package/lib/commonjs/storage.js +61 -0
- package/lib/commonjs/storage.js.map +1 -0
- package/lib/commonjs/types.js +2 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/components/LocalNotificationTest.js +180 -0
- package/lib/module/components/LocalNotificationTest.js.map +1 -0
- package/lib/module/components/NotificationTestView.js +324 -0
- package/lib/module/components/NotificationTestView.js.map +1 -0
- package/lib/module/components/NotificationToolView.js +668 -0
- package/lib/module/components/NotificationToolView.js.map +1 -0
- package/lib/module/components/notificationStyles.js +288 -0
- package/lib/module/components/notificationStyles.js.map +1 -0
- package/lib/module/expo.js +241 -0
- package/lib/module/expo.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/json.js +51 -0
- package/lib/module/json.js.map +1 -0
- package/lib/module/payload.js +63 -0
- package/lib/module/payload.js.map +1 -0
- package/lib/module/preset.js +50 -0
- package/lib/module/preset.js.map +1 -0
- package/lib/module/preview.js +14 -0
- package/lib/module/preview.js.map +1 -0
- package/lib/module/recorder.js +332 -0
- package/lib/module/recorder.js.map +1 -0
- package/lib/module/runtime.js +103 -0
- package/lib/module/runtime.js.map +1 -0
- package/lib/module/storage.js +56 -0
- package/lib/module/storage.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/components/LocalNotificationTest.d.ts +8 -0
- package/lib/typescript/components/LocalNotificationTest.d.ts.map +1 -0
- package/lib/typescript/components/NotificationTestView.d.ts +27 -0
- package/lib/typescript/components/NotificationTestView.d.ts.map +1 -0
- package/lib/typescript/components/NotificationToolView.d.ts +16 -0
- package/lib/typescript/components/NotificationToolView.d.ts.map +1 -0
- package/lib/typescript/components/notificationStyles.d.ts +284 -0
- package/lib/typescript/components/notificationStyles.d.ts.map +1 -0
- package/lib/typescript/expo.d.ts +66 -0
- package/lib/typescript/expo.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +15 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/json.d.ts +7 -0
- package/lib/typescript/json.d.ts.map +1 -0
- package/lib/typescript/payload.d.ts +18 -0
- package/lib/typescript/payload.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts +31 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/preview.d.ts +4 -0
- package/lib/typescript/preview.d.ts.map +1 -0
- package/lib/typescript/recorder.d.ts +52 -0
- package/lib/typescript/recorder.d.ts.map +1 -0
- package/lib/typescript/runtime.d.ts +50 -0
- package/lib/typescript/runtime.d.ts.map +1 -0
- package/lib/typescript/storage.d.ts +23 -0
- package/lib/typescript/storage.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +64 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AppState, Platform } from "react-native";
|
|
4
|
+
import { defaultNotificationStorage } from "./storage";
|
|
5
|
+
import { NotificationRecorder } from "./recorder";
|
|
6
|
+
import { attachExpoNotifications } from "./expo";
|
|
7
|
+
import { object } from "./json";
|
|
8
|
+
const globals = globalThis;
|
|
9
|
+
export function captureEnabled(enableInRelease = false) {
|
|
10
|
+
return typeof __DEV__ !== "undefined" && __DEV__ || enableInRelease === true;
|
|
11
|
+
}
|
|
12
|
+
export function getNotificationRecorder() {
|
|
13
|
+
return globals.__buoyNotificationsV1?.recorder ?? null;
|
|
14
|
+
}
|
|
15
|
+
export function installExpoNotificationCapture(sdk, options = {}) {
|
|
16
|
+
if (!captureEnabled(options.enableInRelease)) return null;
|
|
17
|
+
const key = JSON.stringify([options.platform ?? Platform.OS, options.appId, options.providerVersion, options.projectId, options.enableInRelease, options.preview]);
|
|
18
|
+
let runtime = globals.__buoyNotificationsV1;
|
|
19
|
+
if (!runtime) {
|
|
20
|
+
const persistence = options.storage ? {
|
|
21
|
+
storage: options.storage,
|
|
22
|
+
durable: options.durable === true
|
|
23
|
+
} : defaultNotificationStorage();
|
|
24
|
+
const recorder = new NotificationRecorder({
|
|
25
|
+
...persistence,
|
|
26
|
+
enabled: () => captureEnabled(options.enableInRelease),
|
|
27
|
+
appState: () => AppState.currentState ?? "unknown",
|
|
28
|
+
autoStart: true
|
|
29
|
+
});
|
|
30
|
+
runtime = {
|
|
31
|
+
recorder
|
|
32
|
+
};
|
|
33
|
+
globals.__buoyNotificationsV1 = runtime;
|
|
34
|
+
}
|
|
35
|
+
if (runtime.sdk !== sdk || runtime.key !== key) {
|
|
36
|
+
runtime.attachment?.dispose();
|
|
37
|
+
runtime.attachment = attachExpoNotifications(runtime.recorder, sdk, {
|
|
38
|
+
...options,
|
|
39
|
+
platform: options.platform ?? Platform.OS
|
|
40
|
+
});
|
|
41
|
+
runtime.sdk = sdk;
|
|
42
|
+
runtime.key = key;
|
|
43
|
+
}
|
|
44
|
+
return runtime.recorder;
|
|
45
|
+
}
|
|
46
|
+
const emptyRecorder = new NotificationRecorder();
|
|
47
|
+
function current() {
|
|
48
|
+
const runtime = globals.__buoyNotificationsV1;
|
|
49
|
+
if (!runtime) throw new Error("Install Expo notification capture in the app entry point, before rendering the root component.");
|
|
50
|
+
return runtime;
|
|
51
|
+
}
|
|
52
|
+
export const notificationSyncAdapter = {
|
|
53
|
+
version: 1,
|
|
54
|
+
getSnapshot: () => (getNotificationRecorder() ?? emptyRecorder).getSnapshot(),
|
|
55
|
+
subscribe: listener => (getNotificationRecorder() ?? emptyRecorder).subscribe(listener),
|
|
56
|
+
actions: {
|
|
57
|
+
getSnapshot: () => notificationSyncAdapter.getSnapshot(),
|
|
58
|
+
getCapabilities: () => {
|
|
59
|
+
const {
|
|
60
|
+
ready,
|
|
61
|
+
provider,
|
|
62
|
+
providerVersion,
|
|
63
|
+
platform,
|
|
64
|
+
appId,
|
|
65
|
+
capabilities,
|
|
66
|
+
durable,
|
|
67
|
+
storageError
|
|
68
|
+
} = notificationSyncAdapter.getSnapshot();
|
|
69
|
+
return {
|
|
70
|
+
ready,
|
|
71
|
+
provider,
|
|
72
|
+
providerVersion,
|
|
73
|
+
platform,
|
|
74
|
+
appId,
|
|
75
|
+
capabilities,
|
|
76
|
+
durable,
|
|
77
|
+
storageError
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
getEvent(params) {
|
|
81
|
+
const {
|
|
82
|
+
id
|
|
83
|
+
} = object(params);
|
|
84
|
+
if (typeof id !== "string") throw new Error("Provide the captured event id.");
|
|
85
|
+
return current().recorder.getSnapshot().events.find(event => event.id === id) ?? null;
|
|
86
|
+
},
|
|
87
|
+
async setCaptureSession(params) {
|
|
88
|
+
const {
|
|
89
|
+
runId,
|
|
90
|
+
durationMs
|
|
91
|
+
} = object(params);
|
|
92
|
+
if (typeof runId !== "string" && runId !== null) throw new Error("Provide runId, or null to stop capture.");
|
|
93
|
+
if (durationMs !== undefined && typeof durationMs !== "number") throw new Error("durationMs must be a number.");
|
|
94
|
+
return current().recorder.setCaptureSession(runId, durationMs);
|
|
95
|
+
},
|
|
96
|
+
clearCapturedEvents: () => current().recorder.clearCapturedEvents(),
|
|
97
|
+
getPermissions: () => current().attachment.actions.getPermissions(),
|
|
98
|
+
listPresented: () => current().attachment.actions.listPresented(),
|
|
99
|
+
refreshToken: params => current().attachment.actions.refreshToken(params),
|
|
100
|
+
scheduleLocal: params => current().attachment.actions.scheduleLocal(params)
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AppState","Platform","defaultNotificationStorage","NotificationRecorder","attachExpoNotifications","object","globals","globalThis","captureEnabled","enableInRelease","__DEV__","getNotificationRecorder","__buoyNotificationsV1","recorder","installExpoNotificationCapture","sdk","options","key","JSON","stringify","platform","OS","appId","providerVersion","projectId","preview","runtime","persistence","storage","durable","enabled","appState","currentState","autoStart","attachment","dispose","emptyRecorder","current","Error","notificationSyncAdapter","version","getSnapshot","subscribe","listener","actions","getCapabilities","ready","provider","capabilities","storageError","getEvent","params","id","events","find","event","setCaptureSession","runId","durationMs","undefined","clearCapturedEvents","getPermissions","listPresented","refreshToken","scheduleLocal"],"sourceRoot":"../../src","sources":["runtime.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AACjD,SAASC,0BAA0B,QAAQ,WAAW;AACtD,SAASC,oBAAoB,QAAQ,YAAY;AACjD,SAASC,uBAAuB,QAAyD,QAAQ;AACjG,SAASC,MAAM,QAAQ,QAAQ;AAK/B,MAAMC,OAAO,GAAGC,UAAqE;AASrF,OAAO,SAASC,cA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AC,CAAC;IAClEC,YAAY,EAAGZ,MAAe,IAAKd,OAAO,CAAC,CAAC,CAACH,UAAU,CAAEU,OAAO,CAACmB,YAAY,CAACZ,MAAM,CAAC;IACrFa,aAAa,EAAGb,MAAe,IAAKd,OAAO,CAAC,CAAC,CAACH,UAAU,CAAEU,OAAO,CAACoB,aAAa,CAACb,MAAM;EACxF;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Propagates native I/O failures so capture never acknowledges a memory fallback as durable. */
|
|
4
|
+
export function createExpoNotificationStorage(fs) {
|
|
5
|
+
if (!fs.documentDirectory) throw new Error("Expo FileSystem has no persistent document directory.");
|
|
6
|
+
const directory = fs.documentDirectory + "buoy-notifications/";
|
|
7
|
+
const pathFor = key => directory + encodeURIComponent(key) + ".json";
|
|
8
|
+
return {
|
|
9
|
+
async getItem(key) {
|
|
10
|
+
const path = pathFor(key);
|
|
11
|
+
return (await fs.getInfoAsync(path)).exists ? fs.readAsStringAsync(path) : null;
|
|
12
|
+
},
|
|
13
|
+
async setItem(key, value) {
|
|
14
|
+
if (!(await fs.getInfoAsync(directory)).exists) await fs.makeDirectoryAsync(directory, {
|
|
15
|
+
intermediates: true
|
|
16
|
+
});
|
|
17
|
+
await fs.writeAsStringAsync(pathFor(key), value);
|
|
18
|
+
},
|
|
19
|
+
async removeItem(key) {
|
|
20
|
+
await fs.deleteAsync(pathFor(key), {
|
|
21
|
+
idempotent: true
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
async getAllKeys() {
|
|
25
|
+
if (!(await fs.getInfoAsync(directory)).exists) return [];
|
|
26
|
+
return (await fs.readDirectoryAsync(directory)).filter(file => file.endsWith(".json")).flatMap(file => {
|
|
27
|
+
try {
|
|
28
|
+
return [decodeURIComponent(file.slice(0, -5))];
|
|
29
|
+
} catch {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function defaultNotificationStorage() {
|
|
37
|
+
try {
|
|
38
|
+
const fs = require("expo-file-system/legacy");
|
|
39
|
+
if (fs.documentDirectory && typeof fs.writeAsStringAsync === "function") return {
|
|
40
|
+
storage: createExpoNotificationStorage(fs),
|
|
41
|
+
durable: true
|
|
42
|
+
};
|
|
43
|
+
} catch {/* An app can provide its own storage when Expo FileSystem is absent. */}
|
|
44
|
+
try {
|
|
45
|
+
const module = require("@react-native-async-storage/async-storage");
|
|
46
|
+
const storage = module.default ?? module;
|
|
47
|
+
if (typeof storage.getItem === "function" && typeof storage.setItem === "function" && typeof storage.getAllKeys === "function") return {
|
|
48
|
+
storage,
|
|
49
|
+
durable: true
|
|
50
|
+
};
|
|
51
|
+
} catch {/* Capture remains available in memory. */}
|
|
52
|
+
return {
|
|
53
|
+
durable: false
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createExpoNotificationStorage","fs","documentDirectory","Error","directory","pathFor","key","encodeURIComponent","getItem","path","getInfoAsync","exists","readAsStringAsync","setItem","value","makeDirectoryAsync","intermediates","writeAsStringAsync","removeItem","deleteAsync","idempotent","getAllKeys","readDirectoryAsync","filter","file","endsWith","flatMap","decodeURIComponent","slice","defaultNotificationStorage","require","storage","durable","module","default"],"sourceRoot":"../../src","sources":["storage.ts"],"mappings":";;AAYA;AACA,OAAO,SAASA,6BAA6BA,CAACC,EAA8B,EAAuB;EACjG,IAAI,CAACA,EAAE,CAACC,iBAAiB,EAAE,MAAM,IAAIC,KAAK,CAAC,uDAAuD,CAAC;EACnG,MAAMC,SAAS,GAAGH,EAAE,CAACC,iBAAiB,GAAG,qBAAqB;EAC9D,MAAMG,OAAO,GAAIC,GAAW,IAAKF,SAAS,GAAGG,kBAAkB,CAACD,GAAG,CAAC,GAAG,OAAO;EAC9E,OAAO;IACL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0BA,CAAA,EAAwD;EAChG,IAAI;IACF,MAAM5B,EAAE,GAAG6B,OAAO,CAAC,yBAAyB,CAA+B;IAC3E,IAAI7B,EAAE,CAACC,iBAAiB,IAAI,OAAOD,EAAE,CAACgB,kBAAkB,KAAK,UAAU,EAAE,OAAO;MAAEc,OAAO,EAAE/B,6BAA6B,CAACC,EAAE,CAAC;MAAE+B,OAAO,EAAE;IAAK,CAAC;EAC/I,CAAC,CAAC,MAAM,CAAE;EACV,IAAI;IACF,MAAMC,MAAM,GAAGH,OAAO,CAAC,2CAA2C,CAAC;IACnE,MAAMC,OAAO,GAAGE,MAAM,CAACC,OAAO,IAAID,MAAM;IACxC,IAAI,OAAOF,OAAO,CAACvB,OAAO,KAAK,UAAU,IAAI,OAAOuB,OAAO,CAAClB,OAAO,KAAK,UAAU,IAAI,OAAOkB,OAAO,CAACV,UAAU,KAAK,UAAU,EAAE,OAAO;MAAEU,OAAO;MAAEC,OAAO,EAAE;IAAK,CAAC;EACnK,CAAC,CAAC,MAAM,CAAE;EACV,OAAO;IAAEA,OAAO,EAAE;EAAM,CAAC;AAC3B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { NotificationSnapshot } from "../types";
|
|
3
|
+
export declare function LocalNotificationTest({ snapshot, onAction, onViewActivity, }: {
|
|
4
|
+
snapshot: NotificationSnapshot | null;
|
|
5
|
+
onAction: (action: string, params?: unknown) => Promise<unknown>;
|
|
6
|
+
onViewActivity: () => void;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=LocalNotificationTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalNotificationTest.d.ts","sourceRoot":"","sources":["../../../src/components/LocalNotificationTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,EACR,cAAc,GACf,EAAE;IACD,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,qBAmJA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NotificationPreviewAppearance } from "../types";
|
|
2
|
+
import React, { type ReactNode } from "react";
|
|
3
|
+
export interface NotificationTestViewProps {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
onTitleChange: (value: string) => void;
|
|
7
|
+
onMessageChange: (value: string) => void;
|
|
8
|
+
appName: string;
|
|
9
|
+
appearance?: NotificationPreviewAppearance;
|
|
10
|
+
destination: ReactNode;
|
|
11
|
+
options: ReactNode;
|
|
12
|
+
previewNote?: string;
|
|
13
|
+
result?: {
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
failed?: boolean;
|
|
17
|
+
} | null;
|
|
18
|
+
onViewActivity: () => void;
|
|
19
|
+
onSend: () => void;
|
|
20
|
+
busy: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
hint: string;
|
|
23
|
+
error?: string | null;
|
|
24
|
+
notice?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export declare function NotificationTestView(props: NotificationTestViewProps): React.JSX.Element;
|
|
27
|
+
//# sourceMappingURL=NotificationTestView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationTestView.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationTestView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBnE,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACrE,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBA+JpE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
import type { NotificationSnapshot } from "../types";
|
|
3
|
+
export type NotificationTab = "send" | "events" | "tokens" | "setup";
|
|
4
|
+
export interface NotificationToolViewProps {
|
|
5
|
+
snapshot: NotificationSnapshot | null;
|
|
6
|
+
onAction: (action: string, params?: unknown) => Promise<unknown>;
|
|
7
|
+
sender?: ReactNode;
|
|
8
|
+
activeTab?: NotificationTab;
|
|
9
|
+
onTabChange?: (tab: NotificationTab) => void;
|
|
10
|
+
renderShell?: (content: {
|
|
11
|
+
header: ReactNode;
|
|
12
|
+
body: ReactNode;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function NotificationToolView({ snapshot, onAction, sender, activeTab, onTabChange, renderShell, }: NotificationToolViewProps): React.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=NotificationToolView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationToolView.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationToolView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgC5E,OAAO,KAAK,EAA4B,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAI/E,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACrE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,KAAK,SAAS,CAAC;CAC9E;AAmHD,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE,yBAAyB,qBAklB3B"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
root: {
|
|
3
|
+
flex: number;
|
|
4
|
+
minHeight: number;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
};
|
|
7
|
+
fill: {
|
|
8
|
+
flex: number;
|
|
9
|
+
minHeight: number;
|
|
10
|
+
};
|
|
11
|
+
inlineHeader: {
|
|
12
|
+
paddingHorizontal: number;
|
|
13
|
+
paddingVertical: number;
|
|
14
|
+
borderBottomWidth: number;
|
|
15
|
+
borderBottomColor: "rgba(255, 255, 255, 0.08)";
|
|
16
|
+
};
|
|
17
|
+
status: {
|
|
18
|
+
flexDirection: "row";
|
|
19
|
+
alignItems: "center";
|
|
20
|
+
flexWrap: "wrap";
|
|
21
|
+
gap: number;
|
|
22
|
+
paddingHorizontal: number;
|
|
23
|
+
paddingVertical: number;
|
|
24
|
+
};
|
|
25
|
+
statusLabel: {
|
|
26
|
+
flexDirection: "row";
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
gap: number;
|
|
29
|
+
};
|
|
30
|
+
dot: {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
borderRadius: number;
|
|
34
|
+
backgroundColor: "#636366";
|
|
35
|
+
};
|
|
36
|
+
liveDot: {
|
|
37
|
+
backgroundColor: "#20C997";
|
|
38
|
+
};
|
|
39
|
+
caption: {
|
|
40
|
+
color: "#9BA1A6";
|
|
41
|
+
fontSize: number;
|
|
42
|
+
lineHeight: number;
|
|
43
|
+
};
|
|
44
|
+
provider: {
|
|
45
|
+
color: "#9BA1A6";
|
|
46
|
+
fontSize: number;
|
|
47
|
+
marginLeft: "auto";
|
|
48
|
+
fontFamily: string;
|
|
49
|
+
};
|
|
50
|
+
content: {
|
|
51
|
+
padding: number;
|
|
52
|
+
gap: number;
|
|
53
|
+
};
|
|
54
|
+
eventList: {
|
|
55
|
+
paddingHorizontal: number;
|
|
56
|
+
paddingTop: number;
|
|
57
|
+
};
|
|
58
|
+
searchRow: {
|
|
59
|
+
flexDirection: "row";
|
|
60
|
+
gap: number;
|
|
61
|
+
paddingHorizontal: number;
|
|
62
|
+
paddingBottom: number;
|
|
63
|
+
alignItems: "center";
|
|
64
|
+
};
|
|
65
|
+
searchField: {
|
|
66
|
+
flex: number;
|
|
67
|
+
minWidth: number;
|
|
68
|
+
height: number;
|
|
69
|
+
flexDirection: "row";
|
|
70
|
+
alignItems: "center";
|
|
71
|
+
gap: number;
|
|
72
|
+
paddingHorizontal: number;
|
|
73
|
+
backgroundColor: "rgba(5, 5, 5, 0.50)";
|
|
74
|
+
borderWidth: number;
|
|
75
|
+
borderColor: "rgba(255, 255, 255, 0.07)";
|
|
76
|
+
borderRadius: 10;
|
|
77
|
+
};
|
|
78
|
+
searchInput: {
|
|
79
|
+
flex: number;
|
|
80
|
+
minWidth: number;
|
|
81
|
+
height: "100%";
|
|
82
|
+
color: "#ECEDEE";
|
|
83
|
+
fontSize: number;
|
|
84
|
+
padding: number;
|
|
85
|
+
};
|
|
86
|
+
clearSearch: {
|
|
87
|
+
padding: number;
|
|
88
|
+
};
|
|
89
|
+
iconButton: {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
alignItems: "center";
|
|
93
|
+
justifyContent: "center";
|
|
94
|
+
backgroundColor: "rgba(8, 10, 14, 0.85)";
|
|
95
|
+
borderRadius: number;
|
|
96
|
+
borderWidth: number;
|
|
97
|
+
borderColor: "#1A1A1C";
|
|
98
|
+
};
|
|
99
|
+
event: {
|
|
100
|
+
backgroundColor: "rgba(5, 5, 5, 0.50)";
|
|
101
|
+
borderRadius: 12;
|
|
102
|
+
borderWidth: number;
|
|
103
|
+
borderColor: "rgba(255, 255, 255, 0.07)";
|
|
104
|
+
paddingHorizontal: number;
|
|
105
|
+
paddingVertical: number;
|
|
106
|
+
marginBottom: number;
|
|
107
|
+
gap: number;
|
|
108
|
+
};
|
|
109
|
+
eventTop: {
|
|
110
|
+
flexDirection: "row";
|
|
111
|
+
alignItems: "center";
|
|
112
|
+
gap: number;
|
|
113
|
+
justifyContent: "space-between";
|
|
114
|
+
};
|
|
115
|
+
eventKind: {
|
|
116
|
+
flexDirection: "row";
|
|
117
|
+
alignItems: "center";
|
|
118
|
+
gap: number;
|
|
119
|
+
flex: number;
|
|
120
|
+
minWidth: number;
|
|
121
|
+
};
|
|
122
|
+
eventLabel: {
|
|
123
|
+
flexShrink: number;
|
|
124
|
+
fontSize: number;
|
|
125
|
+
fontWeight: "600";
|
|
126
|
+
};
|
|
127
|
+
timestamp: {
|
|
128
|
+
color: "#9BA1A6";
|
|
129
|
+
fontFamily: string;
|
|
130
|
+
fontSize: number;
|
|
131
|
+
};
|
|
132
|
+
eventSubject: {
|
|
133
|
+
flexDirection: "row";
|
|
134
|
+
alignItems: "center";
|
|
135
|
+
gap: number;
|
|
136
|
+
};
|
|
137
|
+
eventTitle: {
|
|
138
|
+
flex: number;
|
|
139
|
+
color: "#ECEDEE";
|
|
140
|
+
fontSize: number;
|
|
141
|
+
fontWeight: "500";
|
|
142
|
+
};
|
|
143
|
+
eventMeta: {
|
|
144
|
+
color: "#9BA1A6";
|
|
145
|
+
fontFamily: string;
|
|
146
|
+
fontSize: number;
|
|
147
|
+
lineHeight: number;
|
|
148
|
+
};
|
|
149
|
+
resultCount: {
|
|
150
|
+
color: "#9BA1A6";
|
|
151
|
+
fontSize: number;
|
|
152
|
+
marginBottom: number;
|
|
153
|
+
marginLeft: number;
|
|
154
|
+
};
|
|
155
|
+
actionRow: {
|
|
156
|
+
flexDirection: "row";
|
|
157
|
+
alignItems: "center";
|
|
158
|
+
flexWrap: "wrap";
|
|
159
|
+
gap: number;
|
|
160
|
+
};
|
|
161
|
+
button: {
|
|
162
|
+
flexDirection: "row";
|
|
163
|
+
alignItems: "center";
|
|
164
|
+
justifyContent: "center";
|
|
165
|
+
gap: number;
|
|
166
|
+
minHeight: number;
|
|
167
|
+
paddingVertical: number;
|
|
168
|
+
paddingHorizontal: number;
|
|
169
|
+
borderRadius: 999;
|
|
170
|
+
backgroundColor: "rgba(255, 255, 255, 0.08)";
|
|
171
|
+
alignSelf: "flex-start";
|
|
172
|
+
};
|
|
173
|
+
buttonText: {
|
|
174
|
+
color: "#20C997";
|
|
175
|
+
fontSize: number;
|
|
176
|
+
fontWeight: "600";
|
|
177
|
+
};
|
|
178
|
+
primaryButton: {
|
|
179
|
+
backgroundColor: "#20C997";
|
|
180
|
+
};
|
|
181
|
+
primaryButtonText: {
|
|
182
|
+
color: "#000000";
|
|
183
|
+
};
|
|
184
|
+
pressed: {
|
|
185
|
+
opacity: number;
|
|
186
|
+
};
|
|
187
|
+
disabled: {
|
|
188
|
+
opacity: number;
|
|
189
|
+
};
|
|
190
|
+
detailTitle: {
|
|
191
|
+
color: "#ECEDEE";
|
|
192
|
+
fontSize: number;
|
|
193
|
+
fontWeight: "600";
|
|
194
|
+
};
|
|
195
|
+
field: {
|
|
196
|
+
flexDirection: "row";
|
|
197
|
+
paddingHorizontal: number;
|
|
198
|
+
paddingVertical: number;
|
|
199
|
+
gap: number;
|
|
200
|
+
};
|
|
201
|
+
fieldLabel: {
|
|
202
|
+
width: number;
|
|
203
|
+
flexShrink: number;
|
|
204
|
+
};
|
|
205
|
+
value: {
|
|
206
|
+
flex: number;
|
|
207
|
+
minWidth: number;
|
|
208
|
+
color: "#ECEDEE";
|
|
209
|
+
fontFamily: string;
|
|
210
|
+
fontSize: number;
|
|
211
|
+
lineHeight: number;
|
|
212
|
+
};
|
|
213
|
+
disclosure: {
|
|
214
|
+
flexDirection: "row";
|
|
215
|
+
alignItems: "center";
|
|
216
|
+
justifyContent: "space-between";
|
|
217
|
+
paddingHorizontal: number;
|
|
218
|
+
paddingVertical: number;
|
|
219
|
+
};
|
|
220
|
+
disclosureTitle: {
|
|
221
|
+
color: "#ECEDEE";
|
|
222
|
+
fontSize: number;
|
|
223
|
+
fontWeight: "500";
|
|
224
|
+
};
|
|
225
|
+
jsonBody: {
|
|
226
|
+
padding: number;
|
|
227
|
+
borderTopWidth: number;
|
|
228
|
+
borderTopColor: "rgba(255, 255, 255, 0.08)";
|
|
229
|
+
};
|
|
230
|
+
token: {
|
|
231
|
+
color: "#ECEDEE";
|
|
232
|
+
fontFamily: string;
|
|
233
|
+
fontSize: number;
|
|
234
|
+
lineHeight: number;
|
|
235
|
+
};
|
|
236
|
+
bodyText: {
|
|
237
|
+
color: "#ECEDEE";
|
|
238
|
+
fontSize: number;
|
|
239
|
+
lineHeight: number;
|
|
240
|
+
};
|
|
241
|
+
footnote: {
|
|
242
|
+
color: "#9BA1A6";
|
|
243
|
+
fontSize: number;
|
|
244
|
+
lineHeight: number;
|
|
245
|
+
marginTop: number;
|
|
246
|
+
marginHorizontal: number;
|
|
247
|
+
};
|
|
248
|
+
emptyFootnote: {
|
|
249
|
+
color: "#9BA1A6";
|
|
250
|
+
fontSize: number;
|
|
251
|
+
lineHeight: number;
|
|
252
|
+
textAlign: "center";
|
|
253
|
+
marginHorizontal: number;
|
|
254
|
+
};
|
|
255
|
+
sectionActions: {
|
|
256
|
+
flexDirection: "row";
|
|
257
|
+
marginBottom: number;
|
|
258
|
+
};
|
|
259
|
+
warning: {
|
|
260
|
+
color: "#FF8329";
|
|
261
|
+
fontSize: number;
|
|
262
|
+
lineHeight: number;
|
|
263
|
+
};
|
|
264
|
+
notice: {
|
|
265
|
+
color: "#20C997";
|
|
266
|
+
backgroundColor: "rgba(5, 5, 5, 0.50)";
|
|
267
|
+
paddingHorizontal: number;
|
|
268
|
+
paddingVertical: number;
|
|
269
|
+
fontSize: number;
|
|
270
|
+
lineHeight: number;
|
|
271
|
+
};
|
|
272
|
+
errorNotice: {
|
|
273
|
+
color: "#FF3B30";
|
|
274
|
+
backgroundColor: "rgba(5, 5, 5, 0.50)";
|
|
275
|
+
paddingHorizontal: number;
|
|
276
|
+
paddingVertical: number;
|
|
277
|
+
fontSize: number;
|
|
278
|
+
lineHeight: number;
|
|
279
|
+
};
|
|
280
|
+
errorText: {
|
|
281
|
+
color: "#FF3B30";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
//# sourceMappingURL=notificationStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationStyles.d.ts","sourceRoot":"","sources":["../../../src/components/notificationStyles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqNjB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { NotificationPreviewAppearance } from "./types";
|
|
2
|
+
import { NotificationRecorder } from "./recorder";
|
|
3
|
+
type Subscription = {
|
|
4
|
+
remove(): void;
|
|
5
|
+
};
|
|
6
|
+
export interface ExpoNotifications {
|
|
7
|
+
addNotificationReceivedListener(listener: (notification: any) => void): Subscription;
|
|
8
|
+
addNotificationResponseReceivedListener(listener: (response: any) => void): Subscription;
|
|
9
|
+
addPushTokenListener(listener: (token: {
|
|
10
|
+
type: string;
|
|
11
|
+
data: string;
|
|
12
|
+
}) => void): Subscription;
|
|
13
|
+
getLastNotificationResponse?(): unknown;
|
|
14
|
+
getLastNotificationResponseAsync?(): Promise<unknown>;
|
|
15
|
+
getPermissionsAsync(): Promise<unknown>;
|
|
16
|
+
getPresentedNotificationsAsync?(): Promise<unknown[]>;
|
|
17
|
+
getDevicePushTokenAsync?(): Promise<{
|
|
18
|
+
type: string;
|
|
19
|
+
data: string;
|
|
20
|
+
}>;
|
|
21
|
+
getExpoPushTokenAsync?(options: {
|
|
22
|
+
projectId: string;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
data: string;
|
|
25
|
+
}>;
|
|
26
|
+
scheduleNotificationAsync?(request: any): Promise<string>;
|
|
27
|
+
}
|
|
28
|
+
export interface ExpoCaptureOptions {
|
|
29
|
+
platform: string;
|
|
30
|
+
appId?: string;
|
|
31
|
+
providerVersion?: string;
|
|
32
|
+
projectId?: string;
|
|
33
|
+
preview?: NotificationPreviewAppearance;
|
|
34
|
+
}
|
|
35
|
+
/** Does not replace presentation, routing or background handlers. */
|
|
36
|
+
export declare function attachExpoNotifications(recorder: NotificationRecorder, sdk: ExpoNotifications, options: ExpoCaptureOptions): {
|
|
37
|
+
actions: {
|
|
38
|
+
getPermissions(): Promise<import("./types").Json>;
|
|
39
|
+
listPresented(): Promise<import("./types").Json>;
|
|
40
|
+
refreshToken(params: unknown): Promise<{
|
|
41
|
+
type: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}>;
|
|
44
|
+
scheduleLocal(params: unknown): Promise<{
|
|
45
|
+
notificationId: string;
|
|
46
|
+
transport: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
ready: Promise<void>;
|
|
50
|
+
dispose(): void;
|
|
51
|
+
};
|
|
52
|
+
/** Wrap the handler the app already passes to Notifications.setNotificationHandler. */
|
|
53
|
+
export declare function instrumentExpoNotificationHandler<T extends {
|
|
54
|
+
handleNotification: (...args: any[]) => any;
|
|
55
|
+
handleError?: (...args: any[]) => any;
|
|
56
|
+
}>(recorder: NotificationRecorder, handler: T): T;
|
|
57
|
+
/** Expo's background task payload differs from its foreground Notification object. */
|
|
58
|
+
export declare function expoBackgroundMetadata(value: unknown): {
|
|
59
|
+
testId: string | null;
|
|
60
|
+
title: string | null;
|
|
61
|
+
notificationId: string | null;
|
|
62
|
+
actionIdentifier: string | null;
|
|
63
|
+
};
|
|
64
|
+
export declare function instrumentNotificationBackgroundTask<T extends (...args: any[]) => any>(recorder: NotificationRecorder, task: T): T;
|
|
65
|
+
export {};
|
|
66
|
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AkB;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,6BAA6B,CAAA;CAAE;AAS/J,qEAAqE;AACrE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAkB;;;;6BAmC5F,OAAO;;;;8BAeN,OAAO;;;;;;;EAYtC;AAED,uFAAuF;AACvF,wBAAgB,iCAAiC,CAAC,CAAC,SAAS;IAAE,kBAAkB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IAAC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAyBjM;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO;;;;;EAepD;AAQD,wBAAgB,oCAAoC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAelI"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export { NotificationRecorder, expoMetadata } from "./recorder";
|
|
3
|
+
export { attachExpoNotifications, instrumentExpoNotificationHandler, instrumentNotificationBackgroundTask } from "./expo";
|
|
4
|
+
export type { ExpoNotifications, ExpoCaptureOptions } from "./expo";
|
|
5
|
+
export { installExpoNotificationCapture, getNotificationRecorder, notificationSyncAdapter } from "./runtime";
|
|
6
|
+
export type { InstallNotificationOptions } from "./runtime";
|
|
7
|
+
export { NotificationToolView } from "./components/NotificationToolView";
|
|
8
|
+
export type { NotificationToolViewProps, NotificationTab } from "./components/NotificationToolView";
|
|
9
|
+
export { notificationToolPreset, createNotificationTool, NotificationsModal } from "./preset";
|
|
10
|
+
export { NotificationsIcon } from "@buoy-gg/shared-ui";
|
|
11
|
+
export { composeSimulatorPayload, validateSimulatorPayload } from "./payload";
|
|
12
|
+
export { createExpoNotificationStorage } from "./storage";
|
|
13
|
+
export { NotificationTestView } from "./components/NotificationTestView";
|
|
14
|
+
export type { NotificationTestViewProps } from "./components/NotificationTestView";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,iCAAiC,EAAE,oCAAoC,EAAE,MAAM,QAAQ,CAAC;AAC1H,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC7G,YAAY,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Json } from "./types";
|
|
2
|
+
export declare function object(value: unknown): Record<string, unknown>;
|
|
3
|
+
export declare function string(value: unknown): string | null;
|
|
4
|
+
export declare function json(value: unknown): Json;
|
|
5
|
+
/** UTF-8 size without requiring Buffer or TextEncoder in Hermes. */
|
|
6
|
+
export declare function byteLength(value: string): number;
|
|
7
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAG9D;AACD,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEpD;AACD,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAsBzC;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface NotificationDraft {
|
|
2
|
+
title: string;
|
|
3
|
+
body: string;
|
|
4
|
+
data: Record<string, unknown>;
|
|
5
|
+
silent?: boolean;
|
|
6
|
+
testId: string;
|
|
7
|
+
adapter: "expo" | "raw-apns";
|
|
8
|
+
}
|
|
9
|
+
export declare function composeSimulatorPayload(draft: NotificationDraft): string;
|
|
10
|
+
export interface PayloadValidation {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
bytes: number;
|
|
13
|
+
errors: string[];
|
|
14
|
+
warnings: string[];
|
|
15
|
+
testId: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function validateSimulatorPayload(source: unknown): PayloadValidation;
|
|
18
|
+
//# sourceMappingURL=payload.d.ts.map
|