You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`type PhoneNumberUpdate`| Represents an individual phone number that changed within a contact delta (`previous` → `current`). |
104
109
|`type PhoneNumberChanges`| Buckets the numbers added/removed/updated in a `ContactChange`. Useful when reconciling diffs. |
105
110
|`type ContactChange`| Extends `Contact` with delta metadata (`changeType`, `isDeleted`, `phoneNumberChanges`, and an optional `previous` snapshot). |
111
+
|`type UpdatedPage`| Union returned by paging APIs (`mode`, `items`, `nextSince`, and `totalContacts` so you know the device book size). |
106
112
107
113
### Functions (promise / async)
108
114
@@ -131,12 +137,12 @@ API reference & examples
131
137
awaitcommitPersisted(nextToken);
132
138
```
133
139
134
-
-`getAll(options?: { offset?: number; limit?: number; pageSize?: number }): Promise<Contact[]>`
135
-
- Convenience wrapper for the native `getAll`. When `limit` is provided it returns that specific page. Otherwise it loops until all contacts are fetched (respecting `pageSize`, default 500).
140
+
-`getAll(): Promise<Contact[]>`
141
+
- Convenience helper that returns the full native contact list in one call.
- Same as above but the native layer provides the starting token (useful when you previously called `commitPersisted`). If the native token is missing the call yields `{ mode: 'full' }` so you can rebuild state from the full contacts list.
161
+
- Need to walk every page? Use `getUpdatedSincePaged.listen` to stream until exhaustion (return `false` from the handler to stop early). `pageSize` is optional and defaults to `300`.
- Streaming signature: `getUpdatedSincePaged.listen(handler, options?)` or `getUpdatedSincePaged.listen(options, handler)`. The handler can be async and should return `false` to stop fetching. `options` accepts `{ since?: string; offset?: number; pageSize?: number }`.
175
+
161
176
> iOS tokens:
162
177
>
163
178
> - Real change-history tokens look like long base64 strings (`YnBsaXN0MDD…`).
@@ -176,22 +191,29 @@ import { ensureContactsPermission } from './permissions'; // from snippet above
176
191
// Delta or baseline sync (falls back to full pages when native tokens are unavailable)
0 commit comments