@getlatedev/node 0.2.1326 → 0.2.1328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/index.d.mts +529 -73
- package/dist/index.d.ts +529 -73
- package/dist/index.js +55 -1
- package/dist/index.mjs +55 -1
- package/package.json +1 -1
- package/src/client.ts +20 -0
- package/src/generated/sdk.gen.ts +105 -2
- package/src/generated/types.gen.ts +557 -72
|
@@ -1460,6 +1460,215 @@ export type AdPromotedObject = {
|
|
|
1460
1460
|
*/
|
|
1461
1461
|
export type AdReviewStatus = 'in_review' | 'approved' | 'rejected' | 'with_issues';
|
|
1462
1462
|
|
|
1463
|
+
export type AdRule = {
|
|
1464
|
+
id: string;
|
|
1465
|
+
name: string;
|
|
1466
|
+
/**
|
|
1467
|
+
* The ads connection the rule acts through.
|
|
1468
|
+
*/
|
|
1469
|
+
accountId: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* Ad platform, for example `facebook` (Meta) or `google`.
|
|
1472
|
+
*/
|
|
1473
|
+
platform: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* Platform ad account ID.
|
|
1476
|
+
*/
|
|
1477
|
+
adAccountId: string;
|
|
1478
|
+
level: AdRuleLevel;
|
|
1479
|
+
/**
|
|
1480
|
+
* Platform campaign IDs the rule is limited to. Null checks the whole ad account.
|
|
1481
|
+
*/
|
|
1482
|
+
campaignIds: Array<(string)> | null;
|
|
1483
|
+
conditions: AdRuleConditions;
|
|
1484
|
+
actions: AdRuleActions;
|
|
1485
|
+
schedule: AdRuleSchedule;
|
|
1486
|
+
cooldownMinutes: number;
|
|
1487
|
+
enabled: boolean;
|
|
1488
|
+
lastRunAt: (string) | null;
|
|
1489
|
+
/**
|
|
1490
|
+
* Null while the rule is disabled.
|
|
1491
|
+
*/
|
|
1492
|
+
nextRunAt: (string) | null;
|
|
1493
|
+
createdAt: string;
|
|
1494
|
+
updatedAt: string;
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
export type AdRuleAction = {
|
|
1498
|
+
/**
|
|
1499
|
+
* Send the `ad_rule.triggered` webhook.
|
|
1500
|
+
*/
|
|
1501
|
+
type: 'notify';
|
|
1502
|
+
} | {
|
|
1503
|
+
/**
|
|
1504
|
+
* Pause the campaign or ad set.
|
|
1505
|
+
*/
|
|
1506
|
+
type: 'pause';
|
|
1507
|
+
} | {
|
|
1508
|
+
/**
|
|
1509
|
+
* Reactivate a campaign or ad set a rule paused, once `cooldownMinutes` has passed since the pause. Objects you paused yourself are never touched.
|
|
1510
|
+
*/
|
|
1511
|
+
type: 'activate';
|
|
1512
|
+
} | {
|
|
1513
|
+
/**
|
|
1514
|
+
* Change the daily budget. Google ad groups have no budget of their own, so on Google it needs a campaign-level rule.
|
|
1515
|
+
*/
|
|
1516
|
+
type: 'adjust_budget';
|
|
1517
|
+
direction: 'increase' | 'decrease';
|
|
1518
|
+
/**
|
|
1519
|
+
* Change in percent: up to 100 for an increase, up to 90 for a decrease.
|
|
1520
|
+
*/
|
|
1521
|
+
percent: number;
|
|
1522
|
+
/**
|
|
1523
|
+
* The budget never goes above this on an increase, or below it on a decrease, in the ad account currency.
|
|
1524
|
+
*/
|
|
1525
|
+
limit: number;
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Send the `ad_rule.triggered` webhook.
|
|
1530
|
+
*/
|
|
1531
|
+
export type type2 = 'notify';
|
|
1532
|
+
|
|
1533
|
+
export type direction = 'increase' | 'decrease';
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Each type at most once, and at most one of `pause`, `activate` and `adjust_budget`.
|
|
1537
|
+
*/
|
|
1538
|
+
export type AdRuleActions = Array<AdRuleAction>;
|
|
1539
|
+
|
|
1540
|
+
export type AdRuleCondition = {
|
|
1541
|
+
/**
|
|
1542
|
+
* `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency.
|
|
1543
|
+
*/
|
|
1544
|
+
metric: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas';
|
|
1545
|
+
/**
|
|
1546
|
+
* Days in the ad account's own timezone. `last_7d` includes today.
|
|
1547
|
+
*/
|
|
1548
|
+
window: 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
|
|
1549
|
+
op: '>' | '>=' | '<' | '<=';
|
|
1550
|
+
value: number;
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency.
|
|
1555
|
+
*/
|
|
1556
|
+
export type metric = 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas';
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* Days in the ad account's own timezone. `last_7d` includes today.
|
|
1560
|
+
*/
|
|
1561
|
+
export type window = 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
|
|
1562
|
+
|
|
1563
|
+
export type op = '>' | '>=' | '<' | '<=';
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Every condition must hold for an object to match. A rate with no denominator (a CPA with no conversions) never matches.
|
|
1567
|
+
*/
|
|
1568
|
+
export type AdRuleConditions = {
|
|
1569
|
+
all: Array<AdRuleCondition>;
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1572
|
+
export type AdRuleEvaluation = {
|
|
1573
|
+
evaluatedAt: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* The ad account's calendar date the windows were resolved against.
|
|
1576
|
+
*/
|
|
1577
|
+
today: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* IANA timezone of the ad account.
|
|
1580
|
+
*/
|
|
1581
|
+
timezone: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* True when the ad account has no known timezone and UTC was assumed.
|
|
1584
|
+
*/
|
|
1585
|
+
timezoneAssumed: boolean;
|
|
1586
|
+
currency: (string) | null;
|
|
1587
|
+
/**
|
|
1588
|
+
* How many objects meet every condition.
|
|
1589
|
+
*/
|
|
1590
|
+
matched: number;
|
|
1591
|
+
/**
|
|
1592
|
+
* Every delivering campaign or ad set in scope (for an `activate` rule, the rule-paused ones it may reactivate).
|
|
1593
|
+
*/
|
|
1594
|
+
objects: Array<AdRuleObjectEvaluation>;
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* Whether the rule checks campaigns or ad sets. Each one is evaluated on its own.
|
|
1599
|
+
*/
|
|
1600
|
+
export type AdRuleLevel = 'campaign' | 'adset';
|
|
1601
|
+
|
|
1602
|
+
export type AdRuleObjectEvaluation = {
|
|
1603
|
+
/**
|
|
1604
|
+
* Platform ID of the campaign or ad set.
|
|
1605
|
+
*/
|
|
1606
|
+
id: string;
|
|
1607
|
+
name: string;
|
|
1608
|
+
campaignId: (string) | null;
|
|
1609
|
+
/**
|
|
1610
|
+
* True when every condition holds.
|
|
1611
|
+
*/
|
|
1612
|
+
matched: boolean;
|
|
1613
|
+
conditions: Array<(AdRuleCondition & {
|
|
1614
|
+
/**
|
|
1615
|
+
* The object's value over the window. Null when it cannot be computed.
|
|
1616
|
+
*/
|
|
1617
|
+
actual: (number) | null;
|
|
1618
|
+
met: boolean;
|
|
1619
|
+
})>;
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
export type AdRuleRun = {
|
|
1623
|
+
id: string;
|
|
1624
|
+
ranAt: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* `triggered`: the rule acted on at least one object (`error` is set if the webhook could not be sent afterwards). `cooldown`: objects matched but all were in cooldown. `no_match`: nothing matched. `failed`: the metrics could not be read, every action failed, or the webhook of a notify-only rule could not be sent (see `error`).
|
|
1627
|
+
*/
|
|
1628
|
+
outcome: 'triggered' | 'cooldown' | 'no_match' | 'failed';
|
|
1629
|
+
objectsEvaluated: number;
|
|
1630
|
+
actedObjectIds: Array<(string)>;
|
|
1631
|
+
/**
|
|
1632
|
+
* The matched objects with their condition values, and what each action did.
|
|
1633
|
+
*/
|
|
1634
|
+
evaluation: {
|
|
1635
|
+
today?: string;
|
|
1636
|
+
timezone?: string;
|
|
1637
|
+
timezoneAssumed?: boolean;
|
|
1638
|
+
currency?: (string) | null;
|
|
1639
|
+
matched?: Array<AdRuleObjectEvaluation>;
|
|
1640
|
+
actions?: Array<{
|
|
1641
|
+
objectId: string;
|
|
1642
|
+
type: 'pause' | 'activate' | 'adjust_budget';
|
|
1643
|
+
status: 'done' | 'skipped' | 'failed';
|
|
1644
|
+
/**
|
|
1645
|
+
* Why it was skipped or failed, for example `already_paused`.
|
|
1646
|
+
*/
|
|
1647
|
+
reason?: string;
|
|
1648
|
+
previousDailyBudget?: number;
|
|
1649
|
+
newDailyBudget?: number;
|
|
1650
|
+
}>;
|
|
1651
|
+
} | null;
|
|
1652
|
+
error: (string) | null;
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* `triggered`: the rule acted on at least one object (`error` is set if the webhook could not be sent afterwards). `cooldown`: objects matched but all were in cooldown. `no_match`: nothing matched. `failed`: the metrics could not be read, every action failed, or the webhook of a notify-only rule could not be sent (see `error`).
|
|
1657
|
+
*/
|
|
1658
|
+
export type outcome = 'triggered' | 'cooldown' | 'no_match' | 'failed';
|
|
1659
|
+
|
|
1660
|
+
export type AdRuleSchedule = {
|
|
1661
|
+
/**
|
|
1662
|
+
* How often the rule runs, in minutes.
|
|
1663
|
+
*/
|
|
1664
|
+
everyMinutes: 60 | 180 | 360 | 720 | 1440;
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* How often the rule runs, in minutes.
|
|
1669
|
+
*/
|
|
1670
|
+
export type everyMinutes = 60 | 180 | 360 | 720 | 1440;
|
|
1671
|
+
|
|
1463
1672
|
/**
|
|
1464
1673
|
* One ad schedule window as Google stores it. Half-open: it is exclusive of the end minute, so 09:00-12:00 and 12:00-17:00 are adjacent, not overlapping.
|
|
1465
1674
|
*/
|
|
@@ -2243,7 +2452,7 @@ export type ApiChangelogEntry = {
|
|
|
2243
2452
|
/**
|
|
2244
2453
|
* When `impact` is set, `breaking_change` means exactly `impact: action_required`.
|
|
2245
2454
|
*/
|
|
2246
|
-
export type
|
|
2455
|
+
export type type3 = 'new_feature' | 'breaking_change' | 'improvement' | 'deprecation' | 'minor';
|
|
2247
2456
|
|
|
2248
2457
|
/**
|
|
2249
2458
|
* What an integrator has to do, computed from the OpenAPI diff rather than from the prose. `action_required`: an existing call or parser can break (an operation, parameter or field removed, a field newly required, a type narrowed, an enum value removed, or authentication changed). `additive`: only new or looser things, existing integrations keep working. `none`: descriptions or examples only. Null on entries published before October 2026.
|
|
@@ -3272,7 +3481,7 @@ export type CallRecord = {
|
|
|
3272
3481
|
|
|
3273
3482
|
export type channel = 'whatsapp' | 'pstn';
|
|
3274
3483
|
|
|
3275
|
-
export type
|
|
3484
|
+
export type direction2 = 'inbound' | 'outbound';
|
|
3276
3485
|
|
|
3277
3486
|
export type status10 = 'ringing' | 'answered' | 'ended' | 'failed';
|
|
3278
3487
|
|
|
@@ -3546,7 +3755,7 @@ export type CommentAutomationDmMedia = {
|
|
|
3546
3755
|
url: string;
|
|
3547
3756
|
};
|
|
3548
3757
|
|
|
3549
|
-
export type
|
|
3758
|
+
export type type4 = 'image' | 'video' | 'audio' | 'file';
|
|
3550
3759
|
|
|
3551
3760
|
/**
|
|
3552
3761
|
* Copy for the follow gate. Sensible defaults are used for any field left empty.
|
|
@@ -3768,7 +3977,7 @@ export type CommentAutomationTemplate = {
|
|
|
3768
3977
|
elements: Array<CommentAutomationTemplateElement>;
|
|
3769
3978
|
};
|
|
3770
3979
|
|
|
3771
|
-
export type
|
|
3980
|
+
export type type5 = 'generic';
|
|
3772
3981
|
|
|
3773
3982
|
/**
|
|
3774
3983
|
* Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400.
|
|
@@ -3956,7 +4165,7 @@ export type platform5 = 'shopify';
|
|
|
3956
4165
|
|
|
3957
4166
|
export type method = 'code' | 'automatic';
|
|
3958
4167
|
|
|
3959
|
-
export type
|
|
4168
|
+
export type type6 = 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app';
|
|
3960
4169
|
|
|
3961
4170
|
export type status12 = 'active' | 'scheduled' | 'expired';
|
|
3962
4171
|
|
|
@@ -4034,7 +4243,7 @@ export type CommerceMenuItem = {
|
|
|
4034
4243
|
items?: Array<CommerceMenuItem>;
|
|
4035
4244
|
};
|
|
4036
4245
|
|
|
4037
|
-
export type
|
|
4246
|
+
export type type7 = 'frontpage' | 'collection' | 'collections' | 'product' | 'catalog' | 'page' | 'blog' | 'article' | 'search' | 'shop_policy' | 'http' | 'metaobject' | 'customer_account_page';
|
|
4038
4247
|
|
|
4039
4248
|
export type CommerceMenuItemInput = {
|
|
4040
4249
|
title: string;
|
|
@@ -6312,7 +6521,7 @@ export type DmButton = {
|
|
|
6312
6521
|
phone?: string;
|
|
6313
6522
|
};
|
|
6314
6523
|
|
|
6315
|
-
export type
|
|
6524
|
+
export type type8 = 'url' | 'postback' | 'phone';
|
|
6316
6525
|
|
|
6317
6526
|
/**
|
|
6318
6527
|
* Canonical error envelope. `error` is the human-readable message; `type`,
|
|
@@ -6449,7 +6658,7 @@ export type ErrorResponse = {
|
|
|
6449
6658
|
/**
|
|
6450
6659
|
* Error class for programmatic handling.
|
|
6451
6660
|
*/
|
|
6452
|
-
export type
|
|
6661
|
+
export type type9 = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found' | 'rate_limit_error' | 'platform_error' | 'api_error';
|
|
6453
6662
|
|
|
6454
6663
|
/**
|
|
6455
6664
|
* Meta ad create failures only. The step that failed: `media` (image/video download or upload), `campaign`, `adset`, `creative`, `ad` (the ad POST itself, where Meta's code 31 / 3858385 hold and 100 / 1359188 payment rejections land), `activation` (switching the created objects on), or `other` (a read or check before any write).
|
|
@@ -6490,7 +6699,7 @@ export type ExternalPostMediaItem = {
|
|
|
6490
6699
|
unavailableReason?: 'platform_withheld';
|
|
6491
6700
|
};
|
|
6492
6701
|
|
|
6493
|
-
export type
|
|
6702
|
+
export type type10 = 'image' | 'video';
|
|
6494
6703
|
|
|
6495
6704
|
/**
|
|
6496
6705
|
* unavailable means the media file could not be retrieved (url is null or, for LinkedIn videos, a cover image standing in for the file). available or absent means the file is available at url (older synced items omit the field).
|
|
@@ -7386,7 +7595,7 @@ export type topicType = 'STANDARD' | 'EVENT' | 'OFFER';
|
|
|
7386
7595
|
/**
|
|
7387
7596
|
* Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
|
|
7388
7597
|
*/
|
|
7389
|
-
export type
|
|
7598
|
+
export type type11 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
7390
7599
|
|
|
7391
7600
|
/**
|
|
7392
7601
|
* A Google Business Profile review, as returned by every gmb-reviews read endpoint.
|
|
@@ -7704,7 +7913,7 @@ export type GoogleListingGroupFilterNode = {
|
|
|
7704
7913
|
} | null;
|
|
7705
7914
|
};
|
|
7706
7915
|
|
|
7707
|
-
export type
|
|
7916
|
+
export type type12 = 'SUBDIVISION' | 'UNIT_INCLUDED' | 'UNIT_EXCLUDED';
|
|
7708
7917
|
|
|
7709
7918
|
export type GoogleListingGroupNode = {
|
|
7710
7919
|
dimension: GoogleListingGroupDimension;
|
|
@@ -8531,7 +8740,7 @@ export type InboxWebhookMessage = {
|
|
|
8531
8740
|
|
|
8532
8741
|
export type platform10 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
|
|
8533
8742
|
|
|
8534
|
-
export type
|
|
8743
|
+
export type direction3 = 'incoming' | 'outgoing';
|
|
8535
8744
|
|
|
8536
8745
|
/**
|
|
8537
8746
|
* Shared account-insights response envelope used by every platform-level
|
|
@@ -8809,7 +9018,7 @@ export type InstagramDemographicsResponse = {
|
|
|
8809
9018
|
note?: string;
|
|
8810
9019
|
};
|
|
8811
9020
|
|
|
8812
|
-
export type
|
|
9021
|
+
export type metric2 = 'follower_demographics' | 'engaged_audience_demographics';
|
|
8813
9022
|
|
|
8814
9023
|
/**
|
|
8815
9024
|
* The timeframe used for demographic data
|
|
@@ -9664,7 +9873,7 @@ export type MediaItem = {
|
|
|
9664
9873
|
tiktokProcessed?: boolean;
|
|
9665
9874
|
};
|
|
9666
9875
|
|
|
9667
|
-
export type
|
|
9876
|
+
export type type13 = 'image' | 'video' | 'gif' | 'document';
|
|
9668
9877
|
|
|
9669
9878
|
export type MediaSubtitle = {
|
|
9670
9879
|
/**
|
|
@@ -10720,7 +10929,7 @@ export type PortfolioBidStrategy = {
|
|
|
10720
10929
|
targetImpressionShare?: (GoogleTargetImpressionShare | null);
|
|
10721
10930
|
};
|
|
10722
10931
|
|
|
10723
|
-
export type
|
|
10932
|
+
export type type14 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE' | 'TARGET_IMPRESSION_SHARE';
|
|
10724
10933
|
|
|
10725
10934
|
export type Post = {
|
|
10726
10935
|
_id?: string;
|
|
@@ -11398,7 +11607,7 @@ export type RcsContent = {
|
|
|
11398
11607
|
suggestions?: Array<RcsSuggestion>;
|
|
11399
11608
|
};
|
|
11400
11609
|
|
|
11401
|
-
export type
|
|
11610
|
+
export type type15 = 'text';
|
|
11402
11611
|
|
|
11403
11612
|
export type orientation = 'VERTICAL' | 'HORIZONTAL';
|
|
11404
11613
|
|
|
@@ -11511,7 +11720,7 @@ export type RcsSuggestion = {
|
|
|
11511
11720
|
postbackData?: string;
|
|
11512
11721
|
};
|
|
11513
11722
|
|
|
11514
|
-
export type
|
|
11723
|
+
export type type16 = 'reply';
|
|
11515
11724
|
|
|
11516
11725
|
export type application = 'BROWSER' | 'WEBVIEW';
|
|
11517
11726
|
|
|
@@ -13162,7 +13371,7 @@ export type UploadedFile = {
|
|
|
13162
13371
|
mimeType?: string;
|
|
13163
13372
|
};
|
|
13164
13373
|
|
|
13165
|
-
export type
|
|
13374
|
+
export type type17 = 'image' | 'video' | 'document';
|
|
13166
13375
|
|
|
13167
13376
|
export type UploadTokenResponse = {
|
|
13168
13377
|
token?: string;
|
|
@@ -13714,7 +13923,7 @@ export type Webhook = {
|
|
|
13714
13923
|
/**
|
|
13715
13924
|
* Events subscribed to
|
|
13716
13925
|
*/
|
|
13717
|
-
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.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')>;
|
|
13926
|
+
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | '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')>;
|
|
13718
13927
|
/**
|
|
13719
13928
|
* Whether webhook delivery is enabled
|
|
13720
13929
|
*/
|
|
@@ -14358,6 +14567,143 @@ export type event8 = 'ad.review.approved' | 'ad.review.rejected';
|
|
|
14358
14567
|
|
|
14359
14568
|
export type status39 = 'approved' | 'rejected';
|
|
14360
14569
|
|
|
14570
|
+
/**
|
|
14571
|
+
* Webhook payload for the `ad_rule.triggered` event.
|
|
14572
|
+
*
|
|
14573
|
+
* Fires when a scheduled run of a rule with a `notify` action finds campaigns or ad sets
|
|
14574
|
+
* that meet every condition of the rule. Each object is announced at most once per rule
|
|
14575
|
+
* cooldown, so `objects` lists only the objects the run acted on, never the ones still in
|
|
14576
|
+
* cooldown. A run where every matching object is still in cooldown sends nothing. An object
|
|
14577
|
+
* whose action failed gets no cooldown: the next run retries it and reports it again.
|
|
14578
|
+
*
|
|
14579
|
+
*/
|
|
14580
|
+
export type WebhookPayloadAdRuleTriggered = {
|
|
14581
|
+
/**
|
|
14582
|
+
* Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
|
|
14583
|
+
*/
|
|
14584
|
+
id: string;
|
|
14585
|
+
profiles?: WebhookProfiles;
|
|
14586
|
+
/**
|
|
14587
|
+
* Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
|
|
14588
|
+
*/
|
|
14589
|
+
test?: boolean;
|
|
14590
|
+
event: 'ad_rule.triggered';
|
|
14591
|
+
account: WebhookAdsAccount;
|
|
14592
|
+
rule: {
|
|
14593
|
+
/**
|
|
14594
|
+
* Zernio ad rule ID.
|
|
14595
|
+
*/
|
|
14596
|
+
id: string;
|
|
14597
|
+
name: string;
|
|
14598
|
+
/**
|
|
14599
|
+
* Whether the rule evaluates campaigns or ad sets.
|
|
14600
|
+
*/
|
|
14601
|
+
level: 'campaign' | 'adset';
|
|
14602
|
+
/**
|
|
14603
|
+
* Platform-native ad account ID the rule watches.
|
|
14604
|
+
*/
|
|
14605
|
+
platformAdAccountId: string;
|
|
14606
|
+
};
|
|
14607
|
+
run: {
|
|
14608
|
+
/**
|
|
14609
|
+
* ID of the rule run that triggered.
|
|
14610
|
+
*/
|
|
14611
|
+
id: string;
|
|
14612
|
+
/**
|
|
14613
|
+
* Scheduled time of the run (UTC).
|
|
14614
|
+
*/
|
|
14615
|
+
ranAt: string;
|
|
14616
|
+
/**
|
|
14617
|
+
* The ad account's calendar date (YYYY-MM-DD) the condition windows were resolved against, so `today` and `last_7d` mean the account's days, not UTC days.
|
|
14618
|
+
*/
|
|
14619
|
+
today: string;
|
|
14620
|
+
/**
|
|
14621
|
+
* IANA timezone used for `today`, for example `Europe/Madrid`.
|
|
14622
|
+
*/
|
|
14623
|
+
timezone: string;
|
|
14624
|
+
/**
|
|
14625
|
+
* True when the ad account has no known timezone and UTC was assumed.
|
|
14626
|
+
*/
|
|
14627
|
+
timezoneAssumed: boolean;
|
|
14628
|
+
/**
|
|
14629
|
+
* ISO 4217 currency of the ad account, which money metrics (`spend`, `cpc`, `cpm`, `cpa`) and condition values are in. Null when unknown.
|
|
14630
|
+
*/
|
|
14631
|
+
currency: (string) | null;
|
|
14632
|
+
};
|
|
14633
|
+
/**
|
|
14634
|
+
* The campaigns or ad sets this run acted on, at the rule's `level`, including those whose action failed. Objects still in cooldown are left out.
|
|
14635
|
+
*/
|
|
14636
|
+
objects: Array<{
|
|
14637
|
+
/**
|
|
14638
|
+
* Platform-native ID of the campaign or ad set.
|
|
14639
|
+
*/
|
|
14640
|
+
platformId: string;
|
|
14641
|
+
/**
|
|
14642
|
+
* Name on the platform. Falls back to `platformId` when the platform reports none.
|
|
14643
|
+
*/
|
|
14644
|
+
name: string;
|
|
14645
|
+
/**
|
|
14646
|
+
* Platform-native ID of the campaign the object belongs to (on a campaign-level rule, the campaign's own ID). Null when unknown.
|
|
14647
|
+
*/
|
|
14648
|
+
platformCampaignId: (string) | null;
|
|
14649
|
+
/**
|
|
14650
|
+
* Every condition of the rule, with the value the object reached.
|
|
14651
|
+
*/
|
|
14652
|
+
conditions: Array<{
|
|
14653
|
+
/**
|
|
14654
|
+
* `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa` or `roas`. New values may be added.
|
|
14655
|
+
*/
|
|
14656
|
+
metric: string;
|
|
14657
|
+
/**
|
|
14658
|
+
* `today`, `yesterday`, `last_3d`, `last_7d`, `last_14d` or `last_30d`, in the account's calendar (see `run.today`). New values may be added.
|
|
14659
|
+
*/
|
|
14660
|
+
window: string;
|
|
14661
|
+
op: '>' | '>=' | '<' | '<=';
|
|
14662
|
+
/**
|
|
14663
|
+
* The threshold set on the rule.
|
|
14664
|
+
*/
|
|
14665
|
+
value: number;
|
|
14666
|
+
/**
|
|
14667
|
+
* The object's value for the metric over the window. Null when it cannot be computed, for example a cost per action with no actions.
|
|
14668
|
+
*/
|
|
14669
|
+
actual: (number) | null;
|
|
14670
|
+
}>;
|
|
14671
|
+
/**
|
|
14672
|
+
* What the rule did to the object. Empty on a rule that only notifies.
|
|
14673
|
+
*/
|
|
14674
|
+
actions: Array<{
|
|
14675
|
+
type: 'pause' | 'activate' | 'adjust_budget';
|
|
14676
|
+
/**
|
|
14677
|
+
* `skipped` when the action could not or need not apply (already paused or active, budget at its limit, a budget that is unknown, not daily or set at another level, no live ads, or a permanent refusal from the platform), `failed` when it errored and will be retried on the next run.
|
|
14678
|
+
*/
|
|
14679
|
+
status: 'done' | 'skipped' | 'failed';
|
|
14680
|
+
/**
|
|
14681
|
+
* Why the action was skipped or failed: `already_paused`, `already_active`, `at_limit`, `budget_unknown`, `budget_not_daily`, `budget_level_mismatch`, `no_live_ads`, `ads_allowance_exceeded` (a reactivation or budget increase for a team past its free live-ads allowance), or the platform's message. Null when done.
|
|
14682
|
+
*/
|
|
14683
|
+
reason: (string) | null;
|
|
14684
|
+
/**
|
|
14685
|
+
* On `adjust_budget`, the daily budget before the change, in the ad account currency. Null otherwise.
|
|
14686
|
+
*/
|
|
14687
|
+
previousDailyBudget: (number) | null;
|
|
14688
|
+
/**
|
|
14689
|
+
* On `adjust_budget`, the daily budget after the change. Null when nothing changed.
|
|
14690
|
+
*/
|
|
14691
|
+
newDailyBudget: (number) | null;
|
|
14692
|
+
}>;
|
|
14693
|
+
}>;
|
|
14694
|
+
/**
|
|
14695
|
+
* UTC time at which Zernio generated this event.
|
|
14696
|
+
*/
|
|
14697
|
+
timestamp: string;
|
|
14698
|
+
};
|
|
14699
|
+
|
|
14700
|
+
export type event9 = 'ad_rule.triggered';
|
|
14701
|
+
|
|
14702
|
+
/**
|
|
14703
|
+
* Whether the rule evaluates campaigns or ad sets.
|
|
14704
|
+
*/
|
|
14705
|
+
export type level3 = 'campaign' | 'adset';
|
|
14706
|
+
|
|
14361
14707
|
/**
|
|
14362
14708
|
* Webhook payload for the `ad.status_changed` event. Currently emitted
|
|
14363
14709
|
* only for Meta (`metaads`).
|
|
@@ -14483,12 +14829,12 @@ export type WebhookPayloadAdStatusChanged = {
|
|
|
14483
14829
|
timestamp: string;
|
|
14484
14830
|
};
|
|
14485
14831
|
|
|
14486
|
-
export type
|
|
14832
|
+
export type event10 = 'ad.status_changed';
|
|
14487
14833
|
|
|
14488
14834
|
/**
|
|
14489
14835
|
* Hierarchy level the status applies to. Mirrors Meta's `level`. Creative-level events are not forwarded.
|
|
14490
14836
|
*/
|
|
14491
|
-
export type
|
|
14837
|
+
export type level4 = 'CAMPAIGN' | 'AD_SET' | 'AD';
|
|
14492
14838
|
|
|
14493
14839
|
/**
|
|
14494
14840
|
* Webhook payload for the `ad.video.processed` event. Fires once per
|
|
@@ -14554,7 +14900,7 @@ export type WebhookPayloadAdVideoProcessed = {
|
|
|
14554
14900
|
timestamp: string;
|
|
14555
14901
|
};
|
|
14556
14902
|
|
|
14557
|
-
export type
|
|
14903
|
+
export type event11 = 'ad.video.processed';
|
|
14558
14904
|
|
|
14559
14905
|
/**
|
|
14560
14906
|
* `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
|
|
@@ -14637,7 +14983,7 @@ export type WebhookPayloadAnalyticsSynced = {
|
|
|
14637
14983
|
timestamp: string;
|
|
14638
14984
|
};
|
|
14639
14985
|
|
|
14640
|
-
export type
|
|
14986
|
+
export type event12 = 'analytics.synced';
|
|
14641
14987
|
|
|
14642
14988
|
export type WebhookPayloadApiChangelogPublished = {
|
|
14643
14989
|
/**
|
|
@@ -14656,7 +15002,7 @@ export type WebhookPayloadApiChangelogPublished = {
|
|
|
14656
15002
|
timestamp: string;
|
|
14657
15003
|
};
|
|
14658
15004
|
|
|
14659
|
-
export type
|
|
15005
|
+
export type event13 = 'api.changelog.published';
|
|
14660
15006
|
|
|
14661
15007
|
/**
|
|
14662
15008
|
* Webhook payload for the `call.ended` event. Fires on call hangup
|
|
@@ -14731,7 +15077,7 @@ export type WebhookPayloadCallEnded = {
|
|
|
14731
15077
|
timestamp: string;
|
|
14732
15078
|
};
|
|
14733
15079
|
|
|
14734
|
-
export type
|
|
15080
|
+
export type event14 = 'call.ended';
|
|
14735
15081
|
|
|
14736
15082
|
/**
|
|
14737
15083
|
* Webhook payload for the `call.failed` event. Fired when a call
|
|
@@ -14770,7 +15116,7 @@ export type WebhookPayloadCallFailed = {
|
|
|
14770
15116
|
timestamp: string;
|
|
14771
15117
|
};
|
|
14772
15118
|
|
|
14773
|
-
export type
|
|
15119
|
+
export type event15 = 'call.failed';
|
|
14774
15120
|
|
|
14775
15121
|
/**
|
|
14776
15122
|
* Webhook payload for the `call.permission_request` event. Fires
|
|
@@ -14812,7 +15158,7 @@ export type WebhookPayloadCallPermissionRequest = {
|
|
|
14812
15158
|
timestamp: string;
|
|
14813
15159
|
};
|
|
14814
15160
|
|
|
14815
|
-
export type
|
|
15161
|
+
export type event16 = 'call.permission_request';
|
|
14816
15162
|
|
|
14817
15163
|
export type response = 'accept' | 'reject';
|
|
14818
15164
|
|
|
@@ -14871,7 +15217,7 @@ export type WebhookPayloadCallReceived = {
|
|
|
14871
15217
|
timestamp: string;
|
|
14872
15218
|
};
|
|
14873
15219
|
|
|
14874
|
-
export type
|
|
15220
|
+
export type event17 = 'call.received';
|
|
14875
15221
|
|
|
14876
15222
|
/**
|
|
14877
15223
|
* Webhook payload for the `campaign.budget.depleted` event. Fires when a campaign
|
|
@@ -14922,12 +15268,12 @@ export type WebhookPayloadCampaignBudgetDepleted = {
|
|
|
14922
15268
|
timestamp: string;
|
|
14923
15269
|
};
|
|
14924
15270
|
|
|
14925
|
-
export type
|
|
15271
|
+
export type event18 = 'campaign.budget.depleted';
|
|
14926
15272
|
|
|
14927
15273
|
/**
|
|
14928
15274
|
* Always `CAMPAIGN`.
|
|
14929
15275
|
*/
|
|
14930
|
-
export type
|
|
15276
|
+
export type level5 = 'CAMPAIGN';
|
|
14931
15277
|
|
|
14932
15278
|
/**
|
|
14933
15279
|
* Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
|
|
@@ -15104,7 +15450,7 @@ export type WebhookPayloadComment = {
|
|
|
15104
15450
|
timestamp: string;
|
|
15105
15451
|
};
|
|
15106
15452
|
|
|
15107
|
-
export type
|
|
15453
|
+
export type event19 = 'comment.received';
|
|
15108
15454
|
|
|
15109
15455
|
export type platform15 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
|
|
15110
15456
|
|
|
@@ -15150,9 +15496,9 @@ export type WebhookPayloadCommerceOrder = {
|
|
|
15150
15496
|
};
|
|
15151
15497
|
};
|
|
15152
15498
|
|
|
15153
|
-
export type
|
|
15499
|
+
export type event20 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
|
|
15154
15500
|
|
|
15155
|
-
export type
|
|
15501
|
+
export type type18 = 'order';
|
|
15156
15502
|
|
|
15157
15503
|
export type WebhookPayloadCommerceProduct = {
|
|
15158
15504
|
/**
|
|
@@ -15193,9 +15539,9 @@ export type WebhookPayloadCommerceProduct = {
|
|
|
15193
15539
|
};
|
|
15194
15540
|
};
|
|
15195
15541
|
|
|
15196
|
-
export type
|
|
15542
|
+
export type event21 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
|
|
15197
15543
|
|
|
15198
|
-
export type
|
|
15544
|
+
export type type19 = 'product';
|
|
15199
15545
|
|
|
15200
15546
|
export type WebhookPayloadContactFieldChanged = {
|
|
15201
15547
|
/**
|
|
@@ -15233,7 +15579,7 @@ export type WebhookPayloadContactFieldChanged = {
|
|
|
15233
15579
|
source: 'api' | 'workflow' | 'automation';
|
|
15234
15580
|
};
|
|
15235
15581
|
|
|
15236
|
-
export type
|
|
15582
|
+
export type event22 = 'contact.field_changed';
|
|
15237
15583
|
|
|
15238
15584
|
/**
|
|
15239
15585
|
* Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
|
|
@@ -15265,7 +15611,7 @@ export type WebhookPayloadContactTag = {
|
|
|
15265
15611
|
source: 'api' | 'workflow' | 'automation';
|
|
15266
15612
|
};
|
|
15267
15613
|
|
|
15268
|
-
export type
|
|
15614
|
+
export type event23 = 'contact.tag_added' | 'contact.tag_removed';
|
|
15269
15615
|
|
|
15270
15616
|
/**
|
|
15271
15617
|
* Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
|
|
@@ -15311,7 +15657,7 @@ export type WebhookPayloadConversationControlChanged = {
|
|
|
15311
15657
|
timestamp: string;
|
|
15312
15658
|
};
|
|
15313
15659
|
|
|
15314
|
-
export type
|
|
15660
|
+
export type event24 = 'conversation.control_changed';
|
|
15315
15661
|
|
|
15316
15662
|
/**
|
|
15317
15663
|
* 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).
|
|
@@ -15370,7 +15716,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
15370
15716
|
timestamp: string;
|
|
15371
15717
|
};
|
|
15372
15718
|
|
|
15373
|
-
export type
|
|
15719
|
+
export type event25 = 'conversation.started';
|
|
15374
15720
|
|
|
15375
15721
|
/**
|
|
15376
15722
|
* Webhook payload for post.external.created / post.external.updated /
|
|
@@ -15407,7 +15753,7 @@ export type WebhookPayloadExternalPost = {
|
|
|
15407
15753
|
timestamp: string;
|
|
15408
15754
|
};
|
|
15409
15755
|
|
|
15410
|
-
export type
|
|
15756
|
+
export type event26 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
|
|
15411
15757
|
|
|
15412
15758
|
/**
|
|
15413
15759
|
* Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
|
|
@@ -15483,7 +15829,7 @@ export type WebhookPayloadLead = {
|
|
|
15483
15829
|
timestamp: string;
|
|
15484
15830
|
};
|
|
15485
15831
|
|
|
15486
|
-
export type
|
|
15832
|
+
export type event27 = 'lead.received';
|
|
15487
15833
|
|
|
15488
15834
|
export type platform16 = 'facebook';
|
|
15489
15835
|
|
|
@@ -16086,7 +16432,7 @@ export type WebhookPayloadMessage = {
|
|
|
16086
16432
|
timestamp: string;
|
|
16087
16433
|
};
|
|
16088
16434
|
|
|
16089
|
-
export type
|
|
16435
|
+
export type event28 = 'message.received';
|
|
16090
16436
|
|
|
16091
16437
|
/**
|
|
16092
16438
|
* Which Zernio surface produced the message. Always present and
|
|
@@ -16152,7 +16498,7 @@ export type WebhookPayloadMessageDeleted = {
|
|
|
16152
16498
|
timestamp: string;
|
|
16153
16499
|
};
|
|
16154
16500
|
|
|
16155
|
-
export type
|
|
16501
|
+
export type event29 = 'message.deleted';
|
|
16156
16502
|
|
|
16157
16503
|
/**
|
|
16158
16504
|
* Shared payload for message.delivered, message.read, message.played and
|
|
@@ -16220,7 +16566,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
|
|
|
16220
16566
|
timestamp: string;
|
|
16221
16567
|
};
|
|
16222
16568
|
|
|
16223
|
-
export type
|
|
16569
|
+
export type event30 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
|
|
16224
16570
|
|
|
16225
16571
|
/**
|
|
16226
16572
|
* Webhook payload for message.edited events. Fires when the sender
|
|
@@ -16263,7 +16609,7 @@ export type WebhookPayloadMessageEdited = {
|
|
|
16263
16609
|
timestamp: string;
|
|
16264
16610
|
};
|
|
16265
16611
|
|
|
16266
|
-
export type
|
|
16612
|
+
export type event31 = 'message.edited';
|
|
16267
16613
|
|
|
16268
16614
|
/**
|
|
16269
16615
|
* Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
|
|
@@ -16509,7 +16855,7 @@ export type WebhookPayloadMessageSent = {
|
|
|
16509
16855
|
timestamp: string;
|
|
16510
16856
|
};
|
|
16511
16857
|
|
|
16512
|
-
export type
|
|
16858
|
+
export type event32 = 'message.sent';
|
|
16513
16859
|
|
|
16514
16860
|
/**
|
|
16515
16861
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
@@ -16567,7 +16913,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
16567
16913
|
timestamp: string;
|
|
16568
16914
|
};
|
|
16569
16915
|
|
|
16570
|
-
export type
|
|
16916
|
+
export type event33 = 'phone_number.stock_available';
|
|
16571
16917
|
|
|
16572
16918
|
/**
|
|
16573
16919
|
* Webhook payload for post events
|
|
@@ -16622,7 +16968,7 @@ export type WebhookPayloadPost = {
|
|
|
16622
16968
|
timestamp: string;
|
|
16623
16969
|
};
|
|
16624
16970
|
|
|
16625
|
-
export type
|
|
16971
|
+
export type event34 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
|
|
16626
16972
|
|
|
16627
16973
|
/**
|
|
16628
16974
|
* Webhook payload for the per-platform terminal events
|
|
@@ -16746,7 +17092,7 @@ export type WebhookPayloadPostPlatform = {
|
|
|
16746
17092
|
timestamp: string;
|
|
16747
17093
|
};
|
|
16748
17094
|
|
|
16749
|
-
export type
|
|
17095
|
+
export type event35 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
|
|
16750
17096
|
|
|
16751
17097
|
/**
|
|
16752
17098
|
* Terminal status this event fires on. Matches the event suffix.
|
|
@@ -16811,7 +17157,7 @@ export type WebhookPayloadReaction = {
|
|
|
16811
17157
|
timestamp: string;
|
|
16812
17158
|
};
|
|
16813
17159
|
|
|
16814
|
-
export type
|
|
17160
|
+
export type event36 = 'reaction.received';
|
|
16815
17161
|
|
|
16816
17162
|
export type action = 'added' | 'removed';
|
|
16817
17163
|
|
|
@@ -16890,7 +17236,7 @@ export type WebhookPayloadReferral = {
|
|
|
16890
17236
|
timestamp: string;
|
|
16891
17237
|
};
|
|
16892
17238
|
|
|
16893
|
-
export type
|
|
17239
|
+
export type event37 = 'referral.received';
|
|
16894
17240
|
|
|
16895
17241
|
/**
|
|
16896
17242
|
* Webhook payload for the review.new event (new review posted on a connected account).
|
|
@@ -16922,7 +17268,7 @@ export type WebhookPayloadReviewNew = {
|
|
|
16922
17268
|
timestamp: string;
|
|
16923
17269
|
};
|
|
16924
17270
|
|
|
16925
|
-
export type
|
|
17271
|
+
export type event38 = 'review.new';
|
|
16926
17272
|
|
|
16927
17273
|
/**
|
|
16928
17274
|
* Webhook payload for the review.updated event. Fired when the reviewer edits their
|
|
@@ -16960,7 +17306,7 @@ export type WebhookPayloadReviewUpdated = {
|
|
|
16960
17306
|
timestamp: string;
|
|
16961
17307
|
};
|
|
16962
17308
|
|
|
16963
|
-
export type
|
|
17309
|
+
export type event39 = 'review.updated';
|
|
16964
17310
|
|
|
16965
17311
|
export type WebhookPayloadSequenceEnrollment = {
|
|
16966
17312
|
/**
|
|
@@ -16993,7 +17339,7 @@ export type WebhookPayloadSequenceEnrollment = {
|
|
|
16993
17339
|
exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
|
|
16994
17340
|
};
|
|
16995
17341
|
|
|
16996
|
-
export type
|
|
17342
|
+
export type event40 = 'sequence.enrolled' | 'sequence.exited';
|
|
16997
17343
|
|
|
16998
17344
|
/**
|
|
16999
17345
|
* 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.
|
|
@@ -17014,7 +17360,7 @@ export type WebhookPayloadSupportRun = {
|
|
|
17014
17360
|
run: SupportRun;
|
|
17015
17361
|
};
|
|
17016
17362
|
|
|
17017
|
-
export type
|
|
17363
|
+
export type event41 = 'support.run.completed' | 'support.run.failed';
|
|
17018
17364
|
|
|
17019
17365
|
/**
|
|
17020
17366
|
* Webhook payload for test deliveries
|
|
@@ -17035,7 +17381,7 @@ export type WebhookPayloadTest = {
|
|
|
17035
17381
|
timestamp: string;
|
|
17036
17382
|
};
|
|
17037
17383
|
|
|
17038
|
-
export type
|
|
17384
|
+
export type event42 = 'webhook.test';
|
|
17039
17385
|
|
|
17040
17386
|
/**
|
|
17041
17387
|
* Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
|
|
@@ -17087,7 +17433,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
|
|
|
17087
17433
|
timestamp: string;
|
|
17088
17434
|
};
|
|
17089
17435
|
|
|
17090
|
-
export type
|
|
17436
|
+
export type event43 = 'whatsapp.account.alert_received';
|
|
17091
17437
|
|
|
17092
17438
|
export type platform18 = 'whatsapp';
|
|
17093
17439
|
|
|
@@ -17143,7 +17489,7 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
|
17143
17489
|
timestamp: string;
|
|
17144
17490
|
};
|
|
17145
17491
|
|
|
17146
|
-
export type
|
|
17492
|
+
export type event44 = 'whatsapp.account.name_status_updated';
|
|
17147
17493
|
|
|
17148
17494
|
/**
|
|
17149
17495
|
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
@@ -17201,7 +17547,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
|
|
|
17201
17547
|
timestamp: string;
|
|
17202
17548
|
};
|
|
17203
17549
|
|
|
17204
|
-
export type
|
|
17550
|
+
export type event45 = 'whatsapp.account.quality_updated';
|
|
17205
17551
|
|
|
17206
17552
|
/**
|
|
17207
17553
|
* The Meta webhook field that reported the change.
|
|
@@ -17277,7 +17623,7 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
|
|
|
17277
17623
|
timestamp: string;
|
|
17278
17624
|
};
|
|
17279
17625
|
|
|
17280
|
-
export type
|
|
17626
|
+
export type event46 = 'whatsapp.account.status_updated';
|
|
17281
17627
|
|
|
17282
17628
|
/**
|
|
17283
17629
|
* `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
|
|
@@ -17334,7 +17680,7 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
|
|
|
17334
17680
|
timestamp: string;
|
|
17335
17681
|
};
|
|
17336
17682
|
|
|
17337
|
-
export type
|
|
17683
|
+
export type event47 = 'whatsapp.contact.identity_changed';
|
|
17338
17684
|
|
|
17339
17685
|
/**
|
|
17340
17686
|
* Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
|
|
@@ -17408,7 +17754,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
|
|
|
17408
17754
|
timestamp: string;
|
|
17409
17755
|
};
|
|
17410
17756
|
|
|
17411
|
-
export type
|
|
17757
|
+
export type event48 = 'whatsapp.template.category_updated';
|
|
17412
17758
|
|
|
17413
17759
|
/**
|
|
17414
17760
|
* `scheduled` is Meta's 24h advance notice of an upcoming
|
|
@@ -17490,7 +17836,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
|
|
|
17490
17836
|
timestamp: string;
|
|
17491
17837
|
};
|
|
17492
17838
|
|
|
17493
|
-
export type
|
|
17839
|
+
export type event49 = 'whatsapp.template.status_updated';
|
|
17494
17840
|
|
|
17495
17841
|
/**
|
|
17496
17842
|
* New status. Forwarded verbatim from Meta's `event` field.
|
|
@@ -17557,7 +17903,7 @@ export type WebhookPayloadWorkflowRun = {
|
|
|
17557
17903
|
error?: string;
|
|
17558
17904
|
};
|
|
17559
17905
|
|
|
17560
|
-
export type
|
|
17906
|
+
export type event50 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
|
|
17561
17907
|
|
|
17562
17908
|
/**
|
|
17563
17909
|
* 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.
|
|
@@ -17835,7 +18181,7 @@ export type WhatsAppTemplateButton = {
|
|
|
17835
18181
|
navigate_screen?: string;
|
|
17836
18182
|
};
|
|
17837
18183
|
|
|
17838
|
-
export type
|
|
18184
|
+
export type type20 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
17839
18185
|
|
|
17840
18186
|
/**
|
|
17841
18187
|
* Required when type is otp
|
|
@@ -17877,7 +18223,7 @@ export type WhatsAppTemplateLookupError = {
|
|
|
17877
18223
|
};
|
|
17878
18224
|
};
|
|
17879
18225
|
|
|
17880
|
-
export type
|
|
18226
|
+
export type type21 = 'platform_error';
|
|
17881
18227
|
|
|
17882
18228
|
export type code2 = 'platform_api_error';
|
|
17883
18229
|
|
|
@@ -18042,7 +18388,7 @@ export type WorkflowNode = {
|
|
|
18042
18388
|
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
18043
18389
|
*
|
|
18044
18390
|
*/
|
|
18045
|
-
export type
|
|
18391
|
+
export type type22 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
18046
18392
|
|
|
18047
18393
|
/**
|
|
18048
18394
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
@@ -18178,7 +18524,7 @@ export type XArticleBlock = {
|
|
|
18178
18524
|
entity_ranges?: Array<XArticleEntityRange>;
|
|
18179
18525
|
};
|
|
18180
18526
|
|
|
18181
|
-
export type
|
|
18527
|
+
export type type23 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
|
|
18182
18528
|
|
|
18183
18529
|
/**
|
|
18184
18530
|
* X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
|
|
@@ -18257,7 +18603,7 @@ export type XArticleEntity = {
|
|
|
18257
18603
|
|
|
18258
18604
|
export type mutability = 'immutable' | 'mutable' | 'segmented';
|
|
18259
18605
|
|
|
18260
|
-
export type
|
|
18606
|
+
export type type24 = 'divider' | 'latex';
|
|
18261
18607
|
|
|
18262
18608
|
/**
|
|
18263
18609
|
* The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
|
|
@@ -29493,7 +29839,7 @@ export type CreateWebhookSettingsData = {
|
|
|
29493
29839
|
/**
|
|
29494
29840
|
* Events to subscribe to (at least one required)
|
|
29495
29841
|
*/
|
|
29496
|
-
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.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')>;
|
|
29842
|
+
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | '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')>;
|
|
29497
29843
|
/**
|
|
29498
29844
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
29499
29845
|
*/
|
|
@@ -29559,7 +29905,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
29559
29905
|
/**
|
|
29560
29906
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
29561
29907
|
*/
|
|
29562
|
-
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.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')>;
|
|
29908
|
+
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | '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')>;
|
|
29563
29909
|
/**
|
|
29564
29910
|
* Enable or disable webhook delivery
|
|
29565
29911
|
*/
|
|
@@ -29729,7 +30075,7 @@ export type TestWebhookData = {
|
|
|
29729
30075
|
/**
|
|
29730
30076
|
* Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
|
|
29731
30077
|
*/
|
|
29732
|
-
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.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';
|
|
30078
|
+
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.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | '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';
|
|
29733
30079
|
};
|
|
29734
30080
|
};
|
|
29735
30081
|
|
|
@@ -43836,6 +44182,145 @@ export type RemoveAdKeywordResponse = ({
|
|
|
43836
44182
|
|
|
43837
44183
|
export type RemoveAdKeywordError = (ErrorResponse);
|
|
43838
44184
|
|
|
44185
|
+
export type ListAdRulesData = {
|
|
44186
|
+
query?: {
|
|
44187
|
+
/**
|
|
44188
|
+
* Only rules on this ads connection.
|
|
44189
|
+
*/
|
|
44190
|
+
accountId?: string;
|
|
44191
|
+
/**
|
|
44192
|
+
* Only rules watching this platform ad account.
|
|
44193
|
+
*/
|
|
44194
|
+
adAccountId?: string;
|
|
44195
|
+
limit?: number;
|
|
44196
|
+
skip?: number;
|
|
44197
|
+
};
|
|
44198
|
+
};
|
|
44199
|
+
|
|
44200
|
+
export type ListAdRulesResponse = ({
|
|
44201
|
+
rules: Array<AdRule>;
|
|
44202
|
+
});
|
|
44203
|
+
|
|
44204
|
+
export type ListAdRulesError = (ErrorResponse);
|
|
44205
|
+
|
|
44206
|
+
export type CreateAdRuleData = {
|
|
44207
|
+
body: {
|
|
44208
|
+
name: string;
|
|
44209
|
+
/**
|
|
44210
|
+
* The ads connection (account ID from `GET /v1/accounts`).
|
|
44211
|
+
*/
|
|
44212
|
+
accountId: string;
|
|
44213
|
+
/**
|
|
44214
|
+
* Platform ad account ID, from `GET /v1/ads/accounts`.
|
|
44215
|
+
*/
|
|
44216
|
+
adAccountId: string;
|
|
44217
|
+
level: AdRuleLevel;
|
|
44218
|
+
/**
|
|
44219
|
+
* Only check these platform campaign IDs (or their ad sets). Leave out to check the whole ad account.
|
|
44220
|
+
*/
|
|
44221
|
+
campaignIds?: Array<(string)>;
|
|
44222
|
+
conditions: AdRuleConditions;
|
|
44223
|
+
actions: AdRuleActions;
|
|
44224
|
+
/**
|
|
44225
|
+
* Leave it out to run every 60 minutes.
|
|
44226
|
+
*/
|
|
44227
|
+
schedule?: (AdRuleSchedule);
|
|
44228
|
+
/**
|
|
44229
|
+
* How long the rule leaves an object alone after acting on it.
|
|
44230
|
+
*/
|
|
44231
|
+
cooldownMinutes?: number;
|
|
44232
|
+
enabled?: boolean;
|
|
44233
|
+
};
|
|
44234
|
+
};
|
|
44235
|
+
|
|
44236
|
+
export type CreateAdRuleResponse = ({
|
|
44237
|
+
rule: AdRule;
|
|
44238
|
+
});
|
|
44239
|
+
|
|
44240
|
+
export type CreateAdRuleError = (ErrorResponse);
|
|
44241
|
+
|
|
44242
|
+
export type GetAdRuleData = {
|
|
44243
|
+
path: {
|
|
44244
|
+
ruleId: string;
|
|
44245
|
+
};
|
|
44246
|
+
};
|
|
44247
|
+
|
|
44248
|
+
export type GetAdRuleResponse = ({
|
|
44249
|
+
rule: AdRule;
|
|
44250
|
+
});
|
|
44251
|
+
|
|
44252
|
+
export type GetAdRuleError = (ErrorResponse | {
|
|
44253
|
+
error?: string;
|
|
44254
|
+
});
|
|
44255
|
+
|
|
44256
|
+
export type UpdateAdRuleData = {
|
|
44257
|
+
body: {
|
|
44258
|
+
name?: string;
|
|
44259
|
+
level?: AdRuleLevel;
|
|
44260
|
+
campaignIds?: Array<(string)> | null;
|
|
44261
|
+
conditions?: AdRuleConditions;
|
|
44262
|
+
actions?: AdRuleActions;
|
|
44263
|
+
schedule?: AdRuleSchedule;
|
|
44264
|
+
cooldownMinutes?: number;
|
|
44265
|
+
enabled?: boolean;
|
|
44266
|
+
};
|
|
44267
|
+
path: {
|
|
44268
|
+
ruleId: string;
|
|
44269
|
+
};
|
|
44270
|
+
};
|
|
44271
|
+
|
|
44272
|
+
export type UpdateAdRuleResponse = ({
|
|
44273
|
+
rule: AdRule;
|
|
44274
|
+
});
|
|
44275
|
+
|
|
44276
|
+
export type UpdateAdRuleError = (ErrorResponse | {
|
|
44277
|
+
error?: string;
|
|
44278
|
+
});
|
|
44279
|
+
|
|
44280
|
+
export type DeleteAdRuleData = {
|
|
44281
|
+
path: {
|
|
44282
|
+
ruleId: string;
|
|
44283
|
+
};
|
|
44284
|
+
};
|
|
44285
|
+
|
|
44286
|
+
export type DeleteAdRuleResponse = ({
|
|
44287
|
+
success?: boolean;
|
|
44288
|
+
});
|
|
44289
|
+
|
|
44290
|
+
export type DeleteAdRuleError = (ErrorResponse | {
|
|
44291
|
+
error?: string;
|
|
44292
|
+
});
|
|
44293
|
+
|
|
44294
|
+
export type PreviewAdRuleData = {
|
|
44295
|
+
path: {
|
|
44296
|
+
ruleId: string;
|
|
44297
|
+
};
|
|
44298
|
+
};
|
|
44299
|
+
|
|
44300
|
+
export type PreviewAdRuleResponse = (AdRuleEvaluation);
|
|
44301
|
+
|
|
44302
|
+
export type PreviewAdRuleError = (ErrorResponse | {
|
|
44303
|
+
error?: string;
|
|
44304
|
+
});
|
|
44305
|
+
|
|
44306
|
+
export type ListAdRuleRunsData = {
|
|
44307
|
+
path: {
|
|
44308
|
+
ruleId: string;
|
|
44309
|
+
};
|
|
44310
|
+
query?: {
|
|
44311
|
+
limit?: number;
|
|
44312
|
+
skip?: number;
|
|
44313
|
+
};
|
|
44314
|
+
};
|
|
44315
|
+
|
|
44316
|
+
export type ListAdRuleRunsResponse = ({
|
|
44317
|
+
runs: Array<AdRuleRun>;
|
|
44318
|
+
});
|
|
44319
|
+
|
|
44320
|
+
export type ListAdRuleRunsError = (ErrorResponse | {
|
|
44321
|
+
error?: string;
|
|
44322
|
+
});
|
|
44323
|
+
|
|
43839
44324
|
export type ListAdCampaignsData = {
|
|
43840
44325
|
query?: {
|
|
43841
44326
|
/**
|