@happyvertical/smrt-marketing 0.43.9 → 0.44.0

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 (31) hide show
  1. package/AGENTS.md +5 -3
  2. package/README.md +23 -4
  3. package/dist/collections/CampaignCollection.d.ts +10 -1
  4. package/dist/collections/CampaignCollection.d.ts.map +1 -1
  5. package/dist/index.js +448 -256
  6. package/dist/index.js.map +1 -1
  7. package/dist/manifest.json +25 -1
  8. package/dist/services/BudgetPacingService.d.ts +0 -3
  9. package/dist/services/BudgetPacingService.d.ts.map +1 -1
  10. package/dist/services/pacing-calculation.d.ts +18 -0
  11. package/dist/services/pacing-calculation.d.ts.map +1 -0
  12. package/dist/smrt-knowledge.json +16 -5
  13. package/dist/svelte/components/BudgetPacing.svelte +3 -0
  14. package/dist/svelte/components/BudgetPacing.svelte.d.ts +3 -0
  15. package/dist/svelte/components/BudgetPacing.svelte.d.ts.map +1 -1
  16. package/dist/svelte/components/CampaignDetail.svelte +5 -0
  17. package/dist/svelte/components/CampaignDetail.svelte.d.ts +5 -0
  18. package/dist/svelte/components/CampaignDetail.svelte.d.ts.map +1 -1
  19. package/dist/svelte/components/CampaignList.svelte +4 -0
  20. package/dist/svelte/components/CampaignList.svelte.d.ts +4 -0
  21. package/dist/svelte/components/CampaignList.svelte.d.ts.map +1 -1
  22. package/dist/svelte/components/ChannelMix.svelte +3 -0
  23. package/dist/svelte/components/ChannelMix.svelte.d.ts +3 -0
  24. package/dist/svelte/components/ChannelMix.svelte.d.ts.map +1 -1
  25. package/dist/svelte/components/MarketingDashboard.svelte +4 -0
  26. package/dist/svelte/components/MarketingDashboard.svelte.d.ts +4 -0
  27. package/dist/svelte/components/MarketingDashboard.svelte.d.ts.map +1 -1
  28. package/dist/types.d.ts +28 -0
  29. package/dist/types.d.ts.map +1 -1
  30. package/dist/types.js.map +1 -1
  31. package/package.json +7 -6
@@ -11,10 +11,15 @@ import type { CampaignChannelView, CampaignDetailView } from '../types.js';
11
11
  import { campaignStatusBadgeVariant } from '../types.js';
12
12
 
13
13
  export interface Props {
14
+ /** Campaign to display. */
14
15
  campaign?: CampaignDetailView | null;
16
+ /** Campaign channel executions. */
15
17
  channels?: CampaignChannelView[];
18
+ /** Locale for formatting currency, dates, and numbers. */
16
19
  locale?: string;
20
+ /** Snippet to render the budget pacing section. */
17
21
  pacing?: Snippet;
22
+ /** Snippet to render the channel mix section. */
18
23
  channelMix?: Snippet;
19
24
  children?: Snippet;
20
25
  }
@@ -1,10 +1,15 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { CampaignChannelView, CampaignDetailView } from '../types.js';
3
3
  export interface Props {
4
+ /** Campaign to display. */
4
5
  campaign?: CampaignDetailView | null;
6
+ /** Campaign channel executions. */
5
7
  channels?: CampaignChannelView[];
8
+ /** Locale for formatting currency, dates, and numbers. */
6
9
  locale?: string;
10
+ /** Snippet to render the budget pacing section. */
7
11
  pacing?: Snippet;
12
+ /** Snippet to render the channel mix section. */
8
13
  channelMix?: Snippet;
9
14
  children?: Snippet;
10
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CampaignDetail.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/CampaignDetail.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAOtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAI3E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8FD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CampaignDetail.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/CampaignDetail.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAOtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAI3E,MAAM,WAAW,KAAK;IACpB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8FD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -5,9 +5,13 @@ import type { CampaignSummaryView } from '../types.js';
5
5
  import { campaignStatusBadgeVariant } from '../types.js';
6
6
 
7
7
  export interface Props {
8
+ /** Campaigns to display in the list. */
8
9
  campaigns?: CampaignSummaryView[];
10
+ /** ID of the currently selected campaign. */
9
11
  selectedCampaignId?: string;
12
+ /** Locale for formatting currency and dates. */
10
13
  locale?: string;
14
+ /** Fired when the user selects a campaign. */
11
15
  onSelect?: (campaignId: string) => void;
12
16
  }
13
17
 
@@ -1,8 +1,12 @@
1
1
  import type { CampaignSummaryView } from '../types.js';
2
2
  export interface Props {
3
+ /** Campaigns to display in the list. */
3
4
  campaigns?: CampaignSummaryView[];
5
+ /** ID of the currently selected campaign. */
4
6
  selectedCampaignId?: string;
7
+ /** Locale for formatting currency and dates. */
5
8
  locale?: string;
9
+ /** Fired when the user selects a campaign. */
6
10
  onSelect?: (campaignId: string) => void;
7
11
  }
8
12
  declare const CampaignList: import("svelte").Component<Props, {}, "">;
@@ -1 +1 @@
1
- {"version":3,"file":"CampaignList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/CampaignList.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAqED,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"CampaignList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/CampaignList.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,wCAAwC;IACxC,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAqED,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
@@ -11,8 +11,11 @@ import type { CampaignChannelView } from '../types.js';
11
11
  import { calculateChannelMix, campaignStatusBadgeVariant } from '../types.js';
12
12
 
13
13
  export interface Props {
14
+ /** Campaign channels to display. */
14
15
  channels?: CampaignChannelView[];
16
+ /** Currency code for formatting spending. */
15
17
  currency?: string;
18
+ /** Locale for formatting currency, numbers, and percentages. */
16
19
  locale?: string;
17
20
  }
18
21
 
@@ -1,7 +1,10 @@
1
1
  import type { CampaignChannelView } from '../types.js';
2
2
  export interface Props {
3
+ /** Campaign channels to display. */
3
4
  channels?: CampaignChannelView[];
5
+ /** Currency code for formatting spending. */
4
6
  currency?: string;
7
+ /** Locale for formatting currency, numbers, and percentages. */
5
8
  locale?: string;
6
9
  }
7
10
  declare const ChannelMix: import("svelte").Component<Props, {}, "">;
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelMix.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ChannelMix.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmDD,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ChannelMix.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ChannelMix.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmDD,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -6,9 +6,13 @@ import type { CampaignSummaryView } from '../types.js';
6
6
  import { summarizeMarketingDashboard } from '../types.js';
7
7
 
8
8
  export interface Props {
9
+ /** Campaigns to summarize in dashboard tiles. */
9
10
  campaigns?: CampaignSummaryView[];
11
+ /** Locale for formatting currency and numbers. */
10
12
  locale?: string;
13
+ /** Snippet to render the campaign list. */
11
14
  campaignList?: Snippet;
15
+ /** Snippet to render the campaign detail. */
12
16
  detail?: Snippet;
13
17
  children?: Snippet;
14
18
  }
@@ -1,9 +1,13 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { CampaignSummaryView } from '../types.js';
3
3
  export interface Props {
4
+ /** Campaigns to summarize in dashboard tiles. */
4
5
  campaigns?: CampaignSummaryView[];
6
+ /** Locale for formatting currency and numbers. */
5
7
  locale?: string;
8
+ /** Snippet to render the campaign list. */
6
9
  campaignList?: Snippet;
10
+ /** Snippet to render the campaign detail. */
7
11
  detail?: Snippet;
8
12
  children?: Snippet;
9
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MarketingDashboard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/MarketingDashboard.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiFD,QAAA,MAAM,kBAAkB,2CAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"MarketingDashboard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/MarketingDashboard.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,KAAK;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiFD,QAAA,MAAM,kBAAkB,2CAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -35,6 +35,34 @@ export interface CampaignCustomerPage {
35
35
  items: Campaign[];
36
36
  nextCursor: CampaignCustomerCursor | null;
37
37
  }
38
+ export interface ListCampaignReportingByCustomerOptions extends ListCampaignsByCustomerOptions {
39
+ /** Clock used for deterministic pacing calculations. Defaults to now. */
40
+ at?: Date | string | number;
41
+ }
42
+ export interface CampaignChannelMixEntry {
43
+ channelKind: CampaignChannelKind;
44
+ count: number;
45
+ }
46
+ /** Totals from the immutable evidence selected by campaign pacing rules. */
47
+ export interface CampaignMetricTotals {
48
+ spendCents: number;
49
+ impressions: number;
50
+ clicks: number;
51
+ conversions: number;
52
+ leads: number;
53
+ revenueCents: number;
54
+ }
55
+ export interface CampaignReportingItem {
56
+ campaign: Campaign;
57
+ channelCount: number;
58
+ channelMix: CampaignChannelMixEntry[];
59
+ metricTotals: CampaignMetricTotals;
60
+ pacing: BudgetPacingResult;
61
+ }
62
+ export interface CampaignReportingPage {
63
+ items: CampaignReportingItem[];
64
+ nextCursor: CampaignCustomerCursor | null;
65
+ }
38
66
  export interface CampaignCustomerSummary {
39
67
  customerId: string;
40
68
  totalCount: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,eAAO,MAAM,iBAAiB,8EAOpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB,yFAOzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,GACvC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,eAAO,MAAM,yBAAyB,iFAO5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI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AU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;CAC9B"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["/** Shared model and service contracts for @happyvertical/smrt-marketing. */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport type { Campaign } from './models/Campaign.js';\n\nexport const CAMPAIGN_STATUSES = [\n 'draft',\n 'scheduled',\n 'active',\n 'paused',\n 'completed',\n 'archived',\n] as const;\n\nexport type CampaignStatus = (typeof CAMPAIGN_STATUSES)[number];\n\nexport const CAMPAIGN_CHANNEL_KINDS = [\n 'ad_group',\n 'social_post',\n 'message',\n 'content',\n 'event',\n 'referral_program',\n] as const;\n\nexport type CampaignChannelKind =\n | (typeof CAMPAIGN_CHANNEL_KINDS)[number]\n | (string & {});\n\nexport const CAMPAIGN_CHANNEL_STATUSES = [\n 'planned',\n 'scheduled',\n 'active',\n 'paused',\n 'completed',\n 'cancelled',\n] as const;\n\nexport type CampaignChannelStatus = (typeof CAMPAIGN_CHANNEL_STATUSES)[number];\n\nexport interface CampaignOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n customerId?: string | null;\n campaignKey?: string;\n name?: string;\n objective?: string;\n status?: CampaignStatus;\n startAt?: Date | string | number | null;\n endAt?: Date | string | number | null;\n budgetCents?: number;\n currency?: string;\n metadata?: string;\n}\n\nexport interface CampaignCustomerCursorInput {\n startAt: Date | string | number | null;\n id: string;\n}\n\nexport interface CampaignCustomerCursor {\n startAt: Date | null;\n id: string;\n}\n\nexport interface ListCampaignsByCustomerOptions {\n limit?: number;\n after?: CampaignCustomerCursorInput;\n}\n\nexport interface CampaignCustomerPage {\n items: Campaign[];\n nextCursor: CampaignCustomerCursor | null;\n}\n\nexport interface CampaignCustomerSummary {\n customerId: string;\n totalCount: number;\n activeCount: number;\n latestStartAt: Date | null;\n}\n\nexport interface CampaignChannelOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n campaignId?: string;\n channelKind?: CampaignChannelKind;\n channelRef?: string;\n allocatedBudgetCents?: number;\n startAt?: Date | string | number | null;\n endAt?: Date | string | number | null;\n status?: CampaignChannelStatus;\n}\n\nexport interface CampaignMetricSnapshotOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n campaignId?: string;\n campaignChannelId?: string | null;\n periodStart?: Date | string | number;\n periodEnd?: Date | string | number;\n spendCents?: number;\n impressions?: number;\n clicks?: number;\n conversions?: number;\n leads?: number;\n revenueCents?: number | null;\n source?: string;\n dedupeKey?: string;\n}\n\nexport type BudgetPacingStatus =\n | 'unbudgeted'\n | 'not_started'\n | 'behind'\n | 'on_track'\n | 'ahead'\n | 'over_budget'\n | 'complete';\n\nexport interface BudgetPacingResult {\n campaignId: string;\n campaignChannelId?: string;\n currency: string;\n budgetCents: number;\n spendCents: number;\n remainingCents: number;\n expectedSpendCents: number | null;\n varianceCents: number | null;\n budgetFraction: number | null;\n elapsedFraction: number | null;\n status: BudgetPacingStatus;\n snapshotCount: number;\n usedCampaignRollups: boolean;\n}\n"],"mappings":";AAKO,IAAM,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;AACF;AAIO,IAAM,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;AACF;AAMO,IAAM,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["/** Shared model and service contracts for @happyvertical/smrt-marketing. */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport type { Campaign } from './models/Campaign.js';\n\nexport const CAMPAIGN_STATUSES = [\n 'draft',\n 'scheduled',\n 'active',\n 'paused',\n 'completed',\n 'archived',\n] as const;\n\nexport type CampaignStatus = (typeof CAMPAIGN_STATUSES)[number];\n\nexport const CAMPAIGN_CHANNEL_KINDS = [\n 'ad_group',\n 'social_post',\n 'message',\n 'content',\n 'event',\n 'referral_program',\n] as const;\n\nexport type CampaignChannelKind =\n | (typeof CAMPAIGN_CHANNEL_KINDS)[number]\n | (string & {});\n\nexport const CAMPAIGN_CHANNEL_STATUSES = [\n 'planned',\n 'scheduled',\n 'active',\n 'paused',\n 'completed',\n 'cancelled',\n] as const;\n\nexport type CampaignChannelStatus = (typeof CAMPAIGN_CHANNEL_STATUSES)[number];\n\nexport interface CampaignOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n customerId?: string | null;\n campaignKey?: string;\n name?: string;\n objective?: string;\n status?: CampaignStatus;\n startAt?: Date | string | number | null;\n endAt?: Date | string | number | null;\n budgetCents?: number;\n currency?: string;\n metadata?: string;\n}\n\nexport interface CampaignCustomerCursorInput {\n startAt: Date | string | number | null;\n id: string;\n}\n\nexport interface CampaignCustomerCursor {\n startAt: Date | null;\n id: string;\n}\n\nexport interface ListCampaignsByCustomerOptions {\n limit?: number;\n after?: CampaignCustomerCursorInput;\n}\n\nexport interface CampaignCustomerPage {\n items: Campaign[];\n nextCursor: CampaignCustomerCursor | null;\n}\n\nexport interface ListCampaignReportingByCustomerOptions\n extends ListCampaignsByCustomerOptions {\n /** Clock used for deterministic pacing calculations. Defaults to now. */\n at?: Date | string | number;\n}\n\nexport interface CampaignChannelMixEntry {\n channelKind: CampaignChannelKind;\n count: number;\n}\n\n/** Totals from the immutable evidence selected by campaign pacing rules. */\nexport interface CampaignMetricTotals {\n spendCents: number;\n impressions: number;\n clicks: number;\n conversions: number;\n leads: number;\n revenueCents: number;\n}\n\nexport interface CampaignReportingItem {\n campaign: Campaign;\n channelCount: number;\n channelMix: CampaignChannelMixEntry[];\n metricTotals: CampaignMetricTotals;\n pacing: BudgetPacingResult;\n}\n\nexport interface CampaignReportingPage {\n items: CampaignReportingItem[];\n nextCursor: CampaignCustomerCursor | null;\n}\n\nexport interface CampaignCustomerSummary {\n customerId: string;\n totalCount: number;\n activeCount: number;\n latestStartAt: Date | null;\n}\n\nexport interface CampaignChannelOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n campaignId?: string;\n channelKind?: CampaignChannelKind;\n channelRef?: string;\n allocatedBudgetCents?: number;\n startAt?: Date | string | number | null;\n endAt?: Date | string | number | null;\n status?: CampaignChannelStatus;\n}\n\nexport interface CampaignMetricSnapshotOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n campaignId?: string;\n campaignChannelId?: string | null;\n periodStart?: Date | string | number;\n periodEnd?: Date | string | number;\n spendCents?: number;\n impressions?: number;\n clicks?: number;\n conversions?: number;\n leads?: number;\n revenueCents?: number | null;\n source?: string;\n dedupeKey?: string;\n}\n\nexport type BudgetPacingStatus =\n | 'unbudgeted'\n | 'not_started'\n | 'behind'\n | 'on_track'\n | 'ahead'\n | 'over_budget'\n | 'complete';\n\nexport interface BudgetPacingResult {\n campaignId: string;\n campaignChannelId?: string;\n currency: string;\n budgetCents: number;\n spendCents: number;\n remainingCents: number;\n expectedSpendCents: number | null;\n varianceCents: number | null;\n budgetFraction: number | null;\n elapsedFraction: number | null;\n status: BudgetPacingStatus;\n snapshotCount: number;\n usedCampaignRollups: boolean;\n}\n"],"mappings":";AAKO,IAAM,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;AACF;AAIO,IAAM,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;AACF;AAMO,IAAM,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;AACF"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-marketing",
3
- "version": "0.43.9",
3
+ "version": "0.44.0",
4
+ "smrtJsdoc": "strict",
4
5
  "description": "Cross-channel campaign coordination, immutable performance evidence, budget pacing, and reusable Svelte marketing surfaces for SMRT",
5
6
  "type": "module",
6
7
  "main": "./dist/index.js",
@@ -24,9 +25,9 @@
24
25
  "./manifest.json": "./dist/manifest.json"
25
26
  },
26
27
  "dependencies": {
27
- "@happyvertical/smrt-core": "0.43.9",
28
- "@happyvertical/smrt-tenancy": "0.43.9",
29
- "@happyvertical/smrt-ui": "0.43.9"
28
+ "@happyvertical/smrt-ui": "0.44.0",
29
+ "@happyvertical/smrt-core": "0.44.0",
30
+ "@happyvertical/smrt-tenancy": "0.44.0"
30
31
  },
31
32
  "peerDependencies": {
32
33
  "svelte": "^5.56.4"
@@ -43,8 +44,8 @@
43
44
  "typescript": "5.9.3",
44
45
  "vite": "8.1.4",
45
46
  "vitest": "4.1.10",
46
- "@happyvertical/smrt-commerce": "0.43.9",
47
- "@happyvertical/smrt-vitest": "0.43.9"
47
+ "@happyvertical/smrt-commerce": "0.44.0",
48
+ "@happyvertical/smrt-vitest": "0.44.0"
48
49
  },
49
50
  "smrtRawPrimitives": "strict",
50
51
  "keywords": [