contact() to share contact cards. The builder takes either a structured ContactInput, a vCard string, a vcf instance, or a known User paired with optional ContactDetails.
- Structured
- From a User
- From vCard
fromVCard(vcf) parses a vCard string into a ContactInput. toVCard(contact) serializes a resolved Contact back to vCard.
ContactInput
The fields you can populate on a contact card. All fields are optional except where the receiving platform requires at least one identifying field.
ContactInput
The fields you can populate on a contact card. All fields are optional except where the receiving platform requires at least one identifying field.
| Field | Type | Description |
|---|---|---|
name | { formatted?, first?, last?, middle?, prefix?, suffix? } | Structured display name. |
phones | Array<{ value, type? }> | Phone numbers. type is "mobile" | "home" | "work" | "other". |
emails | Array<{ value, type? }> | Email addresses. type is "home" | "work" | "other". |
addresses | Array<{ street?, city?, region?, postalCode?, country?, type? }> | Postal addresses. |
org | { name?, title?, department? } | Employer or org info. |
urls | string[] | Associated URLs. |
birthday | string | ISO date. |
note | string | Free-form note. |
photo | { mimeType, read() } | Profile photo bytes. |
raw | unknown | Provider-specific extras passed through untouched. |