@curviate/sdk 0.16.0 → 0.18.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.
@@ -330,6 +330,26 @@ export interface paths {
330
330
  patch?: never;
331
331
  trace?: never;
332
332
  };
333
+ "/v1/{account_id}/companies/{identifier}/follow-invite": {
334
+ parameters: {
335
+ query?: never;
336
+ header?: never;
337
+ path?: never;
338
+ cookie?: never;
339
+ };
340
+ get?: never;
341
+ put?: never;
342
+ /**
343
+ * Invite connections to follow a page
344
+ * @description Invites one or more of the connected account's 1st-degree connections to follow a company page it administers with the invite-to-follow entitlement. Pass the AC… member ids from an invitable-followers read. Returns one outcome per invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate). Only identifiers transit. Nothing is stored.
345
+ */
346
+ post: operations["postV1AccountIdCompaniesIdentifierFollowInvite"];
347
+ delete?: never;
348
+ options?: never;
349
+ head?: never;
350
+ patch?: never;
351
+ trace?: never;
352
+ };
333
353
  "/v1/{account_id}/companies/{identifier}/followers": {
334
354
  parameters: {
335
355
  query?: never;
@@ -399,7 +419,7 @@ export interface paths {
399
419
  };
400
420
  /**
401
421
  * Retrieve one admin conversation
402
- * @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page. Beta — deep pagination is being validated at scale. Single-page listing and termination are verified; deep pagination (many pages / large cursor round-trips) is provisional until validated against a busier inbox.
422
+ * @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page.
403
423
  */
404
424
  get: operations["getV1AccountIdCompaniesIdentifierChatsChatId"];
405
425
  put?: never;
@@ -419,11 +439,15 @@ export interface paths {
419
439
  };
420
440
  /**
421
441
  * List a conversation's messages
422
- * @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page. Beta — deep pagination is being validated at scale. Single-page listing and termination are verified; deep pagination (many pages / large cursor round-trips) is provisional until validated against a busier inbox.
442
+ * @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page.
423
443
  */
424
444
  get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessages"];
425
445
  put?: never;
426
- post?: never;
446
+ /**
447
+ * Reply as the company page
448
+ * @description Sends a message into an existing company-inbox conversation, as the page. chat_id must be the send-ready COMPANY_ form from GET /v1/{account_id}/inboxes/{inbox_id}/chats (the 2-… id from this group's chat reads is not send-ready and returns a guiding 400). The connected account must administer the page. Reply-only: a page can never start a new conversation, only answer an existing one. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored. The response's sent_as field names the acting identity that was actually used.
449
+ */
450
+ post: operations["postV1AccountIdCompaniesIdentifierChatsChatIdMessages"];
427
451
  delete?: never;
428
452
  options?: never;
429
453
  head?: never;
@@ -439,7 +463,7 @@ export interface paths {
439
463
  };
440
464
  /**
441
465
  * Retrieve one message from a conversation
442
- * @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page. Beta — deep pagination is being validated at scale. Single-page listing and termination are verified; deep pagination (many pages / large cursor round-trips) is provisional until validated against a busier inbox.
466
+ * @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page.
443
467
  */
444
468
  get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId"];
445
469
  put?: never;
@@ -773,7 +797,7 @@ export interface paths {
773
797
  put?: never;
774
798
  /**
775
799
  * Send a message
776
- * @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored.
800
+ * @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored. Sending on behalf of a company page: use a COMPANY_ chat id (from GET /v1/{account_id}/inboxes/{inbox_id}/chats) and the message sends AS THE PAGE, no separate parameter needed. The response's sent_as field names the acting identity that was actually used. Company pages are reply-only: this endpoint can answer an existing conversation on a page's behalf, but a page can never start a new one.
777
801
  */
778
802
  post: operations["postV1AccountIdChatsChatIdMessages"];
779
803
  delete?: never;
@@ -919,7 +943,7 @@ export interface paths {
919
943
  };
920
944
  /**
921
945
  * List an inbox's conversations
922
- * @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation. Unknown inbox id returns 404.
946
+ * @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation. A malformed inbox_id returns 400 INVALID_REQUEST; a well-formed id for a mailbox this account does not administer returns 403 RESOURCE_ACCESS_RESTRICTED (no existence disclosure) — there is no 404 for this endpoint.
923
947
  */
924
948
  get: operations["getV1AccountIdInboxesInboxIdChats"];
925
949
  put?: never;
@@ -5378,6 +5402,163 @@ export interface operations {
5378
5402
  };
5379
5403
  };
5380
5404
  };
5405
+ postV1AccountIdCompaniesIdentifierFollowInvite: {
5406
+ parameters: {
5407
+ query?: never;
5408
+ header?: never;
5409
+ path: {
5410
+ /** @description The connected LinkedIn account, which must administer the page with invite rights. */
5411
+ account_id: string;
5412
+ /** @description The company's numeric id (e.g. 112013061) — the id field of GET /v1/{account_id}/companies/{identifier} or a POST /v1/{account_id}/search/companies result. A public handle or URN is not accepted here — pass the numeric id. */
5413
+ identifier: string;
5414
+ };
5415
+ cookie?: never;
5416
+ };
5417
+ requestBody: {
5418
+ content: {
5419
+ "application/json": {
5420
+ /** @description The AC… member ids to invite to follow the page. Each is the id field of an invitable-followers read. Required, 1 to 50 per request. */
5421
+ invitee_ids: string[];
5422
+ };
5423
+ };
5424
+ };
5425
+ responses: {
5426
+ /** @description One per-invitee outcome for each requested member, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member returns the same invitation id with status "already_invited", an idempotent no-op, never a duplicate. Only identifiers transit; nothing is stored. */
5427
+ 200: {
5428
+ headers: {
5429
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
5430
+ RateLimit: components["headers"]["RateLimit"];
5431
+ [name: string]: unknown;
5432
+ };
5433
+ content: {
5434
+ "application/json": {
5435
+ /**
5436
+ * @description Response type discriminator.
5437
+ * @enum {string}
5438
+ */
5439
+ object: "company_follow_invite_result";
5440
+ /** @description One entry per requested invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. */
5441
+ results: {
5442
+ /**
5443
+ * @description Item type discriminator.
5444
+ * @enum {string}
5445
+ */
5446
+ object: "company_follow_invite";
5447
+ /** @description The member id from the request, echoed back. */
5448
+ invitee_id: string;
5449
+ /**
5450
+ * @description Per-invitee outcome. "invited": a new follow-invitation was created. "already_invited": a pending invitation already existed (idempotent no-op; the same invitation_id is returned, never a duplicate). "ineligible": the member is not an invitable 1st-degree connection. "not_found": the member id did not resolve.
5451
+ * @enum {string}
5452
+ */
5453
+ status: "invited" | "already_invited" | "ineligible" | "not_found";
5454
+ /** @description The invitation id, present for "invited" and "already_invited", null for a per-invitee failure. */
5455
+ invitation_id: string | null;
5456
+ /** @description Present only for a per-invitee failure ("ineligible" / "not_found"); null otherwise. */
5457
+ error: {
5458
+ /** @description Canonical error code for this invitee's failure. */
5459
+ code?: string;
5460
+ /** @description Human-readable failure reason. */
5461
+ message?: string;
5462
+ } | null;
5463
+ }[];
5464
+ };
5465
+ };
5466
+ };
5467
+ /** @description Empty, over-cap (>50), or malformed invitee_ids, or a non-numeric identifier, rejected before any send. */
5468
+ 400: {
5469
+ headers: {
5470
+ [name: string]: unknown;
5471
+ };
5472
+ content: {
5473
+ "application/json": components["schemas"]["Error"];
5474
+ };
5475
+ };
5476
+ /** @description Missing or invalid API key. */
5477
+ 401: {
5478
+ headers: {
5479
+ [name: string]: unknown;
5480
+ };
5481
+ content: {
5482
+ "application/json": components["schemas"]["Error"];
5483
+ };
5484
+ };
5485
+ /** @description The account does not administer this page with the invite-to-follow entitlement (fail-closed), or lacks the required Core seat. */
5486
+ 403: {
5487
+ headers: {
5488
+ [name: string]: unknown;
5489
+ };
5490
+ content: {
5491
+ "application/json": components["schemas"]["Error"];
5492
+ };
5493
+ };
5494
+ /** @description The account_id does not belong to this tenant, or a wholly-invalid invitee did not resolve. */
5495
+ 404: {
5496
+ headers: {
5497
+ [name: string]: unknown;
5498
+ };
5499
+ content: {
5500
+ "application/json": components["schemas"]["Error"];
5501
+ };
5502
+ };
5503
+ /** @description The account is restricted and cannot perform this operation. */
5504
+ 422: {
5505
+ headers: {
5506
+ [name: string]: unknown;
5507
+ };
5508
+ content: {
5509
+ "application/json": components["schemas"]["Error"];
5510
+ };
5511
+ };
5512
+ /** @description The follow-invite credit or rate budget is exhausted. Slow down and retry after the hinted delay. */
5513
+ 429: {
5514
+ headers: {
5515
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
5516
+ RateLimit: components["headers"]["RateLimit"];
5517
+ "Retry-After": components["headers"]["Retry-After"];
5518
+ [name: string]: unknown;
5519
+ };
5520
+ content: {
5521
+ "application/json": components["schemas"]["Error"];
5522
+ };
5523
+ };
5524
+ /** @description Internal error. */
5525
+ 500: {
5526
+ headers: {
5527
+ [name: string]: unknown;
5528
+ };
5529
+ content: {
5530
+ "application/json": components["schemas"]["Error"];
5531
+ };
5532
+ };
5533
+ /** @description A temporary error occurred. Please try again. */
5534
+ 502: {
5535
+ headers: {
5536
+ [name: string]: unknown;
5537
+ };
5538
+ content: {
5539
+ "application/json": components["schemas"]["Error"];
5540
+ };
5541
+ };
5542
+ /** @description Service unavailable. */
5543
+ 503: {
5544
+ headers: {
5545
+ [name: string]: unknown;
5546
+ };
5547
+ content: {
5548
+ "application/json": components["schemas"]["Error"];
5549
+ };
5550
+ };
5551
+ /** @description Gateway timeout. */
5552
+ 504: {
5553
+ headers: {
5554
+ [name: string]: unknown;
5555
+ };
5556
+ content: {
5557
+ "application/json": components["schemas"]["Error"];
5558
+ };
5559
+ };
5560
+ };
5561
+ };
5381
5562
  getV1AccountIdCompaniesIdentifierFollowers: {
5382
5563
  parameters: {
5383
5564
  query?: {
@@ -6178,6 +6359,184 @@ export interface operations {
6178
6359
  };
6179
6360
  };
6180
6361
  };
6362
+ postV1AccountIdCompaniesIdentifierChatsChatIdMessages: {
6363
+ parameters: {
6364
+ query?: never;
6365
+ header?: never;
6366
+ path: {
6367
+ /** @description The connected LinkedIn account, which must administer the page. */
6368
+ account_id: string;
6369
+ /** @description The company's numeric id (e.g. 112013061) — the id field of GET /v1/{account_id}/companies/{identifier} or a POST /v1/{account_id}/search/companies result. A public handle or URN is not accepted here — pass the numeric id. */
6370
+ identifier: string;
6371
+ /** @description The COMPANY_ chat id to reply to (e.g. 'COMPANY_83734124_2-…'), from GET /v1/{account_id}/inboxes/{inbox_id}/chats, not the 2-… id from this group's chat reads (that form is rejected with a guiding 400). */
6372
+ chat_id: string;
6373
+ };
6374
+ cookie?: never;
6375
+ };
6376
+ requestBody: {
6377
+ content: {
6378
+ "application/json": {
6379
+ /** @description Message text (1–8000 chars). Optional when at least one attachment is supplied. */
6380
+ text?: string;
6381
+ /** @description Optional message ID to quote or reply to. */
6382
+ quote_id?: string;
6383
+ /** @description Optional file attachments (base64-encoded). */
6384
+ attachments?: {
6385
+ /** @description Base64-encoded file bytes. */
6386
+ content: string;
6387
+ /** @description Attachment MIME type (e.g. image/png, application/pdf). */
6388
+ content_type: string;
6389
+ /** @description File name for the attachment. */
6390
+ filename: string;
6391
+ }[];
6392
+ };
6393
+ };
6394
+ };
6395
+ responses: {
6396
+ /** @description Message sent as the page. Returns the new message_id and sent_as, the acting identity, always kind:'company' on this endpoint. company_id is null when the page could not be correlated to a managed page on Curviate, even though the page itself and its name are still known. */
6397
+ 201: {
6398
+ headers: {
6399
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
6400
+ RateLimit: components["headers"]["RateLimit"];
6401
+ [name: string]: unknown;
6402
+ };
6403
+ content: {
6404
+ "application/json": {
6405
+ /**
6406
+ * @description Response type discriminator.
6407
+ * @enum {string}
6408
+ */
6409
+ object?: "message_sent";
6410
+ /** @description The sent message's identifier. */
6411
+ message_id?: string;
6412
+ /** @description The identity this message was actually sent as. */
6413
+ sent_as?: {
6414
+ /**
6415
+ * @description Which identity sent the message.
6416
+ * @enum {string}
6417
+ */
6418
+ kind?: "personal" | "company";
6419
+ /** @description Company inboxes only. Null when this page is not one of the account's managed companies on Curviate, even though the page itself, and its name, are still known. */
6420
+ company_id?: string | null;
6421
+ /** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
6422
+ name?: string | null;
6423
+ };
6424
+ };
6425
+ };
6426
+ };
6427
+ /** @description Empty body or neither text nor attachment supplied, a non-numeric identifier, or chat_id is not the send-ready COMPANY_ form (the guiding error names the required form and its /inboxes source). */
6428
+ 400: {
6429
+ headers: {
6430
+ [name: string]: unknown;
6431
+ };
6432
+ content: {
6433
+ "application/json": components["schemas"]["Error"];
6434
+ };
6435
+ };
6436
+ /** @description Missing or invalid API key. */
6437
+ 401: {
6438
+ headers: {
6439
+ [name: string]: unknown;
6440
+ };
6441
+ content: {
6442
+ "application/json": components["schemas"]["Error"];
6443
+ };
6444
+ };
6445
+ /** @description The account does not administer this page (the substrate's own admin gate), the COMPANY_ chat's mailbox correlates to a DIFFERENT company than {identifier}, or the account lacks the required Core seat. */
6446
+ 403: {
6447
+ headers: {
6448
+ [name: string]: unknown;
6449
+ };
6450
+ content: {
6451
+ "application/json": components["schemas"]["Error"];
6452
+ };
6453
+ };
6454
+ /** @description The account_id does not belong to this tenant. */
6455
+ 404: {
6456
+ headers: {
6457
+ [name: string]: unknown;
6458
+ };
6459
+ content: {
6460
+ "application/json": components["schemas"]["Error"];
6461
+ };
6462
+ };
6463
+ /** @description Payload too large, an attachment exceeds 5 MiB or the total body exceeds 8 MiB. */
6464
+ 413: {
6465
+ headers: {
6466
+ [name: string]: unknown;
6467
+ };
6468
+ content: {
6469
+ "application/json": components["schemas"]["Error"];
6470
+ };
6471
+ };
6472
+ /** @description Unsupported media type, the request must use application/json. */
6473
+ 415: {
6474
+ headers: {
6475
+ [name: string]: unknown;
6476
+ };
6477
+ content: {
6478
+ "application/json": components["schemas"]["Error"];
6479
+ };
6480
+ };
6481
+ /** @description The account is restricted and cannot be queried. */
6482
+ 422: {
6483
+ headers: {
6484
+ [name: string]: unknown;
6485
+ };
6486
+ content: {
6487
+ "application/json": components["schemas"]["Error"];
6488
+ };
6489
+ };
6490
+ /** @description Rate limited, slow down and retry after the hinted delay. */
6491
+ 429: {
6492
+ headers: {
6493
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
6494
+ RateLimit: components["headers"]["RateLimit"];
6495
+ "Retry-After": components["headers"]["Retry-After"];
6496
+ [name: string]: unknown;
6497
+ };
6498
+ content: {
6499
+ "application/json": components["schemas"]["Error"];
6500
+ };
6501
+ };
6502
+ /** @description Internal error. */
6503
+ 500: {
6504
+ headers: {
6505
+ [name: string]: unknown;
6506
+ };
6507
+ content: {
6508
+ "application/json": components["schemas"]["Error"];
6509
+ };
6510
+ };
6511
+ /** @description A temporary error occurred. Please try again. */
6512
+ 502: {
6513
+ headers: {
6514
+ [name: string]: unknown;
6515
+ };
6516
+ content: {
6517
+ "application/json": components["schemas"]["Error"];
6518
+ };
6519
+ };
6520
+ /** @description Service unavailable. */
6521
+ 503: {
6522
+ headers: {
6523
+ [name: string]: unknown;
6524
+ };
6525
+ content: {
6526
+ "application/json": components["schemas"]["Error"];
6527
+ };
6528
+ };
6529
+ /** @description Gateway timeout. */
6530
+ 504: {
6531
+ headers: {
6532
+ [name: string]: unknown;
6533
+ };
6534
+ content: {
6535
+ "application/json": components["schemas"]["Error"];
6536
+ };
6537
+ };
6538
+ };
6539
+ };
6181
6540
  getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId: {
6182
6541
  parameters: {
6183
6542
  query?: never;
@@ -9604,7 +9963,7 @@ export interface operations {
9604
9963
  path: {
9605
9964
  /** @description The account ID (`acc_…`) that owns the chat. */
9606
9965
  account_id: string;
9607
- /** @description The unique identifier of the chat to send the message to. */
9966
+ /** @description The unique identifier of the chat to send the message to. A COMPANY_ chat id (e.g. 'COMPANY_83734124_2-YTQ3ODU3Njgt', from the inboxes endpoints) sends this message as that company page instead of the connected member. */
9608
9967
  chat_id: string;
9609
9968
  };
9610
9969
  cookie?: never;
@@ -9629,7 +9988,7 @@ export interface operations {
9629
9988
  };
9630
9989
  };
9631
9990
  responses: {
9632
- /** @description Message sent. Returns the new message_id and sent_as — the acting identity. A COMPANY_ chat id (e.g. `COMPANY_83734124_2-…`) sends AS THE PAGE and echoes sent_as:{kind:'company',company_id,name} (company_id may be null when the page could not be correlated to a managed page); any other chat id sends as the connected member and echoes sent_as:{kind:'personal'}. Never infer the acting identity from the message's sender field. */
9991
+ /** @description Message sent. Returns the new message_id and sent_as, the acting identity. Reply as a company page simply by sending into one of its chat ids (from GET /v1/{account_id}/inboxes/{inbox_id}/chats): a COMPANY_ chat id (e.g. `COMPANY_83734124_2-…`) sends AS THE PAGE and echoes sent_as:{kind:'company',company_id,name} (company_id is null when the page could not be correlated to a managed page). Any other chat id sends as the connected member and echoes sent_as:{kind:'personal'}. Never infer the acting identity from the message's sender field, only from sent_as. */
9633
9992
  201: {
9634
9993
  headers: {
9635
9994
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -9652,10 +10011,10 @@ export interface operations {
9652
10011
  * @enum {string}
9653
10012
  */
9654
10013
  kind?: "personal" | "company";
9655
- /** @description Company inboxes only — null when uncorrelatable. */
10014
+ /** @description Company inboxes only. Null when this page is not one of the account's managed companies on Curviate, even though the page itself, and its name, are still known. */
9656
10015
  company_id?: string | null;
9657
- /** @description Company inboxes only — the page's display name. */
9658
- name?: string;
10016
+ /** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
10017
+ name?: string | null;
9659
10018
  };
9660
10019
  };
9661
10020
  };
@@ -10710,7 +11069,7 @@ export interface operations {
10710
11069
  };
10711
11070
  requestBody?: never;
10712
11071
  responses: {
10713
- /** @description The account's inboxes — personal plus, when the company product is attached, one entry per company page × folder (e.g. id='COMPANY_83734124_PRIMARY'). When no company inbox exists, hint names the Company Pages reconnect requirement instead of returning silently empty. */
11072
+ /** @description The account's inboxes: its own personal inbox, plus, when the company product is attached, one entry per company page (e.g. id='COMPANY_83734124_PRIMARY'). When no company inbox exists, hint names the Company Pages reconnect requirement instead of returning silently empty. This is the discovery step of the reply-as-a-page flow: find a company inbox here, read its conversations with GET /v1/{account_id}/inboxes/{inbox_id}/chats, then reply with the existing POST /v1/{account_id}/chats/{chat_id}/messages using one of its chat ids. */
10714
11073
  200: {
10715
11074
  headers: {
10716
11075
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -10730,7 +11089,7 @@ export interface operations {
10730
11089
  * @enum {string}
10731
11090
  */
10732
11091
  object?: "inbox";
10733
- /** @description Inbox identifier — pass to the inbox-chats endpoint. */
11092
+ /** @description Inbox identifier. Pass it to the inbox-chats endpoint below to read its conversations. */
10734
11093
  id?: string;
10735
11094
  /**
10736
11095
  * @description Whether this is the account's own inbox or a company page's.
@@ -10741,14 +11100,14 @@ export interface operations {
10741
11100
  folder?: string;
10742
11101
  /** @description Personal: the folder's display name. Company: the page's display name. */
10743
11102
  name?: string | null;
10744
- /** @description Company inboxes only — the managed-company id this mailbox was correlated to, or null when it could not be correlated (never a fabricated id). */
11103
+ /** @description Company inboxes only. The managed-company id this mailbox was correlated to, or null when it could not be correlated (never a fabricated id). */
10745
11104
  company_id?: string | null;
10746
- /** @description Company inboxes only — the substrate's internal mailbox id (distinct from company_id). */
11105
+ /** @description Company inboxes only. The substrate's internal mailbox id (distinct from company_id). */
10747
11106
  mailbox_id?: string | null;
10748
- /** @description true for company inboxes — company pages can only reply to existing conversations, never start one. */
11107
+ /** @description True for company inboxes: a company page can only reply to an existing conversation, it can never start one. */
10749
11108
  reply_only?: boolean;
10750
11109
  }[];
10751
- /** @description Present only when no company inbox exists — names the reconnect requirement. */
11110
+ /** @description Present only when no company inbox exists. Names the reconnect requirement. */
10752
11111
  hint?: string;
10753
11112
  };
10754
11113
  };
@@ -10840,7 +11199,7 @@ export interface operations {
10840
11199
  };
10841
11200
  requestBody?: never;
10842
11201
  responses: {
10843
- /** @description A page of the inbox's conversations, newest-activity-first. Each chat's id is send-ready — pass it directly to POST .../chats/{chat_id}/messages to reply (a company inbox's chats carry ids like 'COMPANY_83734124_2-YTQ3ODU3Njgt'; replying with that id sends AS THE PAGE, no separate parameter needed). Works identically for personal (CLASSIC_) inboxes. */
11202
+ /** @description A page of the inbox's conversations, newest-activity-first, in the same shape as GET /v1/{account_id}/chats. Each chat's id is send-ready: pass it directly to POST /v1/{account_id}/chats/{chat_id}/messages to reply. A company inbox's chats carry ids like 'COMPANY_83734124_2-YTQ3ODU3Njgt'; replying with that id sends AS THE PAGE, no separate parameter needed, and the send response's sent_as field confirms it. Works identically for personal (CLASSIC_) inboxes. */
10844
11203
  200: {
10845
11204
  headers: {
10846
11205
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -10854,13 +11213,112 @@ export interface operations {
10854
11213
  * @enum {string}
10855
11214
  */
10856
11215
  object?: "inbox_chat_list";
10857
- items?: Record<string, never>[];
10858
- /** @description Next-page cursor; follow until items is empty. */
11216
+ items?: {
11217
+ /**
11218
+ * @description Response type discriminator.
11219
+ * @enum {string}
11220
+ */
11221
+ object?: "chat";
11222
+ /** @description Chat identifier. */
11223
+ id?: string;
11224
+ /** @description Account id that owns this chat. */
11225
+ account_id?: string;
11226
+ /** @description Chat display name, or null. */
11227
+ name?: string | null;
11228
+ /**
11229
+ * @description Conversation type.
11230
+ * @enum {string}
11231
+ */
11232
+ type?: "1to1" | "group" | "channel";
11233
+ is_group?: boolean;
11234
+ is_1to1?: boolean;
11235
+ is_channel?: boolean;
11236
+ is_pinned?: boolean;
11237
+ is_readonly?: boolean;
11238
+ /** @description True if the chat is archived. */
11239
+ is_archived?: boolean;
11240
+ /** @description True if notifications for this chat are muted. */
11241
+ muted_until?: boolean;
11242
+ /** @description Number of unread messages in this chat. */
11243
+ unread_count?: number;
11244
+ /** @description Folder labels assigned to this chat. */
11245
+ folders?: string[];
11246
+ /** @description The platform this chat originates from. */
11247
+ provider?: string;
11248
+ /** @description ISO-8601 UTC creation timestamp. */
11249
+ created_at?: string;
11250
+ /** @description ISO-8601 UTC timestamp of the last message. */
11251
+ last_message_timestamp?: string;
11252
+ /** @description Identifier of the 1:1 counterpart. */
11253
+ user_id?: string;
11254
+ /** @description The most recent message in the chat. */
11255
+ last_message?: {
11256
+ /**
11257
+ * @description Response type discriminator.
11258
+ * @enum {string}
11259
+ */
11260
+ object?: "message";
11261
+ /** @description Message identifier. */
11262
+ id?: string;
11263
+ /** @description Account id that owns this message. */
11264
+ account_id?: string;
11265
+ /** @description Chat this message belongs to. */
11266
+ chat_id?: string;
11267
+ /** @description Identifier of the sender. */
11268
+ sender_id?: string;
11269
+ /** @description Full message text (content pass-through — never stored). */
11270
+ text?: string | null;
11271
+ /** @description Attachment descriptors (no bytes — use the attachment endpoint to download). */
11272
+ attachments?: {
11273
+ /** @description Attachment identifier. */
11274
+ id?: string;
11275
+ /** @description MIME type of the attachment. */
11276
+ mimetype?: string;
11277
+ /** @description Attachment kind: file | img | video | audio. */
11278
+ type?: string;
11279
+ /** @description Original file name. */
11280
+ filename?: string;
11281
+ /** @description Size in bytes. */
11282
+ file_size?: number;
11283
+ /** @description True when the attachment is no longer available. */
11284
+ unavailable?: boolean | null;
11285
+ }[];
11286
+ /** @description ISO-8601 UTC send timestamp. */
11287
+ timestamp?: string;
11288
+ /** @description True if the connected account sent this message. */
11289
+ is_sender?: boolean;
11290
+ is_seen?: boolean;
11291
+ is_delivered?: boolean;
11292
+ is_edited?: boolean;
11293
+ /** @description True if the account is mentioned in this message. */
11294
+ is_mentionned?: boolean;
11295
+ /** @description Per-type reaction breakdown on the message. */
11296
+ reactions?: {
11297
+ type?: string;
11298
+ count?: number;
11299
+ }[];
11300
+ /** @description Total reaction count across all types (derived). */
11301
+ reaction_count?: number;
11302
+ /** @description The platform this message originates from. */
11303
+ provider?: string;
11304
+ };
11305
+ /** @description The 1:1 counterpart's profile. */
11306
+ user?: {
11307
+ /** @description Identifier of the counterpart. */
11308
+ id?: string;
11309
+ /** @description individual | organization. */
11310
+ type?: string;
11311
+ display_name?: string;
11312
+ profile_url?: string;
11313
+ public_picture_url?: string;
11314
+ };
11315
+ }[];
11316
+ /** @description Next-page cursor. Follow until items is empty. */
10859
11317
  cursor?: string | null;
10860
11318
  };
10861
11319
  };
10862
11320
  };
10863
- /** @description limit out of range (1–25) or malformed cursor. */
11321
+ /** @description limit out of range (1-25), malformed cursor, or a malformed/unknown-folder inbox_id (rejected before the substrate is ever called; see GET /inboxes for valid ids). */
10864
11322
  400: {
10865
11323
  headers: {
10866
11324
  [name: string]: unknown;
@@ -10878,7 +11336,7 @@ export interface operations {
10878
11336
  "application/json": components["schemas"]["Error"];
10879
11337
  };
10880
11338
  };
10881
- /** @description The connected account is not an admin of this page. */
11339
+ /** @description The connected account does not administer this inbox: either it is not an admin of this page, or the mailbox is unknown to this account. No existence disclosure. */
10882
11340
  403: {
10883
11341
  headers: {
10884
11342
  [name: string]: unknown;
@@ -10887,15 +11345,6 @@ export interface operations {
10887
11345
  "application/json": components["schemas"]["Error"];
10888
11346
  };
10889
11347
  };
10890
- /** @description The inbox does not exist for this account. */
10891
- 404: {
10892
- headers: {
10893
- [name: string]: unknown;
10894
- };
10895
- content: {
10896
- "application/json": components["schemas"]["Error"];
10897
- };
10898
- };
10899
11348
  /** @description Rate limited. */
10900
11349
  429: {
10901
11350
  headers: {