@getlatedev/node 0.2.496 → 0.2.497

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.
@@ -5232,6 +5232,119 @@ export type UsersListResponse = {
5232
5232
  users?: Array<User>;
5233
5233
  };
5234
5234
 
5235
+ /**
5236
+ * One bid-adjustment rule. Rules are evaluated in ARRAY ORDER and only the first matching
5237
+ * rule adjusts the bid for an overlapping audience, so the order is semantic.
5238
+ *
5239
+ */
5240
+ export type ValueRule = {
5241
+ /**
5242
+ * Platform rule id. Echo it on `PUT` to KEEP this rule, omit it to CREATE a new one.
5243
+ * A rule left out of the array entirely is DELETED.
5244
+ *
5245
+ */
5246
+ id?: string;
5247
+ name: string;
5248
+ /**
5249
+ * Direction of the adjustment. There is no signed value field.
5250
+ */
5251
+ adjustSign: 'INCREASE' | 'DECREASE';
5252
+ /**
5253
+ * Unsigned percentage magnitude. `INCREASE` accepts 1-1000, `DECREASE` accepts 1-90.
5254
+ * 0 is out of range on both.
5255
+ *
5256
+ */
5257
+ adjustValue: number;
5258
+ /**
5259
+ * Meta returns `ACTIVE` here but documents no enum for the field. Treat it as a
5260
+ * passthrough: echo whatever the `GET` returned, and do not synthesize values.
5261
+ *
5262
+ */
5263
+ status?: string;
5264
+ /**
5265
+ * All criteria on a rule must match for the rule to fire.
5266
+ */
5267
+ criteria: Array<ValueRuleCriterion>;
5268
+ };
5269
+
5270
+ /**
5271
+ * Direction of the adjustment. There is no signed value field.
5272
+ */
5273
+ export type adjustSign = 'INCREASE' | 'DECREASE';
5274
+
5275
+ /**
5276
+ * One matching condition inside a value rule. `criteriaValues` and `criteriaValueTypes`
5277
+ * are POSITIONALLY paired: same length, same order.
5278
+ *
5279
+ */
5280
+ export type ValueRuleCriterion = {
5281
+ /**
5282
+ * Platform criterion id. Echo it on `PUT` to KEEP this criterion, omit it to CREATE a
5283
+ * new one. A criterion left out of the array entirely is DELETED.
5284
+ *
5285
+ */
5286
+ id?: string;
5287
+ /**
5288
+ * The dimension being matched. `OMNI_CHANNEL` (conversion location: APP, INSTANT_FORM,
5289
+ * PHONE_CALL, WEBSITE) is accepted even though Meta's own enum table omits it.
5290
+ *
5291
+ */
5292
+ criteriaType: 'AGE' | 'GENDER' | 'OS_TYPE' | 'DEVICE_PLATFORM' | 'LOCATION' | 'PLACEMENT' | 'OMNI_CHANNEL' | 'AUDIENCE_LABEL';
5293
+ /**
5294
+ * Required on every criterion. `CONTAINS` is currently the only value Meta supports.
5295
+ */
5296
+ operator: 'CONTAINS';
5297
+ /**
5298
+ * The values to match. `AGE` takes ranges such as `18-24`, `18+` or a custom `18-26`;
5299
+ * a range whose upper bound is 65 is NOT allowed (use `18+` instead of `18-65`).
5300
+ * `LOCATION` takes Targeting-Search keys: a two-letter country code for
5301
+ * `LOCATION_COUNTRY`, a numeric key for region / city / comScore market.
5302
+ * `AUDIENCE_LABEL` takes labels such as `HIGH_VALUE`, which are applied to a Custom
5303
+ * Audience in Ads Manager: there is no API to provision them, so they are passed
5304
+ * through unvalidated.
5305
+ *
5306
+ */
5307
+ criteriaValues: Array<(string)>;
5308
+ /**
5309
+ * One entry per `criteriaValues` entry, in the same order. The literal `"NONE"` for
5310
+ * every criteriaType except `LOCATION`, which uses `LOCATION_COUNTRY`,
5311
+ * `LOCATION_REGION`, `LOCATION_CITY` or `LOCATION_COMSCORE_MARKET` and MAY mix them
5312
+ * within one criterion. `LOCATION_DMA` was replaced by `LOCATION_COMSCORE_MARKET` on
5313
+ * 2026-06-22 and is rejected by this API.
5314
+ *
5315
+ */
5316
+ criteriaValueTypes: Array<(string)>;
5317
+ };
5318
+
5319
+ /**
5320
+ * The dimension being matched. `OMNI_CHANNEL` (conversion location: APP, INSTANT_FORM,
5321
+ * PHONE_CALL, WEBSITE) is accepted even though Meta's own enum table omits it.
5322
+ *
5323
+ */
5324
+ export type criteriaType = 'AGE' | 'GENDER' | 'OS_TYPE' | 'DEVICE_PLATFORM' | 'LOCATION' | 'PLACEMENT' | 'OMNI_CHANNEL' | 'AUDIENCE_LABEL';
5325
+
5326
+ /**
5327
+ * Required on every criterion. `CONTAINS` is currently the only value Meta supports.
5328
+ */
5329
+ export type operator = 'CONTAINS';
5330
+
5331
+ /**
5332
+ * A named set of bid-adjustment rules on an ad account. Attach it to an ad set with
5333
+ * `valueRuleSetId`. Limits: 6 sets per ad account, 10 rules per set, 4 criteria per rule.
5334
+ *
5335
+ */
5336
+ export type ValueRuleSet = {
5337
+ /**
5338
+ * Platform value rule set id.
5339
+ */
5340
+ id: string;
5341
+ name: string;
5342
+ /**
5343
+ * Evaluated in order; the first matching rule wins.
5344
+ */
5345
+ rules: Array<ValueRule>;
5346
+ };
5347
+
5235
5348
  /**
5236
5349
  * A managed OTP verification. The code itself is never returned or stored (hash only).
5237
5350
  */
@@ -25856,6 +25969,22 @@ export type UpdateAdSetData = {
25856
25969
  *
25857
25970
  */
25858
25971
  roasAverageFloor?: number;
25972
+ /**
25973
+ * Meta only (other platforms return 501). Value rule set to attach to this ad
25974
+ * set, from `/v1/ads/value-rule-sets`. Sending a different id replaces the
25975
+ * current association. To DETACH, send `valueRulesApplied: false` and omit
25976
+ * this field.
25977
+ *
25978
+ */
25979
+ valueRuleSetId?: string;
25980
+ /**
25981
+ * Meta only (other platforms return 501). `false` DETACHES the ad set's value
25982
+ * rule set and must be sent WITHOUT `valueRuleSetId`; the combination returns
25983
+ * 400. `true` is optional when attaching, since attachment is driven by
25984
+ * `valueRuleSetId`, and requires it to be present.
25985
+ *
25986
+ */
25987
+ valueRulesApplied?: boolean;
25859
25988
  /**
25860
25989
  * Platform-specific post-launch delivery settings. The platform is implied by the
25861
25990
  * `platform` body param. Meta only; other platforms return 400. Unknown keys are rejected.
@@ -27462,6 +27591,153 @@ export type DeleteAdCreativeError = (unknown | {
27462
27591
  error?: string;
27463
27592
  });
27464
27593
 
27594
+ export type ListValueRuleSetsData = {
27595
+ query: {
27596
+ /**
27597
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27598
+ */
27599
+ accountId: string;
27600
+ /**
27601
+ * Meta ad account id (act_<n>).
27602
+ */
27603
+ adAccountId: string;
27604
+ /**
27605
+ * Cursor from paging.after of the previous page. Meta does not document paging on this edge; `after` comes back null when it omits cursors.
27606
+ */
27607
+ after?: string;
27608
+ /**
27609
+ * Rows per page
27610
+ */
27611
+ limit?: number;
27612
+ };
27613
+ };
27614
+
27615
+ export type ListValueRuleSetsResponse = ({
27616
+ adAccountId?: string;
27617
+ data?: Array<ValueRuleSet>;
27618
+ paging?: {
27619
+ /**
27620
+ * Cursor for the next page; null when exhausted or when Meta omits paging.
27621
+ */
27622
+ after?: (string) | null;
27623
+ };
27624
+ });
27625
+
27626
+ export type ListValueRuleSetsError = (unknown | {
27627
+ error?: string;
27628
+ });
27629
+
27630
+ export type CreateValueRuleSetData = {
27631
+ body: {
27632
+ /**
27633
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27634
+ */
27635
+ accountId: string;
27636
+ /**
27637
+ * Meta ad account id (act_<n>).
27638
+ */
27639
+ adAccountId: string;
27640
+ name: string;
27641
+ /**
27642
+ * Evaluated in order; the first matching rule wins.
27643
+ */
27644
+ rules: Array<ValueRule>;
27645
+ };
27646
+ };
27647
+
27648
+ export type CreateValueRuleSetResponse = ({
27649
+ adAccountId?: string;
27650
+ /**
27651
+ * The new rule set id. Meta does not document the create response body, so this is null on the (unobserved) case where it omits the id.
27652
+ */
27653
+ valueRuleSetId?: (string) | null;
27654
+ });
27655
+
27656
+ export type CreateValueRuleSetError = (unknown | {
27657
+ error?: string;
27658
+ });
27659
+
27660
+ export type GetValueRuleSetData = {
27661
+ path: {
27662
+ /**
27663
+ * Platform value rule set id.
27664
+ */
27665
+ valueRuleSetId: string;
27666
+ };
27667
+ query: {
27668
+ /**
27669
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27670
+ */
27671
+ accountId: string;
27672
+ };
27673
+ };
27674
+
27675
+ export type GetValueRuleSetResponse = ({
27676
+ valueRuleSet?: ValueRuleSet;
27677
+ });
27678
+
27679
+ export type GetValueRuleSetError = (unknown | {
27680
+ error?: string;
27681
+ });
27682
+
27683
+ export type UpdateValueRuleSetData = {
27684
+ body: {
27685
+ /**
27686
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27687
+ */
27688
+ accountId: string;
27689
+ /**
27690
+ * Required: the update replaces the whole set.
27691
+ */
27692
+ name: string;
27693
+ /**
27694
+ * The COMPLETE rule list. Omitting a rule deletes it on Meta.
27695
+ */
27696
+ rules: Array<ValueRule>;
27697
+ };
27698
+ path: {
27699
+ /**
27700
+ * Platform value rule set id.
27701
+ */
27702
+ valueRuleSetId: string;
27703
+ };
27704
+ };
27705
+
27706
+ export type UpdateValueRuleSetResponse = ({
27707
+ valueRuleSetId?: string;
27708
+ name?: string;
27709
+ rules?: Array<ValueRule>;
27710
+ message?: string;
27711
+ });
27712
+
27713
+ export type UpdateValueRuleSetError = (unknown | {
27714
+ error?: string;
27715
+ });
27716
+
27717
+ export type DeleteValueRuleSetData = {
27718
+ path: {
27719
+ /**
27720
+ * Platform value rule set id.
27721
+ */
27722
+ valueRuleSetId: string;
27723
+ };
27724
+ query: {
27725
+ /**
27726
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27727
+ */
27728
+ accountId: string;
27729
+ };
27730
+ };
27731
+
27732
+ export type DeleteValueRuleSetResponse = ({
27733
+ valueRuleSetId?: string;
27734
+ message?: string;
27735
+ });
27736
+
27737
+ export type DeleteValueRuleSetError = (unknown | {
27738
+ error?: string;
27739
+ });
27740
+
27465
27741
  export type GetAdAccountFinanceData = {
27466
27742
  query: {
27467
27743
  /**
@@ -28660,6 +28936,32 @@ export type CreateStandaloneAdData = {
28660
28936
  *
28661
28937
  */
28662
28938
  roasAverageFloor?: number;
28939
+ /**
28940
+ * Meta only (facebook, instagram; other platforms return 400). Value rule set
28941
+ * to attach to the new ad set, from `/v1/ads/value-rule-sets`. Attachment is
28942
+ * driven by this id, so `valueRulesApplied` is optional alongside it.
28943
+ *
28944
+ * Rejected with 400 in `adSetId` attach mode: that shape inherits the existing
28945
+ * ad set's attachment, so the field would be silently ignored. Use
28946
+ * `PUT /v1/ads/ad-sets/{adSetId}` there instead.
28947
+ *
28948
+ * Ignored (stripped before the ad-set create) when `buyingType` is `RESERVED`:
28949
+ * value rules only apply to auction ad sets on `LOWEST_COST_WITHOUT_CAP` or
28950
+ * `COST_CAP`, and a Reach & Frequency reservation has no auction bid strategy.
28951
+ *
28952
+ * Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`; the
28953
+ * attachment is not mirrored onto Zernio's ad documents.
28954
+ *
28955
+ */
28956
+ valueRuleSetId?: string;
28957
+ /**
28958
+ * Meta only (facebook, instagram; other platforms return 400). Optional when
28959
+ * attaching, and requires `valueRuleSetId`. `false` is REJECTED here with 400:
28960
+ * a newly created ad set has nothing to detach, so detaching lives on
28961
+ * `PUT /v1/ads/ad-sets/{adSetId}`.
28962
+ *
28963
+ */
28964
+ valueRulesApplied?: boolean;
28663
28965
  /**
28664
28966
  * Platform-specific options. The platform is derived from `accountId`;
28665
28967
  * sending options for a different platform returns a 400. LinkedIn