@getlatedev/node 0.2.1223 → 0.2.1224

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.
@@ -3689,10 +3689,26 @@ export type CommentAutomationTemplateElement = {
3689
3689
  }>;
3690
3690
  };
3691
3691
 
3692
+ export type CommerceAddress = {
3693
+ firstName?: (string) | null;
3694
+ lastName?: (string) | null;
3695
+ company?: (string) | null;
3696
+ phone?: (string) | null;
3697
+ line1?: (string) | null;
3698
+ line2?: (string) | null;
3699
+ city?: (string) | null;
3700
+ region?: (string) | null;
3701
+ postalCode?: (string) | null;
3702
+ /**
3703
+ * ISO 3166-1 alpha-2.
3704
+ */
3705
+ countryCode?: (string) | null;
3706
+ };
3707
+
3692
3708
  /**
3693
3709
  * An operation a store supports. Calling an operation outside this list answers 400 platform_not_supported.
3694
3710
  */
3695
- export type CommerceCapability = 'products.read' | 'products.create' | 'products.update' | 'products.status' | 'products.price' | 'products.variants' | 'products.images' | 'products.images_remove' | 'collections.read' | 'collections.write' | 'collections.metafields' | 'metafields.read' | 'metafields.write' | 'pages.read' | 'pages.write' | 'inventory.read' | 'inventory.write' | 'channels.read' | 'channels.write' | 'discounts.read' | 'discounts.write' | 'discounts.codes' | 'navigation.read' | 'navigation.write' | 'metaobjects.read' | 'metaobjects.write' | 'markets.read' | 'markets.write' | 'marketing.write';
3711
+ export type CommerceCapability = 'products.read' | 'products.create' | 'products.update' | 'products.status' | 'products.price' | 'products.variants' | 'products.images' | 'products.images_remove' | 'collections.read' | 'collections.write' | 'collections.metafields' | 'metafields.read' | 'metafields.write' | 'pages.read' | 'pages.write' | 'inventory.read' | 'inventory.write' | 'channels.read' | 'channels.write' | 'discounts.read' | 'discounts.write' | 'discounts.codes' | 'navigation.read' | 'navigation.write' | 'metaobjects.read' | 'metaobjects.write' | 'markets.read' | 'markets.write' | 'marketing.write' | 'orders.read';
3696
3712
 
3697
3713
  /**
3698
3714
  * A store kept in sync with an ad-platform product catalog.
@@ -3966,6 +3982,151 @@ export type CommerceMoney = {
3966
3982
  currency: string;
3967
3983
  };
3968
3984
 
3985
+ /**
3986
+ * An order with what an invoice needs. Every amount is in `currency`, the store currency.
3987
+ */
3988
+ export type CommerceOrder = {
3989
+ id?: string;
3990
+ accountId?: string;
3991
+ platform?: 'shopify' | 'woocommerce';
3992
+ /**
3993
+ * The number the merchant and buyer see.
3994
+ */
3995
+ number?: string;
3996
+ status?: CommerceOrderStatus;
3997
+ /**
3998
+ * Shopify fulfilment status (e.g. UNFULFILLED) or WooCommerce order status (e.g. processing).
3999
+ */
4000
+ platformStatus?: string;
4001
+ paymentStatus?: ('pending' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided' | 'failed' | null);
4002
+ /**
4003
+ * Shopify financial status. Null on WooCommerce, where payment is read from the order status.
4004
+ */
4005
+ platformPaymentStatus?: (string) | null;
4006
+ currency?: string;
4007
+ /**
4008
+ * Whether line item and shipping amounts include tax. Always false on WooCommerce, whose API returns amounts before tax whatever the store displays (platformData.pricesIncludeTax).
4009
+ */
4010
+ taxesIncluded?: boolean;
4011
+ createdAt?: string;
4012
+ updatedAt?: string;
4013
+ /**
4014
+ * WooCommerce only; null on Shopify.
4015
+ */
4016
+ paidAt?: (string) | null;
4017
+ /**
4018
+ * Shopify only; null on WooCommerce.
4019
+ */
4020
+ cancelledAt?: (string) | null;
4021
+ cancelReason?: (string) | null;
4022
+ /**
4023
+ * Line items before order discounts and shipping.
4024
+ */
4025
+ subtotal?: CommerceMoney;
4026
+ discountTotal?: CommerceMoney;
4027
+ shippingTotal?: CommerceMoney;
4028
+ taxTotal?: CommerceMoney;
4029
+ total?: CommerceMoney;
4030
+ refundedTotal?: CommerceMoney;
4031
+ discountCodes?: Array<(string)>;
4032
+ paymentMethods?: Array<(string)>;
4033
+ customer?: {
4034
+ /**
4035
+ * Null for guest checkouts.
4036
+ */
4037
+ id?: (string) | null;
4038
+ email?: (string) | null;
4039
+ phone?: (string) | null;
4040
+ firstName?: (string) | null;
4041
+ lastName?: (string) | null;
4042
+ } | null;
4043
+ billingAddress?: (CommerceAddress | null);
4044
+ shippingAddress?: (CommerceAddress | null);
4045
+ buyerNote?: (string) | null;
4046
+ lineItems?: Array<{
4047
+ id?: string;
4048
+ /**
4049
+ * Null when the product was deleted.
4050
+ */
4051
+ productId?: (string) | null;
4052
+ variantId?: (string) | null;
4053
+ sku?: (string) | null;
4054
+ title?: string;
4055
+ variantTitle?: (string) | null;
4056
+ /**
4057
+ * As ordered; refunded units are listed under refunds.
4058
+ */
4059
+ quantity?: number;
4060
+ /**
4061
+ * Before discounts.
4062
+ */
4063
+ unitPrice?: CommerceMoney;
4064
+ /**
4065
+ * unitPrice x quantity.
4066
+ */
4067
+ subtotal?: CommerceMoney;
4068
+ discountTotal?: CommerceMoney;
4069
+ /**
4070
+ * subtotal minus discountTotal.
4071
+ */
4072
+ total?: CommerceMoney;
4073
+ taxLines?: Array<CommerceTaxLine>;
4074
+ }>;
4075
+ shippingLines?: Array<CommerceOrderChargeLine>;
4076
+ /**
4077
+ * WooCommerce fees. Always empty on Shopify.
4078
+ */
4079
+ feeLines?: Array<CommerceOrderChargeLine>;
4080
+ /**
4081
+ * Order tax by rate, line items and shipping together.
4082
+ */
4083
+ taxLines?: Array<CommerceTaxLine>;
4084
+ refunds?: Array<{
4085
+ id?: string;
4086
+ createdAt?: (string) | null;
4087
+ note?: (string) | null;
4088
+ amount?: CommerceMoney;
4089
+ lineItems?: Array<{
4090
+ lineItemId?: string;
4091
+ quantity?: number;
4092
+ /**
4093
+ * Before tax.
4094
+ */
4095
+ amount?: CommerceMoney;
4096
+ }>;
4097
+ }>;
4098
+ fulfillments?: Array<{
4099
+ carrierName?: (string) | null;
4100
+ trackingNumber?: (string) | null;
4101
+ trackingUrl?: (string) | null;
4102
+ }>;
4103
+ /**
4104
+ * Platform-only fields. Null when the platform has none.
4105
+ */
4106
+ platformData?: {
4107
+ [key: string]: unknown;
4108
+ } | null;
4109
+ };
4110
+
4111
+ /**
4112
+ * A shipping or fee line.
4113
+ */
4114
+ export type CommerceOrderChargeLine = {
4115
+ id?: string;
4116
+ title?: string;
4117
+ /**
4118
+ * Before discounts.
4119
+ */
4120
+ amount?: CommerceMoney;
4121
+ discountTotal?: CommerceMoney;
4122
+ taxLines?: Array<CommerceTaxLine>;
4123
+ };
4124
+
4125
+ /**
4126
+ * Where the order stands. The raw platform value is returned next to it as platformStatus.
4127
+ */
4128
+ export type CommerceOrderStatus = 'pending_payment' | 'on_hold' | 'awaiting_fulfillment' | 'partially_fulfilled' | 'in_transit' | 'delivered' | 'completed' | 'cancelled';
4129
+
3969
4130
  export type CommercePage = {
3970
4131
  id?: string;
3971
4132
  accountId?: string;
@@ -4090,6 +4251,15 @@ export type CommerceStore = {
4090
4251
  grantPermissionsUrl: (string) | null;
4091
4252
  };
4092
4253
 
4254
+ export type CommerceTaxLine = {
4255
+ title?: string;
4256
+ /**
4257
+ * Percent, e.g. 20 for 20%. Null when the platform does not say.
4258
+ */
4259
+ ratePercent?: (number) | null;
4260
+ amount?: CommerceMoney;
4261
+ };
4262
+
4093
4263
  /**
4094
4264
  * A purchasable variant of a product (one per option combination).
4095
4265
  */
@@ -12392,7 +12562,7 @@ export type Webhook = {
12392
12562
  /**
12393
12563
  * Events subscribed to
12394
12564
  */
12395
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
12565
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
12396
12566
  /**
12397
12567
  * Whether webhook delivery is enabled
12398
12568
  */
@@ -13519,6 +13689,52 @@ export type event14 = 'comment.received';
13519
13689
 
13520
13690
  export type platform13 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
13521
13691
 
13692
+ export type WebhookPayloadCommerceOrder = {
13693
+ /**
13694
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
13695
+ */
13696
+ test?: boolean;
13697
+ id?: string;
13698
+ event?: 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
13699
+ /**
13700
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
13701
+ */
13702
+ timestamp?: string;
13703
+ store?: {
13704
+ /**
13705
+ * Zernio SocialAccount id of the store.
13706
+ */
13707
+ accountId?: string;
13708
+ platform?: 'shopify' | 'woocommerce';
13709
+ /**
13710
+ * The platform id of the shop.
13711
+ */
13712
+ shopId?: (string) | null;
13713
+ };
13714
+ /**
13715
+ * Identifiers only, never buyer data: read the order with GET /v1/commerce/orders/{orderId}.
13716
+ */
13717
+ resource?: {
13718
+ type?: 'order';
13719
+ /**
13720
+ * Platform-native order id.
13721
+ */
13722
+ id?: string;
13723
+ /**
13724
+ * Zernio order status at the time of the change. Null on commerce.order.refunded from Shopify, and on WooCommerce refunds.
13725
+ */
13726
+ status?: (CommerceOrderStatus | null);
13727
+ /**
13728
+ * Raw platform status, e.g. UNFULFILLED on Shopify or processing on WooCommerce.
13729
+ */
13730
+ platformStatus?: (string) | null;
13731
+ };
13732
+ };
13733
+
13734
+ export type event15 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
13735
+
13736
+ export type type17 = 'order';
13737
+
13522
13738
  export type WebhookPayloadCommerceProduct = {
13523
13739
  /**
13524
13740
  * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
@@ -13558,9 +13774,9 @@ export type WebhookPayloadCommerceProduct = {
13558
13774
  };
13559
13775
  };
13560
13776
 
13561
- export type event15 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
13777
+ export type event16 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
13562
13778
 
13563
- export type type17 = 'product';
13779
+ export type type18 = 'product';
13564
13780
 
13565
13781
  export type WebhookPayloadContactFieldChanged = {
13566
13782
  /**
@@ -13598,7 +13814,7 @@ export type WebhookPayloadContactFieldChanged = {
13598
13814
  source: 'api' | 'workflow' | 'automation';
13599
13815
  };
13600
13816
 
13601
- export type event16 = 'contact.field_changed';
13817
+ export type event17 = 'contact.field_changed';
13602
13818
 
13603
13819
  /**
13604
13820
  * Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
@@ -13630,7 +13846,7 @@ export type WebhookPayloadContactTag = {
13630
13846
  source: 'api' | 'workflow' | 'automation';
13631
13847
  };
13632
13848
 
13633
- export type event17 = 'contact.tag_added' | 'contact.tag_removed';
13849
+ export type event18 = 'contact.tag_added' | 'contact.tag_removed';
13634
13850
 
13635
13851
  /**
13636
13852
  * Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
@@ -13676,7 +13892,7 @@ export type WebhookPayloadConversationControlChanged = {
13676
13892
  timestamp: string;
13677
13893
  };
13678
13894
 
13679
- export type event18 = 'conversation.control_changed';
13895
+ export type event19 = 'conversation.control_changed';
13680
13896
 
13681
13897
  /**
13682
13898
  * Who answers now. ai_agent: Meta Business Agent (WhatsApp); app: you; other: another app (a WhatsApp partner, or a Messenger / Instagram receiver such as Page Inbox).
@@ -13718,7 +13934,7 @@ export type WebhookPayloadConversationStarted = {
13718
13934
  timestamp: string;
13719
13935
  };
13720
13936
 
13721
- export type event19 = 'conversation.started';
13937
+ export type event20 = 'conversation.started';
13722
13938
 
13723
13939
  /**
13724
13940
  * Webhook payload for post.external.created / post.external.updated /
@@ -13755,7 +13971,7 @@ export type WebhookPayloadExternalPost = {
13755
13971
  timestamp: string;
13756
13972
  };
13757
13973
 
13758
- export type event20 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
13974
+ export type event21 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
13759
13975
 
13760
13976
  /**
13761
13977
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -13831,7 +14047,7 @@ export type WebhookPayloadLead = {
13831
14047
  timestamp: string;
13832
14048
  };
13833
14049
 
13834
- export type event21 = 'lead.received';
14050
+ export type event22 = 'lead.received';
13835
14051
 
13836
14052
  export type platform14 = 'facebook';
13837
14053
 
@@ -14422,7 +14638,7 @@ export type WebhookPayloadMessage = {
14422
14638
  timestamp: string;
14423
14639
  };
14424
14640
 
14425
- export type event22 = 'message.received';
14641
+ export type event23 = 'message.received';
14426
14642
 
14427
14643
  /**
14428
14644
  * Which Zernio surface produced the message. Always present and
@@ -14488,7 +14704,7 @@ export type WebhookPayloadMessageDeleted = {
14488
14704
  timestamp: string;
14489
14705
  };
14490
14706
 
14491
- export type event23 = 'message.deleted';
14707
+ export type event24 = 'message.deleted';
14492
14708
 
14493
14709
  /**
14494
14710
  * Shared payload for message.delivered, message.read, message.played and
@@ -14556,7 +14772,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
14556
14772
  timestamp: string;
14557
14773
  };
14558
14774
 
14559
- export type event24 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
14775
+ export type event25 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
14560
14776
 
14561
14777
  /**
14562
14778
  * Webhook payload for message.edited events. Fires when the sender
@@ -14599,7 +14815,7 @@ export type WebhookPayloadMessageEdited = {
14599
14815
  timestamp: string;
14600
14816
  };
14601
14817
 
14602
- export type event25 = 'message.edited';
14818
+ export type event26 = 'message.edited';
14603
14819
 
14604
14820
  /**
14605
14821
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -14845,7 +15061,7 @@ export type WebhookPayloadMessageSent = {
14845
15061
  timestamp: string;
14846
15062
  };
14847
15063
 
14848
- export type event26 = 'message.sent';
15064
+ export type event27 = 'message.sent';
14849
15065
 
14850
15066
  /**
14851
15067
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
@@ -14903,7 +15119,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
14903
15119
  timestamp: string;
14904
15120
  };
14905
15121
 
14906
- export type event27 = 'phone_number.stock_available';
15122
+ export type event28 = 'phone_number.stock_available';
14907
15123
 
14908
15124
  /**
14909
15125
  * Webhook payload for post events
@@ -14958,7 +15174,7 @@ export type WebhookPayloadPost = {
14958
15174
  timestamp: string;
14959
15175
  };
14960
15176
 
14961
- export type event28 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
15177
+ export type event29 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
14962
15178
 
14963
15179
  /**
14964
15180
  * Webhook payload for the per-platform terminal events
@@ -15082,7 +15298,7 @@ export type WebhookPayloadPostPlatform = {
15082
15298
  timestamp: string;
15083
15299
  };
15084
15300
 
15085
- export type event29 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
15301
+ export type event30 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
15086
15302
 
15087
15303
  /**
15088
15304
  * Terminal status this event fires on. Matches the event suffix.
@@ -15147,7 +15363,7 @@ export type WebhookPayloadReaction = {
15147
15363
  timestamp: string;
15148
15364
  };
15149
15365
 
15150
- export type event30 = 'reaction.received';
15366
+ export type event31 = 'reaction.received';
15151
15367
 
15152
15368
  export type action = 'added' | 'removed';
15153
15369
 
@@ -15226,7 +15442,7 @@ export type WebhookPayloadReferral = {
15226
15442
  timestamp: string;
15227
15443
  };
15228
15444
 
15229
- export type event31 = 'referral.received';
15445
+ export type event32 = 'referral.received';
15230
15446
 
15231
15447
  /**
15232
15448
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -15258,7 +15474,7 @@ export type WebhookPayloadReviewNew = {
15258
15474
  timestamp: string;
15259
15475
  };
15260
15476
 
15261
- export type event32 = 'review.new';
15477
+ export type event33 = 'review.new';
15262
15478
 
15263
15479
  /**
15264
15480
  * Webhook payload for the review.updated event. Fired when the reviewer edits their
@@ -15296,7 +15512,7 @@ export type WebhookPayloadReviewUpdated = {
15296
15512
  timestamp: string;
15297
15513
  };
15298
15514
 
15299
- export type event33 = 'review.updated';
15515
+ export type event34 = 'review.updated';
15300
15516
 
15301
15517
  export type WebhookPayloadSequenceEnrollment = {
15302
15518
  /**
@@ -15329,7 +15545,7 @@ export type WebhookPayloadSequenceEnrollment = {
15329
15545
  exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
15330
15546
  };
15331
15547
 
15332
- export type event34 = 'sequence.enrolled' | 'sequence.exited';
15548
+ export type event35 = 'sequence.enrolled' | 'sequence.exited';
15333
15549
 
15334
15550
  /**
15335
15551
  * sequence.exited only. completed: the last step was sent; replied: the contact replied and the sequence exits on reply; manual: unenrolled through the API; failed: the step kept failing to send; unsubscribed: the contact opted out.
@@ -15350,7 +15566,7 @@ export type WebhookPayloadSupportRun = {
15350
15566
  run: SupportRun;
15351
15567
  };
15352
15568
 
15353
- export type event35 = 'support.run.completed' | 'support.run.failed';
15569
+ export type event36 = 'support.run.completed' | 'support.run.failed';
15354
15570
 
15355
15571
  /**
15356
15572
  * Webhook payload for test deliveries
@@ -15371,7 +15587,7 @@ export type WebhookPayloadTest = {
15371
15587
  timestamp: string;
15372
15588
  };
15373
15589
 
15374
- export type event36 = 'webhook.test';
15590
+ export type event37 = 'webhook.test';
15375
15591
 
15376
15592
  /**
15377
15593
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -15423,7 +15639,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
15423
15639
  timestamp: string;
15424
15640
  };
15425
15641
 
15426
- export type event37 = 'whatsapp.account.alert_received';
15642
+ export type event38 = 'whatsapp.account.alert_received';
15427
15643
 
15428
15644
  export type platform16 = 'whatsapp';
15429
15645
 
@@ -15479,7 +15695,7 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
15479
15695
  timestamp: string;
15480
15696
  };
15481
15697
 
15482
- export type event38 = 'whatsapp.account.name_status_updated';
15698
+ export type event39 = 'whatsapp.account.name_status_updated';
15483
15699
 
15484
15700
  /**
15485
15701
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
@@ -15537,7 +15753,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
15537
15753
  timestamp: string;
15538
15754
  };
15539
15755
 
15540
- export type event39 = 'whatsapp.account.quality_updated';
15756
+ export type event40 = 'whatsapp.account.quality_updated';
15541
15757
 
15542
15758
  /**
15543
15759
  * The Meta webhook field that reported the change.
@@ -15613,7 +15829,7 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
15613
15829
  timestamp: string;
15614
15830
  };
15615
15831
 
15616
- export type event40 = 'whatsapp.account.status_updated';
15832
+ export type event41 = 'whatsapp.account.status_updated';
15617
15833
 
15618
15834
  /**
15619
15835
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
@@ -15670,7 +15886,7 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
15670
15886
  timestamp: string;
15671
15887
  };
15672
15888
 
15673
- export type event41 = 'whatsapp.contact.identity_changed';
15889
+ export type event42 = 'whatsapp.contact.identity_changed';
15674
15890
 
15675
15891
  /**
15676
15892
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
@@ -15744,7 +15960,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
15744
15960
  timestamp: string;
15745
15961
  };
15746
15962
 
15747
- export type event42 = 'whatsapp.template.category_updated';
15963
+ export type event43 = 'whatsapp.template.category_updated';
15748
15964
 
15749
15965
  /**
15750
15966
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -15826,7 +16042,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
15826
16042
  timestamp: string;
15827
16043
  };
15828
16044
 
15829
- export type event43 = 'whatsapp.template.status_updated';
16045
+ export type event44 = 'whatsapp.template.status_updated';
15830
16046
 
15831
16047
  /**
15832
16048
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -15893,7 +16109,7 @@ export type WebhookPayloadWorkflowRun = {
15893
16109
  error?: string;
15894
16110
  };
15895
16111
 
15896
- export type event44 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
16112
+ export type event45 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
15897
16113
 
15898
16114
  /**
15899
16115
  * running on workflow.run.started; completed or exited (ended on purpose before the last node, e.g. a handoff) on workflow.run.completed; failed on workflow.run.failed.
@@ -16171,7 +16387,7 @@ export type WhatsAppTemplateButton = {
16171
16387
  navigate_screen?: string;
16172
16388
  };
16173
16389
 
16174
- export type type18 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
16390
+ export type type19 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
16175
16391
 
16176
16392
  /**
16177
16393
  * Required when type is otp
@@ -16213,7 +16429,7 @@ export type WhatsAppTemplateLookupError = {
16213
16429
  };
16214
16430
  };
16215
16431
 
16216
- export type type19 = 'platform_error';
16432
+ export type type20 = 'platform_error';
16217
16433
 
16218
16434
  export type code = 'platform_api_error';
16219
16435
 
@@ -16375,7 +16591,7 @@ export type WorkflowNode = {
16375
16591
  * integrations (webhook, ai, handoff, start_call).
16376
16592
  *
16377
16593
  */
16378
- export type type20 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
16594
+ export type type21 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
16379
16595
 
16380
16596
  /**
16381
16597
  * A single X API operation with its per-call price and the Zernio platform methods that trigger it.
@@ -16511,7 +16727,7 @@ export type XArticleBlock = {
16511
16727
  entity_ranges?: Array<XArticleEntityRange>;
16512
16728
  };
16513
16729
 
16514
- export type type21 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
16730
+ export type type22 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
16515
16731
 
16516
16732
  /**
16517
16733
  * X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
@@ -16590,7 +16806,7 @@ export type XArticleEntity = {
16590
16806
 
16591
16807
  export type mutability = 'immutable' | 'mutable' | 'segmented';
16592
16808
 
16593
- export type type22 = 'divider' | 'latex';
16809
+ export type type23 = 'divider' | 'latex';
16594
16810
 
16595
16811
  /**
16596
16812
  * The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
@@ -27092,7 +27308,7 @@ export type CreateWebhookSettingsData = {
27092
27308
  /**
27093
27309
  * Events to subscribe to (at least one required)
27094
27310
  */
27095
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
27311
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
27096
27312
  /**
27097
27313
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
27098
27314
  */
@@ -27158,7 +27374,7 @@ export type UpdateWebhookSettingsData = {
27158
27374
  /**
27159
27375
  * Events to subscribe to. Must contain at least one event if provided.
27160
27376
  */
27161
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
27377
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
27162
27378
  /**
27163
27379
  * Enable or disable webhook delivery
27164
27380
  */
@@ -27328,7 +27544,7 @@ export type TestWebhookData = {
27328
27544
  /**
27329
27545
  * Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
27330
27546
  */
27331
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.video.processed' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'api.changelog.published';
27547
+ event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.video.processed' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
27332
27548
  };
27333
27549
  };
27334
27550
 
@@ -54959,6 +55175,51 @@ export type GetCommerceStoreResponse = ({
54959
55175
 
54960
55176
  export type GetCommerceStoreError = (ErrorResponse | unknown);
54961
55177
 
55178
+ export type ListCommerceOrdersData = {
55179
+ query: {
55180
+ /**
55181
+ * Connected store SocialAccount id.
55182
+ */
55183
+ accountId: string;
55184
+ createdAfter?: string;
55185
+ createdBefore?: string;
55186
+ cursor?: string;
55187
+ limit?: number;
55188
+ /**
55189
+ * Only orders changed after this time, oldest change first.
55190
+ */
55191
+ updatedAfter?: string;
55192
+ };
55193
+ };
55194
+
55195
+ export type ListCommerceOrdersResponse = ({
55196
+ orders?: Array<CommerceOrder>;
55197
+ nextCursor?: (string) | null;
55198
+ });
55199
+
55200
+ export type ListCommerceOrdersError = (ErrorResponse | unknown);
55201
+
55202
+ export type GetCommerceOrderData = {
55203
+ path: {
55204
+ /**
55205
+ * Platform-native order id.
55206
+ */
55207
+ orderId: string;
55208
+ };
55209
+ query: {
55210
+ /**
55211
+ * Connected store SocialAccount id.
55212
+ */
55213
+ accountId: string;
55214
+ };
55215
+ };
55216
+
55217
+ export type GetCommerceOrderResponse = ({
55218
+ order?: CommerceOrder;
55219
+ });
55220
+
55221
+ export type GetCommerceOrderError = (ErrorResponse | unknown);
55222
+
54962
55223
  export type ListCommerceProductsData = {
54963
55224
  query: {
54964
55225
  /**