@dremio/js-sdk 0.41.0 → 0.43.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.
Files changed (115) hide show
  1. package/README.md +282 -2
  2. package/dist/cloud/ai/AIResource.d.ts +716 -17
  3. package/dist/cloud/ai/AIResource.js +40 -18
  4. package/dist/cloud/ai/AIResource.js.map +1 -1
  5. package/dist/cloud/ai/DremioModelProvider.d.ts +1 -1
  6. package/dist/cloud/ai/DremioModelProvider.js +6 -13
  7. package/dist/cloud/ai/DremioModelProvider.js.map +1 -1
  8. package/dist/cloud/ai/modelProviderCodec.d.ts +12 -0
  9. package/dist/cloud/replaceOriginResource.js +4 -0
  10. package/dist/cloud/replaceOriginResource.js.map +1 -1
  11. package/dist/common/ConflictResolver.d.ts +9 -1
  12. package/dist/common/ConflictResolver.js +10 -1
  13. package/dist/common/ConflictResolver.js.map +1 -1
  14. package/dist/common/refineRfc9557Schema.d.ts +1 -0
  15. package/dist/common/refineRfc9557Schema.js +26 -0
  16. package/dist/common/refineRfc9557Schema.js.map +1 -0
  17. package/dist/common/sharedExports.d.ts +1 -0
  18. package/dist/common/sharedExports.js +1 -0
  19. package/dist/common/sharedExports.js.map +1 -1
  20. package/dist/enterprise/Dremio.d.ts +1 -1
  21. package/dist/enterprise/Dremio.js +3 -2
  22. package/dist/enterprise/Dremio.js.map +1 -1
  23. package/dist/enterprise/ai/AIResource.d.ts +699 -18
  24. package/dist/enterprise/ai/AIResource.js +41 -19
  25. package/dist/enterprise/ai/AIResource.js.map +1 -1
  26. package/dist/enterprise/ai/chat/ChatSession.d.ts +4 -25
  27. package/dist/enterprise/ai/chat/ChatSession.js +6 -55
  28. package/dist/enterprise/ai/chat/ChatSession.js.map +1 -1
  29. package/dist/enterprise/ai/chat/UserChatMessage.d.ts +38 -22
  30. package/dist/enterprise/ai/chat/UserChatMessage.js +33 -41
  31. package/dist/enterprise/ai/chat/UserChatMessage.js.map +1 -1
  32. package/dist/enterprise/ai/chat/chatEventSchema.d.ts +169 -11
  33. package/dist/enterprise/ai/chat/chatEventSchema.js +183 -35
  34. package/dist/enterprise/ai/chat/chatEventSchema.js.map +1 -1
  35. package/dist/enterprise/ai/chat/eventWrappers/AgentChatPartialResponse.d.ts +0 -6
  36. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.d.ts +6 -6
  37. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js +2 -2
  38. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js.map +1 -1
  39. package/dist/enterprise/ai/chat/index.d.ts +0 -3
  40. package/dist/enterprise/ai/chat/index.js +0 -1
  41. package/dist/enterprise/ai/chat/index.js.map +1 -1
  42. package/dist/enterprise/ai/chat/methods/sendChatMessage.js +4 -1
  43. package/dist/enterprise/ai/chat/methods/sendChatMessage.js.map +1 -1
  44. package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.d.ts +1 -2
  45. package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.js.map +1 -1
  46. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.d.ts +1 -2
  47. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js +0 -1
  48. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js.map +1 -1
  49. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.d.ts +1 -2
  50. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js +0 -1
  51. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js.map +1 -1
  52. package/dist/enterprise/ai/conversations/AgentConversation.d.ts +215 -0
  53. package/dist/enterprise/ai/conversations/AgentConversation.js +180 -0
  54. package/dist/enterprise/ai/conversations/AgentConversation.js.map +1 -0
  55. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.d.ts +22 -0
  56. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js +62 -0
  57. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js.map +1 -0
  58. package/dist/enterprise/ai/conversations/createConversationMachine.d.ts +682 -0
  59. package/dist/enterprise/ai/conversations/createConversationMachine.js +354 -0
  60. package/dist/enterprise/ai/conversations/createConversationMachine.js.map +1 -0
  61. package/dist/enterprise/ai/conversations/methods/createConversation.d.ts +28 -0
  62. package/dist/enterprise/ai/conversations/methods/createConversation.js +68 -0
  63. package/dist/enterprise/ai/conversations/methods/createConversation.js.map +1 -0
  64. package/dist/enterprise/ai/conversations/methods/createExchangeRun.d.ts +16 -0
  65. package/dist/enterprise/ai/conversations/methods/createExchangeRun.js +36 -0
  66. package/dist/enterprise/ai/conversations/methods/createExchangeRun.js.map +1 -0
  67. package/dist/enterprise/ai/conversations/methods/deleteConversation.d.ts +2 -0
  68. package/dist/enterprise/ai/conversations/methods/deleteConversation.js +24 -0
  69. package/dist/enterprise/ai/conversations/methods/deleteConversation.js.map +1 -0
  70. package/dist/enterprise/ai/conversations/methods/listConversations.d.ts +8 -0
  71. package/dist/enterprise/ai/conversations/methods/listConversations.js +30 -0
  72. package/dist/enterprise/ai/conversations/methods/listConversations.js.map +1 -0
  73. package/dist/enterprise/ai/conversations/methods/retrieveConversation.d.ts +12 -0
  74. package/dist/enterprise/ai/conversations/methods/retrieveConversation.js +29 -0
  75. package/dist/enterprise/ai/conversations/methods/retrieveConversation.js.map +1 -0
  76. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.d.ts +86 -0
  77. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js +32 -0
  78. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js.map +1 -0
  79. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.d.ts +2 -0
  80. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js +24 -0
  81. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js.map +1 -0
  82. package/dist/enterprise/ai/conversations/methods/streamRunEvents.d.ts +6 -0
  83. package/dist/enterprise/ai/conversations/methods/streamRunEvents.js +33 -0
  84. package/dist/enterprise/ai/conversations/methods/streamRunEvents.js.map +1 -0
  85. package/dist/enterprise/ai/conversations/methods/updateConversation.d.ts +15 -0
  86. package/dist/enterprise/ai/conversations/methods/updateConversation.js +35 -0
  87. package/dist/enterprise/ai/conversations/methods/updateConversation.js.map +1 -0
  88. package/dist/enterprise/ai/conversations/reduceChatEvents.d.ts +17 -0
  89. package/dist/enterprise/ai/conversations/reduceChatEvents.js +74 -0
  90. package/dist/enterprise/ai/conversations/reduceChatEvents.js.map +1 -0
  91. package/dist/enterprise/ai/index.d.ts +5 -1
  92. package/dist/enterprise/ai/index.js +4 -1
  93. package/dist/enterprise/ai/index.js.map +1 -1
  94. package/dist/enterprise/ai/modelProvider/ModelProvider.d.ts +15 -1
  95. package/dist/enterprise/ai/modelProvider/ModelProvider.js +12 -1
  96. package/dist/enterprise/ai/modelProvider/ModelProvider.js.map +1 -1
  97. package/dist/enterprise/ai/modelProvider/modelProviderCodec.d.ts +40 -0
  98. package/dist/enterprise/ai/modelProvider/modelProviderCodec.js +10 -1
  99. package/dist/enterprise/ai/modelProvider/modelProviderCodec.js.map +1 -1
  100. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.d.ts +21 -0
  101. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js +17 -0
  102. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js.map +1 -1
  103. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.d.ts +1 -0
  104. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js +1 -0
  105. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js.map +1 -1
  106. package/dist-iife/cloud.js +21630 -6206
  107. package/dist-iife/community.js +25 -5
  108. package/dist-iife/enterprise.js +19414 -4042
  109. package/package.json +5 -2
  110. package/dist/enterprise/ai/chat/ChatSessionClient.d.ts +0 -18
  111. package/dist/enterprise/ai/chat/ChatSessionClient.js +0 -55
  112. package/dist/enterprise/ai/chat/ChatSessionClient.js.map +0 -1
  113. package/dist/enterprise/ai/chat/UserChatMessageContent.d.ts +0 -19
  114. package/dist/enterprise/ai/chat/UserChatMessageContent.js +0 -44
  115. package/dist/enterprise/ai/chat/UserChatMessageContent.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Temporal } from "temporal-polyfill";
17
+ import * as z from "zod/mini";
18
+ export const conversationPropertiesCodec = z.codec(z.object({
19
+ conversationId: z.string(),
20
+ createdAt: z.iso.datetime(),
21
+ currentRunId: z.optional(z.string()),
22
+ modelName: z.optional(z.string()),
23
+ modelProviderId: z.optional(z.string()),
24
+ modifiedAt: z.iso.datetime(),
25
+ tag: z.string(),
26
+ title: z.string(),
27
+ }), z.object({
28
+ createdAt: z.instanceof(Temporal.Instant),
29
+ currentRunId: z.nullable(z.string()),
30
+ id: z.string(),
31
+ modelName: z.nullable(z.string()),
32
+ modelProviderId: z.nullable(z.string()),
33
+ modifiedAt: z.instanceof(Temporal.Instant),
34
+ tag: z.string(),
35
+ title: z.string(),
36
+ }), {
37
+ decode(v) {
38
+ return {
39
+ createdAt: Temporal.Instant.from(v.createdAt),
40
+ currentRunId: v.currentRunId || null,
41
+ id: v.conversationId,
42
+ modelName: v.modelName || null,
43
+ modelProviderId: v.modelProviderId || null,
44
+ modifiedAt: Temporal.Instant.from(v.modifiedAt),
45
+ tag: v.tag,
46
+ title: v.title,
47
+ };
48
+ },
49
+ encode(v) {
50
+ return {
51
+ conversationId: v.id,
52
+ createdAt: v.createdAt.toString(),
53
+ currentRunId: v.currentRunId || undefined,
54
+ modelName: v.modelName || undefined,
55
+ modelProviderId: v.modelProviderId || undefined,
56
+ modifiedAt: v.modifiedAt.toString(),
57
+ tag: v.tag,
58
+ title: v.title,
59
+ };
60
+ },
61
+ });
62
+ //# sourceMappingURL=conversationPropertiesCodec.js.map
@@ -0,0 +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,MAAM,EAAE;CAClB,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,M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cesContent":["/*\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.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.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"]}