@zernio/node 0.2.834 → 0.2.836

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.
@@ -4907,6 +4907,98 @@ export type GoogleStructuredSnippet = {
4907
4907
 
4908
4908
  export type header = 'Amenities' | 'Brands' | 'Courses' | 'Degree programs' | 'Destinations' | 'Featured hotels' | 'Insurance coverage' | 'Models' | 'Neighborhoods' | 'Service catalog' | 'Shows' | 'Styles' | 'Types';
4909
4909
 
4910
+ export type ImessageAudienceContact = {
4911
+ conversationId?: string;
4912
+ accountId?: string;
4913
+ /**
4914
+ * The contact handle (E.164 phone or email)
4915
+ */
4916
+ contact?: string;
4917
+ name?: (string) | null;
4918
+ subscribed?: boolean;
4919
+ lastMessage?: (string) | null;
4920
+ lastMessageAt?: (string) | null;
4921
+ firstSeenAt?: (string) | null;
4922
+ /**
4923
+ * Present when the thread was opened through a tracked opt-in link
4924
+ */
4925
+ optIn?: {
4926
+ at?: string;
4927
+ parameters?: {
4928
+ [key: string]: unknown;
4929
+ };
4930
+ } | null;
4931
+ };
4932
+
4933
+ /**
4934
+ * An iMessage sender registered as an account on a profile.
4935
+ */
4936
+ export type ImessageSender = {
4937
+ /**
4938
+ * Account id (use it with the inbox endpoints' accountId)
4939
+ */
4940
+ id?: string;
4941
+ platform?: 'imessage';
4942
+ /**
4943
+ * The sender handle (E.164 phone or email)
4944
+ */
4945
+ sender?: string;
4946
+ /**
4947
+ * imessage:// deep link that opens Messages on this sender with a prefilled text. Share it so contacts message you first (Apple only lets a sender reach contacts who wrote to it first).
4948
+ */
4949
+ optInLink?: (string) | null;
4950
+ displayName?: string;
4951
+ profileId?: (string) | null;
4952
+ /**
4953
+ * Delivery provider backing this sender (e.g. loopmessage)
4954
+ */
4955
+ provider?: string;
4956
+ /**
4957
+ * Whether the provider confirmed the sender as active at registration time
4958
+ */
4959
+ senderVerified?: boolean;
4960
+ isActive?: boolean;
4961
+ };
4962
+
4963
+ export type platform4 = 'imessage';
4964
+
4965
+ /**
4966
+ * A provisioned iMessage sender order and its lifecycle. Activation is asynchronous: poll GET /v1/imessage/senders/{senderId} or subscribe to account.connected.
4967
+ */
4968
+ export type ImessageSenderLifecycle = {
4969
+ id?: string;
4970
+ kind?: 'phone' | 'email';
4971
+ region?: ('US' | 'GB') | null;
4972
+ /**
4973
+ * The sender handle once activation assigns it
4974
+ */
4975
+ handle?: (string) | null;
4976
+ /**
4977
+ * imessage:// deep link that opens Messages on this sender with a prefilled text. Share it so contacts message you first (Apple only lets a sender reach contacts who wrote to it first); null until the handle is assigned.
4978
+ */
4979
+ optInLink?: (string) | null;
4980
+ status?: 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
4981
+ /**
4982
+ * Monthly price billed while the sender is active
4983
+ */
4984
+ priceCents?: number;
4985
+ provider?: string;
4986
+ profileId?: string;
4987
+ displayName?: (string) | null;
4988
+ failureReason?: (string) | null;
4989
+ /**
4990
+ * The messaging account created at activation
4991
+ */
4992
+ accountId?: (string) | null;
4993
+ createdAt?: string;
4994
+ };
4995
+
4996
+ export type kind = 'phone' | 'email';
4997
+
4998
+ export type region = 'US' | 'GB';
4999
+
5000
+ export type status11 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
5001
+
4910
5002
  /**
4911
5003
  * Attachment snapshot inside an edit-history entry.
4912
5004
  */
@@ -4977,7 +5069,7 @@ export type InboxWebhookConversation = {
4977
5069
  contactId?: string;
4978
5070
  };
4979
5071
 
4980
- export type status11 = 'active' | 'archived';
5072
+ export type status12 = 'active' | 'archived';
4981
5073
 
4982
5074
  /**
4983
5075
  * The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
@@ -4987,7 +5079,7 @@ export type InboxWebhookConversationDetail = {
4987
5079
  * The platform's conversation id, equal to `conversation.platformConversationId` on inbox webhooks (whose `conversation.id` is Zernio's internal id). Both are accepted by the conversation endpoints.
4988
5080
  */
4989
5081
  id: string;
4990
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok';
5082
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok' | 'imessage';
4991
5083
  /**
4992
5084
  * Same value as `id`.
4993
5085
  */
@@ -5015,7 +5107,7 @@ export type InboxWebhookConversationDetail = {
5015
5107
  contactId?: string;
5016
5108
  };
5017
5109
 
5018
- export type platform4 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok';
5110
+ export type platform5 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok' | 'imessage';
5019
5111
 
5020
5112
  /**
5021
5113
  * The message object included in inbox webhook payloads.
@@ -5131,7 +5223,7 @@ export type InboxWebhookMessage = {
5131
5223
  isRead: boolean;
5132
5224
  };
5133
5225
 
5134
- export type platform5 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
5226
+ export type platform6 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
5135
5227
 
5136
5228
  export type direction2 = 'incoming' | 'outgoing';
5137
5229
 
@@ -5259,7 +5351,7 @@ export type InstagramAccountInsightsResponse = {
5259
5351
  /**
5260
5352
  * Platform that served this response.
5261
5353
  */
5262
- export type platform6 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
5354
+ export type platform7 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
5263
5355
 
5264
5356
  export type metricType = 'time_series' | 'total_value';
5265
5357
 
@@ -6514,7 +6606,7 @@ export type PlatformAnalytics = {
6514
6606
  errorMessage?: (string) | null;
6515
6607
  };
6516
6608
 
6517
- export type status12 = 'published' | 'failed';
6609
+ export type status13 = 'published' | 'failed';
6518
6610
 
6519
6611
  /**
6520
6612
  * Sync state of analytics for this platform
@@ -6696,7 +6788,7 @@ export type Post = {
6696
6788
  /**
6697
6789
  * `cancelled` is set by DELETE /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes `partial`); cancelled posts can be edited and rescheduled like drafts.
6698
6790
  */
6699
- export type status13 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
6791
+ export type status14 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
6700
6792
 
6701
6793
  export type visibility2 = 'public' | 'private' | 'unlisted';
6702
6794
 
@@ -6891,9 +6983,9 @@ export type Product = {
6891
6983
  publishedAt?: (string) | null;
6892
6984
  };
6893
6985
 
6894
- export type platform7 = 'shopify';
6986
+ export type platform8 = 'shopify';
6895
6987
 
6896
- export type status14 = 'active' | 'draft' | 'archived';
6988
+ export type status15 = 'active' | 'draft' | 'archived';
6897
6989
 
6898
6990
  export type ProductImage = {
6899
6991
  url?: string;
@@ -7313,7 +7405,7 @@ export type ReviewWebhookReview = {
7313
7405
  /**
7314
7406
  * Platform the review originated on. Currently Google Business Profile only.
7315
7407
  */
7316
- export type platform8 = 'googlebusiness';
7408
+ export type platform9 = 'googlebusiness';
7317
7409
 
7318
7410
  /**
7319
7411
  * A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
@@ -7490,7 +7582,7 @@ export type SocialAccount = {
7490
7582
  };
7491
7583
  };
7492
7584
 
7493
- export type platform9 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
7585
+ export type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
7494
7586
 
7495
7587
  /**
7496
7588
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
@@ -8040,12 +8132,12 @@ export type TrackingTag = {
8040
8132
  ownerAdAccountId?: string;
8041
8133
  };
8042
8134
 
8043
- export type platform10 = 'metaads';
8135
+ export type platform11 = 'metaads';
8044
8136
 
8045
8137
  /**
8046
8138
  * Platform-native flavor of the tag (Meta: `pixel`).
8047
8139
  */
8048
- export type kind = 'pixel' | 'tag' | 'insight_tag';
8140
+ export type kind2 = 'pixel' | 'tag' | 'insight_tag';
8049
8141
 
8050
8142
  /**
8051
8143
  * X-specific post options. The article field creates a long-form X Article and is mutually exclusive with tweet media and tweet-only options. Geo-restriction applies at the media level: media is hidden outside the specified countries while tweet text remains visible.
@@ -8140,7 +8232,7 @@ export type UploadTokenResponse = {
8140
8232
  status?: 'pending' | 'completed' | 'expired';
8141
8233
  };
8142
8234
 
8143
- export type status15 = 'pending' | 'completed' | 'expired';
8235
+ export type status16 = 'pending' | 'completed' | 'expired';
8144
8236
 
8145
8237
  export type UploadTokenStatusResponse = {
8146
8238
  token?: string;
@@ -8615,7 +8707,7 @@ export type Verification = {
8615
8707
  resend?: boolean;
8616
8708
  };
8617
8709
 
8618
- export type status16 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
8710
+ export type status17 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
8619
8711
 
8620
8712
  export type channel3 = 'sms';
8621
8713
 
@@ -8734,7 +8826,7 @@ export type WebhookLog = {
8734
8826
  /**
8735
8827
  * Delivery outcome
8736
8828
  */
8737
- export type status17 = 'success' | 'failed';
8829
+ export type status18 = 'success' | 'failed';
8738
8830
 
8739
8831
  /**
8740
8832
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -8846,7 +8938,7 @@ export type event = 'account.ads.initial_sync_completed';
8846
8938
  /**
8847
8939
  * Overall outcome of the initial sync.
8848
8940
  */
8849
- export type status18 = 'success' | 'failure';
8941
+ export type status19 = 'success' | 'failure';
8850
8942
 
8851
8943
  /**
8852
8944
  * Stable category for UX branching. New values may be added; existing ones are
@@ -9473,7 +9565,7 @@ export type WebhookPayloadComment = {
9473
9565
 
9474
9566
  export type event10 = 'comment.received';
9475
9567
 
9476
- export type platform11 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
9568
+ export type platform12 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
9477
9569
 
9478
9570
  /**
9479
9571
  * WhatsApp only. Who answers a conversation changed: Meta Business Agent took it over,
@@ -9647,7 +9739,7 @@ export type WebhookPayloadLead = {
9647
9739
 
9648
9740
  export type event14 = 'lead.received';
9649
9741
 
9650
- export type platform12 = 'facebook';
9742
+ export type platform13 = 'facebook';
9651
9743
 
9652
9744
  /**
9653
9745
  * Webhook payload for message received events
@@ -9667,7 +9759,7 @@ export type WebhookPayloadMessage = {
9667
9759
  * Internal conversation ID
9668
9760
  */
9669
9761
  conversationId: string;
9670
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms' | 'twitter' | 'bluesky' | 'reddit' | 'slack' | 'tiktok';
9762
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms' | 'twitter' | 'bluesky' | 'reddit' | 'slack' | 'tiktok' | 'imessage';
9671
9763
  /**
9672
9764
  * Platform's message ID
9673
9765
  */
@@ -10335,7 +10427,7 @@ export type WebhookPayloadMessageSent = {
10335
10427
  /**
10336
10428
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
10337
10429
  */
10338
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok';
10430
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
10339
10431
  /**
10340
10432
  * Platform's message ID
10341
10433
  */
@@ -10527,7 +10619,7 @@ export type event19 = 'message.sent';
10527
10619
  /**
10528
10620
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
10529
10621
  */
10530
- export type platform13 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok';
10622
+ export type platform14 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
10531
10623
 
10532
10624
  /**
10533
10625
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts); meta_business_agent when Meta Business Agent answered on the number. Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
@@ -10724,7 +10816,7 @@ export type event22 = 'post.platform.published' | 'post.platform.failed' | 'post
10724
10816
  /**
10725
10817
  * Terminal status this event fires on. Matches the event suffix.
10726
10818
  */
10727
- export type status19 = 'published' | 'failed' | 'deleted';
10819
+ export type status20 = 'published' | 'failed' | 'deleted';
10728
10820
 
10729
10821
  /**
10730
10822
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger)
@@ -10984,12 +11076,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
10984
11076
 
10985
11077
  export type event28 = 'whatsapp.account.name_status_updated';
10986
11078
 
10987
- export type platform14 = 'whatsapp';
11079
+ export type platform15 = 'whatsapp';
10988
11080
 
10989
11081
  /**
10990
11082
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
10991
11083
  */
10992
- export type status20 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
11084
+ export type status21 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
10993
11085
 
10994
11086
  /**
10995
11087
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -11138,7 +11230,7 @@ export type event30 = 'whatsapp.template.status_updated';
11138
11230
  * request before the template is actually removed.
11139
11231
  *
11140
11232
  */
11141
- export type status21 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
11233
+ export type status22 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
11142
11234
 
11143
11235
  export type WhatsAppBodyComponent = {
11144
11236
  type: 'body';
@@ -11292,7 +11384,7 @@ export type WhatsAppSandboxSession = {
11292
11384
  * list responses.
11293
11385
  *
11294
11386
  */
11295
- export type status22 = 'pending' | 'active';
11387
+ export type status23 = 'pending' | 'active';
11296
11388
 
11297
11389
  export type WhatsAppTemplateButton = {
11298
11390
  type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
@@ -11450,7 +11542,7 @@ export type WorkflowExecutionEvent = {
11450
11542
 
11451
11543
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
11452
11544
 
11453
- export type status23 = 'success' | 'failed' | 'pending';
11545
+ export type status24 = 'success' | 'failed' | 'pending';
11454
11546
 
11455
11547
  /**
11456
11548
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -21756,7 +21848,7 @@ export type ListInboxConversationsData = {
21756
21848
  /**
21757
21849
  * Filter by platform
21758
21850
  */
21759
- platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp';
21851
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp' | 'imessage';
21760
21852
  /**
21761
21853
  * Filter by profile ID
21762
21854
  */
@@ -21799,6 +21891,10 @@ export type ListInboxConversationsResponse = ({
21799
21891
  * WhatsApp only, present once Meta Business Agent has touched the thread. ai_agent: the agent answers and new inbound arrive flagged metadata.standby; app: you hold control; other: another partner app does. Change it with POST /v1/inbox/conversations/{conversationId}/thread-control.
21800
21892
  */
21801
21893
  threadControl?: 'app' | 'ai_agent' | 'other';
21894
+ /**
21895
+ * iMessage only, true for a group thread. Manage it through the /v1/imessage/groups/{conversationId} endpoints.
21896
+ */
21897
+ isGroup?: boolean;
21802
21898
  /**
21803
21899
  * Direct link to open the conversation on the platform (if available)
21804
21900
  */
@@ -22185,7 +22281,7 @@ export type SearchInboxConversationsData = {
22185
22281
  /**
22186
22282
  * Filter by platform (searchable platforms only)
22187
22283
  */
22188
- platform?: 'facebook' | 'instagram' | 'telegram' | 'whatsapp' | 'sms' | 'slack';
22284
+ platform?: 'facebook' | 'instagram' | 'telegram' | 'whatsapp' | 'sms' | 'slack' | 'imessage';
22189
22285
  /**
22190
22286
  * Filter by profile ID
22191
22287
  */
@@ -22656,7 +22752,7 @@ export type SendInboxMessageData = {
22656
22752
  */
22657
22753
  category?: 'utility';
22658
22754
  /**
22659
- * WhatsApp only. Set false to send the message without a link-preview thumbnail for the first URL in the text. Defaults to true, which is how every WhatsApp text has been sent to date. Ignored on other platforms. Accepted on the JSON body only, not on multipart requests.
22755
+ * WhatsApp and iMessage. Set false to send the message without a link-preview thumbnail (WhatsApp: the first URL; iMessage: every link renders as plain text). Defaults to true, which is how every WhatsApp text has been sent to date. Ignored on other platforms. Accepted on the JSON body only, not on multipart requests.
22660
22756
  */
22661
22757
  linkPreview?: boolean;
22662
22758
  /**
@@ -22676,6 +22772,22 @@ export type SendInboxMessageData = {
22676
22772
  *
22677
22773
  */
22678
22774
  voiceNote?: boolean;
22775
+ /**
22776
+ * iMessage only (JSON body only). Bold title line rendered above the message text. Rejected with 400 on other platforms; ignored on voice-message sends.
22777
+ */
22778
+ subject?: string;
22779
+ /**
22780
+ * iMessage only (JSON body only). Apple screen/bubble animation played when the message arrives. Rejected with 400 on other platforms.
22781
+ */
22782
+ effect?: 'slam' | 'loud' | 'gentle' | 'invisibleInk' | 'echo' | 'spotlight' | 'balloons' | 'confetti' | 'love' | 'lasers' | 'fireworks' | 'shootingStar' | 'celebration';
22783
+ /**
22784
+ * iMessage only (JSON body only). When `true`, attaches the sender's contact card (vCard) so the recipient can save the sender. Counts as message content on its own, so `message` becomes optional.
22785
+ */
22786
+ contactCard?: boolean;
22787
+ /**
22788
+ * iMessage only (JSON body only). Overrides the delivery channel for this one send; the provider otherwise picks it automatically. The sender must carry the matching add-on (SMS, RCS or WhatsApp), or the send fails. Not a default to set on every request. Rejected with 400 on other platforms.
22789
+ */
22790
+ channel?: 'imessage' | 'sms' | 'rcs' | 'whatsapp';
22679
22791
  /**
22680
22792
  * Quick reply buttons. Mutually exclusive with buttons. Max 13 items.
22681
22793
  */
@@ -23168,7 +23280,7 @@ export type SendInboxMessageData = {
23168
23280
  */
23169
23281
  replyTo?: string;
23170
23282
  /**
23171
- * WhatsApp-only. Send a location pin.
23283
+ * WhatsApp and iMessage. Send a location pin (on iMessage it renders as a native map bubble).
23172
23284
  */
23173
23285
  location?: {
23174
23286
  /**
@@ -23379,7 +23491,7 @@ export type EditInboxMessageData = {
23379
23491
  */
23380
23492
  conversationId: string;
23381
23493
  /**
23382
- * The Telegram message ID to edit
23494
+ * The platform message ID to edit (iMessage also accepts the Zernio message id)
23383
23495
  */
23384
23496
  messageId: string;
23385
23497
  };
@@ -26237,6 +26349,441 @@ export type DialVoiceWebCallError = ({
26237
26349
  error?: string;
26238
26350
  } | unknown);
26239
26351
 
26352
+ export type ListImessageSendersResponse = ({
26353
+ senders?: Array<ImessageSender>;
26354
+ });
26355
+
26356
+ export type ListImessageSendersError = ({
26357
+ error?: string;
26358
+ } | unknown);
26359
+
26360
+ export type RegisterImessageSenderData = {
26361
+ body: {
26362
+ /**
26363
+ * Profile to attach the sender to
26364
+ */
26365
+ profileId: string;
26366
+ /**
26367
+ * The provider-provisioned sender handle: a phone number in international format (e.g. +18305551234) or an email address
26368
+ */
26369
+ sender: string;
26370
+ displayName?: string;
26371
+ /**
26372
+ * Delivery provider. Defaults to the platform default.
26373
+ */
26374
+ provider?: 'loopmessage';
26375
+ };
26376
+ };
26377
+
26378
+ export type RegisterImessageSenderResponse = ({
26379
+ success?: boolean;
26380
+ account?: ImessageSender;
26381
+ });
26382
+
26383
+ export type RegisterImessageSenderError = (ErrorResponse | {
26384
+ error?: string;
26385
+ } | unknown);
26386
+
26387
+ export type ListImessageSenderOrdersData = {
26388
+ query?: {
26389
+ includeCanceled?: boolean;
26390
+ };
26391
+ };
26392
+
26393
+ export type ListImessageSenderOrdersResponse = ({
26394
+ senders?: Array<ImessageSenderLifecycle>;
26395
+ });
26396
+
26397
+ export type ListImessageSenderOrdersError = (ErrorResponse | {
26398
+ error?: string;
26399
+ } | unknown);
26400
+
26401
+ export type OrderImessageSenderData = {
26402
+ body: {
26403
+ profileId: string;
26404
+ kind: 'phone' | 'email';
26405
+ /**
26406
+ * Required for phone senders. Without availableNumberId the number is carrier-assigned in this region and revealed once the sender activates.
26407
+ */
26408
+ region?: 'US' | 'GB';
26409
+ /**
26410
+ * A number from GET /v1/imessage/senders/available-numbers. It is assigned and activated on order instead of waiting for provisioning. Phone senders only.
26411
+ */
26412
+ availableNumberId?: string;
26413
+ /**
26414
+ * US phone senders only. Preferred area for a carrier-assigned number (ignored with availableNumberId).
26415
+ */
26416
+ zipCode?: string;
26417
+ /**
26418
+ * Local part for email senders (required for kind: email)
26419
+ */
26420
+ emailName?: string;
26421
+ /**
26422
+ * Domain for email senders (required for kind: email)
26423
+ */
26424
+ emailDomain?: string;
26425
+ displayName?: string;
26426
+ /**
26427
+ * Idempotency key for safe retries
26428
+ */
26429
+ purchaseIntentId?: string;
26430
+ /**
26431
+ * Contact card (vCard) attached to the sender, shown when recipients save it. Required before sending with contactCard.
26432
+ */
26433
+ contact?: {
26434
+ firstName: string;
26435
+ lastName?: string;
26436
+ photoUrl?: string;
26437
+ };
26438
+ };
26439
+ };
26440
+
26441
+ export type OrderImessageSenderResponse = ({
26442
+ success?: boolean;
26443
+ sender?: ImessageSenderLifecycle;
26444
+ });
26445
+
26446
+ export type OrderImessageSenderError = (ErrorResponse | {
26447
+ error?: string;
26448
+ } | unknown);
26449
+
26450
+ export type GetImessageSenderData = {
26451
+ path: {
26452
+ senderId: string;
26453
+ };
26454
+ };
26455
+
26456
+ export type GetImessageSenderResponse = ({
26457
+ success?: boolean;
26458
+ sender?: ImessageSenderLifecycle;
26459
+ /**
26460
+ * Provider platform health for this sender; null when the provider cannot report it.
26461
+ */
26462
+ health?: {
26463
+ imessage?: 'active' | 'degradation' | 'outage';
26464
+ whatsapp?: 'active' | 'degradation' | 'outage';
26465
+ } | null;
26466
+ /**
26467
+ * Provider-hosted opt-in page for this sender (opens Messages on any Apple device); null until the sender is active or when the provider cannot report it.
26468
+ */
26469
+ imessageLink?: (string) | null;
26470
+ });
26471
+
26472
+ export type GetImessageSenderError = (ErrorResponse | {
26473
+ error?: string;
26474
+ } | unknown);
26475
+
26476
+ export type UpdateImessageSenderData = {
26477
+ body: {
26478
+ displayName?: string;
26479
+ contact?: {
26480
+ firstName: string;
26481
+ lastName?: string;
26482
+ /**
26483
+ * Square image
26484
+ */
26485
+ photoUrl?: string;
26486
+ };
26487
+ };
26488
+ path: {
26489
+ senderId: string;
26490
+ };
26491
+ };
26492
+
26493
+ export type UpdateImessageSenderResponse = ({
26494
+ success?: boolean;
26495
+ sender?: ImessageSenderLifecycle;
26496
+ });
26497
+
26498
+ export type UpdateImessageSenderError = (ErrorResponse | {
26499
+ error?: string;
26500
+ } | unknown);
26501
+
26502
+ export type CancelImessageSenderData = {
26503
+ path: {
26504
+ senderId: string;
26505
+ };
26506
+ };
26507
+
26508
+ export type CancelImessageSenderResponse = ({
26509
+ success?: boolean;
26510
+ sender?: ImessageSenderLifecycle;
26511
+ });
26512
+
26513
+ export type CancelImessageSenderError = (ErrorResponse | {
26514
+ error?: string;
26515
+ } | unknown);
26516
+
26517
+ export type ListImessageAudienceData = {
26518
+ query?: {
26519
+ /**
26520
+ * Limit to one sender account
26521
+ */
26522
+ accountId?: string;
26523
+ limit?: number;
26524
+ /**
26525
+ * Matches the contact handle or name
26526
+ */
26527
+ search?: string;
26528
+ skip?: number;
26529
+ status?: 'subscribed' | 'unsubscribed';
26530
+ };
26531
+ };
26532
+
26533
+ export type ListImessageAudienceResponse = ({
26534
+ contacts?: Array<ImessageAudienceContact>;
26535
+ total?: number;
26536
+ limit?: number;
26537
+ skip?: number;
26538
+ });
26539
+
26540
+ export type ListImessageAudienceError = (ErrorResponse | {
26541
+ error?: string;
26542
+ } | unknown);
26543
+
26544
+ export type SetImessageSubscriptionData = {
26545
+ body: {
26546
+ accountId: string;
26547
+ conversationId: string;
26548
+ subscribed: boolean;
26549
+ };
26550
+ };
26551
+
26552
+ export type SetImessageSubscriptionResponse = ({
26553
+ success?: boolean;
26554
+ conversationId?: string;
26555
+ subscribed?: boolean;
26556
+ });
26557
+
26558
+ export type SetImessageSubscriptionError = (ErrorResponse | {
26559
+ error?: string;
26560
+ } | unknown);
26561
+
26562
+ export type CreateImessageOptInLinkData = {
26563
+ body: {
26564
+ /**
26565
+ * Prefilled message text. Must contain the literal `[opt-in-code]` placeholder, e.g. "Hi! My code is [opt-in-code]".
26566
+ */
26567
+ body: string;
26568
+ /**
26569
+ * Custom key/values (e.g. leadId, campaign) echoed back on the opt-in message.
26570
+ */
26571
+ parameters?: {
26572
+ [key: string]: (string);
26573
+ };
26574
+ /**
26575
+ * Your own code in place of the generated one (3-8 characters, no spaces or `#`, `!`, `-`). An unredeemed link lives 24 hours; re-issuing with the same code replaces it, and the earlier URL stops matching.
26576
+ */
26577
+ optInCode?: string;
26578
+ };
26579
+ path: {
26580
+ senderId: string;
26581
+ };
26582
+ };
26583
+
26584
+ export type CreateImessageOptInLinkResponse = ({
26585
+ success?: boolean;
26586
+ link?: {
26587
+ id?: string;
26588
+ /**
26589
+ * imessage:// deep link
26590
+ */
26591
+ imessage?: string;
26592
+ /**
26593
+ * sms: deep link for non-Apple devices
26594
+ */
26595
+ sms?: (string) | null;
26596
+ whatsapp?: (string) | null;
26597
+ /**
26598
+ * Hosted landing URL that picks the right scheme for the device
26599
+ */
26600
+ url?: string;
26601
+ };
26602
+ });
26603
+
26604
+ export type CreateImessageOptInLinkError = (ErrorResponse | {
26605
+ error?: string;
26606
+ } | unknown);
26607
+
26608
+ export type ListImessageAvailableNumbersData = {
26609
+ query?: {
26610
+ region?: 'US' | 'GB';
26611
+ };
26612
+ };
26613
+
26614
+ export type ListImessageAvailableNumbersResponse = ({
26615
+ numbers?: Array<{
26616
+ /**
26617
+ * Pass as availableNumberId when ordering
26618
+ */
26619
+ id?: string;
26620
+ /**
26621
+ * E.164
26622
+ */
26623
+ phone?: string;
26624
+ region?: string;
26625
+ /**
26626
+ * Area the provider reports for the number (e.g. a US state), when known
26627
+ */
26628
+ location?: string;
26629
+ }>;
26630
+ region?: (string) | null;
26631
+ });
26632
+
26633
+ export type ListImessageAvailableNumbersError = (ErrorResponse | {
26634
+ error?: string;
26635
+ } | unknown);
26636
+
26637
+ export type ReserveImessageAvailableNumberData = {
26638
+ path: {
26639
+ numberId: string;
26640
+ };
26641
+ };
26642
+
26643
+ export type ReserveImessageAvailableNumberResponse = ({
26644
+ success?: boolean;
26645
+ numberId?: string;
26646
+ expiresInSeconds?: number;
26647
+ });
26648
+
26649
+ export type ReserveImessageAvailableNumberError = (ErrorResponse | {
26650
+ error?: string;
26651
+ } | unknown);
26652
+
26653
+ export type CreateImessageGroupData = {
26654
+ body: {
26655
+ /**
26656
+ * The iMessage account (sender) that opens the group
26657
+ */
26658
+ accountId: string;
26659
+ /**
26660
+ * Participant handles (E.164 phones or iMessage emails)
26661
+ */
26662
+ contacts: Array<(string)>;
26663
+ /**
26664
+ * The first message
26665
+ */
26666
+ text: string;
26667
+ /**
26668
+ * Group name (required for WhatsApp groups)
26669
+ */
26670
+ name?: string;
26671
+ channel?: 'imessage' | 'sms' | 'rcs' | 'whatsapp';
26672
+ };
26673
+ };
26674
+
26675
+ export type CreateImessageGroupResponse = ({
26676
+ success?: boolean;
26677
+ /**
26678
+ * The provider's request id (not the group id)
26679
+ */
26680
+ requestId?: string;
26681
+ });
26682
+
26683
+ export type CreateImessageGroupError = (ErrorResponse | {
26684
+ error?: string;
26685
+ } | unknown);
26686
+
26687
+ export type GetImessageGroupData = {
26688
+ path: {
26689
+ /**
26690
+ * The inbox conversation id (or the provider group id)
26691
+ */
26692
+ conversationId: string;
26693
+ };
26694
+ query: {
26695
+ accountId: string;
26696
+ };
26697
+ };
26698
+
26699
+ export type GetImessageGroupResponse = ({
26700
+ success?: boolean;
26701
+ conversationId?: string;
26702
+ group?: {
26703
+ /**
26704
+ * Provider group id
26705
+ */
26706
+ id?: string;
26707
+ name?: (string) | null;
26708
+ participants?: Array<(string)>;
26709
+ channel?: (string) | null;
26710
+ createdAt?: (string) | null;
26711
+ };
26712
+ });
26713
+
26714
+ export type GetImessageGroupError = (unknown | {
26715
+ error?: string;
26716
+ });
26717
+
26718
+ export type UpdateImessageGroupData = {
26719
+ body: {
26720
+ accountId: string;
26721
+ name?: string;
26722
+ /**
26723
+ * Public HTTPS image URL; empty string removes the photo
26724
+ */
26725
+ photoUrl?: string;
26726
+ };
26727
+ path: {
26728
+ conversationId: string;
26729
+ };
26730
+ };
26731
+
26732
+ export type UpdateImessageGroupResponse = ({
26733
+ success?: boolean;
26734
+ conversationId?: string;
26735
+ });
26736
+
26737
+ export type UpdateImessageGroupError = (unknown | {
26738
+ error?: string;
26739
+ });
26740
+
26741
+ export type AddImessageGroupParticipantData = {
26742
+ body: {
26743
+ accountId: string;
26744
+ /**
26745
+ * E.164 phone or iMessage email
26746
+ */
26747
+ contact: string;
26748
+ };
26749
+ path: {
26750
+ conversationId: string;
26751
+ };
26752
+ };
26753
+
26754
+ export type AddImessageGroupParticipantResponse = ({
26755
+ success?: boolean;
26756
+ conversationId?: string;
26757
+ contact?: string;
26758
+ });
26759
+
26760
+ export type AddImessageGroupParticipantError = (unknown | {
26761
+ error?: string;
26762
+ });
26763
+
26764
+ export type RemoveImessageGroupParticipantData = {
26765
+ path: {
26766
+ conversationId: string;
26767
+ };
26768
+ query: {
26769
+ accountId: string;
26770
+ /**
26771
+ * E.164 phone or iMessage email
26772
+ */
26773
+ contact: string;
26774
+ };
26775
+ };
26776
+
26777
+ export type RemoveImessageGroupParticipantResponse = ({
26778
+ success?: boolean;
26779
+ conversationId?: string;
26780
+ contact?: string;
26781
+ });
26782
+
26783
+ export type RemoveImessageGroupParticipantError = (unknown | {
26784
+ error?: string;
26785
+ });
26786
+
26240
26787
  export type SendSmsData = {
26241
26788
  body: {
26242
26789
  /**
@@ -27694,6 +28241,16 @@ export type ListPhoneNumbersResponse = ({
27694
28241
  */
27695
28242
  callingEnabled?: boolean;
27696
28243
  }>;
28244
+ /**
28245
+ * iMessage phone senders (see /v1/imessage/senders/order). Hosted
28246
+ * by the iMessage provider, not on your Telnyx numbers: SMS and
28247
+ * Calls can never be enabled on them, and they bill as iMessage
28248
+ * senders. `handle` is null until the carrier assigns the number
28249
+ * at activation. Included only on the default and `status=active`
28250
+ * views.
28251
+ *
28252
+ */
28253
+ imessage?: Array<ImessageSenderLifecycle>;
27697
28254
  /**
27698
28255
  * The shared WhatsApp sandbox (one Zernio-owned number, all users test
27699
28256
  * against it). Present when the sandbox is configured; null otherwise.
@@ -28178,6 +28735,16 @@ export type GetWhatsAppPhoneNumbersResponse = ({
28178
28735
  */
28179
28736
  callingEnabled?: boolean;
28180
28737
  }>;
28738
+ /**
28739
+ * iMessage phone senders (see /v1/imessage/senders/order). Hosted
28740
+ * by the iMessage provider, not on your Telnyx numbers: SMS and
28741
+ * Calls can never be enabled on them, and they bill as iMessage
28742
+ * senders. `handle` is null until the carrier assigns the number
28743
+ * at activation. Included only on the default and `status=active`
28744
+ * views.
28745
+ *
28746
+ */
28747
+ imessage?: Array<ImessageSenderLifecycle>;
28181
28748
  /**
28182
28749
  * The shared WhatsApp sandbox (one Zernio-owned number, all users test
28183
28750
  * against it). Present when the sandbox is configured; null otherwise.
@@ -31735,7 +32302,7 @@ export type CreateBroadcastData = {
31735
32302
  body: {
31736
32303
  profileId: string;
31737
32304
  accountId: string;
31738
- platform: 'instagram' | 'facebook' | 'telegram' | 'twitter' | 'bluesky' | 'reddit' | 'whatsapp' | 'sms' | 'slack';
32305
+ platform: 'instagram' | 'facebook' | 'telegram' | 'twitter' | 'bluesky' | 'reddit' | 'whatsapp' | 'sms' | 'slack' | 'imessage';
31739
32306
  name: string;
31740
32307
  description?: string;
31741
32308
  message?: {