/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ interface paths { "/api/v1/posts": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List posts */ get: operations["listPosts"]; put?: never; /** Create a post */ post: operations["createPost"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/posts/channels": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List connected post channels */ get: operations["listPostChannels"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/posts/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get post detail */ get: operations["getPost"]; put?: never; post?: never; /** Delete a post */ delete: operations["deletePost"]; options?: never; head?: never; /** Update a draft post */ patch: operations["updatePost"]; trace?: never; }; "/api/v1/posts/{id}/schedule": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; /** Schedule a post */ post: operations["schedulePost"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/posts/{id}/publish": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; /** Publish a post */ post: operations["publishPost"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/emails": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Send a transactional email */ post: operations["sendEmail"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/emails/batch": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Send a batch of transactional emails */ post: operations["batchSendEmails"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/emails/templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List active email templates */ get: operations["listEmailTemplates"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/emails/templates/{slug}": { parameters: { query?: never; header?: never; path: { slug: components["parameters"]["Slug"]; }; cookie?: never; }; /** Get an email template */ get: operations["getEmailTemplate"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/emails/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get sent email status */ get: operations["getEmailSend"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/contacts": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List contacts */ get: operations["listContacts"]; put?: never; /** Create a contact */ post: operations["createContact"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/contacts/import": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Import contacts */ post: operations["importContacts"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/contacts/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a contact */ get: operations["getContact"]; put?: never; post?: never; /** Delete a contact */ delete: operations["deleteContact"]; options?: never; head?: never; /** Update a contact */ patch: operations["updateContact"]; trace?: never; }; "/api/v1/contacts/{id}/activities": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** List contact activities */ get: operations["listContactActivities"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/contacts/{id}/notes": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; /** Add a contact note */ post: operations["addContactNote"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/deals": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List deals */ get: operations["listDeals"]; put?: never; /** Create a deal */ post: operations["createDeal"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/deals/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a deal */ get: operations["getDeal"]; put?: never; post?: never; /** Delete a deal */ delete: operations["deleteDeal"]; options?: never; head?: never; /** Update a deal */ patch: operations["updateDeal"]; trace?: never; }; "/api/v1/gdpr/export": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Request a GDPR export */ post: operations["requestGdprExport"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/gdpr/exports": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List GDPR exports */ get: operations["listGdprExports"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/gdpr/exports/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a GDPR export */ get: operations["getGdprExport"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/gdpr/consent": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Record GDPR consent */ post: operations["recordGdprConsent"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/gdpr/consent/{email}": { parameters: { query?: never; header?: never; path: { email: string; }; cookie?: never; }; /** Get GDPR consent records */ get: operations["getGdprConsent"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/cookie-consent": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Record cookie consent */ post: operations["recordCookieConsent"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/me/workspaces": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List accessible workspaces */ get: operations["listWorkspaces"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/helpdesk/conversations": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List helpdesk conversations */ get: operations["listHelpdeskConversations"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/helpdesk/conversations/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a helpdesk conversation */ get: operations["getHelpdeskConversation"]; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Update a conversation's status or assignee * @description Set `status` and/or `assignee_user_id` (`null` unassigns). At least one field is required. Capability-scoped tokens must send `Idempotency-Key` and `X-Capability-Confirmation` headers on this route; API keys with legacy scopes may omit them. */ patch: operations["updateHelpdeskConversation"]; trace?: never; }; "/api/v1/helpdesk/conversations/{id}/messages": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** List conversation messages */ get: operations["listHelpdeskConversationMessages"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/helpdesk/replies": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Send an operator reply or internal note * @description Send an `Idempotency-Key` header so retried requests do not create duplicate messages — it is required for capability-scoped tokens (together with `X-Capability-Confirmation`). */ post: operations["createHelpdeskReply"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/webhooks": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List webhook endpoints */ get: operations["listWebhooks"]; put?: never; /** * Create a webhook endpoint * @description The response's `data.secret` contains the signing secret EXACTLY ONCE — it can never be retrieved again, so store it securely immediately. An idempotent replay (same `Idempotency-Key`) returns the existing endpoint WITHOUT `secret`. Deliveries are HTTP POSTs signed with `X-Medal-Signature: sha256=` plus `X-Medal-Timestamp`, `X-Medal-Event`, and `X-Medal-Delivery-Id` / `Idempotency-Key` headers. */ post: operations["createWebhook"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/webhooks/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a webhook endpoint */ get: operations["getWebhook"]; put?: never; post?: never; /** * Delete a webhook endpoint * @description Permanently deletes the endpoint and stops all outbound deliveries. Capability-scoped tokens must send `Idempotency-Key` and `X-Capability-Confirmation` headers on this route; API keys with legacy scopes may omit them. */ delete: operations["deleteWebhook"]; options?: never; head?: never; /** * Update a webhook endpoint * @description Only provided fields change. Pass `null` for `channels` or `channel_connection_ids` to clear that filter. */ patch: operations["updateWebhook"]; trace?: never; }; "/api/v1/webhooks/{id}/deliveries": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** List recent deliveries */ get: operations["listWebhookDeliveries"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/webhooks/{id}/test": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; /** * Queue a test delivery * @description Queues a signed `test.ping` delivery to the endpoint. */ post: operations["testWebhook"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/capability-confirmations": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Issue a capability confirmation token * @description Mints a short-lived `X-Capability-Confirmation` token for one pending write. Confirmable write routes require BOTH `Idempotency-Key` and `X-Capability-Confirmation` when the credential holds the capability scope directly; API keys with legacy scopes are exempt. The token is bound to the workspace, auth subject, method, path, required scopes and idempotency key, and expires within 15 minutes. `user_approved: true` asserts that a human on the caller's side approved this exact action. */ post: operations["issueCapabilityConfirmation"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/channels/connect-links": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List connect links * @description Link tokens are never returned. Newest first, cursor-paginated. The `channel_type` / `status` filters are applied within each page, so a page may hold fewer than `limit` items while `pagination.has_more` is still true — page off `has_more`, not the item count. */ get: operations["listChannelConnectLinks"]; put?: never; /** * Mint a hosted connect link * @description Mints a single-use hosted connect link that lets an external person (no Medal account required) attach a channel account (e.g. `telegram_inbox`) to the workspace's helpdesk. The response's `data.url` contains the one-time link token EXACTLY ONCE — an idempotent replay (same `Idempotency-Key`) returns the link WITHOUT `url`. Requires the `channel.connect.manage` scope; OAuth callers additionally need the workspace `admin` role. */ post: operations["createChannelConnectLink"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/channels/connect-links/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; post?: never; /** * Revoke a connect link * @description Revokes a pending connect link so it can no longer be consumed. OAuth callers need the workspace `admin` role. */ delete: operations["revokeChannelConnectLink"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/channels/connections": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List channel connections * @description The workspace's channel connections in a generic, channel-agnostic shape. Newest first, cursor-paginated. Rows that are not projectable as connections are dropped within the page, so a page may hold fewer than `limit` items while `pagination.has_more` is still true — page off `has_more`, not the item count. */ get: operations["listChannelConnections"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/channels/connections/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; get?: never; put?: never; post?: never; /** * Disconnect a channel connection * @description Disconnects a connected channel account (best-effort platform logout, then local revoke). Emits a `helpdesk.channel_disconnected` webhook event with `reason: "api_disconnect"` if the account was previously connected. OAuth callers need the workspace `admin` role. */ delete: operations["disconnectChannelConnection"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/scan": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Queue a company/site scan * @description Queues an asynchronous scan. Provide exactly one of `url`, `orgnr`, or `name`; poll the returned id via `GET /api/v1/scan/{id}`. */ post: operations["createScan"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/scan/companies": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Search the Norwegian company registry */ get: operations["searchScanCompanies"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/v1/scan/{id}": { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; /** Get a scan job */ get: operations["getScan"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } type webhooks = Record; interface components { schemas: { ApiError: { error: { code: string; message: string; details?: unknown; }; }; Pagination: { has_more: boolean; next_cursor: string | null; }; Success: { success: boolean; }; PostCreateResult: { id: string; }; Post: { id: string; type: components["schemas"]["PostType"]; title: string | null; content: string; status: string; channel_ids: string[]; variant_count: number; published_count: number; failed_count: number; /** Format: date-time */ scheduled_at: string | null; /** Format: date-time */ published_at: string | null; /** Format: date-time */ created_at: string | null; /** Format: date-time */ updated_at: string | null; }; /** @enum {string} */ PostType: "social" | "newsletter" | "blog"; PostVariant: { id: string; channel_id: string; content: string; status: string; platform: string | null; channel_display_name: string | null; /** Format: date-time */ scheduled_at: string | null; /** Format: date-time */ published_at: string | null; platform_post_id: string | null; /** Format: uri */ permalink: string | null; error: string | null; }; PostDetail: components["schemas"]["Post"] & { variants: components["schemas"]["PostVariant"][]; }; Channel: { id: string; platform: string | null; display_name: string | null; platform_username: string | null; state: string; /** Format: date-time */ connected_at: string | null; }; CreatePostInput: { type?: components["schemas"]["PostType"]; title?: string; content: string; channel_ids: string[]; }; UpdatePostInput: { title?: string; content?: string; }; SchedulePostInput: { scheduled_at: number | string; }; ScheduleResult: { success: boolean; workflow_id: string; }; PublishResult: { success: boolean; workflow_id: string; }; SendEmailInput: { template_slug: string; /** Format: email */ to: string; name?: string; locale?: string; fallback_locale?: string; variables?: { [key: string]: string; }; contact_id?: string; idempotency_key?: string; /** Format: email */ copy_to?: string; /** Format: email */ copy_reply_to?: string; }; EmailSendResult: { /** @description Email send id — poll GET /api/v1/emails/{id} with it. */ id: string | null; /** @description Send id of the copy_to copy, or null when no copy was requested. */ copy_id: string | null; contact_id: string | null; status: string; }; EmailSend: { id: string; status: string; /** Format: email */ recipient_email: string; recipient_name: string | null; subject: string | null; template_id: string | null; contact_id: string | null; /** Format: date-time */ queued_at: string | null; /** Format: date-time */ sent_at: string | null; /** Format: date-time */ delivered_at: string | null; /** Format: date-time */ opened_at: string | null; /** Format: date-time */ clicked_at: string | null; error_message: string | null; }; BatchSendInput: { template_slug: string; default_locale?: string; recipients: { /** Format: email */ email: string; name?: string; locale?: string; variables?: { [key: string]: string; }; }[]; }; BatchSendSummary: { batch_id: string; total: number; queued: number; failed: number; /** @description Per-recipient outcome, in request order. */ results: components["schemas"]["BatchSendRecipientResult"][]; }; BatchSendRecipientResult: { /** Format: email */ email: string; /** @description Email send id — poll GET /api/v1/emails/{id} with it. Null when not queued. */ id: string | null; /** @enum {string} */ status: "queued" | "failed"; /** @description Failure reason for recipients that were not queued. */ error: string | null; }; EmailTemplate: { id: string; name: string; slug: string; type: string | null; subject: string | null; default_locale: string; available_locales: string[]; description: string | null; category: string | null; label_ids: string[]; is_active: boolean; is_archived: boolean; version: number; /** Format: date-time */ created_at: string | null; /** Format: date-time */ updated_at: string | null; }; EmailTemplateDetail: components["schemas"]["EmailTemplate"] & { html_content: string | null; text_content: string | null; preview_text: string | null; from_name: string | null; /** Format: email */ from_email: string | null; /** Format: email */ reply_to: string | null; requested_locale: string | null; resolved_locale: string; content_source: string; localizations: { locale: string | null; subject: string | null; html_content: string | null; text_content: string | null; preview_text: string | null; }[]; }; Contact: { id: string; /** Format: email */ email: string; first_name: string | null; last_name: string | null; phone: string | null; company: string | null; job_title: string | null; address: { [key: string]: string; } | null; status: components["schemas"]["ContactStatus"]; email_status: components["schemas"]["EmailStatus"]; label_ids: string[]; source: string | null; custom_fields: { [key: string]: unknown; } | null; /** Format: date-time */ created_at: string | null; /** Format: date-time */ updated_at: string | null; }; ContactCreateResult: { id: string; }; ContactUpdateResult: { /** @constant */ success: true; }; ContactRemoveResult: { /** @constant */ success: true; }; ContactNoteResult: { id: string; }; /** @enum {string} */ ContactStatus: "lead" | "prospect" | "customer" | "churned" | "archived"; /** @enum {string} */ EmailStatus: "subscribed" | "unsubscribed" | "bounced" | "complained"; CreateContactInput: { /** Format: email */ email: string; first_name?: string; last_name?: string; phone?: string; company?: string; job_title?: string; address?: { [key: string]: string; }; status?: components["schemas"]["ContactStatus"]; email_status?: components["schemas"]["EmailStatus"]; label_ids?: string[]; labels?: string[]; custom_fields?: { [key: string]: unknown; }; notes?: string | components["schemas"]["ContactNoteInput"]; }; UpdateContactInput: { /** Format: email */ email?: string; first_name?: string; last_name?: string; phone?: string; company?: string; job_title?: string; status?: components["schemas"]["ContactStatus"]; email_status?: components["schemas"]["EmailStatus"]; label_ids?: string[]; labels?: string[]; custom_fields?: { [key: string]: unknown; }; }; ContactNoteInput: { content: string; attachments?: { /** Format: uri */ url: string; name: string; type?: string; size?: number; }[]; }; ImportContactInput: { /** Format: email */ email: string; first_name?: string; last_name?: string; phone?: string; company?: string; job_title?: string; label_ids?: string[]; status?: string; }; ImportContactsResult: { added: number; skipped: number; total: number; }; Activity: { id: string; type: string; title: string | null; content: string | null; actor_name: string | null; actor_type: string | null; metadata: unknown; /** Format: date-time */ created_at: string | null; }; AddNoteInput: { content: string; }; Deal: { id: string; title: string; description: string | null; value: number | null; currency: string | null; status: components["schemas"]["DealStatus"]; brand_name: string | null; /** Format: uri */ brand_website: string | null; contact_id: string | null; contact_name: string | null; /** Format: email */ contact_email: string | null; /** Format: date */ start_date: string | null; /** Format: date */ end_date: string | null; notes: string | null; /** Format: date-time */ created_at: string | null; /** Format: date-time */ updated_at: string | null; }; DealCreateResult: { id: string; }; DealUpdateResult: { /** @constant */ success: true; }; DealRemoveResult: { /** @constant */ success: true; }; /** @enum {string} */ DealStatus: "draft" | "open" | "won" | "lost" | "negotiating" | "proposal_sent" | "on_hold" | "churned"; CreateDealInput: { title: string; description?: string; value?: number; currency?: string; brand_name?: string; /** Format: uri */ brand_website?: string; contact_id?: string; contact_name?: string; /** Format: email */ contact_email?: string; /** Format: date */ start_date?: string; /** Format: date */ end_date?: string; notes?: string; }; UpdateDealInput: { title?: string; description?: string; value?: number; currency?: string; status?: components["schemas"]["DealStatus"]; brand_name?: string; /** Format: uri */ brand_website?: string; contact_id?: string | null; contact_name?: string; /** Format: email */ contact_email?: string; /** Format: date */ start_date?: string; /** Format: date */ end_date?: string; notes?: string; }; GdprExport: { id: string; request_type: string; status: string; /** Format: date-time */ submitted_at: string | null; /** Format: date-time */ completed_at: string | null; /** Format: date-time */ due_date?: string | null; /** Format: uri */ download_url?: string | null; /** Format: date-time */ expires_at?: string | null; }; GdprExportRequest: { request_id: string; status: string; }; /** @enum {string} */ ConsentType: "marketing_email" | "analytics_tracking" | "third_party_sharing"; RecordConsentInput: { /** Format: email */ email: string; consent_type: components["schemas"]["ConsentType"]; granted: boolean; source?: string; ip_address?: string; consent_text?: string; version?: string; }; ConsentRecord: { id: string; /** Format: email */ email: string; consent_type: components["schemas"]["ConsentType"]; granted: boolean; /** Format: date-time */ granted_at: string | null; /** Format: date-time */ revoked_at: string | null; source?: string; version?: string; }; ConsentResult: { id: string; }; CookieConsentInput: { domain: string; consentStatus: string; /** Format: date-time */ consentTimestamp: string; ipAddress?: string; userAgent?: string; cookiePreferences: { [key: string]: components["schemas"]["CookieCategoryConsent"]; }; }; CookieCategoryConsent: { allowed: boolean; cookieRecords?: { cookie: string; duration: string; description: string; }[]; }; CookieConsentResult: { success: boolean; logId?: string; }; Workspace: { id: string; name: string; slug: string; } & { [key: string]: unknown; }; /** @enum {string} */ HelpdeskConversationStatus: "open" | "snoozed" | "closed"; /** @enum {string} */ HelpdeskMessageAuthorType: "visitor" | "operator" | "ai" | "system"; /** * @description `note` is operator-internal and never delivered to the customer. * @enum {string} */ HelpdeskMessageType: "chat" | "email" | "note"; HelpdeskConversation: { id: string; /** @description Channel type, e.g. `widget`, `instagram`, `messenger`, `whatsapp`, `email`. */ channel: string; channel_connection_id: string | null; status: components["schemas"]["HelpdeskConversationStatus"]; subject: string | null; assignee_user_id: string | null; contact_id: string | null; visitor_name: string | null; visitor_email: string | null; external_conversation_id: string | null; channel_account_id: string | null; message_count: number; unread_for_operator: number; /** @description Unix timestamp in milliseconds. */ last_message_at: number; last_message_preview: string | null; last_message_author_type: components["schemas"]["HelpdeskMessageAuthorType"] | null; /** @description Unix timestamp in milliseconds. */ created_at: number; /** @description Unix timestamp in milliseconds. */ updated_at: number; }; HelpdeskMessage: { id: string; conversation_id: string; author_type: components["schemas"]["HelpdeskMessageAuthorType"]; message_type: components["schemas"]["HelpdeskMessageType"]; author_user_id: string | null; author_name: string | null; body: string; /** @description Outbound delivery state, or `null` for inbound messages and internal notes. A `201` from `POST /api/v1/helpdesk/replies` means the reply was accepted, NOT delivered — the channel hand-off is asynchronous, so poll this field (or subscribe to `helpdesk.message_delivery_updated`) to learn the outcome. */ delivery_status: components["schemas"]["HelpdeskMessageDeliveryStatus"] | null; /** @description Last send error for a `failed` outbound message, otherwise `null`. */ delivery_error: string | null; /** @description Unix timestamp in milliseconds. */ created_at: number; }; /** @enum {string} */ HelpdeskMessageDeliveryStatus: "pending" | "sent" | "delivered" | "failed"; /** @description At least one field is required. */ UpdateHelpdeskConversationInput: { status?: components["schemas"]["HelpdeskConversationStatus"]; /** @description User ID to assign, or `null` to unassign. */ assignee_user_id?: string | null; }; HelpdeskConversationUpdateResult: { id: string; status: components["schemas"]["HelpdeskConversationStatus"]; assignee_user_id: string | null; }; CreateHelpdeskReplyInput: { conversation_id: string; body: string; /** * @description `note` = operator-internal note (not delivered to the customer). Default `chat`. * @enum {string} */ message_type?: "chat" | "note"; /** @description Agent display name for bridged replies (shown in widget + inbox). */ author_name?: string; }; HelpdeskReplyCreateResult: { id: string; conversation_id: string; /** @constant */ status: "created"; }; WebhookEndpoint: { id: string; name: string; /** * Format: uri * @description Destination URL (must be https). */ url: string; enabled: boolean; /** @description Subscribed event types. Empty array = all events. */ event_types: string[]; /** @description Channel-type filter (e.g. `['widget', 'whatsapp']`), or `null` for all channels. */ channels: string[] | null; /** @description Channel-connection filter, or `null` for all connections. */ channel_connection_ids: string[] | null; /** @description Last 4 characters of the signing secret, for identification. */ secret_last4: string; consecutive_failures: number; /** @description Unix timestamp in milliseconds, or `null` if never. */ last_delivery_at: number | null; /** @description Unix timestamp in milliseconds, or `null` if never. */ last_success_at: number | null; /** @description Unix timestamp in milliseconds, or `null` if never. */ last_error_at: number | null; last_error: string | null; /** @description Unix timestamp in milliseconds. */ created_at: number; /** @description Unix timestamp in milliseconds. */ updated_at: number; /** @description Full signing secret (`whsec_…`) — present ONLY in the create response, exactly once. It can never be retrieved again; store it securely immediately. An idempotent replay of the create request omits it. */ secret?: string; }; CreateWebhookInput: { name: string; /** * Format: uri * @description Destination URL — must be https. */ url: string; /** @description Event types to subscribe to (e.g. `helpdesk.message_received`). Empty = all. */ event_types: string[]; /** @description Restrict to these channel types (e.g. `['widget', 'whatsapp']`). */ channels?: string[]; /** @description Restrict to these channel connection IDs. */ channel_connection_ids?: string[]; }; /** @description Only provided fields change. */ UpdateWebhookInput: { name?: string; /** Format: uri */ url?: string; event_types?: string[]; /** @description New channel-type filter, or `null` to clear the filter. */ channels?: string[] | null; /** @description New channel-connection filter, or `null` to clear the filter. */ channel_connection_ids?: string[] | null; enabled?: boolean; }; WebhookDeleteResult: { id: string; /** @constant */ status: "deleted"; }; /** @description A delivery attempt record. `id` is the same value sent as the `X-Medal-Delivery-Id` and `Idempotency-Key` headers on the outbound request. Deliveries never carry payload bodies (payloads can contain customer PII). The correlation fields are derived from the stored event and fail closed to `null` when no canonical event exists — e.g. `test.ping` deliveries or events that have aged out of retention. */ WebhookDelivery: { id: string; event_type: string; /** @description Primary subject id of the announced event, or `null`. */ resource_id: string | null; conversation_id: string | null; message_id: string | null; connection_ref: string | null; channel: string | null; channel_connection_id: string | null; /** @enum {string} */ status: "pending" | "delivered" | "dead_letter"; attempt_count: number; /** @description Unix timestamp in milliseconds of the next retry, or `null`. */ next_attempt_at: number | null; response_status: number | null; duration_ms: number | null; last_error: string | null; /** @description Unix timestamp in milliseconds, or `null` if not delivered. */ delivered_at: number | null; /** @description Unix timestamp in milliseconds. */ created_at: number; }; WebhookTestResult: { delivery_id: string; /** @constant */ status: "queued"; }; /** @enum {string} */ ConnectLinkStatus: "pending" | "consumed" | "expired" | "revoked"; /** @enum {string} */ ChannelConnectionState: "connecting" | "active" | "disconnected" | "disabled"; CreateConnectLinkInput: { /** @description Channel type to connect (e.g. `telegram_inbox`). */ channel_type: string; /** @description Display label shown on the hosted connect page. */ label?: string; /** * Format: uri * @description URL the hosted page redirects to after a successful connect — must be https. */ redirect_url?: string; }; ConnectLinkCreateResult: { id: string; /** * Format: uri * @description Single-use hosted connect URL containing the one-time link token — present ONLY in the live create response. An idempotent replay of the create request omits it; the token can never be retrieved again. */ url?: string; channel_type: string; label: string | null; status: components["schemas"]["ConnectLinkStatus"]; /** @description Unix timestamp in milliseconds. */ expires_at: number; }; ConnectLink: { id: string; channel_type: string; label: string | null; status: components["schemas"]["ConnectLinkStatus"]; /** @description Stable ref of the connection created by consuming this link, or `null`. */ consumed_connection_ref: string | null; /** @description Unix timestamp in milliseconds. */ expires_at: number; /** @description Unix timestamp in milliseconds. */ created_at: number; }; ConnectLinkRevokeResult: { id: string; /** @constant */ status: "revoked"; }; ChannelConnection: { id: string; channel_type: string; label: string | null; state: components["schemas"]["ChannelConnectionState"]; /** @description Privacy-preserving identity handle (e.g. a masked phone number). */ masked_identity: string; /** @description Unix timestamp in milliseconds, or `null` if never active. */ last_activity_at: number | null; /** @description Linked helpdesk channel connection ID, or `null`. */ helpdesk_connection_id: string | null; }; ChannelConnectionDisconnectResult: { id: string; /** @constant */ state: "disconnected"; }; ApiResponse_PostCreateResult: components["schemas"]["Envelope_PostCreateResult"]; ApiResponse_PostDetail: components["schemas"]["Envelope_PostDetail"]; ApiResponse_Success: components["schemas"]["Envelope_Success"]; ApiResponse_ScheduleResult: components["schemas"]["Envelope_ScheduleResult"]; ApiResponse_PublishResult: components["schemas"]["Envelope_PublishResult"]; ApiResponse_ChannelArray: components["schemas"]["Envelope_ChannelArray"]; ApiResponse_EmailSendResult: components["schemas"]["Envelope_EmailSendResult"]; ApiResponse_EmailSend: components["schemas"]["Envelope_EmailSend"]; ApiResponse_BatchSendSummary: components["schemas"]["Envelope_BatchSendSummary"]; ApiResponse_EmailTemplateArray: components["schemas"]["Envelope_EmailTemplateArray"]; ApiResponse_EmailTemplateDetail: components["schemas"]["Envelope_EmailTemplateDetail"]; ApiResponse_Contact: components["schemas"]["Envelope_Contact"]; ApiResponse_ContactCreateResult: components["schemas"]["Envelope_ContactCreateResult"]; ApiResponse_ContactUpdateResult: components["schemas"]["Envelope_ContactUpdateResult"]; ApiResponse_ContactRemoveResult: components["schemas"]["Envelope_ContactRemoveResult"]; ApiResponse_ContactNoteResult: components["schemas"]["Envelope_ContactNoteResult"]; ApiResponse_ImportContactsResult: components["schemas"]["Envelope_ImportContactsResult"]; ApiResponse_Deal: components["schemas"]["Envelope_Deal"]; ApiResponse_DealCreateResult: components["schemas"]["Envelope_DealCreateResult"]; ApiResponse_DealUpdateResult: components["schemas"]["Envelope_DealUpdateResult"]; ApiResponse_DealRemoveResult: components["schemas"]["Envelope_DealRemoveResult"]; ApiResponse_GdprExportRequest: components["schemas"]["Envelope_GdprExportRequest"]; ApiResponse_GdprExportArray: components["schemas"]["Envelope_GdprExportArray"]; ApiResponse_GdprExport: components["schemas"]["Envelope_GdprExport"]; ApiResponse_ScanCreateResult: components["schemas"]["Envelope_ScanCreateResult"]; ApiResponse_ScanCompanyArray: components["schemas"]["Envelope_ScanCompanyArray"]; ApiResponse_ScanJob: components["schemas"]["Envelope_ScanJob"]; ApiResponse_ConsentResult: components["schemas"]["Envelope_ConsentResult"]; ApiResponse_ConsentRecordArray: components["schemas"]["Envelope_ConsentRecordArray"]; ApiResponse_WorkspaceArray: components["schemas"]["Envelope_WorkspaceArray"]; ApiResponse_HelpdeskConversation: components["schemas"]["Envelope_HelpdeskConversation"]; ApiResponse_HelpdeskConversationUpdateResult: components["schemas"]["Envelope_HelpdeskConversationUpdateResult"]; ApiResponse_HelpdeskReplyCreateResult: components["schemas"]["Envelope_HelpdeskReplyCreateResult"]; ApiResponse_WebhookEndpoint: components["schemas"]["Envelope_WebhookEndpoint"]; ApiResponse_WebhookEndpointArray: components["schemas"]["Envelope_WebhookEndpointArray"]; ApiResponse_WebhookDeleteResult: components["schemas"]["Envelope_WebhookDeleteResult"]; ApiResponse_WebhookDeliveryArray: components["schemas"]["Envelope_WebhookDeliveryArray"]; ApiResponse_WebhookTestResult: components["schemas"]["Envelope_WebhookTestResult"]; ApiResponse_ConnectLinkCreateResult: components["schemas"]["Envelope_ConnectLinkCreateResult"]; ApiResponse_ConnectLinkArray: components["schemas"]["Envelope_ConnectLinkArray"]; ApiResponse_ConnectLinkRevokeResult: components["schemas"]["Envelope_ConnectLinkRevokeResult"]; ApiResponse_ChannelConnectionArray: components["schemas"]["Envelope_ChannelConnectionArray"]; ApiResponse_ChannelConnectionDisconnectResult: components["schemas"]["Envelope_ChannelConnectionDisconnectResult"]; PaginatedResponse_Post: { data: components["schemas"]["Post"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_Contact: { data: components["schemas"]["Contact"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_Activity: { data: components["schemas"]["Activity"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_Deal: { data: components["schemas"]["Deal"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_HelpdeskConversation: { data: components["schemas"]["HelpdeskConversation"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_HelpdeskMessage: { data: components["schemas"]["HelpdeskMessage"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_ConnectLink: { data: components["schemas"]["ConnectLink"][]; pagination: components["schemas"]["Pagination"]; }; PaginatedResponse_ChannelConnection: { data: components["schemas"]["ChannelConnection"][]; pagination: components["schemas"]["Pagination"]; }; Envelope_PostCreateResult: { data: components["schemas"]["PostCreateResult"]; }; Envelope_PostDetail: { data: components["schemas"]["PostDetail"]; }; Envelope_Success: { data: components["schemas"]["Success"]; }; Envelope_ScheduleResult: { data: components["schemas"]["ScheduleResult"]; }; Envelope_PublishResult: { data: components["schemas"]["PublishResult"]; }; Envelope_ChannelArray: { data: components["schemas"]["Channel"][]; }; Envelope_EmailSendResult: { data: components["schemas"]["EmailSendResult"]; }; Envelope_EmailSend: { data: components["schemas"]["EmailSend"]; }; Envelope_BatchSendSummary: { data: components["schemas"]["BatchSendSummary"]; }; Envelope_EmailTemplateArray: { data: components["schemas"]["EmailTemplate"][]; }; Envelope_EmailTemplateDetail: { data: components["schemas"]["EmailTemplateDetail"]; }; Envelope_Contact: { data: components["schemas"]["Contact"]; }; Envelope_ContactCreateResult: { data: components["schemas"]["ContactCreateResult"]; }; Envelope_ContactUpdateResult: { data: components["schemas"]["ContactUpdateResult"]; }; Envelope_ContactRemoveResult: { data: components["schemas"]["ContactRemoveResult"]; }; Envelope_ContactNoteResult: { data: components["schemas"]["ContactNoteResult"]; }; Envelope_ImportContactsResult: { data: components["schemas"]["ImportContactsResult"]; }; Envelope_Deal: { data: components["schemas"]["Deal"]; }; Envelope_DealCreateResult: { data: components["schemas"]["DealCreateResult"]; }; Envelope_DealUpdateResult: { data: components["schemas"]["DealUpdateResult"]; }; Envelope_DealRemoveResult: { data: components["schemas"]["DealRemoveResult"]; }; /** @description Provide exactly one of `url`, `orgnr`, or `name`. */ ScanCreateInput: { url?: string; orgnr?: string; name?: string; } & (unknown | unknown | unknown); ScanCreateResult: { id: string; status: string; message?: string; }; ScanCompany: { orgnr: string; name: string; org_form: string | null; industry: string | null; city: string | null; website: string | null; }; ScanJob: { id: string; /** @description pending | running | done | failed */ status: string; input: components["schemas"]["ScanCreateInput"]; resolved: { orgnr?: string; companyName?: string; websiteUrl?: string; } | null; /** @description Versioned findings payload (see the SDK `ScanResultPayload` type); additive per `version`. The stable core is documented below; further sections (registry, signals, pagespeed, seo, ai, gdpr, mailAuth, httpsOk) evolve additively. */ result: ({ version: number; /** @description Weighted composite score (0-100); null when unmeasurable. */ nettskaar: number | null; /** @description Per-axis 0-100 scores; null axes were unmeasurable. */ subScores: { fart: number | null; google: number | null; ai: number | null; trygghet: number | null; omdomme: number | null; }; } & { [key: string]: unknown; }) | null; /** @description Public-safe failure code (company_not_found, no_website, …). */ error: string | null; /** Format: date-time */ created_at: string | null; /** Format: date-time */ finished_at: string | null; }; Envelope_ScanCreateResult: { data: components["schemas"]["ScanCreateResult"]; }; Envelope_ScanCompanyArray: { data: components["schemas"]["ScanCompany"][]; }; Envelope_ScanJob: { data: components["schemas"]["ScanJob"]; }; Envelope_GdprExportRequest: { data: components["schemas"]["GdprExportRequest"]; }; Envelope_GdprExportArray: { data: components["schemas"]["GdprExport"][]; }; Envelope_GdprExport: { data: components["schemas"]["GdprExport"]; }; Envelope_ConsentResult: { data: components["schemas"]["ConsentResult"]; }; Envelope_ConsentRecordArray: { data: components["schemas"]["ConsentRecord"][]; }; Envelope_WorkspaceArray: { data: components["schemas"]["Workspace"][]; }; Envelope_HelpdeskConversation: { data: components["schemas"]["HelpdeskConversation"]; }; Envelope_HelpdeskConversationUpdateResult: { data: components["schemas"]["HelpdeskConversationUpdateResult"]; }; Envelope_HelpdeskReplyCreateResult: { data: components["schemas"]["HelpdeskReplyCreateResult"]; }; Envelope_WebhookEndpoint: { data: components["schemas"]["WebhookEndpoint"]; }; Envelope_WebhookEndpointArray: { data: components["schemas"]["WebhookEndpoint"][]; }; Envelope_WebhookDeleteResult: { data: components["schemas"]["WebhookDeleteResult"]; }; IssueCapabilityConfirmationInput: { /** @description Confirmable capability to mint a token for. */ capability_id: string; /** @description Concrete `/api/v1/...` path to bind the token to. Optional when the capability has exactly one API target; required when it has several. */ api_path?: string; /** @description Values for the capability path template's parameters. */ path_params?: { [key: string]: string | number | boolean; }; /** @description The exact `Idempotency-Key` the confirmed write will send. The token is bound to it. */ idempotency_key?: string; /** @description Human-readable description of the approved action, retained for audit. */ preview_summary: string; /** * @description Asserts that a human on the caller's side approved this specific action. * @constant */ user_approved: true; }; CapabilityConfirmation: { /** @description Send as the `X-Capability-Confirmation` header on the write. */ confirmation_token: string; /** @constant */ token_type: "medal_capability_confirmation"; capability_id: string; method: string; path: string; required_scopes: string[]; idempotency_key: string | null; expires_in: number; /** Format: date-time */ expires_at: string; preview_summary: string; }; ApiResponse_CapabilityConfirmation: components["schemas"]["Envelope_CapabilityConfirmation"]; Envelope_CapabilityConfirmation: { data: components["schemas"]["CapabilityConfirmation"]; }; Envelope_WebhookDeliveryArray: { data: components["schemas"]["WebhookDelivery"][]; }; Envelope_WebhookTestResult: { data: components["schemas"]["WebhookTestResult"]; }; Envelope_ConnectLinkCreateResult: { data: components["schemas"]["ConnectLinkCreateResult"]; }; /** * @deprecated * @description Deprecated — `listChannelConnectLinks` responds with `PaginatedResponse_ConnectLink`. Retained for backwards compatibility with consumers of the generated contract types. */ Envelope_ConnectLinkArray: { data: components["schemas"]["ConnectLink"][]; }; Envelope_ConnectLinkRevokeResult: { data: components["schemas"]["ConnectLinkRevokeResult"]; }; /** * @deprecated * @description Deprecated — `listChannelConnections` responds with `PaginatedResponse_ChannelConnection`. Retained for backwards compatibility with consumers of the generated contract types. */ Envelope_ChannelConnectionArray: { data: components["schemas"]["ChannelConnection"][]; }; Envelope_ChannelConnectionDisconnectResult: { data: components["schemas"]["ChannelConnectionDisconnectResult"]; }; }; responses: { /** @description API error. */ ApiError: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiError"]; }; }; }; parameters: { Id: string; Slug: string; Cursor: string; Limit: number; }; requestBodies: never; headers: never; pathItems: never; } type $defs = Record; interface operations { listPosts: { parameters: { query?: { limit?: components["parameters"]["Limit"]; cursor?: components["parameters"]["Cursor"]; status?: string; type?: components["schemas"]["PostType"]; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Posts page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_Post"]; }; }; default: components["responses"]["ApiError"]; }; }; createPost: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreatePostInput"]; }; }; responses: { /** @description Created post reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_PostCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listPostChannels: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Connected channels. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ChannelArray"]; }; }; default: components["responses"]["ApiError"]; }; }; getPost: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Post detail. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_PostDetail"]; }; }; default: components["responses"]["ApiError"]; }; }; deletePost: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Delete result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_Success"]; }; }; default: components["responses"]["ApiError"]; }; }; updatePost: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UpdatePostInput"]; }; }; responses: { /** @description Update result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_Success"]; }; }; default: components["responses"]["ApiError"]; }; }; schedulePost: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["SchedulePostInput"]; }; }; responses: { /** @description Schedule result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ScheduleResult"]; }; }; default: components["responses"]["ApiError"]; }; }; publishPost: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Publish result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_PublishResult"]; }; }; default: components["responses"]["ApiError"]; }; }; sendEmail: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["SendEmailInput"]; }; }; responses: { /** @description Email queued. */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_EmailSendResult"]; }; }; default: components["responses"]["ApiError"]; }; }; batchSendEmails: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["BatchSendInput"]; }; }; responses: { /** @description Batch queued. */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_BatchSendSummary"]; }; }; default: components["responses"]["ApiError"]; }; }; listEmailTemplates: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Active templates. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_EmailTemplateArray"]; }; }; default: components["responses"]["ApiError"]; }; }; getEmailTemplate: { parameters: { query?: { locale?: string; fallback_locale?: string; }; header?: never; path: { slug: components["parameters"]["Slug"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Email template detail. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_EmailTemplateDetail"]; }; }; default: components["responses"]["ApiError"]; }; }; getEmailSend: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Sent email status. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_EmailSend"]; }; }; default: components["responses"]["ApiError"]; }; }; listContacts: { parameters: { query?: { limit?: components["parameters"]["Limit"]; cursor?: components["parameters"]["Cursor"]; status?: components["schemas"]["ContactStatus"]; email_status?: components["schemas"]["EmailStatus"]; /** @description Comma-separated label IDs. */ label_ids?: string; search?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Contacts page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_Contact"]; }; }; default: components["responses"]["ApiError"]; }; }; createContact: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreateContactInput"]; }; }; responses: { /** @description Created contact reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ContactCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; importContacts: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { contacts: components["schemas"]["ImportContactInput"][]; }; }; }; responses: { /** @description Import summary. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ImportContactsResult"]; }; }; default: components["responses"]["ApiError"]; }; }; getContact: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Contact. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_Contact"]; }; }; default: components["responses"]["ApiError"]; }; }; deleteContact: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Delete result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ContactRemoveResult"]; }; }; default: components["responses"]["ApiError"]; }; }; updateContact: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UpdateContactInput"]; }; }; responses: { /** @description Update result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ContactUpdateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listContactActivities: { parameters: { query?: { limit?: components["parameters"]["Limit"]; cursor?: components["parameters"]["Cursor"]; }; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Contact activities page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_Activity"]; }; }; default: components["responses"]["ApiError"]; }; }; addContactNote: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["AddNoteInput"]; }; }; responses: { /** @description Created note reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ContactNoteResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listDeals: { parameters: { query?: { limit?: components["parameters"]["Limit"]; cursor?: components["parameters"]["Cursor"]; status?: components["schemas"]["DealStatus"]; search?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Deals page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_Deal"]; }; }; default: components["responses"]["ApiError"]; }; }; createDeal: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreateDealInput"]; }; }; responses: { /** @description Created deal reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_DealCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; getDeal: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Deal. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_Deal"]; }; }; default: components["responses"]["ApiError"]; }; }; deleteDeal: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Delete result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_DealRemoveResult"]; }; }; default: components["responses"]["ApiError"]; }; }; updateDeal: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UpdateDealInput"]; }; }; responses: { /** @description Update result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_DealUpdateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; requestGdprExport: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Export request reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_GdprExportRequest"]; }; }; default: components["responses"]["ApiError"]; }; }; listGdprExports: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Export requests. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_GdprExportArray"]; }; }; default: components["responses"]["ApiError"]; }; }; getGdprExport: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Export request. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_GdprExport"]; }; }; default: components["responses"]["ApiError"]; }; }; recordGdprConsent: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["RecordConsentInput"]; }; }; responses: { /** @description Consent reference. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ConsentResult"]; }; }; default: components["responses"]["ApiError"]; }; }; getGdprConsent: { parameters: { query?: never; header?: never; path: { email: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Consent records. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ConsentRecordArray"]; }; }; default: components["responses"]["ApiError"]; }; }; recordCookieConsent: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CookieConsentInput"]; }; }; responses: { /** @description Cookie consent result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["CookieConsentResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listWorkspaces: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Workspaces. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WorkspaceArray"]; }; }; default: components["responses"]["ApiError"]; }; }; listHelpdeskConversations: { parameters: { query?: { limit?: number; cursor?: components["parameters"]["Cursor"]; status?: components["schemas"]["HelpdeskConversationStatus"]; /** @description Only conversations assigned to this user. */ assignee_user_id?: string; /** @description Match against visitor name/email. */ requester?: string; /** @description Free-text search query. */ query?: string; /** @description Comma-separated channel types (e.g. `widget,whatsapp`). */ channels?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Conversations page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_HelpdeskConversation"]; }; }; default: components["responses"]["ApiError"]; }; }; getHelpdeskConversation: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Conversation. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_HelpdeskConversation"]; }; }; default: components["responses"]["ApiError"]; }; }; updateHelpdeskConversation: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UpdateHelpdeskConversationInput"]; }; }; responses: { /** @description Update result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_HelpdeskConversationUpdateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listHelpdeskConversationMessages: { parameters: { query?: { limit?: number; cursor?: components["parameters"]["Cursor"]; }; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Messages page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_HelpdeskMessage"]; }; }; /** @description Conversation not found. */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiError"]; }; }; default: components["responses"]["ApiError"]; }; }; createHelpdeskReply: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreateHelpdeskReplyInput"]; }; }; responses: { /** @description Created reply reference. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_HelpdeskReplyCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listWebhooks: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Webhook endpoints. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookEndpointArray"]; }; }; default: components["responses"]["ApiError"]; }; }; createWebhook: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreateWebhookInput"]; }; }; responses: { /** @description Created endpoint, including the one-time `secret`. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookEndpoint"]; }; }; default: components["responses"]["ApiError"]; }; }; getWebhook: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Webhook endpoint. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookEndpoint"]; }; }; default: components["responses"]["ApiError"]; }; }; deleteWebhook: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Delete result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookDeleteResult"]; }; }; default: components["responses"]["ApiError"]; }; }; updateWebhook: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["UpdateWebhookInput"]; }; }; responses: { /** @description Updated endpoint. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookEndpoint"]; }; }; default: components["responses"]["ApiError"]; }; }; listWebhookDeliveries: { parameters: { query?: { limit?: number; }; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Recent deliveries, most recent first. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookDeliveryArray"]; }; }; default: components["responses"]["ApiError"]; }; }; testWebhook: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Test delivery queued. */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_WebhookTestResult"]; }; }; default: components["responses"]["ApiError"]; }; }; issueCapabilityConfirmation: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["IssueCapabilityConfirmationInput"]; }; }; responses: { /** @description Minted confirmation token. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_CapabilityConfirmation"]; }; }; default: components["responses"]["ApiError"]; }; }; listChannelConnectLinks: { parameters: { query?: { /** @description Page size (default 50, capped at 100). */ limit?: number; cursor?: components["parameters"]["Cursor"]; channel_type?: string; status?: components["schemas"]["ConnectLinkStatus"]; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Connect links page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_ConnectLink"]; }; }; default: components["responses"]["ApiError"]; }; }; createChannelConnectLink: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["CreateConnectLinkInput"]; }; }; responses: { /** @description Minted connect link, including the one-time `url`. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ConnectLinkCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; revokeChannelConnectLink: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Revoke result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ConnectLinkRevokeResult"]; }; }; default: components["responses"]["ApiError"]; }; }; listChannelConnections: { parameters: { query?: { /** @description Page size (default 50, capped at 100). */ limit?: number; cursor?: components["parameters"]["Cursor"]; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Channel connections page. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["PaginatedResponse_ChannelConnection"]; }; }; default: components["responses"]["ApiError"]; }; }; disconnectChannelConnection: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Disconnect result. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ChannelConnectionDisconnectResult"]; }; }; default: components["responses"]["ApiError"]; }; }; createScan: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["ScanCreateInput"]; }; }; responses: { /** @description Scan job queued. */ 202: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ScanCreateResult"]; }; }; default: components["responses"]["ApiError"]; }; }; searchScanCompanies: { parameters: { query: { q: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Registry matches (top 5, relevance-ranked). */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ScanCompanyArray"]; }; }; default: components["responses"]["ApiError"]; }; }; getScan: { parameters: { query?: never; header?: never; path: { id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: never; responses: { /** @description Scan job status and, once done, the findings payload. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["ApiResponse_ScanJob"]; }; }; default: components["responses"]["ApiError"]; }; }; } export type { $defs, components, operations, paths, webhooks };