@relaymessenger/sdk 0.4.0 → 0.5.0-staging.1

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/dist/types.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import type { RELAY_WEBHOOK_EVENT_TYPES } from "./operations.js";
2
+ import type { FormPart, FormPartResponse, FormResponsePart, FormResponsePartResponse } from "./form-types.js";
3
+ export type * from "./form-types.js";
2
4
  export type UUID = string;
3
5
  export interface RequestOptions {
4
6
  signal?: AbortSignal;
@@ -25,6 +27,17 @@ export interface CallContact {
25
27
  * ask anyone their age.
26
28
  */
27
29
  age_range?: AgeRange | null;
30
+ /**
31
+ * The person's profile links: at most 5 absolute https URLs, in the order
32
+ * they chose, as Relay normalised them. Empty when they set none. Relay
33
+ * sends no platform name; read the site from the URL. People only.
34
+ */
35
+ links?: string[];
36
+ /**
37
+ * The person's about, as they wrote it in Relay: plain text, at most 160
38
+ * characters. Null when they wrote none. People only.
39
+ */
40
+ about?: string | null;
28
41
  }
29
42
  export type CallTerminalStatus = "completed" | "no-answer" | "canceled" | "busy" | "failed";
30
43
  export interface Call {
@@ -376,6 +389,17 @@ export interface UserChatHandle extends ChatHandleBase {
376
389
  * ask anyone their age.
377
390
  */
378
391
  age_range?: AgeRange | null;
392
+ /**
393
+ * The person's profile links: at most 5 absolute https URLs, in the order
394
+ * they chose, as Relay normalised them. Empty when they set none. Relay
395
+ * sends no platform name; read the site from the URL. People only.
396
+ */
397
+ links?: string[];
398
+ /**
399
+ * The person's about, as they wrote it in Relay: plain text, at most 160
400
+ * characters. Null when they wrote none. People only.
401
+ */
402
+ about?: string | null;
379
403
  }
380
404
  /** Who owns an agent: its organization, or the person who owns it. */
381
405
  export type HandleOwner = {
@@ -405,6 +429,18 @@ export type HandleOwner = {
405
429
  * ask anyone their age.
406
430
  */
407
431
  age_range?: AgeRange | null;
432
+ /**
433
+ * The person's profile links: at most 5 absolute https URLs, in the order
434
+ * they chose, as Relay normalised them. Empty when they set none. Relay
435
+ * sends no platform name; read the site from the URL. People only.
436
+ * Null when the person has no Relay account.
437
+ */
438
+ links?: string[] | null;
439
+ /**
440
+ * The person's about, as they wrote it in Relay: plain text, at most 160
441
+ * characters. Null when they wrote none. People only.
442
+ */
443
+ about?: string | null;
408
444
  };
409
445
  export interface AgentChatHandle extends ChatHandleBase {
410
446
  kind: "agent";
@@ -726,213 +762,7 @@ export interface PlacePart {
726
762
  export interface PlacePartResponse extends PlacePart {
727
763
  reactions: Reaction[] | null;
728
764
  }
729
- /**
730
- * A2UI v0.9.1 (https://a2ui.org), the messages a card is made of. The shapes
731
- * are A2UI's own JSON schemas (`specification/v0_9_1/json/*.json` in
732
- * google/A2UI): `server_to_client.json` for what an agent sends to draw a
733
- * card, `client_to_server.json` for a tap (`action`) and an `error`. The
734
- * version enum is A2UI's (`v0.9` or `v0.9.1`); Relay's contract names v0.9.1.
735
- */
736
- export type A2uiVersion = "v0.9" | "v0.9.1";
737
- /**
738
- * One component of a surface: `id`, the catalog's `component` name, and that
739
- * component's own properties, for example
740
- * `{ id: "title", component: "Text", text: "Lakers win tonight?" }`. The
741
- * catalog named by `createSurface.catalogId` defines them: Relay refuses a
742
- * component, property or value that catalog does not define.
743
- */
744
- export interface A2uiComponent {
745
- id: string;
746
- component: string;
747
- [property: string]: unknown;
748
- }
749
- /** An A2UI data binding whose `path` is an absolute JSON Pointer into the surface's data model. */
750
- export type A2uiAbsoluteBinding = {
751
- path: `/${string}`;
752
- };
753
- /** A Browser card's state: `needs_you` turns it orange; `done` and `failed` shrink it to one row. */
754
- export type A2uiBrowserState = "working" | "needs_you" | "done" | "failed";
755
- /**
756
- * Relay's `Browser` component (`A2uiBrowserComponent` in the contract), in
757
- * Relay's catalog only: your agent's live browser, drawn as Relay's Browser
758
- * card with the title "Browser", the `status` line, the still in `imageUrl`,
759
- * and "Open browser", which opens `watchUrl` read-only. With `controlUrl` the
760
- * person can take control. Every URL is https; `status` is 1 to 80
761
- * characters. Each may instead be bound to the data model.
762
- */
763
- export type A2uiBrowserComponent = {
764
- id: string;
765
- component: "Browser";
766
- status: string | A2uiAbsoluteBinding;
767
- state: A2uiBrowserState;
768
- watchUrl: string | A2uiAbsoluteBinding;
769
- controlUrl?: string | A2uiAbsoluteBinding;
770
- imageUrl?: string | A2uiAbsoluteBinding;
771
- accessibility?: {
772
- label?: unknown;
773
- description?: unknown;
774
- };
775
- weight?: number;
776
- };
777
- /** The `name` of a tap on a Browser card (`A2uiBrowserActionName` in the contract). */
778
- export type A2uiBrowserActionName = "browser.takeControl" | "browser.returnControl" | "browser.stop";
779
- /** A2UI `createSurface`: starts a surface drawn by the Message that carries it. */
780
- export interface A2uiCreateSurfaceMessage {
781
- version: A2uiVersion;
782
- createSurface: {
783
- surfaceId: string;
784
- /** A catalog Relay draws; see `A2uiClientCapabilities`. */
785
- catalogId: string;
786
- /** Theme values the catalog defines, for example `{ primaryColor: "#FF0000" }`. */
787
- theme?: Record<string, unknown>;
788
- /** When true, every tap on the surface carries the surface's data model in `metadata.a2uiClientDataModel`. */
789
- sendDataModel?: boolean;
790
- };
791
- }
792
- /** A2UI `updateComponents`: adds or replaces components by `id`. A surface's first update holds the component with the id `root`. */
793
- export interface A2uiUpdateComponentsMessage {
794
- version: A2uiVersion;
795
- updateComponents: {
796
- surfaceId: string;
797
- components: A2uiComponent[];
798
- };
799
- }
800
- /**
801
- * A2UI `updateDataModel`: replaces (or creates) the value at `path`, a JSON
802
- * Pointer; no `path`, or `/`, is the whole data model. No `value` removes the
803
- * key at `path`.
804
- */
805
- export interface A2uiUpdateDataModelMessage {
806
- version: A2uiVersion;
807
- updateDataModel: {
808
- surfaceId: string;
809
- path?: string;
810
- value?: unknown;
811
- };
812
- }
813
- /** A2UI `deleteSurface`: removes the surface for everyone. */
814
- export interface A2uiDeleteSurfaceMessage {
815
- version: A2uiVersion;
816
- deleteSurface: {
817
- surfaceId: string;
818
- };
819
- }
820
- /** What an agent sends to draw, change or remove a card (A2UI `server_to_client.json`). */
821
- export type A2uiServerToClientMessage = A2uiCreateSurfaceMessage | A2uiUpdateComponentsMessage | A2uiUpdateDataModelMessage | A2uiDeleteSurfaceMessage;
822
- /** The body of an A2UI `action` message: a tap on a Button, or on a Browser card. */
823
- export interface A2uiAction {
824
- /** The Button's `action.event.name`, or one of `A2uiBrowserActionName`. */
825
- name: string;
826
- surfaceId: string;
827
- /** The `id` of the Button or Browser that was tapped. */
828
- sourceComponentId: string;
829
- /** ISO 8601 time of the tap. */
830
- timestamp: string;
831
- /** The Button's `action.event.context`, with every data binding resolved. */
832
- context: Record<string, unknown>;
833
- }
834
- /** A2UI `action`: a person (or an agent) tapped a Button on a surface. */
835
- export interface A2uiActionMessage {
836
- version: A2uiVersion;
837
- action: A2uiAction;
838
- }
839
- /** A2UI's validation error: `path` is a JSON Pointer to the field that failed. */
840
- export interface A2uiValidationError {
841
- code: "VALIDATION_FAILED";
842
- surfaceId: string;
843
- path: string;
844
- message: string;
845
- }
846
- /** A2UI's generic error: any other `code`. */
847
- export interface A2uiGenericError {
848
- code: string;
849
- surfaceId: string;
850
- message: string;
851
- [property: string]: unknown;
852
- }
853
- /** A2UI `error`: a renderer (or an agent) reports that it could not use a message. */
854
- export interface A2uiErrorMessage {
855
- version: A2uiVersion;
856
- error: A2uiValidationError | A2uiGenericError;
857
- }
858
- /**
859
- * A2UI's `error` message in its validation format, as Relay writes it for a
860
- * message it did not apply. `surfaceId` is empty when the message named none;
861
- * `path` points inside the failing message's body, as in A2UI's own example
862
- * `/components/0/text`, and is empty when the whole message is at fault.
863
- */
864
- export interface A2uiValidationErrorMessage {
865
- version: "v0.9.1";
866
- error: A2uiValidationError;
867
- }
868
- /** One A2UI message of a send that Relay did not apply, where it sits in the request, and A2UI's `error` message for it. */
869
- export interface A2uiFailure {
870
- /** The data part's index in `parts`; null when the fault is in `metadata.a2uiClientDataModel`. */
871
- part_index: number | null;
872
- /** The message's index in that part's `data`; null when the part itself, or the metadata, is at fault. */
873
- data_index: number | null;
874
- a2ui_message: A2uiValidationErrorMessage;
875
- }
876
- /** What a renderer sends back (A2UI `client_to_server.json`). */
877
- export type A2uiClientToServerMessage = A2uiActionMessage | A2uiErrorMessage;
878
- /** Any A2UI v0.9.1 message a data part may carry. */
879
- export type A2uiMessage = A2uiServerToClientMessage | A2uiClientToServerMessage;
880
- /**
881
- * A data part holding A2UI v0.9.1 messages, in order. A Message may carry any number of data parts beside its
882
- * other parts. Relay applies each A2UI message on its own, checked against
883
- * A2UI's schemas and the surface's catalog: the ones that fail come back in
884
- * the response's `a2ui_errors`, and a send that applies nothing is refused
885
- * (403, 404, 409 or 422) with `a2ui_errors` in the error body. Only an agent
886
- * sends `createSurface`, and only the agent that created a surface sends its
887
- * `updateComponents`, `updateDataModel` and `deleteSurface`;
888
- * a send that only changes an earlier card adds no Message and returns that
889
- * card. An `action` or `error` reaches only its sender and the agent that
890
- * created the surface it names.
891
- */
892
- export interface DataPart {
893
- type: "data";
894
- media_type: "application/a2ui+json";
895
- data: A2uiMessage[];
896
- }
897
- /**
898
- * A data part as a reader receives it: the `action` and `error` messages it
899
- * carried, as sent, when the reader sent them or created the surface they
900
- * name; then, for each surface it created, every A2UI message accepted for
901
- * that surface since, in order. Replay the list to draw the card.
902
- */
903
- export interface DataPartResponse extends DataPart {
904
- reactions: Reaction[] | null;
905
- }
906
- /** A2UI's `a2uiClientDataModel` (`client_data_model.json`): each surface's data model, by surface id. */
907
- export interface A2uiClientDataModel {
908
- version: A2uiVersion;
909
- surfaces: Record<string, Record<string, unknown>>;
910
- }
911
- /**
912
- * A2UI's `a2uiClientCapabilities` (`client_capabilities.json`, keyed by the
913
- * protocol family `v0.9`): the catalogs Relay's app draws, in order of
914
- * preference. Relay's catalog (`RELAY_A2UI_CATALOG_ID`) is every basic catalog
915
- * component and function plus `PaymentRequest`.
916
- */
917
- export interface A2uiClientCapabilities {
918
- "v0.9": {
919
- supportedCatalogIds: string[];
920
- inlineCatalogs?: Array<Record<string, unknown>>;
921
- };
922
- }
923
- /**
924
- * Message metadata. A tap on a surface that set `sendDataModel` carries
925
- * `a2uiClientDataModel`. Each surface's data model reaches only the sender and
926
- * the agent that created that surface, unchanged.
927
- */
928
- export interface MessageMetadata {
929
- a2uiClientDataModel?: A2uiClientDataModel;
930
- }
931
- /** The metadata on every `message.received`: the reader's A2UI catalogs, and the sender's data model for the surfaces this agent created, when it sent one. */
932
- export interface MessageReceivedMetadata extends MessageMetadata {
933
- a2uiClientCapabilities: A2uiClientCapabilities;
934
- }
935
- export type MessagePart = TextPart | MediaPart | LinkPart | ButtonsPart | SelectionPart | SelectionResponsePart | RichCardPart | CarouselPart | SuggestionResponsePart | PaymentPart | DataPart | PlacePart;
765
+ export type MessagePart = TextPart | MediaPart | LinkPart | ButtonsPart | SelectionPart | SelectionResponsePart | RichCardPart | CarouselPart | SuggestionResponsePart | FormPart | FormResponsePart | PaymentPart | PlacePart;
936
766
  export interface TextPartResponse extends TextPart {
937
767
  mentions?: Array<{
938
768
  id: string;
@@ -983,6 +813,17 @@ export interface SystemEventParty {
983
813
  * ask anyone their age.
984
814
  */
985
815
  age_range?: AgeRange | null;
816
+ /**
817
+ * The person's profile links: at most 5 absolute https URLs, in the order
818
+ * they chose, as Relay normalised them. Empty when they set none. Relay
819
+ * sends no platform name; read the site from the URL. People only.
820
+ */
821
+ links?: string[];
822
+ /**
823
+ * The person's about, as they wrote it in Relay: plain text, at most 160
824
+ * characters. Null when they wrote none. People only.
825
+ */
826
+ about?: string | null;
986
827
  }
987
828
  export type TypingContact = SystemEventParty;
988
829
  export interface TypingIndicatorWebhookData {
@@ -1020,7 +861,7 @@ export interface SystemPartResponse {
1020
861
  value: string;
1021
862
  reactions: null;
1022
863
  }
1023
- export type MessagePartResponse = TextPartResponse | MediaPartResponse | LinkPartResponse | ButtonsPartResponse | SelectionPartResponse | SelectionResponsePartResponse | RichCardPartResponse | CarouselPartResponse | SuggestionResponsePartResponse | PaymentPartResponse | PaymentReceiptPartResponse | DataPartResponse | LocationRequestPartResponse | LocationPartResponse | PlacePartResponse | SystemPartResponse;
864
+ export type MessagePartResponse = TextPartResponse | MediaPartResponse | LinkPartResponse | ButtonsPartResponse | SelectionPartResponse | SelectionResponsePartResponse | RichCardPartResponse | CarouselPartResponse | SuggestionResponsePartResponse | FormPartResponse | FormResponsePartResponse | PaymentPartResponse | PaymentReceiptPartResponse | LocationRequestPartResponse | LocationPartResponse | PlacePartResponse | SystemPartResponse;
1024
865
  /** Ordinary replies target text, media, or link, never system. A buttons part
1025
866
  * accepts only a tap: one text part equal to one of its plain labels. A selection
1026
867
  * requires explicit part_index and exactly text then selection_response metadata. */
@@ -1031,11 +872,6 @@ export interface ReplyTo {
1031
872
  export interface MessageContent {
1032
873
  parts: MessagePart[];
1033
874
  reply_to?: ReplyTo;
1034
- /**
1035
- * Message metadata. A tap (an A2UI `action`) on a surface that set
1036
- * `sendDataModel` must carry `a2uiClientDataModel`.
1037
- */
1038
- metadata?: MessageMetadata;
1039
875
  idempotency_key?: string;
1040
876
  /**
1041
877
  * Send the Message with no banner and no sound on the recipient's device.
@@ -1054,8 +890,7 @@ export interface MessageContent {
1054
890
  */
1055
891
  export interface SentMessage {
1056
892
  id: UUID;
1057
- parts: Array<TextPartResponse | MediaPartResponse | LinkPartResponse | ButtonsPartResponse | SelectionPartResponse | SelectionResponsePartResponse | RichCardPartResponse | CarouselPartResponse | SuggestionResponsePartResponse | PaymentPartResponse | PaymentReceiptPartResponse | DataPartResponse | LocationRequestPartResponse | LocationPartResponse | PlacePartResponse>;
1058
- metadata?: MessageMetadata;
893
+ parts: Array<TextPartResponse | MediaPartResponse | LinkPartResponse | ButtonsPartResponse | SelectionPartResponse | SelectionResponsePartResponse | RichCardPartResponse | CarouselPartResponse | SuggestionResponsePartResponse | FormPartResponse | FormResponsePartResponse | PaymentPartResponse | PaymentReceiptPartResponse | LocationRequestPartResponse | LocationPartResponse | PlacePartResponse>;
1059
894
  created_at: string;
1060
895
  sent_at: string | null;
1061
896
  delivered_at?: string | null;
@@ -1076,7 +911,6 @@ export interface Message {
1076
911
  from_handle?: ChatHandle | null;
1077
912
  parts?: MessagePartResponse[] | null;
1078
913
  reply_to?: ReplyTo | null;
1079
- metadata?: MessageMetadata;
1080
914
  is_system_message: boolean;
1081
915
  system_event?: SystemEvent | null;
1082
916
  is_from_me: boolean;
@@ -1127,16 +961,14 @@ export interface ChatCreateParams {
1127
961
  message: MessageContent;
1128
962
  }
1129
963
  export interface ChatCreateResponse {
1130
- /**
1131
- * The A2UI messages of the send that were not applied, each with its place
1132
- * in the request and A2UI's `error` message for it. The rest was applied.
1133
- */
1134
- a2ui_errors?: A2uiFailure[];
1135
964
  chat: Pick<Chat, "id" | "display_name" | "is_group" | "handles"> & {
1136
965
  message: SentMessage;
1137
966
  };
1138
967
  }
1139
- /** Omit handle to share the authenticated agent's own card. */
968
+ /**
969
+ * Send handle to recommend an agent, user_id to share a person, or neither to
970
+ * share the authenticated agent's own card. Never both.
971
+ */
1140
972
  export interface ChatShareContactCardParams {
1141
973
  /**
1142
974
  * The agent to recommend, trimmed and lowercased by the Server. It must be
@@ -1144,6 +976,15 @@ export interface ChatShareContactCardParams {
1144
976
  * the same 404 as an unknown handle.
1145
977
  */
1146
978
  handle?: string;
979
+ /**
980
+ * The person to share: their id as you see it in a chat
981
+ * (`system_event.actor.id` or the chat's handles). They must have sent a
982
+ * message in a chat with you and not blocked you, and the target chat needs
983
+ * an active person none of whom has blocked or been blocked by them;
984
+ * anything else is the same 404. Ask both people first. Their card is a
985
+ * snapshot: id, handle, name, photo, links and about.
986
+ */
987
+ user_id?: UUID;
1147
988
  }
1148
989
  export interface ChatShareContactCardOptions extends RequestOptions {
1149
990
  /** 1 to 255 characters. The same key and body replay with nothing shared; another body is 409. */
@@ -1185,11 +1026,6 @@ export interface MessageSendParams {
1185
1026
  message: MessageContent;
1186
1027
  }
1187
1028
  export interface MessageSendResponse {
1188
- /**
1189
- * The A2UI messages of the send that were not applied, each with its place
1190
- * in the request and A2UI's `error` message for it. The rest was applied.
1191
- */
1192
- a2ui_errors?: A2uiFailure[];
1193
1029
  chat_id: UUID;
1194
1030
  message: SentMessage;
1195
1031
  }
@@ -1199,11 +1035,6 @@ export interface MessageCreateParams {
1199
1035
  "Idempotency-Key"?: string;
1200
1036
  }
1201
1037
  export interface MessageCreateResponse {
1202
- /**
1203
- * The A2UI messages of the send that were not applied, each with its place
1204
- * in the request and A2UI's `error` message for it. The rest was applied.
1205
- */
1206
- a2ui_errors?: A2uiFailure[];
1207
1038
  from: string;
1208
1039
  chat_id: UUID;
1209
1040
  created_new_chat: boolean;
@@ -1444,6 +1275,17 @@ export interface ContactLookup {
1444
1275
  * ask anyone their age.
1445
1276
  */
1446
1277
  age_range?: AgeRange | null;
1278
+ /**
1279
+ * The person's profile links: at most 5 absolute https URLs, in the order
1280
+ * they chose, as Relay normalised them. Empty when they set none. Relay
1281
+ * sends no platform name; read the site from the URL. People only.
1282
+ */
1283
+ links?: string[];
1284
+ /**
1285
+ * The person's about, as they wrote it in Relay: plain text, at most 160
1286
+ * characters. Null when they wrote none. People only.
1287
+ */
1288
+ about?: string | null;
1447
1289
  /** Who the agent is for: everyone, or only people whose age range is 18_plus. Agents only. */
1448
1290
  age_rating?: AgentAgeRating;
1449
1291
  }
@@ -1483,8 +1325,8 @@ export type ContactLookupResponse = {
1483
1325
  };
1484
1326
  export interface ContactCardItem {
1485
1327
  /**
1486
- * The shared agent's Contact id, only on a card shared by handle. Open the
1487
- * agent by this id (`contacts.lookup({ id })`); the handle may since have changed.
1328
+ * The shared Contact's id, only on a card shared by handle or user_id. Open
1329
+ * an agent by this id (`contacts.lookup({ id })`); the handle may since have changed.
1488
1330
  */
1489
1331
  id?: UUID;
1490
1332
  /** The shared agent's subtitle when it was shared, only on a card shared by handle. */
@@ -1496,13 +1338,42 @@ export interface ContactCardItem {
1496
1338
  url?: string;
1497
1339
  /** Detailed agent description, up to 2000 characters. Public agents cannot clear it. */
1498
1340
  description?: string | null;
1499
- handle: string;
1341
+ /** Null only on a shared person's card after they deleted their account. */
1342
+ handle: string | null;
1500
1343
  first_name: string;
1501
1344
  last_name: string | null;
1502
1345
  image_url: string | null;
1503
1346
  is_active: boolean;
1504
1347
  /** Whether Relay has verified this agent. Always false for a user. */
1505
1348
  is_verified?: boolean;
1349
+ /**
1350
+ * A shared person's profile links when the card was shared, only on a
1351
+ * person's card. A person's card carries id, handle, name, photo, links and
1352
+ * about, and nothing else.
1353
+ */
1354
+ links?: string[];
1355
+ /**
1356
+ * A shared person's about when the card was shared, at most 160
1357
+ * characters, or null when they wrote none. Only on a person's card.
1358
+ */
1359
+ about?: string | null;
1360
+ kind: "user" | "agent";
1361
+ }
1362
+ /**
1363
+ * What `POST` and `PATCH /v1/contact_card` return: the agent's own card, whose
1364
+ * handle is never null. (`GET /v1/contact_card` returns `ContactCardItem`, the
1365
+ * contract's one schema for every card, shared ones included.)
1366
+ */
1367
+ export interface SetContactCardResponse {
1368
+ /** Detailed agent description, up to 2000 characters. Public agents cannot clear it. */
1369
+ description?: string | null;
1370
+ first_name: string;
1371
+ last_name: string | null;
1372
+ image_url: string | null;
1373
+ /** Dominant colour of the picture, six uppercase hex digits; null when Relay has none. */
1374
+ image_color: string | null;
1375
+ is_active: boolean;
1376
+ handle: string;
1506
1377
  kind: "user" | "agent";
1507
1378
  }
1508
1379
  export interface ContactCardCreateParams {
@@ -1563,7 +1434,12 @@ export type AgentAccessRule = "allow" | "deny";
1563
1434
  * The agent's owner is always allowed and is on neither list.
1564
1435
  */
1565
1436
  /** "Log in with Relay" scopes: `openid` and `profile` always, `email` and `phone` optional. */
1566
- export type OAuth2Scope = "openid" | "profile" | "email" | "phone";
1437
+ /**
1438
+ * An OpenID Connect scope a Log in with Relay client may ask for. `birthdate`
1439
+ * asks for the person's birthday as the OpenID `birthdate` claim (YYYY-MM-DD,
1440
+ * or 0000-MM-DD when they gave no year).
1441
+ */
1442
+ export type OAuth2Scope = "openid" | "profile" | "email" | "phone" | "birthdate";
1567
1443
  /** The agent's OAuth2 client for Log in with Relay. `client_id` is the agent's ID. */
1568
1444
  export interface OAuth2Client {
1569
1445
  client_id: string;
@@ -1662,13 +1538,6 @@ export interface MessageWebhookData {
1662
1538
  */
1663
1539
  silent?: boolean;
1664
1540
  reply_to?: ReplyTo | null;
1665
- /**
1666
- * Message metadata. Every `message.received` carries it, with the
1667
- * reader's `a2uiClientCapabilities` and, when the sender sent one, its
1668
- * `a2uiClientDataModel` for the surfaces this agent created (see
1669
- * `MessageReceivedMetadata`).
1670
- */
1671
- metadata?: Partial<MessageReceivedMetadata>;
1672
1541
  }
1673
1542
  /**
1674
1543
  * `message.failed`. Relay commits a Message before it answers, so a Message
@@ -1706,6 +1575,17 @@ export interface ContactEventContact {
1706
1575
  * ask anyone their age.
1707
1576
  */
1708
1577
  age_range: AgeRange | null;
1578
+ /**
1579
+ * The person's profile links: at most 5 absolute https URLs, in the order
1580
+ * they chose, as Relay normalised them. Empty when they set none. Relay
1581
+ * sends no platform name; read the site from the URL. People only.
1582
+ */
1583
+ links: string[];
1584
+ /**
1585
+ * The person's about, as they wrote it in Relay: plain text, at most 160
1586
+ * characters. Null when they wrote none. People only.
1587
+ */
1588
+ about: string | null;
1709
1589
  }
1710
1590
  export interface ContactAddedEvent {
1711
1591
  contact: ContactEventContact;
@@ -1794,6 +1674,17 @@ export interface OwnerPerson {
1794
1674
  * ask anyone their age.
1795
1675
  */
1796
1676
  age_range?: AgeRange | null;
1677
+ /**
1678
+ * The person's profile links: at most 5 absolute https URLs, in the order
1679
+ * they chose, as Relay normalised them. Empty when they set none. Relay
1680
+ * sends no platform name; read the site from the URL. People only.
1681
+ */
1682
+ links?: string[];
1683
+ /**
1684
+ * The person's about, as they wrote it in Relay: plain text, at most 160
1685
+ * characters. Null when they wrote none. People only.
1686
+ */
1687
+ about?: string | null;
1797
1688
  }
1798
1689
  /** `GET /v1/me`: the agent the Agent Token authenticates, and who owns it (`AgentMe`). */
1799
1690
  export interface AgentMe {
@@ -1817,5 +1708,4 @@ export interface AgentMe {
1817
1708
  */
1818
1709
  calls_enabled: boolean;
1819
1710
  }
1820
- export {};
1821
1711
  //# sourceMappingURL=types.d.ts.map