@sap-ai-sdk/document-grounding 1.4.1-20241213113708.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 (229) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +119 -0
  3. package/dist/client/api/collections-api.d.ts +67 -0
  4. package/dist/client/api/collections-api.d.ts.map +1 -0
  5. package/dist/client/api/collections-api.js +73 -0
  6. package/dist/client/api/collections-api.js.map +1 -0
  7. package/dist/client/api/documents-api.d.ts +63 -0
  8. package/dist/client/api/documents-api.d.ts.map +1 -0
  9. package/dist/client/api/documents-api.js +71 -0
  10. package/dist/client/api/documents-api.js.map +1 -0
  11. package/dist/client/api/index.d.ts +8 -0
  12. package/dist/client/api/index.d.ts.map +1 -0
  13. package/dist/client/api/index.js +13 -0
  14. package/dist/client/api/index.js.map +1 -0
  15. package/dist/client/api/pipelines-api.d.ts +58 -0
  16. package/dist/client/api/pipelines-api.d.ts.map +1 -0
  17. package/dist/client/api/pipelines-api.js +63 -0
  18. package/dist/client/api/pipelines-api.js.map +1 -0
  19. package/dist/client/api/retrieval-data-repository-api.d.ts +31 -0
  20. package/dist/client/api/retrieval-data-repository-api.d.ts.map +1 -0
  21. package/dist/client/api/retrieval-data-repository-api.js +33 -0
  22. package/dist/client/api/retrieval-data-repository-api.js.map +1 -0
  23. package/dist/client/api/retrieval-federated-search-across-data-repositories-api.d.ts +18 -0
  24. package/dist/client/api/retrieval-federated-search-across-data-repositories-api.d.ts.map +1 -0
  25. package/dist/client/api/retrieval-federated-search-across-data-repositories-api.js +23 -0
  26. package/dist/client/api/retrieval-federated-search-across-data-repositories-api.js.map +1 -0
  27. package/dist/client/api/schema/api-error.d.ts +24 -0
  28. package/dist/client/api/schema/api-error.d.ts.map +1 -0
  29. package/dist/client/api/schema/api-error.js +2 -0
  30. package/dist/client/api/schema/api-error.js.map +1 -0
  31. package/dist/client/api/schema/base-document.d.ts +10 -0
  32. package/dist/client/api/schema/base-document.d.ts.map +1 -0
  33. package/dist/client/api/schema/base-document.js +2 -0
  34. package/dist/client/api/schema/base-document.js.map +1 -0
  35. package/dist/client/api/schema/chunk.d.ts +13 -0
  36. package/dist/client/api/schema/chunk.d.ts.map +1 -0
  37. package/dist/client/api/schema/chunk.js +2 -0
  38. package/dist/client/api/schema/chunk.js.map +1 -0
  39. package/dist/client/api/schema/collection-created-response.d.ts +8 -0
  40. package/dist/client/api/schema/collection-created-response.d.ts.map +1 -0
  41. package/dist/client/api/schema/collection-created-response.js +7 -0
  42. package/dist/client/api/schema/collection-created-response.js.map +1 -0
  43. package/dist/client/api/schema/collection-deleted-response.d.ts +8 -0
  44. package/dist/client/api/schema/collection-deleted-response.d.ts.map +1 -0
  45. package/dist/client/api/schema/collection-deleted-response.js +7 -0
  46. package/dist/client/api/schema/collection-deleted-response.js.map +1 -0
  47. package/dist/client/api/schema/collection-pending-response.d.ts +11 -0
  48. package/dist/client/api/schema/collection-pending-response.d.ts.map +1 -0
  49. package/dist/client/api/schema/collection-pending-response.js +7 -0
  50. package/dist/client/api/schema/collection-pending-response.js.map +1 -0
  51. package/dist/client/api/schema/collection-request.d.ts +15 -0
  52. package/dist/client/api/schema/collection-request.d.ts.map +1 -0
  53. package/dist/client/api/schema/collection-request.js +2 -0
  54. package/dist/client/api/schema/collection-request.js.map +1 -0
  55. package/dist/client/api/schema/collection.d.ts +20 -0
  56. package/dist/client/api/schema/collection.d.ts.map +1 -0
  57. package/dist/client/api/schema/collection.js +2 -0
  58. package/dist/client/api/schema/collection.js.map +1 -0
  59. package/dist/client/api/schema/collections-list-response.d.ts +9 -0
  60. package/dist/client/api/schema/collections-list-response.d.ts.map +1 -0
  61. package/dist/client/api/schema/collections-list-response.js +2 -0
  62. package/dist/client/api/schema/collections-list-response.js.map +1 -0
  63. package/dist/client/api/schema/data-repositories.d.ts +9 -0
  64. package/dist/client/api/schema/data-repositories.d.ts.map +1 -0
  65. package/dist/client/api/schema/data-repositories.js +2 -0
  66. package/dist/client/api/schema/data-repositories.js.map +1 -0
  67. package/dist/client/api/schema/data-repository-type.d.ts +5 -0
  68. package/dist/client/api/schema/data-repository-type.d.ts.map +1 -0
  69. package/dist/client/api/schema/data-repository-type.js +7 -0
  70. package/dist/client/api/schema/data-repository-type.js.map +1 -0
  71. package/dist/client/api/schema/data-repository-with-documents.d.ts +19 -0
  72. package/dist/client/api/schema/data-repository-with-documents.d.ts.map +1 -0
  73. package/dist/client/api/schema/data-repository-with-documents.js +2 -0
  74. package/dist/client/api/schema/data-repository-with-documents.js.map +1 -0
  75. package/dist/client/api/schema/data-repository.d.ts +20 -0
  76. package/dist/client/api/schema/data-repository.d.ts.map +1 -0
  77. package/dist/client/api/schema/data-repository.js +2 -0
  78. package/dist/client/api/schema/data-repository.js.map +1 -0
  79. package/dist/client/api/schema/details-error-response.d.ts +14 -0
  80. package/dist/client/api/schema/details-error-response.d.ts.map +1 -0
  81. package/dist/client/api/schema/details-error-response.js +7 -0
  82. package/dist/client/api/schema/details-error-response.js.map +1 -0
  83. package/dist/client/api/schema/document-create-request.d.ts +8 -0
  84. package/dist/client/api/schema/document-create-request.d.ts.map +1 -0
  85. package/dist/client/api/schema/document-create-request.js +2 -0
  86. package/dist/client/api/schema/document-create-request.js.map +1 -0
  87. package/dist/client/api/schema/document-input.d.ts +15 -0
  88. package/dist/client/api/schema/document-input.d.ts.map +1 -0
  89. package/dist/client/api/schema/document-input.js +2 -0
  90. package/dist/client/api/schema/document-input.js.map +1 -0
  91. package/dist/client/api/schema/document-key-value-list-pair.d.ts +16 -0
  92. package/dist/client/api/schema/document-key-value-list-pair.d.ts.map +1 -0
  93. package/dist/client/api/schema/document-key-value-list-pair.js +7 -0
  94. package/dist/client/api/schema/document-key-value-list-pair.js.map +1 -0
  95. package/dist/client/api/schema/document-output.d.ts +17 -0
  96. package/dist/client/api/schema/document-output.d.ts.map +1 -0
  97. package/dist/client/api/schema/document-output.js +2 -0
  98. package/dist/client/api/schema/document-output.js.map +1 -0
  99. package/dist/client/api/schema/document-response.d.ts +15 -0
  100. package/dist/client/api/schema/document-response.d.ts.map +1 -0
  101. package/dist/client/api/schema/document-response.js +2 -0
  102. package/dist/client/api/schema/document-response.js.map +1 -0
  103. package/dist/client/api/schema/document-update-request.d.ts +8 -0
  104. package/dist/client/api/schema/document-update-request.d.ts.map +1 -0
  105. package/dist/client/api/schema/document-update-request.js +2 -0
  106. package/dist/client/api/schema/document-update-request.js.map +1 -0
  107. package/dist/client/api/schema/document-without-chunks.d.ts +13 -0
  108. package/dist/client/api/schema/document-without-chunks.d.ts.map +1 -0
  109. package/dist/client/api/schema/document-without-chunks.js +2 -0
  110. package/dist/client/api/schema/document-without-chunks.js.map +1 -0
  111. package/dist/client/api/schema/documents-chunk.d.ts +18 -0
  112. package/dist/client/api/schema/documents-chunk.d.ts.map +1 -0
  113. package/dist/client/api/schema/documents-chunk.js +2 -0
  114. package/dist/client/api/schema/documents-chunk.js.map +1 -0
  115. package/dist/client/api/schema/documents-list-response.d.ts +8 -0
  116. package/dist/client/api/schema/documents-list-response.d.ts.map +1 -0
  117. package/dist/client/api/schema/documents-list-response.js +2 -0
  118. package/dist/client/api/schema/documents-list-response.js.map +1 -0
  119. package/dist/client/api/schema/documents.d.ts +9 -0
  120. package/dist/client/api/schema/documents.d.ts.map +1 -0
  121. package/dist/client/api/schema/documents.js +2 -0
  122. package/dist/client/api/schema/documents.js.map +1 -0
  123. package/dist/client/api/schema/embedding-config.d.ts +11 -0
  124. package/dist/client/api/schema/embedding-config.d.ts.map +1 -0
  125. package/dist/client/api/schema/embedding-config.js +7 -0
  126. package/dist/client/api/schema/embedding-config.js.map +1 -0
  127. package/dist/client/api/schema/index.d.ts +47 -0
  128. package/dist/client/api/schema/index.d.ts.map +1 -0
  129. package/dist/client/api/schema/index.js +52 -0
  130. package/dist/client/api/schema/index.js.map +1 -0
  131. package/dist/client/api/schema/key-value-list-pair.d.ts +11 -0
  132. package/dist/client/api/schema/key-value-list-pair.d.ts.map +1 -0
  133. package/dist/client/api/schema/key-value-list-pair.js +7 -0
  134. package/dist/client/api/schema/key-value-list-pair.js.map +1 -0
  135. package/dist/client/api/schema/per-filter-search-result.d.ts +9 -0
  136. package/dist/client/api/schema/per-filter-search-result.d.ts.map +1 -0
  137. package/dist/client/api/schema/per-filter-search-result.js +2 -0
  138. package/dist/client/api/schema/per-filter-search-result.js.map +1 -0
  139. package/dist/client/api/schema/pipeline-id.d.ts +10 -0
  140. package/dist/client/api/schema/pipeline-id.d.ts.map +1 -0
  141. package/dist/client/api/schema/pipeline-id.js +7 -0
  142. package/dist/client/api/schema/pipeline-id.js.map +1 -0
  143. package/dist/client/api/schema/pipeline-post-requst.d.ts +31 -0
  144. package/dist/client/api/schema/pipeline-post-requst.d.ts.map +1 -0
  145. package/dist/client/api/schema/pipeline-post-requst.js +7 -0
  146. package/dist/client/api/schema/pipeline-post-requst.js.map +1 -0
  147. package/dist/client/api/schema/pipeline-status.d.ts +11 -0
  148. package/dist/client/api/schema/pipeline-status.d.ts.map +1 -0
  149. package/dist/client/api/schema/pipeline-status.js +7 -0
  150. package/dist/client/api/schema/pipeline-status.js.map +1 -0
  151. package/dist/client/api/schema/pipeline.d.ts +39 -0
  152. package/dist/client/api/schema/pipeline.d.ts.map +1 -0
  153. package/dist/client/api/schema/pipeline.js +7 -0
  154. package/dist/client/api/schema/pipeline.js.map +1 -0
  155. package/dist/client/api/schema/pipelines.d.ts +9 -0
  156. package/dist/client/api/schema/pipelines.d.ts.map +1 -0
  157. package/dist/client/api/schema/pipelines.js +2 -0
  158. package/dist/client/api/schema/pipelines.js.map +1 -0
  159. package/dist/client/api/schema/retieval-data-repository-search-result.d.ts +8 -0
  160. package/dist/client/api/schema/retieval-data-repository-search-result.d.ts.map +1 -0
  161. package/dist/client/api/schema/retieval-data-repository-search-result.js +2 -0
  162. package/dist/client/api/schema/retieval-data-repository-search-result.js.map +1 -0
  163. package/dist/client/api/schema/retieval-per-filter-search-result-with-error.d.ts +7 -0
  164. package/dist/client/api/schema/retieval-per-filter-search-result-with-error.d.ts.map +1 -0
  165. package/dist/client/api/schema/retieval-per-filter-search-result-with-error.js +7 -0
  166. package/dist/client/api/schema/retieval-per-filter-search-result-with-error.js.map +1 -0
  167. package/dist/client/api/schema/retieval-per-filter-search-result.d.ts +13 -0
  168. package/dist/client/api/schema/retieval-per-filter-search-result.d.ts.map +1 -0
  169. package/dist/client/api/schema/retieval-per-filter-search-result.js +2 -0
  170. package/dist/client/api/schema/retieval-per-filter-search-result.js.map +1 -0
  171. package/dist/client/api/schema/retieval-search-results.d.ts +12 -0
  172. package/dist/client/api/schema/retieval-search-results.d.ts.map +1 -0
  173. package/dist/client/api/schema/retieval-search-results.js +2 -0
  174. package/dist/client/api/schema/retieval-search-results.js.map +1 -0
  175. package/dist/client/api/schema/retrieval-document.d.ts +14 -0
  176. package/dist/client/api/schema/retrieval-document.d.ts.map +1 -0
  177. package/dist/client/api/schema/retrieval-document.js +2 -0
  178. package/dist/client/api/schema/retrieval-document.js.map +1 -0
  179. package/dist/client/api/schema/retrieval-search-filter.d.ts +38 -0
  180. package/dist/client/api/schema/retrieval-search-filter.d.ts.map +1 -0
  181. package/dist/client/api/schema/retrieval-search-filter.js +2 -0
  182. package/dist/client/api/schema/retrieval-search-filter.js.map +1 -0
  183. package/dist/client/api/schema/retrieval-search-input.d.ts +13 -0
  184. package/dist/client/api/schema/retrieval-search-input.d.ts.map +1 -0
  185. package/dist/client/api/schema/retrieval-search-input.js +2 -0
  186. package/dist/client/api/schema/retrieval-search-input.js.map +1 -0
  187. package/dist/client/api/schema/search-configuration.d.ts +14 -0
  188. package/dist/client/api/schema/search-configuration.d.ts.map +1 -0
  189. package/dist/client/api/schema/search-configuration.js +7 -0
  190. package/dist/client/api/schema/search-configuration.js.map +1 -0
  191. package/dist/client/api/schema/search-document-key-value-list-pair.d.ts +16 -0
  192. package/dist/client/api/schema/search-document-key-value-list-pair.d.ts.map +1 -0
  193. package/dist/client/api/schema/search-document-key-value-list-pair.js +2 -0
  194. package/dist/client/api/schema/search-document-key-value-list-pair.js.map +1 -0
  195. package/dist/client/api/schema/search-filter.d.ts +33 -0
  196. package/dist/client/api/schema/search-filter.d.ts.map +1 -0
  197. package/dist/client/api/schema/search-filter.js +2 -0
  198. package/dist/client/api/schema/search-filter.js.map +1 -0
  199. package/dist/client/api/schema/search-results.d.ts +11 -0
  200. package/dist/client/api/schema/search-results.d.ts.map +1 -0
  201. package/dist/client/api/schema/search-results.js +2 -0
  202. package/dist/client/api/schema/search-results.js.map +1 -0
  203. package/dist/client/api/schema/search-select-option-enum.d.ts +6 -0
  204. package/dist/client/api/schema/search-select-option-enum.d.ts.map +1 -0
  205. package/dist/client/api/schema/search-select-option-enum.js +7 -0
  206. package/dist/client/api/schema/search-select-option-enum.js.map +1 -0
  207. package/dist/client/api/schema/text-only-base-chunk.d.ts +9 -0
  208. package/dist/client/api/schema/text-only-base-chunk.d.ts.map +1 -0
  209. package/dist/client/api/schema/text-only-base-chunk.js +2 -0
  210. package/dist/client/api/schema/text-only-base-chunk.js.map +1 -0
  211. package/dist/client/api/schema/text-search-request.d.ts +14 -0
  212. package/dist/client/api/schema/text-search-request.d.ts.map +1 -0
  213. package/dist/client/api/schema/text-search-request.js +2 -0
  214. package/dist/client/api/schema/text-search-request.js.map +1 -0
  215. package/dist/client/api/search-api.d.ts +18 -0
  216. package/dist/client/api/search-api.d.ts.map +1 -0
  217. package/dist/client/api/search-api.js +23 -0
  218. package/dist/client/api/search-api.js.map +1 -0
  219. package/dist/index.d.ts +2 -0
  220. package/dist/index.d.ts.map +1 -0
  221. package/dist/index.js +2 -0
  222. package/dist/index.js.map +1 -0
  223. package/dist/internal.d.ts +2 -0
  224. package/dist/internal.d.ts.map +1 -0
  225. package/dist/internal.js +2 -0
  226. package/dist/internal.js.map +1 -0
  227. package/internal.d.ts +3 -0
  228. package/internal.js +2 -0
  229. package/package.json +34 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # @sap-ai-sdk/document-grounding
2
+
3
+ > [!warning]
4
+ > This package is still in **beta** and is subject to breaking changes. Use it with caution.
5
+
6
+ SAP Cloud SDK for AI is the official Software Development Kit (SDK) for **SAP AI Core**, **SAP Generative AI Hub**, and **Orchestration Service**.
7
+
8
+ This package incorporates generative AI document grounding capabilities into your AI activities in SAP AI Core and SAP AI Launchpad.
9
+
10
+ ### Table of Contents
11
+
12
+ - [Installation](#installation)
13
+ - [Prerequisites](#prerequisites)
14
+ - [Usage](#usage)
15
+ - [Create a Collection](#create-a-collection)
16
+ - [Create a Document](#create-a-document)
17
+ - [Custom Destination](#custom-destination)
18
+ - [Local Testing](#local-testing)
19
+ - [Support, Feedback, Contribution](#support-feedback-contribution)
20
+ - [License](#license)
21
+
22
+ ## Installation
23
+
24
+ ```
25
+ $ npm install @sap-ai-sdk/document-grounding
26
+ ```
27
+
28
+ ## Prerequisites
29
+
30
+ - [Enable the AI Core service in SAP BTP](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup).
31
+ - Configure the project with **Node.js v20 or higher** and **native ESM** support.
32
+
33
+ > **Accessing the AI Core Service via the SDK**
34
+ >
35
+ > The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication.
36
+ >
37
+ > - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable.
38
+ > - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes).
39
+
40
+ ## Usage
41
+
42
+ The examples below demonstrate the usage of the most commonly used APIs in SAP AI Core document grounding service.
43
+ In addition to the examples below, you can find more **sample code** [here](https://github.com/SAP/ai-sdk-js/blob/main/sample-code/src/document-grounding.ts).
44
+
45
+ ### Create a Collection
46
+
47
+ ```ts
48
+ import
49
+ const response =
50
+ await CollectionsApi.vectorV1VectorEndpointsCreateCollection(
51
+ {
52
+ title: 'ai-sdk-js-e2e',
53
+ embeddingConfig: {
54
+ modelName: 'text-embedding-ada-002-v2'
55
+ },
56
+ metadata: []
57
+ },
58
+ {
59
+ 'AI-Resource-Group': 'default'
60
+ }
61
+ ).executeRaw();
62
+
63
+ const collectionId = (response.headers.location as string).split('/').at(-2);
64
+ ```
65
+
66
+ ### Create a Document
67
+
68
+ ```ts
69
+ const response: DocumentsListResponse =
70
+ await DocumentsApi.vectorV1VectorEndpointsCreateDocuments(
71
+ collectionId,
72
+ {
73
+ documents: [
74
+ {
75
+ metadata: [],
76
+ chunks: [
77
+ {
78
+ content:
79
+ 'SAP Cloud SDK for AI is the official Software Development Kit (SDK) for SAP AI Core, SAP Generative AI Hub, and Orchestration Service.',
80
+ metadata: []
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ 'AI-Resource-Group': 'default'
88
+ }
89
+ ).execute();
90
+ ```
91
+
92
+ ### Custom Destination
93
+
94
+ When calling the `execute()` method, it is possible to provide a custom destination.
95
+ For example, when querying deployments targeting a destination with the name `my-destination`, the following code can be used:
96
+
97
+ ```ts
98
+ const response = await CollectionsApi.vectorV1VectorEndpointsDeleteCollection(
99
+ collectionId,
100
+ {
101
+ 'AI-Resource-Group': 'default'
102
+ }
103
+ ).execute({
104
+ destinationName: 'my-destination'
105
+ });
106
+ ```
107
+
108
+ ## Local Testing
109
+
110
+ For local testing instructions, refer to this [section](https://github.com/SAP/ai-sdk-js/blob/main/README.md#local-testing).
111
+
112
+ ## Support, Feedback, Contribution
113
+
114
+ Contribution and feedback are encouraged and always welcome.
115
+ For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](https://github.com/SAP/ai-sdk-js/blob/main/CONTRIBUTING.md).
116
+
117
+ ## License
118
+
119
+ The SAP Cloud SDK for AI is released under the [Apache License Version 2.0](http://www.apache.org/licenses/).
@@ -0,0 +1,67 @@
1
+ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
2
+ import type { CollectionsListResponse, CollectionRequest, Collection, CollectionCreatedResponse, CollectionPendingResponse, CollectionDeletedResponse } from './schema/index.js';
3
+ /**
4
+ * Representation of the 'CollectionsApi'.
5
+ * This API is part of the 'api' service.
6
+ */
7
+ export declare const CollectionsApi: {
8
+ /**
9
+ * Gets a list of collections.
10
+ * @param queryParameters - Object containing the following keys: $top, $skip, $count.
11
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
12
+ * @returns The request builder, use the `execute()` method to trigger the request.
13
+ */
14
+ vectorV1VectorEndpointsGetAllCollections: (queryParameters: {
15
+ $top?: number;
16
+ $skip?: number;
17
+ $count?: boolean;
18
+ }, headerParameters: {
19
+ "AI-Resource-Group": string;
20
+ }) => OpenApiRequestBuilder<CollectionsListResponse>;
21
+ /**
22
+ * Creates a collection. This operation is asynchronous. Poll the collection resource and check the status field to understand creation status.
23
+ * @param body - Request body.
24
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
25
+ * @returns The request builder, use the `execute()` method to trigger the request.
26
+ */
27
+ vectorV1VectorEndpointsCreateCollection: (body: CollectionRequest, headerParameters: {
28
+ "AI-Resource-Group": string;
29
+ }) => OpenApiRequestBuilder<any>;
30
+ /**
31
+ * Gets a specific collection by ID.
32
+ * @param collectionId - Path parameter.
33
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
34
+ * @returns The request builder, use the `execute()` method to trigger the request.
35
+ */
36
+ vectorV1VectorEndpointsGetCollectionById: (collectionId: string, headerParameters: {
37
+ "AI-Resource-Group": string;
38
+ }) => OpenApiRequestBuilder<Collection>;
39
+ /**
40
+ * Deletes a specific collection by ID. This operation is asynchronous. Poll the collection for a 404 status code.
41
+ * @param collectionId - Path parameter.
42
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
43
+ * @returns The request builder, use the `execute()` method to trigger the request.
44
+ */
45
+ vectorV1VectorEndpointsDeleteCollection: (collectionId: string, headerParameters: {
46
+ "AI-Resource-Group": string;
47
+ }) => OpenApiRequestBuilder<any>;
48
+ /**
49
+ * Gets a specific collection status from monitor by ID.
50
+ * @param id - Path parameter.
51
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
52
+ * @returns The request builder, use the `execute()` method to trigger the request.
53
+ */
54
+ vectorV1VectorEndpointsGetCollectionCreationStatus: (id: string, headerParameters: {
55
+ "AI-Resource-Group": string;
56
+ }) => OpenApiRequestBuilder<CollectionCreatedResponse | CollectionPendingResponse>;
57
+ /**
58
+ * Gets a specific collection status from monitor by ID.
59
+ * @param id - Path parameter.
60
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
61
+ * @returns The request builder, use the `execute()` method to trigger the request.
62
+ */
63
+ vectorV1VectorEndpointsGetCollectionDeletionStatus: (id: string, headerParameters: {
64
+ "AI-Resource-Group": string;
65
+ }) => OpenApiRequestBuilder<CollectionPendingResponse | CollectionDeletedResponse>;
66
+ };
67
+ //# sourceMappingURL=collections-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/collections-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;OAKG;gEAEgB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;OAKG;oDAEK,iBAAiB,oBACL;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;OAKG;6DAEa,MAAM,oBACF;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;OAKG;4DAEa,MAAM,oBACF;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;OAKG;6DAEG,MAAM,oBACQ;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAQnD;;;;;OAKG;6DAEG,MAAM,oBACQ;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;CAQpD,CAAC"}
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
3
+ *
4
+ * This is a generated file powered by the SAP Cloud SDK for JavaScript.
5
+ */
6
+ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
7
+ /**
8
+ * Representation of the 'CollectionsApi'.
9
+ * This API is part of the 'api' service.
10
+ */
11
+ export const CollectionsApi = {
12
+ /**
13
+ * Gets a list of collections.
14
+ * @param queryParameters - Object containing the following keys: $top, $skip, $count.
15
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
16
+ * @returns The request builder, use the `execute()` method to trigger the request.
17
+ */
18
+ vectorV1VectorEndpointsGetAllCollections: (queryParameters, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections', {
19
+ queryParameters,
20
+ headerParameters
21
+ }),
22
+ /**
23
+ * Creates a collection. This operation is asynchronous. Poll the collection resource and check the status field to understand creation status.
24
+ * @param body - Request body.
25
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
26
+ * @returns The request builder, use the `execute()` method to trigger the request.
27
+ */
28
+ vectorV1VectorEndpointsCreateCollection: (body, headerParameters) => new OpenApiRequestBuilder('post', '/lm/document-grounding/vector/collections', {
29
+ body,
30
+ headerParameters
31
+ }),
32
+ /**
33
+ * Gets a specific collection by ID.
34
+ * @param collectionId - Path parameter.
35
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
36
+ * @returns The request builder, use the `execute()` method to trigger the request.
37
+ */
38
+ vectorV1VectorEndpointsGetCollectionById: (collectionId, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections/{collectionId}', {
39
+ pathParameters: { collectionId },
40
+ headerParameters
41
+ }),
42
+ /**
43
+ * Deletes a specific collection by ID. This operation is asynchronous. Poll the collection for a 404 status code.
44
+ * @param collectionId - Path parameter.
45
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
46
+ * @returns The request builder, use the `execute()` method to trigger the request.
47
+ */
48
+ vectorV1VectorEndpointsDeleteCollection: (collectionId, headerParameters) => new OpenApiRequestBuilder('delete', '/lm/document-grounding/vector/collections/{collectionId}', {
49
+ pathParameters: { collectionId },
50
+ headerParameters
51
+ }),
52
+ /**
53
+ * Gets a specific collection status from monitor by ID.
54
+ * @param id - Path parameter.
55
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
56
+ * @returns The request builder, use the `execute()` method to trigger the request.
57
+ */
58
+ vectorV1VectorEndpointsGetCollectionCreationStatus: (id, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections/{id}/creationStatus', {
59
+ pathParameters: { id },
60
+ headerParameters
61
+ }),
62
+ /**
63
+ * Gets a specific collection status from monitor by ID.
64
+ * @param id - Path parameter.
65
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
66
+ * @returns The request builder, use the `execute()` method to trigger the request.
67
+ */
68
+ vectorV1VectorEndpointsGetCollectionDeletionStatus: (id, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections/{id}/deletionStatus', {
69
+ pathParameters: { id },
70
+ headerParameters
71
+ })
72
+ };
73
+ //# sourceMappingURL=collections-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections-api.js","sourceRoot":"","sources":["../../../src/client/api/collections-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AASzD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B;;;;;OAKG;IACH,wCAAwC,EAAE,CACxC,eAAoE,EACpE,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,2CAA2C,EAC3C;QACE,eAAe;QACf,gBAAgB;KACjB,CACF;IACH;;;;;OAKG;IACH,uCAAuC,EAAE,CACvC,IAAuB,EACvB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,MAAM,EACN,2CAA2C,EAC3C;QACE,IAAI;QACJ,gBAAgB;KACjB,CACF;IACH;;;;;OAKG;IACH,wCAAwC,EAAE,CACxC,YAAoB,EACpB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,0DAA0D,EAC1D;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,gBAAgB;KACjB,CACF;IACH;;;;;OAKG;IACH,uCAAuC,EAAE,CACvC,YAAoB,EACpB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,QAAQ,EACR,0DAA0D,EAC1D;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,gBAAgB;KACjB,CACF;IACH;;;;;OAKG;IACH,kDAAkD,EAAE,CAClD,EAAU,EACV,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CAEvB,KAAK,EAAE,+DAA+D,EAAE;QACxE,cAAc,EAAE,EAAE,EAAE,EAAE;QACtB,gBAAgB;KACjB,CAAC;IACJ;;;;;OAKG;IACH,kDAAkD,EAAE,CAClD,EAAU,EACV,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CAEvB,KAAK,EAAE,+DAA+D,EAAE;QACxE,cAAc,EAAE,EAAE,EAAE,EAAE;QACtB,gBAAgB;KACjB,CAAC;CACL,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
2
+ import type { DocumentResponse, Documents, DocumentCreateRequest, DocumentsListResponse, DocumentUpdateRequest } from './schema/index.js';
3
+ /**
4
+ * Representation of the 'DocumentsApi'.
5
+ * This API is part of the 'api' service.
6
+ */
7
+ export declare const DocumentsApi: {
8
+ /**
9
+ * Gets a specific document in a collection by ID.
10
+ * @param collectionId - Path parameter.
11
+ * @param documentId - Path parameter.
12
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
13
+ * @returns The request builder, use the `execute()` method to trigger the request.
14
+ */
15
+ vectorV1VectorEndpointsGetDocumentById: (collectionId: string, documentId: string, headerParameters: {
16
+ "AI-Resource-Group": string;
17
+ }) => OpenApiRequestBuilder<DocumentResponse>;
18
+ /**
19
+ * Deletes a specific document of a collection.
20
+ * @param collectionId - Path parameter.
21
+ * @param documentId - Path parameter.
22
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
23
+ * @returns The request builder, use the `execute()` method to trigger the request.
24
+ */
25
+ vectorV1VectorEndpointsDeleteDocument: (collectionId: string, documentId: string, headerParameters: {
26
+ "AI-Resource-Group": string;
27
+ }) => OpenApiRequestBuilder<any>;
28
+ /**
29
+ * Gets a list of documents of a collection.
30
+ * @param collectionId - Path parameter.
31
+ * @param queryParameters - Object containing the following keys: $top, $skip, $count.
32
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
33
+ * @returns The request builder, use the `execute()` method to trigger the request.
34
+ */
35
+ vectorV1VectorEndpointsGetAllDocuments: (collectionId: string, queryParameters: {
36
+ $top?: number;
37
+ $skip?: number;
38
+ $count?: boolean;
39
+ }, headerParameters: {
40
+ "AI-Resource-Group": string;
41
+ }) => OpenApiRequestBuilder<Documents>;
42
+ /**
43
+ * Create and stores one or multiple documents into a collection. If omitted, 'id' will be auto-generated.
44
+ * @param collectionId - Path parameter.
45
+ * @param body - Request body.
46
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
47
+ * @returns The request builder, use the `execute()` method to trigger the request.
48
+ */
49
+ vectorV1VectorEndpointsCreateDocuments: (collectionId: string, body: DocumentCreateRequest, headerParameters: {
50
+ "AI-Resource-Group": string;
51
+ }) => OpenApiRequestBuilder<DocumentsListResponse>;
52
+ /**
53
+ * Upserts the data of multiple documents into a collection.
54
+ * @param collectionId - Path parameter.
55
+ * @param body - Request body.
56
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
57
+ * @returns The request builder, use the `execute()` method to trigger the request.
58
+ */
59
+ vectorV1VectorEndpointsUpdateDocuments: (collectionId: string, body: DocumentUpdateRequest, headerParameters: {
60
+ "AI-Resource-Group": string;
61
+ }) => OpenApiRequestBuilder<DocumentsListResponse>;
62
+ };
63
+ //# sourceMappingURL=documents-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/documents-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB;;;;;;OAMG;2DAEa,MAAM,cACR,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;;OAMG;0DAEa,MAAM,cACR,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAUnD;;;;;;OAMG;2DAEa,MAAM,mBACH;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;;OAMG;2DAEa,MAAM,QACd,qBAAqB,oBACT;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;;OAMG;2DAEa,MAAM,QACd,qBAAqB,oBACT;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;CAWpD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
3
+ *
4
+ * This is a generated file powered by the SAP Cloud SDK for JavaScript.
5
+ */
6
+ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
7
+ /**
8
+ * Representation of the 'DocumentsApi'.
9
+ * This API is part of the 'api' service.
10
+ */
11
+ export const DocumentsApi = {
12
+ /**
13
+ * Gets a specific document in a collection by ID.
14
+ * @param collectionId - Path parameter.
15
+ * @param documentId - Path parameter.
16
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
17
+ * @returns The request builder, use the `execute()` method to trigger the request.
18
+ */
19
+ vectorV1VectorEndpointsGetDocumentById: (collectionId, documentId, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections/{collectionId}/documents/{documentId}', {
20
+ pathParameters: { collectionId, documentId },
21
+ headerParameters
22
+ }),
23
+ /**
24
+ * Deletes a specific document of a collection.
25
+ * @param collectionId - Path parameter.
26
+ * @param documentId - Path parameter.
27
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
28
+ * @returns The request builder, use the `execute()` method to trigger the request.
29
+ */
30
+ vectorV1VectorEndpointsDeleteDocument: (collectionId, documentId, headerParameters) => new OpenApiRequestBuilder('delete', '/lm/document-grounding/vector/collections/{collectionId}/documents/{documentId}', {
31
+ pathParameters: { collectionId, documentId },
32
+ headerParameters
33
+ }),
34
+ /**
35
+ * Gets a list of documents of a collection.
36
+ * @param collectionId - Path parameter.
37
+ * @param queryParameters - Object containing the following keys: $top, $skip, $count.
38
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
39
+ * @returns The request builder, use the `execute()` method to trigger the request.
40
+ */
41
+ vectorV1VectorEndpointsGetAllDocuments: (collectionId, queryParameters, headerParameters) => new OpenApiRequestBuilder('get', '/lm/document-grounding/vector/collections/{collectionId}/documents', {
42
+ pathParameters: { collectionId },
43
+ queryParameters,
44
+ headerParameters
45
+ }),
46
+ /**
47
+ * Create and stores one or multiple documents into a collection. If omitted, 'id' will be auto-generated.
48
+ * @param collectionId - Path parameter.
49
+ * @param body - Request body.
50
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
51
+ * @returns The request builder, use the `execute()` method to trigger the request.
52
+ */
53
+ vectorV1VectorEndpointsCreateDocuments: (collectionId, body, headerParameters) => new OpenApiRequestBuilder('post', '/lm/document-grounding/vector/collections/{collectionId}/documents', {
54
+ pathParameters: { collectionId },
55
+ body,
56
+ headerParameters
57
+ }),
58
+ /**
59
+ * Upserts the data of multiple documents into a collection.
60
+ * @param collectionId - Path parameter.
61
+ * @param body - Request body.
62
+ * @param headerParameters - Object containing the following keys: AI-Resource-Group.
63
+ * @returns The request builder, use the `execute()` method to trigger the request.
64
+ */
65
+ vectorV1VectorEndpointsUpdateDocuments: (collectionId, body, headerParameters) => new OpenApiRequestBuilder('patch', '/lm/document-grounding/vector/collections/{collectionId}/documents', {
66
+ pathParameters: { collectionId },
67
+ body,
68
+ headerParameters
69
+ })
70
+ };
71
+ //# sourceMappingURL=documents-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents-api.js","sourceRoot":"","sources":["../../../src/client/api/documents-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAQzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;;;;;OAMG;IACH,sCAAsC,EAAE,CACtC,YAAoB,EACpB,UAAkB,EAClB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,iFAAiF,EACjF;QACE,cAAc,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE;QAC5C,gBAAgB;KACjB,CACF;IACH;;;;;;OAMG;IACH,qCAAqC,EAAE,CACrC,YAAoB,EACpB,UAAkB,EAClB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,QAAQ,EACR,iFAAiF,EACjF;QACE,cAAc,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE;QAC5C,gBAAgB;KACjB,CACF;IACH;;;;;;OAMG;IACH,sCAAsC,EAAE,CACtC,YAAoB,EACpB,eAAoE,EACpE,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,oEAAoE,EACpE;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,eAAe;QACf,gBAAgB;KACjB,CACF;IACH;;;;;;OAMG;IACH,sCAAsC,EAAE,CACtC,YAAoB,EACpB,IAA2B,EAC3B,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,MAAM,EACN,oEAAoE,EACpE;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,IAAI;QACJ,gBAAgB;KACjB,CACF;IACH;;;;;;OAMG;IACH,sCAAsC,EAAE,CACtC,YAAoB,EACpB,IAA2B,EAC3B,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,OAAO,EACP,oEAAoE,EACpE;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,IAAI;QACJ,gBAAgB;KACjB,CACF;CACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './pipelines-api.js';
2
+ export * from './collections-api.js';
3
+ export * from './documents-api.js';
4
+ export * from './search-api.js';
5
+ export * from './retrieval-data-repository-api.js';
6
+ export * from './retrieval-federated-search-across-data-repositories-api.js';
7
+ export * from './schema/index.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oCAAoC,CAAC;AACnD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
3
+ *
4
+ * This is a generated file powered by the SAP Cloud SDK for JavaScript.
5
+ */
6
+ export * from './pipelines-api.js';
7
+ export * from './collections-api.js';
8
+ export * from './documents-api.js';
9
+ export * from './search-api.js';
10
+ export * from './retrieval-data-repository-api.js';
11
+ export * from './retrieval-federated-search-across-data-repositories-api.js';
12
+ export * from './schema/index.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oCAAoC,CAAC;AACnD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,mBAAmB,CAAC"}