@wevion/cli 1.0.3188 → 1.0.3189

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.
Files changed (2) hide show
  1. package/openapi.json +2028 -1872
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -178693,344 +178693,368 @@
178693
178693
  }
178694
178694
  },
178695
178695
  "actions": {
178696
- "description": "Ordered list of actions applied to each matched entity.",
178696
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
178697
178697
  "type": "array",
178698
178698
  "items": {
178699
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
178700
178699
  "anyOf": [
178701
178700
  {
178702
- "additionalProperties": false,
178703
- "type": "object",
178704
- "required": [
178705
- "type"
178706
- ],
178707
- "properties": {
178708
- "type": {
178709
- "description": "Pause the matched entity (campaign/adset/ad).",
178710
- "type": "string",
178711
- "enum": [
178712
- "pause"
178713
- ]
178714
- },
178715
- "params": {
178716
- "$comment": "json-value",
178717
- "description": "Arbitrary JSON value with nested arrays and objects."
178718
- }
178719
- },
178720
- "title": "RuleActionPause"
178721
- },
178722
- {
178723
- "additionalProperties": false,
178724
- "type": "object",
178725
- "required": [
178726
- "type"
178727
- ],
178728
- "properties": {
178729
- "type": {
178730
- "description": "Activate the matched entity (campaign/adset/ad).",
178731
- "type": "string",
178732
- "enum": [
178733
- "activate"
178734
- ]
178735
- },
178736
- "params": {
178737
- "$comment": "json-value",
178738
- "description": "Arbitrary JSON value with nested arrays and objects."
178739
- }
178740
- },
178741
- "title": "RuleActionActivate"
178742
- },
178743
- {
178744
- "additionalProperties": false,
178745
- "type": "object",
178746
- "required": [
178747
- "type"
178748
- ],
178749
- "properties": {
178750
- "type": {
178751
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
178752
- "type": "string",
178753
- "enum": [
178754
- "increase_budget_pct"
178755
- ]
178756
- },
178757
- "params": {
178701
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
178702
+ "anyOf": [
178703
+ {
178758
178704
  "additionalProperties": false,
178759
178705
  "type": "object",
178706
+ "required": [
178707
+ "type"
178708
+ ],
178760
178709
  "properties": {
178761
- "percentage": {
178762
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
178763
- "minimum": 1,
178764
- "maximum": 100,
178765
- "type": "number"
178710
+ "type": {
178711
+ "description": "Pause the matched entity (campaign/adset/ad).",
178712
+ "type": "string",
178713
+ "enum": [
178714
+ "pause"
178715
+ ]
178766
178716
  },
178767
- "pct": {
178768
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
178769
- "minimum": 1,
178770
- "maximum": 100,
178771
- "type": "number"
178717
+ "params": {
178718
+ "$comment": "json-value",
178719
+ "description": "Arbitrary JSON value with nested arrays and objects."
178772
178720
  }
178773
- }
178774
- }
178775
- },
178776
- "title": "RuleActionIncreaseBudget"
178777
- },
178778
- {
178779
- "additionalProperties": false,
178780
- "type": "object",
178781
- "required": [
178782
- "type"
178783
- ],
178784
- "properties": {
178785
- "type": {
178786
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
178787
- "type": "string",
178788
- "enum": [
178789
- "decrease_budget_pct"
178790
- ]
178721
+ },
178722
+ "title": "RuleActionPause"
178791
178723
  },
178792
- "params": {
178724
+ {
178793
178725
  "additionalProperties": false,
178794
178726
  "type": "object",
178727
+ "required": [
178728
+ "type"
178729
+ ],
178795
178730
  "properties": {
178796
- "percentage": {
178797
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
178798
- "minimum": 1,
178799
- "maximum": 100,
178800
- "type": "number"
178801
- },
178802
- "pct": {
178803
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
178804
- "minimum": 1,
178805
- "maximum": 100,
178806
- "type": "number"
178807
- }
178808
- }
178809
- }
178810
- },
178811
- "title": "RuleActionDecreaseBudget"
178812
- },
178813
- {
178814
- "additionalProperties": false,
178815
- "type": "object",
178816
- "required": [
178817
- "type"
178818
- ],
178819
- "properties": {
178820
- "type": {
178821
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
178822
- "type": "string",
178823
- "enum": [
178824
- "relaunch"
178825
- ]
178826
- },
178827
- "params": {
178828
- "$comment": "json-value",
178829
- "description": "Arbitrary JSON value with nested arrays and objects."
178830
- }
178831
- },
178832
- "title": "RuleActionRelaunch"
178833
- },
178834
- {
178835
- "additionalProperties": false,
178836
- "type": "object",
178837
- "required": [
178838
- "type"
178839
- ],
178840
- "properties": {
178841
- "type": {
178842
- "description": "Send a notification but do not mutate anything on Meta.",
178843
- "type": "string",
178844
- "enum": [
178845
- "notify_only"
178846
- ]
178847
- },
178848
- "params": {
178849
- "$comment": "json-value",
178850
- "description": "Arbitrary JSON value with nested arrays and objects."
178851
- }
178852
- },
178853
- "title": "RuleActionNotifyOnly"
178854
- },
178855
- {
178856
- "additionalProperties": false,
178857
- "type": "object",
178858
- "required": [
178859
- "type",
178860
- "platform",
178861
- "entity_level"
178862
- ],
178863
- "properties": {
178864
- "type": {
178865
- "type": "string",
178866
- "enum": [
178867
- "PAUSE_TOP_SPEND_CAMPAIGN"
178868
- ]
178869
- },
178870
- "platform": {
178871
- "anyOf": [
178872
- {
178731
+ "type": {
178732
+ "description": "Activate the matched entity (campaign/adset/ad).",
178873
178733
  "type": "string",
178874
178734
  "enum": [
178875
- "META"
178735
+ "activate"
178876
178736
  ]
178877
178737
  },
178878
- {
178738
+ "params": {
178739
+ "$comment": "json-value",
178740
+ "description": "Arbitrary JSON value with nested arrays and objects."
178741
+ }
178742
+ },
178743
+ "title": "RuleActionActivate"
178744
+ },
178745
+ {
178746
+ "additionalProperties": false,
178747
+ "type": "object",
178748
+ "required": [
178749
+ "type"
178750
+ ],
178751
+ "properties": {
178752
+ "type": {
178753
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
178879
178754
  "type": "string",
178880
178755
  "enum": [
178881
- "GOOGLE"
178756
+ "increase_budget_pct"
178882
178757
  ]
178883
178758
  },
178884
- {
178759
+ "params": {
178760
+ "additionalProperties": false,
178761
+ "type": "object",
178762
+ "properties": {
178763
+ "percentage": {
178764
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
178765
+ "minimum": 1,
178766
+ "maximum": 1000,
178767
+ "type": "number"
178768
+ },
178769
+ "pct": {
178770
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
178771
+ "minimum": 1,
178772
+ "maximum": 1000,
178773
+ "type": "number"
178774
+ }
178775
+ }
178776
+ }
178777
+ },
178778
+ "title": "RuleActionIncreaseBudget"
178779
+ },
178780
+ {
178781
+ "additionalProperties": false,
178782
+ "type": "object",
178783
+ "required": [
178784
+ "type"
178785
+ ],
178786
+ "properties": {
178787
+ "type": {
178788
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
178885
178789
  "type": "string",
178886
178790
  "enum": [
178887
- "TIKTOK"
178791
+ "decrease_budget_pct"
178888
178792
  ]
178889
178793
  },
178890
- {
178794
+ "params": {
178795
+ "additionalProperties": false,
178796
+ "type": "object",
178797
+ "properties": {
178798
+ "percentage": {
178799
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
178800
+ "minimum": 1,
178801
+ "maximum": 100,
178802
+ "type": "number"
178803
+ },
178804
+ "pct": {
178805
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
178806
+ "minimum": 1,
178807
+ "maximum": 100,
178808
+ "type": "number"
178809
+ }
178810
+ }
178811
+ }
178812
+ },
178813
+ "title": "RuleActionDecreaseBudget"
178814
+ },
178815
+ {
178816
+ "additionalProperties": false,
178817
+ "type": "object",
178818
+ "required": [
178819
+ "type"
178820
+ ],
178821
+ "properties": {
178822
+ "type": {
178823
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
178891
178824
  "type": "string",
178892
178825
  "enum": [
178893
- "TABOOLA"
178826
+ "relaunch"
178894
178827
  ]
178895
178828
  },
178896
- {
178829
+ "params": {
178830
+ "$comment": "json-value",
178831
+ "description": "Arbitrary JSON value with nested arrays and objects."
178832
+ }
178833
+ },
178834
+ "title": "RuleActionRelaunch"
178835
+ },
178836
+ {
178837
+ "additionalProperties": false,
178838
+ "type": "object",
178839
+ "required": [
178840
+ "type"
178841
+ ],
178842
+ "properties": {
178843
+ "type": {
178844
+ "description": "Send a notification but do not mutate anything on Meta.",
178897
178845
  "type": "string",
178898
178846
  "enum": [
178899
- "LINKEDIN"
178847
+ "notify_only"
178900
178848
  ]
178849
+ },
178850
+ "params": {
178851
+ "$comment": "json-value",
178852
+ "description": "Arbitrary JSON value with nested arrays and objects."
178901
178853
  }
178902
- ]
178854
+ },
178855
+ "title": "RuleActionNotifyOnly"
178903
178856
  },
178904
- "entity_level": {
178905
- "type": "string",
178906
- "enum": [
178907
- "campaign"
178908
- ]
178909
- }
178910
- },
178911
- "title": "RuleActionPauseTopSpendCampaign"
178912
- },
178913
- {
178914
- "additionalProperties": false,
178915
- "type": "object",
178916
- "required": [
178917
- "type",
178918
- "platform",
178919
- "entity_level",
178920
- "pct"
178921
- ],
178922
- "properties": {
178923
- "type": {
178924
- "anyOf": [
178925
- {
178857
+ {
178858
+ "additionalProperties": false,
178859
+ "type": "object",
178860
+ "required": [
178861
+ "type",
178862
+ "platform",
178863
+ "entity_level"
178864
+ ],
178865
+ "properties": {
178866
+ "type": {
178926
178867
  "type": "string",
178927
178868
  "enum": [
178928
- "INCREASE_BUDGET_PCT"
178869
+ "PAUSE_TOP_SPEND_CAMPAIGN"
178929
178870
  ]
178930
178871
  },
178931
- {
178872
+ "platform": {
178873
+ "anyOf": [
178874
+ {
178875
+ "type": "string",
178876
+ "enum": [
178877
+ "META"
178878
+ ]
178879
+ },
178880
+ {
178881
+ "type": "string",
178882
+ "enum": [
178883
+ "GOOGLE"
178884
+ ]
178885
+ },
178886
+ {
178887
+ "type": "string",
178888
+ "enum": [
178889
+ "TIKTOK"
178890
+ ]
178891
+ },
178892
+ {
178893
+ "type": "string",
178894
+ "enum": [
178895
+ "TABOOLA"
178896
+ ]
178897
+ },
178898
+ {
178899
+ "type": "string",
178900
+ "enum": [
178901
+ "LINKEDIN"
178902
+ ]
178903
+ }
178904
+ ]
178905
+ },
178906
+ "entity_level": {
178932
178907
  "type": "string",
178933
178908
  "enum": [
178934
- "DECREASE_BUDGET_PCT"
178909
+ "campaign"
178935
178910
  ]
178936
178911
  }
178937
- ]
178912
+ },
178913
+ "title": "RuleActionPauseTopSpendCampaign"
178938
178914
  },
178939
- "platform": {
178940
- "anyOf": [
178941
- {
178942
- "type": "string",
178943
- "enum": [
178944
- "META"
178915
+ {
178916
+ "additionalProperties": false,
178917
+ "type": "object",
178918
+ "required": [
178919
+ "type",
178920
+ "platform",
178921
+ "entity_level",
178922
+ "pct"
178923
+ ],
178924
+ "properties": {
178925
+ "type": {
178926
+ "anyOf": [
178927
+ {
178928
+ "type": "string",
178929
+ "enum": [
178930
+ "INCREASE_BUDGET_PCT"
178931
+ ]
178932
+ },
178933
+ {
178934
+ "type": "string",
178935
+ "enum": [
178936
+ "DECREASE_BUDGET_PCT"
178937
+ ]
178938
+ }
178939
+ ]
178940
+ },
178941
+ "platform": {
178942
+ "anyOf": [
178943
+ {
178944
+ "type": "string",
178945
+ "enum": [
178946
+ "META"
178947
+ ]
178948
+ },
178949
+ {
178950
+ "type": "string",
178951
+ "enum": [
178952
+ "GOOGLE"
178953
+ ]
178954
+ },
178955
+ {
178956
+ "type": "string",
178957
+ "enum": [
178958
+ "TIKTOK"
178959
+ ]
178960
+ },
178961
+ {
178962
+ "type": "string",
178963
+ "enum": [
178964
+ "TABOOLA"
178965
+ ]
178966
+ },
178967
+ {
178968
+ "type": "string",
178969
+ "enum": [
178970
+ "LINKEDIN"
178971
+ ]
178972
+ }
178945
178973
  ]
178946
178974
  },
178947
- {
178975
+ "entity_level": {
178948
178976
  "type": "string",
178949
178977
  "enum": [
178950
- "GOOGLE"
178978
+ "campaign"
178951
178979
  ]
178952
178980
  },
178953
- {
178981
+ "pct": {
178982
+ "minimum": 1,
178983
+ "maximum": 100,
178984
+ "type": "number"
178985
+ }
178986
+ },
178987
+ "title": "RuleActionCrossPlatformBudgetPct"
178988
+ },
178989
+ {
178990
+ "additionalProperties": false,
178991
+ "type": "object",
178992
+ "required": [
178993
+ "type",
178994
+ "channel",
178995
+ "message_template"
178996
+ ],
178997
+ "properties": {
178998
+ "type": {
178954
178999
  "type": "string",
178955
179000
  "enum": [
178956
- "TIKTOK"
179001
+ "NOTIFY_CHANNEL"
178957
179002
  ]
178958
179003
  },
178959
- {
178960
- "type": "string",
178961
- "enum": [
178962
- "TABOOLA"
179004
+ "channel": {
179005
+ "anyOf": [
179006
+ {
179007
+ "type": "string",
179008
+ "enum": [
179009
+ "in_app"
179010
+ ]
179011
+ },
179012
+ {
179013
+ "type": "string",
179014
+ "enum": [
179015
+ "email"
179016
+ ]
179017
+ },
179018
+ {
179019
+ "type": "string",
179020
+ "enum": [
179021
+ "telegram"
179022
+ ]
179023
+ }
178963
179024
  ]
178964
179025
  },
178965
- {
178966
- "type": "string",
178967
- "enum": [
178968
- "LINKEDIN"
178969
- ]
179026
+ "message_template": {
179027
+ "minLength": 1,
179028
+ "maxLength": 500,
179029
+ "type": "string"
178970
179030
  }
178971
- ]
178972
- },
178973
- "entity_level": {
178974
- "type": "string",
178975
- "enum": [
178976
- "campaign"
178977
- ]
178978
- },
178979
- "pct": {
178980
- "minimum": 1,
178981
- "maximum": 100,
178982
- "type": "number"
179031
+ },
179032
+ "title": "RuleActionNotifyChannel"
178983
179033
  }
178984
- },
178985
- "title": "RuleActionCrossPlatformBudgetPct"
179034
+ ],
179035
+ "title": "RuleAction"
178986
179036
  },
178987
179037
  {
178988
- "additionalProperties": false,
179038
+ "additionalProperties": true,
179039
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
178989
179040
  "type": "object",
178990
179041
  "required": [
178991
- "type",
178992
- "channel",
178993
- "message_template"
179042
+ "type"
178994
179043
  ],
178995
179044
  "properties": {
178996
179045
  "type": {
178997
- "type": "string",
178998
- "enum": [
178999
- "NOTIFY_CHANNEL"
179000
- ]
179001
- },
179002
- "channel": {
179003
- "anyOf": [
179004
- {
179005
- "type": "string",
179006
- "enum": [
179007
- "in_app"
179008
- ]
179009
- },
179010
- {
179011
- "type": "string",
179012
- "enum": [
179013
- "email"
179014
- ]
179015
- },
179016
- {
179017
- "type": "string",
179018
- "enum": [
179019
- "telegram"
179020
- ]
179021
- }
179022
- ]
179023
- },
179024
- "message_template": {
179025
- "minLength": 1,
179026
- "maxLength": 500,
179046
+ "description": "Action discriminator as stored, including legacy spellings.",
179027
179047
  "type": "string"
179048
+ },
179049
+ "params": {
179050
+ "$comment": "json-value",
179051
+ "description": "Arbitrary JSON value with nested arrays and objects."
179028
179052
  }
179029
179053
  },
179030
- "title": "RuleActionNotifyChannel"
179054
+ "title": "RuleActionLegacy"
179031
179055
  }
179032
179056
  ],
179033
- "title": "RuleAction"
179057
+ "title": "RuleActionStored"
179034
179058
  }
179035
179059
  },
179036
179060
  "schedule_type": {
@@ -180236,15 +180260,15 @@
180236
180260
  "type": "object",
180237
180261
  "properties": {
180238
180262
  "percentage": {
180239
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
180263
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
180240
180264
  "minimum": 1,
180241
- "maximum": 100,
180265
+ "maximum": 1000,
180242
180266
  "type": "number"
180243
180267
  },
180244
180268
  "pct": {
180245
180269
  "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
180246
180270
  "minimum": 1,
180247
- "maximum": 100,
180271
+ "maximum": 1000,
180248
180272
  "type": "number"
180249
180273
  }
180250
180274
  }
@@ -181499,330 +181523,352 @@
181499
181523
  }
181500
181524
  },
181501
181525
  "actions": {
181502
- "description": "Ordered list of actions applied to each matched entity.",
181526
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
181503
181527
  "type": "array",
181504
181528
  "items": {
181505
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
181506
181529
  "anyOf": [
181507
181530
  {
181508
- "additionalProperties": false,
181509
- "type": "object",
181510
- "required": [
181511
- "type"
181512
- ],
181513
- "properties": {
181514
- "type": {
181515
- "description": "Pause the matched entity (campaign/adset/ad).",
181516
- "type": "string",
181517
- "enum": [
181518
- "pause"
181519
- ]
181520
- },
181521
- "params": {
181522
- "$comment": "json-value",
181523
- "description": "Arbitrary JSON value with nested arrays and objects."
181524
- }
181525
- }
181526
- },
181527
- {
181528
- "additionalProperties": false,
181529
- "type": "object",
181530
- "required": [
181531
- "type"
181532
- ],
181533
- "properties": {
181534
- "type": {
181535
- "description": "Activate the matched entity (campaign/adset/ad).",
181536
- "type": "string",
181537
- "enum": [
181538
- "activate"
181539
- ]
181540
- },
181541
- "params": {
181542
- "$comment": "json-value",
181543
- "description": "Arbitrary JSON value with nested arrays and objects."
181544
- }
181545
- }
181546
- },
181547
- {
181548
- "additionalProperties": false,
181549
- "type": "object",
181550
- "required": [
181551
- "type"
181552
- ],
181553
- "properties": {
181554
- "type": {
181555
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
181556
- "type": "string",
181557
- "enum": [
181558
- "increase_budget_pct"
181559
- ]
181560
- },
181561
- "params": {
181562
- "additionalProperties": false,
181563
- "type": "object",
181564
- "properties": {
181565
- "percentage": {
181566
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
181567
- "minimum": 1,
181568
- "maximum": 100,
181569
- "type": "number"
181570
- },
181571
- "pct": {
181572
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
181573
- "minimum": 1,
181574
- "maximum": 100,
181575
- "type": "number"
181576
- }
181577
- }
181578
- }
181579
- }
181580
- },
181581
- {
181582
- "additionalProperties": false,
181583
- "type": "object",
181584
- "required": [
181585
- "type"
181586
- ],
181587
- "properties": {
181588
- "type": {
181589
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
181590
- "type": "string",
181591
- "enum": [
181592
- "decrease_budget_pct"
181593
- ]
181594
- },
181595
- "params": {
181531
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
181532
+ "anyOf": [
181533
+ {
181596
181534
  "additionalProperties": false,
181597
181535
  "type": "object",
181598
- "properties": {
181599
- "percentage": {
181600
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
181601
- "minimum": 1,
181602
- "maximum": 100,
181603
- "type": "number"
181604
- },
181605
- "pct": {
181606
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
181607
- "minimum": 1,
181608
- "maximum": 100,
181609
- "type": "number"
181610
- }
181611
- }
181612
- }
181613
- }
181614
- },
181615
- {
181616
- "additionalProperties": false,
181617
- "type": "object",
181618
- "required": [
181619
- "type"
181620
- ],
181621
- "properties": {
181622
- "type": {
181623
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
181624
- "type": "string",
181625
- "enum": [
181626
- "relaunch"
181627
- ]
181628
- },
181629
- "params": {
181630
- "$comment": "json-value",
181631
- "description": "Arbitrary JSON value with nested arrays and objects."
181632
- }
181633
- }
181634
- },
181635
- {
181636
- "additionalProperties": false,
181637
- "type": "object",
181638
- "required": [
181639
- "type"
181640
- ],
181641
- "properties": {
181642
- "type": {
181643
- "description": "Send a notification but do not mutate anything on Meta.",
181644
- "type": "string",
181645
- "enum": [
181646
- "notify_only"
181647
- ]
181648
- },
181649
- "params": {
181650
- "$comment": "json-value",
181651
- "description": "Arbitrary JSON value with nested arrays and objects."
181652
- }
181653
- }
181654
- },
181655
- {
181656
- "additionalProperties": false,
181657
- "type": "object",
181658
- "required": [
181659
- "type",
181660
- "platform",
181661
- "entity_level"
181662
- ],
181663
- "properties": {
181664
- "type": {
181665
- "type": "string",
181666
- "enum": [
181667
- "PAUSE_TOP_SPEND_CAMPAIGN"
181668
- ]
181669
- },
181670
- "platform": {
181671
- "anyOf": [
181672
- {
181536
+ "required": [
181537
+ "type"
181538
+ ],
181539
+ "properties": {
181540
+ "type": {
181541
+ "description": "Pause the matched entity (campaign/adset/ad).",
181673
181542
  "type": "string",
181674
181543
  "enum": [
181675
- "META"
181544
+ "pause"
181676
181545
  ]
181677
181546
  },
181678
- {
181547
+ "params": {
181548
+ "$comment": "json-value",
181549
+ "description": "Arbitrary JSON value with nested arrays and objects."
181550
+ }
181551
+ }
181552
+ },
181553
+ {
181554
+ "additionalProperties": false,
181555
+ "type": "object",
181556
+ "required": [
181557
+ "type"
181558
+ ],
181559
+ "properties": {
181560
+ "type": {
181561
+ "description": "Activate the matched entity (campaign/adset/ad).",
181679
181562
  "type": "string",
181680
181563
  "enum": [
181681
- "GOOGLE"
181564
+ "activate"
181682
181565
  ]
181683
181566
  },
181684
- {
181567
+ "params": {
181568
+ "$comment": "json-value",
181569
+ "description": "Arbitrary JSON value with nested arrays and objects."
181570
+ }
181571
+ }
181572
+ },
181573
+ {
181574
+ "additionalProperties": false,
181575
+ "type": "object",
181576
+ "required": [
181577
+ "type"
181578
+ ],
181579
+ "properties": {
181580
+ "type": {
181581
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
181685
181582
  "type": "string",
181686
181583
  "enum": [
181687
- "TIKTOK"
181584
+ "increase_budget_pct"
181688
181585
  ]
181689
181586
  },
181690
- {
181587
+ "params": {
181588
+ "additionalProperties": false,
181589
+ "type": "object",
181590
+ "properties": {
181591
+ "percentage": {
181592
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
181593
+ "minimum": 1,
181594
+ "maximum": 1000,
181595
+ "type": "number"
181596
+ },
181597
+ "pct": {
181598
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
181599
+ "minimum": 1,
181600
+ "maximum": 1000,
181601
+ "type": "number"
181602
+ }
181603
+ }
181604
+ }
181605
+ }
181606
+ },
181607
+ {
181608
+ "additionalProperties": false,
181609
+ "type": "object",
181610
+ "required": [
181611
+ "type"
181612
+ ],
181613
+ "properties": {
181614
+ "type": {
181615
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
181691
181616
  "type": "string",
181692
181617
  "enum": [
181693
- "TABOOLA"
181618
+ "decrease_budget_pct"
181694
181619
  ]
181695
181620
  },
181696
- {
181697
- "type": "string",
181698
- "enum": [
181699
- "LINKEDIN"
181700
- ]
181621
+ "params": {
181622
+ "additionalProperties": false,
181623
+ "type": "object",
181624
+ "properties": {
181625
+ "percentage": {
181626
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
181627
+ "minimum": 1,
181628
+ "maximum": 100,
181629
+ "type": "number"
181630
+ },
181631
+ "pct": {
181632
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
181633
+ "minimum": 1,
181634
+ "maximum": 100,
181635
+ "type": "number"
181636
+ }
181637
+ }
181701
181638
  }
181702
- ]
181639
+ }
181703
181640
  },
181704
- "entity_level": {
181705
- "type": "string",
181706
- "enum": [
181707
- "campaign"
181708
- ]
181709
- }
181710
- }
181711
- },
181712
- {
181713
- "additionalProperties": false,
181714
- "type": "object",
181715
- "required": [
181716
- "type",
181717
- "platform",
181718
- "entity_level",
181719
- "pct"
181720
- ],
181721
- "properties": {
181722
- "type": {
181723
- "anyOf": [
181724
- {
181641
+ {
181642
+ "additionalProperties": false,
181643
+ "type": "object",
181644
+ "required": [
181645
+ "type"
181646
+ ],
181647
+ "properties": {
181648
+ "type": {
181649
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
181725
181650
  "type": "string",
181726
181651
  "enum": [
181727
- "INCREASE_BUDGET_PCT"
181652
+ "relaunch"
181728
181653
  ]
181729
181654
  },
181730
- {
181655
+ "params": {
181656
+ "$comment": "json-value",
181657
+ "description": "Arbitrary JSON value with nested arrays and objects."
181658
+ }
181659
+ }
181660
+ },
181661
+ {
181662
+ "additionalProperties": false,
181663
+ "type": "object",
181664
+ "required": [
181665
+ "type"
181666
+ ],
181667
+ "properties": {
181668
+ "type": {
181669
+ "description": "Send a notification but do not mutate anything on Meta.",
181731
181670
  "type": "string",
181732
181671
  "enum": [
181733
- "DECREASE_BUDGET_PCT"
181672
+ "notify_only"
181734
181673
  ]
181674
+ },
181675
+ "params": {
181676
+ "$comment": "json-value",
181677
+ "description": "Arbitrary JSON value with nested arrays and objects."
181735
181678
  }
181736
- ]
181679
+ }
181737
181680
  },
181738
- "platform": {
181739
- "anyOf": [
181740
- {
181681
+ {
181682
+ "additionalProperties": false,
181683
+ "type": "object",
181684
+ "required": [
181685
+ "type",
181686
+ "platform",
181687
+ "entity_level"
181688
+ ],
181689
+ "properties": {
181690
+ "type": {
181741
181691
  "type": "string",
181742
181692
  "enum": [
181743
- "META"
181693
+ "PAUSE_TOP_SPEND_CAMPAIGN"
181744
181694
  ]
181745
181695
  },
181746
- {
181696
+ "platform": {
181697
+ "anyOf": [
181698
+ {
181699
+ "type": "string",
181700
+ "enum": [
181701
+ "META"
181702
+ ]
181703
+ },
181704
+ {
181705
+ "type": "string",
181706
+ "enum": [
181707
+ "GOOGLE"
181708
+ ]
181709
+ },
181710
+ {
181711
+ "type": "string",
181712
+ "enum": [
181713
+ "TIKTOK"
181714
+ ]
181715
+ },
181716
+ {
181717
+ "type": "string",
181718
+ "enum": [
181719
+ "TABOOLA"
181720
+ ]
181721
+ },
181722
+ {
181723
+ "type": "string",
181724
+ "enum": [
181725
+ "LINKEDIN"
181726
+ ]
181727
+ }
181728
+ ]
181729
+ },
181730
+ "entity_level": {
181747
181731
  "type": "string",
181748
181732
  "enum": [
181749
- "GOOGLE"
181733
+ "campaign"
181734
+ ]
181735
+ }
181736
+ }
181737
+ },
181738
+ {
181739
+ "additionalProperties": false,
181740
+ "type": "object",
181741
+ "required": [
181742
+ "type",
181743
+ "platform",
181744
+ "entity_level",
181745
+ "pct"
181746
+ ],
181747
+ "properties": {
181748
+ "type": {
181749
+ "anyOf": [
181750
+ {
181751
+ "type": "string",
181752
+ "enum": [
181753
+ "INCREASE_BUDGET_PCT"
181754
+ ]
181755
+ },
181756
+ {
181757
+ "type": "string",
181758
+ "enum": [
181759
+ "DECREASE_BUDGET_PCT"
181760
+ ]
181761
+ }
181750
181762
  ]
181751
181763
  },
181752
- {
181764
+ "platform": {
181765
+ "anyOf": [
181766
+ {
181767
+ "type": "string",
181768
+ "enum": [
181769
+ "META"
181770
+ ]
181771
+ },
181772
+ {
181773
+ "type": "string",
181774
+ "enum": [
181775
+ "GOOGLE"
181776
+ ]
181777
+ },
181778
+ {
181779
+ "type": "string",
181780
+ "enum": [
181781
+ "TIKTOK"
181782
+ ]
181783
+ },
181784
+ {
181785
+ "type": "string",
181786
+ "enum": [
181787
+ "TABOOLA"
181788
+ ]
181789
+ },
181790
+ {
181791
+ "type": "string",
181792
+ "enum": [
181793
+ "LINKEDIN"
181794
+ ]
181795
+ }
181796
+ ]
181797
+ },
181798
+ "entity_level": {
181753
181799
  "type": "string",
181754
181800
  "enum": [
181755
- "TIKTOK"
181801
+ "campaign"
181756
181802
  ]
181757
181803
  },
181758
- {
181804
+ "pct": {
181805
+ "minimum": 1,
181806
+ "maximum": 100,
181807
+ "type": "number"
181808
+ }
181809
+ }
181810
+ },
181811
+ {
181812
+ "additionalProperties": false,
181813
+ "type": "object",
181814
+ "required": [
181815
+ "type",
181816
+ "channel",
181817
+ "message_template"
181818
+ ],
181819
+ "properties": {
181820
+ "type": {
181759
181821
  "type": "string",
181760
181822
  "enum": [
181761
- "TABOOLA"
181823
+ "NOTIFY_CHANNEL"
181762
181824
  ]
181763
181825
  },
181764
- {
181765
- "type": "string",
181766
- "enum": [
181767
- "LINKEDIN"
181826
+ "channel": {
181827
+ "anyOf": [
181828
+ {
181829
+ "type": "string",
181830
+ "enum": [
181831
+ "in_app"
181832
+ ]
181833
+ },
181834
+ {
181835
+ "type": "string",
181836
+ "enum": [
181837
+ "email"
181838
+ ]
181839
+ },
181840
+ {
181841
+ "type": "string",
181842
+ "enum": [
181843
+ "telegram"
181844
+ ]
181845
+ }
181768
181846
  ]
181847
+ },
181848
+ "message_template": {
181849
+ "minLength": 1,
181850
+ "maxLength": 500,
181851
+ "type": "string"
181769
181852
  }
181770
- ]
181771
- },
181772
- "entity_level": {
181773
- "type": "string",
181774
- "enum": [
181775
- "campaign"
181776
- ]
181777
- },
181778
- "pct": {
181779
- "minimum": 1,
181780
- "maximum": 100,
181781
- "type": "number"
181853
+ }
181782
181854
  }
181783
- }
181855
+ ]
181784
181856
  },
181785
181857
  {
181786
- "additionalProperties": false,
181858
+ "additionalProperties": true,
181859
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
181787
181860
  "type": "object",
181788
181861
  "required": [
181789
- "type",
181790
- "channel",
181791
- "message_template"
181862
+ "type"
181792
181863
  ],
181793
181864
  "properties": {
181794
181865
  "type": {
181795
- "type": "string",
181796
- "enum": [
181797
- "NOTIFY_CHANNEL"
181798
- ]
181799
- },
181800
- "channel": {
181801
- "anyOf": [
181802
- {
181803
- "type": "string",
181804
- "enum": [
181805
- "in_app"
181806
- ]
181807
- },
181808
- {
181809
- "type": "string",
181810
- "enum": [
181811
- "email"
181812
- ]
181813
- },
181814
- {
181815
- "type": "string",
181816
- "enum": [
181817
- "telegram"
181818
- ]
181819
- }
181820
- ]
181821
- },
181822
- "message_template": {
181823
- "minLength": 1,
181824
- "maxLength": 500,
181866
+ "description": "Action discriminator as stored, including legacy spellings.",
181825
181867
  "type": "string"
181868
+ },
181869
+ "params": {
181870
+ "$comment": "json-value",
181871
+ "description": "Arbitrary JSON value with nested arrays and objects."
181826
181872
  }
181827
181873
  }
181828
181874
  }
@@ -182990,347 +183036,369 @@
182990
183036
  "properties": {
182991
183037
  "type": {
182992
183038
  "type": "string",
182993
- "enum": [
182994
- "literal"
182995
- ]
182996
- },
182997
- "value": {
182998
- "type": "number"
182999
- }
183000
- }
183001
- }
183002
- ]
183003
- }
183004
- }
183005
- }
183006
- ]
183007
- }
183008
- },
183009
- "actions": {
183010
- "description": "Ordered list of actions applied to each matched entity.",
183011
- "type": "array",
183012
- "items": {
183013
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
183014
- "anyOf": [
183015
- {
183016
- "additionalProperties": false,
183017
- "type": "object",
183018
- "required": [
183019
- "type"
183020
- ],
183021
- "properties": {
183022
- "type": {
183023
- "description": "Pause the matched entity (campaign/adset/ad).",
183024
- "type": "string",
183025
- "enum": [
183026
- "pause"
183027
- ]
183028
- },
183029
- "params": {
183030
- "$comment": "json-value",
183031
- "description": "Arbitrary JSON value with nested arrays and objects."
183032
- }
183033
- }
183034
- },
183035
- {
183036
- "additionalProperties": false,
183037
- "type": "object",
183038
- "required": [
183039
- "type"
183040
- ],
183041
- "properties": {
183042
- "type": {
183043
- "description": "Activate the matched entity (campaign/adset/ad).",
183044
- "type": "string",
183045
- "enum": [
183046
- "activate"
183047
- ]
183048
- },
183049
- "params": {
183050
- "$comment": "json-value",
183051
- "description": "Arbitrary JSON value with nested arrays and objects."
183052
- }
183053
- }
183054
- },
183055
- {
183056
- "additionalProperties": false,
183057
- "type": "object",
183058
- "required": [
183059
- "type"
183060
- ],
183061
- "properties": {
183062
- "type": {
183063
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
183064
- "type": "string",
183065
- "enum": [
183066
- "increase_budget_pct"
183067
- ]
183068
- },
183069
- "params": {
183070
- "additionalProperties": false,
183071
- "type": "object",
183072
- "properties": {
183073
- "percentage": {
183074
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
183075
- "minimum": 1,
183076
- "maximum": 100,
183077
- "type": "number"
183078
- },
183079
- "pct": {
183080
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
183081
- "minimum": 1,
183082
- "maximum": 100,
183083
- "type": "number"
183084
- }
183085
- }
183086
- }
183087
- }
183088
- },
183089
- {
183090
- "additionalProperties": false,
183091
- "type": "object",
183092
- "required": [
183093
- "type"
183094
- ],
183095
- "properties": {
183096
- "type": {
183097
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
183098
- "type": "string",
183099
- "enum": [
183100
- "decrease_budget_pct"
183101
- ]
183102
- },
183103
- "params": {
183104
- "additionalProperties": false,
183105
- "type": "object",
183106
- "properties": {
183107
- "percentage": {
183108
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
183109
- "minimum": 1,
183110
- "maximum": 100,
183111
- "type": "number"
183112
- },
183113
- "pct": {
183114
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
183115
- "minimum": 1,
183116
- "maximum": 100,
183117
- "type": "number"
183118
- }
183119
- }
183120
- }
183121
- }
183122
- },
183123
- {
183124
- "additionalProperties": false,
183125
- "type": "object",
183126
- "required": [
183127
- "type"
183128
- ],
183129
- "properties": {
183130
- "type": {
183131
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
183132
- "type": "string",
183133
- "enum": [
183134
- "relaunch"
183135
- ]
183136
- },
183137
- "params": {
183138
- "$comment": "json-value",
183139
- "description": "Arbitrary JSON value with nested arrays and objects."
183140
- }
183141
- }
183142
- },
183143
- {
183144
- "additionalProperties": false,
183145
- "type": "object",
183146
- "required": [
183147
- "type"
183148
- ],
183149
- "properties": {
183150
- "type": {
183151
- "description": "Send a notification but do not mutate anything on Meta.",
183152
- "type": "string",
183153
- "enum": [
183154
- "notify_only"
183155
- ]
183156
- },
183157
- "params": {
183158
- "$comment": "json-value",
183159
- "description": "Arbitrary JSON value with nested arrays and objects."
183160
- }
183161
- }
183162
- },
183163
- {
183164
- "additionalProperties": false,
183165
- "type": "object",
183166
- "required": [
183167
- "type",
183168
- "platform",
183169
- "entity_level"
183170
- ],
183171
- "properties": {
183172
- "type": {
183173
- "type": "string",
183174
- "enum": [
183175
- "PAUSE_TOP_SPEND_CAMPAIGN"
183039
+ "enum": [
183040
+ "literal"
183041
+ ]
183042
+ },
183043
+ "value": {
183044
+ "type": "number"
183045
+ }
183046
+ }
183047
+ }
183176
183048
  ]
183049
+ }
183050
+ }
183051
+ }
183052
+ ]
183053
+ }
183054
+ },
183055
+ "actions": {
183056
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
183057
+ "type": "array",
183058
+ "items": {
183059
+ "anyOf": [
183060
+ {
183061
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
183062
+ "anyOf": [
183063
+ {
183064
+ "additionalProperties": false,
183065
+ "type": "object",
183066
+ "required": [
183067
+ "type"
183068
+ ],
183069
+ "properties": {
183070
+ "type": {
183071
+ "description": "Pause the matched entity (campaign/adset/ad).",
183072
+ "type": "string",
183073
+ "enum": [
183074
+ "pause"
183075
+ ]
183076
+ },
183077
+ "params": {
183078
+ "$comment": "json-value",
183079
+ "description": "Arbitrary JSON value with nested arrays and objects."
183080
+ }
183081
+ }
183177
183082
  },
183178
- "platform": {
183179
- "anyOf": [
183180
- {
183083
+ {
183084
+ "additionalProperties": false,
183085
+ "type": "object",
183086
+ "required": [
183087
+ "type"
183088
+ ],
183089
+ "properties": {
183090
+ "type": {
183091
+ "description": "Activate the matched entity (campaign/adset/ad).",
183181
183092
  "type": "string",
183182
183093
  "enum": [
183183
- "META"
183094
+ "activate"
183184
183095
  ]
183185
183096
  },
183186
- {
183097
+ "params": {
183098
+ "$comment": "json-value",
183099
+ "description": "Arbitrary JSON value with nested arrays and objects."
183100
+ }
183101
+ }
183102
+ },
183103
+ {
183104
+ "additionalProperties": false,
183105
+ "type": "object",
183106
+ "required": [
183107
+ "type"
183108
+ ],
183109
+ "properties": {
183110
+ "type": {
183111
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
183187
183112
  "type": "string",
183188
183113
  "enum": [
183189
- "GOOGLE"
183114
+ "increase_budget_pct"
183190
183115
  ]
183191
183116
  },
183192
- {
183117
+ "params": {
183118
+ "additionalProperties": false,
183119
+ "type": "object",
183120
+ "properties": {
183121
+ "percentage": {
183122
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
183123
+ "minimum": 1,
183124
+ "maximum": 1000,
183125
+ "type": "number"
183126
+ },
183127
+ "pct": {
183128
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
183129
+ "minimum": 1,
183130
+ "maximum": 1000,
183131
+ "type": "number"
183132
+ }
183133
+ }
183134
+ }
183135
+ }
183136
+ },
183137
+ {
183138
+ "additionalProperties": false,
183139
+ "type": "object",
183140
+ "required": [
183141
+ "type"
183142
+ ],
183143
+ "properties": {
183144
+ "type": {
183145
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
183193
183146
  "type": "string",
183194
183147
  "enum": [
183195
- "TIKTOK"
183148
+ "decrease_budget_pct"
183196
183149
  ]
183197
183150
  },
183198
- {
183151
+ "params": {
183152
+ "additionalProperties": false,
183153
+ "type": "object",
183154
+ "properties": {
183155
+ "percentage": {
183156
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
183157
+ "minimum": 1,
183158
+ "maximum": 100,
183159
+ "type": "number"
183160
+ },
183161
+ "pct": {
183162
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
183163
+ "minimum": 1,
183164
+ "maximum": 100,
183165
+ "type": "number"
183166
+ }
183167
+ }
183168
+ }
183169
+ }
183170
+ },
183171
+ {
183172
+ "additionalProperties": false,
183173
+ "type": "object",
183174
+ "required": [
183175
+ "type"
183176
+ ],
183177
+ "properties": {
183178
+ "type": {
183179
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
183199
183180
  "type": "string",
183200
183181
  "enum": [
183201
- "TABOOLA"
183182
+ "relaunch"
183202
183183
  ]
183203
183184
  },
183204
- {
183185
+ "params": {
183186
+ "$comment": "json-value",
183187
+ "description": "Arbitrary JSON value with nested arrays and objects."
183188
+ }
183189
+ }
183190
+ },
183191
+ {
183192
+ "additionalProperties": false,
183193
+ "type": "object",
183194
+ "required": [
183195
+ "type"
183196
+ ],
183197
+ "properties": {
183198
+ "type": {
183199
+ "description": "Send a notification but do not mutate anything on Meta.",
183205
183200
  "type": "string",
183206
183201
  "enum": [
183207
- "LINKEDIN"
183202
+ "notify_only"
183208
183203
  ]
183204
+ },
183205
+ "params": {
183206
+ "$comment": "json-value",
183207
+ "description": "Arbitrary JSON value with nested arrays and objects."
183209
183208
  }
183210
- ]
183209
+ }
183211
183210
  },
183212
- "entity_level": {
183213
- "type": "string",
183214
- "enum": [
183215
- "campaign"
183216
- ]
183217
- }
183218
- }
183219
- },
183220
- {
183221
- "additionalProperties": false,
183222
- "type": "object",
183223
- "required": [
183224
- "type",
183225
- "platform",
183226
- "entity_level",
183227
- "pct"
183228
- ],
183229
- "properties": {
183230
- "type": {
183231
- "anyOf": [
183232
- {
183211
+ {
183212
+ "additionalProperties": false,
183213
+ "type": "object",
183214
+ "required": [
183215
+ "type",
183216
+ "platform",
183217
+ "entity_level"
183218
+ ],
183219
+ "properties": {
183220
+ "type": {
183233
183221
  "type": "string",
183234
183222
  "enum": [
183235
- "INCREASE_BUDGET_PCT"
183223
+ "PAUSE_TOP_SPEND_CAMPAIGN"
183236
183224
  ]
183237
183225
  },
183238
- {
183226
+ "platform": {
183227
+ "anyOf": [
183228
+ {
183229
+ "type": "string",
183230
+ "enum": [
183231
+ "META"
183232
+ ]
183233
+ },
183234
+ {
183235
+ "type": "string",
183236
+ "enum": [
183237
+ "GOOGLE"
183238
+ ]
183239
+ },
183240
+ {
183241
+ "type": "string",
183242
+ "enum": [
183243
+ "TIKTOK"
183244
+ ]
183245
+ },
183246
+ {
183247
+ "type": "string",
183248
+ "enum": [
183249
+ "TABOOLA"
183250
+ ]
183251
+ },
183252
+ {
183253
+ "type": "string",
183254
+ "enum": [
183255
+ "LINKEDIN"
183256
+ ]
183257
+ }
183258
+ ]
183259
+ },
183260
+ "entity_level": {
183239
183261
  "type": "string",
183240
183262
  "enum": [
183241
- "DECREASE_BUDGET_PCT"
183263
+ "campaign"
183242
183264
  ]
183243
183265
  }
183244
- ]
183266
+ }
183245
183267
  },
183246
- "platform": {
183247
- "anyOf": [
183248
- {
183249
- "type": "string",
183250
- "enum": [
183251
- "META"
183268
+ {
183269
+ "additionalProperties": false,
183270
+ "type": "object",
183271
+ "required": [
183272
+ "type",
183273
+ "platform",
183274
+ "entity_level",
183275
+ "pct"
183276
+ ],
183277
+ "properties": {
183278
+ "type": {
183279
+ "anyOf": [
183280
+ {
183281
+ "type": "string",
183282
+ "enum": [
183283
+ "INCREASE_BUDGET_PCT"
183284
+ ]
183285
+ },
183286
+ {
183287
+ "type": "string",
183288
+ "enum": [
183289
+ "DECREASE_BUDGET_PCT"
183290
+ ]
183291
+ }
183252
183292
  ]
183253
183293
  },
183254
- {
183294
+ "platform": {
183295
+ "anyOf": [
183296
+ {
183297
+ "type": "string",
183298
+ "enum": [
183299
+ "META"
183300
+ ]
183301
+ },
183302
+ {
183303
+ "type": "string",
183304
+ "enum": [
183305
+ "GOOGLE"
183306
+ ]
183307
+ },
183308
+ {
183309
+ "type": "string",
183310
+ "enum": [
183311
+ "TIKTOK"
183312
+ ]
183313
+ },
183314
+ {
183315
+ "type": "string",
183316
+ "enum": [
183317
+ "TABOOLA"
183318
+ ]
183319
+ },
183320
+ {
183321
+ "type": "string",
183322
+ "enum": [
183323
+ "LINKEDIN"
183324
+ ]
183325
+ }
183326
+ ]
183327
+ },
183328
+ "entity_level": {
183255
183329
  "type": "string",
183256
183330
  "enum": [
183257
- "GOOGLE"
183331
+ "campaign"
183258
183332
  ]
183259
183333
  },
183260
- {
183334
+ "pct": {
183335
+ "minimum": 1,
183336
+ "maximum": 100,
183337
+ "type": "number"
183338
+ }
183339
+ }
183340
+ },
183341
+ {
183342
+ "additionalProperties": false,
183343
+ "type": "object",
183344
+ "required": [
183345
+ "type",
183346
+ "channel",
183347
+ "message_template"
183348
+ ],
183349
+ "properties": {
183350
+ "type": {
183261
183351
  "type": "string",
183262
183352
  "enum": [
183263
- "TIKTOK"
183353
+ "NOTIFY_CHANNEL"
183264
183354
  ]
183265
183355
  },
183266
- {
183267
- "type": "string",
183268
- "enum": [
183269
- "TABOOLA"
183356
+ "channel": {
183357
+ "anyOf": [
183358
+ {
183359
+ "type": "string",
183360
+ "enum": [
183361
+ "in_app"
183362
+ ]
183363
+ },
183364
+ {
183365
+ "type": "string",
183366
+ "enum": [
183367
+ "email"
183368
+ ]
183369
+ },
183370
+ {
183371
+ "type": "string",
183372
+ "enum": [
183373
+ "telegram"
183374
+ ]
183375
+ }
183270
183376
  ]
183271
183377
  },
183272
- {
183273
- "type": "string",
183274
- "enum": [
183275
- "LINKEDIN"
183276
- ]
183378
+ "message_template": {
183379
+ "minLength": 1,
183380
+ "maxLength": 500,
183381
+ "type": "string"
183277
183382
  }
183278
- ]
183279
- },
183280
- "entity_level": {
183281
- "type": "string",
183282
- "enum": [
183283
- "campaign"
183284
- ]
183285
- },
183286
- "pct": {
183287
- "minimum": 1,
183288
- "maximum": 100,
183289
- "type": "number"
183383
+ }
183290
183384
  }
183291
- }
183385
+ ]
183292
183386
  },
183293
183387
  {
183294
- "additionalProperties": false,
183388
+ "additionalProperties": true,
183389
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
183295
183390
  "type": "object",
183296
183391
  "required": [
183297
- "type",
183298
- "channel",
183299
- "message_template"
183392
+ "type"
183300
183393
  ],
183301
183394
  "properties": {
183302
183395
  "type": {
183303
- "type": "string",
183304
- "enum": [
183305
- "NOTIFY_CHANNEL"
183306
- ]
183307
- },
183308
- "channel": {
183309
- "anyOf": [
183310
- {
183311
- "type": "string",
183312
- "enum": [
183313
- "in_app"
183314
- ]
183315
- },
183316
- {
183317
- "type": "string",
183318
- "enum": [
183319
- "email"
183320
- ]
183321
- },
183322
- {
183323
- "type": "string",
183324
- "enum": [
183325
- "telegram"
183326
- ]
183327
- }
183328
- ]
183329
- },
183330
- "message_template": {
183331
- "minLength": 1,
183332
- "maxLength": 500,
183396
+ "description": "Action discriminator as stored, including legacy spellings.",
183333
183397
  "type": "string"
183398
+ },
183399
+ "params": {
183400
+ "$comment": "json-value",
183401
+ "description": "Arbitrary JSON value with nested arrays and objects."
183334
183402
  }
183335
183403
  }
183336
183404
  }
@@ -184774,336 +184842,358 @@
184774
184842
  }
184775
184843
  ]
184776
184844
  }
184777
- }
184778
- }
184779
- ]
184780
- }
184781
- },
184782
- "actions": {
184783
- "description": "Ordered list of actions applied to each matched entity.",
184784
- "type": "array",
184785
- "items": {
184786
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
184787
- "anyOf": [
184788
- {
184789
- "additionalProperties": false,
184790
- "type": "object",
184791
- "required": [
184792
- "type"
184793
- ],
184794
- "properties": {
184795
- "type": {
184796
- "description": "Pause the matched entity (campaign/adset/ad).",
184797
- "type": "string",
184798
- "enum": [
184799
- "pause"
184800
- ]
184801
- },
184802
- "params": {
184803
- "$comment": "json-value",
184804
- "description": "Arbitrary JSON value with nested arrays and objects."
184805
- }
184806
- }
184807
- },
184808
- {
184809
- "additionalProperties": false,
184810
- "type": "object",
184811
- "required": [
184812
- "type"
184813
- ],
184814
- "properties": {
184815
- "type": {
184816
- "description": "Activate the matched entity (campaign/adset/ad).",
184817
- "type": "string",
184818
- "enum": [
184819
- "activate"
184820
- ]
184821
- },
184822
- "params": {
184823
- "$comment": "json-value",
184824
- "description": "Arbitrary JSON value with nested arrays and objects."
184825
- }
184826
- }
184827
- },
184828
- {
184829
- "additionalProperties": false,
184830
- "type": "object",
184831
- "required": [
184832
- "type"
184833
- ],
184834
- "properties": {
184835
- "type": {
184836
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
184837
- "type": "string",
184838
- "enum": [
184839
- "increase_budget_pct"
184840
- ]
184841
- },
184842
- "params": {
184843
- "additionalProperties": false,
184844
- "type": "object",
184845
- "properties": {
184846
- "percentage": {
184847
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
184848
- "minimum": 1,
184849
- "maximum": 100,
184850
- "type": "number"
184851
- },
184852
- "pct": {
184853
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
184854
- "minimum": 1,
184855
- "maximum": 100,
184856
- "type": "number"
184857
- }
184858
- }
184859
- }
184860
- }
184861
- },
184862
- {
184863
- "additionalProperties": false,
184864
- "type": "object",
184865
- "required": [
184866
- "type"
184867
- ],
184868
- "properties": {
184869
- "type": {
184870
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
184871
- "type": "string",
184872
- "enum": [
184873
- "decrease_budget_pct"
184874
- ]
184875
- },
184876
- "params": {
184877
- "additionalProperties": false,
184878
- "type": "object",
184879
- "properties": {
184880
- "percentage": {
184881
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
184882
- "minimum": 1,
184883
- "maximum": 100,
184884
- "type": "number"
184885
- },
184886
- "pct": {
184887
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
184888
- "minimum": 1,
184889
- "maximum": 100,
184890
- "type": "number"
184891
- }
184892
- }
184893
- }
184894
- }
184895
- },
184896
- {
184897
- "additionalProperties": false,
184898
- "type": "object",
184899
- "required": [
184900
- "type"
184901
- ],
184902
- "properties": {
184903
- "type": {
184904
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
184905
- "type": "string",
184906
- "enum": [
184907
- "relaunch"
184908
- ]
184909
- },
184910
- "params": {
184911
- "$comment": "json-value",
184912
- "description": "Arbitrary JSON value with nested arrays and objects."
184913
- }
184914
- }
184915
- },
184916
- {
184917
- "additionalProperties": false,
184918
- "type": "object",
184919
- "required": [
184920
- "type"
184921
- ],
184922
- "properties": {
184923
- "type": {
184924
- "description": "Send a notification but do not mutate anything on Meta.",
184925
- "type": "string",
184926
- "enum": [
184927
- "notify_only"
184928
- ]
184929
- },
184930
- "params": {
184931
- "$comment": "json-value",
184932
- "description": "Arbitrary JSON value with nested arrays and objects."
184933
- }
184934
- }
184935
- },
184936
- {
184937
- "additionalProperties": false,
184938
- "type": "object",
184939
- "required": [
184940
- "type",
184941
- "platform",
184942
- "entity_level"
184943
- ],
184944
- "properties": {
184945
- "type": {
184946
- "type": "string",
184947
- "enum": [
184948
- "PAUSE_TOP_SPEND_CAMPAIGN"
184949
- ]
184845
+ }
184846
+ }
184847
+ ]
184848
+ }
184849
+ },
184850
+ "actions": {
184851
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
184852
+ "type": "array",
184853
+ "items": {
184854
+ "anyOf": [
184855
+ {
184856
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
184857
+ "anyOf": [
184858
+ {
184859
+ "additionalProperties": false,
184860
+ "type": "object",
184861
+ "required": [
184862
+ "type"
184863
+ ],
184864
+ "properties": {
184865
+ "type": {
184866
+ "description": "Pause the matched entity (campaign/adset/ad).",
184867
+ "type": "string",
184868
+ "enum": [
184869
+ "pause"
184870
+ ]
184871
+ },
184872
+ "params": {
184873
+ "$comment": "json-value",
184874
+ "description": "Arbitrary JSON value with nested arrays and objects."
184875
+ }
184876
+ }
184950
184877
  },
184951
- "platform": {
184952
- "anyOf": [
184953
- {
184878
+ {
184879
+ "additionalProperties": false,
184880
+ "type": "object",
184881
+ "required": [
184882
+ "type"
184883
+ ],
184884
+ "properties": {
184885
+ "type": {
184886
+ "description": "Activate the matched entity (campaign/adset/ad).",
184954
184887
  "type": "string",
184955
184888
  "enum": [
184956
- "META"
184889
+ "activate"
184957
184890
  ]
184958
184891
  },
184959
- {
184892
+ "params": {
184893
+ "$comment": "json-value",
184894
+ "description": "Arbitrary JSON value with nested arrays and objects."
184895
+ }
184896
+ }
184897
+ },
184898
+ {
184899
+ "additionalProperties": false,
184900
+ "type": "object",
184901
+ "required": [
184902
+ "type"
184903
+ ],
184904
+ "properties": {
184905
+ "type": {
184906
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
184960
184907
  "type": "string",
184961
184908
  "enum": [
184962
- "GOOGLE"
184909
+ "increase_budget_pct"
184963
184910
  ]
184964
184911
  },
184965
- {
184912
+ "params": {
184913
+ "additionalProperties": false,
184914
+ "type": "object",
184915
+ "properties": {
184916
+ "percentage": {
184917
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
184918
+ "minimum": 1,
184919
+ "maximum": 1000,
184920
+ "type": "number"
184921
+ },
184922
+ "pct": {
184923
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
184924
+ "minimum": 1,
184925
+ "maximum": 1000,
184926
+ "type": "number"
184927
+ }
184928
+ }
184929
+ }
184930
+ }
184931
+ },
184932
+ {
184933
+ "additionalProperties": false,
184934
+ "type": "object",
184935
+ "required": [
184936
+ "type"
184937
+ ],
184938
+ "properties": {
184939
+ "type": {
184940
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
184966
184941
  "type": "string",
184967
184942
  "enum": [
184968
- "TIKTOK"
184943
+ "decrease_budget_pct"
184969
184944
  ]
184970
184945
  },
184971
- {
184946
+ "params": {
184947
+ "additionalProperties": false,
184948
+ "type": "object",
184949
+ "properties": {
184950
+ "percentage": {
184951
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
184952
+ "minimum": 1,
184953
+ "maximum": 100,
184954
+ "type": "number"
184955
+ },
184956
+ "pct": {
184957
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
184958
+ "minimum": 1,
184959
+ "maximum": 100,
184960
+ "type": "number"
184961
+ }
184962
+ }
184963
+ }
184964
+ }
184965
+ },
184966
+ {
184967
+ "additionalProperties": false,
184968
+ "type": "object",
184969
+ "required": [
184970
+ "type"
184971
+ ],
184972
+ "properties": {
184973
+ "type": {
184974
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
184972
184975
  "type": "string",
184973
184976
  "enum": [
184974
- "TABOOLA"
184977
+ "relaunch"
184975
184978
  ]
184976
184979
  },
184977
- {
184980
+ "params": {
184981
+ "$comment": "json-value",
184982
+ "description": "Arbitrary JSON value with nested arrays and objects."
184983
+ }
184984
+ }
184985
+ },
184986
+ {
184987
+ "additionalProperties": false,
184988
+ "type": "object",
184989
+ "required": [
184990
+ "type"
184991
+ ],
184992
+ "properties": {
184993
+ "type": {
184994
+ "description": "Send a notification but do not mutate anything on Meta.",
184978
184995
  "type": "string",
184979
184996
  "enum": [
184980
- "LINKEDIN"
184997
+ "notify_only"
184981
184998
  ]
184999
+ },
185000
+ "params": {
185001
+ "$comment": "json-value",
185002
+ "description": "Arbitrary JSON value with nested arrays and objects."
184982
185003
  }
184983
- ]
185004
+ }
184984
185005
  },
184985
- "entity_level": {
184986
- "type": "string",
184987
- "enum": [
184988
- "campaign"
184989
- ]
184990
- }
184991
- }
184992
- },
184993
- {
184994
- "additionalProperties": false,
184995
- "type": "object",
184996
- "required": [
184997
- "type",
184998
- "platform",
184999
- "entity_level",
185000
- "pct"
185001
- ],
185002
- "properties": {
185003
- "type": {
185004
- "anyOf": [
185005
- {
185006
+ {
185007
+ "additionalProperties": false,
185008
+ "type": "object",
185009
+ "required": [
185010
+ "type",
185011
+ "platform",
185012
+ "entity_level"
185013
+ ],
185014
+ "properties": {
185015
+ "type": {
185006
185016
  "type": "string",
185007
185017
  "enum": [
185008
- "INCREASE_BUDGET_PCT"
185018
+ "PAUSE_TOP_SPEND_CAMPAIGN"
185009
185019
  ]
185010
185020
  },
185011
- {
185021
+ "platform": {
185022
+ "anyOf": [
185023
+ {
185024
+ "type": "string",
185025
+ "enum": [
185026
+ "META"
185027
+ ]
185028
+ },
185029
+ {
185030
+ "type": "string",
185031
+ "enum": [
185032
+ "GOOGLE"
185033
+ ]
185034
+ },
185035
+ {
185036
+ "type": "string",
185037
+ "enum": [
185038
+ "TIKTOK"
185039
+ ]
185040
+ },
185041
+ {
185042
+ "type": "string",
185043
+ "enum": [
185044
+ "TABOOLA"
185045
+ ]
185046
+ },
185047
+ {
185048
+ "type": "string",
185049
+ "enum": [
185050
+ "LINKEDIN"
185051
+ ]
185052
+ }
185053
+ ]
185054
+ },
185055
+ "entity_level": {
185012
185056
  "type": "string",
185013
185057
  "enum": [
185014
- "DECREASE_BUDGET_PCT"
185058
+ "campaign"
185015
185059
  ]
185016
185060
  }
185017
- ]
185061
+ }
185018
185062
  },
185019
- "platform": {
185020
- "anyOf": [
185021
- {
185022
- "type": "string",
185023
- "enum": [
185024
- "META"
185063
+ {
185064
+ "additionalProperties": false,
185065
+ "type": "object",
185066
+ "required": [
185067
+ "type",
185068
+ "platform",
185069
+ "entity_level",
185070
+ "pct"
185071
+ ],
185072
+ "properties": {
185073
+ "type": {
185074
+ "anyOf": [
185075
+ {
185076
+ "type": "string",
185077
+ "enum": [
185078
+ "INCREASE_BUDGET_PCT"
185079
+ ]
185080
+ },
185081
+ {
185082
+ "type": "string",
185083
+ "enum": [
185084
+ "DECREASE_BUDGET_PCT"
185085
+ ]
185086
+ }
185025
185087
  ]
185026
185088
  },
185027
- {
185089
+ "platform": {
185090
+ "anyOf": [
185091
+ {
185092
+ "type": "string",
185093
+ "enum": [
185094
+ "META"
185095
+ ]
185096
+ },
185097
+ {
185098
+ "type": "string",
185099
+ "enum": [
185100
+ "GOOGLE"
185101
+ ]
185102
+ },
185103
+ {
185104
+ "type": "string",
185105
+ "enum": [
185106
+ "TIKTOK"
185107
+ ]
185108
+ },
185109
+ {
185110
+ "type": "string",
185111
+ "enum": [
185112
+ "TABOOLA"
185113
+ ]
185114
+ },
185115
+ {
185116
+ "type": "string",
185117
+ "enum": [
185118
+ "LINKEDIN"
185119
+ ]
185120
+ }
185121
+ ]
185122
+ },
185123
+ "entity_level": {
185028
185124
  "type": "string",
185029
185125
  "enum": [
185030
- "GOOGLE"
185126
+ "campaign"
185031
185127
  ]
185032
185128
  },
185033
- {
185129
+ "pct": {
185130
+ "minimum": 1,
185131
+ "maximum": 100,
185132
+ "type": "number"
185133
+ }
185134
+ }
185135
+ },
185136
+ {
185137
+ "additionalProperties": false,
185138
+ "type": "object",
185139
+ "required": [
185140
+ "type",
185141
+ "channel",
185142
+ "message_template"
185143
+ ],
185144
+ "properties": {
185145
+ "type": {
185034
185146
  "type": "string",
185035
185147
  "enum": [
185036
- "TIKTOK"
185148
+ "NOTIFY_CHANNEL"
185037
185149
  ]
185038
185150
  },
185039
- {
185040
- "type": "string",
185041
- "enum": [
185042
- "TABOOLA"
185151
+ "channel": {
185152
+ "anyOf": [
185153
+ {
185154
+ "type": "string",
185155
+ "enum": [
185156
+ "in_app"
185157
+ ]
185158
+ },
185159
+ {
185160
+ "type": "string",
185161
+ "enum": [
185162
+ "email"
185163
+ ]
185164
+ },
185165
+ {
185166
+ "type": "string",
185167
+ "enum": [
185168
+ "telegram"
185169
+ ]
185170
+ }
185043
185171
  ]
185044
185172
  },
185045
- {
185046
- "type": "string",
185047
- "enum": [
185048
- "LINKEDIN"
185049
- ]
185173
+ "message_template": {
185174
+ "minLength": 1,
185175
+ "maxLength": 500,
185176
+ "type": "string"
185050
185177
  }
185051
- ]
185052
- },
185053
- "entity_level": {
185054
- "type": "string",
185055
- "enum": [
185056
- "campaign"
185057
- ]
185058
- },
185059
- "pct": {
185060
- "minimum": 1,
185061
- "maximum": 100,
185062
- "type": "number"
185178
+ }
185063
185179
  }
185064
- }
185180
+ ]
185065
185181
  },
185066
185182
  {
185067
- "additionalProperties": false,
185183
+ "additionalProperties": true,
185184
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
185068
185185
  "type": "object",
185069
185186
  "required": [
185070
- "type",
185071
- "channel",
185072
- "message_template"
185187
+ "type"
185073
185188
  ],
185074
185189
  "properties": {
185075
185190
  "type": {
185076
- "type": "string",
185077
- "enum": [
185078
- "NOTIFY_CHANNEL"
185079
- ]
185080
- },
185081
- "channel": {
185082
- "anyOf": [
185083
- {
185084
- "type": "string",
185085
- "enum": [
185086
- "in_app"
185087
- ]
185088
- },
185089
- {
185090
- "type": "string",
185091
- "enum": [
185092
- "email"
185093
- ]
185094
- },
185095
- {
185096
- "type": "string",
185097
- "enum": [
185098
- "telegram"
185099
- ]
185100
- }
185101
- ]
185102
- },
185103
- "message_template": {
185104
- "minLength": 1,
185105
- "maxLength": 500,
185191
+ "description": "Action discriminator as stored, including legacy spellings.",
185106
185192
  "type": "string"
185193
+ },
185194
+ "params": {
185195
+ "$comment": "json-value",
185196
+ "description": "Arbitrary JSON value with nested arrays and objects."
185107
185197
  }
185108
185198
  }
185109
185199
  }
@@ -186337,15 +186427,15 @@
186337
186427
  "type": "object",
186338
186428
  "properties": {
186339
186429
  "percentage": {
186340
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
186430
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
186341
186431
  "minimum": 1,
186342
- "maximum": 100,
186432
+ "maximum": 1000,
186343
186433
  "type": "number"
186344
186434
  },
186345
186435
  "pct": {
186346
186436
  "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
186347
186437
  "minimum": 1,
186348
- "maximum": 100,
186438
+ "maximum": 1000,
186349
186439
  "type": "number"
186350
186440
  }
186351
186441
  }
@@ -187588,330 +187678,352 @@
187588
187678
  }
187589
187679
  },
187590
187680
  "actions": {
187591
- "description": "Ordered list of actions applied to each matched entity.",
187681
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
187592
187682
  "type": "array",
187593
187683
  "items": {
187594
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
187595
187684
  "anyOf": [
187596
187685
  {
187597
- "additionalProperties": false,
187598
- "type": "object",
187599
- "required": [
187600
- "type"
187601
- ],
187602
- "properties": {
187603
- "type": {
187604
- "description": "Pause the matched entity (campaign/adset/ad).",
187605
- "type": "string",
187606
- "enum": [
187607
- "pause"
187608
- ]
187609
- },
187610
- "params": {
187611
- "$comment": "json-value",
187612
- "description": "Arbitrary JSON value with nested arrays and objects."
187613
- }
187614
- }
187615
- },
187616
- {
187617
- "additionalProperties": false,
187618
- "type": "object",
187619
- "required": [
187620
- "type"
187621
- ],
187622
- "properties": {
187623
- "type": {
187624
- "description": "Activate the matched entity (campaign/adset/ad).",
187625
- "type": "string",
187626
- "enum": [
187627
- "activate"
187628
- ]
187629
- },
187630
- "params": {
187631
- "$comment": "json-value",
187632
- "description": "Arbitrary JSON value with nested arrays and objects."
187633
- }
187634
- }
187635
- },
187636
- {
187637
- "additionalProperties": false,
187638
- "type": "object",
187639
- "required": [
187640
- "type"
187641
- ],
187642
- "properties": {
187643
- "type": {
187644
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
187645
- "type": "string",
187646
- "enum": [
187647
- "increase_budget_pct"
187648
- ]
187649
- },
187650
- "params": {
187686
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
187687
+ "anyOf": [
187688
+ {
187651
187689
  "additionalProperties": false,
187652
187690
  "type": "object",
187691
+ "required": [
187692
+ "type"
187693
+ ],
187653
187694
  "properties": {
187654
- "percentage": {
187655
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
187656
- "minimum": 1,
187657
- "maximum": 100,
187658
- "type": "number"
187695
+ "type": {
187696
+ "description": "Pause the matched entity (campaign/adset/ad).",
187697
+ "type": "string",
187698
+ "enum": [
187699
+ "pause"
187700
+ ]
187659
187701
  },
187660
- "pct": {
187661
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
187662
- "minimum": 1,
187663
- "maximum": 100,
187664
- "type": "number"
187702
+ "params": {
187703
+ "$comment": "json-value",
187704
+ "description": "Arbitrary JSON value with nested arrays and objects."
187665
187705
  }
187666
187706
  }
187667
- }
187668
- }
187669
- },
187670
- {
187671
- "additionalProperties": false,
187672
- "type": "object",
187673
- "required": [
187674
- "type"
187675
- ],
187676
- "properties": {
187677
- "type": {
187678
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
187679
- "type": "string",
187680
- "enum": [
187681
- "decrease_budget_pct"
187682
- ]
187683
187707
  },
187684
- "params": {
187708
+ {
187685
187709
  "additionalProperties": false,
187686
187710
  "type": "object",
187711
+ "required": [
187712
+ "type"
187713
+ ],
187687
187714
  "properties": {
187688
- "percentage": {
187689
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
187690
- "minimum": 1,
187691
- "maximum": 100,
187692
- "type": "number"
187715
+ "type": {
187716
+ "description": "Activate the matched entity (campaign/adset/ad).",
187717
+ "type": "string",
187718
+ "enum": [
187719
+ "activate"
187720
+ ]
187693
187721
  },
187694
- "pct": {
187695
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
187696
- "minimum": 1,
187697
- "maximum": 100,
187698
- "type": "number"
187722
+ "params": {
187723
+ "$comment": "json-value",
187724
+ "description": "Arbitrary JSON value with nested arrays and objects."
187699
187725
  }
187700
187726
  }
187701
- }
187702
- }
187703
- },
187704
- {
187705
- "additionalProperties": false,
187706
- "type": "object",
187707
- "required": [
187708
- "type"
187709
- ],
187710
- "properties": {
187711
- "type": {
187712
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
187713
- "type": "string",
187714
- "enum": [
187715
- "relaunch"
187716
- ]
187717
- },
187718
- "params": {
187719
- "$comment": "json-value",
187720
- "description": "Arbitrary JSON value with nested arrays and objects."
187721
- }
187722
- }
187723
- },
187724
- {
187725
- "additionalProperties": false,
187726
- "type": "object",
187727
- "required": [
187728
- "type"
187729
- ],
187730
- "properties": {
187731
- "type": {
187732
- "description": "Send a notification but do not mutate anything on Meta.",
187733
- "type": "string",
187734
- "enum": [
187735
- "notify_only"
187736
- ]
187737
- },
187738
- "params": {
187739
- "$comment": "json-value",
187740
- "description": "Arbitrary JSON value with nested arrays and objects."
187741
- }
187742
- }
187743
- },
187744
- {
187745
- "additionalProperties": false,
187746
- "type": "object",
187747
- "required": [
187748
- "type",
187749
- "platform",
187750
- "entity_level"
187751
- ],
187752
- "properties": {
187753
- "type": {
187754
- "type": "string",
187755
- "enum": [
187756
- "PAUSE_TOP_SPEND_CAMPAIGN"
187757
- ]
187758
187727
  },
187759
- "platform": {
187760
- "anyOf": [
187761
- {
187728
+ {
187729
+ "additionalProperties": false,
187730
+ "type": "object",
187731
+ "required": [
187732
+ "type"
187733
+ ],
187734
+ "properties": {
187735
+ "type": {
187736
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
187762
187737
  "type": "string",
187763
187738
  "enum": [
187764
- "META"
187739
+ "increase_budget_pct"
187765
187740
  ]
187766
187741
  },
187767
- {
187742
+ "params": {
187743
+ "additionalProperties": false,
187744
+ "type": "object",
187745
+ "properties": {
187746
+ "percentage": {
187747
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
187748
+ "minimum": 1,
187749
+ "maximum": 1000,
187750
+ "type": "number"
187751
+ },
187752
+ "pct": {
187753
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
187754
+ "minimum": 1,
187755
+ "maximum": 1000,
187756
+ "type": "number"
187757
+ }
187758
+ }
187759
+ }
187760
+ }
187761
+ },
187762
+ {
187763
+ "additionalProperties": false,
187764
+ "type": "object",
187765
+ "required": [
187766
+ "type"
187767
+ ],
187768
+ "properties": {
187769
+ "type": {
187770
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
187768
187771
  "type": "string",
187769
187772
  "enum": [
187770
- "GOOGLE"
187773
+ "decrease_budget_pct"
187771
187774
  ]
187772
187775
  },
187773
- {
187776
+ "params": {
187777
+ "additionalProperties": false,
187778
+ "type": "object",
187779
+ "properties": {
187780
+ "percentage": {
187781
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
187782
+ "minimum": 1,
187783
+ "maximum": 100,
187784
+ "type": "number"
187785
+ },
187786
+ "pct": {
187787
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
187788
+ "minimum": 1,
187789
+ "maximum": 100,
187790
+ "type": "number"
187791
+ }
187792
+ }
187793
+ }
187794
+ }
187795
+ },
187796
+ {
187797
+ "additionalProperties": false,
187798
+ "type": "object",
187799
+ "required": [
187800
+ "type"
187801
+ ],
187802
+ "properties": {
187803
+ "type": {
187804
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
187774
187805
  "type": "string",
187775
187806
  "enum": [
187776
- "TIKTOK"
187807
+ "relaunch"
187777
187808
  ]
187778
187809
  },
187779
- {
187810
+ "params": {
187811
+ "$comment": "json-value",
187812
+ "description": "Arbitrary JSON value with nested arrays and objects."
187813
+ }
187814
+ }
187815
+ },
187816
+ {
187817
+ "additionalProperties": false,
187818
+ "type": "object",
187819
+ "required": [
187820
+ "type"
187821
+ ],
187822
+ "properties": {
187823
+ "type": {
187824
+ "description": "Send a notification but do not mutate anything on Meta.",
187780
187825
  "type": "string",
187781
187826
  "enum": [
187782
- "TABOOLA"
187827
+ "notify_only"
187783
187828
  ]
187784
187829
  },
187785
- {
187786
- "type": "string",
187787
- "enum": [
187788
- "LINKEDIN"
187789
- ]
187830
+ "params": {
187831
+ "$comment": "json-value",
187832
+ "description": "Arbitrary JSON value with nested arrays and objects."
187790
187833
  }
187791
- ]
187834
+ }
187792
187835
  },
187793
- "entity_level": {
187794
- "type": "string",
187795
- "enum": [
187796
- "campaign"
187797
- ]
187798
- }
187799
- }
187800
- },
187801
- {
187802
- "additionalProperties": false,
187803
- "type": "object",
187804
- "required": [
187805
- "type",
187806
- "platform",
187807
- "entity_level",
187808
- "pct"
187809
- ],
187810
- "properties": {
187811
- "type": {
187812
- "anyOf": [
187813
- {
187836
+ {
187837
+ "additionalProperties": false,
187838
+ "type": "object",
187839
+ "required": [
187840
+ "type",
187841
+ "platform",
187842
+ "entity_level"
187843
+ ],
187844
+ "properties": {
187845
+ "type": {
187814
187846
  "type": "string",
187815
187847
  "enum": [
187816
- "INCREASE_BUDGET_PCT"
187848
+ "PAUSE_TOP_SPEND_CAMPAIGN"
187817
187849
  ]
187818
187850
  },
187819
- {
187851
+ "platform": {
187852
+ "anyOf": [
187853
+ {
187854
+ "type": "string",
187855
+ "enum": [
187856
+ "META"
187857
+ ]
187858
+ },
187859
+ {
187860
+ "type": "string",
187861
+ "enum": [
187862
+ "GOOGLE"
187863
+ ]
187864
+ },
187865
+ {
187866
+ "type": "string",
187867
+ "enum": [
187868
+ "TIKTOK"
187869
+ ]
187870
+ },
187871
+ {
187872
+ "type": "string",
187873
+ "enum": [
187874
+ "TABOOLA"
187875
+ ]
187876
+ },
187877
+ {
187878
+ "type": "string",
187879
+ "enum": [
187880
+ "LINKEDIN"
187881
+ ]
187882
+ }
187883
+ ]
187884
+ },
187885
+ "entity_level": {
187820
187886
  "type": "string",
187821
187887
  "enum": [
187822
- "DECREASE_BUDGET_PCT"
187888
+ "campaign"
187823
187889
  ]
187824
187890
  }
187825
- ]
187891
+ }
187826
187892
  },
187827
- "platform": {
187828
- "anyOf": [
187829
- {
187830
- "type": "string",
187831
- "enum": [
187832
- "META"
187893
+ {
187894
+ "additionalProperties": false,
187895
+ "type": "object",
187896
+ "required": [
187897
+ "type",
187898
+ "platform",
187899
+ "entity_level",
187900
+ "pct"
187901
+ ],
187902
+ "properties": {
187903
+ "type": {
187904
+ "anyOf": [
187905
+ {
187906
+ "type": "string",
187907
+ "enum": [
187908
+ "INCREASE_BUDGET_PCT"
187909
+ ]
187910
+ },
187911
+ {
187912
+ "type": "string",
187913
+ "enum": [
187914
+ "DECREASE_BUDGET_PCT"
187915
+ ]
187916
+ }
187833
187917
  ]
187834
187918
  },
187835
- {
187836
- "type": "string",
187837
- "enum": [
187838
- "GOOGLE"
187919
+ "platform": {
187920
+ "anyOf": [
187921
+ {
187922
+ "type": "string",
187923
+ "enum": [
187924
+ "META"
187925
+ ]
187926
+ },
187927
+ {
187928
+ "type": "string",
187929
+ "enum": [
187930
+ "GOOGLE"
187931
+ ]
187932
+ },
187933
+ {
187934
+ "type": "string",
187935
+ "enum": [
187936
+ "TIKTOK"
187937
+ ]
187938
+ },
187939
+ {
187940
+ "type": "string",
187941
+ "enum": [
187942
+ "TABOOLA"
187943
+ ]
187944
+ },
187945
+ {
187946
+ "type": "string",
187947
+ "enum": [
187948
+ "LINKEDIN"
187949
+ ]
187950
+ }
187839
187951
  ]
187840
187952
  },
187841
- {
187953
+ "entity_level": {
187842
187954
  "type": "string",
187843
187955
  "enum": [
187844
- "TIKTOK"
187956
+ "campaign"
187845
187957
  ]
187846
187958
  },
187847
- {
187959
+ "pct": {
187960
+ "minimum": 1,
187961
+ "maximum": 100,
187962
+ "type": "number"
187963
+ }
187964
+ }
187965
+ },
187966
+ {
187967
+ "additionalProperties": false,
187968
+ "type": "object",
187969
+ "required": [
187970
+ "type",
187971
+ "channel",
187972
+ "message_template"
187973
+ ],
187974
+ "properties": {
187975
+ "type": {
187848
187976
  "type": "string",
187849
187977
  "enum": [
187850
- "TABOOLA"
187978
+ "NOTIFY_CHANNEL"
187979
+ ]
187980
+ },
187981
+ "channel": {
187982
+ "anyOf": [
187983
+ {
187984
+ "type": "string",
187985
+ "enum": [
187986
+ "in_app"
187987
+ ]
187988
+ },
187989
+ {
187990
+ "type": "string",
187991
+ "enum": [
187992
+ "email"
187993
+ ]
187994
+ },
187995
+ {
187996
+ "type": "string",
187997
+ "enum": [
187998
+ "telegram"
187999
+ ]
188000
+ }
187851
188001
  ]
187852
188002
  },
187853
- {
187854
- "type": "string",
187855
- "enum": [
187856
- "LINKEDIN"
187857
- ]
188003
+ "message_template": {
188004
+ "minLength": 1,
188005
+ "maxLength": 500,
188006
+ "type": "string"
187858
188007
  }
187859
- ]
187860
- },
187861
- "entity_level": {
187862
- "type": "string",
187863
- "enum": [
187864
- "campaign"
187865
- ]
187866
- },
187867
- "pct": {
187868
- "minimum": 1,
187869
- "maximum": 100,
187870
- "type": "number"
188008
+ }
187871
188009
  }
187872
- }
188010
+ ]
187873
188011
  },
187874
188012
  {
187875
- "additionalProperties": false,
188013
+ "additionalProperties": true,
188014
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
187876
188015
  "type": "object",
187877
188016
  "required": [
187878
- "type",
187879
- "channel",
187880
- "message_template"
188017
+ "type"
187881
188018
  ],
187882
188019
  "properties": {
187883
188020
  "type": {
187884
- "type": "string",
187885
- "enum": [
187886
- "NOTIFY_CHANNEL"
187887
- ]
187888
- },
187889
- "channel": {
187890
- "anyOf": [
187891
- {
187892
- "type": "string",
187893
- "enum": [
187894
- "in_app"
187895
- ]
187896
- },
187897
- {
187898
- "type": "string",
187899
- "enum": [
187900
- "email"
187901
- ]
187902
- },
187903
- {
187904
- "type": "string",
187905
- "enum": [
187906
- "telegram"
187907
- ]
187908
- }
187909
- ]
187910
- },
187911
- "message_template": {
187912
- "minLength": 1,
187913
- "maxLength": 500,
188021
+ "description": "Action discriminator as stored, including legacy spellings.",
187914
188022
  "type": "string"
188023
+ },
188024
+ "params": {
188025
+ "$comment": "json-value",
188026
+ "description": "Arbitrary JSON value with nested arrays and objects."
187915
188027
  }
187916
188028
  }
187917
188029
  }
@@ -189374,330 +189486,352 @@
189374
189486
  }
189375
189487
  },
189376
189488
  "actions": {
189377
- "description": "Ordered list of actions applied to each matched entity.",
189489
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
189378
189490
  "type": "array",
189379
189491
  "items": {
189380
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
189381
189492
  "anyOf": [
189382
189493
  {
189383
- "additionalProperties": false,
189384
- "type": "object",
189385
- "required": [
189386
- "type"
189387
- ],
189388
- "properties": {
189389
- "type": {
189390
- "description": "Pause the matched entity (campaign/adset/ad).",
189391
- "type": "string",
189392
- "enum": [
189393
- "pause"
189394
- ]
189395
- },
189396
- "params": {
189397
- "$comment": "json-value",
189398
- "description": "Arbitrary JSON value with nested arrays and objects."
189399
- }
189400
- }
189401
- },
189402
- {
189403
- "additionalProperties": false,
189404
- "type": "object",
189405
- "required": [
189406
- "type"
189407
- ],
189408
- "properties": {
189409
- "type": {
189410
- "description": "Activate the matched entity (campaign/adset/ad).",
189411
- "type": "string",
189412
- "enum": [
189413
- "activate"
189414
- ]
189415
- },
189416
- "params": {
189417
- "$comment": "json-value",
189418
- "description": "Arbitrary JSON value with nested arrays and objects."
189419
- }
189420
- }
189421
- },
189422
- {
189423
- "additionalProperties": false,
189424
- "type": "object",
189425
- "required": [
189426
- "type"
189427
- ],
189428
- "properties": {
189429
- "type": {
189430
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
189431
- "type": "string",
189432
- "enum": [
189433
- "increase_budget_pct"
189434
- ]
189435
- },
189436
- "params": {
189494
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
189495
+ "anyOf": [
189496
+ {
189437
189497
  "additionalProperties": false,
189438
189498
  "type": "object",
189499
+ "required": [
189500
+ "type"
189501
+ ],
189439
189502
  "properties": {
189440
- "percentage": {
189441
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
189442
- "minimum": 1,
189443
- "maximum": 100,
189444
- "type": "number"
189503
+ "type": {
189504
+ "description": "Pause the matched entity (campaign/adset/ad).",
189505
+ "type": "string",
189506
+ "enum": [
189507
+ "pause"
189508
+ ]
189445
189509
  },
189446
- "pct": {
189447
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
189448
- "minimum": 1,
189449
- "maximum": 100,
189450
- "type": "number"
189510
+ "params": {
189511
+ "$comment": "json-value",
189512
+ "description": "Arbitrary JSON value with nested arrays and objects."
189451
189513
  }
189452
189514
  }
189453
- }
189454
- }
189455
- },
189456
- {
189457
- "additionalProperties": false,
189458
- "type": "object",
189459
- "required": [
189460
- "type"
189461
- ],
189462
- "properties": {
189463
- "type": {
189464
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
189465
- "type": "string",
189466
- "enum": [
189467
- "decrease_budget_pct"
189468
- ]
189469
189515
  },
189470
- "params": {
189516
+ {
189471
189517
  "additionalProperties": false,
189472
189518
  "type": "object",
189519
+ "required": [
189520
+ "type"
189521
+ ],
189473
189522
  "properties": {
189474
- "percentage": {
189475
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
189476
- "minimum": 1,
189477
- "maximum": 100,
189478
- "type": "number"
189523
+ "type": {
189524
+ "description": "Activate the matched entity (campaign/adset/ad).",
189525
+ "type": "string",
189526
+ "enum": [
189527
+ "activate"
189528
+ ]
189479
189529
  },
189480
- "pct": {
189481
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
189482
- "minimum": 1,
189483
- "maximum": 100,
189484
- "type": "number"
189530
+ "params": {
189531
+ "$comment": "json-value",
189532
+ "description": "Arbitrary JSON value with nested arrays and objects."
189485
189533
  }
189486
189534
  }
189487
- }
189488
- }
189489
- },
189490
- {
189491
- "additionalProperties": false,
189492
- "type": "object",
189493
- "required": [
189494
- "type"
189495
- ],
189496
- "properties": {
189497
- "type": {
189498
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
189499
- "type": "string",
189500
- "enum": [
189501
- "relaunch"
189502
- ]
189503
- },
189504
- "params": {
189505
- "$comment": "json-value",
189506
- "description": "Arbitrary JSON value with nested arrays and objects."
189507
- }
189508
- }
189509
- },
189510
- {
189511
- "additionalProperties": false,
189512
- "type": "object",
189513
- "required": [
189514
- "type"
189515
- ],
189516
- "properties": {
189517
- "type": {
189518
- "description": "Send a notification but do not mutate anything on Meta.",
189519
- "type": "string",
189520
- "enum": [
189521
- "notify_only"
189522
- ]
189523
- },
189524
- "params": {
189525
- "$comment": "json-value",
189526
- "description": "Arbitrary JSON value with nested arrays and objects."
189527
- }
189528
- }
189529
- },
189530
- {
189531
- "additionalProperties": false,
189532
- "type": "object",
189533
- "required": [
189534
- "type",
189535
- "platform",
189536
- "entity_level"
189537
- ],
189538
- "properties": {
189539
- "type": {
189540
- "type": "string",
189541
- "enum": [
189542
- "PAUSE_TOP_SPEND_CAMPAIGN"
189543
- ]
189544
189535
  },
189545
- "platform": {
189546
- "anyOf": [
189547
- {
189536
+ {
189537
+ "additionalProperties": false,
189538
+ "type": "object",
189539
+ "required": [
189540
+ "type"
189541
+ ],
189542
+ "properties": {
189543
+ "type": {
189544
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
189548
189545
  "type": "string",
189549
189546
  "enum": [
189550
- "META"
189547
+ "increase_budget_pct"
189551
189548
  ]
189552
189549
  },
189553
- {
189550
+ "params": {
189551
+ "additionalProperties": false,
189552
+ "type": "object",
189553
+ "properties": {
189554
+ "percentage": {
189555
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
189556
+ "minimum": 1,
189557
+ "maximum": 1000,
189558
+ "type": "number"
189559
+ },
189560
+ "pct": {
189561
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
189562
+ "minimum": 1,
189563
+ "maximum": 1000,
189564
+ "type": "number"
189565
+ }
189566
+ }
189567
+ }
189568
+ }
189569
+ },
189570
+ {
189571
+ "additionalProperties": false,
189572
+ "type": "object",
189573
+ "required": [
189574
+ "type"
189575
+ ],
189576
+ "properties": {
189577
+ "type": {
189578
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
189554
189579
  "type": "string",
189555
189580
  "enum": [
189556
- "GOOGLE"
189581
+ "decrease_budget_pct"
189557
189582
  ]
189558
189583
  },
189559
- {
189584
+ "params": {
189585
+ "additionalProperties": false,
189586
+ "type": "object",
189587
+ "properties": {
189588
+ "percentage": {
189589
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
189590
+ "minimum": 1,
189591
+ "maximum": 100,
189592
+ "type": "number"
189593
+ },
189594
+ "pct": {
189595
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
189596
+ "minimum": 1,
189597
+ "maximum": 100,
189598
+ "type": "number"
189599
+ }
189600
+ }
189601
+ }
189602
+ }
189603
+ },
189604
+ {
189605
+ "additionalProperties": false,
189606
+ "type": "object",
189607
+ "required": [
189608
+ "type"
189609
+ ],
189610
+ "properties": {
189611
+ "type": {
189612
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
189560
189613
  "type": "string",
189561
189614
  "enum": [
189562
- "TIKTOK"
189615
+ "relaunch"
189563
189616
  ]
189564
189617
  },
189565
- {
189618
+ "params": {
189619
+ "$comment": "json-value",
189620
+ "description": "Arbitrary JSON value with nested arrays and objects."
189621
+ }
189622
+ }
189623
+ },
189624
+ {
189625
+ "additionalProperties": false,
189626
+ "type": "object",
189627
+ "required": [
189628
+ "type"
189629
+ ],
189630
+ "properties": {
189631
+ "type": {
189632
+ "description": "Send a notification but do not mutate anything on Meta.",
189566
189633
  "type": "string",
189567
189634
  "enum": [
189568
- "TABOOLA"
189635
+ "notify_only"
189569
189636
  ]
189570
189637
  },
189571
- {
189572
- "type": "string",
189573
- "enum": [
189574
- "LINKEDIN"
189575
- ]
189638
+ "params": {
189639
+ "$comment": "json-value",
189640
+ "description": "Arbitrary JSON value with nested arrays and objects."
189576
189641
  }
189577
- ]
189642
+ }
189578
189643
  },
189579
- "entity_level": {
189580
- "type": "string",
189581
- "enum": [
189582
- "campaign"
189583
- ]
189584
- }
189585
- }
189586
- },
189587
- {
189588
- "additionalProperties": false,
189589
- "type": "object",
189590
- "required": [
189591
- "type",
189592
- "platform",
189593
- "entity_level",
189594
- "pct"
189595
- ],
189596
- "properties": {
189597
- "type": {
189598
- "anyOf": [
189599
- {
189644
+ {
189645
+ "additionalProperties": false,
189646
+ "type": "object",
189647
+ "required": [
189648
+ "type",
189649
+ "platform",
189650
+ "entity_level"
189651
+ ],
189652
+ "properties": {
189653
+ "type": {
189600
189654
  "type": "string",
189601
189655
  "enum": [
189602
- "INCREASE_BUDGET_PCT"
189656
+ "PAUSE_TOP_SPEND_CAMPAIGN"
189603
189657
  ]
189604
189658
  },
189605
- {
189659
+ "platform": {
189660
+ "anyOf": [
189661
+ {
189662
+ "type": "string",
189663
+ "enum": [
189664
+ "META"
189665
+ ]
189666
+ },
189667
+ {
189668
+ "type": "string",
189669
+ "enum": [
189670
+ "GOOGLE"
189671
+ ]
189672
+ },
189673
+ {
189674
+ "type": "string",
189675
+ "enum": [
189676
+ "TIKTOK"
189677
+ ]
189678
+ },
189679
+ {
189680
+ "type": "string",
189681
+ "enum": [
189682
+ "TABOOLA"
189683
+ ]
189684
+ },
189685
+ {
189686
+ "type": "string",
189687
+ "enum": [
189688
+ "LINKEDIN"
189689
+ ]
189690
+ }
189691
+ ]
189692
+ },
189693
+ "entity_level": {
189606
189694
  "type": "string",
189607
189695
  "enum": [
189608
- "DECREASE_BUDGET_PCT"
189696
+ "campaign"
189609
189697
  ]
189610
189698
  }
189611
- ]
189699
+ }
189612
189700
  },
189613
- "platform": {
189614
- "anyOf": [
189615
- {
189616
- "type": "string",
189617
- "enum": [
189618
- "META"
189701
+ {
189702
+ "additionalProperties": false,
189703
+ "type": "object",
189704
+ "required": [
189705
+ "type",
189706
+ "platform",
189707
+ "entity_level",
189708
+ "pct"
189709
+ ],
189710
+ "properties": {
189711
+ "type": {
189712
+ "anyOf": [
189713
+ {
189714
+ "type": "string",
189715
+ "enum": [
189716
+ "INCREASE_BUDGET_PCT"
189717
+ ]
189718
+ },
189719
+ {
189720
+ "type": "string",
189721
+ "enum": [
189722
+ "DECREASE_BUDGET_PCT"
189723
+ ]
189724
+ }
189619
189725
  ]
189620
189726
  },
189621
- {
189622
- "type": "string",
189623
- "enum": [
189624
- "GOOGLE"
189727
+ "platform": {
189728
+ "anyOf": [
189729
+ {
189730
+ "type": "string",
189731
+ "enum": [
189732
+ "META"
189733
+ ]
189734
+ },
189735
+ {
189736
+ "type": "string",
189737
+ "enum": [
189738
+ "GOOGLE"
189739
+ ]
189740
+ },
189741
+ {
189742
+ "type": "string",
189743
+ "enum": [
189744
+ "TIKTOK"
189745
+ ]
189746
+ },
189747
+ {
189748
+ "type": "string",
189749
+ "enum": [
189750
+ "TABOOLA"
189751
+ ]
189752
+ },
189753
+ {
189754
+ "type": "string",
189755
+ "enum": [
189756
+ "LINKEDIN"
189757
+ ]
189758
+ }
189625
189759
  ]
189626
189760
  },
189627
- {
189761
+ "entity_level": {
189628
189762
  "type": "string",
189629
189763
  "enum": [
189630
- "TIKTOK"
189764
+ "campaign"
189631
189765
  ]
189632
189766
  },
189633
- {
189767
+ "pct": {
189768
+ "minimum": 1,
189769
+ "maximum": 100,
189770
+ "type": "number"
189771
+ }
189772
+ }
189773
+ },
189774
+ {
189775
+ "additionalProperties": false,
189776
+ "type": "object",
189777
+ "required": [
189778
+ "type",
189779
+ "channel",
189780
+ "message_template"
189781
+ ],
189782
+ "properties": {
189783
+ "type": {
189634
189784
  "type": "string",
189635
189785
  "enum": [
189636
- "TABOOLA"
189786
+ "NOTIFY_CHANNEL"
189637
189787
  ]
189638
189788
  },
189639
- {
189640
- "type": "string",
189641
- "enum": [
189642
- "LINKEDIN"
189789
+ "channel": {
189790
+ "anyOf": [
189791
+ {
189792
+ "type": "string",
189793
+ "enum": [
189794
+ "in_app"
189795
+ ]
189796
+ },
189797
+ {
189798
+ "type": "string",
189799
+ "enum": [
189800
+ "email"
189801
+ ]
189802
+ },
189803
+ {
189804
+ "type": "string",
189805
+ "enum": [
189806
+ "telegram"
189807
+ ]
189808
+ }
189643
189809
  ]
189810
+ },
189811
+ "message_template": {
189812
+ "minLength": 1,
189813
+ "maxLength": 500,
189814
+ "type": "string"
189644
189815
  }
189645
- ]
189646
- },
189647
- "entity_level": {
189648
- "type": "string",
189649
- "enum": [
189650
- "campaign"
189651
- ]
189652
- },
189653
- "pct": {
189654
- "minimum": 1,
189655
- "maximum": 100,
189656
- "type": "number"
189816
+ }
189657
189817
  }
189658
- }
189818
+ ]
189659
189819
  },
189660
189820
  {
189661
- "additionalProperties": false,
189821
+ "additionalProperties": true,
189822
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
189662
189823
  "type": "object",
189663
189824
  "required": [
189664
- "type",
189665
- "channel",
189666
- "message_template"
189825
+ "type"
189667
189826
  ],
189668
189827
  "properties": {
189669
189828
  "type": {
189670
- "type": "string",
189671
- "enum": [
189672
- "NOTIFY_CHANNEL"
189673
- ]
189674
- },
189675
- "channel": {
189676
- "anyOf": [
189677
- {
189678
- "type": "string",
189679
- "enum": [
189680
- "in_app"
189681
- ]
189682
- },
189683
- {
189684
- "type": "string",
189685
- "enum": [
189686
- "email"
189687
- ]
189688
- },
189689
- {
189690
- "type": "string",
189691
- "enum": [
189692
- "telegram"
189693
- ]
189694
- }
189695
- ]
189696
- },
189697
- "message_template": {
189698
- "minLength": 1,
189699
- "maxLength": 500,
189829
+ "description": "Action discriminator as stored, including legacy spellings.",
189700
189830
  "type": "string"
189831
+ },
189832
+ "params": {
189833
+ "$comment": "json-value",
189834
+ "description": "Arbitrary JSON value with nested arrays and objects."
189701
189835
  }
189702
189836
  }
189703
189837
  }
@@ -190945,330 +191079,352 @@
190945
191079
  }
190946
191080
  },
190947
191081
  "actions": {
190948
- "description": "Ordered list of actions applied to each matched entity.",
191082
+ "description": "Ordered list of actions as stored, tolerant of rules written before the current schema.",
190949
191083
  "type": "array",
190950
191084
  "items": {
190951
- "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
190952
191085
  "anyOf": [
190953
191086
  {
190954
- "additionalProperties": false,
190955
- "type": "object",
190956
- "required": [
190957
- "type"
190958
- ],
190959
- "properties": {
190960
- "type": {
190961
- "description": "Pause the matched entity (campaign/adset/ad).",
190962
- "type": "string",
190963
- "enum": [
190964
- "pause"
190965
- ]
190966
- },
190967
- "params": {
190968
- "$comment": "json-value",
190969
- "description": "Arbitrary JSON value with nested arrays and objects."
190970
- }
190971
- }
190972
- },
190973
- {
190974
- "additionalProperties": false,
190975
- "type": "object",
190976
- "required": [
190977
- "type"
190978
- ],
190979
- "properties": {
190980
- "type": {
190981
- "description": "Activate the matched entity (campaign/adset/ad).",
190982
- "type": "string",
190983
- "enum": [
190984
- "activate"
190985
- ]
190986
- },
190987
- "params": {
190988
- "$comment": "json-value",
190989
- "description": "Arbitrary JSON value with nested arrays and objects."
190990
- }
190991
- }
190992
- },
190993
- {
190994
- "additionalProperties": false,
190995
- "type": "object",
190996
- "required": [
190997
- "type"
190998
- ],
190999
- "properties": {
191000
- "type": {
191001
- "description": "Increase campaign/adset budget by `params.percentage` percent.",
191002
- "type": "string",
191003
- "enum": [
191004
- "increase_budget_pct"
191005
- ]
191006
- },
191007
- "params": {
191087
+ "description": "Automation rule action. Discriminated on `type`. See RuleActionType in src/sqs/types/messages.ts.",
191088
+ "anyOf": [
191089
+ {
191008
191090
  "additionalProperties": false,
191009
191091
  "type": "object",
191092
+ "required": [
191093
+ "type"
191094
+ ],
191010
191095
  "properties": {
191011
- "percentage": {
191012
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
191013
- "minimum": 1,
191014
- "maximum": 100,
191015
- "type": "number"
191096
+ "type": {
191097
+ "description": "Pause the matched entity (campaign/adset/ad).",
191098
+ "type": "string",
191099
+ "enum": [
191100
+ "pause"
191101
+ ]
191016
191102
  },
191017
- "pct": {
191018
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
191019
- "minimum": 1,
191020
- "maximum": 100,
191021
- "type": "number"
191103
+ "params": {
191104
+ "$comment": "json-value",
191105
+ "description": "Arbitrary JSON value with nested arrays and objects."
191022
191106
  }
191023
191107
  }
191024
- }
191025
- }
191026
- },
191027
- {
191028
- "additionalProperties": false,
191029
- "type": "object",
191030
- "required": [
191031
- "type"
191032
- ],
191033
- "properties": {
191034
- "type": {
191035
- "description": "Decrease campaign/adset budget by `params.percentage` percent.",
191036
- "type": "string",
191037
- "enum": [
191038
- "decrease_budget_pct"
191039
- ]
191040
191108
  },
191041
- "params": {
191109
+ {
191042
191110
  "additionalProperties": false,
191043
191111
  "type": "object",
191112
+ "required": [
191113
+ "type"
191114
+ ],
191044
191115
  "properties": {
191045
- "percentage": {
191046
- "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
191047
- "minimum": 1,
191048
- "maximum": 100,
191049
- "type": "number"
191116
+ "type": {
191117
+ "description": "Activate the matched entity (campaign/adset/ad).",
191118
+ "type": "string",
191119
+ "enum": [
191120
+ "activate"
191121
+ ]
191050
191122
  },
191051
- "pct": {
191052
- "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
191053
- "minimum": 1,
191054
- "maximum": 100,
191055
- "type": "number"
191123
+ "params": {
191124
+ "$comment": "json-value",
191125
+ "description": "Arbitrary JSON value with nested arrays and objects."
191056
191126
  }
191057
191127
  }
191058
- }
191059
- }
191060
- },
191061
- {
191062
- "additionalProperties": false,
191063
- "type": "object",
191064
- "required": [
191065
- "type"
191066
- ],
191067
- "properties": {
191068
- "type": {
191069
- "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
191070
- "type": "string",
191071
- "enum": [
191072
- "relaunch"
191073
- ]
191074
- },
191075
- "params": {
191076
- "$comment": "json-value",
191077
- "description": "Arbitrary JSON value with nested arrays and objects."
191078
- }
191079
- }
191080
- },
191081
- {
191082
- "additionalProperties": false,
191083
- "type": "object",
191084
- "required": [
191085
- "type"
191086
- ],
191087
- "properties": {
191088
- "type": {
191089
- "description": "Send a notification but do not mutate anything on Meta.",
191090
- "type": "string",
191091
- "enum": [
191092
- "notify_only"
191093
- ]
191094
- },
191095
- "params": {
191096
- "$comment": "json-value",
191097
- "description": "Arbitrary JSON value with nested arrays and objects."
191098
- }
191099
- }
191100
- },
191101
- {
191102
- "additionalProperties": false,
191103
- "type": "object",
191104
- "required": [
191105
- "type",
191106
- "platform",
191107
- "entity_level"
191108
- ],
191109
- "properties": {
191110
- "type": {
191111
- "type": "string",
191112
- "enum": [
191113
- "PAUSE_TOP_SPEND_CAMPAIGN"
191114
- ]
191115
191128
  },
191116
- "platform": {
191117
- "anyOf": [
191118
- {
191129
+ {
191130
+ "additionalProperties": false,
191131
+ "type": "object",
191132
+ "required": [
191133
+ "type"
191134
+ ],
191135
+ "properties": {
191136
+ "type": {
191137
+ "description": "Increase campaign/adset budget by `params.percentage` percent.",
191119
191138
  "type": "string",
191120
191139
  "enum": [
191121
- "META"
191140
+ "increase_budget_pct"
191122
191141
  ]
191123
191142
  },
191124
- {
191143
+ "params": {
191144
+ "additionalProperties": false,
191145
+ "type": "object",
191146
+ "properties": {
191147
+ "percentage": {
191148
+ "description": "Percent increase in [1, 1000] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit. The ceiling is deliberately far above 100: doubling or tripling a budget is ordinary media buying, and the old 100 cap (borrowed from the decrease action, where >100% is meaningless) made the rules list unserializable for anyone who had scaled a budget by more.",
191149
+ "minimum": 1,
191150
+ "maximum": 1000,
191151
+ "type": "number"
191152
+ },
191153
+ "pct": {
191154
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
191155
+ "minimum": 1,
191156
+ "maximum": 1000,
191157
+ "type": "number"
191158
+ }
191159
+ }
191160
+ }
191161
+ }
191162
+ },
191163
+ {
191164
+ "additionalProperties": false,
191165
+ "type": "object",
191166
+ "required": [
191167
+ "type"
191168
+ ],
191169
+ "properties": {
191170
+ "type": {
191171
+ "description": "Decrease campaign/adset budget by `params.percentage` percent.",
191125
191172
  "type": "string",
191126
191173
  "enum": [
191127
- "GOOGLE"
191174
+ "decrease_budget_pct"
191128
191175
  ]
191129
191176
  },
191130
- {
191177
+ "params": {
191178
+ "additionalProperties": false,
191179
+ "type": "object",
191180
+ "properties": {
191181
+ "percentage": {
191182
+ "description": "Percent change in [1, 100] (defaults to 20 if omitted at runtime). 0 is rejected because a 0% change is a no-op and the worker clamps it to 1 anyway — the schema makes that contract explicit.",
191183
+ "minimum": 1,
191184
+ "maximum": 100,
191185
+ "type": "number"
191186
+ },
191187
+ "pct": {
191188
+ "description": "Legacy template alias for `percentage`; accepted for seeded rule templates.",
191189
+ "minimum": 1,
191190
+ "maximum": 100,
191191
+ "type": "number"
191192
+ }
191193
+ }
191194
+ }
191195
+ }
191196
+ },
191197
+ {
191198
+ "additionalProperties": false,
191199
+ "type": "object",
191200
+ "required": [
191201
+ "type"
191202
+ ],
191203
+ "properties": {
191204
+ "type": {
191205
+ "description": "Relaunch the ad (duplicate + delete original). Only valid at ad level.",
191131
191206
  "type": "string",
191132
191207
  "enum": [
191133
- "TIKTOK"
191208
+ "relaunch"
191134
191209
  ]
191135
191210
  },
191136
- {
191211
+ "params": {
191212
+ "$comment": "json-value",
191213
+ "description": "Arbitrary JSON value with nested arrays and objects."
191214
+ }
191215
+ }
191216
+ },
191217
+ {
191218
+ "additionalProperties": false,
191219
+ "type": "object",
191220
+ "required": [
191221
+ "type"
191222
+ ],
191223
+ "properties": {
191224
+ "type": {
191225
+ "description": "Send a notification but do not mutate anything on Meta.",
191137
191226
  "type": "string",
191138
191227
  "enum": [
191139
- "TABOOLA"
191228
+ "notify_only"
191140
191229
  ]
191141
191230
  },
191142
- {
191143
- "type": "string",
191144
- "enum": [
191145
- "LINKEDIN"
191146
- ]
191231
+ "params": {
191232
+ "$comment": "json-value",
191233
+ "description": "Arbitrary JSON value with nested arrays and objects."
191147
191234
  }
191148
- ]
191235
+ }
191149
191236
  },
191150
- "entity_level": {
191151
- "type": "string",
191152
- "enum": [
191153
- "campaign"
191154
- ]
191155
- }
191156
- }
191157
- },
191158
- {
191159
- "additionalProperties": false,
191160
- "type": "object",
191161
- "required": [
191162
- "type",
191163
- "platform",
191164
- "entity_level",
191165
- "pct"
191166
- ],
191167
- "properties": {
191168
- "type": {
191169
- "anyOf": [
191170
- {
191237
+ {
191238
+ "additionalProperties": false,
191239
+ "type": "object",
191240
+ "required": [
191241
+ "type",
191242
+ "platform",
191243
+ "entity_level"
191244
+ ],
191245
+ "properties": {
191246
+ "type": {
191171
191247
  "type": "string",
191172
191248
  "enum": [
191173
- "INCREASE_BUDGET_PCT"
191249
+ "PAUSE_TOP_SPEND_CAMPAIGN"
191174
191250
  ]
191175
191251
  },
191176
- {
191252
+ "platform": {
191253
+ "anyOf": [
191254
+ {
191255
+ "type": "string",
191256
+ "enum": [
191257
+ "META"
191258
+ ]
191259
+ },
191260
+ {
191261
+ "type": "string",
191262
+ "enum": [
191263
+ "GOOGLE"
191264
+ ]
191265
+ },
191266
+ {
191267
+ "type": "string",
191268
+ "enum": [
191269
+ "TIKTOK"
191270
+ ]
191271
+ },
191272
+ {
191273
+ "type": "string",
191274
+ "enum": [
191275
+ "TABOOLA"
191276
+ ]
191277
+ },
191278
+ {
191279
+ "type": "string",
191280
+ "enum": [
191281
+ "LINKEDIN"
191282
+ ]
191283
+ }
191284
+ ]
191285
+ },
191286
+ "entity_level": {
191177
191287
  "type": "string",
191178
191288
  "enum": [
191179
- "DECREASE_BUDGET_PCT"
191289
+ "campaign"
191180
191290
  ]
191181
191291
  }
191182
- ]
191292
+ }
191183
191293
  },
191184
- "platform": {
191185
- "anyOf": [
191186
- {
191187
- "type": "string",
191188
- "enum": [
191189
- "META"
191294
+ {
191295
+ "additionalProperties": false,
191296
+ "type": "object",
191297
+ "required": [
191298
+ "type",
191299
+ "platform",
191300
+ "entity_level",
191301
+ "pct"
191302
+ ],
191303
+ "properties": {
191304
+ "type": {
191305
+ "anyOf": [
191306
+ {
191307
+ "type": "string",
191308
+ "enum": [
191309
+ "INCREASE_BUDGET_PCT"
191310
+ ]
191311
+ },
191312
+ {
191313
+ "type": "string",
191314
+ "enum": [
191315
+ "DECREASE_BUDGET_PCT"
191316
+ ]
191317
+ }
191190
191318
  ]
191191
191319
  },
191192
- {
191193
- "type": "string",
191194
- "enum": [
191195
- "GOOGLE"
191320
+ "platform": {
191321
+ "anyOf": [
191322
+ {
191323
+ "type": "string",
191324
+ "enum": [
191325
+ "META"
191326
+ ]
191327
+ },
191328
+ {
191329
+ "type": "string",
191330
+ "enum": [
191331
+ "GOOGLE"
191332
+ ]
191333
+ },
191334
+ {
191335
+ "type": "string",
191336
+ "enum": [
191337
+ "TIKTOK"
191338
+ ]
191339
+ },
191340
+ {
191341
+ "type": "string",
191342
+ "enum": [
191343
+ "TABOOLA"
191344
+ ]
191345
+ },
191346
+ {
191347
+ "type": "string",
191348
+ "enum": [
191349
+ "LINKEDIN"
191350
+ ]
191351
+ }
191196
191352
  ]
191197
191353
  },
191198
- {
191354
+ "entity_level": {
191199
191355
  "type": "string",
191200
191356
  "enum": [
191201
- "TIKTOK"
191357
+ "campaign"
191202
191358
  ]
191203
191359
  },
191204
- {
191360
+ "pct": {
191361
+ "minimum": 1,
191362
+ "maximum": 100,
191363
+ "type": "number"
191364
+ }
191365
+ }
191366
+ },
191367
+ {
191368
+ "additionalProperties": false,
191369
+ "type": "object",
191370
+ "required": [
191371
+ "type",
191372
+ "channel",
191373
+ "message_template"
191374
+ ],
191375
+ "properties": {
191376
+ "type": {
191205
191377
  "type": "string",
191206
191378
  "enum": [
191207
- "TABOOLA"
191379
+ "NOTIFY_CHANNEL"
191208
191380
  ]
191209
191381
  },
191210
- {
191211
- "type": "string",
191212
- "enum": [
191213
- "LINKEDIN"
191382
+ "channel": {
191383
+ "anyOf": [
191384
+ {
191385
+ "type": "string",
191386
+ "enum": [
191387
+ "in_app"
191388
+ ]
191389
+ },
191390
+ {
191391
+ "type": "string",
191392
+ "enum": [
191393
+ "email"
191394
+ ]
191395
+ },
191396
+ {
191397
+ "type": "string",
191398
+ "enum": [
191399
+ "telegram"
191400
+ ]
191401
+ }
191214
191402
  ]
191403
+ },
191404
+ "message_template": {
191405
+ "minLength": 1,
191406
+ "maxLength": 500,
191407
+ "type": "string"
191215
191408
  }
191216
- ]
191217
- },
191218
- "entity_level": {
191219
- "type": "string",
191220
- "enum": [
191221
- "campaign"
191222
- ]
191223
- },
191224
- "pct": {
191225
- "minimum": 1,
191226
- "maximum": 100,
191227
- "type": "number"
191409
+ }
191228
191410
  }
191229
- }
191411
+ ]
191230
191412
  },
191231
191413
  {
191232
- "additionalProperties": false,
191414
+ "additionalProperties": true,
191415
+ "description": "Rule action stored before the current schema; surfaced as-is so the list stays readable.",
191233
191416
  "type": "object",
191234
191417
  "required": [
191235
- "type",
191236
- "channel",
191237
- "message_template"
191418
+ "type"
191238
191419
  ],
191239
191420
  "properties": {
191240
191421
  "type": {
191241
- "type": "string",
191242
- "enum": [
191243
- "NOTIFY_CHANNEL"
191244
- ]
191245
- },
191246
- "channel": {
191247
- "anyOf": [
191248
- {
191249
- "type": "string",
191250
- "enum": [
191251
- "in_app"
191252
- ]
191253
- },
191254
- {
191255
- "type": "string",
191256
- "enum": [
191257
- "email"
191258
- ]
191259
- },
191260
- {
191261
- "type": "string",
191262
- "enum": [
191263
- "telegram"
191264
- ]
191265
- }
191266
- ]
191267
- },
191268
- "message_template": {
191269
- "minLength": 1,
191270
- "maxLength": 500,
191422
+ "description": "Action discriminator as stored, including legacy spellings.",
191271
191423
  "type": "string"
191424
+ },
191425
+ "params": {
191426
+ "$comment": "json-value",
191427
+ "description": "Arbitrary JSON value with nested arrays and objects."
191272
191428
  }
191273
191429
  }
191274
191430
  }