@cap-kit/people 8.0.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/CapKitPeople.podspec +20 -0
- package/LICENSE +21 -0
- package/Package.swift +28 -0
- package/README.md +1177 -0
- package/android/build.gradle +101 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/io/capkit/people/PeopleImpl.kt +1003 -0
- package/android/src/main/java/io/capkit/people/PeopleObserver.kt +80 -0
- package/android/src/main/java/io/capkit/people/PeoplePlugin.kt +766 -0
- package/android/src/main/java/io/capkit/people/config/PeopleConfig.kt +44 -0
- package/android/src/main/java/io/capkit/people/error/PeopleError.kt +90 -0
- package/android/src/main/java/io/capkit/people/error/PeopleErrorMessages.kt +39 -0
- package/android/src/main/java/io/capkit/people/logger/PeopleLogger.kt +85 -0
- package/android/src/main/java/io/capkit/people/models/ContactModels.kt +64 -0
- package/android/src/main/java/io/capkit/people/utils/PeopleUtils.kt +133 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +1449 -0
- package/dist/esm/definitions.d.ts +775 -0
- package/dist/esm/definitions.js +31 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +120 -0
- package/dist/esm/web.js +252 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs +300 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.js +303 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/PeoplePlugin/PeopleImpl.swift +463 -0
- package/ios/Sources/PeoplePlugin/PeoplePlugin.swift +627 -0
- package/ios/Sources/PeoplePlugin/PrivacyInfo.xcprivacy +13 -0
- package/ios/Sources/PeoplePlugin/Utils/PeopleUtils.swift +120 -0
- package/ios/Sources/PeoplePlugin/Version.swift +16 -0
- package/ios/Sources/PeoplePlugin/config/PeopleConfig.swift +56 -0
- package/ios/Sources/PeoplePlugin/error/PeopleError.swift +89 -0
- package/ios/Sources/PeoplePlugin/error/PeopleErrorMessages.swift +25 -0
- package/ios/Sources/PeoplePlugin/logger/PeopleLogging.swift +69 -0
- package/ios/Sources/PeoplePlugin/models/ContactModels.swift +68 -0
- package/ios/Tests/PeoplePluginTests/PeoplePluginTests.swift +10 -0
- package/package.json +119 -0
package/dist/docs.json
ADDED
|
@@ -0,0 +1,1449 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "PeoplePlugin",
|
|
4
|
+
"slug": "peopleplugin",
|
|
5
|
+
"docs": "Capacitor People plugin interface.\n* This interface defines the contract between the JavaScript layer and the\nnative implementations (Android and iOS).",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "createContact",
|
|
10
|
+
"signature": "(options: CreateContactOptions) => Promise<CreateContactResult>",
|
|
11
|
+
"parameters": [
|
|
12
|
+
{
|
|
13
|
+
"name": "options",
|
|
14
|
+
"docs": "",
|
|
15
|
+
"type": "CreateContactOptions"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"returns": "Promise<CreateContactResult>",
|
|
19
|
+
"tags": [
|
|
20
|
+
{
|
|
21
|
+
"name": "throws",
|
|
22
|
+
"text": "{PeopleError} UNAVAILABLE if the operation fails on the native side."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "example",
|
|
26
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\ntry {\nconst { contact } = await People.createContact({\ncontact: {\nname: { given: 'John', family: 'Appleseed' },\nemails: [{ address: 'john.appleseed@example.com', label: 'work' }],\n},\n});\nconsole.log('Created contact ID:', contact.id);\n} catch (error) {\nconsole.error('Failed to create contact:', error.code);\n}\n```"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "since",
|
|
30
|
+
"text": "8.0.0"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"docs": "[CRUD]\nCreates a new contact in the device's address book.\n* @throws {PeopleError} PERMISSION_DENIED if contacts permission is missing.",
|
|
34
|
+
"complexTypes": [
|
|
35
|
+
"CreateContactResult",
|
|
36
|
+
"CreateContactOptions"
|
|
37
|
+
],
|
|
38
|
+
"slug": "createcontact"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "updateContact",
|
|
42
|
+
"signature": "(options: UpdateContactOptions) => Promise<UpdateContactResult>",
|
|
43
|
+
"parameters": [
|
|
44
|
+
{
|
|
45
|
+
"name": "options",
|
|
46
|
+
"docs": "",
|
|
47
|
+
"type": "UpdateContactOptions"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"returns": "Promise<UpdateContactResult>",
|
|
51
|
+
"tags": [
|
|
52
|
+
{
|
|
53
|
+
"name": "throws",
|
|
54
|
+
"text": "{PeopleError} UNAVAILABLE if the contact is not owned by the app or not found."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "example",
|
|
58
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\ntry {\nconst { contact } = await People.updateContact({\ncontactId: 'some-contact-id',\ncontact: {\norganization: { company: 'New Company Inc.' },\n},\n});\nconsole.log('Updated contact company:', contact.organization?.company);\n} catch (error) {\nconsole.error('Update failed:', error.message);\n}\n```"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "since",
|
|
62
|
+
"text": "8.0.0"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"docs": "[CRUD]\nUpdates an existing contact using a patch-based approach.\n* @throws {PeopleError} PERMISSION_DENIED if permission is missing.",
|
|
66
|
+
"complexTypes": [
|
|
67
|
+
"UpdateContactResult",
|
|
68
|
+
"UpdateContactOptions"
|
|
69
|
+
],
|
|
70
|
+
"slug": "updatecontact"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "deleteContact",
|
|
74
|
+
"signature": "(options: DeleteContactOptions) => Promise<void>",
|
|
75
|
+
"parameters": [
|
|
76
|
+
{
|
|
77
|
+
"name": "options",
|
|
78
|
+
"docs": "",
|
|
79
|
+
"type": "DeleteContactOptions"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"returns": "Promise<void>",
|
|
83
|
+
"tags": [
|
|
84
|
+
{
|
|
85
|
+
"name": "example",
|
|
86
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nawait People.deleteContact({ contactId: 'contact-id-to-delete' });\n```"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "since",
|
|
90
|
+
"text": "8.0.0"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"docs": "[CRUD]\nDeletes a contact from the device's address book.\nOnly contacts owned by the app can be deleted.\n* @throws {PeopleError} UNAVAILABLE if deletion fails or contact is not app-owned.",
|
|
94
|
+
"complexTypes": [
|
|
95
|
+
"DeleteContactOptions"
|
|
96
|
+
],
|
|
97
|
+
"slug": "deletecontact"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "mergeContacts",
|
|
101
|
+
"signature": "(options: MergeContactsOptions) => Promise<MergeContactsResult>",
|
|
102
|
+
"parameters": [
|
|
103
|
+
{
|
|
104
|
+
"name": "options",
|
|
105
|
+
"docs": "",
|
|
106
|
+
"type": "MergeContactsOptions"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"returns": "Promise<MergeContactsResult>",
|
|
110
|
+
"tags": [
|
|
111
|
+
{
|
|
112
|
+
"name": "example",
|
|
113
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nconst { contact } = await People.mergeContacts({\nsourceContactId: 'duplicate-contact-id',\ndestinationContactId: 'main-contact-id',\n});\nconsole.log('Final contact state:', contact);\n```"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "since",
|
|
117
|
+
"text": "8.0.0"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"docs": "[CRUD]\nMerges a source contact into a destination contact.\nThe source contact is deleted after the merge.\n* @throws {PeopleError} PERMISSION_DENIED if permission is missing.",
|
|
121
|
+
"complexTypes": [
|
|
122
|
+
"MergeContactsResult",
|
|
123
|
+
"MergeContactsOptions"
|
|
124
|
+
],
|
|
125
|
+
"slug": "mergecontacts"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "listGroups",
|
|
129
|
+
"signature": "() => Promise<ListGroupsResult>",
|
|
130
|
+
"parameters": [],
|
|
131
|
+
"returns": "Promise<ListGroupsResult>",
|
|
132
|
+
"tags": [
|
|
133
|
+
{
|
|
134
|
+
"name": "example",
|
|
135
|
+
"text": "```typescript\nconst { groups } = await People.listGroups();\n```"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "since",
|
|
139
|
+
"text": "8.0.0"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"docs": "[GROUPS]\nLists all available contact groups.",
|
|
143
|
+
"complexTypes": [
|
|
144
|
+
"ListGroupsResult"
|
|
145
|
+
],
|
|
146
|
+
"slug": "listgroups"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "createGroup",
|
|
150
|
+
"signature": "(options: CreateGroupOptions) => Promise<CreateGroupResult>",
|
|
151
|
+
"parameters": [
|
|
152
|
+
{
|
|
153
|
+
"name": "options",
|
|
154
|
+
"docs": "",
|
|
155
|
+
"type": "CreateGroupOptions"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"returns": "Promise<CreateGroupResult>",
|
|
159
|
+
"tags": [
|
|
160
|
+
{
|
|
161
|
+
"name": "since",
|
|
162
|
+
"text": "8.0.0"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"docs": "[GROUPS]\nCreates a new contact group.\n* @example\n```typescript\nconst { group } = await People.createGroup({ name: 'Family' });\n```",
|
|
166
|
+
"complexTypes": [
|
|
167
|
+
"CreateGroupResult",
|
|
168
|
+
"CreateGroupOptions"
|
|
169
|
+
],
|
|
170
|
+
"slug": "creategroup"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "deleteGroup",
|
|
174
|
+
"signature": "(options: DeleteGroupOptions) => Promise<void>",
|
|
175
|
+
"parameters": [
|
|
176
|
+
{
|
|
177
|
+
"name": "options",
|
|
178
|
+
"docs": "",
|
|
179
|
+
"type": "DeleteGroupOptions"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"returns": "Promise<void>",
|
|
183
|
+
"tags": [
|
|
184
|
+
{
|
|
185
|
+
"name": "example",
|
|
186
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nawait People.deleteGroup({ groupId: 'group-id-to-delete' });\n```"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "since",
|
|
190
|
+
"text": "8.0.0"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"docs": "[GROUPS]\nDeletes a contact group.",
|
|
194
|
+
"complexTypes": [
|
|
195
|
+
"DeleteGroupOptions"
|
|
196
|
+
],
|
|
197
|
+
"slug": "deletegroup"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "addPeopleToGroup",
|
|
201
|
+
"signature": "(options: AddPeopleToGroupOptions) => Promise<void>",
|
|
202
|
+
"parameters": [
|
|
203
|
+
{
|
|
204
|
+
"name": "options",
|
|
205
|
+
"docs": "",
|
|
206
|
+
"type": "AddPeopleToGroupOptions"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"returns": "Promise<void>",
|
|
210
|
+
"tags": [
|
|
211
|
+
{
|
|
212
|
+
"name": "example",
|
|
213
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nawait People.addPeopleToGroup({\n groupId: 'group-id',\n contactIds: ['contact-id-1', 'contact-id-2'],\n});\n```"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"name": "since",
|
|
217
|
+
"text": "8.0.0"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"docs": "[GROUPS]\nAdds contacts to a group.",
|
|
221
|
+
"complexTypes": [
|
|
222
|
+
"AddPeopleToGroupOptions"
|
|
223
|
+
],
|
|
224
|
+
"slug": "addpeopletogroup"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "removePeopleFromGroup",
|
|
228
|
+
"signature": "(options: RemovePeopleFromGroupOptions) => Promise<void>",
|
|
229
|
+
"parameters": [
|
|
230
|
+
{
|
|
231
|
+
"name": "options",
|
|
232
|
+
"docs": "",
|
|
233
|
+
"type": "RemovePeopleFromGroupOptions"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"returns": "Promise<void>",
|
|
237
|
+
"tags": [
|
|
238
|
+
{
|
|
239
|
+
"name": "example",
|
|
240
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nawait People.removePeopleFromGroup({\n groupId: 'group-id',\n contactIds: ['contact-id-1'],\n});\n```"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "since",
|
|
244
|
+
"text": "8.0.0"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"docs": "[GROUPS]\nRemoves contacts from a group.",
|
|
248
|
+
"complexTypes": [
|
|
249
|
+
"RemovePeopleFromGroupOptions"
|
|
250
|
+
],
|
|
251
|
+
"slug": "removepeoplefromgroup"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "checkPermissions",
|
|
255
|
+
"signature": "() => Promise<PeoplePluginPermissions>",
|
|
256
|
+
"parameters": [],
|
|
257
|
+
"returns": "Promise<PeoplePluginPermissions>",
|
|
258
|
+
"tags": [
|
|
259
|
+
{
|
|
260
|
+
"name": "returns",
|
|
261
|
+
"text": "A promise resolving to the current permission states."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "example",
|
|
265
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\nconst permissions = await People.checkPermissions();\nconsole.log(permissions.contacts); // Output: 'granted' | 'denied' | 'prompt'\n```"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "since",
|
|
269
|
+
"text": "8.0.0"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"docs": "Check the status of permissions.",
|
|
273
|
+
"complexTypes": [
|
|
274
|
+
"PeoplePluginPermissions"
|
|
275
|
+
],
|
|
276
|
+
"slug": "checkpermissions"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "requestPermissions",
|
|
280
|
+
"signature": "(permissions?: { permissions: 'contacts'[]; } | undefined) => Promise<PeoplePluginPermissions>",
|
|
281
|
+
"parameters": [
|
|
282
|
+
{
|
|
283
|
+
"name": "permissions",
|
|
284
|
+
"docs": "- An optional object specifying which permissions to request.\nIf not provided, all permissions defined in the plugin will be requested.",
|
|
285
|
+
"type": "{ permissions: 'contacts'[]; } | undefined"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"returns": "Promise<PeoplePluginPermissions>",
|
|
289
|
+
"tags": [
|
|
290
|
+
{
|
|
291
|
+
"name": "param",
|
|
292
|
+
"text": "permissions - An optional object specifying which permissions to request.\nIf not provided, all permissions defined in the plugin will be requested."
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "returns",
|
|
296
|
+
"text": "A promise resolving to the updated permission states."
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "example",
|
|
300
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\nconst permissions = await People.requestPermissions();\n// OR\n// const permissions = await People.requestPermissions({ permissions: ['contacts'] });\nconsole.log(permissions.contacts); // Output: 'granted' | 'denied'\n```"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "since",
|
|
304
|
+
"text": "8.0.0"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"docs": "Request permissions.",
|
|
308
|
+
"complexTypes": [
|
|
309
|
+
"PeoplePluginPermissions"
|
|
310
|
+
],
|
|
311
|
+
"slug": "requestpermissions"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "pickContact",
|
|
315
|
+
"signature": "(options?: { projection?: PeopleProjection[] | undefined; } | undefined) => Promise<PickContactResult>",
|
|
316
|
+
"parameters": [
|
|
317
|
+
{
|
|
318
|
+
"name": "options",
|
|
319
|
+
"docs": "",
|
|
320
|
+
"type": "{ projection?: PeopleProjection[] | undefined; } | undefined"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"returns": "Promise<PickContactResult>",
|
|
324
|
+
"tags": [
|
|
325
|
+
{
|
|
326
|
+
"name": "throws",
|
|
327
|
+
"text": "{PeopleError} CANCELLED if the user cancels or the picker fails."
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "example",
|
|
331
|
+
"text": "```typescript\ntry {\nconst { contact } = await People.pickContact({\nprojection: ['name', 'phones', 'emails']\n});\nconsole.log('User selected:', contact);\n} catch (error) {\nif (error.code === 'CANCELLED') {\nconsole.log('User cancelled the picker.');\n}\n}\n```"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "since",
|
|
335
|
+
"text": "8.0.0"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"docs": "[ZERO-PERMISSION]\nLaunches the native OS contact picker UI.\nThis method does NOT require any entries in AndroidManifest.xml or Info.plist\nas the user explicitly selects the data via the system UI.",
|
|
339
|
+
"complexTypes": [
|
|
340
|
+
"PickContactResult",
|
|
341
|
+
"PeopleProjection"
|
|
342
|
+
],
|
|
343
|
+
"slug": "pickcontact"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "getContacts",
|
|
347
|
+
"signature": "(options?: GetContactsOptions | undefined) => Promise<GetContactsResult>",
|
|
348
|
+
"parameters": [
|
|
349
|
+
{
|
|
350
|
+
"name": "options",
|
|
351
|
+
"docs": "",
|
|
352
|
+
"type": "GetContactsOptions | undefined"
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"returns": "Promise<GetContactsResult>",
|
|
356
|
+
"tags": [
|
|
357
|
+
{
|
|
358
|
+
"name": "example",
|
|
359
|
+
"text": "```typescript\nconst result = await People.getContacts({\nprojection: ['name', 'phones'],\nlimit: 20,\noffset: 0\n});\n```"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "since",
|
|
363
|
+
"text": "8.0.0"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"docs": "[SYSTEMIC-ACCESS]\nQueries the entire contact database with specific projection and pagination.\nREQUIRES 'contacts' permission.\nUse `includeTotal` only when needed: computing `totalCount` may require scanning/counting across the full contacts set and can be expensive on large address books. Default is `false`.",
|
|
367
|
+
"complexTypes": [
|
|
368
|
+
"GetContactsResult",
|
|
369
|
+
"GetContactsOptions"
|
|
370
|
+
],
|
|
371
|
+
"slug": "getcontacts"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "getContact",
|
|
375
|
+
"signature": "(options: { id: string; projection?: PeopleProjection[]; }) => Promise<{ contact: UnifiedContact; }>",
|
|
376
|
+
"parameters": [
|
|
377
|
+
{
|
|
378
|
+
"name": "options",
|
|
379
|
+
"docs": "",
|
|
380
|
+
"type": "{ id: string; projection?: PeopleProjection[] | undefined; }"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"returns": "Promise<{ contact: UnifiedContact; }>",
|
|
384
|
+
"tags": [
|
|
385
|
+
{
|
|
386
|
+
"name": "example",
|
|
387
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nconst { contact } = await People.getContact({ id: 'contact-id', projection: ['name', 'emails'] });\nconsole.log('Contact details:', contact);\n```"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "since",
|
|
391
|
+
"text": "8.0.0"
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
"docs": "Retrieves a single contact by ID.\n* @throws {PeopleError} UNAVAILABLE if contact is not found.",
|
|
395
|
+
"complexTypes": [
|
|
396
|
+
"UnifiedContact",
|
|
397
|
+
"PeopleProjection"
|
|
398
|
+
],
|
|
399
|
+
"slug": "getcontact"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "getCapabilities",
|
|
403
|
+
"signature": "() => Promise<PeopleCapabilities>",
|
|
404
|
+
"parameters": [],
|
|
405
|
+
"returns": "Promise<PeopleCapabilities>",
|
|
406
|
+
"tags": [
|
|
407
|
+
{
|
|
408
|
+
"name": "example",
|
|
409
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nconst capabilities = await People.getCapabilities();\nconsole.log('Can Read Contacts:', capabilities.canRead);\nconsole.log('Can Write Contacts:', capabilities.canWrite);\n```"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "since",
|
|
413
|
+
"text": "8.0.0"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"docs": "Returns what this device/implementation is capable of.\nUseful for UI adaptation (e.g. hiding \"Edit\" buttons).",
|
|
417
|
+
"complexTypes": [
|
|
418
|
+
"PeopleCapabilities"
|
|
419
|
+
],
|
|
420
|
+
"slug": "getcapabilities"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "getPluginVersion",
|
|
424
|
+
"signature": "() => Promise<PluginVersionResult>",
|
|
425
|
+
"parameters": [],
|
|
426
|
+
"returns": "Promise<PluginVersionResult>",
|
|
427
|
+
"tags": [
|
|
428
|
+
{
|
|
429
|
+
"name": "returns",
|
|
430
|
+
"text": "A promise resolving to the plugin version."
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"name": "example",
|
|
434
|
+
"text": "```ts\nconst { version } = await People.getPluginVersion();\n```"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "since",
|
|
438
|
+
"text": "8.0.0"
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"docs": "Returns the native plugin version.\n\nThe returned version corresponds to the native implementation\nbundled with the application.",
|
|
442
|
+
"complexTypes": [
|
|
443
|
+
"PluginVersionResult"
|
|
444
|
+
],
|
|
445
|
+
"slug": "getpluginversion"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "searchPeople",
|
|
449
|
+
"signature": "(options: { query: string; projection?: PeopleProjection[]; limit?: number; }) => Promise<GetContactsResult>",
|
|
450
|
+
"parameters": [
|
|
451
|
+
{
|
|
452
|
+
"name": "options",
|
|
453
|
+
"docs": "",
|
|
454
|
+
"type": "{ query: string; projection?: PeopleProjection[] | undefined; limit?: number | undefined; }"
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"returns": "Promise<GetContactsResult>",
|
|
458
|
+
"tags": [
|
|
459
|
+
{
|
|
460
|
+
"name": "example",
|
|
461
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nconst result = await People.searchPeople({ query: 'John', projection: ['name', 'phones'], limit: 10 });\nconsole.log('Fetched contacts:', result.contacts);\n```"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "since",
|
|
465
|
+
"text": "8.0.0"
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"docs": "[SYSTEMIC-ACCESS]\nSearches the database with projection.\nREQUIRES 'contacts' permission.",
|
|
469
|
+
"complexTypes": [
|
|
470
|
+
"GetContactsResult",
|
|
471
|
+
"PeopleProjection"
|
|
472
|
+
],
|
|
473
|
+
"slug": "searchpeople"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "addListener",
|
|
477
|
+
"signature": "(eventName: 'peopleChange', listenerFunc: (payload: PeopleChangeEvent) => void) => Promise<PluginListenerHandle>",
|
|
478
|
+
"parameters": [
|
|
479
|
+
{
|
|
480
|
+
"name": "eventName",
|
|
481
|
+
"docs": "",
|
|
482
|
+
"type": "'peopleChange'"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"name": "listenerFunc",
|
|
486
|
+
"docs": "",
|
|
487
|
+
"type": "(payload: PeopleChangeEvent) => void"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"returns": "Promise<PluginListenerHandle>",
|
|
491
|
+
"tags": [
|
|
492
|
+
{
|
|
493
|
+
"name": "example",
|
|
494
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nconst handle = await People.addListener('peopleChange', (event) => {\n console.log('People change detected:', event.type);\n});\n\n// To remove the listener later:\n// await handle.remove();\n```"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "since",
|
|
498
|
+
"text": "8.0.0"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"docs": "Listen for changes in the system address book.\nREQUIRES 'contacts' permission.\n* @returns A promise that resolves to a handle to remove the listener.",
|
|
502
|
+
"complexTypes": [
|
|
503
|
+
"PluginListenerHandle",
|
|
504
|
+
"PeopleChangeEvent"
|
|
505
|
+
],
|
|
506
|
+
"slug": "addlistenerpeoplechange-"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "addListener",
|
|
510
|
+
"signature": "(eventName: string, listenerFunc: (...args: unknown[]) => void) => Promise<PluginListenerHandle>",
|
|
511
|
+
"parameters": [
|
|
512
|
+
{
|
|
513
|
+
"name": "eventName",
|
|
514
|
+
"docs": "",
|
|
515
|
+
"type": "string"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "listenerFunc",
|
|
519
|
+
"docs": "",
|
|
520
|
+
"type": "(...args: unknown[]) => void"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
"returns": "Promise<PluginListenerHandle>",
|
|
524
|
+
"tags": [
|
|
525
|
+
{
|
|
526
|
+
"name": "since",
|
|
527
|
+
"text": "8.0.0"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"docs": "Registers a listener for plugin events using a generic event name.\n\nPrefer the typed `peopleChange` overload for full payload type safety.",
|
|
531
|
+
"complexTypes": [
|
|
532
|
+
"PluginListenerHandle"
|
|
533
|
+
],
|
|
534
|
+
"slug": "addlistenerstring-"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "removeAllListeners",
|
|
538
|
+
"signature": "() => Promise<void>",
|
|
539
|
+
"parameters": [],
|
|
540
|
+
"returns": "Promise<void>",
|
|
541
|
+
"tags": [
|
|
542
|
+
{
|
|
543
|
+
"name": "returns",
|
|
544
|
+
"text": "Promise that resolves when all listeners have been removed."
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "example",
|
|
548
|
+
"text": "```typescript\nimport { People } from '@cap-kit/people';\n\nawait People.removeAllListeners();\n```"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"name": "since",
|
|
552
|
+
"text": "8.0.0"
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
"docs": "Removes all registered listeners for this plugin.",
|
|
556
|
+
"complexTypes": [],
|
|
557
|
+
"slug": "removealllisteners"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"properties": []
|
|
561
|
+
},
|
|
562
|
+
"interfaces": [
|
|
563
|
+
{
|
|
564
|
+
"name": "CreateContactResult",
|
|
565
|
+
"slug": "createcontactresult",
|
|
566
|
+
"docs": "Result returned by `createContact`.",
|
|
567
|
+
"tags": [
|
|
568
|
+
{
|
|
569
|
+
"text": "8.0.0",
|
|
570
|
+
"name": "since"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"methods": [],
|
|
574
|
+
"properties": [
|
|
575
|
+
{
|
|
576
|
+
"name": "contact",
|
|
577
|
+
"tags": [],
|
|
578
|
+
"docs": "The full contact object as it was saved, including its new unique ID.",
|
|
579
|
+
"complexTypes": [
|
|
580
|
+
"UnifiedContact"
|
|
581
|
+
],
|
|
582
|
+
"type": "UnifiedContact"
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "UnifiedContact",
|
|
588
|
+
"slug": "unifiedcontact",
|
|
589
|
+
"docs": "Represents a Unified Person in the directory.\nMaps to CNContact (iOS) and Aggregated Contact (Android).",
|
|
590
|
+
"tags": [],
|
|
591
|
+
"methods": [],
|
|
592
|
+
"properties": [
|
|
593
|
+
{
|
|
594
|
+
"name": "id",
|
|
595
|
+
"tags": [],
|
|
596
|
+
"docs": "The platform-specific unique identifier (UUID or Long)",
|
|
597
|
+
"complexTypes": [],
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "name",
|
|
602
|
+
"tags": [],
|
|
603
|
+
"docs": "The unified display name",
|
|
604
|
+
"complexTypes": [],
|
|
605
|
+
"type": "{ display: string; given?: string | undefined; middle?: string | undefined; family?: string | undefined; prefix?: string | undefined; suffix?: string | undefined; } | undefined"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "organization",
|
|
609
|
+
"tags": [],
|
|
610
|
+
"docs": "",
|
|
611
|
+
"complexTypes": [],
|
|
612
|
+
"type": "{ company?: string | undefined; title?: string | undefined; department?: string | undefined; } | undefined"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "birthday",
|
|
616
|
+
"tags": [],
|
|
617
|
+
"docs": "",
|
|
618
|
+
"complexTypes": [],
|
|
619
|
+
"type": "{ year?: number | undefined; month: number; day: number; } | undefined"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "phones",
|
|
623
|
+
"tags": [],
|
|
624
|
+
"docs": "",
|
|
625
|
+
"complexTypes": [
|
|
626
|
+
"PhoneNumber"
|
|
627
|
+
],
|
|
628
|
+
"type": "PhoneNumber[] | undefined"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "emails",
|
|
632
|
+
"tags": [],
|
|
633
|
+
"docs": "",
|
|
634
|
+
"complexTypes": [
|
|
635
|
+
"EmailAddress"
|
|
636
|
+
],
|
|
637
|
+
"type": "EmailAddress[] | undefined"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "addresses",
|
|
641
|
+
"tags": [],
|
|
642
|
+
"docs": "",
|
|
643
|
+
"complexTypes": [
|
|
644
|
+
"PostalAddress"
|
|
645
|
+
],
|
|
646
|
+
"type": "PostalAddress[] | undefined"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"name": "urls",
|
|
650
|
+
"tags": [],
|
|
651
|
+
"docs": "",
|
|
652
|
+
"complexTypes": [],
|
|
653
|
+
"type": "string[] | undefined"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"name": "note",
|
|
657
|
+
"tags": [],
|
|
658
|
+
"docs": "",
|
|
659
|
+
"complexTypes": [],
|
|
660
|
+
"type": "string | undefined"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "image",
|
|
664
|
+
"tags": [],
|
|
665
|
+
"docs": "Base64 thumbnail string (iOS only, only if projected).",
|
|
666
|
+
"complexTypes": [],
|
|
667
|
+
"type": "string | undefined"
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "PhoneNumber",
|
|
673
|
+
"slug": "phonenumber",
|
|
674
|
+
"docs": "Phone number representation.",
|
|
675
|
+
"tags": [],
|
|
676
|
+
"methods": [],
|
|
677
|
+
"properties": [
|
|
678
|
+
{
|
|
679
|
+
"name": "label",
|
|
680
|
+
"tags": [],
|
|
681
|
+
"docs": "Normalized label (e.g., 'mobile', 'home', 'work')",
|
|
682
|
+
"complexTypes": [],
|
|
683
|
+
"type": "string | undefined"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "number",
|
|
687
|
+
"tags": [],
|
|
688
|
+
"docs": "The raw input string",
|
|
689
|
+
"complexTypes": [],
|
|
690
|
+
"type": "string"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "normalized",
|
|
694
|
+
"tags": [],
|
|
695
|
+
"docs": "E.164 formatted number (if parsing succeeded)",
|
|
696
|
+
"complexTypes": [],
|
|
697
|
+
"type": "string | undefined"
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "EmailAddress",
|
|
703
|
+
"slug": "emailaddress",
|
|
704
|
+
"docs": "Email address representation.",
|
|
705
|
+
"tags": [],
|
|
706
|
+
"methods": [],
|
|
707
|
+
"properties": [
|
|
708
|
+
{
|
|
709
|
+
"name": "label",
|
|
710
|
+
"tags": [],
|
|
711
|
+
"docs": "",
|
|
712
|
+
"complexTypes": [],
|
|
713
|
+
"type": "string | undefined"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"name": "address",
|
|
717
|
+
"tags": [],
|
|
718
|
+
"docs": "",
|
|
719
|
+
"complexTypes": [],
|
|
720
|
+
"type": "string"
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"name": "PostalAddress",
|
|
726
|
+
"slug": "postaladdress",
|
|
727
|
+
"docs": "Postal address representation.",
|
|
728
|
+
"tags": [],
|
|
729
|
+
"methods": [],
|
|
730
|
+
"properties": [
|
|
731
|
+
{
|
|
732
|
+
"name": "label",
|
|
733
|
+
"tags": [],
|
|
734
|
+
"docs": "",
|
|
735
|
+
"complexTypes": [],
|
|
736
|
+
"type": "string | undefined"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "formatted",
|
|
740
|
+
"tags": [],
|
|
741
|
+
"docs": "",
|
|
742
|
+
"complexTypes": [],
|
|
743
|
+
"type": "string | undefined"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "street",
|
|
747
|
+
"tags": [],
|
|
748
|
+
"docs": "",
|
|
749
|
+
"complexTypes": [],
|
|
750
|
+
"type": "string | undefined"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "city",
|
|
754
|
+
"tags": [],
|
|
755
|
+
"docs": "",
|
|
756
|
+
"complexTypes": [],
|
|
757
|
+
"type": "string | undefined"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "region",
|
|
761
|
+
"tags": [],
|
|
762
|
+
"docs": "",
|
|
763
|
+
"complexTypes": [],
|
|
764
|
+
"type": "string | undefined"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "postcode",
|
|
768
|
+
"tags": [],
|
|
769
|
+
"docs": "",
|
|
770
|
+
"complexTypes": [],
|
|
771
|
+
"type": "string | undefined"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "country",
|
|
775
|
+
"tags": [],
|
|
776
|
+
"docs": "",
|
|
777
|
+
"complexTypes": [],
|
|
778
|
+
"type": "string | undefined"
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "CreateContactOptions",
|
|
784
|
+
"slug": "createcontactoptions",
|
|
785
|
+
"docs": "Options for creating a new contact.\nThe contact data is provided as a partial UnifiedContact.",
|
|
786
|
+
"tags": [
|
|
787
|
+
{
|
|
788
|
+
"text": "8.0.0",
|
|
789
|
+
"name": "since"
|
|
790
|
+
}
|
|
791
|
+
],
|
|
792
|
+
"methods": [],
|
|
793
|
+
"properties": [
|
|
794
|
+
{
|
|
795
|
+
"name": "contact",
|
|
796
|
+
"tags": [],
|
|
797
|
+
"docs": "The contact data to be saved.\nAt least one writable field (e.g., name, email) must be provided.",
|
|
798
|
+
"complexTypes": [
|
|
799
|
+
"Partial",
|
|
800
|
+
"Omit",
|
|
801
|
+
"UnifiedContact"
|
|
802
|
+
],
|
|
803
|
+
"type": "Partial<Omit<UnifiedContact, 'id'>>"
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "UpdateContactResult",
|
|
809
|
+
"slug": "updatecontactresult",
|
|
810
|
+
"docs": "Result returned by `updateContact`.",
|
|
811
|
+
"tags": [
|
|
812
|
+
{
|
|
813
|
+
"text": "8.0.0",
|
|
814
|
+
"name": "since"
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"methods": [],
|
|
818
|
+
"properties": [
|
|
819
|
+
{
|
|
820
|
+
"name": "contact",
|
|
821
|
+
"tags": [],
|
|
822
|
+
"docs": "The full contact object after the update has been applied.",
|
|
823
|
+
"complexTypes": [
|
|
824
|
+
"UnifiedContact"
|
|
825
|
+
],
|
|
826
|
+
"type": "UnifiedContact"
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"name": "UpdateContactOptions",
|
|
832
|
+
"slug": "updatecontactoptions",
|
|
833
|
+
"docs": "Options for updating an existing contact.\nThis operation performs a patch, not a full replacement.",
|
|
834
|
+
"tags": [
|
|
835
|
+
{
|
|
836
|
+
"text": "8.0.0",
|
|
837
|
+
"name": "since"
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"methods": [],
|
|
841
|
+
"properties": [
|
|
842
|
+
{
|
|
843
|
+
"name": "contactId",
|
|
844
|
+
"tags": [],
|
|
845
|
+
"docs": "The unique identifier of the contact to update.",
|
|
846
|
+
"complexTypes": [],
|
|
847
|
+
"type": "string"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "contact",
|
|
851
|
+
"tags": [],
|
|
852
|
+
"docs": "An object containing the fields to be updated.\nOnly the provided fields will be modified.",
|
|
853
|
+
"complexTypes": [
|
|
854
|
+
"Partial",
|
|
855
|
+
"Omit",
|
|
856
|
+
"UnifiedContact"
|
|
857
|
+
],
|
|
858
|
+
"type": "Partial<Omit<UnifiedContact, 'id'>>"
|
|
859
|
+
}
|
|
860
|
+
]
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "DeleteContactOptions",
|
|
864
|
+
"slug": "deletecontactoptions",
|
|
865
|
+
"docs": "Options for deleting a contact.",
|
|
866
|
+
"tags": [
|
|
867
|
+
{
|
|
868
|
+
"text": "8.0.0",
|
|
869
|
+
"name": "since"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"methods": [],
|
|
873
|
+
"properties": [
|
|
874
|
+
{
|
|
875
|
+
"name": "contactId",
|
|
876
|
+
"tags": [],
|
|
877
|
+
"docs": "The unique identifier of the contact to delete.",
|
|
878
|
+
"complexTypes": [],
|
|
879
|
+
"type": "string"
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "MergeContactsResult",
|
|
885
|
+
"slug": "mergecontactsresult",
|
|
886
|
+
"docs": "Result returned by `mergeContacts`.",
|
|
887
|
+
"tags": [
|
|
888
|
+
{
|
|
889
|
+
"text": "8.0.0",
|
|
890
|
+
"name": "since"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"methods": [],
|
|
894
|
+
"properties": [
|
|
895
|
+
{
|
|
896
|
+
"name": "contact",
|
|
897
|
+
"tags": [],
|
|
898
|
+
"docs": "The state of the destination contact after the merge.",
|
|
899
|
+
"complexTypes": [
|
|
900
|
+
"UnifiedContact"
|
|
901
|
+
],
|
|
902
|
+
"type": "UnifiedContact"
|
|
903
|
+
}
|
|
904
|
+
]
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "MergeContactsOptions",
|
|
908
|
+
"slug": "mergecontactsoptions",
|
|
909
|
+
"docs": "Options for merging two contacts.",
|
|
910
|
+
"tags": [
|
|
911
|
+
{
|
|
912
|
+
"text": "8.0.0",
|
|
913
|
+
"name": "since"
|
|
914
|
+
}
|
|
915
|
+
],
|
|
916
|
+
"methods": [],
|
|
917
|
+
"properties": [
|
|
918
|
+
{
|
|
919
|
+
"name": "sourceContactId",
|
|
920
|
+
"tags": [],
|
|
921
|
+
"docs": "The identifier of the contact that will be subsumed and deleted.",
|
|
922
|
+
"complexTypes": [],
|
|
923
|
+
"type": "string"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "destinationContactId",
|
|
927
|
+
"tags": [],
|
|
928
|
+
"docs": "The identifier of the contact that will be kept and updated.",
|
|
929
|
+
"complexTypes": [],
|
|
930
|
+
"type": "string"
|
|
931
|
+
}
|
|
932
|
+
]
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "ListGroupsResult",
|
|
936
|
+
"slug": "listgroupsresult",
|
|
937
|
+
"docs": "Result returned by `listGroups`.",
|
|
938
|
+
"tags": [
|
|
939
|
+
{
|
|
940
|
+
"text": "8.0.0",
|
|
941
|
+
"name": "since"
|
|
942
|
+
}
|
|
943
|
+
],
|
|
944
|
+
"methods": [],
|
|
945
|
+
"properties": [
|
|
946
|
+
{
|
|
947
|
+
"name": "groups",
|
|
948
|
+
"tags": [],
|
|
949
|
+
"docs": "An array of groups found in the address book.",
|
|
950
|
+
"complexTypes": [
|
|
951
|
+
"Group"
|
|
952
|
+
],
|
|
953
|
+
"type": "Group[]"
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "Group",
|
|
959
|
+
"slug": "group",
|
|
960
|
+
"docs": "Represents a group in the address book.\nA group can be system-generated (e.g., \"All Contacts\") or user-created.",
|
|
961
|
+
"tags": [
|
|
962
|
+
{
|
|
963
|
+
"text": "8.0.0",
|
|
964
|
+
"name": "since"
|
|
965
|
+
}
|
|
966
|
+
],
|
|
967
|
+
"methods": [],
|
|
968
|
+
"properties": [
|
|
969
|
+
{
|
|
970
|
+
"name": "id",
|
|
971
|
+
"tags": [],
|
|
972
|
+
"docs": "A unique identifier for the group.\nThis ID is stable and can be used for subsequent operations.",
|
|
973
|
+
"complexTypes": [],
|
|
974
|
+
"type": "string"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "name",
|
|
978
|
+
"tags": [],
|
|
979
|
+
"docs": "The display name of the group.\ne.g., \"Family\", \"Work\", \"Book Club\"",
|
|
980
|
+
"complexTypes": [],
|
|
981
|
+
"type": "string"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "source",
|
|
985
|
+
"tags": [],
|
|
986
|
+
"docs": "The source or account where the group originates.\nOn iOS, this could be \"iCloud\" or \"Local\". On Android, this corresponds to the account name (e.g., \"user@gmail.com\").\nFor logical groups, this will be 'local'.",
|
|
987
|
+
"complexTypes": [],
|
|
988
|
+
"type": "string | undefined"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"name": "readOnly",
|
|
992
|
+
"tags": [],
|
|
993
|
+
"docs": "Indicates if the group is read-only.\nSystem groups are typically read-only and cannot be deleted or renamed.",
|
|
994
|
+
"complexTypes": [],
|
|
995
|
+
"type": "boolean"
|
|
996
|
+
}
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "CreateGroupResult",
|
|
1001
|
+
"slug": "creategroupresult",
|
|
1002
|
+
"docs": "Result returned by `createGroup`.",
|
|
1003
|
+
"tags": [
|
|
1004
|
+
{
|
|
1005
|
+
"text": "8.0.0",
|
|
1006
|
+
"name": "since"
|
|
1007
|
+
}
|
|
1008
|
+
],
|
|
1009
|
+
"methods": [],
|
|
1010
|
+
"properties": [
|
|
1011
|
+
{
|
|
1012
|
+
"name": "group",
|
|
1013
|
+
"tags": [],
|
|
1014
|
+
"docs": "The newly created group.",
|
|
1015
|
+
"complexTypes": [
|
|
1016
|
+
"Group"
|
|
1017
|
+
],
|
|
1018
|
+
"type": "Group"
|
|
1019
|
+
}
|
|
1020
|
+
]
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "CreateGroupOptions",
|
|
1024
|
+
"slug": "creategroupoptions",
|
|
1025
|
+
"docs": "Options for creating a new group.",
|
|
1026
|
+
"tags": [
|
|
1027
|
+
{
|
|
1028
|
+
"text": "8.0.0",
|
|
1029
|
+
"name": "since"
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"methods": [],
|
|
1033
|
+
"properties": [
|
|
1034
|
+
{
|
|
1035
|
+
"name": "name",
|
|
1036
|
+
"tags": [],
|
|
1037
|
+
"docs": "The name for the new group.",
|
|
1038
|
+
"complexTypes": [],
|
|
1039
|
+
"type": "string"
|
|
1040
|
+
}
|
|
1041
|
+
]
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"name": "DeleteGroupOptions",
|
|
1045
|
+
"slug": "deletegroupoptions",
|
|
1046
|
+
"docs": "Options for deleting a group.",
|
|
1047
|
+
"tags": [
|
|
1048
|
+
{
|
|
1049
|
+
"text": "8.0.0",
|
|
1050
|
+
"name": "since"
|
|
1051
|
+
}
|
|
1052
|
+
],
|
|
1053
|
+
"methods": [],
|
|
1054
|
+
"properties": [
|
|
1055
|
+
{
|
|
1056
|
+
"name": "groupId",
|
|
1057
|
+
"tags": [],
|
|
1058
|
+
"docs": "The unique identifier of the group to delete.",
|
|
1059
|
+
"complexTypes": [],
|
|
1060
|
+
"type": "string"
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"name": "AddPeopleToGroupOptions",
|
|
1066
|
+
"slug": "addpeopletogroupoptions",
|
|
1067
|
+
"docs": "Options for adding people to a group.",
|
|
1068
|
+
"tags": [
|
|
1069
|
+
{
|
|
1070
|
+
"text": "8.0.0",
|
|
1071
|
+
"name": "since"
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
"methods": [],
|
|
1075
|
+
"properties": [
|
|
1076
|
+
{
|
|
1077
|
+
"name": "groupId",
|
|
1078
|
+
"tags": [],
|
|
1079
|
+
"docs": "The unique identifier of the group.",
|
|
1080
|
+
"complexTypes": [],
|
|
1081
|
+
"type": "string"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"name": "contactIds",
|
|
1085
|
+
"tags": [],
|
|
1086
|
+
"docs": "An array of contact identifiers to add to the group.",
|
|
1087
|
+
"complexTypes": [],
|
|
1088
|
+
"type": "string[]"
|
|
1089
|
+
}
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"name": "RemovePeopleFromGroupOptions",
|
|
1094
|
+
"slug": "removepeoplefromgroupoptions",
|
|
1095
|
+
"docs": "Options for removing people from a group.",
|
|
1096
|
+
"tags": [
|
|
1097
|
+
{
|
|
1098
|
+
"text": "8.0.0",
|
|
1099
|
+
"name": "since"
|
|
1100
|
+
}
|
|
1101
|
+
],
|
|
1102
|
+
"methods": [],
|
|
1103
|
+
"properties": [
|
|
1104
|
+
{
|
|
1105
|
+
"name": "groupId",
|
|
1106
|
+
"tags": [],
|
|
1107
|
+
"docs": "The unique identifier of the group.",
|
|
1108
|
+
"complexTypes": [],
|
|
1109
|
+
"type": "string"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"name": "contactIds",
|
|
1113
|
+
"tags": [],
|
|
1114
|
+
"docs": "An array of contact identifiers to remove from the group.",
|
|
1115
|
+
"complexTypes": [],
|
|
1116
|
+
"type": "string[]"
|
|
1117
|
+
}
|
|
1118
|
+
]
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"name": "PeoplePluginPermissions",
|
|
1122
|
+
"slug": "peoplepluginpermissions",
|
|
1123
|
+
"docs": "Permissions status interface.",
|
|
1124
|
+
"tags": [],
|
|
1125
|
+
"methods": [],
|
|
1126
|
+
"properties": [
|
|
1127
|
+
{
|
|
1128
|
+
"name": "contacts",
|
|
1129
|
+
"tags": [],
|
|
1130
|
+
"docs": "",
|
|
1131
|
+
"complexTypes": [
|
|
1132
|
+
"PermissionState"
|
|
1133
|
+
],
|
|
1134
|
+
"type": "PermissionState"
|
|
1135
|
+
}
|
|
1136
|
+
]
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"name": "PickContactResult",
|
|
1140
|
+
"slug": "pickcontactresult",
|
|
1141
|
+
"docs": "Result returned by pickContact().\nNow strictly returns the contact object on success.",
|
|
1142
|
+
"tags": [],
|
|
1143
|
+
"methods": [],
|
|
1144
|
+
"properties": [
|
|
1145
|
+
{
|
|
1146
|
+
"name": "contact",
|
|
1147
|
+
"tags": [],
|
|
1148
|
+
"docs": "",
|
|
1149
|
+
"complexTypes": [
|
|
1150
|
+
"UnifiedContact"
|
|
1151
|
+
],
|
|
1152
|
+
"type": "UnifiedContact"
|
|
1153
|
+
}
|
|
1154
|
+
]
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"name": "GetContactsResult",
|
|
1158
|
+
"slug": "getcontactsresult",
|
|
1159
|
+
"docs": "Result returned by getContacts().",
|
|
1160
|
+
"tags": [],
|
|
1161
|
+
"methods": [],
|
|
1162
|
+
"properties": [
|
|
1163
|
+
{
|
|
1164
|
+
"name": "contacts",
|
|
1165
|
+
"tags": [],
|
|
1166
|
+
"docs": "",
|
|
1167
|
+
"complexTypes": [
|
|
1168
|
+
"UnifiedContact"
|
|
1169
|
+
],
|
|
1170
|
+
"type": "UnifiedContact[]"
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"name": "totalCount",
|
|
1174
|
+
"tags": [],
|
|
1175
|
+
"docs": "Total count in the DB (permissions permitting)",
|
|
1176
|
+
"complexTypes": [],
|
|
1177
|
+
"type": "number"
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"name": "GetContactsOptions",
|
|
1183
|
+
"slug": "getcontactsoptions",
|
|
1184
|
+
"docs": "Options for querying contacts.",
|
|
1185
|
+
"tags": [],
|
|
1186
|
+
"methods": [],
|
|
1187
|
+
"properties": [
|
|
1188
|
+
{
|
|
1189
|
+
"name": "projection",
|
|
1190
|
+
"tags": [
|
|
1191
|
+
{
|
|
1192
|
+
"text": "['name']",
|
|
1193
|
+
"name": "default"
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1196
|
+
"docs": "Array of fields to fetch.\nMISSING fields will not be read from DB (Performance).",
|
|
1197
|
+
"complexTypes": [
|
|
1198
|
+
"PeopleProjection"
|
|
1199
|
+
],
|
|
1200
|
+
"type": "PeopleProjection[] | undefined"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"name": "limit",
|
|
1204
|
+
"tags": [],
|
|
1205
|
+
"docs": "Max number of records to return",
|
|
1206
|
+
"complexTypes": [],
|
|
1207
|
+
"type": "number | undefined"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "offset",
|
|
1211
|
+
"tags": [],
|
|
1212
|
+
"docs": "Skip count (implement pagination via cursor usually better, but offset for now)",
|
|
1213
|
+
"complexTypes": [],
|
|
1214
|
+
"type": "number | undefined"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "includeTotal",
|
|
1218
|
+
"tags": [
|
|
1219
|
+
{
|
|
1220
|
+
"text": "false",
|
|
1221
|
+
"name": "default"
|
|
1222
|
+
}
|
|
1223
|
+
],
|
|
1224
|
+
"docs": "Whether to compute totalCount across the full contacts set.\nThis may require scanning/counting the full address book and can be expensive on large datasets.",
|
|
1225
|
+
"complexTypes": [],
|
|
1226
|
+
"type": "boolean | undefined"
|
|
1227
|
+
}
|
|
1228
|
+
]
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"name": "PeopleCapabilities",
|
|
1232
|
+
"slug": "peoplecapabilities",
|
|
1233
|
+
"docs": "Capabilities of the People plugin on this device/implementation.",
|
|
1234
|
+
"tags": [],
|
|
1235
|
+
"methods": [],
|
|
1236
|
+
"properties": [
|
|
1237
|
+
{
|
|
1238
|
+
"name": "canRead",
|
|
1239
|
+
"tags": [],
|
|
1240
|
+
"docs": "",
|
|
1241
|
+
"complexTypes": [],
|
|
1242
|
+
"type": "boolean"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"name": "canWrite",
|
|
1246
|
+
"tags": [],
|
|
1247
|
+
"docs": "",
|
|
1248
|
+
"complexTypes": [],
|
|
1249
|
+
"type": "boolean"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "canObserve",
|
|
1253
|
+
"tags": [],
|
|
1254
|
+
"docs": "",
|
|
1255
|
+
"complexTypes": [],
|
|
1256
|
+
"type": "boolean"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "canManageGroups",
|
|
1260
|
+
"tags": [],
|
|
1261
|
+
"docs": "",
|
|
1262
|
+
"complexTypes": [],
|
|
1263
|
+
"type": "boolean"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"name": "canPickContact",
|
|
1267
|
+
"tags": [],
|
|
1268
|
+
"docs": "",
|
|
1269
|
+
"complexTypes": [],
|
|
1270
|
+
"type": "boolean"
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"name": "PluginVersionResult",
|
|
1276
|
+
"slug": "pluginversionresult",
|
|
1277
|
+
"docs": "Result object returned by the `getPluginVersion()` method.",
|
|
1278
|
+
"tags": [],
|
|
1279
|
+
"methods": [],
|
|
1280
|
+
"properties": [
|
|
1281
|
+
{
|
|
1282
|
+
"name": "version",
|
|
1283
|
+
"tags": [],
|
|
1284
|
+
"docs": "The native plugin version string.",
|
|
1285
|
+
"complexTypes": [],
|
|
1286
|
+
"type": "string"
|
|
1287
|
+
}
|
|
1288
|
+
]
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"name": "PluginListenerHandle",
|
|
1292
|
+
"slug": "pluginlistenerhandle",
|
|
1293
|
+
"docs": "",
|
|
1294
|
+
"tags": [],
|
|
1295
|
+
"methods": [],
|
|
1296
|
+
"properties": [
|
|
1297
|
+
{
|
|
1298
|
+
"name": "remove",
|
|
1299
|
+
"tags": [],
|
|
1300
|
+
"docs": "",
|
|
1301
|
+
"complexTypes": [],
|
|
1302
|
+
"type": "() => Promise<void>"
|
|
1303
|
+
}
|
|
1304
|
+
]
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"name": "PeopleChangeEvent",
|
|
1308
|
+
"slug": "peoplechangeevent",
|
|
1309
|
+
"docs": "Event emitted when changes are detected in the device's address book.",
|
|
1310
|
+
"tags": [],
|
|
1311
|
+
"methods": [],
|
|
1312
|
+
"properties": [
|
|
1313
|
+
{
|
|
1314
|
+
"name": "ids",
|
|
1315
|
+
"tags": [],
|
|
1316
|
+
"docs": "Array of affected contact IDs (always present, may be empty)",
|
|
1317
|
+
"complexTypes": [],
|
|
1318
|
+
"type": "string[]"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"name": "type",
|
|
1322
|
+
"tags": [],
|
|
1323
|
+
"docs": "The type of change detected",
|
|
1324
|
+
"complexTypes": [
|
|
1325
|
+
"PeopleChangeType"
|
|
1326
|
+
],
|
|
1327
|
+
"type": "PeopleChangeType"
|
|
1328
|
+
}
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
],
|
|
1332
|
+
"enums": [],
|
|
1333
|
+
"typeAliases": [
|
|
1334
|
+
{
|
|
1335
|
+
"name": "PermissionState",
|
|
1336
|
+
"slug": "permissionstate",
|
|
1337
|
+
"docs": "",
|
|
1338
|
+
"types": [
|
|
1339
|
+
{
|
|
1340
|
+
"text": "'prompt'",
|
|
1341
|
+
"complexTypes": []
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"text": "'prompt-with-rationale'",
|
|
1345
|
+
"complexTypes": []
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"text": "'granted'",
|
|
1349
|
+
"complexTypes": []
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"text": "'denied'",
|
|
1353
|
+
"complexTypes": []
|
|
1354
|
+
}
|
|
1355
|
+
]
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "PeopleProjection",
|
|
1359
|
+
"slug": "peopleprojection",
|
|
1360
|
+
"docs": "Supported fields for the Projection Engine.\nRequesting only what you need reduces memory usage by O(N).\n`image` projection support is iOS-only. On Android and Web, requesting `image` is rejected with `UNKNOWN_TYPE` and message `Unsupported projection field: image`.",
|
|
1361
|
+
"types": [
|
|
1362
|
+
{
|
|
1363
|
+
"text": "'name'",
|
|
1364
|
+
"complexTypes": []
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"text": "'organization'",
|
|
1368
|
+
"complexTypes": []
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"text": "'birthday'",
|
|
1372
|
+
"complexTypes": []
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"text": "'phones'",
|
|
1376
|
+
"complexTypes": []
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"text": "'emails'",
|
|
1380
|
+
"complexTypes": []
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"text": "'addresses'",
|
|
1384
|
+
"complexTypes": []
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"text": "'urls'",
|
|
1388
|
+
"complexTypes": []
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"text": "'image'",
|
|
1392
|
+
"complexTypes": []
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"text": "'note'",
|
|
1396
|
+
"complexTypes": []
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"name": "PeopleChangeType",
|
|
1402
|
+
"slug": "peoplechangetype",
|
|
1403
|
+
"docs": "Payload delivered to listeners registered for \"peopleChange\".\n- `ids`: always present, contains changed contact IDs (may be empty).\n- `type`: one of 'insert' | 'update' | 'delete' (default 'update').\n Current native implementations emit `update`.",
|
|
1404
|
+
"types": [
|
|
1405
|
+
{
|
|
1406
|
+
"text": "'insert'",
|
|
1407
|
+
"complexTypes": []
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"text": "'update'",
|
|
1411
|
+
"complexTypes": []
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"text": "'delete'",
|
|
1415
|
+
"complexTypes": []
|
|
1416
|
+
}
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
],
|
|
1420
|
+
"pluginConfigs": [
|
|
1421
|
+
{
|
|
1422
|
+
"name": "People",
|
|
1423
|
+
"slug": "people",
|
|
1424
|
+
"properties": [
|
|
1425
|
+
{
|
|
1426
|
+
"name": "verboseLogging",
|
|
1427
|
+
"tags": [
|
|
1428
|
+
{
|
|
1429
|
+
"text": "false",
|
|
1430
|
+
"name": "default"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"text": "true",
|
|
1434
|
+
"name": "example"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"text": "8.0.0",
|
|
1438
|
+
"name": "since"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
"docs": "Enables verbose native logging.\n\nWhen enabled, additional debug information is printed\nto the native console (Logcat on Android, Xcode on iOS).\n\nThis option affects native logging behavior only and\nhas no impact on the JavaScript API.",
|
|
1442
|
+
"complexTypes": [],
|
|
1443
|
+
"type": "boolean | undefined"
|
|
1444
|
+
}
|
|
1445
|
+
],
|
|
1446
|
+
"docs": "Configuration options for the People plugin."
|
|
1447
|
+
}
|
|
1448
|
+
]
|
|
1449
|
+
}
|