@orq-ai/node 4.15.0-rc.8 → 4.15.0-rc.9

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 (111) hide show
  1. package/README.md +30 -28
  2. package/funcs/knowledgePreviewChunks.d.ts +18 -0
  3. package/funcs/knowledgePreviewChunks.d.ts.map +1 -0
  4. package/funcs/knowledgePreviewChunks.js +122 -0
  5. package/funcs/knowledgePreviewChunks.js.map +1 -0
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +2 -2
  8. package/lib/config.js +2 -2
  9. package/models/components/chunkingconfiguration.d.ts +263 -4
  10. package/models/components/chunkingconfiguration.d.ts.map +1 -1
  11. package/models/components/chunkingconfiguration.js +144 -1
  12. package/models/components/chunkingconfiguration.js.map +1 -1
  13. package/models/components/datasourcesservicepreviewchunksrequest.d.ts +15 -0
  14. package/models/components/datasourcesservicepreviewchunksrequest.d.ts.map +1 -0
  15. package/models/components/datasourcesservicepreviewchunksrequest.js +57 -0
  16. package/models/components/datasourcesservicepreviewchunksrequest.js.map +1 -0
  17. package/models/components/datasourcesservicepreviewchunksresponse.d.ts +13 -0
  18. package/models/components/datasourcesservicepreviewchunksresponse.d.ts.map +1 -0
  19. package/models/components/datasourcesservicepreviewchunksresponse.js +53 -0
  20. package/models/components/datasourcesservicepreviewchunksresponse.js.map +1 -0
  21. package/models/components/getuploadfileurlresponse.d.ts +4 -0
  22. package/models/components/getuploadfileurlresponse.d.ts.map +1 -1
  23. package/models/components/getuploadfileurlresponse.js +1 -0
  24. package/models/components/getuploadfileurlresponse.js.map +1 -1
  25. package/models/components/index.d.ts +4 -0
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +4 -0
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/previewchunk.d.ts +11 -0
  30. package/models/components/previewchunk.d.ts.map +1 -0
  31. package/models/components/previewchunk.js +56 -0
  32. package/models/components/previewchunk.js.map +1 -0
  33. package/models/components/previewchunksmetadata.d.ts +15 -0
  34. package/models/components/previewchunksmetadata.d.ts.map +1 -0
  35. package/models/components/previewchunksmetadata.js +65 -0
  36. package/models/components/previewchunksmetadata.js.map +1 -0
  37. package/models/components/reasoningpart.js +1 -1
  38. package/models/components/upsertchunk.d.ts +5 -0
  39. package/models/components/upsertchunk.d.ts.map +1 -1
  40. package/models/components/upsertchunk.js +6 -0
  41. package/models/components/upsertchunk.js.map +1 -1
  42. package/models/components/value.d.ts +4 -0
  43. package/models/components/value.d.ts.map +1 -1
  44. package/models/components/value.js +4 -0
  45. package/models/components/value.js.map +1 -1
  46. package/models/operations/createdataset.js +1 -1
  47. package/models/operations/createdatasetitem.js +5 -5
  48. package/models/operations/createtool.js +4 -4
  49. package/models/operations/getalltools.js +4 -4
  50. package/models/operations/getv2humanevalsets.js +2 -2
  51. package/models/operations/getv2humanevalsetsid.js +2 -2
  52. package/models/operations/index.d.ts +1 -0
  53. package/models/operations/index.d.ts.map +1 -1
  54. package/models/operations/index.js +1 -0
  55. package/models/operations/index.js.map +1 -1
  56. package/models/operations/listdatasetdatapoints.js +5 -5
  57. package/models/operations/listdatasets.js +1 -1
  58. package/models/operations/patchv2humanevalsetsid.js +2 -2
  59. package/models/operations/postv2feedbackevaluation.js +4 -4
  60. package/models/operations/postv2humanevalsets.js +2 -2
  61. package/models/operations/previewdatasourcechunks.d.ts +15 -0
  62. package/models/operations/previewdatasourcechunks.d.ts.map +1 -0
  63. package/models/operations/previewdatasourcechunks.js +57 -0
  64. package/models/operations/previewdatasourcechunks.js.map +1 -0
  65. package/models/operations/retrievedatapoint.js +5 -5
  66. package/models/operations/retrievedataset.js +1 -1
  67. package/models/operations/retrievetool.js +4 -4
  68. package/models/operations/runagent.js +1 -1
  69. package/models/operations/streamrunagent.js +1 -1
  70. package/models/operations/updatedatapoint.js +5 -5
  71. package/models/operations/updatedataset.js +1 -1
  72. package/models/operations/updatetool.js +4 -4
  73. package/package.json +6 -6
  74. package/sdk/knowledge.d.ts +7 -0
  75. package/sdk/knowledge.d.ts.map +1 -1
  76. package/sdk/knowledge.js +10 -0
  77. package/sdk/knowledge.js.map +1 -1
  78. package/src/funcs/knowledgePreviewChunks.ts +179 -0
  79. package/src/lib/config.ts +2 -2
  80. package/src/models/components/chunkingconfiguration.ts +432 -4
  81. package/src/models/components/datasourcesservicepreviewchunksrequest.ts +48 -0
  82. package/src/models/components/datasourcesservicepreviewchunksresponse.ts +44 -0
  83. package/src/models/components/getuploadfileurlresponse.ts +5 -0
  84. package/src/models/components/index.ts +4 -0
  85. package/src/models/components/previewchunk.ts +38 -0
  86. package/src/models/components/previewchunksmetadata.ts +51 -0
  87. package/src/models/components/reasoningpart.ts +1 -1
  88. package/src/models/components/upsertchunk.ts +11 -0
  89. package/src/models/components/value.ts +4 -0
  90. package/src/models/operations/createdataset.ts +1 -1
  91. package/src/models/operations/createdatasetitem.ts +5 -5
  92. package/src/models/operations/createtool.ts +4 -4
  93. package/src/models/operations/getalltools.ts +4 -4
  94. package/src/models/operations/getv2humanevalsets.ts +2 -2
  95. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  96. package/src/models/operations/index.ts +1 -0
  97. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  98. package/src/models/operations/listdatasets.ts +1 -1
  99. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  100. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  101. package/src/models/operations/postv2humanevalsets.ts +2 -2
  102. package/src/models/operations/previewdatasourcechunks.ts +47 -0
  103. package/src/models/operations/retrievedatapoint.ts +5 -5
  104. package/src/models/operations/retrievedataset.ts +1 -1
  105. package/src/models/operations/retrievetool.ts +4 -4
  106. package/src/models/operations/runagent.ts +1 -1
  107. package/src/models/operations/streamrunagent.ts +1 -1
  108. package/src/models/operations/updatedatapoint.ts +5 -5
  109. package/src/models/operations/updatedataset.ts +1 -1
  110. package/src/models/operations/updatetool.ts +4 -4
  111. package/src/sdk/knowledge.ts +18 -0
package/README.md CHANGED
@@ -299,6 +299,7 @@ run();
299
299
  * [update](docs/sdks/knowledge/README.md#update) - Updates a knowledge
300
300
  * [listDatasources](docs/sdks/knowledge/README.md#listdatasources) - List all datasources
301
301
  * [createDatasource](docs/sdks/knowledge/README.md#createdatasource) - Create a new datasource
302
+ * [previewChunks](docs/sdks/knowledge/README.md#previewchunks) - Preview datasource chunks
302
303
  * [retrieveDatasource](docs/sdks/knowledge/README.md#retrievedatasource) - Retrieve a datasource
303
304
  * [deleteDatasource](docs/sdks/knowledge/README.md#deletedatasource) - Deletes a datasource
304
305
  * [updateDatasource](docs/sdks/knowledge/README.md#updatedatasource) - Update a datasource
@@ -710,6 +711,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
710
711
  - [`knowledgeListChunks`](docs/sdks/knowledge/README.md#listchunks) - List all chunks for a datasource
711
712
  - [`knowledgeListChunksPaginated`](docs/sdks/knowledge/README.md#listchunkspaginated) - List chunks with offset-based pagination
712
713
  - [`knowledgeListDatasources`](docs/sdks/knowledge/README.md#listdatasources) - List all datasources
714
+ - [`knowledgePreviewChunks`](docs/sdks/knowledge/README.md#previewchunks) - Preview datasource chunks
713
715
  - [`knowledgeRetrieve`](docs/sdks/knowledge/README.md#retrieve) - Retrieves a knowledge base
714
716
  - [`knowledgeRetrieveChunk`](docs/sdks/knowledge/README.md#retrievechunk) - Retrieve a chunk
715
717
  - [`knowledgeRetrieveDatasource`](docs/sdks/knowledge/README.md#retrievedatasource) - Retrieve a datasource
@@ -1200,34 +1202,34 @@ run();
1200
1202
 
1201
1203
 
1202
1204
  **Inherit from [`OrqError`](./src/models/errors/orqerror.ts)**:
1203
- * [`HonoApiError`](./src/models/errors/honoapierror.ts): Applicable to 12 of 285 methods.*
1204
- * [`PostV2FeedbackResponseBody`](./src/models/errors/postv2feedbackresponsebody.ts): Bad Request. Status code `400`. Applicable to 1 of 285 methods.*
1205
- * [`CreateAgentScheduleResponseBody`](./src/models/errors/createagentscheduleresponsebody.ts): Invalid schedule type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 285 methods.*
1206
- * [`UpdateAgentScheduleResponseBody`](./src/models/errors/updateagentscheduleresponsebody.ts): Invalid type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 285 methods.*
1207
- * [`TriggerAgentScheduleResponseBody`](./src/models/errors/triggeragentscheduleresponsebody.ts): Schedule is inactive. Status code `400`. Applicable to 1 of 285 methods.*
1208
- * [`DeleteAgentResponseBody`](./src/models/errors/deleteagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or has already been deleted. Status code `404`. Applicable to 1 of 285 methods.*
1209
- * [`RetrieveAgentRequestResponseBody`](./src/models/errors/retrieveagentrequestresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to access it. Status code `404`. Applicable to 1 of 285 methods.*
1210
- * [`UpdateAgentResponseBody`](./src/models/errors/updateagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to modify it. Status code `404`. Applicable to 1 of 285 methods.*
1211
- * [`StreamRunAgentResponseBody`](./src/models/errors/streamrunagentresponsebody.ts): Model not found. Status code `404`. Applicable to 1 of 285 methods.*
1212
- * [`StreamAgentResponseBody`](./src/models/errors/streamagentresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of 285 methods.*
1213
- * [`UpdatePromptResponseBody`](./src/models/errors/updatepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 285 methods.*
1214
- * [`DeletePromptResponseBody`](./src/models/errors/deletepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 285 methods.*
1215
- * [`GetPromptVersionResponseBody`](./src/models/errors/getpromptversionresponsebody.ts): Not Found - The prompt or prompt version does not exist. Status code `404`. Applicable to 1 of 285 methods.*
1216
- * [`UpdateToolResponseBody`](./src/models/errors/updatetoolresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 285 methods.*
1217
- * [`GetV2ToolsToolIdVersionsResponseBody`](./src/models/errors/getv2toolstoolidversionsresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 285 methods.*
1218
- * [`GetV2ToolsToolIdVersionsVersionIdResponseBody`](./src/models/errors/getv2toolstoolidversionsversionidresponsebody.ts): Tool or version not found. Status code `404`. Applicable to 1 of 285 methods.*
1219
- * [`PostV2FeedbackRemoveResponseBody`](./src/models/errors/postv2feedbackremoveresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 285 methods.*
1220
- * [`PostV2FeedbackFeedbackResponseBody`](./src/models/errors/postv2feedbackfeedbackresponsebody.ts): Workspace, trace, or feedback property was not found. Status code `404`. Applicable to 1 of 285 methods.*
1221
- * [`CreateAgentScheduleSchedulesResponseBody`](./src/models/errors/createagentscheduleschedulesresponsebody.ts): Agent (or agent version, when agent_tag is set) not found. Status code `404`. Applicable to 1 of 285 methods.*
1222
- * [`DeleteAgentScheduleResponseBody`](./src/models/errors/deleteagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 285 methods.*
1223
- * [`RetrieveAgentScheduleResponseBody`](./src/models/errors/retrieveagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 285 methods.*
1224
- * [`UpdateAgentScheduleSchedulesResponseBody`](./src/models/errors/updateagentscheduleschedulesresponsebody.ts): Schedule or agent version not found. Status code `404`. Applicable to 1 of 285 methods.*
1225
- * [`TriggerAgentScheduleSchedulesResponseBody`](./src/models/errors/triggeragentscheduleschedulesresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 285 methods.*
1226
- * [`RetrieveResponseResponseBody`](./src/models/errors/retrieveresponseresponsebody.ts): Response not found. Status code `404`. Applicable to 1 of 285 methods.*
1227
- * [`CreateModerationResponseBody`](./src/models/errors/createmoderationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 285 methods.*
1228
- * [`CreateTranscriptionResponseBody`](./src/models/errors/createtranscriptionresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 285 methods.*
1229
- * [`CreateTranslationResponseBody`](./src/models/errors/createtranslationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 285 methods.*
1230
- * [`KnowledgeApiError`](./src/models/errors/knowledgeapierror.ts): An error has occured. Status code `500`. Applicable to 1 of 285 methods.*
1205
+ * [`HonoApiError`](./src/models/errors/honoapierror.ts): Applicable to 12 of 286 methods.*
1206
+ * [`PostV2FeedbackResponseBody`](./src/models/errors/postv2feedbackresponsebody.ts): Bad Request. Status code `400`. Applicable to 1 of 286 methods.*
1207
+ * [`CreateAgentScheduleResponseBody`](./src/models/errors/createagentscheduleresponsebody.ts): Invalid schedule type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 286 methods.*
1208
+ * [`UpdateAgentScheduleResponseBody`](./src/models/errors/updateagentscheduleresponsebody.ts): Invalid type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 286 methods.*
1209
+ * [`TriggerAgentScheduleResponseBody`](./src/models/errors/triggeragentscheduleresponsebody.ts): Schedule is inactive. Status code `400`. Applicable to 1 of 286 methods.*
1210
+ * [`DeleteAgentResponseBody`](./src/models/errors/deleteagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or has already been deleted. Status code `404`. Applicable to 1 of 286 methods.*
1211
+ * [`RetrieveAgentRequestResponseBody`](./src/models/errors/retrieveagentrequestresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to access it. Status code `404`. Applicable to 1 of 286 methods.*
1212
+ * [`UpdateAgentResponseBody`](./src/models/errors/updateagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to modify it. Status code `404`. Applicable to 1 of 286 methods.*
1213
+ * [`StreamRunAgentResponseBody`](./src/models/errors/streamrunagentresponsebody.ts): Model not found. Status code `404`. Applicable to 1 of 286 methods.*
1214
+ * [`StreamAgentResponseBody`](./src/models/errors/streamagentresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of 286 methods.*
1215
+ * [`UpdatePromptResponseBody`](./src/models/errors/updatepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 286 methods.*
1216
+ * [`DeletePromptResponseBody`](./src/models/errors/deletepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 286 methods.*
1217
+ * [`GetPromptVersionResponseBody`](./src/models/errors/getpromptversionresponsebody.ts): Not Found - The prompt or prompt version does not exist. Status code `404`. Applicable to 1 of 286 methods.*
1218
+ * [`UpdateToolResponseBody`](./src/models/errors/updatetoolresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 286 methods.*
1219
+ * [`GetV2ToolsToolIdVersionsResponseBody`](./src/models/errors/getv2toolstoolidversionsresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 286 methods.*
1220
+ * [`GetV2ToolsToolIdVersionsVersionIdResponseBody`](./src/models/errors/getv2toolstoolidversionsversionidresponsebody.ts): Tool or version not found. Status code `404`. Applicable to 1 of 286 methods.*
1221
+ * [`PostV2FeedbackRemoveResponseBody`](./src/models/errors/postv2feedbackremoveresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 286 methods.*
1222
+ * [`PostV2FeedbackFeedbackResponseBody`](./src/models/errors/postv2feedbackfeedbackresponsebody.ts): Workspace, trace, or feedback property was not found. Status code `404`. Applicable to 1 of 286 methods.*
1223
+ * [`CreateAgentScheduleSchedulesResponseBody`](./src/models/errors/createagentscheduleschedulesresponsebody.ts): Agent (or agent version, when agent_tag is set) not found. Status code `404`. Applicable to 1 of 286 methods.*
1224
+ * [`DeleteAgentScheduleResponseBody`](./src/models/errors/deleteagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 286 methods.*
1225
+ * [`RetrieveAgentScheduleResponseBody`](./src/models/errors/retrieveagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 286 methods.*
1226
+ * [`UpdateAgentScheduleSchedulesResponseBody`](./src/models/errors/updateagentscheduleschedulesresponsebody.ts): Schedule or agent version not found. Status code `404`. Applicable to 1 of 286 methods.*
1227
+ * [`TriggerAgentScheduleSchedulesResponseBody`](./src/models/errors/triggeragentscheduleschedulesresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 286 methods.*
1228
+ * [`RetrieveResponseResponseBody`](./src/models/errors/retrieveresponseresponsebody.ts): Response not found. Status code `404`. Applicable to 1 of 286 methods.*
1229
+ * [`CreateModerationResponseBody`](./src/models/errors/createmoderationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 286 methods.*
1230
+ * [`CreateTranscriptionResponseBody`](./src/models/errors/createtranscriptionresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 286 methods.*
1231
+ * [`CreateTranslationResponseBody`](./src/models/errors/createtranslationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 286 methods.*
1232
+ * [`KnowledgeApiError`](./src/models/errors/knowledgeapierror.ts): An error has occured. Status code `500`. Applicable to 1 of 286 methods.*
1231
1233
  * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
1232
1234
 
1233
1235
  </details>
@@ -0,0 +1,18 @@
1
+ import { OrqCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import * as components from "../models/components/index.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import { OrqError } from "../models/errors/orqerror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Preview datasource chunks
13
+ *
14
+ * @remarks
15
+ * Parses an uploaded file and returns the chunks it would produce for the given chunking options without creating a datasource.
16
+ */
17
+ export declare function knowledgePreviewChunks(client: OrqCore, request: operations.PreviewDatasourceChunksRequest, options?: RequestOptions): APIPromise<Result<components.DatasourcesServicePreviewChunksResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=knowledgePreviewChunks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledgePreviewChunks.d.ts","sourceRoot":"","sources":["../src/funcs/knowledgePreviewChunks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,uCAAuC,EAChD,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.knowledgePreviewChunks = knowledgePreviewChunks;
40
+ const encodings_js_1 = require("../lib/encodings.js");
41
+ const http_js_1 = require("../lib/http.js");
42
+ const M = __importStar(require("../lib/matchers.js"));
43
+ const primitives_js_1 = require("../lib/primitives.js");
44
+ const schemas_js_1 = require("../lib/schemas.js");
45
+ const security_js_1 = require("../lib/security.js");
46
+ const url_js_1 = require("../lib/url.js");
47
+ const components = __importStar(require("../models/components/index.js"));
48
+ const operations = __importStar(require("../models/operations/index.js"));
49
+ const async_js_1 = require("../types/async.js");
50
+ /**
51
+ * Preview datasource chunks
52
+ *
53
+ * @remarks
54
+ * Parses an uploaded file and returns the chunks it would produce for the given chunking options without creating a datasource.
55
+ */
56
+ function knowledgePreviewChunks(client, request, options) {
57
+ return new async_js_1.APIPromise($do(client, request, options));
58
+ }
59
+ async function $do(client, request, options) {
60
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.PreviewDatasourceChunksRequest$outboundSchema.parse(value), "Input validation failed");
61
+ if (!parsed.ok) {
62
+ return [parsed, { status: "invalid" }];
63
+ }
64
+ const payload = parsed.value;
65
+ const body = (0, encodings_js_1.encodeJSON)("body", payload.DatasourcesServicePreviewChunksRequest, { explode: true });
66
+ const pathParams = {
67
+ knowledge_id: (0, encodings_js_1.encodeSimple)("knowledge_id", payload.knowledge_id, {
68
+ explode: false,
69
+ charEncoding: "percent",
70
+ }),
71
+ };
72
+ const path = (0, url_js_1.pathToFunc)("/v2/knowledge/{knowledge_id}/datasources/preview-chunks")(pathParams);
73
+ const headers = new Headers((0, primitives_js_1.compactMap)({
74
+ "Content-Type": "application/json",
75
+ Accept: "application/json",
76
+ }));
77
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
78
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
79
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
80
+ const context = {
81
+ options: client._options,
82
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
83
+ operationID: "PreviewDatasourceChunks",
84
+ oAuth2Scopes: null,
85
+ resolvedSecurity: requestSecurity,
86
+ securitySource: client._options.apiKey,
87
+ retryConfig: options?.retries
88
+ || client._options.retryConfig
89
+ || { strategy: "none" },
90
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
91
+ };
92
+ const requestRes = client._createRequest(context, {
93
+ security: requestSecurity,
94
+ method: "POST",
95
+ baseURL: options?.serverURL,
96
+ path: path,
97
+ headers: headers,
98
+ body: body,
99
+ userAgent: client._options.userAgent,
100
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
101
+ }, options);
102
+ if (!requestRes.ok) {
103
+ return [requestRes, { status: "invalid" }];
104
+ }
105
+ const req = requestRes.value;
106
+ const doResult = await client._do(req, {
107
+ context,
108
+ isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
109
+ retryConfig: context.retryConfig,
110
+ retryCodes: context.retryCodes,
111
+ });
112
+ if (!doResult.ok) {
113
+ return [doResult, { status: "request-error", request: req }];
114
+ }
115
+ const response = doResult.value;
116
+ const [result] = await M.match(M.json(200, components.DatasourcesServicePreviewChunksResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
117
+ if (!result.ok) {
118
+ return [result, { status: "complete", request: req, response }];
119
+ }
120
+ return [result, { status: "complete", request: req, response }];
121
+ }
122
+ //# sourceMappingURL=knowledgePreviewChunks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledgePreviewChunks.js","sourceRoot":"","sources":["../src/funcs/knowledgePreviewChunks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,wDAsBC;AAnDD,sDAA+D;AAC/D,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAW5D,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,MAAe,EACf,OAAkD,EAClD,OAAwB;IAcxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAkD,EAClD,OAAwB;IAiBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC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CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CACJ,GAAG,EACH,UAAU,CAAC,qDAAqD,CACjE,EACD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@orq-ai/node",
5
- "version": "4.15.0-rc.8",
5
+ "version": "4.15.0-rc.9",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/lib/config.d.ts CHANGED
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "2.0";
34
- readonly sdkVersion: "4.15.0-rc.8";
34
+ readonly sdkVersion: "4.15.0-rc.9";
35
35
  readonly genVersion: "2.933.0";
36
- readonly userAgent: "speakeasy-sdk/typescript 4.15.0-rc.8 2.933.0 2.0 @orq-ai/node";
36
+ readonly userAgent: "speakeasy-sdk/typescript 4.15.0-rc.9 2.933.0 2.0 @orq-ai/node";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
28
28
  exports.SDK_METADATA = {
29
29
  language: "typescript",
30
30
  openapiDocVersion: "2.0",
31
- sdkVersion: "4.15.0-rc.8",
31
+ sdkVersion: "4.15.0-rc.9",
32
32
  genVersion: "2.933.0",
33
- userAgent: "speakeasy-sdk/typescript 4.15.0-rc.8 2.933.0 2.0 @orq-ai/node",
33
+ userAgent: "speakeasy-sdk/typescript 4.15.0-rc.9 2.933.0 2.0 @orq-ai/node",
34
34
  };
35
35
  //# sourceMappingURL=config.js.map
@@ -1,6 +1,182 @@
1
1
  import * as z from "zod/v3";
2
+ import { ClosedEnum } from "../../types/enums.js";
2
3
  /**
3
- * Provides advanced settings for customizing chunking behavior, enabling fine-grained control to better meet specific data processing needs.
4
+ * Asks a model to choose the boundaries. Slowest and most expensive, best on documents with irregular structure. Makes paid model calls.
5
+ */
6
+ export type Nine = {
7
+ type: "agentic";
8
+ /**
9
+ * Maximum number of tokens per chunk.
10
+ */
11
+ chunkSize?: number | undefined;
12
+ /**
13
+ * Model that chooses the chunk boundaries.
14
+ */
15
+ model?: string | undefined;
16
+ /**
17
+ * Size of candidate splits offered to the model.
18
+ */
19
+ candidateSize?: number | undefined;
20
+ /**
21
+ * Minimum number of characters each chunk must contain.
22
+ */
23
+ minCharactersPerChunk?: number | undefined;
24
+ /**
25
+ * Custom system prompt for the boundary model.
26
+ */
27
+ systemPrompt?: string | undefined;
28
+ };
29
+ /**
30
+ * Embeds the document before splitting it recursively, so each chunk is embedded with the surrounding document in context. Makes paid embedding calls.
31
+ */
32
+ export type Eight = {
33
+ type: "late";
34
+ /**
35
+ * Maximum number of tokens per chunk.
36
+ */
37
+ chunkSize?: number | undefined;
38
+ /**
39
+ * Separator hierarchy to split on, tried in order. Defaults to paragraph, line, space, then character.
40
+ */
41
+ separators?: Array<string> | undefined;
42
+ /**
43
+ * Minimum number of characters each chunk must contain.
44
+ */
45
+ minCharactersPerChunk?: number | undefined;
46
+ /**
47
+ * Embedding model used to embed the document before it is split.
48
+ */
49
+ embeddingModel?: string | undefined;
50
+ /**
51
+ * Number of dimensions for the embedding output, when the model supports it.
52
+ */
53
+ dimensions?: number | undefined;
54
+ };
55
+ /**
56
+ * Comparison mode.
57
+ */
58
+ export declare const ChunkingConfigurationMode: {
59
+ readonly Window: "window";
60
+ readonly Sentence: "sentence";
61
+ };
62
+ /**
63
+ * Comparison mode.
64
+ */
65
+ export type ChunkingConfigurationMode = ClosedEnum<typeof ChunkingConfigurationMode>;
66
+ /**
67
+ * Embeds the text and breaks where meaning shifts, so related passages stay together. Makes paid embedding calls.
68
+ */
69
+ export type Seven = {
70
+ type: "semantic";
71
+ /**
72
+ * Maximum number of tokens per chunk.
73
+ */
74
+ chunkSize?: number | undefined;
75
+ /**
76
+ * Embedding model used to detect semantic boundaries.
77
+ */
78
+ embeddingModel?: string | undefined;
79
+ /**
80
+ * Number of dimensions for the embedding output, when the model supports it.
81
+ */
82
+ dimensions?: number | undefined;
83
+ /**
84
+ * Similarity threshold from 0 through 1, or "auto".
85
+ */
86
+ threshold?: string | undefined;
87
+ /**
88
+ * Comparison mode.
89
+ */
90
+ mode?: ChunkingConfigurationMode | undefined;
91
+ /**
92
+ * Window size for similarity comparison.
93
+ */
94
+ similarityWindow?: number | undefined;
95
+ };
96
+ /**
97
+ * Splits on delimiters or a regular expression without tokenizing. Fastest option; chunk sizes vary with where delimiters fall.
98
+ */
99
+ export type Six = {
100
+ type: "fast";
101
+ /**
102
+ * Target chunk size in bytes.
103
+ */
104
+ targetSize?: number | undefined;
105
+ /**
106
+ * Single-byte characters to split on.
107
+ */
108
+ delimiters?: string | undefined;
109
+ /**
110
+ * Multi-byte split pattern. Takes precedence over delimiters when set.
111
+ */
112
+ pattern?: string | undefined;
113
+ /**
114
+ * Attach the delimiter to the start of the next chunk instead of the end of the previous one.
115
+ */
116
+ prefix?: boolean | undefined;
117
+ /**
118
+ * Split at the start of a run of consecutive delimiters rather than at each one.
119
+ */
120
+ consecutive?: boolean | undefined;
121
+ /**
122
+ * Search forward for a delimiter when searching backward finds none.
123
+ */
124
+ forwardFallback?: boolean | undefined;
125
+ };
126
+ /**
127
+ * Splits on a separator hierarchy, falling back through paragraph, line, sentence, and word boundaries until chunks fit. Respects document structure.
128
+ */
129
+ export type Five = {
130
+ type: "recursive";
131
+ /**
132
+ * Maximum number of tokens per chunk.
133
+ */
134
+ chunkSize?: number | undefined;
135
+ /**
136
+ * Separator hierarchy to split on, tried in order. Defaults to paragraph, line, space, then character.
137
+ */
138
+ separators?: Array<string> | undefined;
139
+ /**
140
+ * Minimum number of characters each chunk must contain.
141
+ */
142
+ minCharactersPerChunk?: number | undefined;
143
+ };
144
+ /**
145
+ * Groups whole sentences up to the chunk size, so chunks never cut a sentence in half.
146
+ */
147
+ export type Four = {
148
+ type: "sentence";
149
+ /**
150
+ * Maximum number of tokens per chunk.
151
+ */
152
+ chunkSize?: number | undefined;
153
+ /**
154
+ * Number of tokens to overlap between consecutive chunks. Helps preserve continuity across chunk boundaries.
155
+ */
156
+ chunkOverlap?: number | undefined;
157
+ /**
158
+ * Minimum number of sentences each chunk must contain.
159
+ */
160
+ minSentencesPerChunk?: number | undefined;
161
+ };
162
+ /**
163
+ * Splits text into fixed-size token windows with optional overlap. Predictable chunk sizes, no regard for sentence or paragraph boundaries.
164
+ */
165
+ export type Three = {
166
+ type: "token";
167
+ /**
168
+ * Maximum number of tokens per chunk.
169
+ */
170
+ chunkSize?: number | undefined;
171
+ /**
172
+ * Number of tokens to overlap between consecutive chunks. Helps preserve continuity across chunk boundaries.
173
+ */
174
+ chunkOverlap?: number | undefined;
175
+ };
176
+ /**
177
+ * Provides advanced settings for customizing chunking behavior, enabling fine-grained control to better meet specific data processing needs. Deprecated: use one of the named chunking strategies instead.
178
+ *
179
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
4
180
  */
5
181
  export type ChunkingConfiguration2 = {
6
182
  type: "advanced";
@@ -14,7 +190,9 @@ export type ChunkingConfiguration2 = {
14
190
  chunkOverlap?: number | undefined;
15
191
  };
16
192
  /**
17
- * Optimized chunking strategy focusing on speed and avoiding duplication of content chunks.
193
+ * Optimized chunking strategy focusing on speed and avoiding duplication of content chunks. Deprecated: use one of the named chunking strategies instead.
194
+ *
195
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
18
196
  */
19
197
  export type ChunkingConfiguration1 = {
20
198
  type: "default";
@@ -22,7 +200,88 @@ export type ChunkingConfiguration1 = {
22
200
  /**
23
201
  * The chunking configuration settings for the datasource. Defaults to the system's standard chunking configuration if not specified.
24
202
  */
25
- export type ChunkingConfiguration = ChunkingConfiguration1 | ChunkingConfiguration2;
203
+ export type ChunkingConfiguration = ChunkingConfiguration1 | ChunkingConfiguration2 | Three | Four | Five | Six | Seven | Eight | Nine;
204
+ /** @internal */
205
+ export type Nine$Outbound = {
206
+ type: "agentic";
207
+ chunk_size: number;
208
+ model: string;
209
+ candidate_size: number;
210
+ min_characters_per_chunk: number;
211
+ system_prompt?: string | undefined;
212
+ };
213
+ /** @internal */
214
+ export declare const Nine$outboundSchema: z.ZodType<Nine$Outbound, z.ZodTypeDef, Nine>;
215
+ export declare function nineToJSON(nine: Nine): string;
216
+ /** @internal */
217
+ export type Eight$Outbound = {
218
+ type: "late";
219
+ chunk_size: number;
220
+ separators?: Array<string> | undefined;
221
+ min_characters_per_chunk: number;
222
+ embedding_model?: string | undefined;
223
+ dimensions?: number | undefined;
224
+ };
225
+ /** @internal */
226
+ export declare const Eight$outboundSchema: z.ZodType<Eight$Outbound, z.ZodTypeDef, Eight>;
227
+ export declare function eightToJSON(eight: Eight): string;
228
+ /** @internal */
229
+ export declare const ChunkingConfigurationMode$outboundSchema: z.ZodNativeEnum<typeof ChunkingConfigurationMode>;
230
+ /** @internal */
231
+ export type Seven$Outbound = {
232
+ type: "semantic";
233
+ chunk_size: number;
234
+ embedding_model?: string | undefined;
235
+ dimensions?: number | undefined;
236
+ threshold: string;
237
+ mode: string;
238
+ similarity_window: number;
239
+ };
240
+ /** @internal */
241
+ export declare const Seven$outboundSchema: z.ZodType<Seven$Outbound, z.ZodTypeDef, Seven>;
242
+ export declare function sevenToJSON(seven: Seven): string;
243
+ /** @internal */
244
+ export type Six$Outbound = {
245
+ type: "fast";
246
+ target_size: number;
247
+ delimiters: string;
248
+ pattern?: string | undefined;
249
+ prefix: boolean;
250
+ consecutive: boolean;
251
+ forward_fallback: boolean;
252
+ };
253
+ /** @internal */
254
+ export declare const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six>;
255
+ export declare function sixToJSON(six: Six): string;
256
+ /** @internal */
257
+ export type Five$Outbound = {
258
+ type: "recursive";
259
+ chunk_size: number;
260
+ separators?: Array<string> | undefined;
261
+ min_characters_per_chunk: number;
262
+ };
263
+ /** @internal */
264
+ export declare const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five>;
265
+ export declare function fiveToJSON(five: Five): string;
266
+ /** @internal */
267
+ export type Four$Outbound = {
268
+ type: "sentence";
269
+ chunk_size: number;
270
+ chunk_overlap: number;
271
+ min_sentences_per_chunk: number;
272
+ };
273
+ /** @internal */
274
+ export declare const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four>;
275
+ export declare function fourToJSON(four: Four): string;
276
+ /** @internal */
277
+ export type Three$Outbound = {
278
+ type: "token";
279
+ chunk_size: number;
280
+ chunk_overlap: number;
281
+ };
282
+ /** @internal */
283
+ export declare const Three$outboundSchema: z.ZodType<Three$Outbound, z.ZodTypeDef, Three>;
284
+ export declare function threeToJSON(three: Three): string;
26
285
  /** @internal */
27
286
  export type ChunkingConfiguration2$Outbound = {
28
287
  type: "advanced";
@@ -40,7 +299,7 @@ export type ChunkingConfiguration1$Outbound = {
40
299
  export declare const ChunkingConfiguration1$outboundSchema: z.ZodType<ChunkingConfiguration1$Outbound, z.ZodTypeDef, ChunkingConfiguration1>;
41
300
  export declare function chunkingConfiguration1ToJSON(chunkingConfiguration1: ChunkingConfiguration1): string;
42
301
  /** @internal */
43
- export type ChunkingConfiguration$Outbound = ChunkingConfiguration1$Outbound | ChunkingConfiguration2$Outbound;
302
+ export type ChunkingConfiguration$Outbound = ChunkingConfiguration1$Outbound | ChunkingConfiguration2$Outbound | Three$Outbound | Four$Outbound | Five$Outbound | Six$Outbound | Seven$Outbound | Eight$Outbound | Nine$Outbound;
44
303
  /** @internal */
45
304
  export declare const ChunkingConfiguration$outboundSchema: z.ZodType<ChunkingConfiguration$Outbound, z.ZodTypeDef, ChunkingConfiguration>;
46
305
  export declare function chunkingConfigurationToJSON(chunkingConfiguration: ChunkingConfiguration): string;
@@ -1 +1 @@
1
- {"version":3,"file":"chunkingconfiguration.d.ts","sourceRoot":"","sources":["../../src/models/components/chunkingconfiguration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,sBAAsB,GACtB,sBAAsB,CAAC;AAE3B,gBAAgB;AAChB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,UAAU,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,C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