@orq-ai/node 3.3.2 → 3.4.0-rc.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 (239) hide show
  1. package/bin/mcp-server.js +6 -9
  2. package/bin/mcp-server.js.map +7 -7
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/mcp-server.js.map +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/mcp-server/server.js.map +1 -1
  11. package/package.json +3 -2
  12. package/src/lib/config.ts +2 -2
  13. package/src/mcp-server/mcp-server.ts +1 -1
  14. package/src/mcp-server/server.ts +1 -1
  15. package/packages/orq-rc/FUNCTIONS.md +0 -106
  16. package/packages/orq-rc/README.md +0 -698
  17. package/packages/orq-rc/RUNTIMES.md +0 -48
  18. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  19. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -940
  20. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  21. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  22. package/packages/orq-rc/docs/sdks/files/README.md +0 -311
  23. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1279
  24. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  25. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  26. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -614
  27. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  28. package/packages/orq-rc/jsr.json +0 -28
  29. package/packages/orq-rc/package-lock.json +0 -3217
  30. package/packages/orq-rc/package.json +0 -45
  31. package/packages/orq-rc/src/core.ts +0 -13
  32. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  33. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  34. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  35. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  36. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  37. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  38. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  39. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -161
  40. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -168
  41. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  42. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  43. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  44. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  45. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  46. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  47. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -170
  48. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  49. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  50. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  51. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -174
  52. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  53. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  54. package/packages/orq-rc/src/funcs/filesList.ts +0 -161
  55. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -152
  56. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -165
  57. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -160
  58. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -161
  59. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -168
  60. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -167
  61. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -163
  62. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -172
  63. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -168
  64. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -160
  65. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -167
  66. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -163
  67. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -158
  68. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -158
  69. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -168
  70. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -164
  71. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  72. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  73. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  74. package/packages/orq-rc/src/funcs/promptsList.ts +0 -161
  75. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -167
  76. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  77. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  78. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  79. package/packages/orq-rc/src/hooks/global.ts +0 -44
  80. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  81. package/packages/orq-rc/src/hooks/index.ts +0 -6
  82. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  83. package/packages/orq-rc/src/hooks/types.ts +0 -110
  84. package/packages/orq-rc/src/index.ts +0 -7
  85. package/packages/orq-rc/src/lib/base64.ts +0 -37
  86. package/packages/orq-rc/src/lib/config.ts +0 -70
  87. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  88. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  89. package/packages/orq-rc/src/lib/env.ts +0 -73
  90. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  91. package/packages/orq-rc/src/lib/files.ts +0 -40
  92. package/packages/orq-rc/src/lib/http.ts +0 -323
  93. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  94. package/packages/orq-rc/src/lib/logger.ts +0 -9
  95. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  96. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  97. package/packages/orq-rc/src/lib/retries.ts +0 -218
  98. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  99. package/packages/orq-rc/src/lib/sdks.ts +0 -395
  100. package/packages/orq-rc/src/lib/security.ts +0 -261
  101. package/packages/orq-rc/src/lib/url.ts +0 -33
  102. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  103. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  104. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  105. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  106. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  107. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  108. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
  109. package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
  110. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  111. package/packages/orq-rc/src/mcp-server/server.ts +0 -157
  112. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  113. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  114. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  115. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  116. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  117. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  118. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  119. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  120. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  121. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  122. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  123. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  124. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  125. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  126. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  127. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  128. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  129. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  130. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  131. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  132. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  133. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  134. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  135. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  136. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  137. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  138. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  139. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  140. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  141. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  142. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  143. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  144. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  145. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  146. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  147. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  148. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -35
  149. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  150. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  151. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  152. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  153. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  154. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  155. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  156. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  157. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  158. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  159. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  160. package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
  161. package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
  162. package/packages/orq-rc/src/models/components/index.ts +0 -6
  163. package/packages/orq-rc/src/models/components/security.ts +0 -71
  164. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  165. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  166. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  167. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  168. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  169. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  170. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  171. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
  172. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  173. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -680
  174. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  175. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  176. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
  177. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  178. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  179. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -676
  180. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3743
  181. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  182. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  183. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  184. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  185. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  186. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  187. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
  188. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
  189. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
  190. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2155
  191. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -5960
  192. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  193. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  194. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  195. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
  196. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2127
  197. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -265
  198. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -444
  199. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1993
  200. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1991
  201. package/packages/orq-rc/src/models/operations/index.ts +0 -51
  202. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -444
  203. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1071
  204. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  205. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  206. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -568
  207. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2125
  208. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  209. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
  210. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  211. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  212. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
  213. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -418
  214. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
  215. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  216. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  217. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -790
  218. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3929
  219. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  220. package/packages/orq-rc/src/sdk/datasets.ts +0 -222
  221. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  222. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  223. package/packages/orq-rc/src/sdk/files.ts +0 -78
  224. package/packages/orq-rc/src/sdk/index.ts +0 -5
  225. package/packages/orq-rc/src/sdk/knowledge.ts +0 -261
  226. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  227. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  228. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  229. package/packages/orq-rc/src/sdk/sdk.ts +0 -55
  230. package/packages/orq-rc/src/types/async.ts +0 -68
  231. package/packages/orq-rc/src/types/blobs.ts +0 -31
  232. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  233. package/packages/orq-rc/src/types/enums.ts +0 -16
  234. package/packages/orq-rc/src/types/fp.ts +0 -50
  235. package/packages/orq-rc/src/types/index.ts +0 -11
  236. package/packages/orq-rc/src/types/operations.ts +0 -105
  237. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  238. package/packages/orq-rc/src/types/streams.ts +0 -21
  239. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,852 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- export const CreateDatasourceChunkingConfigurationType = {
13
- Advanced: "advanced",
14
- } as const;
15
- export type CreateDatasourceChunkingConfigurationType = ClosedEnum<
16
- typeof CreateDatasourceChunkingConfigurationType
17
- >;
18
-
19
- /**
20
- * Provides advanced settings for customizing chunking behavior, enabling fine-grained control to better meet specific data processing needs.
21
- */
22
- export type ChunkingConfiguration2 = {
23
- type: CreateDatasourceChunkingConfigurationType;
24
- /**
25
- * Defines the absolute maximum character length per chunk. Text elements exceeding this size will be automatically split into multiple chunks.
26
- */
27
- chunkMaxCharacters?: number | undefined;
28
- /**
29
- * Specifies the number of characters to overlap between consecutive chunks. This overlap helps maintain semantic continuity when splitting large text elements.
30
- */
31
- chunkOverlap?: number | undefined;
32
- };
33
-
34
- export const ChunkingConfigurationType = {
35
- Default: "default",
36
- } as const;
37
- export type ChunkingConfigurationType = ClosedEnum<
38
- typeof ChunkingConfigurationType
39
- >;
40
-
41
- /**
42
- * Optimized chunking strategy focusing on speed and avoiding duplication of content chunks.
43
- */
44
- export type ChunkingConfiguration1 = {
45
- type: ChunkingConfigurationType;
46
- };
47
-
48
- /**
49
- * The chunking configuration settings for the datasource. Defaults to the system's standard chunking configuration if not specified.
50
- */
51
- export type ChunkingConfiguration =
52
- | ChunkingConfiguration1
53
- | ChunkingConfiguration2;
54
-
55
- /**
56
- * The cleanup options applied to the datasource content. All options are enabled by default to ensure enhanced security and optimal chunk quality. Defaults to system-standard cleanup options if not specified.
57
- */
58
- export type ChunkingCleanupOptions = {
59
- /**
60
- * Removes email addresses from the provided text.
61
- */
62
- deleteEmails?: boolean | undefined;
63
- /**
64
- * Removes credit card numbers from the provided text.
65
- */
66
- deleteCreditCards?: boolean | undefined;
67
- /**
68
- * Removes phone numbers from the provided text.
69
- */
70
- deletePhoneNumbers?: boolean | undefined;
71
- /**
72
- * Removes bullet points formatting from the text.
73
- */
74
- cleanBulletPoints?: boolean | undefined;
75
- /**
76
- * Removes numbered list formatting from the text.
77
- */
78
- cleanNumberedList?: boolean | undefined;
79
- /**
80
- * Normalizes or removes unnecessary unicode characters from the text.
81
- */
82
- cleanUnicode?: boolean | undefined;
83
- /**
84
- * Normalizes or removes various dash characters to standardize the text.
85
- */
86
- cleanDashes?: boolean | undefined;
87
- /**
88
- * Trims and normalizes excessive whitespace throughout the text.
89
- */
90
- cleanWhitespaces?: boolean | undefined;
91
- };
92
-
93
- /**
94
- * Configuration options specifying how the datasource file is chunked. Required if `file_id` is specified. Defaults to standard chunking options if omitted.
95
- */
96
- export type ChunkingOptions = {
97
- /**
98
- * The chunking configuration settings for the datasource. Defaults to the system's standard chunking configuration if not specified.
99
- */
100
- chunkingConfiguration?:
101
- | ChunkingConfiguration1
102
- | ChunkingConfiguration2
103
- | undefined;
104
- /**
105
- * The cleanup options applied to the datasource content. All options are enabled by default to ensure enhanced security and optimal chunk quality. Defaults to system-standard cleanup options if not specified.
106
- */
107
- chunkingCleanupOptions?: ChunkingCleanupOptions | undefined;
108
- };
109
-
110
- export type CreateDatasourceRequestBody = {
111
- /**
112
- * The display name for the datasource visible in the UI. If omitted, the display name is derived from the uploaded file. When both `display_name` and `file_id` are provided, the provided `display_name` is prioritized.
113
- */
114
- displayName?: string | undefined;
115
- /**
116
- * The unique identifier of the file used for datasource creation. If provided, the file is immediately queued for chunking.
117
- */
118
- fileId?: string | undefined;
119
- /**
120
- * Configuration options specifying how the datasource file is chunked. Required if `file_id` is specified. Defaults to standard chunking options if omitted.
121
- */
122
- chunkingOptions?: ChunkingOptions | undefined;
123
- };
124
-
125
- export type CreateDatasourceRequest = {
126
- /**
127
- * The unique identifier of the knowledge base
128
- */
129
- knowledgeId: string;
130
- requestBody: CreateDatasourceRequestBody;
131
- };
132
-
133
- export const CreateDatasourceStatus = {
134
- Pending: "pending",
135
- Processing: "processing",
136
- Completed: "completed",
137
- Failed: "failed",
138
- Queued: "queued",
139
- } as const;
140
- export type CreateDatasourceStatus = ClosedEnum<typeof CreateDatasourceStatus>;
141
-
142
- /**
143
- * Datasource successfully created
144
- */
145
- export type CreateDatasourceResponseBody = {
146
- /**
147
- * The id of the resource
148
- */
149
- id?: string | undefined;
150
- /**
151
- * The display name of the datasource. Normally the name of the uploaded file
152
- */
153
- displayName: string;
154
- /**
155
- * The description of the knowledge base
156
- */
157
- description?: string | undefined;
158
- status: CreateDatasourceStatus;
159
- /**
160
- * The unique identifier of the file used to create the datasource.
161
- */
162
- fileId?: string | null | undefined;
163
- /**
164
- * The date and time the datasource was created
165
- */
166
- created: string;
167
- /**
168
- * The date and time the datasource was updated
169
- */
170
- updated: string;
171
- /**
172
- * The id of the resource
173
- */
174
- createdById?: string | undefined;
175
- /**
176
- * The id of the resource
177
- */
178
- updateById?: string | undefined;
179
- /**
180
- * The unique identifier of the knowledge base
181
- */
182
- knowledgeId: string;
183
- /**
184
- * The number of chunks in the datasource
185
- */
186
- chunksCount: number;
187
- };
188
-
189
- /** @internal */
190
- export const CreateDatasourceChunkingConfigurationType$inboundSchema:
191
- z.ZodNativeEnum<typeof CreateDatasourceChunkingConfigurationType> = z
192
- .nativeEnum(CreateDatasourceChunkingConfigurationType);
193
-
194
- /** @internal */
195
- export const CreateDatasourceChunkingConfigurationType$outboundSchema:
196
- z.ZodNativeEnum<typeof CreateDatasourceChunkingConfigurationType> =
197
- CreateDatasourceChunkingConfigurationType$inboundSchema;
198
-
199
- /**
200
- * @internal
201
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
202
- */
203
- export namespace CreateDatasourceChunkingConfigurationType$ {
204
- /** @deprecated use `CreateDatasourceChunkingConfigurationType$inboundSchema` instead. */
205
- export const inboundSchema =
206
- CreateDatasourceChunkingConfigurationType$inboundSchema;
207
- /** @deprecated use `CreateDatasourceChunkingConfigurationType$outboundSchema` instead. */
208
- export const outboundSchema =
209
- CreateDatasourceChunkingConfigurationType$outboundSchema;
210
- }
211
-
212
- /** @internal */
213
- export const ChunkingConfiguration2$inboundSchema: z.ZodType<
214
- ChunkingConfiguration2,
215
- z.ZodTypeDef,
216
- unknown
217
- > = z.object({
218
- type: CreateDatasourceChunkingConfigurationType$inboundSchema,
219
- chunk_max_characters: z.number().default(500),
220
- chunk_overlap: z.number().default(0),
221
- }).transform((v) => {
222
- return remap$(v, {
223
- "chunk_max_characters": "chunkMaxCharacters",
224
- "chunk_overlap": "chunkOverlap",
225
- });
226
- });
227
-
228
- /** @internal */
229
- export type ChunkingConfiguration2$Outbound = {
230
- type: string;
231
- chunk_max_characters: number;
232
- chunk_overlap: number;
233
- };
234
-
235
- /** @internal */
236
- export const ChunkingConfiguration2$outboundSchema: z.ZodType<
237
- ChunkingConfiguration2$Outbound,
238
- z.ZodTypeDef,
239
- ChunkingConfiguration2
240
- > = z.object({
241
- type: CreateDatasourceChunkingConfigurationType$outboundSchema,
242
- chunkMaxCharacters: z.number().default(500),
243
- chunkOverlap: z.number().default(0),
244
- }).transform((v) => {
245
- return remap$(v, {
246
- chunkMaxCharacters: "chunk_max_characters",
247
- chunkOverlap: "chunk_overlap",
248
- });
249
- });
250
-
251
- /**
252
- * @internal
253
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
254
- */
255
- export namespace ChunkingConfiguration2$ {
256
- /** @deprecated use `ChunkingConfiguration2$inboundSchema` instead. */
257
- export const inboundSchema = ChunkingConfiguration2$inboundSchema;
258
- /** @deprecated use `ChunkingConfiguration2$outboundSchema` instead. */
259
- export const outboundSchema = ChunkingConfiguration2$outboundSchema;
260
- /** @deprecated use `ChunkingConfiguration2$Outbound` instead. */
261
- export type Outbound = ChunkingConfiguration2$Outbound;
262
- }
263
-
264
- export function chunkingConfiguration2ToJSON(
265
- chunkingConfiguration2: ChunkingConfiguration2,
266
- ): string {
267
- return JSON.stringify(
268
- ChunkingConfiguration2$outboundSchema.parse(chunkingConfiguration2),
269
- );
270
- }
271
-
272
- export function chunkingConfiguration2FromJSON(
273
- jsonString: string,
274
- ): SafeParseResult<ChunkingConfiguration2, SDKValidationError> {
275
- return safeParse(
276
- jsonString,
277
- (x) => ChunkingConfiguration2$inboundSchema.parse(JSON.parse(x)),
278
- `Failed to parse 'ChunkingConfiguration2' from JSON`,
279
- );
280
- }
281
-
282
- /** @internal */
283
- export const ChunkingConfigurationType$inboundSchema: z.ZodNativeEnum<
284
- typeof ChunkingConfigurationType
285
- > = z.nativeEnum(ChunkingConfigurationType);
286
-
287
- /** @internal */
288
- export const ChunkingConfigurationType$outboundSchema: z.ZodNativeEnum<
289
- typeof ChunkingConfigurationType
290
- > = ChunkingConfigurationType$inboundSchema;
291
-
292
- /**
293
- * @internal
294
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
295
- */
296
- export namespace ChunkingConfigurationType$ {
297
- /** @deprecated use `ChunkingConfigurationType$inboundSchema` instead. */
298
- export const inboundSchema = ChunkingConfigurationType$inboundSchema;
299
- /** @deprecated use `ChunkingConfigurationType$outboundSchema` instead. */
300
- export const outboundSchema = ChunkingConfigurationType$outboundSchema;
301
- }
302
-
303
- /** @internal */
304
- export const ChunkingConfiguration1$inboundSchema: z.ZodType<
305
- ChunkingConfiguration1,
306
- z.ZodTypeDef,
307
- unknown
308
- > = z.object({
309
- type: ChunkingConfigurationType$inboundSchema,
310
- });
311
-
312
- /** @internal */
313
- export type ChunkingConfiguration1$Outbound = {
314
- type: string;
315
- };
316
-
317
- /** @internal */
318
- export const ChunkingConfiguration1$outboundSchema: z.ZodType<
319
- ChunkingConfiguration1$Outbound,
320
- z.ZodTypeDef,
321
- ChunkingConfiguration1
322
- > = z.object({
323
- type: ChunkingConfigurationType$outboundSchema,
324
- });
325
-
326
- /**
327
- * @internal
328
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
329
- */
330
- export namespace ChunkingConfiguration1$ {
331
- /** @deprecated use `ChunkingConfiguration1$inboundSchema` instead. */
332
- export const inboundSchema = ChunkingConfiguration1$inboundSchema;
333
- /** @deprecated use `ChunkingConfiguration1$outboundSchema` instead. */
334
- export const outboundSchema = ChunkingConfiguration1$outboundSchema;
335
- /** @deprecated use `ChunkingConfiguration1$Outbound` instead. */
336
- export type Outbound = ChunkingConfiguration1$Outbound;
337
- }
338
-
339
- export function chunkingConfiguration1ToJSON(
340
- chunkingConfiguration1: ChunkingConfiguration1,
341
- ): string {
342
- return JSON.stringify(
343
- ChunkingConfiguration1$outboundSchema.parse(chunkingConfiguration1),
344
- );
345
- }
346
-
347
- export function chunkingConfiguration1FromJSON(
348
- jsonString: string,
349
- ): SafeParseResult<ChunkingConfiguration1, SDKValidationError> {
350
- return safeParse(
351
- jsonString,
352
- (x) => ChunkingConfiguration1$inboundSchema.parse(JSON.parse(x)),
353
- `Failed to parse 'ChunkingConfiguration1' from JSON`,
354
- );
355
- }
356
-
357
- /** @internal */
358
- export const ChunkingConfiguration$inboundSchema: z.ZodType<
359
- ChunkingConfiguration,
360
- z.ZodTypeDef,
361
- unknown
362
- > = z.union([
363
- z.lazy(() => ChunkingConfiguration1$inboundSchema),
364
- z.lazy(() => ChunkingConfiguration2$inboundSchema),
365
- ]);
366
-
367
- /** @internal */
368
- export type ChunkingConfiguration$Outbound =
369
- | ChunkingConfiguration1$Outbound
370
- | ChunkingConfiguration2$Outbound;
371
-
372
- /** @internal */
373
- export const ChunkingConfiguration$outboundSchema: z.ZodType<
374
- ChunkingConfiguration$Outbound,
375
- z.ZodTypeDef,
376
- ChunkingConfiguration
377
- > = z.union([
378
- z.lazy(() => ChunkingConfiguration1$outboundSchema),
379
- z.lazy(() => ChunkingConfiguration2$outboundSchema),
380
- ]);
381
-
382
- /**
383
- * @internal
384
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
385
- */
386
- export namespace ChunkingConfiguration$ {
387
- /** @deprecated use `ChunkingConfiguration$inboundSchema` instead. */
388
- export const inboundSchema = ChunkingConfiguration$inboundSchema;
389
- /** @deprecated use `ChunkingConfiguration$outboundSchema` instead. */
390
- export const outboundSchema = ChunkingConfiguration$outboundSchema;
391
- /** @deprecated use `ChunkingConfiguration$Outbound` instead. */
392
- export type Outbound = ChunkingConfiguration$Outbound;
393
- }
394
-
395
- export function chunkingConfigurationToJSON(
396
- chunkingConfiguration: ChunkingConfiguration,
397
- ): string {
398
- return JSON.stringify(
399
- ChunkingConfiguration$outboundSchema.parse(chunkingConfiguration),
400
- );
401
- }
402
-
403
- export function chunkingConfigurationFromJSON(
404
- jsonString: string,
405
- ): SafeParseResult<ChunkingConfiguration, SDKValidationError> {
406
- return safeParse(
407
- jsonString,
408
- (x) => ChunkingConfiguration$inboundSchema.parse(JSON.parse(x)),
409
- `Failed to parse 'ChunkingConfiguration' from JSON`,
410
- );
411
- }
412
-
413
- /** @internal */
414
- export const ChunkingCleanupOptions$inboundSchema: z.ZodType<
415
- ChunkingCleanupOptions,
416
- z.ZodTypeDef,
417
- unknown
418
- > = z.object({
419
- delete_emails: z.boolean().optional(),
420
- delete_credit_cards: z.boolean().optional(),
421
- delete_phone_numbers: z.boolean().optional(),
422
- clean_bullet_points: z.boolean().optional(),
423
- clean_numbered_list: z.boolean().optional(),
424
- clean_unicode: z.boolean().optional(),
425
- clean_dashes: z.boolean().optional(),
426
- clean_whitespaces: z.boolean().optional(),
427
- }).transform((v) => {
428
- return remap$(v, {
429
- "delete_emails": "deleteEmails",
430
- "delete_credit_cards": "deleteCreditCards",
431
- "delete_phone_numbers": "deletePhoneNumbers",
432
- "clean_bullet_points": "cleanBulletPoints",
433
- "clean_numbered_list": "cleanNumberedList",
434
- "clean_unicode": "cleanUnicode",
435
- "clean_dashes": "cleanDashes",
436
- "clean_whitespaces": "cleanWhitespaces",
437
- });
438
- });
439
-
440
- /** @internal */
441
- export type ChunkingCleanupOptions$Outbound = {
442
- delete_emails?: boolean | undefined;
443
- delete_credit_cards?: boolean | undefined;
444
- delete_phone_numbers?: boolean | undefined;
445
- clean_bullet_points?: boolean | undefined;
446
- clean_numbered_list?: boolean | undefined;
447
- clean_unicode?: boolean | undefined;
448
- clean_dashes?: boolean | undefined;
449
- clean_whitespaces?: boolean | undefined;
450
- };
451
-
452
- /** @internal */
453
- export const ChunkingCleanupOptions$outboundSchema: z.ZodType<
454
- ChunkingCleanupOptions$Outbound,
455
- z.ZodTypeDef,
456
- ChunkingCleanupOptions
457
- > = z.object({
458
- deleteEmails: z.boolean().optional(),
459
- deleteCreditCards: z.boolean().optional(),
460
- deletePhoneNumbers: z.boolean().optional(),
461
- cleanBulletPoints: z.boolean().optional(),
462
- cleanNumberedList: z.boolean().optional(),
463
- cleanUnicode: z.boolean().optional(),
464
- cleanDashes: z.boolean().optional(),
465
- cleanWhitespaces: z.boolean().optional(),
466
- }).transform((v) => {
467
- return remap$(v, {
468
- deleteEmails: "delete_emails",
469
- deleteCreditCards: "delete_credit_cards",
470
- deletePhoneNumbers: "delete_phone_numbers",
471
- cleanBulletPoints: "clean_bullet_points",
472
- cleanNumberedList: "clean_numbered_list",
473
- cleanUnicode: "clean_unicode",
474
- cleanDashes: "clean_dashes",
475
- cleanWhitespaces: "clean_whitespaces",
476
- });
477
- });
478
-
479
- /**
480
- * @internal
481
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
482
- */
483
- export namespace ChunkingCleanupOptions$ {
484
- /** @deprecated use `ChunkingCleanupOptions$inboundSchema` instead. */
485
- export const inboundSchema = ChunkingCleanupOptions$inboundSchema;
486
- /** @deprecated use `ChunkingCleanupOptions$outboundSchema` instead. */
487
- export const outboundSchema = ChunkingCleanupOptions$outboundSchema;
488
- /** @deprecated use `ChunkingCleanupOptions$Outbound` instead. */
489
- export type Outbound = ChunkingCleanupOptions$Outbound;
490
- }
491
-
492
- export function chunkingCleanupOptionsToJSON(
493
- chunkingCleanupOptions: ChunkingCleanupOptions,
494
- ): string {
495
- return JSON.stringify(
496
- ChunkingCleanupOptions$outboundSchema.parse(chunkingCleanupOptions),
497
- );
498
- }
499
-
500
- export function chunkingCleanupOptionsFromJSON(
501
- jsonString: string,
502
- ): SafeParseResult<ChunkingCleanupOptions, SDKValidationError> {
503
- return safeParse(
504
- jsonString,
505
- (x) => ChunkingCleanupOptions$inboundSchema.parse(JSON.parse(x)),
506
- `Failed to parse 'ChunkingCleanupOptions' from JSON`,
507
- );
508
- }
509
-
510
- /** @internal */
511
- export const ChunkingOptions$inboundSchema: z.ZodType<
512
- ChunkingOptions,
513
- z.ZodTypeDef,
514
- unknown
515
- > = z.object({
516
- chunking_configuration: z.union([
517
- z.lazy(() => ChunkingConfiguration1$inboundSchema),
518
- z.lazy(() => ChunkingConfiguration2$inboundSchema),
519
- ]).optional(),
520
- chunking_cleanup_options: z.lazy(() => ChunkingCleanupOptions$inboundSchema)
521
- .optional(),
522
- }).transform((v) => {
523
- return remap$(v, {
524
- "chunking_configuration": "chunkingConfiguration",
525
- "chunking_cleanup_options": "chunkingCleanupOptions",
526
- });
527
- });
528
-
529
- /** @internal */
530
- export type ChunkingOptions$Outbound = {
531
- chunking_configuration?:
532
- | ChunkingConfiguration1$Outbound
533
- | ChunkingConfiguration2$Outbound
534
- | undefined;
535
- chunking_cleanup_options?: ChunkingCleanupOptions$Outbound | undefined;
536
- };
537
-
538
- /** @internal */
539
- export const ChunkingOptions$outboundSchema: z.ZodType<
540
- ChunkingOptions$Outbound,
541
- z.ZodTypeDef,
542
- ChunkingOptions
543
- > = z.object({
544
- chunkingConfiguration: z.union([
545
- z.lazy(() => ChunkingConfiguration1$outboundSchema),
546
- z.lazy(() => ChunkingConfiguration2$outboundSchema),
547
- ]).optional(),
548
- chunkingCleanupOptions: z.lazy(() => ChunkingCleanupOptions$outboundSchema)
549
- .optional(),
550
- }).transform((v) => {
551
- return remap$(v, {
552
- chunkingConfiguration: "chunking_configuration",
553
- chunkingCleanupOptions: "chunking_cleanup_options",
554
- });
555
- });
556
-
557
- /**
558
- * @internal
559
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
560
- */
561
- export namespace ChunkingOptions$ {
562
- /** @deprecated use `ChunkingOptions$inboundSchema` instead. */
563
- export const inboundSchema = ChunkingOptions$inboundSchema;
564
- /** @deprecated use `ChunkingOptions$outboundSchema` instead. */
565
- export const outboundSchema = ChunkingOptions$outboundSchema;
566
- /** @deprecated use `ChunkingOptions$Outbound` instead. */
567
- export type Outbound = ChunkingOptions$Outbound;
568
- }
569
-
570
- export function chunkingOptionsToJSON(
571
- chunkingOptions: ChunkingOptions,
572
- ): string {
573
- return JSON.stringify(ChunkingOptions$outboundSchema.parse(chunkingOptions));
574
- }
575
-
576
- export function chunkingOptionsFromJSON(
577
- jsonString: string,
578
- ): SafeParseResult<ChunkingOptions, SDKValidationError> {
579
- return safeParse(
580
- jsonString,
581
- (x) => ChunkingOptions$inboundSchema.parse(JSON.parse(x)),
582
- `Failed to parse 'ChunkingOptions' from JSON`,
583
- );
584
- }
585
-
586
- /** @internal */
587
- export const CreateDatasourceRequestBody$inboundSchema: z.ZodType<
588
- CreateDatasourceRequestBody,
589
- z.ZodTypeDef,
590
- unknown
591
- > = z.object({
592
- display_name: z.string().optional(),
593
- file_id: z.string().optional(),
594
- chunking_options: z.lazy(() => ChunkingOptions$inboundSchema).optional(),
595
- }).transform((v) => {
596
- return remap$(v, {
597
- "display_name": "displayName",
598
- "file_id": "fileId",
599
- "chunking_options": "chunkingOptions",
600
- });
601
- });
602
-
603
- /** @internal */
604
- export type CreateDatasourceRequestBody$Outbound = {
605
- display_name?: string | undefined;
606
- file_id?: string | undefined;
607
- chunking_options?: ChunkingOptions$Outbound | undefined;
608
- };
609
-
610
- /** @internal */
611
- export const CreateDatasourceRequestBody$outboundSchema: z.ZodType<
612
- CreateDatasourceRequestBody$Outbound,
613
- z.ZodTypeDef,
614
- CreateDatasourceRequestBody
615
- > = z.object({
616
- displayName: z.string().optional(),
617
- fileId: z.string().optional(),
618
- chunkingOptions: z.lazy(() => ChunkingOptions$outboundSchema).optional(),
619
- }).transform((v) => {
620
- return remap$(v, {
621
- displayName: "display_name",
622
- fileId: "file_id",
623
- chunkingOptions: "chunking_options",
624
- });
625
- });
626
-
627
- /**
628
- * @internal
629
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
630
- */
631
- export namespace CreateDatasourceRequestBody$ {
632
- /** @deprecated use `CreateDatasourceRequestBody$inboundSchema` instead. */
633
- export const inboundSchema = CreateDatasourceRequestBody$inboundSchema;
634
- /** @deprecated use `CreateDatasourceRequestBody$outboundSchema` instead. */
635
- export const outboundSchema = CreateDatasourceRequestBody$outboundSchema;
636
- /** @deprecated use `CreateDatasourceRequestBody$Outbound` instead. */
637
- export type Outbound = CreateDatasourceRequestBody$Outbound;
638
- }
639
-
640
- export function createDatasourceRequestBodyToJSON(
641
- createDatasourceRequestBody: CreateDatasourceRequestBody,
642
- ): string {
643
- return JSON.stringify(
644
- CreateDatasourceRequestBody$outboundSchema.parse(
645
- createDatasourceRequestBody,
646
- ),
647
- );
648
- }
649
-
650
- export function createDatasourceRequestBodyFromJSON(
651
- jsonString: string,
652
- ): SafeParseResult<CreateDatasourceRequestBody, SDKValidationError> {
653
- return safeParse(
654
- jsonString,
655
- (x) => CreateDatasourceRequestBody$inboundSchema.parse(JSON.parse(x)),
656
- `Failed to parse 'CreateDatasourceRequestBody' from JSON`,
657
- );
658
- }
659
-
660
- /** @internal */
661
- export const CreateDatasourceRequest$inboundSchema: z.ZodType<
662
- CreateDatasourceRequest,
663
- z.ZodTypeDef,
664
- unknown
665
- > = z.object({
666
- knowledge_id: z.string(),
667
- RequestBody: z.lazy(() => CreateDatasourceRequestBody$inboundSchema),
668
- }).transform((v) => {
669
- return remap$(v, {
670
- "knowledge_id": "knowledgeId",
671
- "RequestBody": "requestBody",
672
- });
673
- });
674
-
675
- /** @internal */
676
- export type CreateDatasourceRequest$Outbound = {
677
- knowledge_id: string;
678
- RequestBody: CreateDatasourceRequestBody$Outbound;
679
- };
680
-
681
- /** @internal */
682
- export const CreateDatasourceRequest$outboundSchema: z.ZodType<
683
- CreateDatasourceRequest$Outbound,
684
- z.ZodTypeDef,
685
- CreateDatasourceRequest
686
- > = z.object({
687
- knowledgeId: z.string(),
688
- requestBody: z.lazy(() => CreateDatasourceRequestBody$outboundSchema),
689
- }).transform((v) => {
690
- return remap$(v, {
691
- knowledgeId: "knowledge_id",
692
- requestBody: "RequestBody",
693
- });
694
- });
695
-
696
- /**
697
- * @internal
698
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
699
- */
700
- export namespace CreateDatasourceRequest$ {
701
- /** @deprecated use `CreateDatasourceRequest$inboundSchema` instead. */
702
- export const inboundSchema = CreateDatasourceRequest$inboundSchema;
703
- /** @deprecated use `CreateDatasourceRequest$outboundSchema` instead. */
704
- export const outboundSchema = CreateDatasourceRequest$outboundSchema;
705
- /** @deprecated use `CreateDatasourceRequest$Outbound` instead. */
706
- export type Outbound = CreateDatasourceRequest$Outbound;
707
- }
708
-
709
- export function createDatasourceRequestToJSON(
710
- createDatasourceRequest: CreateDatasourceRequest,
711
- ): string {
712
- return JSON.stringify(
713
- CreateDatasourceRequest$outboundSchema.parse(createDatasourceRequest),
714
- );
715
- }
716
-
717
- export function createDatasourceRequestFromJSON(
718
- jsonString: string,
719
- ): SafeParseResult<CreateDatasourceRequest, SDKValidationError> {
720
- return safeParse(
721
- jsonString,
722
- (x) => CreateDatasourceRequest$inboundSchema.parse(JSON.parse(x)),
723
- `Failed to parse 'CreateDatasourceRequest' from JSON`,
724
- );
725
- }
726
-
727
- /** @internal */
728
- export const CreateDatasourceStatus$inboundSchema: z.ZodNativeEnum<
729
- typeof CreateDatasourceStatus
730
- > = z.nativeEnum(CreateDatasourceStatus);
731
-
732
- /** @internal */
733
- export const CreateDatasourceStatus$outboundSchema: z.ZodNativeEnum<
734
- typeof CreateDatasourceStatus
735
- > = CreateDatasourceStatus$inboundSchema;
736
-
737
- /**
738
- * @internal
739
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
740
- */
741
- export namespace CreateDatasourceStatus$ {
742
- /** @deprecated use `CreateDatasourceStatus$inboundSchema` instead. */
743
- export const inboundSchema = CreateDatasourceStatus$inboundSchema;
744
- /** @deprecated use `CreateDatasourceStatus$outboundSchema` instead. */
745
- export const outboundSchema = CreateDatasourceStatus$outboundSchema;
746
- }
747
-
748
- /** @internal */
749
- export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
750
- CreateDatasourceResponseBody,
751
- z.ZodTypeDef,
752
- unknown
753
- > = z.object({
754
- _id: z.string().default("01JQXQTYP50W5KN2H3MZDE6SD6"),
755
- display_name: z.string(),
756
- description: z.string().optional(),
757
- status: CreateDatasourceStatus$inboundSchema,
758
- file_id: z.nullable(z.string()).optional(),
759
- created: z.string(),
760
- updated: z.string(),
761
- created_by_id: z.string().optional(),
762
- update_by_id: z.string().optional(),
763
- knowledge_id: z.string(),
764
- chunks_count: z.number(),
765
- }).transform((v) => {
766
- return remap$(v, {
767
- "_id": "id",
768
- "display_name": "displayName",
769
- "file_id": "fileId",
770
- "created_by_id": "createdById",
771
- "update_by_id": "updateById",
772
- "knowledge_id": "knowledgeId",
773
- "chunks_count": "chunksCount",
774
- });
775
- });
776
-
777
- /** @internal */
778
- export type CreateDatasourceResponseBody$Outbound = {
779
- _id: string;
780
- display_name: string;
781
- description?: string | undefined;
782
- status: string;
783
- file_id?: string | null | undefined;
784
- created: string;
785
- updated: string;
786
- created_by_id?: string | undefined;
787
- update_by_id?: string | undefined;
788
- knowledge_id: string;
789
- chunks_count: number;
790
- };
791
-
792
- /** @internal */
793
- export const CreateDatasourceResponseBody$outboundSchema: z.ZodType<
794
- CreateDatasourceResponseBody$Outbound,
795
- z.ZodTypeDef,
796
- CreateDatasourceResponseBody
797
- > = z.object({
798
- id: z.string().default("01JQXQTYP50W5KN2H3MZDE6SD6"),
799
- displayName: z.string(),
800
- description: z.string().optional(),
801
- status: CreateDatasourceStatus$outboundSchema,
802
- fileId: z.nullable(z.string()).optional(),
803
- created: z.string(),
804
- updated: z.string(),
805
- createdById: z.string().optional(),
806
- updateById: z.string().optional(),
807
- knowledgeId: z.string(),
808
- chunksCount: z.number(),
809
- }).transform((v) => {
810
- return remap$(v, {
811
- id: "_id",
812
- displayName: "display_name",
813
- fileId: "file_id",
814
- createdById: "created_by_id",
815
- updateById: "update_by_id",
816
- knowledgeId: "knowledge_id",
817
- chunksCount: "chunks_count",
818
- });
819
- });
820
-
821
- /**
822
- * @internal
823
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
824
- */
825
- export namespace CreateDatasourceResponseBody$ {
826
- /** @deprecated use `CreateDatasourceResponseBody$inboundSchema` instead. */
827
- export const inboundSchema = CreateDatasourceResponseBody$inboundSchema;
828
- /** @deprecated use `CreateDatasourceResponseBody$outboundSchema` instead. */
829
- export const outboundSchema = CreateDatasourceResponseBody$outboundSchema;
830
- /** @deprecated use `CreateDatasourceResponseBody$Outbound` instead. */
831
- export type Outbound = CreateDatasourceResponseBody$Outbound;
832
- }
833
-
834
- export function createDatasourceResponseBodyToJSON(
835
- createDatasourceResponseBody: CreateDatasourceResponseBody,
836
- ): string {
837
- return JSON.stringify(
838
- CreateDatasourceResponseBody$outboundSchema.parse(
839
- createDatasourceResponseBody,
840
- ),
841
- );
842
- }
843
-
844
- export function createDatasourceResponseBodyFromJSON(
845
- jsonString: string,
846
- ): SafeParseResult<CreateDatasourceResponseBody, SDKValidationError> {
847
- return safeParse(
848
- jsonString,
849
- (x) => CreateDatasourceResponseBody$inboundSchema.parse(JSON.parse(x)),
850
- `Failed to parse 'CreateDatasourceResponseBody' from JSON`,
851
- );
852
- }