@wix/himalaya-cli 0.850.0 → 0.851.0
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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/local-db/src/index.d.ts +23 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/secure-storage/src/index.d.ts +23 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/local-db.mjs +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/secure-storage.mjs +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +2 -2
- package/dist/cli.mjs +3466 -3274
- package/guides/mobile-ux.md +45 -32
- package/guides/sdk-reference.json +12 -0
- package/package.json +2 -2
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import type { Availability } from "@wix/himalaya/sdk-types";
|
|
2
|
+
/**
|
|
3
|
+
* Whether this host actually backs the local database — the probe #2502 asked for.
|
|
4
|
+
*
|
|
5
|
+
* Without it, every read on a host that does not serve the capability is
|
|
6
|
+
* INDISTINGUISHABLE from a successful read of an empty collection: `getAll` coalesces a
|
|
7
|
+
* missing answer to `[]` and `get` to `null` just below, so an author sees "0 rows" and
|
|
8
|
+
* cannot tell whether the store is empty or absent. That ambiguity cost three QA slots on
|
|
9
|
+
* one run; one of them shipped a whole in-memory fallback that turned out to be dead code.
|
|
10
|
+
*
|
|
11
|
+
* `full` on iOS / Android / web and in the headless `himi render` host; `degraded` where the
|
|
12
|
+
* store works but does not survive a reload (web without IndexedDB); `unavailable` when the
|
|
13
|
+
* host does not back it. Branch on this rather than inferring absence from an empty result.
|
|
14
|
+
*
|
|
15
|
+
* NEVER THROWS, like `@himalaya/pdf`'s `isAvailable`, and that is load-bearing rather than
|
|
16
|
+
* politeness: the hosts this probe exists to detect are exactly the ones that REJECT it.
|
|
17
|
+
* Both native dispatchers throw on an unregistered id (`ActionError.unknown`), so on any app
|
|
18
|
+
* binary shipped before this verb existed — or a shell that never calls
|
|
19
|
+
* `LocalDatabaseCapability.register` — a rejecting probe would put an unhandled rejection in
|
|
20
|
+
* the worker's `load()` of every author who wrote the documented
|
|
21
|
+
* `if (await availability() === "full")`. A refusal to answer IS the answer here.
|
|
22
|
+
*/
|
|
23
|
+
export declare function availability(): Promise<Availability>;
|
|
1
24
|
/** An entity row — a JSON object identified by a string `id`. */
|
|
2
25
|
export interface DbEntity {
|
|
3
26
|
id: string;
|
|
@@ -17,7 +17,7 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
17
17
|
readonly iap: readonly ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"];
|
|
18
18
|
readonly keyboard: readonly ["dismiss"];
|
|
19
19
|
readonly live_activity: readonly ["end", "start", "update"];
|
|
20
|
-
readonly local_database: readonly ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"];
|
|
20
|
+
readonly local_database: readonly ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"];
|
|
21
21
|
readonly location: readonly ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
22
22
|
readonly media_playback: readonly ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"];
|
|
23
23
|
readonly motion: readonly ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
@@ -28,7 +28,7 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
28
28
|
readonly presigned_upload: readonly ["put", "putFile"];
|
|
29
29
|
readonly push: readonly ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"];
|
|
30
30
|
readonly release_control: readonly ["active", "available", "list", "select"];
|
|
31
|
-
readonly secure_storage: readonly ["read", "remove", "write"];
|
|
31
|
+
readonly secure_storage: readonly ["availability", "read", "remove", "write"];
|
|
32
32
|
readonly share: readonly ["availability", "share"];
|
|
33
33
|
readonly speaker_diarization: readonly ["analyzeFile", "availability"];
|
|
34
34
|
readonly speech: readonly ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"];
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import type { Availability } from "@wix/himalaya/sdk-types";
|
|
2
|
+
/**
|
|
3
|
+
* Whether this host actually backs secure storage — the probe #2502 asked for.
|
|
4
|
+
*
|
|
5
|
+
* Without it, `read` on a host that does not serve the capability is INDISTINGUISHABLE
|
|
6
|
+
* from a key that was never written: both answer `null` (see `read` below, which coalesces
|
|
7
|
+
* a missing answer). An author cannot tell "unsupported here" from "genuinely empty", which
|
|
8
|
+
* is exactly what made a silent no-op look like a working-but-empty keychain.
|
|
9
|
+
*
|
|
10
|
+
* `full` on iOS (Keychain) / Android (Keystore-AES) / web and in the headless
|
|
11
|
+
* `himi render` host; `unavailable` when the host does not back it — which on web includes
|
|
12
|
+
* a context with no IndexedDB (a sandboxed iframe, a storage-blocked third-party frame),
|
|
13
|
+
* where every `read`/`write` would reject.
|
|
14
|
+
*
|
|
15
|
+
* NEVER THROWS, like `@himalaya/pdf`'s `isAvailable`, and that is load-bearing rather than
|
|
16
|
+
* politeness: the hosts this probe exists to detect are exactly the ones that REJECT it.
|
|
17
|
+
* Both native dispatchers throw on an unregistered id (`ActionError.unknown`), so on any app
|
|
18
|
+
* binary shipped before this verb existed — or a shell that never calls
|
|
19
|
+
* `SecureStorageCapability.register` — a rejecting probe would put an unhandled rejection in
|
|
20
|
+
* the worker's `load()` of every author who wrote the documented
|
|
21
|
+
* `if (await availability() === "full")`. A refusal to answer IS the answer here.
|
|
22
|
+
*/
|
|
23
|
+
export declare function availability(): Promise<Availability>;
|
|
1
24
|
export type AccessControl =
|
|
2
25
|
/** Reads only on a device that's been unlocked at least once. */
|
|
3
26
|
"after_first_unlock"
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -14,6 +14,15 @@ function dispatch(handlerId, params, _options) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// ../../core/sdk/local-db/src/index.ts
|
|
17
|
+
async function availability() {
|
|
18
|
+
try {
|
|
19
|
+
const r = await dispatch("capability.local_database.availability");
|
|
20
|
+
const a = r?.availability;
|
|
21
|
+
return a === "full" || a === "degraded" ? a : "unavailable";
|
|
22
|
+
} catch {
|
|
23
|
+
return "unavailable";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
17
26
|
async function getAll(entity) {
|
|
18
27
|
if (!entity) throw new Error("local-db.getAll: entity is required");
|
|
19
28
|
const r = await dispatch("capability.local_database.getAll", { entity });
|
|
@@ -61,6 +70,7 @@ async function drainQueue() {
|
|
|
61
70
|
}
|
|
62
71
|
var version = 2;
|
|
63
72
|
export {
|
|
73
|
+
availability,
|
|
64
74
|
count,
|
|
65
75
|
drainQueue,
|
|
66
76
|
enqueue,
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -17,7 +17,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
17
17
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
18
18
|
"keyboard": ["dismiss"],
|
|
19
19
|
"live_activity": ["end", "start", "update"],
|
|
20
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
20
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
21
21
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
22
22
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
23
23
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -28,7 +28,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
28
28
|
"presigned_upload": ["put", "putFile"],
|
|
29
29
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
30
30
|
"release_control": ["active", "available", "list", "select"],
|
|
31
|
-
"secure_storage": ["read", "remove", "write"],
|
|
31
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
32
32
|
"share": ["availability", "share"],
|
|
33
33
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
34
34
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|
|
@@ -14,6 +14,15 @@ function dispatch(handlerId, params, _options) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// ../../core/sdk/secure-storage/src/index.ts
|
|
17
|
+
async function availability() {
|
|
18
|
+
try {
|
|
19
|
+
const r = await dispatch("capability.secure_storage.availability");
|
|
20
|
+
const a = r?.availability;
|
|
21
|
+
return a === "full" || a === "degraded" ? a : "unavailable";
|
|
22
|
+
} catch {
|
|
23
|
+
return "unavailable";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
17
26
|
async function read(key) {
|
|
18
27
|
if (!key) throw new Error("secure-storage.read: key is required");
|
|
19
28
|
const result = await dispatch("capability.secure_storage.read", { key });
|
|
@@ -33,6 +42,7 @@ async function remove(key) {
|
|
|
33
42
|
}
|
|
34
43
|
var version = 1;
|
|
35
44
|
export {
|
|
45
|
+
availability,
|
|
36
46
|
read,
|
|
37
47
|
remove,
|
|
38
48
|
version,
|
|
@@ -32,7 +32,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
32
32
|
"iap": ["consume", "entitlements", "getPaywallConfig", "getProducts", "purchase", "restore"],
|
|
33
33
|
"keyboard": ["dismiss"],
|
|
34
34
|
"live_activity": ["end", "start", "update"],
|
|
35
|
-
"local_database": ["count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
35
|
+
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
36
36
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
37
37
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
38
38
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
@@ -43,7 +43,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
44
|
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
|
-
"secure_storage": ["read", "remove", "write"],
|
|
46
|
+
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
48
48
|
"speaker_diarization": ["analyzeFile", "availability"],
|
|
49
49
|
"speech": ["availability", "recognizeOnce", "speak", "stop", "streamNext", "streamStart", "streamStop", "transcribeFile"],
|