@keystrokehq/plausible_analytics 0.1.2 → 0.1.3
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/dist/actions/check-health.cjs +1 -1
- package/dist/actions/check-health.cjs.map +1 -1
- package/dist/actions/check-health.d.cts +1 -1
- package/dist/actions/check-health.d.mts +1 -1
- package/dist/actions/check-health.mjs +1 -1
- package/dist/actions/check-health.mjs.map +1 -1
- package/dist/actions/get-breakdown-stats.cjs +2 -2
- package/dist/actions/get-breakdown-stats.cjs.map +1 -1
- package/dist/actions/get-breakdown-stats.d.cts +2 -2
- package/dist/actions/get-breakdown-stats.d.mts +2 -2
- package/dist/actions/get-breakdown-stats.mjs +2 -2
- package/dist/actions/get-breakdown-stats.mjs.map +1 -1
- package/dist/actions/get-plugin-capabilities.cjs +2 -2
- package/dist/actions/get-plugin-capabilities.cjs.map +1 -1
- package/dist/actions/get-plugin-capabilities.d.cts +2 -2
- package/dist/actions/get-plugin-capabilities.d.mts +2 -2
- package/dist/actions/get-plugin-capabilities.mjs +2 -2
- package/dist/actions/get-plugin-capabilities.mjs.map +1 -1
- package/dist/actions/get-realtime-visitors.cjs +1 -1
- package/dist/actions/get-realtime-visitors.cjs.map +1 -1
- package/dist/actions/get-realtime-visitors.d.cts +1 -1
- package/dist/actions/get-realtime-visitors.d.mts +1 -1
- package/dist/actions/get-realtime-visitors.mjs +1 -1
- package/dist/actions/get-realtime-visitors.mjs.map +1 -1
- package/dist/actions/get-site.cjs +2 -2
- package/dist/actions/get-site.cjs.map +1 -1
- package/dist/actions/get-site.d.cts +2 -2
- package/dist/actions/get-site.d.mts +2 -2
- package/dist/actions/get-site.mjs +2 -2
- package/dist/actions/get-site.mjs.map +1 -1
- package/dist/actions/get-timeseries-stats.cjs +2 -2
- package/dist/actions/get-timeseries-stats.cjs.map +1 -1
- package/dist/actions/get-timeseries-stats.d.cts +2 -2
- package/dist/actions/get-timeseries-stats.d.mts +2 -2
- package/dist/actions/get-timeseries-stats.mjs +2 -2
- package/dist/actions/get-timeseries-stats.mjs.map +1 -1
- package/dist/actions/list-custom-props.cjs +2 -2
- package/dist/actions/list-custom-props.cjs.map +1 -1
- package/dist/actions/list-custom-props.d.cts +2 -2
- package/dist/actions/list-custom-props.d.mts +2 -2
- package/dist/actions/list-custom-props.mjs +2 -2
- package/dist/actions/list-custom-props.mjs.map +1 -1
- package/dist/actions/list-goals.cjs +4 -4
- package/dist/actions/list-goals.cjs.map +1 -1
- package/dist/actions/list-goals.d.cts +4 -4
- package/dist/actions/list-goals.d.mts +4 -4
- package/dist/actions/list-goals.mjs +4 -4
- package/dist/actions/list-goals.mjs.map +1 -1
- package/dist/actions/list-guests.cjs +2 -2
- package/dist/actions/list-guests.cjs.map +1 -1
- package/dist/actions/list-guests.d.cts +2 -2
- package/dist/actions/list-guests.d.mts +2 -2
- package/dist/actions/list-guests.mjs +2 -2
- package/dist/actions/list-guests.mjs.map +1 -1
- package/dist/actions/list-sites.cjs +3 -3
- package/dist/actions/list-sites.cjs.map +1 -1
- package/dist/actions/list-sites.d.cts +3 -3
- package/dist/actions/list-sites.d.mts +3 -3
- package/dist/actions/list-sites.mjs +3 -3
- package/dist/actions/list-sites.mjs.map +1 -1
- package/dist/actions/list-teams.cjs +3 -3
- package/dist/actions/list-teams.cjs.map +1 -1
- package/dist/actions/list-teams.d.cts +3 -3
- package/dist/actions/list-teams.d.mts +3 -3
- package/dist/actions/list-teams.mjs +3 -3
- package/dist/actions/list-teams.mjs.map +1 -1
- package/dist/actions/query-stats.cjs +3 -3
- package/dist/actions/query-stats.cjs.map +1 -1
- package/dist/actions/query-stats.d.cts +3 -3
- package/dist/actions/query-stats.d.mts +3 -3
- package/dist/actions/query-stats.mjs +3 -3
- package/dist/actions/query-stats.mjs.map +1 -1
- package/dist/actions/record-event.cjs +2 -2
- package/dist/actions/record-event.cjs.map +1 -1
- package/dist/actions/record-event.d.cts +3 -3
- package/dist/actions/record-event.d.mts +3 -3
- package/dist/actions/record-event.mjs +2 -2
- package/dist/actions/record-event.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ const PlausibleAnalyticsListTeams_PaginationMetaSchema = z.object({
|
|
|
10
10
|
after: z.string().describe("Cursor for fetching the next page of results. Use this value in the 'after' parameter of the next request.").nullable().optional(),
|
|
11
11
|
limit: z.number().int().describe("The pagination limit applied to this response.").nullable().optional(),
|
|
12
12
|
before: z.string().describe("Cursor for fetching the previous page of results. Use this value in the 'before' parameter of the next request.").nullable().optional()
|
|
13
|
-
}).describe("Pagination metadata for navigating through results.");
|
|
13
|
+
}).passthrough().describe("Pagination metadata for navigating through results.");
|
|
14
14
|
const PlausibleAnalyticsListTeams_TeamSchema = z.object({
|
|
15
15
|
id: z.string().describe("Unique identifier for the team.").nullable().optional(),
|
|
16
16
|
name: z.string().describe("Name of the team.").nullable().optional(),
|
|
17
17
|
api_available: z.boolean().describe("Indicates whether the API is available for this team.").nullable().optional()
|
|
18
|
-
}).describe("Represents a single team available to the API key owner.");
|
|
18
|
+
}).passthrough().describe("Represents a single team available to the API key owner.");
|
|
19
19
|
const plausibleAnalyticsListTeams = action("PLAUSIBLE_ANALYTICS_LIST_TEAMS", {
|
|
20
20
|
slug: "plausible_analytics-list-teams",
|
|
21
21
|
name: "List Teams",
|
|
@@ -24,7 +24,7 @@ const plausibleAnalyticsListTeams = action("PLAUSIBLE_ANALYTICS_LIST_TEAMS", {
|
|
|
24
24
|
output: z.object({
|
|
25
25
|
meta: PlausibleAnalyticsListTeams_PaginationMetaSchema.nullable().optional(),
|
|
26
26
|
teams: z.array(PlausibleAnalyticsListTeams_TeamSchema).describe("List of teams available for the API key owner.")
|
|
27
|
-
}).describe("Response containing the list of teams available for the API key owner.")
|
|
27
|
+
}).passthrough().describe("Response containing the list of teams available for the API key owner.")
|
|
28
28
|
});
|
|
29
29
|
//#endregion
|
|
30
30
|
export { plausibleAnalyticsListTeams };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-teams.mjs","names":[],"sources":["../../src/actions/list-teams.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsListTeamsInput = z.object({\n after: z.string().describe(\"Pagination cursor for fetching the next page of results.\").optional(),\n limit: z.number().int().describe(\"Maximum number of teams to return per page. Defaults to 100 if not specified.\").optional(),\n before: z.string().describe(\"Pagination cursor for fetching the previous page of results.\").optional(),\n}).describe(\"Request model for listing all teams available for the API key owner.\");\nconst PlausibleAnalyticsListTeams_PaginationMetaSchema = z.object({\n after: z.string().describe(\"Cursor for fetching the next page of results. Use this value in the 'after' parameter of the next request.\").nullable().optional(),\n limit: z.number().int().describe(\"The pagination limit applied to this response.\").nullable().optional(),\n before: z.string().describe(\"Cursor for fetching the previous page of results. Use this value in the 'before' parameter of the next request.\").nullable().optional(),\n}).describe(\"Pagination metadata for navigating through results.\");\nconst PlausibleAnalyticsListTeams_TeamSchema = z.object({\n id: z.string().describe(\"Unique identifier for the team.\").nullable().optional(),\n name: z.string().describe(\"Name of the team.\").nullable().optional(),\n api_available: z.boolean().describe(\"Indicates whether the API is available for this team.\").nullable().optional(),\n}).describe(\"Represents a single team available to the API key owner.\");\nexport const PlausibleAnalyticsListTeamsOutput = z.object({\n meta: PlausibleAnalyticsListTeams_PaginationMetaSchema.nullable().optional(),\n teams: z.array(PlausibleAnalyticsListTeams_TeamSchema).describe(\"List of teams available for the API key owner.\"),\n}).describe(\"Response containing the list of teams available for the API key owner.\");\n\nexport const plausibleAnalyticsListTeams = action(\"PLAUSIBLE_ANALYTICS_LIST_TEAMS\", {\n slug: \"plausible_analytics-list-teams\",\n name: \"List Teams\",\n description: \"Tool to list all teams available for the API key owner. Use when you need to retrieve teams for site provisioning to a specific team.\",\n input: PlausibleAnalyticsListTeamsInput,\n output: PlausibleAnalyticsListTeamsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAmC,EAAE,OAAO;CACvD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAChG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+EAA+E,CAAC,CAAC,SAAS;CAC3H,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;AACvG,CAAC,CAAC,CAAC,SAAS,sEAAsE;AAClF,MAAM,mDAAmD,EAAE,OAAO;CAChE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4GAA4G,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7J,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrK,CAAC,CAAC,CAAC,SAAS,qDAAqD;
|
|
1
|
+
{"version":3,"file":"list-teams.mjs","names":[],"sources":["../../src/actions/list-teams.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsListTeamsInput = z.object({\n after: z.string().describe(\"Pagination cursor for fetching the next page of results.\").optional(),\n limit: z.number().int().describe(\"Maximum number of teams to return per page. Defaults to 100 if not specified.\").optional(),\n before: z.string().describe(\"Pagination cursor for fetching the previous page of results.\").optional(),\n}).describe(\"Request model for listing all teams available for the API key owner.\");\nconst PlausibleAnalyticsListTeams_PaginationMetaSchema = z.object({\n after: z.string().describe(\"Cursor for fetching the next page of results. Use this value in the 'after' parameter of the next request.\").nullable().optional(),\n limit: z.number().int().describe(\"The pagination limit applied to this response.\").nullable().optional(),\n before: z.string().describe(\"Cursor for fetching the previous page of results. Use this value in the 'before' parameter of the next request.\").nullable().optional(),\n}).passthrough().describe(\"Pagination metadata for navigating through results.\");\nconst PlausibleAnalyticsListTeams_TeamSchema = z.object({\n id: z.string().describe(\"Unique identifier for the team.\").nullable().optional(),\n name: z.string().describe(\"Name of the team.\").nullable().optional(),\n api_available: z.boolean().describe(\"Indicates whether the API is available for this team.\").nullable().optional(),\n}).passthrough().describe(\"Represents a single team available to the API key owner.\");\nexport const PlausibleAnalyticsListTeamsOutput = z.object({\n meta: PlausibleAnalyticsListTeams_PaginationMetaSchema.nullable().optional(),\n teams: z.array(PlausibleAnalyticsListTeams_TeamSchema).describe(\"List of teams available for the API key owner.\"),\n}).passthrough().describe(\"Response containing the list of teams available for the API key owner.\");\n\nexport const plausibleAnalyticsListTeams = action(\"PLAUSIBLE_ANALYTICS_LIST_TEAMS\", {\n slug: \"plausible_analytics-list-teams\",\n name: \"List Teams\",\n description: \"Tool to list all teams available for the API key owner. Use when you need to retrieve teams for site provisioning to a specific team.\",\n input: PlausibleAnalyticsListTeamsInput,\n output: PlausibleAnalyticsListTeamsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAmC,EAAE,OAAO;CACvD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAChG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+EAA+E,CAAC,CAAC,SAAS;CAC3H,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;AACvG,CAAC,CAAC,CAAC,SAAS,sEAAsE;AAClF,MAAM,mDAAmD,EAAE,OAAO;CAChE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4GAA4G,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7J,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qDAAqD;AAC/E,MAAM,yCAAyC,EAAE,OAAO;CACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0DAA0D;AAMpF,MAAa,8BAA8B,OAAO,kCAAkC;CAClF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV+C,EAAE,OAAO;EACxD,MAAM,iDAAiD,SAAS,CAAC,CAAC,SAAS;EAC3E,OAAO,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,gDAAgD;CAClH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,wEAOhB;AACV,CAAC"}
|
|
@@ -8,7 +8,7 @@ const PlausibleAnalyticsQueryStatsInput = zod.z.object({
|
|
|
8
8
|
date_range: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]),
|
|
9
9
|
dimensions: zod.z.array(zod.z.string()).describe("List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.").optional()
|
|
10
10
|
}).describe("Request model for querying analytics stats for a site using the Stats API v2.");
|
|
11
|
-
const PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = zod.z.object({ warnings: zod.z.array(zod.z.string()).describe("List of warnings related to the query execution.").nullable().optional() }).describe("Metadata about the query including warnings.");
|
|
11
|
+
const PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = zod.z.object({ warnings: zod.z.array(zod.z.string()).describe("List of warnings related to the query execution.").nullable().optional() }).passthrough().describe("Metadata about the query including warnings.");
|
|
12
12
|
const PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = zod.z.object({
|
|
13
13
|
metrics: zod.z.array(zod.z.union([zod.z.number().int(), zod.z.number()])).describe("Values for the metrics specified in the query (order matches the metrics array)."),
|
|
14
14
|
dimensions: zod.z.array(zod.z.union([
|
|
@@ -16,11 +16,11 @@ const PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = zod.z.object
|
|
|
16
16
|
zod.z.number().int(),
|
|
17
17
|
zod.z.number()
|
|
18
18
|
])).describe("Values for the dimensions specified in the query (order matches the dimensions array).").nullable().optional()
|
|
19
|
-
}).describe("Individual result object with metrics and dimension values.");
|
|
19
|
+
}).passthrough().describe("Individual result object with metrics and dimension values.");
|
|
20
20
|
const PlausibleAnalyticsQueryStatsOutput = zod.z.object({
|
|
21
21
|
meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),
|
|
22
22
|
results: zod.z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe("Array of result objects with metrics and dimension values.")
|
|
23
|
-
}).describe("Response containing query results and metadata.");
|
|
23
|
+
}).passthrough().describe("Response containing query results and metadata.");
|
|
24
24
|
const plausibleAnalyticsQueryStats = require_action.action("PLAUSIBLE_ANALYTICS_QUERY_STATS", {
|
|
25
25
|
slug: "plausible_analytics-query-stats",
|
|
26
26
|
name: "Query Analytics Stats",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-stats.cjs","names":["z","action"],"sources":["../../src/actions/query-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsQueryStatsInput = z.object({\n filters: z.array(z.array(z.union([z.string(), z.array(z.string())]))).describe(\"Array of filter conditions to apply to the query. Each filter is an array with format: [dimension, operator, value]. Operators: 'is', 'is_not', 'contains', 'does_not_contain'. Example: [['event:page', 'is', '/blog'], ['visit:country', 'is', 'US']].\").optional(),\n metrics: z.array(z.string()).describe(\"List of metrics to calculate. Available metrics: 'visitors' (unique visitors), 'visits' (total visits), 'pageviews' (total page views), 'views_per_visit' (average pages per visit), 'bounce_rate' (percentage of single-page visits), 'visit_duration' (average visit duration in seconds), 'events' (total events), 'scroll_depth' (average scroll depth percentage), 'percentage' (percentage of total), 'conversion_rate', 'group_conversion_rate', 'average_revenue', 'total_revenue', 'time_on_page' (average time on page in seconds).\"),\n site_id: z.string().describe(\"Domain of your site on Plausible to be queried (e.g., 'example.com', 'composio').\"),\n date_range: z.union([z.string(), z.array(z.string())]),\n dimensions: z.array(z.string()).describe(\"List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.\").optional(),\n}).describe(\"Request model for querying analytics stats for a site using the Stats API v2.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({\n warnings: z.array(z.string()).describe(\"List of warnings related to the query execution.\").nullable().optional(),\n}).describe(\"Metadata about the query including warnings.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({\n metrics: z.array(z.union([z.number().int(), z.number()])).describe(\"Values for the metrics specified in the query (order matches the metrics array).\"),\n dimensions: z.array(z.union([z.string(), z.number().int(), z.number()])).describe(\"Values for the dimensions specified in the query (order matches the dimensions array).\").nullable().optional(),\n}).describe(\"Individual result object with metrics and dimension values.\");\nexport const PlausibleAnalyticsQueryStatsOutput = z.object({\n meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),\n results: z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe(\"Array of result objects with metrics and dimension values.\"),\n}).describe(\"Response containing query results and metadata.\");\n\nexport const plausibleAnalyticsQueryStats = action(\"PLAUSIBLE_ANALYTICS_QUERY_STATS\", {\n slug: \"plausible_analytics-query-stats\",\n name: \"Query Analytics Stats\",\n description: \"Tool to query analytics stats for a site using the Stats API v2. Use when you need to retrieve historical or real-time statistics such as visitors, pageviews, bounce rate, visit duration, and more. Supports filtering, grouping by dimensions, and custom date ranges.\",\n input: PlausibleAnalyticsQueryStatsInput,\n output: PlausibleAnalyticsQueryStatsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAoCA,IAAAA,EAAE,OAAO;CACxD,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,0PAA0P,CAAC,CAAC,SAAS;CACpV,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+gBAA+gB;CACrjB,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CAChH,YAAYA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iZAAiZ,CAAC,CAAC,SAAS;AACvc,CAAC,CAAC,CAAC,SAAS,+EAA+E;AAC3F,MAAM,4DAA4DA,IAAAA,EAAE,OAAO,EACzE,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACjH,CAAC,CAAC,CAAC,SAAS,8CAA8C;
|
|
1
|
+
{"version":3,"file":"query-stats.cjs","names":["z","action"],"sources":["../../src/actions/query-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsQueryStatsInput = z.object({\n filters: z.array(z.array(z.union([z.string(), z.array(z.string())]))).describe(\"Array of filter conditions to apply to the query. Each filter is an array with format: [dimension, operator, value]. Operators: 'is', 'is_not', 'contains', 'does_not_contain'. Example: [['event:page', 'is', '/blog'], ['visit:country', 'is', 'US']].\").optional(),\n metrics: z.array(z.string()).describe(\"List of metrics to calculate. Available metrics: 'visitors' (unique visitors), 'visits' (total visits), 'pageviews' (total page views), 'views_per_visit' (average pages per visit), 'bounce_rate' (percentage of single-page visits), 'visit_duration' (average visit duration in seconds), 'events' (total events), 'scroll_depth' (average scroll depth percentage), 'percentage' (percentage of total), 'conversion_rate', 'group_conversion_rate', 'average_revenue', 'total_revenue', 'time_on_page' (average time on page in seconds).\"),\n site_id: z.string().describe(\"Domain of your site on Plausible to be queried (e.g., 'example.com', 'composio').\"),\n date_range: z.union([z.string(), z.array(z.string())]),\n dimensions: z.array(z.string()).describe(\"List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.\").optional(),\n}).describe(\"Request model for querying analytics stats for a site using the Stats API v2.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({\n warnings: z.array(z.string()).describe(\"List of warnings related to the query execution.\").nullable().optional(),\n}).passthrough().describe(\"Metadata about the query including warnings.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({\n metrics: z.array(z.union([z.number().int(), z.number()])).describe(\"Values for the metrics specified in the query (order matches the metrics array).\"),\n dimensions: z.array(z.union([z.string(), z.number().int(), z.number()])).describe(\"Values for the dimensions specified in the query (order matches the dimensions array).\").nullable().optional(),\n}).passthrough().describe(\"Individual result object with metrics and dimension values.\");\nexport const PlausibleAnalyticsQueryStatsOutput = z.object({\n meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),\n results: z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe(\"Array of result objects with metrics and dimension values.\"),\n}).passthrough().describe(\"Response containing query results and metadata.\");\n\nexport const plausibleAnalyticsQueryStats = action(\"PLAUSIBLE_ANALYTICS_QUERY_STATS\", {\n slug: \"plausible_analytics-query-stats\",\n name: \"Query Analytics Stats\",\n description: \"Tool to query analytics stats for a site using the Stats API v2. Use when you need to retrieve historical or real-time statistics such as visitors, pageviews, bounce rate, visit duration, and more. Supports filtering, grouping by dimensions, and custom date ranges.\",\n input: PlausibleAnalyticsQueryStatsInput,\n output: PlausibleAnalyticsQueryStatsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAoCA,IAAAA,EAAE,OAAO;CACxD,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,0PAA0P,CAAC,CAAC,SAAS;CACpV,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+gBAA+gB;CACrjB,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CAChH,YAAYA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iZAAiZ,CAAC,CAAC,SAAS;AACvc,CAAC,CAAC,CAAC,SAAS,+EAA+E;AAC3F,MAAM,4DAA4DA,IAAAA,EAAE,OAAO,EACzE,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C;AACxE,MAAM,8DAA8DA,IAAAA,EAAE,OAAO;CAC3E,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,kFAAkF;CACrJ,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,OAAO;EAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI;EAAGA,IAAAA,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,wFAAwF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6DAA6D;AACvF,MAAa,qCAAqCA,IAAAA,EAAE,OAAO;CACzD,MAAM,0DAA0D,SAAS,CAAC,CAAC,SAAS;CACpF,SAASA,IAAAA,EAAE,MAAM,2DAA2D,CAAC,CAAC,SAAS,4DAA4D;AACrJ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iDAAiD;AAE3E,MAAa,+BAA+BC,eAAAA,OAAO,mCAAmC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -11,12 +11,12 @@ declare const PlausibleAnalyticsQueryStatsInput: z.ZodObject<{
|
|
|
11
11
|
declare const PlausibleAnalyticsQueryStatsOutput: z.ZodObject<{
|
|
12
12
|
meta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13
13
|
warnings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
14
|
-
}, z.core.$
|
|
14
|
+
}, z.core.$loose>>>;
|
|
15
15
|
results: z.ZodArray<z.ZodObject<{
|
|
16
16
|
metrics: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber]>>;
|
|
17
17
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber]>>>>;
|
|
18
|
-
}, z.core.$
|
|
19
|
-
}, z.core.$
|
|
18
|
+
}, z.core.$loose>>;
|
|
19
|
+
}, z.core.$loose>;
|
|
20
20
|
declare const plausibleAnalyticsQueryStats: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
21
21
|
metrics: string[];
|
|
22
22
|
site_id: string;
|
|
@@ -11,12 +11,12 @@ declare const PlausibleAnalyticsQueryStatsInput: z.ZodObject<{
|
|
|
11
11
|
declare const PlausibleAnalyticsQueryStatsOutput: z.ZodObject<{
|
|
12
12
|
meta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13
13
|
warnings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
14
|
-
}, z.core.$
|
|
14
|
+
}, z.core.$loose>>>;
|
|
15
15
|
results: z.ZodArray<z.ZodObject<{
|
|
16
16
|
metrics: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber]>>;
|
|
17
17
|
dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber]>>>>;
|
|
18
|
-
}, z.core.$
|
|
19
|
-
}, z.core.$
|
|
18
|
+
}, z.core.$loose>>;
|
|
19
|
+
}, z.core.$loose>;
|
|
20
20
|
declare const plausibleAnalyticsQueryStats: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
21
21
|
metrics: string[];
|
|
22
22
|
site_id: string;
|
|
@@ -8,7 +8,7 @@ const PlausibleAnalyticsQueryStatsInput = z.object({
|
|
|
8
8
|
date_range: z.union([z.string(), z.array(z.string())]),
|
|
9
9
|
dimensions: z.array(z.string()).describe("List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.").optional()
|
|
10
10
|
}).describe("Request model for querying analytics stats for a site using the Stats API v2.");
|
|
11
|
-
const PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({ warnings: z.array(z.string()).describe("List of warnings related to the query execution.").nullable().optional() }).describe("Metadata about the query including warnings.");
|
|
11
|
+
const PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({ warnings: z.array(z.string()).describe("List of warnings related to the query execution.").nullable().optional() }).passthrough().describe("Metadata about the query including warnings.");
|
|
12
12
|
const PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({
|
|
13
13
|
metrics: z.array(z.union([z.number().int(), z.number()])).describe("Values for the metrics specified in the query (order matches the metrics array)."),
|
|
14
14
|
dimensions: z.array(z.union([
|
|
@@ -16,7 +16,7 @@ const PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({
|
|
|
16
16
|
z.number().int(),
|
|
17
17
|
z.number()
|
|
18
18
|
])).describe("Values for the dimensions specified in the query (order matches the dimensions array).").nullable().optional()
|
|
19
|
-
}).describe("Individual result object with metrics and dimension values.");
|
|
19
|
+
}).passthrough().describe("Individual result object with metrics and dimension values.");
|
|
20
20
|
const plausibleAnalyticsQueryStats = action("PLAUSIBLE_ANALYTICS_QUERY_STATS", {
|
|
21
21
|
slug: "plausible_analytics-query-stats",
|
|
22
22
|
name: "Query Analytics Stats",
|
|
@@ -25,7 +25,7 @@ const plausibleAnalyticsQueryStats = action("PLAUSIBLE_ANALYTICS_QUERY_STATS", {
|
|
|
25
25
|
output: z.object({
|
|
26
26
|
meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),
|
|
27
27
|
results: z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe("Array of result objects with metrics and dimension values.")
|
|
28
|
-
}).describe("Response containing query results and metadata.")
|
|
28
|
+
}).passthrough().describe("Response containing query results and metadata.")
|
|
29
29
|
});
|
|
30
30
|
//#endregion
|
|
31
31
|
export { plausibleAnalyticsQueryStats };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-stats.mjs","names":[],"sources":["../../src/actions/query-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsQueryStatsInput = z.object({\n filters: z.array(z.array(z.union([z.string(), z.array(z.string())]))).describe(\"Array of filter conditions to apply to the query. Each filter is an array with format: [dimension, operator, value]. Operators: 'is', 'is_not', 'contains', 'does_not_contain'. Example: [['event:page', 'is', '/blog'], ['visit:country', 'is', 'US']].\").optional(),\n metrics: z.array(z.string()).describe(\"List of metrics to calculate. Available metrics: 'visitors' (unique visitors), 'visits' (total visits), 'pageviews' (total page views), 'views_per_visit' (average pages per visit), 'bounce_rate' (percentage of single-page visits), 'visit_duration' (average visit duration in seconds), 'events' (total events), 'scroll_depth' (average scroll depth percentage), 'percentage' (percentage of total), 'conversion_rate', 'group_conversion_rate', 'average_revenue', 'total_revenue', 'time_on_page' (average time on page in seconds).\"),\n site_id: z.string().describe(\"Domain of your site on Plausible to be queried (e.g., 'example.com', 'composio').\"),\n date_range: z.union([z.string(), z.array(z.string())]),\n dimensions: z.array(z.string()).describe(\"List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.\").optional(),\n}).describe(\"Request model for querying analytics stats for a site using the Stats API v2.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({\n warnings: z.array(z.string()).describe(\"List of warnings related to the query execution.\").nullable().optional(),\n}).describe(\"Metadata about the query including warnings.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({\n metrics: z.array(z.union([z.number().int(), z.number()])).describe(\"Values for the metrics specified in the query (order matches the metrics array).\"),\n dimensions: z.array(z.union([z.string(), z.number().int(), z.number()])).describe(\"Values for the dimensions specified in the query (order matches the dimensions array).\").nullable().optional(),\n}).describe(\"Individual result object with metrics and dimension values.\");\nexport const PlausibleAnalyticsQueryStatsOutput = z.object({\n meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),\n results: z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe(\"Array of result objects with metrics and dimension values.\"),\n}).describe(\"Response containing query results and metadata.\");\n\nexport const plausibleAnalyticsQueryStats = action(\"PLAUSIBLE_ANALYTICS_QUERY_STATS\", {\n slug: \"plausible_analytics-query-stats\",\n name: \"Query Analytics Stats\",\n description: \"Tool to query analytics stats for a site using the Stats API v2. Use when you need to retrieve historical or real-time statistics such as visitors, pageviews, bounce rate, visit duration, and more. Supports filtering, grouping by dimensions, and custom date ranges.\",\n input: PlausibleAnalyticsQueryStatsInput,\n output: PlausibleAnalyticsQueryStatsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAoC,EAAE,OAAO;CACxD,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,0PAA0P,CAAC,CAAC,SAAS;CACpV,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+gBAA+gB;CACrjB,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CAChH,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iZAAiZ,CAAC,CAAC,SAAS;AACvc,CAAC,CAAC,CAAC,SAAS,+EAA+E;AAC3F,MAAM,4DAA4D,EAAE,OAAO,EACzE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACjH,CAAC,CAAC,CAAC,SAAS,8CAA8C;
|
|
1
|
+
{"version":3,"file":"query-stats.mjs","names":[],"sources":["../../src/actions/query-stats.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsQueryStatsInput = z.object({\n filters: z.array(z.array(z.union([z.string(), z.array(z.string())]))).describe(\"Array of filter conditions to apply to the query. Each filter is an array with format: [dimension, operator, value]. Operators: 'is', 'is_not', 'contains', 'does_not_contain'. Example: [['event:page', 'is', '/blog'], ['visit:country', 'is', 'US']].\").optional(),\n metrics: z.array(z.string()).describe(\"List of metrics to calculate. Available metrics: 'visitors' (unique visitors), 'visits' (total visits), 'pageviews' (total page views), 'views_per_visit' (average pages per visit), 'bounce_rate' (percentage of single-page visits), 'visit_duration' (average visit duration in seconds), 'events' (total events), 'scroll_depth' (average scroll depth percentage), 'percentage' (percentage of total), 'conversion_rate', 'group_conversion_rate', 'average_revenue', 'total_revenue', 'time_on_page' (average time on page in seconds).\"),\n site_id: z.string().describe(\"Domain of your site on Plausible to be queried (e.g., 'example.com', 'composio').\"),\n date_range: z.union([z.string(), z.array(z.string())]),\n dimensions: z.array(z.string()).describe(\"List of dimensions to group results by. Common dimensions: 'event:goal' (goal names), 'event:page' (page paths), 'event:hostname' (hostnames), 'visit:source' (traffic sources), 'visit:referrer' (referrer URLs), 'visit:utm_medium', 'visit:utm_source', 'visit:utm_campaign', 'visit:device' (device types), 'visit:browser', 'visit:os' (operating systems), 'visit:country', 'visit:region', 'visit:city'.\").optional(),\n}).describe(\"Request model for querying analytics stats for a site using the Stats API v2.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema = z.object({\n warnings: z.array(z.string()).describe(\"List of warnings related to the query execution.\").nullable().optional(),\n}).passthrough().describe(\"Metadata about the query including warnings.\");\nconst PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema = z.object({\n metrics: z.array(z.union([z.number().int(), z.number()])).describe(\"Values for the metrics specified in the query (order matches the metrics array).\"),\n dimensions: z.array(z.union([z.string(), z.number().int(), z.number()])).describe(\"Values for the dimensions specified in the query (order matches the dimensions array).\").nullable().optional(),\n}).passthrough().describe(\"Individual result object with metrics and dimension values.\");\nexport const PlausibleAnalyticsQueryStatsOutput = z.object({\n meta: PlausibleAnalyticsQueryStats_QueryStatsResponseMetaSchema.nullable().optional(),\n results: z.array(PlausibleAnalyticsQueryStats_QueryStatsResponseResultSchema).describe(\"Array of result objects with metrics and dimension values.\"),\n}).passthrough().describe(\"Response containing query results and metadata.\");\n\nexport const plausibleAnalyticsQueryStats = action(\"PLAUSIBLE_ANALYTICS_QUERY_STATS\", {\n slug: \"plausible_analytics-query-stats\",\n name: \"Query Analytics Stats\",\n description: \"Tool to query analytics stats for a site using the Stats API v2. Use when you need to retrieve historical or real-time statistics such as visitors, pageviews, bounce rate, visit duration, and more. Supports filtering, grouping by dimensions, and custom date ranges.\",\n input: PlausibleAnalyticsQueryStatsInput,\n output: PlausibleAnalyticsQueryStatsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAoC,EAAE,OAAO;CACxD,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,0PAA0P,CAAC,CAAC,SAAS;CACpV,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+gBAA+gB;CACrjB,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CAChH,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iZAAiZ,CAAC,CAAC,SAAS;AACvc,CAAC,CAAC,CAAC,SAAS,+EAA+E;AAC3F,MAAM,4DAA4D,EAAE,OAAO,EACzE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C;AACxE,MAAM,8DAA8D,EAAE,OAAO;CAC3E,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,kFAAkF;CACrJ,YAAY,EAAE,MAAM,EAAE,MAAM;EAAC,EAAE,OAAO;EAAG,EAAE,OAAO,CAAC,CAAC,IAAI;EAAG,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,wFAAwF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6DAA6D;AAMvF,MAAa,+BAA+B,OAAO,mCAAmC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAVgD,EAAE,OAAO;EACzD,MAAM,0DAA0D,SAAS,CAAC,CAAC,SAAS;EACpF,SAAS,EAAE,MAAM,2DAA2D,CAAC,CAAC,SAAS,4DAA4D;CACrJ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iDAOhB;AACV,CAAC"}
|
|
@@ -4,7 +4,7 @@ let zod = require("zod");
|
|
|
4
4
|
const PlausibleAnalyticsRecordEventInput = zod.z.object({
|
|
5
5
|
url: zod.z.string().describe("URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google')."),
|
|
6
6
|
name: zod.z.string().describe("Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click')."),
|
|
7
|
-
props: zod.z.
|
|
7
|
+
props: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Custom properties for the event as key-value pairs (max 30 properties). Values can be strings, numbers, or booleans.").optional(),
|
|
8
8
|
domain: zod.z.string().describe("Domain name of the site in Plausible (e.g., 'example.com')."),
|
|
9
9
|
revenue: zod.z.object({
|
|
10
10
|
amount: zod.z.string().describe("Revenue amount as a string (e.g., '10.50', '99.99')."),
|
|
@@ -18,7 +18,7 @@ const PlausibleAnalyticsRecordEventInput = zod.z.object({
|
|
|
18
18
|
const PlausibleAnalyticsRecordEventOutput = zod.z.object({
|
|
19
19
|
message: zod.z.string().describe("Success or error message from the API.").nullable(),
|
|
20
20
|
success: zod.z.boolean().describe("Whether the event was successfully recorded.").nullable()
|
|
21
|
-
}).describe("Response model for record event action.");
|
|
21
|
+
}).passthrough().describe("Response model for record event action.");
|
|
22
22
|
const plausibleAnalyticsRecordEvent = require_action.action("PLAUSIBLE_ANALYTICS_RECORD_EVENT", {
|
|
23
23
|
slug: "plausible_analytics-record-event",
|
|
24
24
|
name: "Record Event",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-event.cjs","names":["z","action"],"sources":["../../src/actions/record-event.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsRecordEventInput = z.object({\n url: z.string().describe(\"URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google').\"),\n name: z.string().describe(\"Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click').\"),\n props: z.
|
|
1
|
+
{"version":3,"file":"record-event.cjs","names":["z","action"],"sources":["../../src/actions/record-event.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsRecordEventInput = z.object({\n url: z.string().describe(\"URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google').\"),\n name: z.string().describe(\"Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click').\"),\n props: z.record(z.string(), z.unknown()).describe(\"Custom properties for the event as key-value pairs (max 30 properties). Values can be strings, numbers, or booleans.\").optional(),\n domain: z.string().describe(\"Domain name of the site in Plausible (e.g., 'example.com').\"),\n revenue: z.object({\n amount: z.string().describe(\"Revenue amount as a string (e.g., '10.50', '99.99').\"),\n currency: z.string().describe(\"ISO 4217 currency code (e.g., USD, EUR, GBP).\"),\n}).describe(\"Revenue data for the event.\").optional(),\n referrer: z.string().describe(\"Referrer URL for this event (e.g., 'https://google.com/search').\").optional(),\n user_agent: z.string().describe(\"Raw User-Agent string for unique visitor identification and device detection. Should be the actual user agent from the client's browser or app.\"),\n interactive: z.boolean().describe(\"Whether the event counts towards bounce rate. Default is true. Set to false for non-interactive events like automatic tracking.\").optional(),\n x_forwarded_for: z.string().describe(\"IP address of the client for unique visitor counting and location data (e.g., '203.0.113.195'). If not provided, the server's IP will be used.\").optional(),\n}).describe(\"Request model for recording a pageview or custom event.\");\nexport const PlausibleAnalyticsRecordEventOutput = z.object({\n message: z.string().describe(\"Success or error message from the API.\").nullable(),\n success: z.boolean().describe(\"Whether the event was successfully recorded.\").nullable(),\n}).passthrough().describe(\"Response model for record event action.\");\n\nexport const plausibleAnalyticsRecordEvent = action(\"PLAUSIBLE_ANALYTICS_RECORD_EVENT\", {\n slug: \"plausible_analytics-record-event\",\n name: \"Record Event\",\n description: \"Tool to record a pageview or custom event via the Plausible Events API. Use when tracking Android/iOS mobile apps or server-side tracking. Requires proper User-Agent and optionally X-Forwarded-For headers for unique visitor counting.\",\n input: PlausibleAnalyticsRecordEventInput,\n output: PlausibleAnalyticsRecordEventOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAqCA,IAAAA,EAAE,OAAO;CACzD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qJAAqJ;CAC9K,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI;CAC5J,OAAOA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,sHAAsH,CAAC,CAAC,SAAS;CACnL,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;CACzF,SAASA,IAAAA,EAAE,OAAO;EAClB,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD;EAClF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CAC/E,CAAC,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CAClD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAC3G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iJAAiJ;CACjL,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iIAAiI,CAAC,CAAC,SAAS;CAC9K,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ,CAAC,CAAC,SAAS;AAClM,CAAC,CAAC,CAAC,SAAS,yDAAyD;AACrE,MAAa,sCAAsCA,IAAAA,EAAE,OAAO;CAC1D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAChF,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,yCAAyC;AAEnE,MAAa,gCAAgCC,eAAAA,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
declare const PlausibleAnalyticsRecordEventInput: z.ZodObject<{
|
|
5
5
|
url: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
7
|
-
props: z.ZodOptional<z.
|
|
7
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
8
|
domain: z.ZodString;
|
|
9
9
|
revenue: z.ZodOptional<z.ZodObject<{
|
|
10
10
|
amount: z.ZodString;
|
|
@@ -18,13 +18,13 @@ declare const PlausibleAnalyticsRecordEventInput: z.ZodObject<{
|
|
|
18
18
|
declare const PlausibleAnalyticsRecordEventOutput: z.ZodObject<{
|
|
19
19
|
message: z.ZodNullable<z.ZodString>;
|
|
20
20
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>;
|
|
22
22
|
declare const plausibleAnalyticsRecordEvent: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
23
23
|
url: string;
|
|
24
24
|
name: string;
|
|
25
25
|
domain: string;
|
|
26
26
|
user_agent: string;
|
|
27
|
-
props?: Record<string,
|
|
27
|
+
props?: Record<string, unknown> | undefined;
|
|
28
28
|
revenue?: {
|
|
29
29
|
amount: string;
|
|
30
30
|
currency: string;
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
declare const PlausibleAnalyticsRecordEventInput: z.ZodObject<{
|
|
5
5
|
url: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
7
|
-
props: z.ZodOptional<z.
|
|
7
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
8
|
domain: z.ZodString;
|
|
9
9
|
revenue: z.ZodOptional<z.ZodObject<{
|
|
10
10
|
amount: z.ZodString;
|
|
@@ -18,13 +18,13 @@ declare const PlausibleAnalyticsRecordEventInput: z.ZodObject<{
|
|
|
18
18
|
declare const PlausibleAnalyticsRecordEventOutput: z.ZodObject<{
|
|
19
19
|
message: z.ZodNullable<z.ZodString>;
|
|
20
20
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>;
|
|
22
22
|
declare const plausibleAnalyticsRecordEvent: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
23
23
|
url: string;
|
|
24
24
|
name: string;
|
|
25
25
|
domain: string;
|
|
26
26
|
user_agent: string;
|
|
27
|
-
props?: Record<string,
|
|
27
|
+
props?: Record<string, unknown> | undefined;
|
|
28
28
|
revenue?: {
|
|
29
29
|
amount: string;
|
|
30
30
|
currency: string;
|
|
@@ -7,7 +7,7 @@ const plausibleAnalyticsRecordEvent = action("PLAUSIBLE_ANALYTICS_RECORD_EVENT",
|
|
|
7
7
|
input: z.object({
|
|
8
8
|
url: z.string().describe("URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google')."),
|
|
9
9
|
name: z.string().describe("Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click')."),
|
|
10
|
-
props: z.
|
|
10
|
+
props: z.record(z.string(), z.unknown()).describe("Custom properties for the event as key-value pairs (max 30 properties). Values can be strings, numbers, or booleans.").optional(),
|
|
11
11
|
domain: z.string().describe("Domain name of the site in Plausible (e.g., 'example.com')."),
|
|
12
12
|
revenue: z.object({
|
|
13
13
|
amount: z.string().describe("Revenue amount as a string (e.g., '10.50', '99.99')."),
|
|
@@ -21,7 +21,7 @@ const plausibleAnalyticsRecordEvent = action("PLAUSIBLE_ANALYTICS_RECORD_EVENT",
|
|
|
21
21
|
output: z.object({
|
|
22
22
|
message: z.string().describe("Success or error message from the API.").nullable(),
|
|
23
23
|
success: z.boolean().describe("Whether the event was successfully recorded.").nullable()
|
|
24
|
-
}).describe("Response model for record event action.")
|
|
24
|
+
}).passthrough().describe("Response model for record event action.")
|
|
25
25
|
});
|
|
26
26
|
//#endregion
|
|
27
27
|
export { plausibleAnalyticsRecordEvent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-event.mjs","names":[],"sources":["../../src/actions/record-event.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsRecordEventInput = z.object({\n url: z.string().describe(\"URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google').\"),\n name: z.string().describe(\"Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click').\"),\n props: z.
|
|
1
|
+
{"version":3,"file":"record-event.mjs","names":[],"sources":["../../src/actions/record-event.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PlausibleAnalyticsRecordEventInput = z.object({\n url: z.string().describe(\"URL of the page where the event was triggered. UTM parameters will be automatically extracted (e.g., 'https://example.com/page?utm_source=google').\"),\n name: z.string().describe(\"Name of the event. Use 'pageview' for page views, other names become custom events (e.g., 'signup', 'purchase', 'button_click').\"),\n props: z.record(z.string(), z.unknown()).describe(\"Custom properties for the event as key-value pairs (max 30 properties). Values can be strings, numbers, or booleans.\").optional(),\n domain: z.string().describe(\"Domain name of the site in Plausible (e.g., 'example.com').\"),\n revenue: z.object({\n amount: z.string().describe(\"Revenue amount as a string (e.g., '10.50', '99.99').\"),\n currency: z.string().describe(\"ISO 4217 currency code (e.g., USD, EUR, GBP).\"),\n}).describe(\"Revenue data for the event.\").optional(),\n referrer: z.string().describe(\"Referrer URL for this event (e.g., 'https://google.com/search').\").optional(),\n user_agent: z.string().describe(\"Raw User-Agent string for unique visitor identification and device detection. Should be the actual user agent from the client's browser or app.\"),\n interactive: z.boolean().describe(\"Whether the event counts towards bounce rate. Default is true. Set to false for non-interactive events like automatic tracking.\").optional(),\n x_forwarded_for: z.string().describe(\"IP address of the client for unique visitor counting and location data (e.g., '203.0.113.195'). If not provided, the server's IP will be used.\").optional(),\n}).describe(\"Request model for recording a pageview or custom event.\");\nexport const PlausibleAnalyticsRecordEventOutput = z.object({\n message: z.string().describe(\"Success or error message from the API.\").nullable(),\n success: z.boolean().describe(\"Whether the event was successfully recorded.\").nullable(),\n}).passthrough().describe(\"Response model for record event action.\");\n\nexport const plausibleAnalyticsRecordEvent = action(\"PLAUSIBLE_ANALYTICS_RECORD_EVENT\", {\n slug: \"plausible_analytics-record-event\",\n name: \"Record Event\",\n description: \"Tool to record a pageview or custom event via the Plausible Events API. Use when tracking Android/iOS mobile apps or server-side tracking. Requires proper User-Agent and optionally X-Forwarded-For headers for unique visitor counting.\",\n input: PlausibleAnalyticsRecordEventInput,\n output: PlausibleAnalyticsRecordEventOutput,\n});\n"],"mappings":";;AAuBA,MAAa,gCAAgC,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAvBgD,EAAE,OAAO;EACzD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,qJAAqJ;EAC9K,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI;EAC5J,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,sHAAsH,CAAC,CAAC,SAAS;EACnL,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;EACzF,SAAS,EAAE,OAAO;GAClB,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD;GAClF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;EAC/E,CAAC,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;EAClD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EAC3G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iJAAiJ;EACjL,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,iIAAiI,CAAC,CAAC,SAAS;EAC9K,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ,CAAC,CAAC,SAAS;CAClM,CAAC,CAAC,CAAC,SAAS,yDAUH;CACP,QAViD,EAAE,OAAO;EAC1D,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EAChF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CACzF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,yCAOhB;AACV,CAAC"}
|