@magemetrics/core 0.4.2 → 0.4.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/index.d.ts CHANGED
@@ -266,10 +266,12 @@ declare const ExtractInsightResponseSchema: z.ZodUnion<[z.ZodObject<{
266
266
  declare type FrontendRecentFlows = z.infer<typeof FrontendRecentFlowsSchema>;
267
267
 
268
268
  declare const FrontendRecentFlowsSchema: z.ZodObject<{
269
+ title: z.ZodNullable<z.ZodString>;
269
270
  id: z.ZodString;
270
271
  request: z.ZodString;
271
272
  created_at: z.ZodString;
272
273
  user_id: z.ZodNullable<z.ZodString>;
274
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
273
275
  }, z.core.$strip>;
274
276
 
275
277
  /**
@@ -563,6 +565,7 @@ export declare interface MageMetricsClientConfig {
563
565
  externalJwt?: string;
564
566
  additionalHeaders?: Record<string, string>;
565
567
  storageAdapter?: AsyncStorage_2;
568
+ applicationName?: string;
566
569
  }
567
570
 
568
571
  /**
@@ -1040,7 +1043,9 @@ declare interface operations {
1040
1043
  created_at: string;
1041
1044
  id: string;
1042
1045
  request: string;
1046
+ title: string | null;
1043
1047
  user_id: string | null;
1048
+ application_id?: number | null;
1044
1049
  user_friendly_goal?: string;
1045
1050
  has_chat_messages: boolean;
1046
1051
  };
@@ -1093,7 +1098,9 @@ declare interface operations {
1093
1098
  created_at: string;
1094
1099
  id: string;
1095
1100
  request: string;
1101
+ title: string | null;
1096
1102
  user_id: string | null;
1103
+ application_id?: number | null;
1097
1104
  }[];
1098
1105
  };
1099
1106
  };
@@ -1838,6 +1845,7 @@ declare interface operations {
1838
1845
  content: {
1839
1846
  "application/json": {
1840
1847
  userQuery: string;
1848
+ applicationName?: string;
1841
1849
  };
1842
1850
  };
1843
1851
  };
@@ -1855,6 +1863,17 @@ declare interface operations {
1855
1863
  };
1856
1864
  };
1857
1865
  };
1866
+ /** @description Application not found */
1867
+ 400: {
1868
+ headers: {
1869
+ [name: string]: unknown;
1870
+ };
1871
+ content: {
1872
+ "application/json": {
1873
+ error: string;
1874
+ };
1875
+ };
1876
+ };
1858
1877
  /** @description Something wrong happened */
1859
1878
  500: {
1860
1879
  headers: {
package/dist/index.js CHANGED
@@ -577,7 +577,9 @@ var DatabaseFlowSchema = z.object({
577
577
  created_at: z.string(),
578
578
  id: z.string(),
579
579
  request: z.string(),
580
+ title: z.string().nullable(),
580
581
  user_id: z.string().nullable(),
582
+ application_id: z.number().nullable().optional(),
581
583
  flow_steps: z.array(FlowStepSchema),
582
584
  flow_chat_messages: z.array(z.object({ count: z.number() }))
583
585
  });
@@ -1866,7 +1868,8 @@ var CreateFlow = createRoute({
1866
1868
  content: {
1867
1869
  "application/json": {
1868
1870
  schema: z.object({
1869
- userQuery: z.string()
1871
+ userQuery: z.string(),
1872
+ applicationName: z.string().optional()
1870
1873
  })
1871
1874
  }
1872
1875
  }
@@ -1884,6 +1887,16 @@ var CreateFlow = createRoute({
1884
1887
  }
1885
1888
  }
1886
1889
  },
1890
+ 400: {
1891
+ description: "Application not found",
1892
+ content: {
1893
+ "application/json": {
1894
+ schema: z.object({
1895
+ error: z.string()
1896
+ })
1897
+ }
1898
+ }
1899
+ },
1887
1900
  500: {
1888
1901
  description: "Something wrong happened",
1889
1902
  content: {
@@ -3108,7 +3121,7 @@ var toSearchParams = ({ cursor, filters, sorting, limit }) => {
3108
3121
 
3109
3122
  // package.json
3110
3123
  var package_default = {
3111
- version: "0.4.2"};
3124
+ version: "0.4.3"};
3112
3125
  var MageMetricsChatTransport = class extends DefaultChatTransport {
3113
3126
  constructor(apiUrl, flowId, options) {
3114
3127
  super({
@@ -3354,7 +3367,8 @@ var MageMetricsClient = class {
3354
3367
  CreateFlow.path,
3355
3368
  {
3356
3369
  body: {
3357
- userQuery: request.query
3370
+ userQuery: request.query,
3371
+ applicationName: this.config.applicationName
3358
3372
  }
3359
3373
  }
3360
3374
  );