@iann29/rastro 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/agent/integration.md +23 -1
- package/agent/manifest.json +4 -4
- package/dist/client/federation.d.ts +114 -9
- package/dist/client/federation.d.ts.map +1 -1
- package/dist/client/federation.js +54 -2
- package/dist/client/federation.js.map +1 -1
- package/dist/client/index.d.ts +642 -8
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +391 -9
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +14 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +278 -1
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/_generated/server.d.ts +4 -0
- package/dist/component/_generated/server.d.ts.map +1 -1
- package/dist/component/_generated/server.js.map +1 -1
- package/dist/component/constants.d.ts +5 -0
- package/dist/component/constants.d.ts.map +1 -1
- package/dist/component/constants.js +10 -0
- package/dist/component/constants.js.map +1 -1
- package/dist/component/convex.config.d.ts +4 -0
- package/dist/component/convex.config.js +9 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/errors.d.ts +1 -1
- package/dist/component/errors.d.ts.map +1 -1
- package/dist/component/errors.js.map +1 -1
- package/dist/component/leads.d.ts +69 -3
- package/dist/component/leads.d.ts.map +1 -1
- package/dist/component/leads.js +419 -16
- package/dist/component/leads.js.map +1 -1
- package/dist/component/meta.d.ts +358 -0
- package/dist/component/meta.d.ts.map +1 -0
- package/dist/component/meta.js +1295 -0
- package/dist/component/meta.js.map +1 -0
- package/dist/component/metaCapi.d.ts +162 -0
- package/dist/component/metaCapi.d.ts.map +1 -0
- package/dist/component/metaCapi.js +754 -0
- package/dist/component/metaCapi.js.map +1 -0
- package/dist/component/metaFake.d.ts +5 -0
- package/dist/component/metaFake.d.ts.map +1 -0
- package/dist/component/metaFake.js +225 -0
- package/dist/component/metaFake.js.map +1 -0
- package/dist/component/metaGraph.d.ts +165 -0
- package/dist/component/metaGraph.d.ts.map +1 -0
- package/dist/component/metaGraph.js +507 -0
- package/dist/component/metaGraph.js.map +1 -0
- package/dist/component/metaSync.d.ts +186 -0
- package/dist/component/metaSync.d.ts.map +1 -0
- package/dist/component/metaSync.js +961 -0
- package/dist/component/metaSync.js.map +1 -0
- package/dist/component/pipeline.d.ts +99 -0
- package/dist/component/pipeline.d.ts.map +1 -0
- package/dist/component/pipeline.js +337 -0
- package/dist/component/pipeline.js.map +1 -0
- package/dist/component/schema.d.ts +404 -2
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +168 -2
- package/dist/component/schema.js.map +1 -1
- package/dist/component/secrets.d.ts +15 -0
- package/dist/component/secrets.d.ts.map +1 -0
- package/dist/component/secrets.js +67 -0
- package/dist/component/secrets.js.map +1 -0
- package/dist/component/validators.d.ts +1052 -15
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +307 -3
- package/dist/component/validators.js.map +1 -1
- package/dist/tracker/generated.d.ts +1 -1
- package/dist/tracker/generated.d.ts.map +1 -1
- package/dist/tracker/generated.js +1 -1
- package/dist/tracker/generated.js.map +1 -1
- package/dist/ui/campaigns/CampaignsView.d.ts +48 -0
- package/dist/ui/campaigns/CampaignsView.d.ts.map +1 -0
- package/dist/ui/campaigns/CampaignsView.js +47 -0
- package/dist/ui/campaigns/CampaignsView.js.map +1 -0
- package/dist/ui/campaigns/Conversions.d.ts +16 -0
- package/dist/ui/campaigns/Conversions.d.ts.map +1 -0
- package/dist/ui/campaigns/Conversions.js +40 -0
- package/dist/ui/campaigns/Conversions.js.map +1 -0
- package/dist/ui/campaigns/Drawer.d.ts +24 -0
- package/dist/ui/campaigns/Drawer.d.ts.map +1 -0
- package/dist/ui/campaigns/Drawer.js +120 -0
- package/dist/ui/campaigns/Drawer.js.map +1 -0
- package/dist/ui/campaigns/Icons.d.ts +35 -0
- package/dist/ui/campaigns/Icons.d.ts.map +1 -0
- package/dist/ui/campaigns/Icons.js +41 -0
- package/dist/ui/campaigns/Icons.js.map +1 -0
- package/dist/ui/campaigns/Summary.d.ts +21 -0
- package/dist/ui/campaigns/Summary.d.ts.map +1 -0
- package/dist/ui/campaigns/Summary.js +56 -0
- package/dist/ui/campaigns/Summary.js.map +1 -0
- package/dist/ui/campaigns/Thumbnail.d.ts +11 -0
- package/dist/ui/campaigns/Thumbnail.d.ts.map +1 -0
- package/dist/ui/campaigns/Thumbnail.js +23 -0
- package/dist/ui/campaigns/Thumbnail.js.map +1 -0
- package/dist/ui/campaigns/Tree.d.ts +12 -0
- package/dist/ui/campaigns/Tree.d.ts.map +1 -0
- package/dist/ui/campaigns/Tree.js +105 -0
- package/dist/ui/campaigns/Tree.js.map +1 -0
- package/dist/ui/campaigns/glyphs.d.ts +20 -0
- package/dist/ui/campaigns/glyphs.d.ts.map +1 -0
- package/dist/ui/campaigns/glyphs.js +19 -0
- package/dist/ui/campaigns/glyphs.js.map +1 -0
- package/dist/ui/campaigns/index.d.ts +4 -0
- package/dist/ui/campaigns/index.d.ts.map +1 -0
- package/dist/ui/campaigns/index.js +3 -0
- package/dist/ui/campaigns/index.js.map +1 -0
- package/dist/ui/campaigns/labels.d.ts +53 -0
- package/dist/ui/campaigns/labels.d.ts.map +1 -0
- package/dist/ui/campaigns/labels.js +169 -0
- package/dist/ui/campaigns/labels.js.map +1 -0
- package/dist/ui/campaigns/model.d.ts +99 -0
- package/dist/ui/campaigns/model.d.ts.map +1 -0
- package/dist/ui/campaigns/model.js +230 -0
- package/dist/ui/campaigns/model.js.map +1 -0
- package/dist/ui/campaigns/modes.d.ts +18 -0
- package/dist/ui/campaigns/modes.d.ts.map +1 -0
- package/dist/ui/campaigns/modes.js +7 -0
- package/dist/ui/campaigns/modes.js.map +1 -0
- package/dist/ui/index.d.ts +21 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +20 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/integrations/AccountPicker.d.ts +26 -0
- package/dist/ui/integrations/AccountPicker.d.ts.map +1 -0
- package/dist/ui/integrations/AccountPicker.js +101 -0
- package/dist/ui/integrations/AccountPicker.js.map +1 -0
- package/dist/ui/integrations/ClientCards.d.ts +17 -0
- package/dist/ui/integrations/ClientCards.d.ts.map +1 -0
- package/dist/ui/integrations/ClientCards.js +42 -0
- package/dist/ui/integrations/ClientCards.js.map +1 -0
- package/dist/ui/integrations/ClientsTable.d.ts +36 -0
- package/dist/ui/integrations/ClientsTable.d.ts.map +1 -0
- package/dist/ui/integrations/ClientsTable.js +143 -0
- package/dist/ui/integrations/ClientsTable.js.map +1 -0
- package/dist/ui/integrations/Connect.d.ts +35 -0
- package/dist/ui/integrations/Connect.d.ts.map +1 -0
- package/dist/ui/integrations/Connect.js +62 -0
- package/dist/ui/integrations/Connect.js.map +1 -0
- package/dist/ui/integrations/Connection.d.ts +37 -0
- package/dist/ui/integrations/Connection.d.ts.map +1 -0
- package/dist/ui/integrations/Connection.js +108 -0
- package/dist/ui/integrations/Connection.js.map +1 -0
- package/dist/ui/integrations/Dialogs.d.ts +21 -0
- package/dist/ui/integrations/Dialogs.d.ts.map +1 -0
- package/dist/ui/integrations/Dialogs.js +34 -0
- package/dist/ui/integrations/Dialogs.js.map +1 -0
- package/dist/ui/integrations/EventsFeed.d.ts +15 -0
- package/dist/ui/integrations/EventsFeed.d.ts.map +1 -0
- package/dist/ui/integrations/EventsFeed.js +61 -0
- package/dist/ui/integrations/EventsFeed.js.map +1 -0
- package/dist/ui/integrations/EventsSheet.d.ts +34 -0
- package/dist/ui/integrations/EventsSheet.d.ts.map +1 -0
- package/dist/ui/integrations/EventsSheet.js +136 -0
- package/dist/ui/integrations/EventsSheet.js.map +1 -0
- package/dist/ui/integrations/Icons.d.ts +38 -0
- package/dist/ui/integrations/Icons.d.ts.map +1 -0
- package/dist/ui/integrations/Icons.js +40 -0
- package/dist/ui/integrations/Icons.js.map +1 -0
- package/dist/ui/integrations/IntegrationsView.d.ts +15 -0
- package/dist/ui/integrations/IntegrationsView.d.ts.map +1 -0
- package/dist/ui/integrations/IntegrationsView.js +141 -0
- package/dist/ui/integrations/IntegrationsView.js.map +1 -0
- package/dist/ui/integrations/Overlay.d.ts +18 -0
- package/dist/ui/integrations/Overlay.d.ts.map +1 -0
- package/dist/ui/integrations/Overlay.js +36 -0
- package/dist/ui/integrations/Overlay.js.map +1 -0
- package/dist/ui/integrations/Partner.d.ts +14 -0
- package/dist/ui/integrations/Partner.d.ts.map +1 -0
- package/dist/ui/integrations/Partner.js +38 -0
- package/dist/ui/integrations/Partner.js.map +1 -0
- package/dist/ui/integrations/RowMenu.d.ts +15 -0
- package/dist/ui/integrations/RowMenu.d.ts.map +1 -0
- package/dist/ui/integrations/RowMenu.js +47 -0
- package/dist/ui/integrations/RowMenu.js.map +1 -0
- package/dist/ui/integrations/UnlinkDialog.d.ts +18 -0
- package/dist/ui/integrations/UnlinkDialog.d.ts.map +1 -0
- package/dist/ui/integrations/UnlinkDialog.js +29 -0
- package/dist/ui/integrations/UnlinkDialog.js.map +1 -0
- package/dist/ui/integrations/audience.d.ts +12 -0
- package/dist/ui/integrations/audience.d.ts.map +1 -0
- package/dist/ui/integrations/audience.js +12 -0
- package/dist/ui/integrations/audience.js.map +1 -0
- package/dist/ui/integrations/format.d.ts +28 -0
- package/dist/ui/integrations/format.d.ts.map +1 -0
- package/dist/ui/integrations/format.js +101 -0
- package/dist/ui/integrations/format.js.map +1 -0
- package/dist/ui/integrations/index.d.ts +5 -0
- package/dist/ui/integrations/index.d.ts.map +1 -0
- package/dist/ui/integrations/index.js +3 -0
- package/dist/ui/integrations/index.js.map +1 -0
- package/dist/ui/integrations/modal.d.ts +10 -0
- package/dist/ui/integrations/modal.d.ts.map +1 -0
- package/dist/ui/integrations/modal.js +77 -0
- package/dist/ui/integrations/modal.js.map +1 -0
- package/dist/ui/integrations/model.d.ts +99 -0
- package/dist/ui/integrations/model.d.ts.map +1 -0
- package/dist/ui/integrations/model.js +164 -0
- package/dist/ui/integrations/model.js.map +1 -0
- package/dist/ui/integrations/parts.d.ts +36 -0
- package/dist/ui/integrations/parts.d.ts.map +1 -0
- package/dist/ui/integrations/parts.js +85 -0
- package/dist/ui/integrations/parts.js.map +1 -0
- package/dist/ui/integrations/types.d.ts +146 -0
- package/dist/ui/integrations/types.d.ts.map +1 -0
- package/dist/ui/integrations/types.js +2 -0
- package/dist/ui/integrations/types.js.map +1 -0
- package/dist/ui/metrics.d.ts +106 -0
- package/dist/ui/metrics.d.ts.map +1 -0
- package/dist/ui/metrics.js +166 -0
- package/dist/ui/metrics.js.map +1 -0
- package/dist/ui/portfolio/PortfolioView.d.ts +26 -0
- package/dist/ui/portfolio/PortfolioView.d.ts.map +1 -0
- package/dist/ui/portfolio/PortfolioView.js +216 -0
- package/dist/ui/portfolio/PortfolioView.js.map +1 -0
- package/dist/ui/portfolio/SpendChart.d.ts +10 -0
- package/dist/ui/portfolio/SpendChart.d.ts.map +1 -0
- package/dist/ui/portfolio/SpendChart.js +196 -0
- package/dist/ui/portfolio/SpendChart.js.map +1 -0
- package/dist/ui/portfolio/alerts.d.ts +74 -0
- package/dist/ui/portfolio/alerts.d.ts.map +1 -0
- package/dist/ui/portfolio/alerts.js +291 -0
- package/dist/ui/portfolio/alerts.js.map +1 -0
- package/dist/ui/portfolio/figures.d.ts +79 -0
- package/dist/ui/portfolio/figures.d.ts.map +1 -0
- package/dist/ui/portfolio/figures.js +103 -0
- package/dist/ui/portfolio/figures.js.map +1 -0
- package/dist/ui/portfolio/format.d.ts +8 -0
- package/dist/ui/portfolio/format.d.ts.map +1 -0
- package/dist/ui/portfolio/format.js +28 -0
- package/dist/ui/portfolio/format.js.map +1 -0
- package/dist/ui/sample.d.ts +536 -0
- package/dist/ui/sample.d.ts.map +1 -0
- package/dist/ui/sample.js +574 -0
- package/dist/ui/sample.js.map +1 -0
- package/dist/ui/seed.d.ts +188 -0
- package/dist/ui/seed.d.ts.map +1 -0
- package/dist/ui/seed.js +563 -0
- package/dist/ui/seed.js.map +1 -0
- package/dist/ui/ui.css +3424 -0
- package/docs/federation.md +46 -1
- package/docs/meta-ads.md +795 -0
- package/docs/upgrading.md +116 -0
- package/llms.txt +3 -0
- package/package.json +15 -3
- package/src/component/_generated/api.ts +14 -0
- package/src/component/_generated/component.ts +324 -1
- package/src/component/_generated/server.ts +4 -0
- package/src/component/constants.ts +10 -0
- package/src/component/convex.config.ts +9 -0
- package/src/component/errors.ts +5 -1
- package/src/component/leads.ts +517 -17
- package/src/component/meta.ts +1525 -0
- package/src/component/metaCapi.ts +921 -0
- package/src/component/metaFake.ts +277 -0
- package/src/component/metaGraph.ts +722 -0
- package/src/component/metaSync.ts +1164 -0
- package/src/component/pipeline.ts +410 -0
- package/src/component/schema.ts +197 -1
- package/src/component/secrets.ts +98 -0
- package/src/component/validators.ts +376 -3
- package/src/tracker/generated.ts +1 -1
- package/src/ui/seed.ts +755 -0
package/dist/client/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { localDayStart, nextLocalDayStart, previousLocalDayStart, } from "../com
|
|
|
15
15
|
export { HEAT_HOT_SCORE, HEAT_WARM_SCORE, visitorHeat } from "./heat.js";
|
|
16
16
|
export type { HeatInput, HeatLevel, HeatSignal, VisitorHeat } from "./heat.js";
|
|
17
17
|
export type { VitalMetric } from "../component/vitals.js";
|
|
18
|
-
export { effectiveFederatedPermissions, federatedPermissionSatisfies, isPublicFederatedAccess, FEDERATED_ANALYTICS_CLAIMS, FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS, FEDERATED_ANALYTICS_CONFIGURE_PERMISSION, FEDERATED_ANALYTICS_CONNECTOR_MANIFEST, FEDERATED_ANALYTICS_ERROR_CODES, FEDERATED_ANALYTICS_LEAD_FUNCTIONS, FEDERATED_ANALYTICS_PERMISSIONS, FEDERATED_ANALYTICS_PUBLIC_FUNCTIONS, FEDERATED_ANALYTICS_PUBLIC_PERMISSION, FEDERATED_ANALYTICS_READ_PERMISSION, FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES, FEDERATED_ANALYTICS_REQUIRED_FUNCTIONS, federatedAnalyticsPermissionValidator, } from "./federation.js";
|
|
18
|
+
export { effectiveFederatedPermissions, federatedPermissionSatisfies, isPublicFederatedAccess, FEDERATED_ANALYTICS_CLAIMS, FEDERATED_ANALYTICS_CONFIGURE_FUNCTIONS, FEDERATED_ANALYTICS_CONFIGURE_PERMISSION, FEDERATED_ANALYTICS_CONNECTOR_MANIFEST, FEDERATED_ANALYTICS_ERROR_CODES, FEDERATED_ANALYTICS_LEAD_FUNCTIONS, FEDERATED_ANALYTICS_META_AUTHORIZER, FEDERATED_ANALYTICS_META_FUNCTIONS, FEDERATED_ANALYTICS_PERMISSIONS, federatedMetaOwnerKey, FEDERATED_ANALYTICS_PUBLIC_FUNCTIONS, FEDERATED_ANALYTICS_PUBLIC_PERMISSION, FEDERATED_ANALYTICS_READ_PERMISSION, FEDERATED_ANALYTICS_REQUIRED_CAPABILITIES, FEDERATED_ANALYTICS_REQUIRED_FUNCTIONS, federatedAnalyticsPermissionValidator, } from "./federation.js";
|
|
19
19
|
export type { FederatedAnalyticsCapability, FederatedAnalyticsAuthorizerOptions, FederatedAnalyticsConnection, FederatedAnalyticsConnectionStatus, FederatedAnalyticsErrorCode, FederatedAnalyticsIdentity, FederatedAnalyticsManifest, FederatedAnalyticsPermission, FederatedSiteSummary, ResolveFederatedAnalyticsConnection, } from "./federation.js";
|
|
20
20
|
export type CreateSiteInput = FunctionArgs<ComponentApi["sites"]["create"]>;
|
|
21
21
|
export type ListPeopleInput = FunctionArgs<ComponentApi["people"]["list"]>;
|
|
@@ -69,14 +69,68 @@ export type CreateTrackedLinkInput = FunctionArgs<ComponentApi["trackedLinks"]["
|
|
|
69
69
|
export type UpdateTrackedLinkInput = FunctionArgs<ComponentApi["trackedLinks"]["update"]>;
|
|
70
70
|
export type ListTrackedLinksInput = FunctionArgs<ComponentApi["trackedLinks"]["list"]>;
|
|
71
71
|
export type TrackedLink = FunctionReturnType<ComponentApi["trackedLinks"]["list"]>[number];
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
/**
|
|
73
|
+
* What the host knows of a lead's contact for the Meta pixel, every value
|
|
74
|
+
* already a SHA-256 hex digest: the phone numbers (digits with the country
|
|
75
|
+
* code) and the host's own contact id.
|
|
76
|
+
*/
|
|
77
|
+
export type MetaHashes = {
|
|
78
|
+
ph: string[];
|
|
79
|
+
externalId?: string;
|
|
80
|
+
};
|
|
81
|
+
export type RecordLeadInput = Omit<FunctionArgs<ComponentApi["leads"]["record"]>, "meta"> & {
|
|
82
|
+
meta?: MetaHashes;
|
|
83
|
+
};
|
|
84
|
+
export type SetLeadStageInput = Omit<FunctionArgs<ComponentApi["leads"]["setStage"]>, "meta"> & {
|
|
85
|
+
meta?: MetaHashes;
|
|
86
|
+
};
|
|
74
87
|
export type UpsertAdCatalogInput = FunctionArgs<ComponentApi["leads"]["upsertAdCatalog"]>;
|
|
75
88
|
export type LeadsReportInput = FunctionArgs<ComponentApi["leads"]["report"]>;
|
|
76
89
|
export type LeadsReport = FunctionReturnType<ComponentApi["leads"]["report"]>;
|
|
77
90
|
export type ListLeadsInput = FunctionArgs<ComponentApi["leads"]["list"]>;
|
|
78
91
|
export type LeadSummary = FunctionReturnType<ComponentApi["leads"]["list"]>[number];
|
|
79
92
|
export type LeadJourney = FunctionReturnType<ComponentApi["leads"]["journey"]>;
|
|
93
|
+
export type LeadsDailyInput = FunctionArgs<ComponentApi["leads"]["daily"]>;
|
|
94
|
+
export type LeadsDaily = FunctionReturnType<ComponentApi["leads"]["daily"]>;
|
|
95
|
+
export type MetaStatus = FunctionReturnType<ComponentApi["meta"]["status"]>;
|
|
96
|
+
export type MetaConversionsInput = FunctionArgs<ComponentApi["meta"]["conversions"]>;
|
|
97
|
+
export type MetaConversion = FunctionReturnType<ComponentApi["meta"]["conversions"]>[number];
|
|
98
|
+
export type MetaAdAccount = FunctionReturnType<ComponentApi["meta"]["listAdAccounts"]>[number];
|
|
99
|
+
export type SetMetaConnectionInput = FunctionArgs<ComponentApi["meta"]["connect"]>;
|
|
100
|
+
export type SetMetaConnectionOutput = FunctionReturnType<ComponentApi["meta"]["connect"]>;
|
|
101
|
+
export type LinkSiteAdAccountInput = FunctionArgs<ComponentApi["meta"]["linkAdAccount"]>;
|
|
102
|
+
/**
|
|
103
|
+
* The site's pixel, picked from an owner's connection (`ownerKey`: it sends
|
|
104
|
+
* with that connection's token) or set with its own Conversions API token
|
|
105
|
+
* (`accessToken`, plan B). Exactly one of the two.
|
|
106
|
+
*/
|
|
107
|
+
export type SetSitePixelInput = Omit<FunctionArgs<ComponentApi["meta"]["setPixel"]>, "accessToken" | "ownerKey"> & ({
|
|
108
|
+
ownerKey: string;
|
|
109
|
+
accessToken?: never;
|
|
110
|
+
} | {
|
|
111
|
+
accessToken: string;
|
|
112
|
+
ownerKey?: never;
|
|
113
|
+
});
|
|
114
|
+
export type ConnectMetaWithCodeInput = FunctionArgs<ComponentApi["meta"]["connectWithCode"]>;
|
|
115
|
+
export type ConnectMetaWithCodeOutput = FunctionReturnType<ComponentApi["meta"]["connectWithCode"]>;
|
|
116
|
+
/** An owner's Meta connection as a screen shows it (never a token). */
|
|
117
|
+
export type MetaConnection = NonNullable<FunctionReturnType<ComponentApi["meta"]["connection"]>>;
|
|
118
|
+
export type MetaConnectionAdAccount = MetaConnection["adAccounts"][number];
|
|
119
|
+
export type MetaPixel = MetaConnection["pixels"][number];
|
|
120
|
+
/** Where a site's pixel sends from: a connection's token, or its own. */
|
|
121
|
+
export type MetaPixelSource = "connection" | "token";
|
|
122
|
+
export type SetPipelineInput = FunctionArgs<ComponentApi["pipeline"]["setPipeline"]>;
|
|
123
|
+
export type PipelineColumn = SetPipelineInput["columns"][number];
|
|
124
|
+
export type SetEventMapInput = FunctionArgs<ComponentApi["pipeline"]["setEventMap"]>;
|
|
125
|
+
export type EventMapInput = FunctionArgs<ComponentApi["pipeline"]["eventMap"]>;
|
|
126
|
+
/** A site's columns, the Meta event each sends and its monthly entries. */
|
|
127
|
+
export type EventMap = FunctionReturnType<ComponentApi["pipeline"]["eventMap"]>;
|
|
128
|
+
export type EventMapColumn = EventMap["columns"][number];
|
|
129
|
+
/** The events a column may send; `Purchase` comes from the sale alone. */
|
|
130
|
+
export type MetaColumnEvent = NonNullable<EventMapColumn["event"]>;
|
|
131
|
+
export type UnlinkPreviewInput = FunctionArgs<ComponentApi["meta"]["unlinkPreview"]>;
|
|
132
|
+
/** What unlinking an ad account takes out of the site's reports. */
|
|
133
|
+
export type UnlinkPreview = FunctionReturnType<ComponentApi["meta"]["unlinkPreview"]>;
|
|
80
134
|
export type CleanupInput = {
|
|
81
135
|
siteId: string;
|
|
82
136
|
kind: RetentionKind;
|
|
@@ -918,7 +972,9 @@ export declare class Rastro {
|
|
|
918
972
|
* Records a lead the host's server saw (a WhatsApp conversation), once per
|
|
919
973
|
* `leadKey`: pass the host's own opaque id for the conversation, never a
|
|
920
974
|
* phone number. The first touch wins; a repeat call only fills `label` or
|
|
921
|
-
* `visitorId`. Call it from the host's inbound handler.
|
|
975
|
+
* `visitorId`. Call it from the host's inbound handler. `meta` (SHA-256
|
|
976
|
+
* hashes of the phone and the contact id) lets the site's Meta pixel
|
|
977
|
+
* receive `Lead` when the pixel sends new leads.
|
|
922
978
|
*/
|
|
923
979
|
recordLead(ctx: MutationCtx, args: RecordLeadInput): Promise<{
|
|
924
980
|
created: boolean;
|
|
@@ -926,8 +982,11 @@ export declare class Rastro {
|
|
|
926
982
|
}>;
|
|
927
983
|
/**
|
|
928
984
|
* Moves a recorded lead to `qualified`, `won` (with the sale value in the
|
|
929
|
-
* site's currency), `lost`, or back `open
|
|
930
|
-
*
|
|
985
|
+
* site's currency), `lost`, or back `open`, and/or to the host's board
|
|
986
|
+
* `column` (see `setPipeline`). Idempotent by `eventId`; a lead never
|
|
987
|
+
* recorded returns `applied: false` instead of being invented. With `meta`
|
|
988
|
+
* (SHA-256 hashes) and an active pixel, a sale with a value is sent to Meta
|
|
989
|
+
* as `Purchase` and a mapped column's event goes out, once per lead each.
|
|
931
990
|
*/
|
|
932
991
|
setLeadStage(ctx: MutationCtx, args: SetLeadStageInput): Promise<{
|
|
933
992
|
applied: boolean;
|
|
@@ -941,48 +1000,85 @@ export declare class Rastro {
|
|
|
941
1000
|
upserted: number;
|
|
942
1001
|
}>;
|
|
943
1002
|
leadsReport(ctx: QueryCtx | MutationCtx | ActionCtx, args: LeadsReportInput): Promise<{
|
|
1003
|
+
bySite?: Array<{
|
|
1004
|
+
currencyMismatch?: boolean;
|
|
1005
|
+
leads: number;
|
|
1006
|
+
paid: {
|
|
1007
|
+
leads: number;
|
|
1008
|
+
qualified: number;
|
|
1009
|
+
revenueCents: number;
|
|
1010
|
+
won: number;
|
|
1011
|
+
};
|
|
1012
|
+
qualified: number;
|
|
1013
|
+
revenueCents: number;
|
|
1014
|
+
siteId: string;
|
|
1015
|
+
spendCents?: number | null;
|
|
1016
|
+
spendCurrency?: string | null;
|
|
1017
|
+
won: number;
|
|
1018
|
+
}>;
|
|
944
1019
|
campaigns: Array<{
|
|
945
1020
|
adsets: Array<{
|
|
946
1021
|
ads: Array<{
|
|
947
1022
|
adId: string;
|
|
948
1023
|
adName: string | null;
|
|
1024
|
+
adStatus?: string | null;
|
|
1025
|
+
clicks?: number | null;
|
|
1026
|
+
creativeType?: string | null;
|
|
1027
|
+
impressions?: number | null;
|
|
949
1028
|
leads: number;
|
|
950
1029
|
qualified: number;
|
|
951
1030
|
revenueCents: number;
|
|
1031
|
+
siteId?: string;
|
|
952
1032
|
sourceApp: string | null;
|
|
953
1033
|
sourceUrl: string | null;
|
|
1034
|
+
spendCents?: number | null;
|
|
954
1035
|
thumbnailUrl: string | null;
|
|
955
1036
|
title: string | null;
|
|
956
1037
|
won: number;
|
|
957
1038
|
}>;
|
|
958
1039
|
adsetId: string | null;
|
|
959
1040
|
adsetName: string | null;
|
|
1041
|
+
clicks?: number | null;
|
|
1042
|
+
impressions?: number | null;
|
|
960
1043
|
leads: number;
|
|
961
1044
|
qualified: number;
|
|
962
1045
|
revenueCents: number;
|
|
1046
|
+
spendCents?: number | null;
|
|
963
1047
|
won: number;
|
|
964
1048
|
}>;
|
|
965
1049
|
campaignId: string | null;
|
|
966
1050
|
campaignName: string | null;
|
|
1051
|
+
clicks?: number | null;
|
|
1052
|
+
impressions?: number | null;
|
|
967
1053
|
leads: number;
|
|
968
1054
|
qualified: number;
|
|
969
1055
|
revenueCents: number;
|
|
1056
|
+
spendCents?: number | null;
|
|
970
1057
|
won: number;
|
|
971
1058
|
}>;
|
|
972
1059
|
currency: string | null;
|
|
1060
|
+
currencyMismatch?: boolean;
|
|
973
1061
|
from: number;
|
|
974
1062
|
origins: Array<{
|
|
1063
|
+
clicks?: number | null;
|
|
1064
|
+
impressions?: number | null;
|
|
975
1065
|
key: string;
|
|
976
1066
|
leads: number;
|
|
977
1067
|
qualified: number;
|
|
978
1068
|
revenueCents: number;
|
|
1069
|
+
spendCents?: number | null;
|
|
979
1070
|
won: number;
|
|
980
1071
|
}>;
|
|
1072
|
+
spendCurrency?: string | null;
|
|
1073
|
+
spendIncomplete?: boolean;
|
|
981
1074
|
to: number;
|
|
982
1075
|
totals: {
|
|
1076
|
+
clicks?: number | null;
|
|
1077
|
+
impressions?: number | null;
|
|
983
1078
|
leads: number;
|
|
984
1079
|
qualified: number;
|
|
985
1080
|
revenueCents: number;
|
|
1081
|
+
spendCents?: number | null;
|
|
986
1082
|
won: number;
|
|
987
1083
|
};
|
|
988
1084
|
}>;
|
|
@@ -1036,6 +1132,189 @@ export declare class Rastro {
|
|
|
1036
1132
|
};
|
|
1037
1133
|
visitorId: string | null;
|
|
1038
1134
|
} | null>;
|
|
1135
|
+
/**
|
|
1136
|
+
* The lead funnel per cohort day (every UTC day in the range, empty days
|
|
1137
|
+
* included), optionally for one ad, with that day's Meta spend.
|
|
1138
|
+
*/
|
|
1139
|
+
leadsDaily(ctx: QueryCtx | MutationCtx | ActionCtx, args: LeadsDailyInput): Promise<{
|
|
1140
|
+
dayStart: number;
|
|
1141
|
+
leads: number;
|
|
1142
|
+
qualified: number;
|
|
1143
|
+
revenueCents: number;
|
|
1144
|
+
spendCents: number | null;
|
|
1145
|
+
won: number;
|
|
1146
|
+
}[]>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Where each site stands with Meta: linked ad accounts, pixel, sends. With
|
|
1149
|
+
* `ownerKey`, each link and the pixel say whether that owner made them
|
|
1150
|
+
* (`own`).
|
|
1151
|
+
*/
|
|
1152
|
+
metaStatus(ctx: QueryCtx | MutationCtx | ActionCtx, args: {
|
|
1153
|
+
siteIds: string[];
|
|
1154
|
+
ownerKey?: string;
|
|
1155
|
+
now?: number;
|
|
1156
|
+
}): Promise<{
|
|
1157
|
+
adAccounts: Array<{
|
|
1158
|
+
adAccountId: string;
|
|
1159
|
+
backfill?: {
|
|
1160
|
+
done: number;
|
|
1161
|
+
total: number;
|
|
1162
|
+
} | null;
|
|
1163
|
+
currency: string;
|
|
1164
|
+
lastError: string | null;
|
|
1165
|
+
lastSyncAt: number | null;
|
|
1166
|
+
name: string;
|
|
1167
|
+
own?: boolean;
|
|
1168
|
+
syncState: "backfill" | "live" | "error";
|
|
1169
|
+
timezone: string;
|
|
1170
|
+
}>;
|
|
1171
|
+
conversions: {
|
|
1172
|
+
failed: number;
|
|
1173
|
+
last30d?: {
|
|
1174
|
+
Lead: number;
|
|
1175
|
+
Purchase: number;
|
|
1176
|
+
QualifiedLead: number;
|
|
1177
|
+
Schedule: number;
|
|
1178
|
+
} | null;
|
|
1179
|
+
pending: number;
|
|
1180
|
+
sent: number;
|
|
1181
|
+
sentToday?: number | null;
|
|
1182
|
+
};
|
|
1183
|
+
linked: boolean;
|
|
1184
|
+
pixel: {
|
|
1185
|
+
enabled: boolean;
|
|
1186
|
+
lastError?: string | null;
|
|
1187
|
+
name?: string | null;
|
|
1188
|
+
own?: boolean;
|
|
1189
|
+
pixelId: string | null;
|
|
1190
|
+
source?: "connection" | "token" | null;
|
|
1191
|
+
testMode?: boolean;
|
|
1192
|
+
};
|
|
1193
|
+
siteId: string;
|
|
1194
|
+
}[]>;
|
|
1195
|
+
/** The site's latest conversions for its Meta pixel, without user data. */
|
|
1196
|
+
metaConversions(ctx: QueryCtx | MutationCtx | ActionCtx, args: MetaConversionsInput): Promise<{
|
|
1197
|
+
adId: string | null;
|
|
1198
|
+
adName: string | null;
|
|
1199
|
+
createdAt: number;
|
|
1200
|
+
eventId: string;
|
|
1201
|
+
eventName: "Lead" | "QualifiedLead" | "Schedule" | "Purchase";
|
|
1202
|
+
leadId: string | null;
|
|
1203
|
+
leadLabel: string | null;
|
|
1204
|
+
sentAt: number | null;
|
|
1205
|
+
status: "pending" | "sent" | "failed";
|
|
1206
|
+
valueCents: number | null;
|
|
1207
|
+
}[]>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Validates a Meta token (a system user token with `ads_read`) for the
|
|
1210
|
+
* host's opaque `ownerKey`, lists its ad accounts and stores the token
|
|
1211
|
+
* encrypted with RASTRO_SECRETS_KEY. Pasting a new token for the same owner
|
|
1212
|
+
* replaces the old one. Fails with `SECRETS_KEY_MISSING` without the key and
|
|
1213
|
+
* `META_TOKEN_INVALID` when Meta refuses the token.
|
|
1214
|
+
*/
|
|
1215
|
+
setMetaConnection(ctx: ActionCtx, args: SetMetaConnectionInput): Promise<SetMetaConnectionOutput>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Facebook Login for Business: trades the `code` Meta sent to `redirectUri`
|
|
1218
|
+
* for the owner's token (with the component's RASTRO_META_APP_ID/SECRET),
|
|
1219
|
+
* then connects it like `setMetaConnection` and records who authorized it.
|
|
1220
|
+
* Fails with `META_LOGIN_UNAVAILABLE` without the app env and
|
|
1221
|
+
* `META_TOKEN_INVALID` when Meta refuses the code.
|
|
1222
|
+
*/
|
|
1223
|
+
connectMetaWithCode(ctx: ActionCtx, args: ConnectMetaWithCodeInput): Promise<ConnectMetaWithCodeOutput>;
|
|
1224
|
+
/**
|
|
1225
|
+
* The owner's connection for a screen: status, who authorized it, the
|
|
1226
|
+
* listed ad accounts with the site each feeds, the listed pixels. Null when
|
|
1227
|
+
* the owner never connected. Never a token.
|
|
1228
|
+
*/
|
|
1229
|
+
metaConnection(ctx: QueryCtx | MutationCtx | ActionCtx, args: {
|
|
1230
|
+
ownerKey: string;
|
|
1231
|
+
}): Promise<MetaConnection | null>;
|
|
1232
|
+
/** What unlinking the ad account takes out of the site's reports. */
|
|
1233
|
+
metaUnlinkPreview(ctx: QueryCtx | MutationCtx | ActionCtx, args: UnlinkPreviewInput): Promise<UnlinkPreview>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Declares the host's board columns for the site, in order (at most 40).
|
|
1236
|
+
* Declaring again replaces names and order; a column that is gone leaves
|
|
1237
|
+
* the event map. Then pass `column` to `recordLead` / `setLeadStage`.
|
|
1238
|
+
*/
|
|
1239
|
+
setPipeline(ctx: MutationCtx, args: SetPipelineInput): Promise<null>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Which Meta event each declared column sends (`Lead`, `QualifiedLead`,
|
|
1242
|
+
* `Schedule` or null), replacing the whole map, and whether a new lead is
|
|
1243
|
+
* sent as `Lead`. `Purchase` is never a column's: it goes with the sale.
|
|
1244
|
+
* With `ownerKey`, a site whose pixel another owner set is a `CONFLICT`:
|
|
1245
|
+
* the pixel's owner decides its events.
|
|
1246
|
+
*/
|
|
1247
|
+
setEventMap(ctx: MutationCtx, args: SetEventMapInput): Promise<null>;
|
|
1248
|
+
/**
|
|
1249
|
+
* The site's columns with their events and the leads that entered each in
|
|
1250
|
+
* the 30 days up to `now` (pass the caller's clock; without it the counts
|
|
1251
|
+
* are null).
|
|
1252
|
+
*/
|
|
1253
|
+
eventMap(ctx: QueryCtx | MutationCtx | ActionCtx, args: EventMapInput): Promise<EventMap>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Forgets the Meta owner a federated dashboard connection acted as on this
|
|
1256
|
+
* host (`rastro:connection:<connectionId>`): its token, links and pixels.
|
|
1257
|
+
* Call it when the host revokes or deletes that connection's grant.
|
|
1258
|
+
*/
|
|
1259
|
+
removeFederatedMetaConnection(ctx: MutationCtx | ActionCtx, args: {
|
|
1260
|
+
connectionId: string;
|
|
1261
|
+
}): Promise<{
|
|
1262
|
+
removed: boolean;
|
|
1263
|
+
}>;
|
|
1264
|
+
/**
|
|
1265
|
+
* Forgets the owner's token, unlinks every ad account it fed, and removes
|
|
1266
|
+
* every pixel the owner set, its plan B pixels (own token) included.
|
|
1267
|
+
*/
|
|
1268
|
+
removeMetaConnection(ctx: MutationCtx | ActionCtx, args: {
|
|
1269
|
+
ownerKey: string;
|
|
1270
|
+
}): Promise<{
|
|
1271
|
+
removed: boolean;
|
|
1272
|
+
}>;
|
|
1273
|
+
/** The owner's ad accounts (and their pixels), read again from Meta. */
|
|
1274
|
+
listMetaAdAccounts(ctx: ActionCtx, args: {
|
|
1275
|
+
ownerKey: string;
|
|
1276
|
+
}): Promise<MetaAdAccount[]>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Makes one of the owner's ad accounts a spend source for the site: a
|
|
1279
|
+
* 90-day backfill with the catalog, then the live sync. The account must be
|
|
1280
|
+
* in the connection's last listing.
|
|
1281
|
+
*/
|
|
1282
|
+
linkSiteAdAccount(ctx: MutationCtx, args: LinkSiteAdAccountInput): Promise<{
|
|
1283
|
+
linked: boolean;
|
|
1284
|
+
}>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Stops an ad account feeding the site; its spend leaves the reports. With
|
|
1287
|
+
* `ownerKey`, only that owner's link (another's is a `CONFLICT`).
|
|
1288
|
+
*/
|
|
1289
|
+
unlinkSiteAdAccount(ctx: MutationCtx, args: {
|
|
1290
|
+
siteId: string;
|
|
1291
|
+
adAccountId: string;
|
|
1292
|
+
ownerKey?: string;
|
|
1293
|
+
}): Promise<{
|
|
1294
|
+
unlinked: boolean;
|
|
1295
|
+
}>;
|
|
1296
|
+
/**
|
|
1297
|
+
* Sets the site's Meta pixel (dataset): with `ownerKey`, one from that
|
|
1298
|
+
* owner's connection listing, sending with the connection's token; with
|
|
1299
|
+
* `accessToken`, a Conversions API token from Events Manager, checked
|
|
1300
|
+
* against the pixel and encrypted like the connection's.
|
|
1301
|
+
*/
|
|
1302
|
+
setSitePixel(ctx: ActionCtx, args: SetSitePixelInput): Promise<{
|
|
1303
|
+
ok: true;
|
|
1304
|
+
}>;
|
|
1305
|
+
/** Forgets the site's pixel; with `ownerKey`, only if that owner set it. */
|
|
1306
|
+
removeSitePixel(ctx: MutationCtx, args: {
|
|
1307
|
+
siteId: string;
|
|
1308
|
+
ownerKey?: string;
|
|
1309
|
+
}): Promise<{
|
|
1310
|
+
removed: boolean;
|
|
1311
|
+
}>;
|
|
1312
|
+
/** Asks the Meta sync to read the site's ad accounts now. */
|
|
1313
|
+
syncMetaNow(ctx: MutationCtx | ActionCtx, args: {
|
|
1314
|
+
siteId: string;
|
|
1315
|
+
}): Promise<{
|
|
1316
|
+
scheduled: boolean;
|
|
1317
|
+
}>;
|
|
1039
1318
|
cleanup(ctx: MutationCtx, args: CleanupInput): Promise<{
|
|
1040
1319
|
before: number;
|
|
1041
1320
|
deleted: number;
|
|
@@ -1083,7 +1362,7 @@ export declare class Rastro {
|
|
|
1083
1362
|
hasMore: boolean;
|
|
1084
1363
|
}>;
|
|
1085
1364
|
}
|
|
1086
|
-
export type AnalyticsOperation = "site.create" | "site.update" | "site.get" | "site.list" | "ingest" | "conversion.track" | "visitor.link" | "visitor.identify" | "visitor.profile" | "visitor.list" | "visitor.index" | "report.overview" | "report.live" | "report.sessions" | "report.sessionJourney" | "report.conversions" | "report.visitorJourney" | "report.goals" | "report.funnels" | "report.affiliates" | "report.vitals" | "report.siteMap" | "goal.upsert" | "goal.list" | "goal.remove" | "funnel.upsert" | "funnel.list" | "funnel.remove" | "affiliate.upsert" | "affiliate.list" | "affiliate.remove" | "trackedLink.create" | "trackedLink.update" | "trackedLink.delete" | "trackedLink.list" | "lead.report" | "lead.list" | "lead.journey" | "retention.cleanup" | "retention.policy" | "retention.status" | "coverage.read";
|
|
1365
|
+
export type AnalyticsOperation = "site.create" | "site.update" | "site.get" | "site.list" | "ingest" | "conversion.track" | "visitor.link" | "visitor.identify" | "visitor.profile" | "visitor.list" | "visitor.index" | "report.overview" | "report.live" | "report.sessions" | "report.sessionJourney" | "report.conversions" | "report.visitorJourney" | "report.goals" | "report.funnels" | "report.affiliates" | "report.vitals" | "report.siteMap" | "goal.upsert" | "goal.list" | "goal.remove" | "funnel.upsert" | "funnel.list" | "funnel.remove" | "affiliate.upsert" | "affiliate.list" | "affiliate.remove" | "trackedLink.create" | "trackedLink.update" | "trackedLink.delete" | "trackedLink.list" | "lead.report" | "lead.list" | "lead.journey" | "lead.daily" | "meta.status" | "meta.conversions" | "retention.cleanup" | "retention.policy" | "retention.status" | "coverage.read";
|
|
1087
1366
|
export type AnalyticsAuthorizationRequest = {
|
|
1088
1367
|
operation: AnalyticsOperation;
|
|
1089
1368
|
siteIds: string[];
|
|
@@ -2896,48 +3175,85 @@ export declare function exposeAnalyticsApi(component: ComponentApi, options: {
|
|
|
2896
3175
|
siteIds: string[];
|
|
2897
3176
|
to: number;
|
|
2898
3177
|
}, Promise<{
|
|
3178
|
+
bySite?: Array<{
|
|
3179
|
+
currencyMismatch?: boolean;
|
|
3180
|
+
leads: number;
|
|
3181
|
+
paid: {
|
|
3182
|
+
leads: number;
|
|
3183
|
+
qualified: number;
|
|
3184
|
+
revenueCents: number;
|
|
3185
|
+
won: number;
|
|
3186
|
+
};
|
|
3187
|
+
qualified: number;
|
|
3188
|
+
revenueCents: number;
|
|
3189
|
+
siteId: string;
|
|
3190
|
+
spendCents?: number | null;
|
|
3191
|
+
spendCurrency?: string | null;
|
|
3192
|
+
won: number;
|
|
3193
|
+
}>;
|
|
2899
3194
|
campaigns: Array<{
|
|
2900
3195
|
adsets: Array<{
|
|
2901
3196
|
ads: Array<{
|
|
2902
3197
|
adId: string;
|
|
2903
3198
|
adName: string | null;
|
|
3199
|
+
adStatus?: string | null;
|
|
3200
|
+
clicks?: number | null;
|
|
3201
|
+
creativeType?: string | null;
|
|
3202
|
+
impressions?: number | null;
|
|
2904
3203
|
leads: number;
|
|
2905
3204
|
qualified: number;
|
|
2906
3205
|
revenueCents: number;
|
|
3206
|
+
siteId?: string;
|
|
2907
3207
|
sourceApp: string | null;
|
|
2908
3208
|
sourceUrl: string | null;
|
|
3209
|
+
spendCents?: number | null;
|
|
2909
3210
|
thumbnailUrl: string | null;
|
|
2910
3211
|
title: string | null;
|
|
2911
3212
|
won: number;
|
|
2912
3213
|
}>;
|
|
2913
3214
|
adsetId: string | null;
|
|
2914
3215
|
adsetName: string | null;
|
|
3216
|
+
clicks?: number | null;
|
|
3217
|
+
impressions?: number | null;
|
|
2915
3218
|
leads: number;
|
|
2916
3219
|
qualified: number;
|
|
2917
3220
|
revenueCents: number;
|
|
3221
|
+
spendCents?: number | null;
|
|
2918
3222
|
won: number;
|
|
2919
3223
|
}>;
|
|
2920
3224
|
campaignId: string | null;
|
|
2921
3225
|
campaignName: string | null;
|
|
3226
|
+
clicks?: number | null;
|
|
3227
|
+
impressions?: number | null;
|
|
2922
3228
|
leads: number;
|
|
2923
3229
|
qualified: number;
|
|
2924
3230
|
revenueCents: number;
|
|
3231
|
+
spendCents?: number | null;
|
|
2925
3232
|
won: number;
|
|
2926
3233
|
}>;
|
|
2927
3234
|
currency: string | null;
|
|
3235
|
+
currencyMismatch?: boolean;
|
|
2928
3236
|
from: number;
|
|
2929
3237
|
origins: Array<{
|
|
3238
|
+
clicks?: number | null;
|
|
3239
|
+
impressions?: number | null;
|
|
2930
3240
|
key: string;
|
|
2931
3241
|
leads: number;
|
|
2932
3242
|
qualified: number;
|
|
2933
3243
|
revenueCents: number;
|
|
3244
|
+
spendCents?: number | null;
|
|
2934
3245
|
won: number;
|
|
2935
3246
|
}>;
|
|
3247
|
+
spendCurrency?: string | null;
|
|
3248
|
+
spendIncomplete?: boolean;
|
|
2936
3249
|
to: number;
|
|
2937
3250
|
totals: {
|
|
3251
|
+
clicks?: number | null;
|
|
3252
|
+
impressions?: number | null;
|
|
2938
3253
|
leads: number;
|
|
2939
3254
|
qualified: number;
|
|
2940
3255
|
revenueCents: number;
|
|
3256
|
+
spendCents?: number | null;
|
|
2941
3257
|
won: number;
|
|
2942
3258
|
};
|
|
2943
3259
|
}>>;
|
|
@@ -2998,6 +3314,79 @@ export declare function exposeAnalyticsApi(component: ComponentApi, options: {
|
|
|
2998
3314
|
};
|
|
2999
3315
|
visitorId: string | null;
|
|
3000
3316
|
} | null>>;
|
|
3317
|
+
leadsDaily: import("convex/server").RegisteredQuery<"public", {
|
|
3318
|
+
adId?: string | undefined;
|
|
3319
|
+
from: number;
|
|
3320
|
+
origin?: string | undefined;
|
|
3321
|
+
siteIds: string[];
|
|
3322
|
+
to: number;
|
|
3323
|
+
}, Promise<{
|
|
3324
|
+
dayStart: number;
|
|
3325
|
+
leads: number;
|
|
3326
|
+
qualified: number;
|
|
3327
|
+
revenueCents: number;
|
|
3328
|
+
spendCents: number | null;
|
|
3329
|
+
won: number;
|
|
3330
|
+
}[]>>;
|
|
3331
|
+
metaStatus: import("convex/server").RegisteredQuery<"public", {
|
|
3332
|
+
now?: number | undefined;
|
|
3333
|
+
siteIds: string[];
|
|
3334
|
+
}, Promise<{
|
|
3335
|
+
adAccounts: Array<{
|
|
3336
|
+
adAccountId: string;
|
|
3337
|
+
backfill?: {
|
|
3338
|
+
done: number;
|
|
3339
|
+
total: number;
|
|
3340
|
+
} | null;
|
|
3341
|
+
currency: string;
|
|
3342
|
+
lastError: string | null;
|
|
3343
|
+
lastSyncAt: number | null;
|
|
3344
|
+
name: string;
|
|
3345
|
+
own?: boolean;
|
|
3346
|
+
syncState: "backfill" | "live" | "error";
|
|
3347
|
+
timezone: string;
|
|
3348
|
+
}>;
|
|
3349
|
+
conversions: {
|
|
3350
|
+
failed: number;
|
|
3351
|
+
last30d?: {
|
|
3352
|
+
Lead: number;
|
|
3353
|
+
Purchase: number;
|
|
3354
|
+
QualifiedLead: number;
|
|
3355
|
+
Schedule: number;
|
|
3356
|
+
} | null;
|
|
3357
|
+
pending: number;
|
|
3358
|
+
sent: number;
|
|
3359
|
+
sentToday?: number | null;
|
|
3360
|
+
};
|
|
3361
|
+
linked: boolean;
|
|
3362
|
+
pixel: {
|
|
3363
|
+
enabled: boolean;
|
|
3364
|
+
lastError?: string | null;
|
|
3365
|
+
name?: string | null;
|
|
3366
|
+
own?: boolean;
|
|
3367
|
+
pixelId: string | null;
|
|
3368
|
+
source?: "connection" | "token" | null;
|
|
3369
|
+
testMode?: boolean;
|
|
3370
|
+
};
|
|
3371
|
+
siteId: string;
|
|
3372
|
+
}[]>>;
|
|
3373
|
+
metaConversions: import("convex/server").RegisteredQuery<"public", {
|
|
3374
|
+
before?: number | undefined;
|
|
3375
|
+
beforeEventId?: string | undefined;
|
|
3376
|
+
limit?: number | undefined;
|
|
3377
|
+
siteId: string;
|
|
3378
|
+
}, Promise<{
|
|
3379
|
+
adId: string | null;
|
|
3380
|
+
adName: string | null;
|
|
3381
|
+
createdAt: number;
|
|
3382
|
+
eventId: string;
|
|
3383
|
+
eventName: "Lead" | "QualifiedLead" | "Schedule" | "Purchase";
|
|
3384
|
+
leadId: string | null;
|
|
3385
|
+
leadLabel: string | null;
|
|
3386
|
+
sentAt: number | null;
|
|
3387
|
+
status: "pending" | "sent" | "failed";
|
|
3388
|
+
valueCents: number | null;
|
|
3389
|
+
}[]>>;
|
|
3001
3390
|
revenueSummary: import("convex/server").RegisteredQuery<"public", {
|
|
3002
3391
|
from: number;
|
|
3003
3392
|
siteIds: string[];
|
|
@@ -3696,9 +4085,24 @@ export declare function exposeFederatedAnalyticsApi(component: ComponentApi, opt
|
|
|
3696
4085
|
leadsReport?: "leadsReport" | undefined;
|
|
3697
4086
|
listLeads?: "listLeads" | undefined;
|
|
3698
4087
|
leadJourney?: "leadJourney" | undefined;
|
|
4088
|
+
leadsDaily?: "leadsDaily" | undefined;
|
|
4089
|
+
metaStatus?: "metaStatus" | undefined;
|
|
4090
|
+
metaConversions?: "metaConversions" | undefined;
|
|
4091
|
+
metaConnection?: "metaConnection" | undefined;
|
|
4092
|
+
metaEventMap?: "metaEventMap" | undefined;
|
|
4093
|
+
metaUnlinkPreview?: "metaUnlinkPreview" | undefined;
|
|
4094
|
+
connectMeta?: "connectMeta" | undefined;
|
|
4095
|
+
disconnectMeta?: "disconnectMeta" | undefined;
|
|
4096
|
+
refreshMetaAccounts?: "refreshMetaAccounts" | undefined;
|
|
4097
|
+
linkMetaAdAccount?: "linkMetaAdAccount" | undefined;
|
|
4098
|
+
unlinkMetaAdAccount?: "unlinkMetaAdAccount" | undefined;
|
|
4099
|
+
setMetaPixel?: "setMetaPixel" | undefined;
|
|
4100
|
+
removeMetaPixel?: "removeMetaPixel" | undefined;
|
|
4101
|
+
setMetaEventMap?: "setMetaEventMap" | undefined;
|
|
4102
|
+
syncMetaNow?: "syncMetaNow" | undefined;
|
|
3699
4103
|
transferConnection?: "transferConnection" | undefined;
|
|
3700
4104
|
};
|
|
3701
|
-
capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "leads" | "liveVisitors" | "localDays" | "overview" | "people" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "visitorProfiles" | "vitals")[];
|
|
4105
|
+
capabilities: ("affiliates" | "configure" | "conversions" | "dataCoverage" | "funnels" | "goals" | "leads" | "liveVisitors" | "localDays" | "metaAds" | "overview" | "people" | "revenueSummary" | "sessionDetails" | "sessionJourney" | "sessions" | "siteMap" | "siteSummaries" | "trackedLinks" | "transfer" | "visitorJourney" | "visitorProfiles" | "vitals")[];
|
|
3702
4106
|
limits: {
|
|
3703
4107
|
maxSitesPerRequest: 10;
|
|
3704
4108
|
maxSitesPerConnection: 10;
|
|
@@ -4598,48 +5002,85 @@ export declare function exposeFederatedAnalyticsApi(component: ComponentApi, opt
|
|
|
4598
5002
|
siteIds: string[];
|
|
4599
5003
|
to: number;
|
|
4600
5004
|
}, Promise<{
|
|
5005
|
+
bySite?: Array<{
|
|
5006
|
+
currencyMismatch?: boolean;
|
|
5007
|
+
leads: number;
|
|
5008
|
+
paid: {
|
|
5009
|
+
leads: number;
|
|
5010
|
+
qualified: number;
|
|
5011
|
+
revenueCents: number;
|
|
5012
|
+
won: number;
|
|
5013
|
+
};
|
|
5014
|
+
qualified: number;
|
|
5015
|
+
revenueCents: number;
|
|
5016
|
+
siteId: string;
|
|
5017
|
+
spendCents?: number | null;
|
|
5018
|
+
spendCurrency?: string | null;
|
|
5019
|
+
won: number;
|
|
5020
|
+
}>;
|
|
4601
5021
|
campaigns: Array<{
|
|
4602
5022
|
adsets: Array<{
|
|
4603
5023
|
ads: Array<{
|
|
4604
5024
|
adId: string;
|
|
4605
5025
|
adName: string | null;
|
|
5026
|
+
adStatus?: string | null;
|
|
5027
|
+
clicks?: number | null;
|
|
5028
|
+
creativeType?: string | null;
|
|
5029
|
+
impressions?: number | null;
|
|
4606
5030
|
leads: number;
|
|
4607
5031
|
qualified: number;
|
|
4608
5032
|
revenueCents: number;
|
|
5033
|
+
siteId?: string;
|
|
4609
5034
|
sourceApp: string | null;
|
|
4610
5035
|
sourceUrl: string | null;
|
|
5036
|
+
spendCents?: number | null;
|
|
4611
5037
|
thumbnailUrl: string | null;
|
|
4612
5038
|
title: string | null;
|
|
4613
5039
|
won: number;
|
|
4614
5040
|
}>;
|
|
4615
5041
|
adsetId: string | null;
|
|
4616
5042
|
adsetName: string | null;
|
|
5043
|
+
clicks?: number | null;
|
|
5044
|
+
impressions?: number | null;
|
|
4617
5045
|
leads: number;
|
|
4618
5046
|
qualified: number;
|
|
4619
5047
|
revenueCents: number;
|
|
5048
|
+
spendCents?: number | null;
|
|
4620
5049
|
won: number;
|
|
4621
5050
|
}>;
|
|
4622
5051
|
campaignId: string | null;
|
|
4623
5052
|
campaignName: string | null;
|
|
5053
|
+
clicks?: number | null;
|
|
5054
|
+
impressions?: number | null;
|
|
4624
5055
|
leads: number;
|
|
4625
5056
|
qualified: number;
|
|
4626
5057
|
revenueCents: number;
|
|
5058
|
+
spendCents?: number | null;
|
|
4627
5059
|
won: number;
|
|
4628
5060
|
}>;
|
|
4629
5061
|
currency: string | null;
|
|
5062
|
+
currencyMismatch?: boolean;
|
|
4630
5063
|
from: number;
|
|
4631
5064
|
origins: Array<{
|
|
5065
|
+
clicks?: number | null;
|
|
5066
|
+
impressions?: number | null;
|
|
4632
5067
|
key: string;
|
|
4633
5068
|
leads: number;
|
|
4634
5069
|
qualified: number;
|
|
4635
5070
|
revenueCents: number;
|
|
5071
|
+
spendCents?: number | null;
|
|
4636
5072
|
won: number;
|
|
4637
5073
|
}>;
|
|
5074
|
+
spendCurrency?: string | null;
|
|
5075
|
+
spendIncomplete?: boolean;
|
|
4638
5076
|
to: number;
|
|
4639
5077
|
totals: {
|
|
5078
|
+
clicks?: number | null;
|
|
5079
|
+
impressions?: number | null;
|
|
4640
5080
|
leads: number;
|
|
4641
5081
|
qualified: number;
|
|
4642
5082
|
revenueCents: number;
|
|
5083
|
+
spendCents?: number | null;
|
|
4643
5084
|
won: number;
|
|
4644
5085
|
};
|
|
4645
5086
|
}>>;
|
|
@@ -4700,6 +5141,199 @@ export declare function exposeFederatedAnalyticsApi(component: ComponentApi, opt
|
|
|
4700
5141
|
};
|
|
4701
5142
|
visitorId: string | null;
|
|
4702
5143
|
} | null>>;
|
|
5144
|
+
leadsDaily: import("convex/server").RegisteredQuery<"public", {
|
|
5145
|
+
adId?: string | undefined;
|
|
5146
|
+
from: number;
|
|
5147
|
+
origin?: string | undefined;
|
|
5148
|
+
siteIds: string[];
|
|
5149
|
+
to: number;
|
|
5150
|
+
}, Promise<{
|
|
5151
|
+
dayStart: number;
|
|
5152
|
+
leads: number;
|
|
5153
|
+
qualified: number;
|
|
5154
|
+
revenueCents: number;
|
|
5155
|
+
spendCents: number | null;
|
|
5156
|
+
won: number;
|
|
5157
|
+
}[]>>;
|
|
5158
|
+
metaStatus: import("convex/server").RegisteredQuery<"public", {
|
|
5159
|
+
now?: number | undefined;
|
|
5160
|
+
siteIds: string[];
|
|
5161
|
+
}, Promise<{
|
|
5162
|
+
adAccounts: Array<{
|
|
5163
|
+
adAccountId: string;
|
|
5164
|
+
backfill?: {
|
|
5165
|
+
done: number;
|
|
5166
|
+
total: number;
|
|
5167
|
+
} | null;
|
|
5168
|
+
currency: string;
|
|
5169
|
+
lastError: string | null;
|
|
5170
|
+
lastSyncAt: number | null;
|
|
5171
|
+
name: string;
|
|
5172
|
+
own?: boolean;
|
|
5173
|
+
syncState: "backfill" | "live" | "error";
|
|
5174
|
+
timezone: string;
|
|
5175
|
+
}>;
|
|
5176
|
+
conversions: {
|
|
5177
|
+
failed: number;
|
|
5178
|
+
last30d?: {
|
|
5179
|
+
Lead: number;
|
|
5180
|
+
Purchase: number;
|
|
5181
|
+
QualifiedLead: number;
|
|
5182
|
+
Schedule: number;
|
|
5183
|
+
} | null;
|
|
5184
|
+
pending: number;
|
|
5185
|
+
sent: number;
|
|
5186
|
+
sentToday?: number | null;
|
|
5187
|
+
};
|
|
5188
|
+
linked: boolean;
|
|
5189
|
+
pixel: {
|
|
5190
|
+
enabled: boolean;
|
|
5191
|
+
lastError?: string | null;
|
|
5192
|
+
name?: string | null;
|
|
5193
|
+
own?: boolean;
|
|
5194
|
+
pixelId: string | null;
|
|
5195
|
+
source?: "connection" | "token" | null;
|
|
5196
|
+
testMode?: boolean;
|
|
5197
|
+
};
|
|
5198
|
+
siteId: string;
|
|
5199
|
+
}[]>>;
|
|
5200
|
+
metaConversions: import("convex/server").RegisteredQuery<"public", {
|
|
5201
|
+
before?: number | undefined;
|
|
5202
|
+
beforeEventId?: string | undefined;
|
|
5203
|
+
limit?: number | undefined;
|
|
5204
|
+
siteId: string;
|
|
5205
|
+
}, Promise<{
|
|
5206
|
+
adId: string | null;
|
|
5207
|
+
adName: string | null;
|
|
5208
|
+
createdAt: number;
|
|
5209
|
+
eventId: string;
|
|
5210
|
+
eventName: "Lead" | "QualifiedLead" | "Schedule" | "Purchase";
|
|
5211
|
+
leadId: string | null;
|
|
5212
|
+
leadLabel: string | null;
|
|
5213
|
+
sentAt: number | null;
|
|
5214
|
+
status: "pending" | "sent" | "failed";
|
|
5215
|
+
valueCents: number | null;
|
|
5216
|
+
}[]>>;
|
|
5217
|
+
metaConnection: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
5218
|
+
authorizedAt: number | null;
|
|
5219
|
+
authorizedBy: {
|
|
5220
|
+
name: string | null;
|
|
5221
|
+
} | null;
|
|
5222
|
+
businessName: string | null;
|
|
5223
|
+
expiresAt: number | null;
|
|
5224
|
+
expiringSoon: boolean;
|
|
5225
|
+
invalidSince: number | null;
|
|
5226
|
+
lastError: string | null;
|
|
5227
|
+
pixels: Array<{
|
|
5228
|
+
name: string;
|
|
5229
|
+
pixelId: string;
|
|
5230
|
+
}>;
|
|
5231
|
+
status: "active" | "invalid";
|
|
5232
|
+
adAccounts: {
|
|
5233
|
+
adAccountId: string;
|
|
5234
|
+
currency: string;
|
|
5235
|
+
linkedOutsideScope?: boolean;
|
|
5236
|
+
linkedSiteId: string | null;
|
|
5237
|
+
name: string;
|
|
5238
|
+
timezone: string;
|
|
5239
|
+
}[];
|
|
5240
|
+
} | null>>;
|
|
5241
|
+
metaEventMap: import("convex/server").RegisteredQuery<"public", {
|
|
5242
|
+
now?: number | undefined;
|
|
5243
|
+
siteId: string;
|
|
5244
|
+
}, Promise<{
|
|
5245
|
+
columns: Array<{
|
|
5246
|
+
color: string | null;
|
|
5247
|
+
event: "Lead" | "QualifiedLead" | "Schedule" | null;
|
|
5248
|
+
group: string | null;
|
|
5249
|
+
key: string;
|
|
5250
|
+
monthCount: number | null;
|
|
5251
|
+
name: string;
|
|
5252
|
+
}>;
|
|
5253
|
+
purchase: {
|
|
5254
|
+
enabled: boolean;
|
|
5255
|
+
};
|
|
5256
|
+
sendLeadEvent: boolean;
|
|
5257
|
+
}>>;
|
|
5258
|
+
metaUnlinkPreview: import("convex/server").RegisteredQuery<"public", {
|
|
5259
|
+
adAccountId: string;
|
|
5260
|
+
siteId: string;
|
|
5261
|
+
}, Promise<{
|
|
5262
|
+
campaigns: number;
|
|
5263
|
+
currency: string;
|
|
5264
|
+
days: number;
|
|
5265
|
+
partial: boolean;
|
|
5266
|
+
spendCents: number;
|
|
5267
|
+
}>>;
|
|
5268
|
+
authorizeMetaAction: import("convex/server").RegisteredQuery<"internal", {
|
|
5269
|
+
siteId?: string | undefined;
|
|
5270
|
+
wholeOwner?: boolean | undefined;
|
|
5271
|
+
}, Promise<{
|
|
5272
|
+
ownerKey: string;
|
|
5273
|
+
}>>;
|
|
5274
|
+
connectMeta: import("convex/server").RegisteredAction<"public", {
|
|
5275
|
+
code: string;
|
|
5276
|
+
redirectUri: string;
|
|
5277
|
+
}, Promise<{
|
|
5278
|
+
adAccounts: Array<{
|
|
5279
|
+
adAccountId: string;
|
|
5280
|
+
currency: string;
|
|
5281
|
+
name: string;
|
|
5282
|
+
timezone: string;
|
|
5283
|
+
}>;
|
|
5284
|
+
businessName: string | null;
|
|
5285
|
+
connectionId: string;
|
|
5286
|
+
pixels: Array<{
|
|
5287
|
+
name: string;
|
|
5288
|
+
pixelId: string;
|
|
5289
|
+
}>;
|
|
5290
|
+
}>>;
|
|
5291
|
+
refreshMetaAccounts: import("convex/server").RegisteredAction<"public", {}, Promise<{
|
|
5292
|
+
adAccountId: string;
|
|
5293
|
+
currency: string;
|
|
5294
|
+
name: string;
|
|
5295
|
+
timezone: string;
|
|
5296
|
+
}[]>>;
|
|
5297
|
+
setMetaPixel: import("convex/server").RegisteredAction<"public", {
|
|
5298
|
+
accessToken?: string | undefined;
|
|
5299
|
+
enabled?: boolean | undefined;
|
|
5300
|
+
pixelId: string;
|
|
5301
|
+
sendLeadEvent?: boolean | undefined;
|
|
5302
|
+
siteId: string;
|
|
5303
|
+
testEventCode?: string | undefined;
|
|
5304
|
+
}, Promise<{
|
|
5305
|
+
ok: true;
|
|
5306
|
+
}>>;
|
|
5307
|
+
disconnectMeta: import("convex/server").RegisteredMutation<"public", {}, Promise<{
|
|
5308
|
+
removed: boolean;
|
|
5309
|
+
}>>;
|
|
5310
|
+
linkMetaAdAccount: import("convex/server").RegisteredMutation<"public", {
|
|
5311
|
+
adAccountId: string;
|
|
5312
|
+
siteId: string;
|
|
5313
|
+
}, Promise<{
|
|
5314
|
+
linked: boolean;
|
|
5315
|
+
}>>;
|
|
5316
|
+
unlinkMetaAdAccount: import("convex/server").RegisteredMutation<"public", {
|
|
5317
|
+
adAccountId: string;
|
|
5318
|
+
siteId: string;
|
|
5319
|
+
}, Promise<{
|
|
5320
|
+
unlinked: boolean;
|
|
5321
|
+
}>>;
|
|
5322
|
+
removeMetaPixel: import("convex/server").RegisteredMutation<"public", {
|
|
5323
|
+
siteId: string;
|
|
5324
|
+
}, Promise<{
|
|
5325
|
+
removed: boolean;
|
|
5326
|
+
}>>;
|
|
5327
|
+
setMetaEventMap: import("convex/server").RegisteredMutation<"public", {
|
|
5328
|
+
columns: Record<string, "Lead" | "QualifiedLead" | "Schedule" | null>;
|
|
5329
|
+
sendLeadEvent: boolean;
|
|
5330
|
+
siteId: string;
|
|
5331
|
+
}, Promise<null>>;
|
|
5332
|
+
syncMetaNow: import("convex/server").RegisteredMutation<"public", {
|
|
5333
|
+
siteId: string;
|
|
5334
|
+
}, Promise<{
|
|
5335
|
+
scheduled: boolean;
|
|
5336
|
+
}>>;
|
|
4703
5337
|
retentionStatus: import("convex/server").RegisteredQuery<"public", {
|
|
4704
5338
|
siteId: string;
|
|
4705
5339
|
}, Promise<{
|