@linqapp/sdk-mcp 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +17 -16
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +17 -16
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +17 -16
- package/src/server.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;
|
|
1
|
+
{"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AA8+EF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;
|
|
1
|
+
{"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AA8+EF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
|
package/local-docs-search.js
CHANGED
|
@@ -411,7 +411,7 @@ const EMBEDDED_METHODS = [
|
|
|
411
411
|
'override_optout?: boolean;',
|
|
412
412
|
],
|
|
413
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. Decorations render per recipient, not per message:\nin a group with both iMessage and SMS/RCS participants, iMessage recipients see the decorations and SMS/RCS recipients receive the same message as plain text.\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; mention?: string; mention_range?: number[];
|
|
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. Decorations render per recipient, not per message:\nin a group with both iMessage and SMS/RCS participants, iMessage recipients see the decorations and SMS/RCS recipients receive the same message as plain text.\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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
417
417
|
method: 'client.Chats.Messages.Send',
|
|
@@ -440,7 +440,7 @@ const EMBEDDED_METHODS = [
|
|
|
440
440
|
qualified: 'client.chats.messages.list',
|
|
441
441
|
params: ['chatId: string;', 'cursor?: string;', 'limit?: number;'],
|
|
442
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; mention?: string; mention_range?: number[];
|
|
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; mention?: string; mention_range?: number[]; 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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
446
446
|
method: 'client.Chats.Messages.List',
|
|
@@ -626,7 +626,7 @@ const EMBEDDED_METHODS = [
|
|
|
626
626
|
'Idempotency-Key?: string;',
|
|
627
627
|
],
|
|
628
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; mention?: string; mention_range?: number[]; mentions?: object[]; 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```",
|
|
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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
632
632
|
method: 'client.Messages.New',
|
|
@@ -655,7 +655,7 @@ const EMBEDDED_METHODS = [
|
|
|
655
655
|
qualified: 'client.messages.listMessagesThread',
|
|
656
656
|
params: ['messageId: string;', 'cursor?: string;', 'limit?: number;', "order?: 'asc' | 'desc';"],
|
|
657
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; mention?: string; mention_range?: number[];
|
|
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; mention?: string; mention_range?: number[]; 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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
661
661
|
method: 'client.Messages.ListMessagesThread',
|
|
@@ -684,7 +684,7 @@ const EMBEDDED_METHODS = [
|
|
|
684
684
|
qualified: 'client.messages.retrieve',
|
|
685
685
|
params: ['messageId: string;'],
|
|
686
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; mention?: string; mention_range?: number[];
|
|
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; mention?: string; mention_range?: number[]; 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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
690
690
|
method: 'client.Messages.Get',
|
|
@@ -776,7 +776,7 @@ const EMBEDDED_METHODS = [
|
|
|
776
776
|
qualified: 'client.messages.update',
|
|
777
777
|
params: ['messageId: string;', 'text: string;', 'part_index?: number;'],
|
|
778
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; mention?: string; mention_range?: number[];
|
|
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; mention?: string; mention_range?: number[]; 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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
782
782
|
method: 'client.Messages.Update',
|
|
@@ -812,7 +812,7 @@ const EMBEDDED_METHODS = [
|
|
|
812
812
|
'url?: string;',
|
|
813
813
|
],
|
|
814
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; mention?: string; mention_range?: number[];
|
|
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; mention?: string; mention_range?: number[]; 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
|
go: {
|
|
818
818
|
method: 'client.Messages.UpdateAppCard',
|
|
@@ -1189,6 +1189,7 @@ const EMBEDDED_METHODS = [
|
|
|
1189
1189
|
'currency?: string;',
|
|
1190
1190
|
'customer_id?: string;',
|
|
1191
1191
|
'description?: string;',
|
|
1192
|
+
'discount?: { coupon?: string; label?: string; promotion_code?: string; };',
|
|
1192
1193
|
'from?: string;',
|
|
1193
1194
|
'metadata?: object;',
|
|
1194
1195
|
"mode?: 'payment' | 'subscription';",
|
|
@@ -1200,8 +1201,8 @@ const EMBEDDED_METHODS = [
|
|
|
1200
1201
|
'trial_period_days?: number;',
|
|
1201
1202
|
'Idempotency-Key?: string;',
|
|
1202
1203
|
],
|
|
1203
|
-
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1204
|
-
markdown: "## create\n\n`client.paymentRequests.create(amount?: number, currency?: string, customer_id?: string, description?: string, from?: string, metadata?: object, mode?: 'payment' | 'subscription', payer_handle?: string, price_id?: string, quantity?: number, rail?: 'stripe' | 'natural', trial_end?: string, trial_period_days?: number, Idempotency-Key?: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**post** `/v3/payment_requests`\n\nCreates a payment request and returns a `checkout_url` the recipient\nopens to pay with Apple Pay or card. Funds settle directly to your\nconnected Stripe account. A payment request is independent of any chat;\nto associate one with a chat for your records, store the chat id in\n`metadata`. Requires your connected account to be `charges_enabled`\n(returns `403` otherwise).\n\nSet `mode: subscription` with a recurring `price_id` from your connected\nStripe account to start an **auto-renewing subscription** instead of a\none-time charge — the recipient pays the first invoice at checkout and\nthe response's `stripe` object carries the customer and subscription ids\nfor the ongoing lifecycle in your own Stripe account. See the\n*Subscriptions* section of the tag overview.\n\nIn either mode, pass `customer_id` to attach the request to an\n**existing Customer** on your connected account instead of creating a\nnew one — see *Pre-created customers* in the tag overview.\n\n\n### Parameters\n\n- `amount?: number`\n Amount to charge, in the currency's minor units (e.g. cents). Must be\nat least the payment provider's minimum (50 for `usd`). Required in\n`payment` mode; must be omitted in `subscription` mode (the amount\ncomes from the price).\n\n\n- `currency?: string`\n Three-letter ISO 4217 currency code. Only `usd` is currently\nsupported. Required in `payment` mode; must be omitted in\n`subscription` mode (the currency comes from the price).\n\n\n- `customer_id?: string`\n Optional id of an **existing Customer** on your connected Stripe\naccount (`cus_...`) to attach this request to, instead of a new\nCustomer being created. In `payment` mode the charge lands on that\ncustomer's payment history; in `subscription` mode the subscription\nis created on them. The customer must exist (and not be deleted) on\nyour connected account.\n\n\n- `description?: string`\n Optional description shown to the recipient at checkout.\n\n- `from?: string`\n Required for `rail: natural`. The line the request is sent from, in\nE.164 format. Must be a phone number your organization owns.\n\n\n- `metadata?: object`\n Optional key/value metadata (up to 49 keys) echoed back on retrieval\nand on `payment.*` webhooks, and stamped on the Stripe objects we\ncreate on your connected account (the PaymentIntent, and in\nsubscription mode the Subscription and any Customer created for\nyou — a customer you pass via `customer_id` is never modified) —\nuse it to correlate a request with your own records (e.g. a chat\nid). Keys starting with `linq_` are reserved.\n\n\n- `mode?: 'payment' | 'subscription'`\n `payment` (default) collects a one-time charge for `amount` +\n`currency`. `subscription` starts an auto-renewing subscription from\na recurring `price_id` on your connected Stripe account: the\nrecipient pays the first invoice at checkout and Stripe renews it\nautomatically from then on.\n\n\n- `payer_handle?: string`\n Required for `rail: natural`. The payer to bill, in E.164 format.\n\n\n- `price_id?: string`\n Subscription mode only (required there): id of an **active recurring\nPrice** on your connected Stripe account (`price_...`). If you sell\nthrough Stripe Payment Links today, pass the same price the link was\nbuilt from to get the native iMessage checkout for it.\n\n\n- `quantity?: number`\n Subscription mode only — units of the price to subscribe to.\n\n- `rail?: 'stripe' | 'natural'`\n Payment rail. `stripe` (default) is the direct-charge flow that\nsettles to your connected Stripe account. `natural` collects through\nthe Natural custodial wallet; it requires `from` + `payer_handle` and\nthat your organization has completed Natural merchant onboarding.\n\n\n- `trial_end?: string`\n Subscription mode only — end the free trial at a fixed timestamp\n(must be in the future) instead of a day count. Mutually exclusive\nwith `trial_period_days`.\n\n\n- `trial_period_days?: number`\n Subscription mode only — start with a free trial of this many days.\nThe recipient's card is still collected at checkout (Apple Pay or\ncard), saved to the subscription, and first charged when the trial\nends. Mutually exclusive with `trial_end`.\n\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.create();\n\nconsole.log(paymentRequest);\n```",
|
|
1204
|
+
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1205
|
+
markdown: "## create\n\n`client.paymentRequests.create(amount?: number, currency?: string, customer_id?: string, description?: string, discount?: { coupon?: string; label?: string; promotion_code?: string; }, from?: string, metadata?: object, mode?: 'payment' | 'subscription', payer_handle?: string, price_id?: string, quantity?: number, rail?: 'stripe' | 'natural', trial_end?: string, trial_period_days?: number, Idempotency-Key?: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: object; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**post** `/v3/payment_requests`\n\nCreates a payment request and returns a `checkout_url` the recipient\nopens to pay with Apple Pay or card. Funds settle directly to your\nconnected Stripe account. A payment request is independent of any chat;\nto associate one with a chat for your records, store the chat id in\n`metadata`. Requires your connected account to be `charges_enabled`\n(returns `403` otherwise).\n\nSet `mode: subscription` with a recurring `price_id` from your connected\nStripe account to start an **auto-renewing subscription** instead of a\none-time charge — the recipient pays the first invoice at checkout and\nthe response's `stripe` object carries the customer and subscription ids\nfor the ongoing lifecycle in your own Stripe account. See the\n*Subscriptions* section of the tag overview.\n\nIn either mode, pass `customer_id` to attach the request to an\n**existing Customer** on your connected account instead of creating a\nnew one — see *Pre-created customers* in the tag overview.\n\n\n### Parameters\n\n- `amount?: number`\n Amount to charge, in the currency's minor units (e.g. cents). Must be\nat least the payment provider's minimum (50 for `usd`). Required in\n`payment` mode; must be omitted in `subscription` mode (the amount\ncomes from the price).\n\n\n- `currency?: string`\n Three-letter ISO 4217 currency code. Only `usd` is currently\nsupported. Required in `payment` mode; must be omitted in\n`subscription` mode (the currency comes from the price).\n\n\n- `customer_id?: string`\n Optional id of an **existing Customer** on your connected Stripe\naccount (`cus_...`) to attach this request to, instead of a new\nCustomer being created. In `payment` mode the charge lands on that\ncustomer's payment history; in `subscription` mode the subscription\nis created on them. The customer must exist (and not be deleted) on\nyour connected account.\n\n\n- `description?: string`\n Optional description shown to the recipient at checkout.\n\n- `discount?: { coupon?: string; label?: string; promotion_code?: string; }`\n Subscription mode only. The coupon or promotion code to apply to\nthis subscription payment. Currently, only accept one coupon or one\npromo code.\n\n - `coupon?: string`\n The ID of the coupon to apply to this subscription.\n - `label?: string`\n Name of the coupon/promo code displayed to customers.\n - `promotion_code?: string`\n The ID of a promotion code to apply to this subscription.\n\n- `from?: string`\n Required for `rail: natural`. The line the request is sent from, in\nE.164 format. Must be a phone number your organization owns.\n\n\n- `metadata?: object`\n Optional key/value metadata (up to 49 keys) echoed back on retrieval\nand on `payment.*` webhooks, and stamped on the Stripe objects we\ncreate on your connected account (the PaymentIntent, and in\nsubscription mode the Subscription and any Customer created for\nyou — a customer you pass via `customer_id` is never modified) —\nuse it to correlate a request with your own records (e.g. a chat\nid). Keys starting with `linq_` are reserved.\n\n\n- `mode?: 'payment' | 'subscription'`\n `payment` (default) collects a one-time charge for `amount` +\n`currency`. `subscription` starts an auto-renewing subscription from\na recurring `price_id` on your connected Stripe account: the\nrecipient pays the first invoice at checkout and Stripe renews it\nautomatically from then on.\n\n\n- `payer_handle?: string`\n Required for `rail: natural`. The payer to bill, in E.164 format.\n\n\n- `price_id?: string`\n Subscription mode only (required there): id of an **active recurring\nPrice** on your connected Stripe account (`price_...`). If you sell\nthrough Stripe Payment Links today, pass the same price the link was\nbuilt from to get the native iMessage checkout for it.\n\n\n- `quantity?: number`\n Subscription mode only — units of the price to subscribe to.\n\n- `rail?: 'stripe' | 'natural'`\n Payment rail. `stripe` (default) is the direct-charge flow that\nsettles to your connected Stripe account. `natural` collects through\nthe Natural custodial wallet; it requires `from` + `payer_handle` and\nthat your organization has completed Natural merchant onboarding.\n\n\n- `trial_end?: string`\n Subscription mode only — end the free trial at a fixed timestamp\n(must be in the future) instead of a day count. Mutually exclusive\nwith `trial_period_days`.\n\n\n- `trial_period_days?: number`\n Subscription mode only — start with a free trial of this many days.\nThe recipient's card is still collected at checkout (Apple Pay or\ncard), saved to the subscription, and first charged when the trial\nends. Mutually exclusive with `trial_end`.\n\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `discount?: { coupon?: string; label?: string; promotion_code?: string; }`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.create();\n\nconsole.log(paymentRequest);\n```",
|
|
1205
1206
|
perLanguage: {
|
|
1206
1207
|
go: {
|
|
1207
1208
|
method: 'client.PaymentRequests.New',
|
|
@@ -1229,8 +1230,8 @@ const EMBEDDED_METHODS = [
|
|
|
1229
1230
|
stainlessPath: '(resource) payment_requests > (method) retrieve',
|
|
1230
1231
|
qualified: 'client.paymentRequests.retrieve',
|
|
1231
1232
|
params: ['paymentRequestId: string;'],
|
|
1232
|
-
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1233
|
-
markdown: "## retrieve\n\n`client.paymentRequests.retrieve(paymentRequestId: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**get** `/v3/payment_requests/{paymentRequestId}`\n\nReturns a payment request's status and details.\n\n\n### Parameters\n\n- `paymentRequestId: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(paymentRequest);\n```",
|
|
1233
|
+
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1234
|
+
markdown: "## retrieve\n\n`client.paymentRequests.retrieve(paymentRequestId: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: object; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**get** `/v3/payment_requests/{paymentRequestId}`\n\nReturns a payment request's status and details.\n\n\n### Parameters\n\n- `paymentRequestId: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `discount?: { coupon?: string; label?: string; promotion_code?: string; }`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(paymentRequest);\n```",
|
|
1234
1235
|
perLanguage: {
|
|
1235
1236
|
go: {
|
|
1236
1237
|
method: 'client.PaymentRequests.Get',
|
|
@@ -1262,8 +1263,8 @@ const EMBEDDED_METHODS = [
|
|
|
1262
1263
|
'offset?: number;',
|
|
1263
1264
|
"status?: 'requested' | 'authorized' | 'succeeded' | 'canceled' | 'expired' | 'declined';",
|
|
1264
1265
|
],
|
|
1265
|
-
response: "{ data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }[]; has_more: boolean; object: 'list'; }",
|
|
1266
|
-
markdown: "## list\n\n`client.paymentRequests.list(limit?: number, offset?: number, status?: 'requested' | 'authorized' | 'succeeded' | 'canceled' | 'expired' | 'declined'): { data: payment_request[]; has_more: boolean; object: 'list'; }`\n\n**get** `/v3/payment_requests`\n\nLists your payment requests, newest first, for reconciliation. Paginate\nwith `limit` + `offset`; `has_more` indicates whether another page exists.\n\n\n### Parameters\n\n- `limit?: number`\n Max results to return (default 20, max 100).\n\n- `offset?: number`\n Number of results to skip.\n\n- `status?: 'requested' | 'authorized' | 'succeeded' | 'canceled' | 'expired' | 'declined'`\n Filter by lifecycle status.\n\n### Returns\n\n- `{ data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }[]; has_more: boolean; object: 'list'; }`\n\n - `data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }[]`\n - `has_more: boolean`\n - `object: 'list'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequests = await client.paymentRequests.list();\n\nconsole.log(paymentRequests);\n```",
|
|
1266
|
+
response: "{ data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: object; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }[]; has_more: boolean; object: 'list'; }",
|
|
1267
|
+
markdown: "## list\n\n`client.paymentRequests.list(limit?: number, offset?: number, status?: 'requested' | 'authorized' | 'succeeded' | 'canceled' | 'expired' | 'declined'): { data: payment_request[]; has_more: boolean; object: 'list'; }`\n\n**get** `/v3/payment_requests`\n\nLists your payment requests, newest first, for reconciliation. Paginate\nwith `limit` + `offset`; `has_more` indicates whether another page exists.\n\n\n### Parameters\n\n- `limit?: number`\n Max results to return (default 20, max 100).\n\n- `offset?: number`\n Number of results to skip.\n\n- `status?: 'requested' | 'authorized' | 'succeeded' | 'canceled' | 'expired' | 'declined'`\n Filter by lifecycle status.\n\n### Returns\n\n- `{ data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: object; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }[]; has_more: boolean; object: 'list'; }`\n\n - `data: { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }[]`\n - `has_more: boolean`\n - `object: 'list'`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequests = await client.paymentRequests.list();\n\nconsole.log(paymentRequests);\n```",
|
|
1267
1268
|
perLanguage: {
|
|
1268
1269
|
go: {
|
|
1269
1270
|
method: 'client.PaymentRequests.List',
|
|
@@ -1291,8 +1292,8 @@ const EMBEDDED_METHODS = [
|
|
|
1291
1292
|
stainlessPath: '(resource) payment_requests > (method) cancel',
|
|
1292
1293
|
qualified: 'client.paymentRequests.cancel',
|
|
1293
1294
|
params: ['paymentRequestId: string;'],
|
|
1294
|
-
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1295
|
-
markdown: "## cancel\n\n`client.paymentRequests.cancel(paymentRequestId: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**post** `/v3/payment_requests/{paymentRequestId}/cancel`\n\nCancels an unpaid payment request: the underlying payment intent is\ncanceled and the request moves to `canceled`. A request that is already\npaid, canceled, or expired returns 409.\n\n\n### Parameters\n\n- `paymentRequestId: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(paymentRequest);\n```",
|
|
1295
|
+
response: "{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }",
|
|
1296
|
+
markdown: "## cancel\n\n`client.paymentRequests.cancel(paymentRequestId: string): { id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: object; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: object; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: object; trial_end?: string; updated_at?: string; }`\n\n**post** `/v3/payment_requests/{paymentRequestId}/cancel`\n\nCancels an unpaid payment request: the underlying payment intent is\ncanceled and the request moves to `canceled`. A request that is already\npaid, canceled, or expired returns 409.\n\n\n### Parameters\n\n- `paymentRequestId: string`\n\n### Returns\n\n- `{ id: string; amount: number; checkout_url: string; created_at: string; currency: string; mode: 'payment' | 'subscription'; object: string; status: 'requested' | 'succeeded' | 'canceled' | 'expired'; description?: string; discount?: { coupon?: string; label?: string; promotion_code?: string; }; expires_at?: string; interval?: 'day' | 'week' | 'month' | 'year'; interval_count?: number; metadata?: object; natural?: { payment_request_id?: string; transaction_id?: string; }; paid_at?: string; price_id?: string; quantity?: number; rail?: 'stripe' | 'natural'; stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }; trial_end?: string; updated_at?: string; }`\n\n - `id: string`\n - `amount: number`\n - `checkout_url: string`\n - `created_at: string`\n - `currency: string`\n - `mode: 'payment' | 'subscription'`\n - `object: string`\n - `status: 'requested' | 'succeeded' | 'canceled' | 'expired'`\n - `description?: string`\n - `discount?: { coupon?: string; label?: string; promotion_code?: string; }`\n - `expires_at?: string`\n - `interval?: 'day' | 'week' | 'month' | 'year'`\n - `interval_count?: number`\n - `metadata?: object`\n - `natural?: { payment_request_id?: string; transaction_id?: string; }`\n - `paid_at?: string`\n - `price_id?: string`\n - `quantity?: number`\n - `rail?: 'stripe' | 'natural'`\n - `stripe?: { customer_id?: string; payment_intent_id?: string; subscription_id?: string; }`\n - `trial_end?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LinqAPIV3 from '@linqapp/sdk';\n\nconst client = new LinqAPIV3();\n\nconst paymentRequest = await client.paymentRequests.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(paymentRequest);\n```",
|
|
1296
1297
|
perLanguage: {
|
|
1297
1298
|
go: {
|
|
1298
1299
|
method: 'client.PaymentRequests.Cancel',
|
|
@@ -2099,7 +2100,7 @@ const EMBEDDED_METHODS = [
|
|
|
2099
2100
|
const EMBEDDED_READMES = [
|
|
2100
2101
|
{
|
|
2101
2102
|
language: 'go',
|
|
2102
|
-
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[](https://cursor.com/en-US/install-mcp?name=%40linqapp%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsaW5xYXBwL3Nkay1tY3AiXSwiZW52Ijp7IkxJTlFfQVBJX1YzX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiTElOUV9XRUJIT09LX1NFQ1JFVCI6Ik15IFdlYmhvb2sgU2VjcmV0In19)\n[](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.42.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',
|
|
2103
|
+
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[](https://cursor.com/en-US/install-mcp?name=%40linqapp%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsaW5xYXBwL3Nkay1tY3AiXSwiZW52Ijp7IkxJTlFfQVBJX1YzX0FQSV9LRVkiOiJNeSBBUEkgS2V5IiwiTElOUV9XRUJIT09LX1NFQ1JFVCI6Ik15IFdlYmhvb2sgU2VjcmV0In19)\n[](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.43.1\'\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',
|
|
2103
2104
|
},
|
|
2104
2105
|
{
|
|
2105
2106
|
language: 'python',
|