@happyvertical/smrt-marketing 0.57.36 → 0.57.38

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-marketing",
5
- "packageVersion": "0.57.36",
5
+ "packageVersion": "0.57.38",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-marketing:CampaignChannelCollection": {
8
8
  "name": "campaignchannelcollection",
@@ -826,7 +826,9 @@
826
826
  "type": "crossPackageRef",
827
827
  "required": false,
828
828
  "related": "@happyvertical/smrt-commerce:Customer",
829
+ "description": "The customer this campaign is run for, if any.",
829
830
  "_meta": {
831
+ "description": "The customer this campaign is run for, if any.",
830
832
  "validate": true,
831
833
  "nullable": true
832
834
  }
@@ -835,45 +837,73 @@
835
837
  "type": "text",
836
838
  "required": true,
837
839
  "default": "",
840
+ "description": "A short reference of your own for this campaign, kept the same once it is in use.",
838
841
  "_meta": {
839
- "required": true
842
+ "required": true,
843
+ "description": "A short reference of your own for this campaign, kept the same once it is in use."
840
844
  }
841
845
  },
842
846
  "name": {
843
847
  "type": "text",
844
848
  "required": true,
845
849
  "default": "",
850
+ "description": "What the campaign is called.",
846
851
  "_meta": {
847
- "required": true
852
+ "required": true,
853
+ "description": "What the campaign is called."
848
854
  }
849
855
  },
850
856
  "objective": {
851
857
  "type": "text",
852
858
  "required": false,
853
- "default": ""
859
+ "default": "",
860
+ "description": "What the campaign is meant to achieve, such as awareness or new leads.",
861
+ "_meta": {
862
+ "description": "What the campaign is meant to achieve, such as awareness or new leads."
863
+ }
854
864
  },
855
865
  "status": {
856
866
  "type": "text",
857
867
  "required": false,
858
- "default": "draft"
868
+ "default": "draft",
869
+ "description": "Where the campaign stands, from draft through active to completed and archived.",
870
+ "_meta": {
871
+ "description": "Where the campaign stands, from draft through active to completed and archived."
872
+ }
859
873
  },
860
874
  "startAt": {
861
875
  "type": "datetime",
862
- "required": false
876
+ "required": false,
877
+ "description": "When the campaign starts.",
878
+ "_meta": {
879
+ "description": "When the campaign starts."
880
+ }
863
881
  },
864
882
  "endAt": {
865
883
  "type": "datetime",
866
- "required": false
884
+ "required": false,
885
+ "description": "When the campaign ends.",
886
+ "_meta": {
887
+ "description": "When the campaign ends."
888
+ }
867
889
  },
868
890
  "budgetCents": {
869
891
  "type": "integer",
870
892
  "required": false,
871
- "default": 0
893
+ "default": 0,
894
+ "description": "The total you plan to spend on the campaign, in cents.",
895
+ "_meta": {
896
+ "description": "The total you plan to spend on the campaign, in cents."
897
+ }
872
898
  },
873
899
  "currency": {
874
900
  "type": "text",
875
901
  "required": false,
876
- "default": "USD"
902
+ "default": "USD",
903
+ "description": "The currency every amount on this campaign is in.",
904
+ "_meta": {
905
+ "description": "The currency every amount on this campaign is in."
906
+ }
877
907
  },
878
908
  "metadata": {
879
909
  "type": "text",
@@ -893,7 +923,13 @@
893
923
  "save": {
894
924
  "name": "save",
895
925
  "async": true,
896
- "parameters": [],
926
+ "parameters": [
927
+ {
928
+ "name": "options",
929
+ "type": "SmrtSaveOptions",
930
+ "optional": true
931
+ }
932
+ ],
897
933
  "returnType": "Promise<this>",
898
934
  "isStatic": false,
899
935
  "isPublic": true
@@ -1164,7 +1200,9 @@
1164
1200
  "type": "foreignKey",
1165
1201
  "required": true,
1166
1202
  "related": "Campaign",
1203
+ "description": "The campaign this channel runs for.",
1167
1204
  "_meta": {
1205
+ "description": "The campaign this channel runs for.",
1168
1206
  "required": true
1169
1207
  }
1170
1208
  },
@@ -1172,35 +1210,55 @@
1172
1210
  "type": "text",
1173
1211
  "required": true,
1174
1212
  "default": "",
1213
+ "description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event.",
1175
1214
  "_meta": {
1176
- "required": true
1215
+ "required": true,
1216
+ "description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event."
1177
1217
  }
1178
1218
  },
1179
1219
  "channelRef": {
1180
1220
  "type": "text",
1181
1221
  "required": true,
1182
1222
  "default": "",
1223
+ "description": "The name or reference the channel goes by, so its results can be matched to it.",
1183
1224
  "_meta": {
1184
- "required": true
1225
+ "required": true,
1226
+ "description": "The name or reference the channel goes by, so its results can be matched to it."
1185
1227
  }
1186
1228
  },
1187
1229
  "allocatedBudgetCents": {
1188
1230
  "type": "integer",
1189
1231
  "required": false,
1190
- "default": 0
1232
+ "default": 0,
1233
+ "description": "The share of the campaign budget set aside for this channel, in cents.",
1234
+ "_meta": {
1235
+ "description": "The share of the campaign budget set aside for this channel, in cents."
1236
+ }
1191
1237
  },
1192
1238
  "startAt": {
1193
1239
  "type": "datetime",
1194
- "required": false
1240
+ "required": false,
1241
+ "description": "When this channel starts, if different from the campaign.",
1242
+ "_meta": {
1243
+ "description": "When this channel starts, if different from the campaign."
1244
+ }
1195
1245
  },
1196
1246
  "endAt": {
1197
1247
  "type": "datetime",
1198
- "required": false
1248
+ "required": false,
1249
+ "description": "When this channel ends, if different from the campaign.",
1250
+ "_meta": {
1251
+ "description": "When this channel ends, if different from the campaign."
1252
+ }
1199
1253
  },
1200
1254
  "status": {
1201
1255
  "type": "text",
1202
1256
  "required": false,
1203
- "default": "planned"
1257
+ "default": "planned",
1258
+ "description": "Where this channel stands, from planned through active to completed or cancelled.",
1259
+ "_meta": {
1260
+ "description": "Where this channel stands, from planned through active to completed or cancelled."
1261
+ }
1204
1262
  }
1205
1263
  },
1206
1264
  "methods": {
@@ -1215,7 +1273,13 @@
1215
1273
  "save": {
1216
1274
  "name": "save",
1217
1275
  "async": true,
1218
- "parameters": [],
1276
+ "parameters": [
1277
+ {
1278
+ "name": "options",
1279
+ "type": "SmrtSaveOptions",
1280
+ "optional": true
1281
+ }
1282
+ ],
1219
1283
  "returnType": "Promise<this>",
1220
1284
  "isStatic": false,
1221
1285
  "isPublic": true
@@ -1419,7 +1483,9 @@
1419
1483
  "type": "foreignKey",
1420
1484
  "required": true,
1421
1485
  "related": "Campaign",
1486
+ "description": "The campaign these results belong to.",
1422
1487
  "_meta": {
1488
+ "description": "The campaign these results belong to.",
1423
1489
  "required": true
1424
1490
  }
1425
1491
  },
@@ -1427,70 +1493,102 @@
1427
1493
  "type": "foreignKey",
1428
1494
  "required": false,
1429
1495
  "related": "CampaignChannel",
1496
+ "description": "The channel these results came from. Empty when they cover the whole campaign.",
1430
1497
  "_meta": {
1498
+ "description": "The channel these results came from. Empty when they cover the whole campaign.",
1431
1499
  "nullable": true
1432
1500
  }
1433
1501
  },
1434
1502
  "periodStart": {
1435
1503
  "type": "datetime",
1436
1504
  "required": true,
1505
+ "description": "The first day of the period these results cover.",
1437
1506
  "_meta": {
1438
- "required": true
1507
+ "required": true,
1508
+ "description": "The first day of the period these results cover."
1439
1509
  }
1440
1510
  },
1441
1511
  "periodEnd": {
1442
1512
  "type": "datetime",
1443
1513
  "required": true,
1514
+ "description": "The last day of the period these results cover.",
1444
1515
  "_meta": {
1445
- "required": true
1516
+ "required": true,
1517
+ "description": "The last day of the period these results cover."
1446
1518
  }
1447
1519
  },
1448
1520
  "spendCents": {
1449
1521
  "type": "integer",
1450
1522
  "required": false,
1451
- "default": 0
1523
+ "default": 0,
1524
+ "description": "What was spent in the period, in cents.",
1525
+ "_meta": {
1526
+ "description": "What was spent in the period, in cents."
1527
+ }
1452
1528
  },
1453
1529
  "impressions": {
1454
1530
  "type": "integer",
1455
1531
  "required": false,
1456
- "default": 0
1532
+ "default": 0,
1533
+ "description": "How many times the campaign was shown.",
1534
+ "_meta": {
1535
+ "description": "How many times the campaign was shown."
1536
+ }
1457
1537
  },
1458
1538
  "clicks": {
1459
1539
  "type": "integer",
1460
1540
  "required": false,
1461
- "default": 0
1541
+ "default": 0,
1542
+ "description": "How many times someone clicked through.",
1543
+ "_meta": {
1544
+ "description": "How many times someone clicked through."
1545
+ }
1462
1546
  },
1463
1547
  "conversions": {
1464
1548
  "type": "integer",
1465
1549
  "required": false,
1466
- "default": 0
1550
+ "default": 0,
1551
+ "description": "How many people did what the campaign asked, such as buying.",
1552
+ "_meta": {
1553
+ "description": "How many people did what the campaign asked, such as buying."
1554
+ }
1467
1555
  },
1468
1556
  "leads": {
1469
1557
  "type": "integer",
1470
1558
  "required": false,
1471
- "default": 0
1559
+ "default": 0,
1560
+ "description": "How many new leads came in.",
1561
+ "_meta": {
1562
+ "description": "How many new leads came in."
1563
+ }
1472
1564
  },
1473
1565
  "revenueCents": {
1474
1566
  "type": "integer",
1475
1567
  "required": false,
1568
+ "description": "The sales brought in during the period, in cents, if known.",
1476
1569
  "_meta": {
1477
- "nullable": true
1570
+ "nullable": true,
1571
+ "description": "The sales brought in during the period, in cents, if known."
1478
1572
  }
1479
1573
  },
1480
1574
  "source": {
1481
1575
  "type": "text",
1482
1576
  "required": true,
1483
1577
  "default": "",
1578
+ "description": "Where these results were reported from.",
1484
1579
  "_meta": {
1485
- "required": true
1580
+ "required": true,
1581
+ "description": "Where these results were reported from."
1486
1582
  }
1487
1583
  },
1488
1584
  "dedupeKey": {
1489
1585
  "type": "text",
1490
1586
  "required": true,
1491
1587
  "default": "",
1588
+ "description": "The reference this result is filed under, so the same report is never counted twice.",
1492
1589
  "_meta": {
1493
- "required": true
1590
+ "required": true,
1591
+ "description": "The reference this result is filed under, so the same report is never counted twice."
1494
1592
  }
1495
1593
  }
1496
1594
  },
@@ -1506,7 +1604,13 @@
1506
1604
  "save": {
1507
1605
  "name": "save",
1508
1606
  "async": true,
1509
- "parameters": [],
1607
+ "parameters": [
1608
+ {
1609
+ "name": "options",
1610
+ "type": "SmrtSaveOptions",
1611
+ "optional": true
1612
+ }
1613
+ ],
1510
1614
  "returnType": "Promise<this>",
1511
1615
  "isStatic": false,
1512
1616
  "isPublic": true
@@ -1738,6 +1842,211 @@
1738
1842
  }
1739
1843
  },
1740
1844
  "moduleType": "smrt",
1845
+ "recipes": [
1846
+ {
1847
+ "id": "marketing.campaigns",
1848
+ "className": "MarketingCampaignsRecipe",
1849
+ "label": "Campaigns",
1850
+ "summary": "Plan a marketing campaign, set its budget and dates, choose where it runs and see what it brought in.",
1851
+ "synonyms": [
1852
+ "marketing",
1853
+ "marketing campaigns",
1854
+ "promotions",
1855
+ "advertising",
1856
+ "ad campaigns",
1857
+ "campaign results"
1858
+ ],
1859
+ "models": [
1860
+ "@happyvertical/smrt-marketing:Campaign",
1861
+ "@happyvertical/smrt-marketing:CampaignChannel",
1862
+ "@happyvertical/smrt-marketing:CampaignMetricSnapshot"
1863
+ ],
1864
+ "nav": [
1865
+ {
1866
+ "label": "Campaigns",
1867
+ "model": "@happyvertical/smrt-marketing:Campaign",
1868
+ "icon": "tag",
1869
+ "description": "Every campaign, with its budget, dates and where it stands.",
1870
+ "noun": "campaign"
1871
+ },
1872
+ {
1873
+ "label": "Channels",
1874
+ "model": "@happyvertical/smrt-marketing:CampaignChannel",
1875
+ "icon": "layers",
1876
+ "description": "Where each campaign runs, such as an ad group or a social post, and its share of the budget.",
1877
+ "noun": "channel"
1878
+ }
1879
+ ],
1880
+ "requires": [],
1881
+ "section": {
1882
+ "id": "grow",
1883
+ "label": "Grow",
1884
+ "icon": "tag",
1885
+ "description": "Bring in new customers and reward the people who help."
1886
+ },
1887
+ "options": {
1888
+ "@happyvertical/smrt-marketing:Campaign": {
1889
+ "fields": {
1890
+ "name": {
1891
+ "order": 1
1892
+ },
1893
+ "objective": {
1894
+ "order": 2
1895
+ },
1896
+ "status": {
1897
+ "order": 3
1898
+ },
1899
+ "startAt": {
1900
+ "label": "Starts",
1901
+ "order": 4
1902
+ },
1903
+ "endAt": {
1904
+ "label": "Ends",
1905
+ "order": 5
1906
+ },
1907
+ "budgetCents": {
1908
+ "label": "Budget (cents)",
1909
+ "order": 6
1910
+ },
1911
+ "currency": {
1912
+ "order": 7
1913
+ },
1914
+ "customerId": {
1915
+ "label": "Customer",
1916
+ "visibility": "advanced"
1917
+ },
1918
+ "campaignKey": {
1919
+ "label": "Reference",
1920
+ "visibility": "advanced"
1921
+ },
1922
+ "tenantId": {
1923
+ "visibility": "hidden"
1924
+ },
1925
+ "metadata": {
1926
+ "visibility": "hidden"
1927
+ }
1928
+ }
1929
+ },
1930
+ "@happyvertical/smrt-marketing:CampaignChannel": {
1931
+ "fields": {
1932
+ "campaignId": {
1933
+ "label": "Campaign",
1934
+ "order": 1
1935
+ },
1936
+ "channelKind": {
1937
+ "label": "Kind",
1938
+ "order": 2
1939
+ },
1940
+ "channelRef": {
1941
+ "label": "Name",
1942
+ "order": 3
1943
+ },
1944
+ "allocatedBudgetCents": {
1945
+ "label": "Budget share (cents)",
1946
+ "order": 4
1947
+ },
1948
+ "status": {
1949
+ "order": 5
1950
+ },
1951
+ "startAt": {
1952
+ "label": "Starts",
1953
+ "order": 6
1954
+ },
1955
+ "endAt": {
1956
+ "label": "Ends",
1957
+ "order": 7
1958
+ },
1959
+ "tenantId": {
1960
+ "visibility": "hidden"
1961
+ }
1962
+ }
1963
+ },
1964
+ "@happyvertical/smrt-marketing:CampaignMetricSnapshot": {
1965
+ "fields": {
1966
+ "campaignId": {
1967
+ "label": "Campaign",
1968
+ "order": 1
1969
+ },
1970
+ "campaignChannelId": {
1971
+ "label": "Channel",
1972
+ "order": 2
1973
+ },
1974
+ "periodStart": {
1975
+ "label": "From",
1976
+ "order": 3
1977
+ },
1978
+ "periodEnd": {
1979
+ "label": "To",
1980
+ "order": 4
1981
+ },
1982
+ "spendCents": {
1983
+ "label": "Spend (cents)",
1984
+ "order": 5
1985
+ },
1986
+ "impressions": {
1987
+ "order": 6
1988
+ },
1989
+ "clicks": {
1990
+ "order": 7
1991
+ },
1992
+ "conversions": {
1993
+ "order": 8
1994
+ },
1995
+ "leads": {
1996
+ "order": 9
1997
+ },
1998
+ "revenueCents": {
1999
+ "label": "Revenue (cents)",
2000
+ "order": 10
2001
+ },
2002
+ "source": {
2003
+ "order": 11
2004
+ },
2005
+ "tenantId": {
2006
+ "visibility": "hidden"
2007
+ },
2008
+ "dedupeKey": {
2009
+ "visibility": "hidden"
2010
+ }
2011
+ }
2012
+ }
2013
+ },
2014
+ "help": {
2015
+ "markdown": "## Overview\n\nCampaigns is where you plan a push to bring in customers: a sale, a launch, a\nseasonal promotion. Each campaign has a budget, start and end dates and a\nstatus that shows where it stands, from draft through active to completed. A\ncampaign runs on one or more channels, such as an ad group, a social post, an\nemail or an event, each with its share of the budget. Results come back from\nthe channels' reporting, period by period, so you can see what each campaign\nand channel brought in for what it cost.\n\n## Tasks\n\n### Plan a campaign\n\n1. Open the list of campaigns and choose **New**.\n2. Type the **{field:Campaign.name}**, for example \"Spring widget sale\".\n3. Say what it is for in **{field:Campaign.objective}**, such as awareness or new leads.\n4. Set when it **{field:Campaign.startAt}** and when it **{field:Campaign.endAt}**. The end cannot be before the start.\n5. Enter the **{field:Campaign.budgetCents}** as a whole number of cents, so $500 is 50000, and check the **{field:Campaign.currency}**.\n6. Save. A new campaign starts as a draft.\n\n### See where a campaign stands\n\n1. Open the list of campaigns.\n2. The **{field:Campaign.status}** shows whether each one is still a draft, scheduled, active, paused, completed or archived. It moves forward as the campaign is scheduled, run and wrapped up; you do not set it by hand.\n3. Open a campaign to change its name, dates or budget while it is still being planned.\n\n### Add a channel to a campaign\n\n1. Open the list of channels and choose **New**.\n2. Pick the **{field:CampaignChannel.campaignId}** it belongs to.\n3. Choose the **{field:CampaignChannel.channelKind}**, such as an ad group, a social post, a message, content or an event.\n4. Type the **{field:CampaignChannel.channelRef}** the channel goes by, so its results can be matched to it later.\n5. Enter its **{field:CampaignChannel.allocatedBudgetCents}** as a whole number of cents.\n6. If the channel runs on different dates from the campaign, set when it **{field:CampaignChannel.startAt}** and **{field:CampaignChannel.endAt}**.\n7. Save. You can edit a channel later, or remove one that will not run.\n\n### Read the results\n\nResults arrive from the channels' reporting; nobody types them in. Each one\ncovers a period for one campaign, or for one channel within it. A result is\nnever changed once it is in: a correction arrives as a new result for the same\nperiod.\n\n1. Open a campaign and look at its results, listed under the campaign.\n2. Each result names the **{field:CampaignMetricSnapshot.campaignId}** it belongs to. A result with no **{field:CampaignMetricSnapshot.campaignChannelId}** covers the whole campaign.\n3. Check the period, **{field:CampaignMetricSnapshot.periodStart}** to **{field:CampaignMetricSnapshot.periodEnd}**.\n4. Compare the **{field:CampaignMetricSnapshot.spendCents}** with the **{field:CampaignMetricSnapshot.clicks}**, **{field:CampaignMetricSnapshot.leads}** and **{field:CampaignMetricSnapshot.conversions}** it brought in, and the **{field:CampaignMetricSnapshot.revenueCents}** where the channel reports it.\n5. The **{field:CampaignMetricSnapshot.source}** says which channel's reporting sent the result.\n",
2016
+ "fieldRefs": [
2017
+ "Campaign.budgetCents",
2018
+ "Campaign.currency",
2019
+ "Campaign.endAt",
2020
+ "Campaign.name",
2021
+ "Campaign.objective",
2022
+ "Campaign.startAt",
2023
+ "Campaign.status",
2024
+ "CampaignChannel.allocatedBudgetCents",
2025
+ "CampaignChannel.campaignId",
2026
+ "CampaignChannel.channelKind",
2027
+ "CampaignChannel.channelRef",
2028
+ "CampaignChannel.endAt",
2029
+ "CampaignChannel.startAt",
2030
+ "CampaignMetricSnapshot.campaignChannelId",
2031
+ "CampaignMetricSnapshot.campaignId",
2032
+ "CampaignMetricSnapshot.clicks",
2033
+ "CampaignMetricSnapshot.conversions",
2034
+ "CampaignMetricSnapshot.leads",
2035
+ "CampaignMetricSnapshot.periodEnd",
2036
+ "CampaignMetricSnapshot.periodStart",
2037
+ "CampaignMetricSnapshot.revenueCents",
2038
+ "CampaignMetricSnapshot.source",
2039
+ "CampaignMetricSnapshot.spendCents"
2040
+ ]
2041
+ },
2042
+ "demo": {
2043
+ "mode": "server",
2044
+ "reasons": [
2045
+ "Needs a server because its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624)."
2046
+ ]
2047
+ }
2048
+ }
2049
+ ],
1741
2050
  "smrtDependencies": [
1742
2051
  "@happyvertical/smrt-commerce",
1743
2052
  "@happyvertical/smrt-core",
@@ -1,5 +1,5 @@
1
1
  /** Campaign identity, budget, schedule, and guarded lifecycle. */
2
- import { SmrtObject } from '@happyvertical/smrt-core';
2
+ import { SmrtObject, type SmrtSaveOptions } from '@happyvertical/smrt-core';
3
3
  import { type CampaignOptions, type CampaignStatus } from '../types.js';
4
4
  export declare class Campaign extends SmrtObject {
5
5
  tenantId: string | null;
@@ -20,7 +20,7 @@ export declare class Campaign extends SmrtObject {
20
20
  metadata: string;
21
21
  constructor(options?: CampaignOptions);
22
22
  initialize(): Promise<this>;
23
- save(): Promise<this>;
23
+ save(options?: SmrtSaveOptions): Promise<this>;
24
24
  private saveLifecycle;
25
25
  /** Canonicalize and authorize identity before any status or scope read. */
26
26
  private prepareIdentityForSave;
@@ -1 +1 @@
1
- {"version":3,"file":"Campaign.d.ts","sourceRoot":"","sources":["../../src/models/Campaign.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,EAGL,UAAU,EAGX,MAAM,0BAA0B,CAAC;AAelC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAarB,qBAca,QAAS,SAAQ,UAAU;IAEtC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,0EAA0E;IAK1E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEjC,8DAA8D;IAE9D,WAAW,EAAE,MAAM,CAAM;IAGzB,IAAI,EAAE,MAAM,CAAM;IAElB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAM;IAEvB,MAAM,EAAE,cAAc,CAAW;IAEjC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE5B,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE1B,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAK;IAExB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAS;IAEzB,QAAQ,EAAE,MAAM,CAAQ;gBAEZ,OAAO,GAAE,eAAoB;IAmB1B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YActB,aAAa;IA4C3B,2EAA2E;IAC3E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CAAC,IAAI,CAAC;YAgB/C,aAAa;IA4C3B,2EAA2E;IAC3E,OAAO,CAAC,sBAAsB;IAsC9B,8EAA8E;IAC9E,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAaxC,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYtC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIpD,OAAO,CAAC,cAAc;YAaR,kBAAkB;IAyChC,OAAO,CAAC,sBAAsB;IAgB9B,OAAO,CAAC,MAAM,CAAC,UAAU;CAS1B;AAED,eAAe,QAAQ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** Generic links from a campaign to cross-package channel execution rows. */
2
- import { SmrtObject } from '@happyvertical/smrt-core';
2
+ import { SmrtObject, type SmrtSaveOptions } from '@happyvertical/smrt-core';
3
3
  import type { CampaignChannelOptions, CampaignChannelStatus } from '../types.js';
4
4
  export declare class CampaignChannel extends SmrtObject {
5
5
  tenantId: string | null;
@@ -16,7 +16,7 @@ export declare class CampaignChannel extends SmrtObject {
16
16
  status: CampaignChannelStatus;
17
17
  constructor(options?: CampaignChannelOptions);
18
18
  initialize(): Promise<this>;
19
- save(): Promise<this>;
19
+ save(options?: SmrtSaveOptions): Promise<this>;
20
20
  private static coerceDate;
21
21
  }
22
22
  export default CampaignChannel;
@@ -1 +1 @@
1
- {"version":3,"file":"CampaignChannel.d.ts","sourceRoot":"","sources":["../../src/models/CampaignChannel.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAIrB,qBAQa,eAAgB,SAAQ,UAAU;IAE7C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,UAAU,EAAE,MAAM,CAAM;IAExB,+EAA+E;IAE/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O,CAAC,MAAM,CAAC,UAAU;CAS1B;AAED,eAAe,eAAe,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** Immutable period performance evidence for a campaign or campaign channel. */
2
- import { SmrtObject } from '@happyvertical/smrt-core';
2
+ import { SmrtObject, type SmrtSaveOptions } from '@happyvertical/smrt-core';
3
3
  import type { CampaignMetricSnapshotOptions } from '../types.js';
4
4
  export declare class CampaignMetricSnapshot extends SmrtObject {
5
5
  tenantId: string | null;
@@ -19,7 +19,7 @@ export declare class CampaignMetricSnapshot extends SmrtObject {
19
19
  dedupeKey: string;
20
20
  constructor(options?: CampaignMetricSnapshotOptions);
21
21
  initialize(): Promise<this>;
22
- save(): Promise<this>;
22
+ save(options?: SmrtSaveOptions): Promise<this>;
23
23
  delete(): Promise<void>;
24
24
  private assertMetrics;
25
25
  private assertChannelMatchesCampaign;
@@ -1 +1 @@
1
- {"version":3,"file":"CampaignMetricSnapshot.d.ts","sourceRoot":"","sources":["../../src/models/CampaignMetricSnapshot.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAMjE,qBAQa,sBAAuB,SAAQ,UAAU;IAEpD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,UAAU,EAAE,MAAM,CAAM;IAExB,kEAAkE;IAElE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGxC,WAAW,EAAE,IAAI,CAAc;IAG/B,SAAS,EAAE,IAAI,CAAc;IAE7B,UAAU,EAAE,MAAM,CAAK;IAEvB,WAAW,EAAE,MAAM,CAAK;IAExB,MAAM,EAAE,MAAM,CAAK;IAEnB,WAAW,EAAE,MAAM,CAAK;IAExB,KAAK,EAAE,MAAM,CAAK;IAGlB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEnC,sEAAsE;IAEtE,MAAM,EAA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