@meetkai/mka1 0.54.43 → 0.54.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/bin/mcp-server.js +8 -6
  2. package/bin/mcp-server.js.map +9 -9
  3. package/dist/commonjs/funcs/analyticsQuery.d.ts +1 -1
  4. package/dist/commonjs/funcs/analyticsQuery.js +1 -1
  5. package/dist/commonjs/lib/config.d.ts +2 -2
  6. package/dist/commonjs/lib/config.js +2 -2
  7. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -1
  9. package/dist/commonjs/mcp-server/tools/analyticsQuery.js +1 -1
  10. package/dist/commonjs/mcp-server/tools/analyticsQuery.js.map +1 -1
  11. package/dist/commonjs/models/components/analyticsqueryrequest.d.ts +8 -3
  12. package/dist/commonjs/models/components/analyticsqueryrequest.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/analyticsqueryrequest.js +3 -1
  14. package/dist/commonjs/models/components/analyticsqueryrequest.js.map +1 -1
  15. package/dist/commonjs/models/components/analyticsqueryresponse.d.ts +3 -0
  16. package/dist/commonjs/models/components/analyticsqueryresponse.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/analyticsqueryresponse.js.map +1 -1
  18. package/dist/commonjs/react-query/analyticsQuery.d.ts +1 -1
  19. package/dist/commonjs/react-query/analyticsQuery.js +1 -1
  20. package/dist/commonjs/sdk/analytics.d.ts +1 -1
  21. package/dist/commonjs/sdk/analytics.js +1 -1
  22. package/dist/esm/funcs/analyticsQuery.d.ts +1 -1
  23. package/dist/esm/funcs/analyticsQuery.js +1 -1
  24. package/dist/esm/lib/config.d.ts +2 -2
  25. package/dist/esm/lib/config.js +2 -2
  26. package/dist/esm/mcp-server/mcp-server.js +1 -1
  27. package/dist/esm/mcp-server/server.js +1 -1
  28. package/dist/esm/mcp-server/tools/analyticsQuery.js +1 -1
  29. package/dist/esm/mcp-server/tools/analyticsQuery.js.map +1 -1
  30. package/dist/esm/models/components/analyticsqueryrequest.d.ts +8 -3
  31. package/dist/esm/models/components/analyticsqueryrequest.d.ts.map +1 -1
  32. package/dist/esm/models/components/analyticsqueryrequest.js +3 -1
  33. package/dist/esm/models/components/analyticsqueryrequest.js.map +1 -1
  34. package/dist/esm/models/components/analyticsqueryresponse.d.ts +3 -0
  35. package/dist/esm/models/components/analyticsqueryresponse.d.ts.map +1 -1
  36. package/dist/esm/models/components/analyticsqueryresponse.js.map +1 -1
  37. package/dist/esm/react-query/analyticsQuery.d.ts +1 -1
  38. package/dist/esm/react-query/analyticsQuery.js +1 -1
  39. package/dist/esm/sdk/analytics.d.ts +1 -1
  40. package/dist/esm/sdk/analytics.js +1 -1
  41. package/jsr.json +1 -1
  42. package/package.json +1 -1
  43. package/src/funcs/analyticsQuery.ts +1 -1
  44. package/src/lib/config.ts +2 -2
  45. package/src/mcp-server/mcp-server.ts +1 -1
  46. package/src/mcp-server/server.ts +1 -1
  47. package/src/mcp-server/tools/analyticsQuery.ts +1 -1
  48. package/src/models/components/analyticsqueryrequest.ts +10 -3
  49. package/src/models/components/analyticsqueryresponse.ts +3 -0
  50. package/src/react-query/analyticsQuery.ts +1 -1
  51. package/src/sdk/analytics.ts +1 -1
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.1.0",
68
- sdkVersion: "0.54.43",
68
+ sdkVersion: "0.54.44",
69
69
  genVersion: "2.938.0",
70
- userAgent: "speakeasy-sdk/typescript 0.54.43 2.938.0 1.1.0 @meetkai/mka1",
70
+ userAgent: "speakeasy-sdk/typescript 0.54.44 2.938.0 1.1.0 @meetkai/mka1",
71
71
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.54.43",
22
+ currentVersion: "0.54.44",
23
23
  },
24
24
  });
25
25
 
@@ -440,7 +440,7 @@ export function createMCPServer(deps: {
440
440
  }) {
441
441
  const server = new McpServer({
442
442
  name: "SDK",
443
- version: "0.54.43",
443
+ version: "0.54.44",
444
444
  });
445
445
 
446
446
  const client = new SDKCore({
@@ -14,7 +14,7 @@ export const tool$analyticsQuery: ToolDefinition<typeof args> = {
14
14
  name: "analytics-query",
15
15
  description: `Query event counts or unique visitors
16
16
 
17
- Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.`,
17
+ Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into hour, day, or week buckets that start on the clock of an IANA time zone, UTC by default. Each bucket is returned as the UTC instant at which it starts. The range includes from and excludes to. Duplicate event IDs are counted once. An unknown time zone returns 400.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await analyticsQuery(
@@ -24,7 +24,7 @@ export type AnalyticsQueryRequestMetric = ClosedEnum<
24
24
  >;
25
25
 
26
26
  /**
27
- * Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
27
+ * Split results into time buckets. Hours, days, and Monday-start weeks begin on the clock of timezone, which defaults to UTC. Empty buckets are omitted.
28
28
  */
29
29
  export const Bucket = {
30
30
  Hour: "hour",
@@ -32,7 +32,7 @@ export const Bucket = {
32
32
  Week: "week",
33
33
  } as const;
34
34
  /**
35
- * Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
35
+ * Split results into time buckets. Hours, days, and Monday-start weeks begin on the clock of timezone, which defaults to UTC. Empty buckets are omitted.
36
36
  */
37
37
  export type Bucket = ClosedEnum<typeof Bucket>;
38
38
 
@@ -92,9 +92,13 @@ export type AnalyticsQueryRequest = {
92
92
  */
93
93
  eventName?: string | undefined;
94
94
  /**
95
- * Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
95
+ * Split results into time buckets. Hours, days, and Monday-start weeks begin on the clock of timezone, which defaults to UTC. Empty buckets are omitted.
96
96
  */
97
97
  bucket?: Bucket | undefined;
98
+ /**
99
+ * IANA time zone name that sets where buckets start. Defaults to UTC. A day is a local calendar day and lasts 23 or 25 hours when the clocks change. In zones offset by 30 or 45 minutes, hours start on the local clock. UTC offsets such as +05:30 are rejected, as are identifiers outside the IANA database such as PST or BST, and names the service's time zone database does not know, which can lag the newest IANA zones; fall back to UTC when the 400 names timezone. Only bucket boundaries change: from, to, filters, and the UTC format of each row's bucket stay the same. Has no effect without bucket.
100
+ */
101
+ timezone?: string | undefined;
98
102
  /**
99
103
  * Group results by one event property. Missing values and null share a group.
100
104
  */
@@ -221,6 +225,7 @@ export const AnalyticsQueryRequest$inboundSchema: z.ZodType<
221
225
  to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
222
226
  event_name: z.string().optional(),
223
227
  bucket: Bucket$inboundSchema.optional(),
228
+ timezone: z.string().optional(),
224
229
  group_by: z.string().optional(),
225
230
  filters: z.array(z.lazy(() => AnalyticsQueryRequestFilters$inboundSchema))
226
231
  .optional(),
@@ -238,6 +243,7 @@ export type AnalyticsQueryRequest$Outbound = {
238
243
  to: string;
239
244
  event_name?: string | undefined;
240
245
  bucket?: string | undefined;
246
+ timezone?: string | undefined;
241
247
  group_by?: string | undefined;
242
248
  filters?: Array<AnalyticsQueryRequestFilters$Outbound> | undefined;
243
249
  limit: number;
@@ -254,6 +260,7 @@ export const AnalyticsQueryRequest$outboundSchema: z.ZodType<
254
260
  to: z.date().transform(v => v.toISOString()),
255
261
  eventName: z.string().optional(),
256
262
  bucket: Bucket$outboundSchema.optional(),
263
+ timezone: z.string().optional(),
257
264
  groupBy: z.string().optional(),
258
265
  filters: z.array(z.lazy(() => AnalyticsQueryRequestFilters$outboundSchema))
259
266
  .optional(),
@@ -19,6 +19,9 @@ export type AnalyticsQueryResponseMetric = ClosedEnum<
19
19
  export type Group = string | number | boolean;
20
20
 
21
21
  export type Rows = {
22
+ /**
23
+ * Start of the bucket as an ISO 8601 UTC timestamp ending in Z. With a timezone, this is the UTC instant at which the local hour, day, or week starts. Format it in that time zone for display.
24
+ */
22
25
  bucket?: string | undefined;
23
26
  group?: string | number | boolean | null | undefined;
24
27
  value: number;
@@ -50,7 +50,7 @@ export type AnalyticsQueryMutationError =
50
50
  * Query event counts or unique visitors
51
51
  *
52
52
  * @remarks
53
- * Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.
53
+ * Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into hour, day, or week buckets that start on the clock of an IANA time zone, UTC by default. Each bucket is returned as the UTC instant at which it starts. The range includes from and excludes to. Duplicate event IDs are counted once. An unknown time zone returns 400.
54
54
  */
55
55
  export function useAnalyticsQueryMutation(
56
56
  options?: MutationHookOptions<
@@ -45,7 +45,7 @@ export class Analytics extends ClientSDK {
45
45
  * Query event counts or unique visitors
46
46
  *
47
47
  * @remarks
48
- * Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.
48
+ * Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into hour, day, or week buckets that start on the clock of an IANA time zone, UTC by default. Each bucket is returned as the UTC instant at which it starts. The range includes from and excludes to. Duplicate event IDs are counted once. An unknown time zone returns 400.
49
49
  */
50
50
  async query(
51
51
  request: operations.AnalyticsQueryRequest,