@dremio/js-sdk 0.45.6 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,16 +88,7 @@ export declare class AIResource {
88
88
  message: UserChatMessage;
89
89
  modelName?: string | undefined;
90
90
  modelProviderId?: string | undefined;
91
- }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
92
- createdAt: import("temporal-polyfill").Temporal.Instant;
93
- currentRunId: string | null;
94
- id: string;
95
- modelName: string | null;
96
- modelProviderId: string | null;
97
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
98
- tag: string;
99
- title: string | null;
100
- }, {
91
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../../enterprise/interfaces.ts").AgentConversation, {
101
92
  conversationId: string;
102
93
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
103
94
  data: ({
@@ -208,16 +199,7 @@ export declare class AIResource {
208
199
  }, {
209
200
  conversationId: string;
210
201
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
211
- conversation: {
212
- createdAt: import("temporal-polyfill").Temporal.Instant;
213
- currentRunId: string | null;
214
- id: string;
215
- modelName: string | null;
216
- modelProviderId: string | null;
217
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
218
- tag: string;
219
- title: string | null;
220
- };
202
+ conversation: import("../../enterprise/interfaces.ts").AgentConversation;
221
203
  history: {
222
204
  data: ({
223
205
  conversationId: string;
@@ -463,16 +445,7 @@ export declare class AIResource {
463
445
  id: string | undefined;
464
446
  } | {
465
447
  src: "retrieveConversation";
466
- logic: import("xstate").PromiseActorLogic<{
467
- createdAt: import("temporal-polyfill").Temporal.Instant;
468
- currentRunId: string | null;
469
- id: string;
470
- modelName: string | null;
471
- modelProviderId: string | null;
472
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
473
- tag: string;
474
- title: string | null;
475
- }, {
448
+ logic: import("xstate").PromiseActorLogic<import("../../enterprise/interfaces.ts").AgentConversation, {
476
449
  conversationId: string;
477
450
  }, import("xstate").EventObject>;
478
451
  id: string | undefined;
@@ -591,16 +564,7 @@ export declare class AIResource {
591
564
  } | {
592
565
  src: "retrieveState";
593
566
  logic: import("xstate").PromiseActorLogic<{
594
- conversation: {
595
- createdAt: import("temporal-polyfill").Temporal.Instant;
596
- currentRunId: string | null;
597
- id: string;
598
- modelName: string | null;
599
- modelProviderId: string | null;
600
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
601
- tag: string;
602
- title: string | null;
603
- };
567
+ conversation: import("../../enterprise/interfaces.ts").AgentConversation;
604
568
  history: {
605
569
  data: ({
606
570
  conversationId: string;
@@ -880,14 +844,32 @@ export declare class AIResource {
880
844
  }>;
881
845
  createConversation(body: z.input<typeof createConversationCodec>): import("ts-results-es").AsyncResult<import("../../enterprise/interfaces.ts").AgentConversation, HttpError>;
882
846
  listConversations(): {
883
- data({ signal }?: SignalParam): AsyncGenerator<import("../../enterprise/interfaces.ts").AgentConversation, void, unknown>;
847
+ data({ signal }?: SignalParam): AsyncGenerator<import("ts-results-es").Ok<import("../../enterprise/interfaces.ts").AgentConversation> | import("ts-results-es").Err<z.core.$ZodError<{
848
+ createdAt: import("temporal-polyfill").Temporal.Instant;
849
+ currentRunId: string | null;
850
+ id: string;
851
+ modelName: string | null;
852
+ modelProviderId: string | null;
853
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
854
+ tag: string;
855
+ title: string | null;
856
+ }>>, void, unknown>;
884
857
  getPage: (params: {
885
858
  maxResults: number;
886
859
  }, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
887
- data: import("../../enterprise/interfaces.ts").AgentConversation[];
860
+ data: (import("ts-results-es").Ok<import("../../enterprise/interfaces.ts").AgentConversation> | import("ts-results-es").Err<z.core.$ZodError<{
861
+ createdAt: import("temporal-polyfill").Temporal.Instant;
862
+ currentRunId: string | null;
863
+ id: string;
864
+ modelName: string | null;
865
+ modelProviderId: string | null;
866
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
867
+ tag: string;
868
+ title: string | null;
869
+ }>>)[];
888
870
  }, HttpError>;
889
871
  };
890
- retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<{
872
+ retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<import("../../enterprise/interfaces.ts").AgentConversation, HttpError | import("zod").ZodError<{
891
873
  createdAt: import("temporal-polyfill").Temporal.Instant;
892
874
  currentRunId: string | null;
893
875
  id: string;
@@ -896,7 +878,7 @@ export declare class AIResource {
896
878
  modifiedAt: import("temporal-polyfill").Temporal.Instant;
897
879
  tag: string;
898
880
  title: string | null;
899
- }, HttpError>;
881
+ }>>;
900
882
  retrieveConversationHistory(id: string): {
901
883
  data(): AsyncGenerator<ChatEvent, void, HttpError>;
902
884
  };
@@ -30,16 +30,7 @@ export declare class AIResource {
30
30
  message: UserChatMessage;
31
31
  modelName?: string | undefined;
32
32
  modelProviderId?: string | undefined;
33
- }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
34
- createdAt: import("temporal-polyfill").Temporal.Instant;
35
- currentRunId: string | null;
36
- id: string;
37
- modelName: string | null;
38
- modelProviderId: string | null;
39
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
40
- tag: string;
41
- title: string | null;
42
- }, {
33
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<AgentConversation, {
43
34
  conversationId: string;
44
35
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
45
36
  data: ({
@@ -150,16 +141,7 @@ export declare class AIResource {
150
141
  }, {
151
142
  conversationId: string;
152
143
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
153
- conversation: {
154
- createdAt: import("temporal-polyfill").Temporal.Instant;
155
- currentRunId: string | null;
156
- id: string;
157
- modelName: string | null;
158
- modelProviderId: string | null;
159
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
160
- tag: string;
161
- title: string | null;
162
- };
144
+ conversation: AgentConversation;
163
145
  history: {
164
146
  data: ({
165
147
  conversationId: string;
@@ -405,16 +387,7 @@ export declare class AIResource {
405
387
  id: string | undefined;
406
388
  } | {
407
389
  src: "retrieveConversation";
408
- logic: import("xstate").PromiseActorLogic<{
409
- createdAt: import("temporal-polyfill").Temporal.Instant;
410
- currentRunId: string | null;
411
- id: string;
412
- modelName: string | null;
413
- modelProviderId: string | null;
414
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
415
- tag: string;
416
- title: string | null;
417
- }, {
390
+ logic: import("xstate").PromiseActorLogic<AgentConversation, {
418
391
  conversationId: string;
419
392
  }, import("xstate").EventObject>;
420
393
  id: string | undefined;
@@ -533,16 +506,7 @@ export declare class AIResource {
533
506
  } | {
534
507
  src: "retrieveState";
535
508
  logic: import("xstate").PromiseActorLogic<{
536
- conversation: {
537
- createdAt: import("temporal-polyfill").Temporal.Instant;
538
- currentRunId: string | null;
539
- id: string;
540
- modelName: string | null;
541
- modelProviderId: string | null;
542
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
543
- tag: string;
544
- title: string | null;
545
- };
509
+ conversation: AgentConversation;
546
510
  history: {
547
511
  data: ({
548
512
  conversationId: string;
@@ -823,11 +787,29 @@ export declare class AIResource {
823
787
  createConversation(body: z.input<typeof createConversationCodec>): import("ts-results-es").AsyncResult<AgentConversation, HttpError>;
824
788
  createModelProvider(properties: z.output<typeof modelProviderCreateCodec>): import("ts-results-es").AsyncResult<ModelProvider, HttpError>;
825
789
  listConversations(): {
826
- data({ signal }?: SignalParam): AsyncGenerator<AgentConversation, void, unknown>;
790
+ data({ signal }?: SignalParam): AsyncGenerator<import("ts-results-es").Ok<AgentConversation> | import("ts-results-es").Err<z.core.$ZodError<{
791
+ createdAt: import("temporal-polyfill").Temporal.Instant;
792
+ currentRunId: string | null;
793
+ id: string;
794
+ modelName: string | null;
795
+ modelProviderId: string | null;
796
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
797
+ tag: string;
798
+ title: string | null;
799
+ }>>, void, unknown>;
827
800
  getPage: (params: {
828
801
  maxResults: number;
829
802
  }, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
830
- data: AgentConversation[];
803
+ data: (import("ts-results-es").Ok<AgentConversation> | import("ts-results-es").Err<z.core.$ZodError<{
804
+ createdAt: import("temporal-polyfill").Temporal.Instant;
805
+ currentRunId: string | null;
806
+ id: string;
807
+ modelName: string | null;
808
+ modelProviderId: string | null;
809
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
810
+ tag: string;
811
+ title: string | null;
812
+ }>>)[];
831
813
  }, HttpError>;
832
814
  };
833
815
  listModelProviders(): {
@@ -940,7 +922,16 @@ export declare class AIResource {
940
922
  name: string;
941
923
  isRecommended: boolean;
942
924
  }>, HttpError>;
943
- retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<AgentConversation, HttpError>;
925
+ retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<AgentConversation, HttpError | import("zod").ZodError<{
926
+ createdAt: import("temporal-polyfill").Temporal.Instant;
927
+ currentRunId: string | null;
928
+ id: string;
929
+ modelName: string | null;
930
+ modelProviderId: string | null;
931
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
932
+ tag: string;
933
+ title: string | null;
934
+ }>>;
944
935
  retrieveConversationHistory(id: string): {
945
936
  data(): AsyncGenerator<ChatEvent, void, HttpError>;
946
937
  };
@@ -8,7 +8,7 @@ export declare const conversationPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject
8
8
  modelProviderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
9
  modifiedAt: z.iso.ZodMiniISODateTime;
10
10
  tag: z.ZodMiniString<string>;
11
- title: z.ZodMiniNullable<z.ZodMiniString<string>>;
11
+ title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
12
12
  }, z.core.$strip>, z.ZodMiniObject<{
13
13
  createdAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
14
14
  currentRunId: z.ZodMiniNullable<z.ZodMiniString<string>>;
@@ -23,7 +23,7 @@ export const conversationPropertiesCodec = z.codec(z.object({
23
23
  modelProviderId: z.optional(z.string()),
24
24
  modifiedAt: z.iso.datetime(),
25
25
  tag: z.string(),
26
- title: z.nullable(z.string()),
26
+ title: z.optional(z.nullable(z.string())),
27
27
  }), z.object({
28
28
  createdAt: z.instanceof(Temporal.Instant),
29
29
  currentRunId: z.nullable(z.string()),
@@ -43,7 +43,7 @@ export const conversationPropertiesCodec = z.codec(z.object({
43
43
  modelProviderId: v.modelProviderId || null,
44
44
  modifiedAt: Temporal.Instant.from(v.modifiedAt),
45
45
  tag: v.tag,
46
- title: v.title,
46
+ title: v.title || null,
47
47
  };
48
48
  },
49
49
  encode(v) {
@@ -1 +1 @@
1
- {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC3B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,EACF,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,EACF;IACE,MAAM,CAAC,CAAC;QACN,OAAO;YACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7C,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI;YACpC,EAAE,EAAE,CAAC,CAAC,cAAc;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI;YAC9B,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI;YAC1C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;YAC/C,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,cAAc,EAAE,CAAC,CAAC,EAAE;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,CAAC;IACJ,CAAC;CACF,CACF,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.iso.datetime(),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.iso.datetime(),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n return {\n createdAt: Temporal.Instant.from(v.createdAt),\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: Temporal.Instant.from(v.modifiedAt),\n tag: v.tag,\n title: v.title,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
1
+ {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC3B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,EACF,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,EACF;IACE,MAAM,CAAC,CAAC;QACN,OAAO;YACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7C,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI;YACpC,EAAE,EAAE,CAAC,CAAC,cAAc;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI;YAC9B,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI;YAC1C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;YAC/C,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI;SACvB,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,cAAc,EAAE,CAAC,CAAC,EAAE;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,CAAC;IACJ,CAAC;CACF,CACF,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.iso.datetime(),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.iso.datetime(),\n tag: z.string(),\n title: z.optional(z.nullable(z.string())),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n return {\n createdAt: Temporal.Instant.from(v.createdAt),\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: Temporal.Instant.from(v.modifiedAt),\n tag: v.tag,\n title: v.title || null,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
@@ -48,16 +48,7 @@ export declare const createConversationMachine: (config: SonarV4Config) => impor
48
48
  message: UserChatMessage;
49
49
  modelName?: string | undefined;
50
50
  modelProviderId?: string | undefined;
51
- }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
52
- createdAt: import("temporal-polyfill").Temporal.Instant;
53
- currentRunId: string | null;
54
- id: string;
55
- modelName: string | null;
56
- modelProviderId: string | null;
57
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
58
- tag: string;
59
- title: string | null;
60
- }, {
51
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<AgentConversation, {
61
52
  conversationId: string;
62
53
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
63
54
  data: ({
@@ -168,16 +159,7 @@ export declare const createConversationMachine: (config: SonarV4Config) => impor
168
159
  }, {
169
160
  conversationId: string;
170
161
  }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
171
- conversation: {
172
- createdAt: import("temporal-polyfill").Temporal.Instant;
173
- currentRunId: string | null;
174
- id: string;
175
- modelName: string | null;
176
- modelProviderId: string | null;
177
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
178
- tag: string;
179
- title: string | null;
180
- };
162
+ conversation: AgentConversation;
181
163
  history: {
182
164
  data: ({
183
165
  conversationId: string;
@@ -423,16 +405,7 @@ export declare const createConversationMachine: (config: SonarV4Config) => impor
423
405
  id: string | undefined;
424
406
  } | {
425
407
  src: "retrieveConversation";
426
- logic: import("xstate").PromiseActorLogic<{
427
- createdAt: import("temporal-polyfill").Temporal.Instant;
428
- currentRunId: string | null;
429
- id: string;
430
- modelName: string | null;
431
- modelProviderId: string | null;
432
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
433
- tag: string;
434
- title: string | null;
435
- }, {
408
+ logic: import("xstate").PromiseActorLogic<AgentConversation, {
436
409
  conversationId: string;
437
410
  }, import("xstate").EventObject>;
438
411
  id: string | undefined;
@@ -551,16 +524,7 @@ export declare const createConversationMachine: (config: SonarV4Config) => impor
551
524
  } | {
552
525
  src: "retrieveState";
553
526
  logic: import("xstate").PromiseActorLogic<{
554
- conversation: {
555
- createdAt: import("temporal-polyfill").Temporal.Instant;
556
- currentRunId: string | null;
557
- id: string;
558
- modelName: string | null;
559
- modelProviderId: string | null;
560
- modifiedAt: import("temporal-polyfill").Temporal.Instant;
561
- tag: string;
562
- title: string | null;
563
- };
527
+ conversation: AgentConversation;
564
528
  history: {
565
529
  data: ({
566
530
  conversationId: string;
@@ -1,8 +1,19 @@
1
+ import * as z from "zod/mini";
1
2
  import type { SonarV4Config } from "../../../../common/Config.ts";
2
3
  import type { SignalParam } from "../../../../common/Params.ts";
3
4
  import { AgentConversation } from "../AgentConversation.ts";
5
+ import { Err, Ok } from "ts-results-es";
4
6
  export declare const listConversations: (config: SonarV4Config) => (params: {
5
7
  maxResults: number;
6
8
  }, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
7
- data: AgentConversation[];
9
+ data: (Ok<AgentConversation> | Err<z.core.$ZodError<{
10
+ createdAt: import("temporal-polyfill").Temporal.Instant;
11
+ currentRunId: string | null;
12
+ id: string;
13
+ modelName: string | null;
14
+ modelProviderId: string | null;
15
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
16
+ tag: string;
17
+ title: string | null;
18
+ }>>)[];
8
19
  }, import("../../../index.ts").HttpError>;
@@ -16,15 +16,20 @@
16
16
  import * as z from "zod/mini";
17
17
  import { AgentConversation } from "../AgentConversation.js";
18
18
  import { conversationPropertiesCodec, } from "../conversationPropertiesCodec.js";
19
+ import { Err, Ok } from "ts-results-es";
19
20
  export const listConversations = (config) => function listConversations(params, { signal } = {}) {
20
21
  return config
21
22
  .sonarV4Request(`agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`, { signal })
22
23
  .map((res) => res.json())
23
- .map((response) => {
24
- return {
25
- ...response,
26
- data: response.data.map((entity) => new AgentConversation(config, z.decode(conversationPropertiesCodec, entity))),
27
- };
28
- });
24
+ .map((response) => ({
25
+ ...response,
26
+ data: response.data.map((entity) => {
27
+ const decodeResult = z.safeDecode(conversationPropertiesCodec, entity);
28
+ if (!decodeResult.success) {
29
+ return Err(decodeResult.error);
30
+ }
31
+ return Ok(new AgentConversation(config, decodeResult.data));
32
+ }),
33
+ }));
29
34
  };
30
35
  //# sourceMappingURL=listConversations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listConversations.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/listConversations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,2BAA2B,GAE5B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAqB,EAAE,EAAE,CACzD,SAAS,iBAAiB,CAAC,MAA8B,EAAE,EAAE,MAAM,KAAkB,EAAE;IACrF,OAAO,MAAM;SACV,cAAc,CACb,uBAAuB,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,EAClG,EAAE,MAAM,EAAE,CACX;SACA,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA6C,CAAC;SACnE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAChB,OAAO;YACL,GAAG,QAAQ;YACX,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CACrB,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,CAC/E;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport type { SignalParam } from \"../../../../common/Params.ts\";\nimport { AgentConversation } from \"../AgentConversation.ts\";\nimport {\n conversationPropertiesCodec,\n type ConversationEntity,\n} from \"../conversationPropertiesCodec.ts\";\n\nexport const listConversations = (config: SonarV4Config) =>\n function listConversations(params: { maxResults: number }, { signal }: SignalParam = {}) {\n return config\n .sonarV4Request(\n `agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`,\n { signal },\n )\n .map((res) => res.json() as Promise<{ data: ConversationEntity[] }>)\n .map((response) => {\n return {\n ...response,\n data: response.data.map(\n (entity) =>\n new AgentConversation(config, z.decode(conversationPropertiesCodec, entity)),\n ),\n };\n });\n };\n"]}
1
+ {"version":3,"file":"listConversations.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/listConversations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,2BAA2B,GAE5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAqB,EAAE,EAAE,CACzD,SAAS,iBAAiB,CAAC,MAA8B,EAAE,EAAE,MAAM,KAAkB,EAAE;IACrF,OAAO,MAAM;SACV,cAAc,CACb,uBAAuB,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,EAClG,EAAE,MAAM,EAAE,CACX;SACA,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA6C,CAAC;SACnE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClB,GAAG,QAAQ;QACX,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACjC,MAAM,YAAY,GAAG,CAAC,CAAC,UAAU,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;YAEvE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;gBAC1B,OAAO,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;YAED,OAAO,EAAE,CAAC,IAAI,iBAAiB,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,CAAC,CAAC;KACH,CAAC,CAAC,CAAC;AACR,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport type { SignalParam } from \"../../../../common/Params.ts\";\nimport { AgentConversation } from \"../AgentConversation.ts\";\nimport {\n conversationPropertiesCodec,\n type ConversationEntity,\n} from \"../conversationPropertiesCodec.ts\";\nimport { Err, Ok } from \"ts-results-es\";\n\nexport const listConversations = (config: SonarV4Config) =>\n function listConversations(params: { maxResults: number }, { signal }: SignalParam = {}) {\n return config\n .sonarV4Request(\n `agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`,\n { signal },\n )\n .map((res) => res.json() as Promise<{ data: ConversationEntity[] }>)\n .map((response) => ({\n ...response,\n data: response.data.map((entity) => {\n const decodeResult = z.safeDecode(conversationPropertiesCodec, entity);\n\n if (!decodeResult.success) {\n return Err(decodeResult.error);\n }\n\n return Ok(new AgentConversation(config, decodeResult.data));\n }),\n }));\n };\n"]}
@@ -1,6 +1,8 @@
1
+ import z from "zod";
1
2
  import type { SonarV4Config } from "../../../../common/Config.ts";
2
3
  import type { SignalParam } from "../../../../common/Params.ts";
3
- export declare const retrieveConversation: (config: SonarV4Config) => (id: string, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
4
+ import { AgentConversation } from "../AgentConversation.ts";
5
+ export declare const retrieveConversation: (config: SonarV4Config) => (id: string, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<AgentConversation, import("../../../index.ts").HttpError | z.ZodError<{
4
6
  createdAt: import("temporal-polyfill").Temporal.Instant;
5
7
  currentRunId: string | null;
6
8
  id: string;
@@ -9,4 +11,4 @@ export declare const retrieveConversation: (config: SonarV4Config) => (id: strin
9
11
  modifiedAt: import("temporal-polyfill").Temporal.Instant;
10
12
  tag: string;
11
13
  title: string | null;
12
- }, import("../../../index.ts").HttpError>;
14
+ }>>;
@@ -15,6 +15,8 @@
15
15
  */
16
16
  import z from "zod";
17
17
  import { conversationPropertiesCodec } from "../conversationPropertiesCodec.js";
18
+ import { Err, Ok } from "ts-results-es";
19
+ import { AgentConversation } from "../AgentConversation.js";
18
20
  export const retrieveConversation = (config) => function retrieveConversation(id, { signal } = {}) {
19
21
  return config
20
22
  .sonarV4Request(`agent/conversations/${id}`, {
@@ -24,6 +26,12 @@ export const retrieveConversation = (config) => function retrieveConversation(id
24
26
  signal,
25
27
  })
26
28
  .map((res) => res.json())
27
- .map((entity) => z.decode(conversationPropertiesCodec, entity));
29
+ .andThen((entity) => {
30
+ const decodeResult = z.safeDecode(conversationPropertiesCodec, entity);
31
+ if (!decodeResult.success) {
32
+ return Err(decodeResult.error);
33
+ }
34
+ return Ok(new AgentConversation(config, decodeResult.data));
35
+ });
28
36
  };
29
37
  //# sourceMappingURL=retrieveConversation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"retrieveConversation.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/retrieveConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAqB,EAAE,EAAE,CAC5D,SAAS,oBAAoB,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;IACpE,OAAO,MAAM;SACV,cAAc,CAAC,uBAAuB,EAAE,EAAE,EAAE;QAC3C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;SAC3B;QACD,MAAM;KACP,CAAC;SACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA0D,CAAC;SAChF,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport z from \"zod\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport type { SignalParam } from \"../../../../common/Params.ts\";\nimport { conversationPropertiesCodec } from \"../conversationPropertiesCodec.ts\";\n\nexport const retrieveConversation = (config: SonarV4Config) =>\n function retrieveConversation(id: string, { signal }: SignalParam = {}) {\n return config\n .sonarV4Request(`agent/conversations/${id}`, {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n })\n .map((res) => res.json() as Promise<z.input<typeof conversationPropertiesCodec>>)\n .map((entity) => z.decode(conversationPropertiesCodec, entity));\n };\n"]}
1
+ {"version":3,"file":"retrieveConversation.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/retrieveConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAqB,EAAE,EAAE,CAC5D,SAAS,oBAAoB,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;IACpE,OAAO,MAAM;SACV,cAAc,CAAC,uBAAuB,EAAE,EAAE,EAAE;QAC3C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;SAC3B;QACD,MAAM;KACP,CAAC;SACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA0D,CAAC;SAChF,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,MAAM,YAAY,GAAG,CAAC,CAAC,UAAU,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;QAEvE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1B,OAAO,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,EAAE,CAAC,IAAI,iBAAiB,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport z from \"zod\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport type { SignalParam } from \"../../../../common/Params.ts\";\nimport { conversationPropertiesCodec } from \"../conversationPropertiesCodec.ts\";\nimport { Err, Ok } from \"ts-results-es\";\nimport { AgentConversation } from \"../AgentConversation.ts\";\n\nexport const retrieveConversation = (config: SonarV4Config) =>\n function retrieveConversation(id: string, { signal }: SignalParam = {}) {\n return config\n .sonarV4Request(`agent/conversations/${id}`, {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n })\n .map((res) => res.json() as Promise<z.input<typeof conversationPropertiesCodec>>)\n .andThen((entity) => {\n const decodeResult = z.safeDecode(conversationPropertiesCodec, entity);\n\n if (!decodeResult.success) {\n return Err(decodeResult.error);\n }\n\n return Ok(new AgentConversation(config, decodeResult.data));\n });\n };\n"]}
@@ -24631,7 +24631,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
24631
24631
  modelProviderId: optional(string2()),
24632
24632
  modifiedAt: iso_exports.datetime(),
24633
24633
  tag: string2(),
24634
- title: nullable(string2())
24634
+ title: optional(nullable(string2()))
24635
24635
  }), object({
24636
24636
  createdAt: _instanceof(Xn.Instant),
24637
24637
  currentRunId: nullable(string2()),
@@ -24651,7 +24651,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
24651
24651
  modelProviderId: v2.modelProviderId || null,
24652
24652
  modifiedAt: Xn.Instant.from(v2.modifiedAt),
24653
24653
  tag: v2.tag,
24654
- title: v2.title
24654
+ title: v2.title || null
24655
24655
  };
24656
24656
  },
24657
24657
  encode(v2) {
@@ -27482,7 +27482,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
27482
27482
  Accept: "application/json"
27483
27483
  },
27484
27484
  signal
27485
- }).map((res) => res.json()).map((entity) => zod_default.decode(conversationPropertiesCodec, entity));
27485
+ }).map((res) => res.json()).andThen((entity) => {
27486
+ const decodeResult = zod_default.safeDecode(conversationPropertiesCodec, entity);
27487
+ if (!decodeResult.success) {
27488
+ return Err(decodeResult.error);
27489
+ }
27490
+ return Ok(new AgentConversation(config3, decodeResult.data));
27491
+ });
27486
27492
  };
27487
27493
 
27488
27494
  // dist/enterprise/ai/conversations/AgentConversation.js
@@ -27631,12 +27637,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
27631
27637
 
27632
27638
  // dist/enterprise/ai/conversations/methods/listConversations.js
27633
27639
  var listConversations = (config3) => function listConversations2(params, { signal } = {}) {
27634
- return config3.sonarV4Request(`agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`, { signal }).map((res) => res.json()).map((response) => {
27635
- return {
27636
- ...response,
27637
- data: response.data.map((entity) => new AgentConversation(config3, decode(conversationPropertiesCodec, entity)))
27638
- };
27639
- });
27640
+ return config3.sonarV4Request(`agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`, { signal }).map((res) => res.json()).map((response) => ({
27641
+ ...response,
27642
+ data: response.data.map((entity) => {
27643
+ const decodeResult = safeDecode(conversationPropertiesCodec, entity);
27644
+ if (!decodeResult.success) {
27645
+ return Err(decodeResult.error);
27646
+ }
27647
+ return Ok(new AgentConversation(config3, decodeResult.data));
27648
+ })
27649
+ }));
27640
27650
  };
27641
27651
 
27642
27652
  // node_modules/.pnpm/xstate@5.26.0/node_modules/xstate/dev/dist/xstate-dev.esm.js
@@ -25294,7 +25294,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
25294
25294
  modelProviderId: optional(string2()),
25295
25295
  modifiedAt: iso_exports.datetime(),
25296
25296
  tag: string2(),
25297
- title: nullable(string2())
25297
+ title: optional(nullable(string2()))
25298
25298
  }), object({
25299
25299
  createdAt: _instanceof(Xn.Instant),
25300
25300
  currentRunId: nullable(string2()),
@@ -25314,7 +25314,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
25314
25314
  modelProviderId: v2.modelProviderId || null,
25315
25315
  modifiedAt: Xn.Instant.from(v2.modifiedAt),
25316
25316
  tag: v2.tag,
25317
- title: v2.title
25317
+ title: v2.title || null
25318
25318
  };
25319
25319
  },
25320
25320
  encode(v2) {
@@ -28188,7 +28188,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28188
28188
  Accept: "application/json"
28189
28189
  },
28190
28190
  signal
28191
- }).map((res) => res.json()).map((entity) => zod_default.decode(conversationPropertiesCodec, entity));
28191
+ }).map((res) => res.json()).andThen((entity) => {
28192
+ const decodeResult = zod_default.safeDecode(conversationPropertiesCodec, entity);
28193
+ if (!decodeResult.success) {
28194
+ return Err(decodeResult.error);
28195
+ }
28196
+ return Ok(new AgentConversation(config3, decodeResult.data));
28197
+ });
28192
28198
  };
28193
28199
 
28194
28200
  // dist/enterprise/ai/conversations/AgentConversation.js
@@ -28337,12 +28343,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28337
28343
 
28338
28344
  // dist/enterprise/ai/conversations/methods/listConversations.js
28339
28345
  var listConversations = (config3) => function listConversations2(params, { signal } = {}) {
28340
- return config3.sonarV4Request(`agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`, { signal }).map((res) => res.json()).map((response) => {
28341
- return {
28342
- ...response,
28343
- data: response.data.map((entity) => new AgentConversation(config3, decode(conversationPropertiesCodec, entity)))
28344
- };
28345
- });
28346
+ return config3.sonarV4Request(`agent/conversations?${new URLSearchParams({ maxResults: String(params.maxResults) }).toString()}`, { signal }).map((res) => res.json()).map((response) => ({
28347
+ ...response,
28348
+ data: response.data.map((entity) => {
28349
+ const decodeResult = safeDecode(conversationPropertiesCodec, entity);
28350
+ if (!decodeResult.success) {
28351
+ return Err(decodeResult.error);
28352
+ }
28353
+ return Ok(new AgentConversation(config3, decodeResult.data));
28354
+ })
28355
+ }));
28346
28356
  };
28347
28357
 
28348
28358
  // node_modules/.pnpm/xstate@5.26.0/node_modules/xstate/dev/dist/xstate-dev.esm.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.45.6",
3
+ "version": "0.46.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",