@wix/himalaya-cli 0.1591.0 → 0.1593.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.
@@ -1180,6 +1180,66 @@
1180
1180
  "jsdoc": "/** Search contacts by name (requires read permission). [] when denied/no match. */",
1181
1181
  "decl": "export async function search(query: string, limit?: number): Promise<Contact[]>;"
1182
1182
  },
1183
+ {
1184
+ "name": "ContactField",
1185
+ "kind": "interface",
1186
+ "jsdoc": "/** One labelled phone number or email address. `label` is free text (\"work\", \"mobile\"…);\n * each host maps the common ones to its native label and keeps the rest as a custom label. */",
1187
+ "decl": "export interface ContactField {\n label?: string;\n value: string;\n}"
1188
+ },
1189
+ {
1190
+ "name": "NewContact",
1191
+ "kind": "interface",
1192
+ "jsdoc": "/** A contact to create. At least one of `givenName`, `familyName` or `organization` must be\n * non-blank; every list holds at most {@link MAX_CONTACT_ENTRIES} entries. */",
1193
+ "decl": "export interface NewContact {\n givenName?: string;\n familyName?: string;\n organization?: string;\n phones?: ContactField[];\n emails?: ContactField[];\n urls?: string[];\n note?: string;\n}"
1194
+ },
1195
+ {
1196
+ "name": "MAX_CONTACT_ENTRIES",
1197
+ "kind": "const",
1198
+ "jsdoc": "/** The most entries `phones`, `emails` or `urls` may carry. */",
1199
+ "decl": "export const MAX_CONTACT_ENTRIES = 20;"
1200
+ },
1201
+ {
1202
+ "name": "ContactsErrorCode",
1203
+ "kind": "type",
1204
+ "jsdoc": "/** Why a create verb rejected. */",
1205
+ "decl": "export type ContactsErrorCode = \"invalid_contact\" | \"permission_denied\" | \"unavailable\";"
1206
+ },
1207
+ {
1208
+ "name": "ContactsError",
1209
+ "kind": "interface",
1210
+ "jsdoc": "/** A create-verb rejection: an `Error` named \"ContactsError\" carrying a stable `code`. (A plain\n * Error, not a subclass — Tier-5 bundles target an engine without class syntax.) Branch on\n * `isContactsError(e) && e.code === \"permission_denied\"`. */",
1211
+ "decl": "export interface ContactsError extends Error {\n name: \"ContactsError\";\n code: ContactsErrorCode;\n}"
1212
+ },
1213
+ {
1214
+ "name": "contactsError",
1215
+ "kind": "function",
1216
+ "jsdoc": "/** Build a coded contacts rejection. */",
1217
+ "decl": "export function contactsError(code: ContactsErrorCode, message?: string): ContactsError;"
1218
+ },
1219
+ {
1220
+ "name": "isContactsError",
1221
+ "kind": "function",
1222
+ "jsdoc": "/** Whether `e` is a coded contacts rejection. */",
1223
+ "decl": "export function isContactsError(e: unknown): e is ContactsError;"
1224
+ },
1225
+ {
1226
+ "name": "normalizeNewContact",
1227
+ "kind": "function",
1228
+ "jsdoc": "/** Validate and normalize a {@link NewContact}: strings trimmed, blank entries dropped, blank\n * fields omitted. Throws `invalid_contact` when there is no name or organization, or a list\n * holds more than {@link MAX_CONTACT_ENTRIES} entries. Every host re-checks the same rules. */",
1229
+ "decl": "export function normalizeNewContact(contact: NewContact): NewContact;"
1230
+ },
1231
+ {
1232
+ "name": "presentNewContact",
1233
+ "kind": "function",
1234
+ "jsdoc": "/** Open the OS new-contact sheet prefilled with `contact` — the recommended way to save a\n * contact: it needs NO contacts permission, because the user reviews and confirms the save.\n * Resolves `{ saved: true }` when the user saved it, `{ saved: false }` on cancel. Web\n * downloads a `.vcf` instead (and resolves `saved: true` once the download is handed off).\n * Rejects `invalid_contact` (see {@link normalizeNewContact}) or `unavailable`. */",
1235
+ "decl": "export async function presentNewContact(contact: NewContact): Promise<{ saved: boolean }>;"
1236
+ },
1237
+ {
1238
+ "name": "add",
1239
+ "kind": "function",
1240
+ "jsdoc": "/** Write `contact` straight into the address book and resolve its new `id`. Needs contacts\n * WRITE permission — ask with {@link requestPermission} first; without it this rejects\n * `permission_denied` (it never prompts). Rejects `invalid_contact`, or `unavailable` where\n * the host has no address book (web). Prefer {@link presentNewContact} unless the app already\n * holds the permission. */",
1241
+ "decl": "export async function add(contact: NewContact): Promise<{ id: string }>;"
1242
+ },
1183
1243
  {
1184
1244
  "name": "version",
1185
1245
  "kind": "const",
@@ -1472,11 +1532,71 @@
1472
1532
  "jsdoc": "/** Stat a path, or `null` if it doesn't exist (the existence check for handles). */",
1473
1533
  "decl": "export async function stat(path: string): Promise<FileStat | null>;"
1474
1534
  },
1535
+ {
1536
+ "name": "FilesErrorCode",
1537
+ "kind": "type",
1538
+ "jsdoc": "/** Stable failure codes for the v3 verbs. Branch on `FilesError.code` (see `isFilesError`), never on\n * the message text.\n * - `invalid_url` — not an absolute `https:` URL, carries userinfo, or names a\n * loopback / private-network / link-local host (checked on every\n * redirect hop; natively also on the resolved DNS records).\n * - `too_large` — the response is (or announces it will be) over `maxBytes`.\n * - `http_error` — the server answered a non-2xx status (`status` is set).\n * - `network` — the transfer failed (DNS, TLS, reset, CORS on web, …).\n * - `unavailable` — this host cannot do it: no implementation for the verb, no save\n * picker or volume reading to hand, or (`download`) the account signed\n * out mid-transfer, so the file was not kept. */",
1539
+ "decl": "export type FilesErrorCode = \"invalid_url\" | \"too_large\" | \"http_error\" | \"network\" | \"unavailable\";"
1540
+ },
1541
+ {
1542
+ "name": "FilesError",
1543
+ "kind": "interface",
1544
+ "jsdoc": "/** A v3 verb failure: an `Error` whose `code` is stable and `message` is for humans.\n * (A plain Error with fields, not a subclass — worker bundles target a syntax level\n * without `class`.) Narrow with {@link isFilesError}. */",
1545
+ "decl": "export interface FilesError extends Error {\n name: \"FilesError\";\n code: FilesErrorCode;\n status?: number;\n}"
1546
+ },
1547
+ {
1548
+ "name": "filesError",
1549
+ "kind": "function",
1550
+ "jsdoc": "/** Build a FilesError. */",
1551
+ "decl": "export function filesError(code: FilesErrorCode, message: string, status?: number): FilesError;"
1552
+ },
1553
+ {
1554
+ "name": "isFilesError",
1555
+ "kind": "function",
1556
+ "jsdoc": "/** Whether `e` is a FilesError thrown by a v3 verb. */",
1557
+ "decl": "export function isFilesError(e: unknown): e is FilesError;"
1558
+ },
1559
+ {
1560
+ "name": "DEFAULT_DOWNLOAD_MAX_BYTES",
1561
+ "kind": "const",
1562
+ "jsdoc": "/** The download cap when `maxBytes` is omitted: 100 MiB. */",
1563
+ "decl": "export const DEFAULT_DOWNLOAD_MAX_BYTES = 100 * 1024 * 1024;"
1564
+ },
1565
+ {
1566
+ "name": "MAX_DOWNLOAD_BYTES",
1567
+ "kind": "const",
1568
+ "jsdoc": "/** The hard ceiling every arm clamps `maxBytes` to: 1 GiB. */",
1569
+ "decl": "export const MAX_DOWNLOAD_BYTES = 1024 * 1024 * 1024;"
1570
+ },
1571
+ {
1572
+ "name": "download",
1573
+ "kind": "function",
1574
+ "jsdoc": "/**\n * Stream an `https:` URL straight into the sandbox and resolve with its FileHandle —\n * the same shape `write` returns. The bytes never cross the worker bridge.\n *\n * - No credentials are attached: a fresh cookie-less session, no auth provider (the\n * `presigned_upload` rule). Use it for public / pre-signed URLs.\n * - `http:`, userinfo, and loopback / private-network / link-local hosts are refused\n * (`invalid_url`); every redirect hop is re-checked before it is followed, and the\n * native arms validate the resolved DNS records too.\n * - `name` is the destination path relative to the files root (like `write`'s\n * `path`); default `downloads/<last URL path segment>`. An existing file is replaced.\n * - `maxBytes` defaults to 100 MiB (clamped to 1 GiB); over it the transfer is aborted (`too_large`) and\n * nothing is left behind.\n */",
1575
+ "decl": "export async function download(url: string, opts?: { name?: string; maxBytes?: number }): Promise<FileHandle>;"
1576
+ },
1577
+ {
1578
+ "name": "export",
1579
+ "kind": "function",
1580
+ "jsdoc": "/**\n * Let the user save a sandbox file OUTSIDE the app through the OS save picker: the\n * Files app on iOS, `NSSavePanel` on macOS, the Storage Access Framework on Android\n * (no storage permission — the user picks the folder), a download on web. Resolves\n * `{ exported: false }` when the user cancels.\n *\n * Exported as `export`, so call it as `files.export(handle)` (namespace import) or\n * `import { export as exportFile } from \"@himalaya/files\"`.\n */",
1581
+ "decl": "export async function exportFile(\n file: FileHandle | string,\n opts?: { suggestedName?: string; mimeType?: string },\n): Promise<{ exported: boolean }>;"
1582
+ },
1583
+ {
1584
+ "name": "StorageInfo",
1585
+ "kind": "interface",
1586
+ "jsdoc": "/** Storage figures, in bytes. `source` says what they measure:\n * - `\"device\"` — the device volume (iOS `volumeAvailableCapacityForImportantUsage`,\n * Android `StatFs`) and the bytes in this app's files root.\n * - `\"estimate\"` — web: the origin's `navigator.storage.estimate()` quota/usage. */",
1587
+ "decl": "export interface StorageInfo {\n freeBytes: number;\n totalBytes: number;\n appBytes: number;\n source: \"device\" | \"estimate\";\n}"
1588
+ },
1589
+ {
1590
+ "name": "storageInfo",
1591
+ "kind": "function",
1592
+ "jsdoc": "/** How much space is left before a large write, and how much this app's files use. */",
1593
+ "decl": "export async function storageInfo(): Promise<StorageInfo>;"
1594
+ },
1475
1595
  {
1476
1596
  "name": "version",
1477
1597
  "kind": "const",
1478
- "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
1479
- "decl": "export const version = 2;"
1598
+ "jsdoc": "/** Capability version, for bundles that gate on min binary version.\n * 3 — `download`, `export`, `storageInfo`. */",
1599
+ "decl": "export const version = 3;"
1480
1600
  }
1481
1601
  ]
1482
1602
  },
@@ -23,9 +23,9 @@ the SDK sources, so it matches the shipped SDKs.
23
23
  - [`calls`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalls?format=md) — Real-time 1:1 audio calls (Stage 1). 16 methods.
24
24
  - [`camera`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcamera?format=md) — Camera capability. 4 methods · returns FileHandles.
25
25
  - [`clipboard`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fclipboard?format=md) — System clipboard. 5 methods.
26
- - [`contacts`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcontacts?format=md) — Device address book. 4 methods.
26
+ - [`contacts`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcontacts?format=md) — Device address book. 6 methods.
27
27
  - [`file_picker`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffile_picker?format=md) — User-mediated document access OUTSIDE the app sandbox. 3 methods · returns FileHandles.
28
- - [`files`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffiles?format=md) — App-scoped document storage. 6 methods · returns FileHandles.
28
+ - [`files`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffiles?format=md) — App-scoped document storage. 9 methods · returns FileHandles.
29
29
  - [`godot`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fgodot?format=md) — A Godot game surface. 3 methods · not in Brandy.
30
30
  - [`haptic`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fhaptic?format=md) — Haptic capability. 3 methods.
31
31
  - [`health`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fhealth?format=md) — Platform HEALTH store. 5 methods.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1591.0",
3
+ "version": "0.1593.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -72,5 +72,5 @@
72
72
  "artifactId": "himalaya-cli"
73
73
  }
74
74
  },
75
- "falconPackageHash": "ed70c40fd8301c23d93e03720c8e7707fcb10a588229994fc447fabb"
75
+ "falconPackageHash": "fb54e208c094140390368b7d75ef82ca0bffeb791cc24cb79670e599"
76
76
  }