@octane-xplat/contacts 0.19.0 → 0.20.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/README.md CHANGED
@@ -1,38 +1,5 @@
1
1
  # @octane-xplat/contacts
2
2
 
3
- Read the device address book on iOS and Android, or let someone select contacts
4
- in a browser that supports the Contact Picker API. Native apps can also edit
5
- contacts. Browser access is read-only and limited to the person's selection.
3
+ [Documentation](https://octane-xplat.goddardai.org/package-contacts).
6
4
 
7
- ## Read selected contact fields
8
-
9
- Install in an existing Xplat app:
10
-
11
- ```sh
12
- bun add @octane-xplat/contacts
13
- ```
14
-
15
- Configure the native contacts permission and usage description before running.
16
- Call this function from a **Choose contacts** action; browsers require a user
17
- action to open their picker:
18
-
19
- ```ts
20
- import { contacts } from '@octane-xplat/contacts'
21
-
22
- export async function chooseContacts() {
23
- if (!contacts.supported || (await contacts.ensure()) !== 'granted') return []
24
- return contacts.getAll({ fields: ['name', 'phoneNumbers'], sort: 'lastName' })
25
- }
26
- ```
27
-
28
- On native, the result contains matching address-book entries. In a supported
29
- browser, it contains only the contacts the person picked. Show an empty state
30
- when none are returned and distinguish denied access in your screen. Do not
31
- log contact details while testing; verify a displayed count or a test contact.
32
-
33
- ID and name lookups and writes are native-only. Android ID lookup reads the
34
- store and filters it, so avoid repeated lookups for large address books.
35
- macOS and Windows report unsupported. See the
36
- [public contract](https://github.com/octane-xplat/octane-xplat/blob/main/packages/contacts/src/types.ts)
37
- and [device capability handling](https://octane-xplat.goddardai.org/platform-services#the-shared-service-shape)
38
- for integration boundaries.
5
+ [API reference](https://octane-xplat.goddardai.org/api-contacts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octane-xplat/contacts",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Device address book for Octane xplat — contact reads and writes on iOS/Android, Contact Picker API on web",
5
5
  "keywords": [
6
6
  "android",
@@ -57,10 +57,10 @@
57
57
  "@nativescript-community/octane": "0.2.5",
58
58
  "@nativescript/core": "9.1.3",
59
59
  "@nativescript/types": "9.1.4",
60
- "@tsrx/typescript-plugin": "0.4.11",
61
60
  "octane": "0.16.3",
62
- "tsrx-typegen": "0.5.0",
63
- "typescript": "5.9.3"
61
+ "tsrx-typegen": "0.6.1",
62
+ "typescript": "7.1.0-beta",
63
+ "@tsrx/content-mapper": "0.1.2"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@nativescript-community/octane": ">=0.2.1 <1",
@@ -83,6 +83,6 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "@nativescript/contacts": "3.0.0",
86
- "@octane-xplat/platform": "0.19.0"
86
+ "@octane-xplat/platform": "0.20.0"
87
87
  }
88
88
  }