@linqapp/sdk-mcp 0.41.1 → 0.42.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.
@@ -53,12 +53,12 @@ const EMBEDDED_METHODS = [
53
53
  qualified: 'client.chats.create',
54
54
  params: [
55
55
  'from: string;',
56
- "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
56
+ "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
57
57
  'to: string[];',
58
58
  'override_optout?: boolean;',
59
59
  ],
60
60
  response: "{ chat: { id: string; display_name: string; handles: object[]; health_status: { doc_url: string; status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT'; updated_at: string; }; is_group: boolean; message: object; service: 'iMessage' | 'SMS' | 'RCS'; }; }",
61
- markdown: "## create\n\n`client.chats.create(from: string, message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object[]; preferred_service?: service_type; reply_to?: reply_to; }, to: string[], override_optout?: boolean): { chat: object; }`\n\n**post** `/v3/chats`\n\nCreate a new chat with specified participants and send an initial message.\nThe initial message is required when creating a chat.\n\n## Message Effects\n\nYou can add iMessage effects to make your messages more expressive. Effects are\noptional and can be either screen effects (full-screen animations) or bubble effects\n(message bubble animations).\n\n**Screen Effects:** `confetti`, `fireworks`, `lasers`, `sparkles`, `celebration`,\n`hearts`, `love`, `balloons`, `happy_birthday`, `echo`, `spotlight`\n\n**Bubble Effects:** `slam`, `loud`, `gentle`, `invisible`\n\nOnly one effect type can be applied per message.\n\n## Inline Text Decorations (iMessage only)\n\nUse the `text_decorations` array on a text part to apply styling and animations to character ranges.\n\nEach decoration specifies a `range: [start, end)` and exactly one of `style` or `animation`.\n\n**Styles:** `bold`, `italic`, `strikethrough`, `underline`\n**Animations:** `big`, `small`, `shake`, `nod`, `explode`, `ripple`, `bloom`, `jitter`\n\n```json\n{\n \"type\": \"text\",\n \"value\": \"Hello world\",\n \"text_decorations\": [\n { \"range\": [0, 5], \"style\": \"bold\" },\n { \"range\": [6, 11], \"animation\": \"shake\" }\n ]\n}\n```\n\n**Note:** Style ranges (bold, italic, etc.) may overlap, but animation ranges must not overlap with other animations or styles. Text decorations only render for iMessage recipients.\nFor SMS/RCS, text decorations are not applied.\n\n## First-Message Link Restriction\n\nTo protect sender deliverability, the **first outbound message** of a new chat cannot be a link.\nThe request is rejected with `400` (error code `1005`) when:\n\n- The message contains a `link` part (explicit rich-preview link), or\n- Any `text` part contains a URL.\n\nThis rule applies only to `POST /v3/chats`. Follow-up messages on an existing chat\n(`POST /v3/chats/{chatId}/messages`) are not subject to this restriction.\n\n## Reusing an Existing Chat\n\nChats are keyed on the `from` line plus the exact set of `to` handles. Repeating this\nrequest with the same `from` and `to` returns the **existing** chat and sends the message\ninto it instead of starting a second conversation.\n\nA group chat that has a `display_name` is excluded from that matching. To run several\nparallel groups over the same participants, name each one with `PUT /v3/chats/{chatId}`\nbefore creating the next: the following `POST /v3/chats` with the same `to` then returns a\nnew, separate `chat_id`. Two other cases also produce a new chat instead of reusing one —\nthe participant set changed (a participant was added or removed), or the `from` line left\nthe group.\n\nWhenever the response is a new chat, the first-message rules above apply to that request:\nno link in the first message, and no `reply_to` or message effect. To send into a chat you\nalready know, use `POST /v3/chats/{chatId}/messages` with its `chat_id`.\n\n\n### Parameters\n\n- `from: string`\n Sender phone number in E.164 format. Must be a phone number that the\nauthenticated partner has permission to send from.\n\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `to: string[]`\n Array of recipient handles (phone numbers in E.164 format or email addresses).\nFor individual chats, provide one recipient. For group chats, provide multiple.\n\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n### Returns\n\n- `{ chat: { id: string; display_name: string; handles: object[]; health_status: { doc_url: string; status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT'; updated_at: string; }; is_group: boolean; message: object; service: 'iMessage' | 'SMS' | 'RCS'; }; }`\n Response for creating a new chat with an initial message\n\n - `chat: { id: string; display_name: string; handles: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; health_status: { doc_url: string; status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT'; updated_at: string; }; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; sent_at: string; delivered_at?: string; effect?: object; from_handle?: object; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: object; service?: 'iMessage' | 'SMS' | 'RCS'; }; service: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst chat = await client.chats.create({\n from: '+12052535597',\n message: {},\n to: ['+12052532136'],\n});\n\nconsole.log(chat);\n```",
61
+ markdown: "## create\n\n`client.chats.create(from: string, message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object | object[]; preferred_service?: service_type; reply_to?: reply_to; }, to: string[], override_optout?: boolean): { chat: object; }`\n\n**post** `/v3/chats`\n\nCreate a new chat with specified participants and send an initial message.\nThe initial message is required when creating a chat.\n\n## Message Effects\n\nYou can add iMessage effects to make your messages more expressive. Effects are\noptional and can be either screen effects (full-screen animations) or bubble effects\n(message bubble animations).\n\n**Screen Effects:** `confetti`, `fireworks`, `lasers`, `sparkles`, `celebration`,\n`hearts`, `love`, `balloons`, `happy_birthday`, `echo`, `spotlight`\n\n**Bubble Effects:** `slam`, `loud`, `gentle`, `invisible`\n\nOnly one effect type can be applied per message.\n\n## Inline Text Decorations (iMessage only)\n\nUse the `text_decorations` array on a text part to apply styling and animations to character ranges.\n\nEach decoration specifies a `range: [start, end)` and exactly one of `style` or `animation`.\n\n**Styles:** `bold`, `italic`, `strikethrough`, `underline`\n**Animations:** `big`, `small`, `shake`, `nod`, `explode`, `ripple`, `bloom`, `jitter`\n\n```json\n{\n \"type\": \"text\",\n \"value\": \"Hello world\",\n \"text_decorations\": [\n { \"range\": [0, 5], \"style\": \"bold\" },\n { \"range\": [6, 11], \"animation\": \"shake\" }\n ]\n}\n```\n\n**Note:** Style ranges (bold, italic, etc.) may overlap, but animation ranges must not overlap with other animations or styles. Text decorations only render for iMessage recipients.\nFor SMS/RCS, text decorations are not applied.\n\n## First-Message Link Restriction\n\nTo protect sender deliverability, the **first outbound message** of a new chat cannot be a link.\nThe request is rejected with `400` (error code `1005`) when:\n\n- The message contains a `link` part (explicit rich-preview link), or\n- Any `text` part contains a URL.\n\nThis rule applies only to `POST /v3/chats`. Follow-up messages on an existing chat\n(`POST /v3/chats/{chatId}/messages`) are not subject to this restriction.\n\n## Reusing an Existing Chat\n\nChats are keyed on the `from` line plus the exact set of `to` handles. Repeating this\nrequest with the same `from` and `to` returns the **existing** chat and sends the message\ninto it instead of starting a second conversation.\n\nA group chat that has a `display_name` is excluded from that matching. To run several\nparallel groups over the same participants, name each one with `PUT /v3/chats/{chatId}`\nbefore creating the next: the following `POST /v3/chats` with the same `to` then returns a\nnew, separate `chat_id`. Two other cases also produce a new chat instead of reusing one —\nthe participant set changed (a participant was added or removed), or the `from` line left\nthe group.\n\nWhenever the response is a new chat, the first-message rules above apply to that request:\nno link in the first message, and no `reply_to` or message effect. To send into a chat you\nalready know, use `POST /v3/chats/{chatId}/messages` with its `chat_id`.\n\n\n### Parameters\n\n- `from: string`\n Sender phone number in E.164 format. Must be a phone number that the\nauthenticated partner has permission to send from.\n\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**App Clip Payment Cards:**\n- Use an `app_clip` part to send a Linq checkout link as an Apple Pay\n App Clip card (the payment preview with the Open button)\n- An `app_clip` part must be the **only** part in the message\n- iMessage-only: unlike `link`, it never downgrades to SMS/RCS — the\n send fails instead of delivering a bare URL\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- An `app_clip` part must be the **only** part in the message. Its `value`\n must be a Linq checkout link (e.g. from `POST /v3/payment_requests`);\n any other URL is rejected.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `to: string[]`\n Array of recipient handles (phone numbers in E.164 format or email addresses).\nFor individual chats, provide one recipient. For group chats, provide multiple.\n\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n### Returns\n\n- `{ chat: { id: string; display_name: string; handles: object[]; health_status: { doc_url: string; status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT'; updated_at: string; }; is_group: boolean; message: object; service: 'iMessage' | 'SMS' | 'RCS'; }; }`\n Response for creating a new chat with an initial message\n\n - `chat: { id: string; display_name: string; handles: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; health_status: { doc_url: string; status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT'; updated_at: string; }; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: reaction[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; sent_at: string; delivered_at?: string; effect?: object; from_handle?: object; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: object; service?: 'iMessage' | 'SMS' | 'RCS'; }; service: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst chat = await client.chats.create({\n from: '+12052535597',\n message: {},\n to: ['+12052532136'],\n});\n\nconsole.log(chat);\n```",
62
62
  perLanguage: {
63
63
  python: {
64
64
  method: 'chats.create',
@@ -407,11 +407,11 @@ const EMBEDDED_METHODS = [
407
407
  qualified: 'client.chats.messages.send',
408
408
  params: [
409
409
  'chatId: string;',
410
- "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
410
+ "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
411
411
  'override_optout?: boolean;',
412
412
  ],
413
- response: "{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }",
414
- markdown: "## send\n\n`client.chats.messages.send(chatId: string, message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object[]; preferred_service?: service_type; reply_to?: reply_to; }, override_optout?: boolean): { chat_id: string; message: sent_message; }`\n\n**post** `/v3/chats/{chatId}/messages`\n\nSend a message to an existing chat. Use this endpoint when you already have\na chat ID and want to send additional messages to it.\n\n## Message Effects\n\nYou can add iMessage effects to make your messages more expressive. Effects are\noptional and can be either screen effects (full-screen animations) or bubble effects\n(message bubble animations).\n\n**Screen Effects:** `confetti`, `fireworks`, `lasers`, `sparkles`, `celebration`,\n`hearts`, `love`, `balloons`, `happy_birthday`, `echo`, `spotlight`\n\n**Bubble Effects:** `slam`, `loud`, `gentle`, `invisible`\n\nOnly one effect type can be applied per message.\n\n## Inline Text Decorations (iMessage only)\n\nUse the `text_decorations` array on a text part to apply styling and animations to character ranges.\n\nEach decoration specifies a `range: [start, end)` and exactly one of `style` or `animation`.\n\n**Styles:** `bold`, `italic`, `strikethrough`, `underline`\n**Animations:** `big`, `small`, `shake`, `nod`, `explode`, `ripple`, `bloom`, `jitter`\n\n```json\n{\n \"type\": \"text\",\n \"value\": \"Hello world\",\n \"text_decorations\": [\n { \"range\": [0, 5], \"style\": \"bold\" },\n { \"range\": [6, 11], \"animation\": \"shake\" }\n ]\n}\n```\n\n**Note:** Style ranges (bold, italic, etc.) may overlap, but animation ranges must not overlap with other animations or styles. Text decorations only render for iMessage recipients.\nFor SMS/RCS, text decorations are not applied.\n\n\n### Parameters\n\n- `chatId: string`\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n### Returns\n\n- `{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }`\n Response for sending a message to a chat\n\n - `chat_id: string`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst response = await client.chats.messages.send('550e8400-e29b-41d4-a716-446655440000', { message: {} });\n\nconsole.log(response);\n```",
413
+ response: "{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }",
414
+ markdown: "## send\n\n`client.chats.messages.send(chatId: string, message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object | object[]; preferred_service?: service_type; reply_to?: reply_to; }, override_optout?: boolean): { chat_id: string; message: sent_message; }`\n\n**post** `/v3/chats/{chatId}/messages`\n\nSend a message to an existing chat. Use this endpoint when you already have\na chat ID and want to send additional messages to it.\n\n## Message Effects\n\nYou can add iMessage effects to make your messages more expressive. Effects are\noptional and can be either screen effects (full-screen animations) or bubble effects\n(message bubble animations).\n\n**Screen Effects:** `confetti`, `fireworks`, `lasers`, `sparkles`, `celebration`,\n`hearts`, `love`, `balloons`, `happy_birthday`, `echo`, `spotlight`\n\n**Bubble Effects:** `slam`, `loud`, `gentle`, `invisible`\n\nOnly one effect type can be applied per message.\n\n## Inline Text Decorations (iMessage only)\n\nUse the `text_decorations` array on a text part to apply styling and animations to character ranges.\n\nEach decoration specifies a `range: [start, end)` and exactly one of `style` or `animation`.\n\n**Styles:** `bold`, `italic`, `strikethrough`, `underline`\n**Animations:** `big`, `small`, `shake`, `nod`, `explode`, `ripple`, `bloom`, `jitter`\n\n```json\n{\n \"type\": \"text\",\n \"value\": \"Hello world\",\n \"text_decorations\": [\n { \"range\": [0, 5], \"style\": \"bold\" },\n { \"range\": [6, 11], \"animation\": \"shake\" }\n ]\n}\n```\n\n**Note:** Style ranges (bold, italic, etc.) may overlap, but animation ranges must not overlap with other animations or styles. Text decorations only render for iMessage recipients.\nFor SMS/RCS, text decorations are not applied.\n\n\n### Parameters\n\n- `chatId: string`\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**App Clip Payment Cards:**\n- Use an `app_clip` part to send a Linq checkout link as an Apple Pay\n App Clip card (the payment preview with the Open button)\n- An `app_clip` part must be the **only** part in the message\n- iMessage-only: unlike `link`, it never downgrades to SMS/RCS — the\n send fails instead of delivering a bare URL\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- An `app_clip` part must be the **only** part in the message. Its `value`\n must be a Linq checkout link (e.g. from `POST /v3/payment_requests`);\n any other URL is rejected.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n### Returns\n\n- `{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }`\n Response for sending a message to a chat\n\n - `chat_id: string`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst response = await client.chats.messages.send('550e8400-e29b-41d4-a716-446655440000', { message: {} });\n\nconsole.log(response);\n```",
415
415
  perLanguage: {
416
416
  python: {
417
417
  method: 'chats.messages.send',
@@ -439,8 +439,8 @@ const EMBEDDED_METHODS = [
439
439
  stainlessPath: '(resource) chats.messages > (method) list',
440
440
  qualified: 'client.chats.messages.list',
441
441
  params: ['chatId: string;', 'cursor?: string;', 'limit?: number;'],
442
- response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
443
- markdown: "## list\n\n`client.chats.messages.list(chatId: string, cursor?: string, limit?: number): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/chats/{chatId}/messages`\n\nRetrieve messages from a specific chat with pagination support.\n\n\n### Parameters\n\n- `chatId: string`\n\n- `cursor?: string`\n Pagination cursor from previous next_cursor response\n\n- `limit?: number`\n Maximum number of messages to return\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\n// Automatically fetches more pages as needed.\nfor await (const message of client.chats.messages.list('550e8400-e29b-41d4-a716-446655440000')) {\n console.log(message);\n}\n```",
442
+ response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: reaction[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
443
+ markdown: "## list\n\n`client.chats.messages.list(chatId: string, cursor?: string, limit?: number): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/chats/{chatId}/messages`\n\nRetrieve messages from a specific chat with pagination support.\n\n\n### Parameters\n\n- `chatId: string`\n\n- `cursor?: string`\n Pagination cursor from previous next_cursor response\n\n- `limit?: number`\n Maximum number of messages to return\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\n// Automatically fetches more pages as needed.\nfor await (const message of client.chats.messages.list('550e8400-e29b-41d4-a716-446655440000')) {\n console.log(message);\n}\n```",
444
444
  perLanguage: {
445
445
  python: {
446
446
  method: 'chats.messages.list',
@@ -618,15 +618,15 @@ const EMBEDDED_METHODS = [
618
618
  stainlessPath: '(resource) messages > (method) create',
619
619
  qualified: 'client.messages.create',
620
620
  params: [
621
- "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
621
+ "message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; };",
622
622
  'to: string[];',
623
623
  'continuation_message?: { text: string; };',
624
624
  'exclude_from?: string[];',
625
625
  'override_optout?: boolean;',
626
626
  'Idempotency-Key?: string;',
627
627
  ],
628
- response: "{ chat_id: string; created_new_chat: boolean; from: string; from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }; handles: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; service: 'iMessage' | 'SMS' | 'RCS'; previous_chat_id?: string; }",
629
- markdown: "## create\n\n`client.messages.create(message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object[]; preferred_service?: service_type; reply_to?: reply_to; }, to: string[], continuation_message?: { text: string; }, exclude_from?: string[], override_optout?: boolean, Idempotency-Key?: string): { chat_id: string; created_new_chat: boolean; from: string; from_selection: object; handles: chat_handle[]; is_group: boolean; message: sent_message; service: service_type; previous_chat_id?: string; }`\n\n**post** `/v3/messages`\n\nSend a message to one or more recipients **without supplying a `from`\nnumber**. Linq resolves both the sending line and the target chat for you,\nthen returns exactly which line was used, which chat the message landed in,\nwhether a new chat was created, and every resulting message id.\n\nThis fuses \"create chat\" and \"send message\" behind a single\nmessage-centric resource. Provide only the recipients (`to`) and the\n`message`; the platform decides the rest.\n\n## How the from-number and chat are chosen\n\n- **Reuse** — if a chat with exactly these recipients already exists on a\n line that can still send, the message is sent into that chat on its\n existing line (`from_selection.reason = reused_active_chat`). The\n most-recently-active such chat wins; chats stranded on flagged lines\n (e.g. by an earlier failover) are skipped.\n- **New** — if no such chat exists, a new chat is created on the best\n available line (`from_selection.reason = new_best_number`).\n- **Failover** — if matching chats exist but none is on a line that can\n send, a **new** chat is created on a fresh best line and the flagged chat\n is abandoned (`from_selection.reason = failover_flagged`,\n `previous_chat_id` set). If you supply `continuation_message`, that\n text is sent as the single message INSTEAD of `message` (useful as a\n fresh-number-appropriate opener). Exactly one message is sent either way.\n\nRecipients (`to`) are an order-independent set: a single handle is a direct\nchat, multiple handles a group chat.\n\n## Excluding lines\n\n`exclude_from` keeps specific lines out of **this** send's line pick. It\nonly affects picking a line for a new chat — an existing chat is always\nreused on its own line, preferring a chat on a non-excluded line when the\nrecipients have more than one. An exclusion never abandons a live chat or\nmoves it to a new number, so if the only chat these recipients have is on\nan excluded line, that chat is still used. `from` tells you the line that\nwas actually used.\n\n## Differences from POST /v3/chats\n\n- The first message **may contain a link** (including for a newly created\n chat). Note: sending a link as the very first message on a freshly\n selected line can elevate that line's flagging risk — it is allowed, not\n recommended.\n- Voice memos are **not** supported here. To send an iMessage voice-memo\n bubble, use `POST /v3/chats/{chatId}/voicememo` with a known chat id.\n\n## Service preference, effects, decorations\n\nSet `message.preferred_service` (`iMessage` | `RCS` | `SMS`), `message.effect`,\nand per-part `text_decorations` exactly as on the other send endpoints.\n\nAlways responds `202 Accepted` — chat creation is incidental to the send.\n\n\n### Parameters\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `to: string[]`\n Recipient handles (E.164 phone numbers or email addresses). One handle\nis a direct chat; multiple handles a group chat. Order-independent — the\nset identifies the chat.\n\n\n- `continuation_message?: { text: string; }`\n Text-only fallback that **replaces** `message` ONLY on the failover branch —\nwhen a chat with these recipients already existed but its line was flagged,\nso a new chat is created on a fresh line. On that branch this text is sent as\nthe single message instead of `message` (the recipient is on a new number, so\nyou typically want a fresh-number-appropriate opener rather than the original\ncontent). Ignored otherwise (a healthy reuse, or genuine first contact).\nCarries no parts, media, or effects — exactly one message is ever sent.\n\n - `text: string`\n The replacement message text, sent as the single message on failover.\n\n- `exclude_from?: string[]`\n Lines (E.164) not to pick for this send. Applies for this request\nonly — nothing is remembered between calls.\n\n**Exclusion only affects picking a line for a new chat.** If `to`\nalready has a chat, that chat is reused on its own line, and a chat on\na non-excluded line is preferred when there is more than one. If the\nonly chat these recipients have is on an excluded line, it is still\nreused — an exclusion never abandons a live chat or moves it to a new\nnumber. Check `from` in the response to see the line that was actually\nused.\n\nNumbers that are not your lines are ignored. Every entry must be\nE.164 — a value like `4155551234` is rejected rather than silently\nskipped. Excluding every one of your available lines returns 400 when\na line has to be picked.\n\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ chat_id: string; created_new_chat: boolean; from: string; from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }; handles: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; service: 'iMessage' | 'SMS' | 'RCS'; previous_chat_id?: string; }`\n Result of an auto-from send. Self-describing: which line was used, which\nchat the message landed in, whether a new chat was created, and the\nresulting message id(s).\n\n\n - `chat_id: string`\n - `created_new_chat: boolean`\n - `from: string`\n - `from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }`\n - `handles: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]`\n - `is_group: boolean`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n - `service: 'iMessage' | 'SMS' | 'RCS'`\n - `previous_chat_id?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.create({\n message: {},\n to: ['+14155559876'],\n});\n\nconsole.log(message);\n```",
628
+ response: "{ chat_id: string; created_new_chat: boolean; from: string; from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }; handles: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; service: 'iMessage' | 'SMS' | 'RCS'; previous_chat_id?: string; }",
629
+ markdown: "## create\n\n`client.messages.create(message: { effect?: message_effect; experience?: object; idempotency_key?: string; parts?: text_part | media_part | link_part | object | object[]; preferred_service?: service_type; reply_to?: reply_to; }, to: string[], continuation_message?: { text: string; }, exclude_from?: string[], override_optout?: boolean, Idempotency-Key?: string): { chat_id: string; created_new_chat: boolean; from: string; from_selection: object; handles: chat_handle[]; is_group: boolean; message: sent_message; service: service_type; previous_chat_id?: string; }`\n\n**post** `/v3/messages`\n\nSend a message to one or more recipients **without supplying a `from`\nnumber**. Linq resolves both the sending line and the target chat for you,\nthen returns exactly which line was used, which chat the message landed in,\nwhether a new chat was created, and every resulting message id.\n\nThis fuses \"create chat\" and \"send message\" behind a single\nmessage-centric resource. Provide only the recipients (`to`) and the\n`message`; the platform decides the rest.\n\n## How the from-number and chat are chosen\n\n- **Reuse** — if a chat with exactly these recipients already exists on a\n line that can still send, the message is sent into that chat on its\n existing line (`from_selection.reason = reused_active_chat`). The\n most-recently-active such chat wins; chats stranded on flagged lines\n (e.g. by an earlier failover) are skipped.\n- **New** — if no such chat exists, a new chat is created on the best\n available line (`from_selection.reason = new_best_number`).\n- **Failover** — if matching chats exist but none is on a line that can\n send, a **new** chat is created on a fresh best line and the flagged chat\n is abandoned (`from_selection.reason = failover_flagged`,\n `previous_chat_id` set). If you supply `continuation_message`, that\n text is sent as the single message INSTEAD of `message` (useful as a\n fresh-number-appropriate opener). Exactly one message is sent either way.\n\nRecipients (`to`) are an order-independent set: a single handle is a direct\nchat, multiple handles a group chat.\n\n## Excluding lines\n\n`exclude_from` keeps specific lines out of **this** send's line pick. It\nonly affects picking a line for a new chat — an existing chat is always\nreused on its own line, preferring a chat on a non-excluded line when the\nrecipients have more than one. An exclusion never abandons a live chat or\nmoves it to a new number, so if the only chat these recipients have is on\nan excluded line, that chat is still used. `from` tells you the line that\nwas actually used.\n\n## Differences from POST /v3/chats\n\n- The first message **may contain a link** (including for a newly created\n chat). Note: sending a link as the very first message on a freshly\n selected line can elevate that line's flagging risk — it is allowed, not\n recommended.\n- Voice memos are **not** supported here. To send an iMessage voice-memo\n bubble, use `POST /v3/chats/{chatId}/voicememo` with a known chat id.\n\n## Service preference, effects, decorations\n\nSet `message.preferred_service` (`iMessage` | `RCS` | `SMS`), `message.effect`,\nand per-part `text_decorations` exactly as on the other send endpoints.\n\nAlways responds `202 Accepted` — chat creation is incidental to the send.\n\n\n### Parameters\n\n- `message: { effect?: { name?: string; type?: 'screen' | 'bubble'; }; experience?: { action: string; name: string; params?: object; }; idempotency_key?: string; parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: text_decoration[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; }`\n Message content container. Groups all message-related fields together,\nseparating the \"what\" (message content) from the \"where\" (routing fields like from/to).\n\nA message carries EITHER `parts` — text and attachments, which compose\ninto one bubble — or a single `experience` invocation, which renders an\nexperience inside Linq's iMessage app. Never both: an app card is the whole message\n(Apple's `MSMessage` cannot coexist with text), so copy and a card are\ntwo sends, not one.\n\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n iMessage effect to apply to this message (screen or bubble effect)\n - `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `idempotency_key?: string`\n Optional idempotency key for this message.\nUse this to prevent duplicate sends of the same message. Reusing a key\nwhose message was deleted — or was an ephemeral message that has since\nexpired — returns 404; the message is never resent.\n\n - `parts?: { type: 'text'; value: string; mention?: string; mention_range?: number[]; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { type: 'media'; attachment_id?: string; url?: string; } | { type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; type: 'imessage_app'; fallback_text?: string; interactive?: boolean; url?: string; } | { type: 'app_clip'; value: string; }[]`\n Array of message parts. Each part can be text, media, or link.\nParts are displayed in order. Text and media can be mixed freely,\nbut a `link` part must be the only part in the message.\n\n**Rich Link Previews:**\n- Use a `link` part to send a URL with a rich preview card\n- A `link` part must be the **only** part in the message\n- To send a URL as plain text (no preview), use a `text` part instead\n\n**App Clip Payment Cards:**\n- Use an `app_clip` part to send a Linq checkout link as an Apple Pay\n App Clip card (the payment preview with the Open button)\n- An `app_clip` part must be the **only** part in the message\n- iMessage-only: unlike `link`, it never downgrades to SMS/RCS — the\n send fails instead of delivering a bare URL\n\n**Supported Media:**\n- Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp\n- Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp\n- Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr\n- Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pages, .numbers, .key, .epub, .zip, .html, .htm\n- Contact & Calendar: .vcf, .ics\n\n**Audio:**\n- Audio files (.m4a, .mp3, .aac, .caf, .wav, .aiff, .amr) are fully supported as media parts\n- To send audio as an **iMessage voice memo bubble** (inline playback UI), use the dedicated\n `/v3/chats/{chatId}/voicememo` endpoint instead\n\n**Validation Rules:**\n- A `link` part must be the **only** part in the message. It cannot be combined\n with text or media parts.\n- An `app_clip` part must be the **only** part in the message. Its `value`\n must be a Linq checkout link (e.g. from `POST /v3/payment_requests`);\n any other URL is rejected.\n- Consecutive text parts are not allowed. Text parts must be separated by\n media parts. For example, [text, text] is invalid, but [text, media, text] is valid.\n- Maximum of **100 parts** total.\n- Media parts using a public `url` (downloaded by the server on send) are\n capped at **40**. Parts using `attachment_id` or presigned URLs\n are exempt from this sub-limit. For bulk media sends exceeding 40 files,\n pre-upload via `POST /v3/attachments` and reference by `attachment_id` or `download_url`.\n\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n Messaging service type\n - `reply_to?: { message_id: string; part_index?: number; }`\n Reply to another message to create a threaded conversation\n\n- `to: string[]`\n Recipient handles (E.164 phone numbers or email addresses). One handle\nis a direct chat; multiple handles a group chat. Order-independent — the\nset identifies the chat.\n\n\n- `continuation_message?: { text: string; }`\n Text-only fallback that **replaces** `message` ONLY on the failover branch —\nwhen a chat with these recipients already existed but its line was flagged,\nso a new chat is created on a fresh line. On that branch this text is sent as\nthe single message instead of `message` (the recipient is on a new number, so\nyou typically want a fresh-number-appropriate opener rather than the original\ncontent). Ignored otherwise (a healthy reuse, or genuine first contact).\nCarries no parts, media, or effects — exactly one message is ever sent.\n\n - `text: string`\n The replacement message text, sent as the single message on failover.\n\n- `exclude_from?: string[]`\n Lines (E.164) not to pick for this send. Applies for this request\nonly — nothing is remembered between calls.\n\n**Exclusion only affects picking a line for a new chat.** If `to`\nalready has a chat, that chat is reused on its own line, and a chat on\na non-excluded line is preferred when there is more than one. If the\nonly chat these recipients have is on an excluded line, it is still\nreused — an exclusion never abandons a live chat or moves it to a new\nnumber. Check `from` in the response to see the line that was actually\nused.\n\nNumbers that are not your lines are ignored. Every entry must be\nE.164 — a value like `4155551234` is rejected rather than silently\nskipped. Excluding every one of your available lines returns 400 when\na line has to be picked.\n\n\n- `override_optout?: boolean`\n Send even though the recipient asked you to stop (`403`, error code\n`2024`). Applies to this request only: the opt-out stays in place, so\nthe next send without this flag is rejected again. Every override is\nrecorded against your API key.\n\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ chat_id: string; created_new_chat: boolean; from: string; from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }; handles: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]; is_group: boolean; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; service: 'iMessage' | 'SMS' | 'RCS'; previous_chat_id?: string; }`\n Result of an auto-from send. Self-describing: which line was used, which\nchat the message landed in, whether a new chat was created, and the\nresulting message id(s).\n\n\n - `chat_id: string`\n - `created_new_chat: boolean`\n - `from: string`\n - `from_selection: { reason: 'reused_active_chat' | 'new_best_number' | 'failover_flagged'; reused_existing_chat: boolean; }`\n - `handles: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }[]`\n - `is_group: boolean`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n - `service: 'iMessage' | 'SMS' | 'RCS'`\n - `previous_chat_id?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.create({\n message: {},\n to: ['+14155559876'],\n});\n\nconsole.log(message);\n```",
630
630
  perLanguage: {
631
631
  python: {
632
632
  method: 'messages.create',
@@ -654,8 +654,8 @@ const EMBEDDED_METHODS = [
654
654
  stainlessPath: '(resource) messages > (method) list_messages_thread',
655
655
  qualified: 'client.messages.listMessagesThread',
656
656
  params: ['messageId: string;', 'cursor?: string;', 'limit?: number;', "order?: 'asc' | 'desc';"],
657
- response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
658
- markdown: "## list_messages_thread\n\n`client.messages.listMessagesThread(messageId: string, cursor?: string, limit?: number, order?: 'asc' | 'desc'): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/messages/{messageId}/thread`\n\nRetrieve all messages in a conversation thread. Given any message ID in the thread,\nreturns the originator message and all replies in chronological order.\n\nIf the message is not part of a thread, returns just that single message.\n\nSupports pagination and configurable ordering.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `cursor?: string`\n Pagination cursor from previous next_cursor response\n\n- `limit?: number`\n Maximum number of messages to return\n\n- `order?: 'asc' | 'desc'`\n Sort order for messages (asc = oldest first, desc = newest first)\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\n// Automatically fetches more pages as needed.\nfor await (const message of client.messages.listMessagesThread('69a37c7d-af4f-4b5e-af42-e28e98ce873a')) {\n console.log(message);\n}\n```",
657
+ response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: reaction[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
658
+ markdown: "## list_messages_thread\n\n`client.messages.listMessagesThread(messageId: string, cursor?: string, limit?: number, order?: 'asc' | 'desc'): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/messages/{messageId}/thread`\n\nRetrieve all messages in a conversation thread. Given any message ID in the thread,\nreturns the originator message and all replies in chronological order.\n\nIf the message is not part of a thread, returns just that single message.\n\nSupports pagination and configurable ordering.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `cursor?: string`\n Pagination cursor from previous next_cursor response\n\n- `limit?: number`\n Maximum number of messages to return\n\n- `order?: 'asc' | 'desc'`\n Sort order for messages (asc = oldest first, desc = newest first)\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\n// Automatically fetches more pages as needed.\nfor await (const message of client.messages.listMessagesThread('69a37c7d-af4f-4b5e-af42-e28e98ce873a')) {\n console.log(message);\n}\n```",
659
659
  perLanguage: {
660
660
  python: {
661
661
  method: 'messages.list_messages_thread',
@@ -683,8 +683,8 @@ const EMBEDDED_METHODS = [
683
683
  stainlessPath: '(resource) messages > (method) retrieve',
684
684
  qualified: 'client.messages.retrieve',
685
685
  params: ['messageId: string;'],
686
- response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
687
- markdown: "## retrieve\n\n`client.messages.retrieve(messageId: string): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/messages/{messageId}`\n\nRetrieve a specific message by its ID. This endpoint returns the full message\ndetails including text, attachments, reactions, and metadata.\n\n\n### Parameters\n\n- `messageId: string`\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.retrieve('69a37c7d-af4f-4b5e-af42-e28e98ce873a');\n\nconsole.log(message);\n```",
686
+ response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: reaction[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
687
+ markdown: "## retrieve\n\n`client.messages.retrieve(messageId: string): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**get** `/v3/messages/{messageId}`\n\nRetrieve a specific message by its ID. This endpoint returns the full message\ndetails including text, attachments, reactions, and metadata.\n\n\n### Parameters\n\n- `messageId: string`\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.retrieve('69a37c7d-af4f-4b5e-af42-e28e98ce873a');\n\nconsole.log(message);\n```",
688
688
  perLanguage: {
689
689
  python: {
690
690
  method: 'messages.retrieve',
@@ -775,8 +775,8 @@ const EMBEDDED_METHODS = [
775
775
  stainlessPath: '(resource) messages > (method) update',
776
776
  qualified: 'client.messages.update',
777
777
  params: ['messageId: string;', 'text: string;', 'part_index?: number;'],
778
- response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
779
- markdown: "## update\n\n`client.messages.update(messageId: string, text: string, part_index?: number): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**patch** `/v3/messages/{messageId}`\n\nEdit the text content of a specific part of a previously sent message.\n\n**Note:** A message can be edited up to 5 times, and only within 15 minutes of when it was originally sent.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `text: string`\n New text content for the message part\n\n- `part_index?: number`\n Index of the message part to edit. Defaults to 0.\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.update('69a37c7d-af4f-4b5e-af42-e28e98ce873a', { text: 'This is the edited message content' });\n\nconsole.log(message);\n```",
778
+ response: "{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: object; from?: string; from_handle?: object; parts?: object | object | object | { app: object; layout: object; reactions: reaction[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: reaction[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: object; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }",
779
+ markdown: "## update\n\n`client.messages.update(messageId: string, text: string, part_index?: number): { id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: message_effect; from?: string; from_handle?: chat_handle; parts?: text_part_response | media_part_response | link_part_response | object | object[]; preferred_service?: service_type; read_at?: string; reconciled_at?: string; reply_to?: reply_to; sent_at?: string; service?: service_type; }`\n\n**patch** `/v3/messages/{messageId}`\n\nEdit the text content of a specific part of a previously sent message.\n\n**Note:** A message can be edited up to 5 times, and only within 15 minutes of when it was originally sent.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `text: string`\n New text content for the message part\n\n- `part_index?: number`\n Index of the message part to edit. Defaults to 0.\n\n### Returns\n\n- `{ id: string; chat_id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_delivered: boolean; is_from_me: boolean; is_read: boolean; updated_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from?: string; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; parts?: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; read_at?: string; reconciled_at?: string; reply_to?: { message_id: string; part_index?: number; }; sent_at?: string; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n - `id: string`\n - `chat_id: string`\n - `created_at: string`\n - `delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'`\n - `is_delivered: boolean`\n - `is_from_me: boolean`\n - `is_read: boolean`\n - `updated_at: string`\n - `delivered_at?: string`\n - `effect?: { name?: string; type?: 'screen' | 'bubble'; }`\n - `from?: string`\n - `from_handle?: { id: string; handle: string; joined_at: string; service: 'iMessage' | 'SMS' | 'RCS'; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }`\n - `parts?: { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'text'; value: string; text_decorations?: { range: number[]; animation?: 'big' | 'small' | 'shake' | 'nod' | 'explode' | 'ripple' | 'bloom' | 'jitter'; style?: 'bold' | 'italic' | 'strikethrough' | 'underline'; }[]; } | { id: string; filename: string; mime_type: string; reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; size_bytes: number; type: 'media'; url: string; } | { reactions: { handle: chat_handle; is_me: boolean; type: reaction_type; custom_emoji?: string; sticker?: object; }[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: { handle: object; is_me: boolean; type: 'love' | 'like' | 'dislike' | 'laugh' | 'emphasize' | 'question' | 'custom' | 'sticker'; custom_emoji?: string; sticker?: { file_name?: string; height?: number; mime_type?: string; url?: string; width?: number; }; }[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]`\n - `preferred_service?: 'iMessage' | 'SMS' | 'RCS'`\n - `read_at?: string`\n - `reconciled_at?: string`\n - `reply_to?: { message_id: string; part_index?: number; }`\n - `sent_at?: string`\n - `service?: 'iMessage' | 'SMS' | 'RCS'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst message = await client.messages.update('69a37c7d-af4f-4b5e-af42-e28e98ce873a', { text: 'This is the edited message content' });\n\nconsole.log(message);\n```",
780
780
  perLanguage: {
781
781
  python: {
782
782
  method: 'messages.update',
@@ -811,8 +811,8 @@ const EMBEDDED_METHODS = [
811
811
  'interactive?: boolean;',
812
812
  'url?: string;',
813
813
  ],
814
- response: "{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }",
815
- markdown: "## update_app_card\n\n`client.messages.updateAppCard(messageId: string, layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }, experience?: { action: string; name: string; params?: object; }, fallback_text?: string, interactive?: boolean, url?: string): { chat_id: string; message: sent_message; }`\n\n**post** `/v3/messages/{messageId}/update`\n\nReplaces a previously delivered `imessage_app` card on the recipient's screen with new\ncontent, instead of posting a new bubble (like a game move redrawing the board).\n\nThe update is delivered as a **new message** with its own id and delivery lifecycle\n(`message.sent` / `message.delivered` / `message.failed` webhooks fire for the new id).\nTo update the card again, reference the message id returned by this call.\n\nConstraints:\n- The referenced message must be an `imessage_app` card sent by you (`400` otherwise —\n inbound cards cannot be updated).\n- The referenced card must already be delivered (`409` otherwise — retry after the\n `message.delivered` webhook for it).\n- The app identity (`team_id`, `bundle_id`, name) is inherited from the original card and\n cannot change; only `url`, `fallback_text`, and `layout` are replaced.\n- iMessage-only, like all app cards.\n- Concurrent updates against the same card are not serialized server-side; the last one\n delivered wins on the recipient's screen. Serialize updates by always referencing the\n message id returned by the previous call.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }`\n Visible layout of the card. At least one of\n`caption`, `subcaption`, `trailing_caption`, `trailing_subcaption`, or `image_url` must be\nset, otherwise the card renders as an empty bubble.\n\n`image_url` displays a preview image at the top of the card. The image renders on the\nrecipient's card whether or not they have your app installed. The small icon beside the\ncaption is the app's own icon and is not settable here.\n\n`* Note - requires a trusted chat w/ inbound activity`\n\n`image_title` and `image_subtitle` render as text overlaid on the image (title bold, subtitle\nbeneath it). They only appear when `image_url` is set — without an image there is nothing to\noverlay — so setting either without `image_url` is rejected.\n\n - `caption?: string`\n Primary label, top-left and bold.\n - `image_subtitle?: string`\n Text shown below `image_title`, overlaid on the card image. Requires `image_url`.\n - `image_title?: string`\n Bold text overlaid on the card image. Requires `image_url` (rejected without it).\n - `image_url?: string`\n URL of an image (JPEG, PNG, HEIF, or WebP) to display as the card's preview image; an unreachable or non-image URL returns a validation error. Renders for all recipients regardless of whether they have the app. Note - requires a trusted chat w/ inbound activity. In responses, this is the re-hosted `cdn.linqapp.com` copy of the image you supplied, not your original URL.\n - `subcaption?: string`\n Secondary label, below `caption` on the left.\n - `trailing_caption?: string`\n Label shown top-right.\n - `trailing_subcaption?: string`\n Label shown below `trailing_caption`, on the right.\n\n- `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `action: string`\n Which of its actions, e.g. `attach_card`.\n - `name: string`\n The experience to invoke, e.g. `agentcard` or `agentpay`.\n - `params?: object`\n Values for the fields this action exposes. Keys are exactly the\nfield names listed for the action — no mapping, no nesting.\n\nDisplay copy only, except a `url`-type field — that value sets the\ndestination, and must be an absolute `https` URL.\n\nSome fields are read rather than sent: `agentpay`'s\n`request_payment` takes only a `checkout_url` and resolves the\namount and reason from that payment request itself, so the card\ncannot state a figure the checkout will not charge.\n\n\n- `fallback_text?: string`\n Text shown on surfaces that cannot render the card (notifications, lock screen). Defaults\nto the caption when omitted.\n\n\n- `interactive?: boolean`\n Whether the updated card renders as your app's interactive balloon for recipients who\nhave your iMessage app installed. `true` (default) lets your installed extension draw its\nlive view; `false` always shows the static `layout` card. Recipients without your app\nalways see the static card regardless of this flag.\n\nDefaults to `true` when omitted — it is **not** inherited from the original card. To keep a\ncard static across updates, re-send `interactive: false` on each update.\n\n\n- `url?: string`\n URL the recipient's app opens when they tap the updated card.\n\nMutually exclusive with `experience` and `raw_payload_data`.\n\n\n### Returns\n\n- `{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }`\n Response for sending a message to a chat\n\n - `chat_id: string`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst response = await client.messages.updateAppCard('69a37c7d-af4f-4b5e-af42-e28e98ce873a', { layout: {} });\n\nconsole.log(response);\n```",
814
+ response: "{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }",
815
+ markdown: "## update_app_card\n\n`client.messages.updateAppCard(messageId: string, layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }, experience?: { action: string; name: string; params?: object; }, fallback_text?: string, interactive?: boolean, url?: string): { chat_id: string; message: sent_message; }`\n\n**post** `/v3/messages/{messageId}/update`\n\nReplaces a previously delivered `imessage_app` card on the recipient's screen with new\ncontent, instead of posting a new bubble (like a game move redrawing the board).\n\nThe update is delivered as a **new message** with its own id and delivery lifecycle\n(`message.sent` / `message.delivered` / `message.failed` webhooks fire for the new id).\nTo update the card again, reference the message id returned by this call.\n\nConstraints:\n- The referenced message must be an `imessage_app` card sent by you (`400` otherwise —\n inbound cards cannot be updated).\n- The referenced card must already be delivered (`409` otherwise — retry after the\n `message.delivered` webhook for it).\n- The app identity (`team_id`, `bundle_id`, name) is inherited from the original card and\n cannot change; only `url`, `fallback_text`, and `layout` are replaced.\n- iMessage-only, like all app cards.\n- Concurrent updates against the same card are not serialized server-side; the last one\n delivered wins on the recipient's screen. Serialize updates by always referencing the\n message id returned by the previous call.\n\n\n### Parameters\n\n- `messageId: string`\n\n- `layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }`\n Visible layout of the card. At least one of\n`caption`, `subcaption`, `trailing_caption`, `trailing_subcaption`, or `image_url` must be\nset, otherwise the card renders as an empty bubble.\n\n`image_url` displays a preview image at the top of the card. The image renders on the\nrecipient's card whether or not they have your app installed. The small icon beside the\ncaption is the app's own icon and is not settable here.\n\n`* Note - requires a trusted chat w/ inbound activity`\n\n`image_title` and `image_subtitle` render as text overlaid on the image (title bold, subtitle\nbeneath it). They only appear when `image_url` is set — without an image there is nothing to\noverlay — so setting either without `image_url` is rejected.\n\n - `caption?: string`\n Primary label, top-left and bold.\n - `image_subtitle?: string`\n Text shown below `image_title`, overlaid on the card image. Requires `image_url`.\n - `image_title?: string`\n Bold text overlaid on the card image. Requires `image_url` (rejected without it).\n - `image_url?: string`\n URL of an image (JPEG, PNG, HEIF, or WebP) to display as the card's preview image; an unreachable or non-image URL returns a validation error. Renders for all recipients regardless of whether they have the app. Note - requires a trusted chat w/ inbound activity. In responses, this is the re-hosted `cdn.linqapp.com` copy of the image you supplied, not your original URL.\n - `subcaption?: string`\n Secondary label, below `caption` on the left.\n - `trailing_caption?: string`\n Label shown top-right.\n - `trailing_subcaption?: string`\n Label shown below `trailing_caption`, on the right.\n\n- `experience?: { action: string; name: string; params?: object; }`\n Invokes an action on an experience — a third party that renders inside\nLinq's iMessage app. Linq resolves the recipient's connection, mints any\nsession the action needs, composes the card and sends it; none of that\nis visible to you.\n\nCall `GET /v3/experiences/{experience}` for the actions you may invoke\nand the fields each accepts.\n\n - `action: string`\n Which of its actions, e.g. `attach_card`.\n - `name: string`\n The experience to invoke, e.g. `agentcard` or `agentpay`.\n - `params?: object`\n Values for the fields this action exposes. Keys are exactly the\nfield names listed for the action — no mapping, no nesting.\n\nDisplay copy only, except a `url`-type field — that value sets the\ndestination, and must be an absolute `https` URL.\n\nSome fields are read rather than sent: `agentpay`'s\n`request_payment` takes only a `checkout_url` and resolves the\namount and reason from that payment request itself, so the card\ncannot state a figure the checkout will not charge.\n\n\n- `fallback_text?: string`\n Text shown on surfaces that cannot render the card (notifications, lock screen). Defaults\nto the caption when omitted.\n\n\n- `interactive?: boolean`\n Whether the updated card renders as your app's interactive balloon for recipients who\nhave your iMessage app installed. `true` (default) lets your installed extension draw its\nlive view; `false` always shows the static `layout` card. Recipients without your app\nalways see the static card regardless of this flag.\n\nDefaults to `true` when omitted — it is **not** inherited from the original card. To keep a\ncard static across updates, re-send `interactive: false` on each update.\n\n\n- `url?: string`\n URL the recipient's app opens when they tap the updated card.\n\nMutually exclusive with `experience` and `raw_payload_data`.\n\n\n### Returns\n\n- `{ chat_id: string; message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: text_part_response | media_part_response | link_part_response | object | object[]; sent_at: string; delivered_at?: string; effect?: message_effect; from_handle?: chat_handle; preferred_service?: service_type; reply_to?: reply_to; service?: service_type; }; }`\n Response for sending a message to a chat\n\n - `chat_id: string`\n - `message: { id: string; created_at: string; delivery_status: 'pending' | 'queued' | 'sent' | 'delivered' | 'received' | 'read' | 'failed'; is_read: boolean; parts: { reactions: reaction[]; type: 'text'; value: string; text_decorations?: text_decoration[]; } | { id: string; filename: string; mime_type: string; reactions: reaction[]; size_bytes: number; type: 'media'; url: string; } | { reactions: reaction[]; type: 'link'; value: string; } | { app: { bundle_id: string; name: string; team_id: string; app_store_id?: number; }; layout: { caption?: string; image_subtitle?: string; image_title?: string; image_url?: string; subcaption?: string; trailing_caption?: string; trailing_subcaption?: string; }; reactions: object[]; type: 'imessage_app'; url: string; fallback_text?: string; } | { reactions: object[]; type: 'app_clip'; value: string; description?: string; image_url?: string; title?: string; }[]; sent_at: string; delivered_at?: string; effect?: { name?: string; type?: 'screen' | 'bubble'; }; from_handle?: { id: string; handle: string; joined_at: string; service: service_type; is_me?: boolean; left_at?: string; status?: 'active' | 'left' | 'removed'; }; preferred_service?: 'iMessage' | 'SMS' | 'RCS'; reply_to?: { message_id: string; part_index?: number; }; service?: 'iMessage' | 'SMS' | 'RCS'; }`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst response = await client.messages.updateAppCard('69a37c7d-af4f-4b5e-af42-e28e98ce873a', { layout: {} });\n\nconsole.log(response);\n```",
816
816
  perLanguage: {
817
817
  python: {
818
818
  method: 'messages.update_app_card',
@@ -2080,7 +2080,7 @@ const EMBEDDED_READMES = [
2080
2080
  },
2081
2081
  {
2082
2082
  language: 'go',
2083
- content: '# Linq API V3 Go API Library\n\n<a href="https://pkg.go.dev/github.com/linq-team/linq-go"><img src="https://pkg.go.dev/badge/github.com/linq-team/linq-go.svg" alt="Go Reference"></a>\n\nThe Linq API V3 Go library provides convenient access to the [Linq API V3 REST API](https://docs.linqapp.com)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Linq API V3 MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40linqapp%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsaW5xYXBwL3Nkay1tY3AiXSwiZW52Ijp7IkxJTlFfQVBJX1YzX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiTElOUV9XRUJIT09LX1NFQ1JFVCI6Ik15IFdlYmhvb2sgU2VjcmV0In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40linqapp%2Fsdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40linqapp%2Fsdk-mcp%22%5D%2C%22env%22%3A%7B%22LINQ_API_V3_API_KEY%22%3A%22My%20API%20Key%22%2C%22LINQ_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/linq-team/linq-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/linq-team/linq-go@v0.35.0\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/linq-team/linq-go"\n\t"github.com/linq-team/linq-go/option"\n)\n\nfunc main() {\n\tclient := linqgo.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("LINQ_API_V3_API_KEY")\n\t)\n\tchat, err := client.Chats.New(context.TODO(), linqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.Chat)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Chats.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/linq-team/linq-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Chats.ListChatsAutoPaging(context.TODO(), linqgo.ChatListChatsParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tchat := iter.Current()\n\tfmt.Printf("%+v\\n", chat)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Chats.ListChats(context.TODO(), linqgo.ChatListChatsParams{})\nfor page != nil {\n\tfor _, chat := range page.Chats {\n\t\tfmt.Printf("%+v\\n", chat)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Chats.New(context.TODO(), linqgo.ChatNewParams{\n\tFrom: "+12052535597",\n\tMessage: linqgo.MessageContentParam{},\n\tTo: []string{"+12052532136"},\n})\nif err != nil {\n\tvar apierr *linqgo.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v3/chats": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Chats.New(\n\tctx,\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := linqgo.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Chats.New(\n\tcontext.TODO(),\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\nchat, err := client.Chats.New(\n\tcontext.TODO(),\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", chat)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/linq-team/linq-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2083
+ content: '# Linq API V3 Go API Library\n\n<a href="https://pkg.go.dev/github.com/linq-team/linq-go"><img src="https://pkg.go.dev/badge/github.com/linq-team/linq-go.svg" alt="Go Reference"></a>\n\nThe Linq API V3 Go library provides convenient access to the [Linq API V3 REST API](https://docs.linqapp.com)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Linq API V3 MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40linqapp%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsaW5xYXBwL3Nkay1tY3AiXSwiZW52Ijp7IkxJTlFfQVBJX1YzX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiTElOUV9XRUJIT09LX1NFQ1JFVCI6Ik15IFdlYmhvb2sgU2VjcmV0In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40linqapp%2Fsdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40linqapp%2Fsdk-mcp%22%5D%2C%22env%22%3A%7B%22LINQ_API_V3_API_KEY%22%3A%22My%20API%20Key%22%2C%22LINQ_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/linq-team/linq-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/linq-team/linq-go@v0.36.0\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/linq-team/linq-go"\n\t"github.com/linq-team/linq-go/option"\n)\n\nfunc main() {\n\tclient := linqgo.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("LINQ_API_V3_API_KEY")\n\t)\n\tchat, err := client.Chats.New(context.TODO(), linqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.Chat)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Chats.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/linq-team/linq-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Chats.ListChatsAutoPaging(context.TODO(), linqgo.ChatListChatsParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tchat := iter.Current()\n\tfmt.Printf("%+v\\n", chat)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Chats.ListChats(context.TODO(), linqgo.ChatListChatsParams{})\nfor page != nil {\n\tfor _, chat := range page.Chats {\n\t\tfmt.Printf("%+v\\n", chat)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Chats.New(context.TODO(), linqgo.ChatNewParams{\n\tFrom: "+12052535597",\n\tMessage: linqgo.MessageContentParam{},\n\tTo: []string{"+12052532136"},\n})\nif err != nil {\n\tvar apierr *linqgo.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v3/chats": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Chats.New(\n\tctx,\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := linqgo.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Chats.New(\n\tcontext.TODO(),\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\nchat, err := client.Chats.New(\n\tcontext.TODO(),\n\tlinqgo.ChatNewParams{\n\t\tFrom: "+12052535597",\n\t\tMessage: linqgo.MessageContentParam{},\n\t\tTo: []string{"+12052532136"},\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", chat)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/linq-team/linq-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2084
2084
  },
2085
2085
  {
2086
2086
  language: 'typescript',