@credal/sdk 0.0.10 → 0.0.12

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 (246) hide show
  1. package/api/resources/common/types/Collaborator.d.ts +8 -0
  2. package/api/resources/common/types/Collaborator.js +5 -0
  3. package/api/resources/common/types/Role.d.ts +8 -0
  4. package/api/resources/common/types/Role.js +10 -0
  5. package/api/resources/common/types/index.d.ts +2 -0
  6. package/api/resources/common/types/index.js +2 -0
  7. package/api/resources/copilots/client/Client.d.ts +75 -1
  8. package/api/resources/copilots/client/Client.js +309 -4
  9. package/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +22 -0
  10. package/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +5 -0
  11. package/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -1
  12. package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +32 -0
  13. package/api/resources/copilots/client/requests/CreateCopilotRequest.js +5 -0
  14. package/api/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +13 -0
  15. package/api/resources/copilots/client/requests/DeleteCopilotRequest.js +5 -0
  16. package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
  17. package/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +22 -0
  18. package/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +5 -0
  19. package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -1
  20. package/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +27 -0
  21. package/api/resources/copilots/client/requests/UpdateConfigurationRequest.js +5 -0
  22. package/api/resources/copilots/client/requests/index.d.ts +5 -0
  23. package/api/resources/copilots/types/AiEndpointConfiguration.d.ts +7 -0
  24. package/api/resources/copilots/types/AiEndpointConfiguration.js +5 -0
  25. package/api/resources/copilots/types/Configuration.d.ts +10 -0
  26. package/api/resources/copilots/types/Configuration.js +5 -0
  27. package/api/resources/copilots/types/CreateCopilotResponse.d.ts +6 -0
  28. package/api/resources/copilots/types/CreateCopilotResponse.js +5 -0
  29. package/api/resources/copilots/types/DeleteCopilotResponse.d.ts +6 -0
  30. package/api/resources/copilots/types/DeleteCopilotResponse.js +5 -0
  31. package/api/resources/copilots/types/index.d.ts +4 -0
  32. package/api/resources/copilots/types/index.js +4 -0
  33. package/api/resources/documentCatalog/client/Client.js +2 -2
  34. package/api/resources/documentCollections/client/Client.d.ts +107 -1
  35. package/api/resources/documentCollections/client/Client.js +349 -2
  36. package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -1
  37. package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +32 -0
  38. package/api/resources/documentCollections/client/requests/CreateCollectionRequest.js +5 -0
  39. package/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +31 -0
  40. package/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +5 -0
  41. package/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +12 -0
  42. package/api/resources/documentCollections/client/requests/DeleteCollectionRequest.js +5 -0
  43. package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +28 -0
  44. package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +5 -0
  45. package/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +31 -0
  46. package/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +5 -0
  47. package/api/resources/documentCollections/client/requests/index.d.ts +5 -0
  48. package/api/resources/documentCollections/index.d.ts +1 -0
  49. package/api/resources/documentCollections/index.js +1 -0
  50. package/api/resources/documentCollections/types/CreateCollectionResponse.d.ts +6 -0
  51. package/api/resources/documentCollections/types/CreateCollectionResponse.js +5 -0
  52. package/api/resources/documentCollections/types/DeleteCollectionResponse.d.ts +6 -0
  53. package/api/resources/documentCollections/types/DeleteCollectionResponse.js +5 -0
  54. package/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +10 -0
  55. package/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +5 -0
  56. package/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +8 -0
  57. package/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +5 -0
  58. package/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +9 -0
  59. package/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +5 -0
  60. package/api/resources/documentCollections/types/index.d.ts +5 -0
  61. package/api/resources/documentCollections/types/index.js +21 -0
  62. package/api/resources/index.d.ts +2 -1
  63. package/api/resources/index.js +3 -2
  64. package/api/resources/permissionsService/client/Client.js +3 -3
  65. package/api/resources/search/client/Client.js +1 -1
  66. package/api/resources/users/client/Client.js +1 -1
  67. package/dist/api/resources/common/types/Collaborator.d.ts +8 -0
  68. package/dist/api/resources/common/types/Collaborator.js +5 -0
  69. package/dist/api/resources/common/types/Role.d.ts +8 -0
  70. package/dist/api/resources/common/types/Role.js +10 -0
  71. package/dist/api/resources/common/types/index.d.ts +2 -0
  72. package/dist/api/resources/common/types/index.js +2 -0
  73. package/dist/api/resources/copilots/client/Client.d.ts +75 -1
  74. package/dist/api/resources/copilots/client/Client.js +309 -4
  75. package/dist/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +22 -0
  76. package/dist/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +5 -0
  77. package/dist/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -1
  78. package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +32 -0
  79. package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.js +5 -0
  80. package/dist/api/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +13 -0
  81. package/dist/api/resources/copilots/client/requests/DeleteCopilotRequest.js +5 -0
  82. package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
  83. package/dist/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +22 -0
  84. package/dist/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +5 -0
  85. package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -1
  86. package/dist/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +27 -0
  87. package/dist/api/resources/copilots/client/requests/UpdateConfigurationRequest.js +5 -0
  88. package/dist/api/resources/copilots/client/requests/index.d.ts +5 -0
  89. package/dist/api/resources/copilots/types/AiEndpointConfiguration.d.ts +7 -0
  90. package/dist/api/resources/copilots/types/AiEndpointConfiguration.js +5 -0
  91. package/dist/api/resources/copilots/types/Configuration.d.ts +10 -0
  92. package/dist/api/resources/copilots/types/Configuration.js +5 -0
  93. package/dist/api/resources/copilots/types/CreateCopilotResponse.d.ts +6 -0
  94. package/dist/api/resources/copilots/types/CreateCopilotResponse.js +5 -0
  95. package/dist/api/resources/copilots/types/DeleteCopilotResponse.d.ts +6 -0
  96. package/dist/api/resources/copilots/types/DeleteCopilotResponse.js +5 -0
  97. package/dist/api/resources/copilots/types/index.d.ts +4 -0
  98. package/dist/api/resources/copilots/types/index.js +4 -0
  99. package/dist/api/resources/documentCatalog/client/Client.js +2 -2
  100. package/dist/api/resources/documentCollections/client/Client.d.ts +107 -1
  101. package/dist/api/resources/documentCollections/client/Client.js +349 -2
  102. package/dist/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -1
  103. package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +32 -0
  104. package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.js +5 -0
  105. package/dist/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +31 -0
  106. package/dist/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +5 -0
  107. package/dist/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +12 -0
  108. package/dist/api/resources/documentCollections/client/requests/DeleteCollectionRequest.js +5 -0
  109. package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +28 -0
  110. package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +5 -0
  111. package/dist/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +31 -0
  112. package/dist/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +5 -0
  113. package/dist/api/resources/documentCollections/client/requests/index.d.ts +5 -0
  114. package/dist/api/resources/documentCollections/index.d.ts +1 -0
  115. package/dist/api/resources/documentCollections/index.js +1 -0
  116. package/dist/api/resources/documentCollections/types/CreateCollectionResponse.d.ts +6 -0
  117. package/dist/api/resources/documentCollections/types/CreateCollectionResponse.js +5 -0
  118. package/dist/api/resources/documentCollections/types/DeleteCollectionResponse.d.ts +6 -0
  119. package/dist/api/resources/documentCollections/types/DeleteCollectionResponse.js +5 -0
  120. package/dist/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +10 -0
  121. package/dist/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +5 -0
  122. package/dist/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +8 -0
  123. package/dist/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +5 -0
  124. package/dist/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +9 -0
  125. package/dist/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +5 -0
  126. package/dist/api/resources/documentCollections/types/index.d.ts +5 -0
  127. package/dist/api/resources/documentCollections/types/index.js +21 -0
  128. package/dist/api/resources/index.d.ts +2 -1
  129. package/dist/api/resources/index.js +3 -2
  130. package/dist/api/resources/permissionsService/client/Client.js +3 -3
  131. package/dist/api/resources/search/client/Client.js +1 -1
  132. package/dist/api/resources/users/client/Client.js +1 -1
  133. package/dist/serialization/resources/common/types/Collaborator.d.ts +14 -0
  134. package/dist/serialization/resources/common/types/Collaborator.js +35 -0
  135. package/dist/serialization/resources/common/types/Role.d.ts +10 -0
  136. package/dist/serialization/resources/common/types/Role.js +34 -0
  137. package/dist/serialization/resources/common/types/index.d.ts +2 -0
  138. package/dist/serialization/resources/common/types/index.js +2 -0
  139. package/dist/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +13 -0
  140. package/dist/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +34 -0
  141. package/dist/serialization/resources/copilots/client/requests/CreateCopilotRequest.d.ts +15 -0
  142. package/dist/serialization/resources/copilots/client/requests/CreateCopilotRequest.js +36 -0
  143. package/dist/serialization/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +12 -0
  144. package/dist/serialization/resources/copilots/client/requests/DeleteCopilotRequest.js +33 -0
  145. package/dist/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +13 -0
  146. package/dist/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +34 -0
  147. package/dist/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +14 -0
  148. package/dist/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.js +35 -0
  149. package/dist/serialization/resources/copilots/client/requests/index.d.ts +5 -0
  150. package/dist/serialization/resources/copilots/client/requests/index.js +11 -1
  151. package/dist/serialization/resources/copilots/types/AiEndpointConfiguration.d.ts +13 -0
  152. package/dist/serialization/resources/copilots/types/AiEndpointConfiguration.js +34 -0
  153. package/dist/serialization/resources/copilots/types/Configuration.d.ts +16 -0
  154. package/dist/serialization/resources/copilots/types/Configuration.js +37 -0
  155. package/dist/serialization/resources/copilots/types/CreateCopilotResponse.d.ts +12 -0
  156. package/dist/serialization/resources/copilots/types/CreateCopilotResponse.js +33 -0
  157. package/dist/serialization/resources/copilots/types/DeleteCopilotResponse.d.ts +12 -0
  158. package/dist/serialization/resources/copilots/types/DeleteCopilotResponse.js +33 -0
  159. package/dist/serialization/resources/copilots/types/index.d.ts +4 -0
  160. package/dist/serialization/resources/copilots/types/index.js +4 -0
  161. package/dist/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +15 -0
  162. package/dist/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.js +36 -0
  163. package/dist/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +15 -0
  164. package/dist/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +36 -0
  165. package/dist/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +12 -0
  166. package/dist/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.js +33 -0
  167. package/dist/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +14 -0
  168. package/dist/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +35 -0
  169. package/dist/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +15 -0
  170. package/dist/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +36 -0
  171. package/dist/serialization/resources/documentCollections/client/requests/index.d.ts +5 -0
  172. package/dist/serialization/resources/documentCollections/client/requests/index.js +11 -1
  173. package/dist/serialization/resources/documentCollections/index.d.ts +1 -0
  174. package/dist/serialization/resources/documentCollections/index.js +1 -0
  175. package/dist/serialization/resources/documentCollections/types/CreateCollectionResponse.d.ts +12 -0
  176. package/dist/serialization/resources/documentCollections/types/CreateCollectionResponse.js +33 -0
  177. package/dist/serialization/resources/documentCollections/types/DeleteCollectionResponse.d.ts +12 -0
  178. package/dist/serialization/resources/documentCollections/types/DeleteCollectionResponse.js +33 -0
  179. package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +16 -0
  180. package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +37 -0
  181. package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +14 -0
  182. package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +35 -0
  183. package/dist/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +15 -0
  184. package/dist/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +36 -0
  185. package/dist/serialization/resources/documentCollections/types/index.d.ts +5 -0
  186. package/dist/serialization/resources/documentCollections/types/index.js +21 -0
  187. package/dist/serialization/resources/index.d.ts +2 -1
  188. package/dist/serialization/resources/index.js +3 -2
  189. package/package.json +1 -1
  190. package/reference.md +959 -60
  191. package/serialization/resources/common/types/Collaborator.d.ts +14 -0
  192. package/serialization/resources/common/types/Collaborator.js +35 -0
  193. package/serialization/resources/common/types/Role.d.ts +10 -0
  194. package/serialization/resources/common/types/Role.js +34 -0
  195. package/serialization/resources/common/types/index.d.ts +2 -0
  196. package/serialization/resources/common/types/index.js +2 -0
  197. package/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +13 -0
  198. package/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +34 -0
  199. package/serialization/resources/copilots/client/requests/CreateCopilotRequest.d.ts +15 -0
  200. package/serialization/resources/copilots/client/requests/CreateCopilotRequest.js +36 -0
  201. package/serialization/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +12 -0
  202. package/serialization/resources/copilots/client/requests/DeleteCopilotRequest.js +33 -0
  203. package/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +13 -0
  204. package/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +34 -0
  205. package/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +14 -0
  206. package/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.js +35 -0
  207. package/serialization/resources/copilots/client/requests/index.d.ts +5 -0
  208. package/serialization/resources/copilots/client/requests/index.js +11 -1
  209. package/serialization/resources/copilots/types/AiEndpointConfiguration.d.ts +13 -0
  210. package/serialization/resources/copilots/types/AiEndpointConfiguration.js +34 -0
  211. package/serialization/resources/copilots/types/Configuration.d.ts +16 -0
  212. package/serialization/resources/copilots/types/Configuration.js +37 -0
  213. package/serialization/resources/copilots/types/CreateCopilotResponse.d.ts +12 -0
  214. package/serialization/resources/copilots/types/CreateCopilotResponse.js +33 -0
  215. package/serialization/resources/copilots/types/DeleteCopilotResponse.d.ts +12 -0
  216. package/serialization/resources/copilots/types/DeleteCopilotResponse.js +33 -0
  217. package/serialization/resources/copilots/types/index.d.ts +4 -0
  218. package/serialization/resources/copilots/types/index.js +4 -0
  219. package/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +15 -0
  220. package/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.js +36 -0
  221. package/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +15 -0
  222. package/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +36 -0
  223. package/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +12 -0
  224. package/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.js +33 -0
  225. package/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +14 -0
  226. package/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +35 -0
  227. package/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +15 -0
  228. package/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +36 -0
  229. package/serialization/resources/documentCollections/client/requests/index.d.ts +5 -0
  230. package/serialization/resources/documentCollections/client/requests/index.js +11 -1
  231. package/serialization/resources/documentCollections/index.d.ts +1 -0
  232. package/serialization/resources/documentCollections/index.js +1 -0
  233. package/serialization/resources/documentCollections/types/CreateCollectionResponse.d.ts +12 -0
  234. package/serialization/resources/documentCollections/types/CreateCollectionResponse.js +33 -0
  235. package/serialization/resources/documentCollections/types/DeleteCollectionResponse.d.ts +12 -0
  236. package/serialization/resources/documentCollections/types/DeleteCollectionResponse.js +33 -0
  237. package/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +16 -0
  238. package/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +37 -0
  239. package/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +14 -0
  240. package/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +35 -0
  241. package/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +15 -0
  242. package/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +36 -0
  243. package/serialization/resources/documentCollections/types/index.d.ts +5 -0
  244. package/serialization/resources/documentCollections/types/index.js +21 -0
  245. package/serialization/resources/index.d.ts +2 -1
  246. package/serialization/resources/index.js +3 -2
@@ -20,7 +20,7 @@ export declare class DocumentCollections {
20
20
  protected readonly _options: DocumentCollections.Options;
21
21
  constructor(_options?: DocumentCollections.Options);
22
22
  /**
23
- * Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the uploadDocumentContents endpoint.
23
+ * Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the `uploadDocumentContents` endpoint.
24
24
  *
25
25
  * @param {Credal.AddDocumentsToCollectionRequest} request
26
26
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
@@ -40,5 +40,111 @@ export declare class DocumentCollections {
40
40
  * })
41
41
  */
42
42
  addDocumentsToCollection(request: Credal.AddDocumentsToCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<void>;
43
+ /**
44
+ * Remove documents from a collection
45
+ *
46
+ * @param {Credal.RemoveDocumentsFromCollectionRequest} request
47
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
48
+ *
49
+ * @example
50
+ * await credal.documentCollections.removeDocumentsFromCollection({
51
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
52
+ * resourceIdentifiers: [{
53
+ * type: "external-resource-id",
54
+ * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
55
+ * resourceType: Credal.ResourceType.GoogleDriveItem
56
+ * }, {
57
+ * type: "external-resource-id",
58
+ * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
59
+ * resourceType: Credal.ResourceType.GoogleDriveItem
60
+ * }]
61
+ * })
62
+ */
63
+ removeDocumentsFromCollection(request: Credal.RemoveDocumentsFromCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<void>;
64
+ /**
65
+ * Create a new copilot. The API key used will be added to the copilot for future Requests
66
+ *
67
+ * @param {Credal.CreateCollectionRequest} request
68
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @example
71
+ * await credal.documentCollections.createCollection({
72
+ * name: "Customer Collection",
73
+ * description: "This collection is used to answer customer requests based on internal documentation.",
74
+ * collaborators: [{
75
+ * email: "test@gmail.com",
76
+ * role: Credal.Role.Editor
77
+ * }]
78
+ * })
79
+ */
80
+ createCollection(request: Credal.CreateCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.CreateCollectionResponse>;
81
+ /**
82
+ * Delete the collection.
83
+ *
84
+ * @param {Credal.DeleteCollectionRequest} request
85
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @example
88
+ * await credal.documentCollections.deleteCollection({
89
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
90
+ * })
91
+ */
92
+ deleteCollection(request: Credal.DeleteCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.DeleteCollectionResponse>;
93
+ /**
94
+ * Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Create a new sync from a MongoDB collection to a Credal collection.
95
+ *
96
+ * @param {Credal.CreateMongoCollectionSyncRequest} request
97
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
98
+ *
99
+ * @example
100
+ * await credal.documentCollections.createMongoCollectionSync({
101
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
102
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
103
+ * config: {
104
+ * syncName: "My sales transcripts",
105
+ * collectionName: "myCollection",
106
+ * filterExpression: {
107
+ * "status": {
108
+ * "$ne": "disabled"
109
+ * }
110
+ * },
111
+ * sourceFields: {
112
+ * body: "body",
113
+ * sourceName: "meetingName",
114
+ * sourceSystemUpdated: "transcriptDatetime",
115
+ * sourceUrl: "link"
116
+ * }
117
+ * }
118
+ * })
119
+ */
120
+ createMongoCollectionSync(request: Credal.CreateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.MongoCollectionSyncResponse>;
121
+ /**
122
+ * Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.
123
+ *
124
+ * @param {Credal.UpdateMongoCollectionSyncRequest} request
125
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @example
128
+ * await credal.documentCollections.updateMongoCollectionSync({
129
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
130
+ * mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
131
+ * config: {
132
+ * syncName: "My recent summarized sales transcripts",
133
+ * collectionName: "myCollection",
134
+ * filterExpression: {
135
+ * "transcriptDatetime": {
136
+ * "$gt": "2023-01-01T00:00:00.000Z"
137
+ * }
138
+ * },
139
+ * sourceFields: {
140
+ * body: "transcriptSummary",
141
+ * sourceName: "meetingName",
142
+ * sourceSystemUpdated: "transcriptDatetime",
143
+ * sourceUrl: "link"
144
+ * }
145
+ * }
146
+ * })
147
+ */
148
+ updateMongoCollectionSync(request: Credal.UpdateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.MongoCollectionSyncResponse>;
43
149
  protected _getAuthorizationHeader(): Promise<string>;
44
150
  }
@@ -49,7 +49,7 @@ class DocumentCollections {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
52
- * Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the uploadDocumentContents endpoint.
52
+ * Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the `uploadDocumentContents` endpoint.
53
53
  *
54
54
  * @param {Credal.AddDocumentsToCollectionRequest} request
55
55
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
@@ -78,7 +78,7 @@ class DocumentCollections {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@credal/sdk",
81
- "X-Fern-SDK-Version": "0.0.10",
81
+ "X-Fern-SDK-Version": "0.0.12",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -114,6 +114,353 @@ class DocumentCollections {
114
114
  }
115
115
  });
116
116
  }
117
+ /**
118
+ * Remove documents from a collection
119
+ *
120
+ * @param {Credal.RemoveDocumentsFromCollectionRequest} request
121
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @example
124
+ * await credal.documentCollections.removeDocumentsFromCollection({
125
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
126
+ * resourceIdentifiers: [{
127
+ * type: "external-resource-id",
128
+ * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
129
+ * resourceType: Credal.ResourceType.GoogleDriveItem
130
+ * }, {
131
+ * type: "external-resource-id",
132
+ * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
133
+ * resourceType: Credal.ResourceType.GoogleDriveItem
134
+ * }]
135
+ * })
136
+ */
137
+ removeDocumentsFromCollection(request, requestOptions) {
138
+ var _a, _b;
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/removeDocumentsFromCollection"),
142
+ method: "DELETE",
143
+ headers: {
144
+ Authorization: yield this._getAuthorizationHeader(),
145
+ "X-Fern-Language": "JavaScript",
146
+ "X-Fern-SDK-Name": "@credal/sdk",
147
+ "X-Fern-SDK-Version": "0.0.12",
148
+ "X-Fern-Runtime": core.RUNTIME.type,
149
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
150
+ },
151
+ contentType: "application/json",
152
+ body: yield serializers.RemoveDocumentsFromCollectionRequest.jsonOrThrow(request, {
153
+ unrecognizedObjectKeys: "strip",
154
+ }),
155
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
156
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
158
+ });
159
+ if (_response.ok) {
160
+ return;
161
+ }
162
+ if (_response.error.reason === "status-code") {
163
+ throw new errors.CredalError({
164
+ statusCode: _response.error.statusCode,
165
+ body: _response.error.body,
166
+ });
167
+ }
168
+ switch (_response.error.reason) {
169
+ case "non-json":
170
+ throw new errors.CredalError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.rawBody,
173
+ });
174
+ case "timeout":
175
+ throw new errors.CredalTimeoutError();
176
+ case "unknown":
177
+ throw new errors.CredalError({
178
+ message: _response.error.errorMessage,
179
+ });
180
+ }
181
+ });
182
+ }
183
+ /**
184
+ * Create a new copilot. The API key used will be added to the copilot for future Requests
185
+ *
186
+ * @param {Credal.CreateCollectionRequest} request
187
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
188
+ *
189
+ * @example
190
+ * await credal.documentCollections.createCollection({
191
+ * name: "Customer Collection",
192
+ * description: "This collection is used to answer customer requests based on internal documentation.",
193
+ * collaborators: [{
194
+ * email: "test@gmail.com",
195
+ * role: Credal.Role.Editor
196
+ * }]
197
+ * })
198
+ */
199
+ createCollection(request, requestOptions) {
200
+ var _a, _b;
201
+ return __awaiter(this, void 0, void 0, function* () {
202
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
203
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/createCollection"),
204
+ method: "POST",
205
+ headers: {
206
+ Authorization: yield this._getAuthorizationHeader(),
207
+ "X-Fern-Language": "JavaScript",
208
+ "X-Fern-SDK-Name": "@credal/sdk",
209
+ "X-Fern-SDK-Version": "0.0.12",
210
+ "X-Fern-Runtime": core.RUNTIME.type,
211
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
212
+ },
213
+ contentType: "application/json",
214
+ body: yield serializers.CreateCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
215
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
216
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
217
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
218
+ });
219
+ if (_response.ok) {
220
+ return yield serializers.CreateCollectionResponse.parseOrThrow(_response.body, {
221
+ unrecognizedObjectKeys: "passthrough",
222
+ allowUnrecognizedUnionMembers: true,
223
+ allowUnrecognizedEnumValues: true,
224
+ breadcrumbsPrefix: ["response"],
225
+ });
226
+ }
227
+ if (_response.error.reason === "status-code") {
228
+ throw new errors.CredalError({
229
+ statusCode: _response.error.statusCode,
230
+ body: _response.error.body,
231
+ });
232
+ }
233
+ switch (_response.error.reason) {
234
+ case "non-json":
235
+ throw new errors.CredalError({
236
+ statusCode: _response.error.statusCode,
237
+ body: _response.error.rawBody,
238
+ });
239
+ case "timeout":
240
+ throw new errors.CredalTimeoutError();
241
+ case "unknown":
242
+ throw new errors.CredalError({
243
+ message: _response.error.errorMessage,
244
+ });
245
+ }
246
+ });
247
+ }
248
+ /**
249
+ * Delete the collection.
250
+ *
251
+ * @param {Credal.DeleteCollectionRequest} request
252
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
253
+ *
254
+ * @example
255
+ * await credal.documentCollections.deleteCollection({
256
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
257
+ * })
258
+ */
259
+ deleteCollection(request, requestOptions) {
260
+ var _a, _b;
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
263
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/deleteCollection"),
264
+ method: "DELETE",
265
+ headers: {
266
+ Authorization: yield this._getAuthorizationHeader(),
267
+ "X-Fern-Language": "JavaScript",
268
+ "X-Fern-SDK-Name": "@credal/sdk",
269
+ "X-Fern-SDK-Version": "0.0.12",
270
+ "X-Fern-Runtime": core.RUNTIME.type,
271
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
272
+ },
273
+ contentType: "application/json",
274
+ body: yield serializers.DeleteCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
275
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
276
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
277
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
278
+ });
279
+ if (_response.ok) {
280
+ return yield serializers.DeleteCollectionResponse.parseOrThrow(_response.body, {
281
+ unrecognizedObjectKeys: "passthrough",
282
+ allowUnrecognizedUnionMembers: true,
283
+ allowUnrecognizedEnumValues: true,
284
+ breadcrumbsPrefix: ["response"],
285
+ });
286
+ }
287
+ if (_response.error.reason === "status-code") {
288
+ throw new errors.CredalError({
289
+ statusCode: _response.error.statusCode,
290
+ body: _response.error.body,
291
+ });
292
+ }
293
+ switch (_response.error.reason) {
294
+ case "non-json":
295
+ throw new errors.CredalError({
296
+ statusCode: _response.error.statusCode,
297
+ body: _response.error.rawBody,
298
+ });
299
+ case "timeout":
300
+ throw new errors.CredalTimeoutError();
301
+ case "unknown":
302
+ throw new errors.CredalError({
303
+ message: _response.error.errorMessage,
304
+ });
305
+ }
306
+ });
307
+ }
308
+ /**
309
+ * Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Create a new sync from a MongoDB collection to a Credal collection.
310
+ *
311
+ * @param {Credal.CreateMongoCollectionSyncRequest} request
312
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
313
+ *
314
+ * @example
315
+ * await credal.documentCollections.createMongoCollectionSync({
316
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
317
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
318
+ * config: {
319
+ * syncName: "My sales transcripts",
320
+ * collectionName: "myCollection",
321
+ * filterExpression: {
322
+ * "status": {
323
+ * "$ne": "disabled"
324
+ * }
325
+ * },
326
+ * sourceFields: {
327
+ * body: "body",
328
+ * sourceName: "meetingName",
329
+ * sourceSystemUpdated: "transcriptDatetime",
330
+ * sourceUrl: "link"
331
+ * }
332
+ * }
333
+ * })
334
+ */
335
+ createMongoCollectionSync(request, requestOptions) {
336
+ var _a, _b;
337
+ return __awaiter(this, void 0, void 0, function* () {
338
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
339
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/createMongoSync"),
340
+ method: "POST",
341
+ headers: {
342
+ Authorization: yield this._getAuthorizationHeader(),
343
+ "X-Fern-Language": "JavaScript",
344
+ "X-Fern-SDK-Name": "@credal/sdk",
345
+ "X-Fern-SDK-Version": "0.0.12",
346
+ "X-Fern-Runtime": core.RUNTIME.type,
347
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
348
+ },
349
+ contentType: "application/json",
350
+ body: yield serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
351
+ unrecognizedObjectKeys: "strip",
352
+ }),
353
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
354
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
355
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
356
+ });
357
+ if (_response.ok) {
358
+ return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
359
+ unrecognizedObjectKeys: "passthrough",
360
+ allowUnrecognizedUnionMembers: true,
361
+ allowUnrecognizedEnumValues: true,
362
+ breadcrumbsPrefix: ["response"],
363
+ });
364
+ }
365
+ if (_response.error.reason === "status-code") {
366
+ throw new errors.CredalError({
367
+ statusCode: _response.error.statusCode,
368
+ body: _response.error.body,
369
+ });
370
+ }
371
+ switch (_response.error.reason) {
372
+ case "non-json":
373
+ throw new errors.CredalError({
374
+ statusCode: _response.error.statusCode,
375
+ body: _response.error.rawBody,
376
+ });
377
+ case "timeout":
378
+ throw new errors.CredalTimeoutError();
379
+ case "unknown":
380
+ throw new errors.CredalError({
381
+ message: _response.error.errorMessage,
382
+ });
383
+ }
384
+ });
385
+ }
386
+ /**
387
+ * Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.
388
+ *
389
+ * @param {Credal.UpdateMongoCollectionSyncRequest} request
390
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
391
+ *
392
+ * @example
393
+ * await credal.documentCollections.updateMongoCollectionSync({
394
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
395
+ * mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
396
+ * config: {
397
+ * syncName: "My recent summarized sales transcripts",
398
+ * collectionName: "myCollection",
399
+ * filterExpression: {
400
+ * "transcriptDatetime": {
401
+ * "$gt": "2023-01-01T00:00:00.000Z"
402
+ * }
403
+ * },
404
+ * sourceFields: {
405
+ * body: "transcriptSummary",
406
+ * sourceName: "meetingName",
407
+ * sourceSystemUpdated: "transcriptDatetime",
408
+ * sourceUrl: "link"
409
+ * }
410
+ * }
411
+ * })
412
+ */
413
+ updateMongoCollectionSync(request, requestOptions) {
414
+ var _a, _b;
415
+ return __awaiter(this, void 0, void 0, function* () {
416
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
417
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/updateMongoSync"),
418
+ method: "POST",
419
+ headers: {
420
+ Authorization: yield this._getAuthorizationHeader(),
421
+ "X-Fern-Language": "JavaScript",
422
+ "X-Fern-SDK-Name": "@credal/sdk",
423
+ "X-Fern-SDK-Version": "0.0.12",
424
+ "X-Fern-Runtime": core.RUNTIME.type,
425
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
426
+ },
427
+ contentType: "application/json",
428
+ body: yield serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
429
+ unrecognizedObjectKeys: "strip",
430
+ }),
431
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
432
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
433
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
434
+ });
435
+ if (_response.ok) {
436
+ return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
437
+ unrecognizedObjectKeys: "passthrough",
438
+ allowUnrecognizedUnionMembers: true,
439
+ allowUnrecognizedEnumValues: true,
440
+ breadcrumbsPrefix: ["response"],
441
+ });
442
+ }
443
+ if (_response.error.reason === "status-code") {
444
+ throw new errors.CredalError({
445
+ statusCode: _response.error.statusCode,
446
+ body: _response.error.body,
447
+ });
448
+ }
449
+ switch (_response.error.reason) {
450
+ case "non-json":
451
+ throw new errors.CredalError({
452
+ statusCode: _response.error.statusCode,
453
+ body: _response.error.rawBody,
454
+ });
455
+ case "timeout":
456
+ throw new errors.CredalTimeoutError();
457
+ case "unknown":
458
+ throw new errors.CredalError({
459
+ message: _response.error.errorMessage,
460
+ });
461
+ }
462
+ });
463
+ }
117
464
  _getAuthorizationHeader() {
118
465
  var _a;
119
466
  return __awaiter(this, void 0, void 0, function* () {
@@ -21,7 +21,7 @@ export interface AddDocumentsToCollectionRequest {
21
21
  /** The ID of the document collection you want to add to. */
22
22
  collectionId: string;
23
23
  /**
24
- * The set of resource identifier for which you want to check authorization. Currently limited to 20 resources.
24
+ * The set of resource identifier for which you want to add to the collection.
25
25
  *
26
26
  */
27
27
  resourceIdentifiers: Credal.ResourceIdentifier[];
@@ -0,0 +1,32 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * name: "Customer Collection",
9
+ * description: "This collection is used to answer customer requests based on internal documentation.",
10
+ * collaborators: [{
11
+ * email: "test@gmail.com",
12
+ * role: Credal.Role.Editor
13
+ * }]
14
+ * }
15
+ */
16
+ export interface CreateCollectionRequest {
17
+ /**
18
+ * A descriptive name for the collection.
19
+ *
20
+ */
21
+ name: string;
22
+ /**
23
+ * An in depth name for the copilot's function. Useful for routing requests to the right copilot.
24
+ *
25
+ */
26
+ description: string;
27
+ /**
28
+ * A list of collaborator emails and roles that will have access to the copilot.
29
+ *
30
+ */
31
+ collaborators: Credal.Collaborator[];
32
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
9
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
10
+ * config: {
11
+ * syncName: "My sales transcripts",
12
+ * collectionName: "myCollection",
13
+ * filterExpression: {
14
+ * "status": {
15
+ * "$ne": "disabled"
16
+ * }
17
+ * },
18
+ * sourceFields: {
19
+ * body: "body",
20
+ * sourceName: "meetingName",
21
+ * sourceSystemUpdated: "transcriptDatetime",
22
+ * sourceUrl: "link"
23
+ * }
24
+ * }
25
+ * }
26
+ */
27
+ export interface CreateMongoCollectionSyncRequest {
28
+ collectionId: string;
29
+ mongoUri: string;
30
+ config: Credal.MongoCollectionSyncConfig;
31
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
8
+ * }
9
+ */
10
+ export interface DeleteCollectionRequest {
11
+ collectionId: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
9
+ * resourceIdentifiers: [{
10
+ * type: "external-resource-id",
11
+ * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
12
+ * resourceType: Credal.ResourceType.GoogleDriveItem
13
+ * }, {
14
+ * type: "external-resource-id",
15
+ * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
16
+ * resourceType: Credal.ResourceType.GoogleDriveItem
17
+ * }]
18
+ * }
19
+ */
20
+ export interface RemoveDocumentsFromCollectionRequest {
21
+ /** The ID of the document collection you want to add to. */
22
+ collectionId: string;
23
+ /**
24
+ * The set of resource identifier for which you want to remove from the collection
25
+ *
26
+ */
27
+ resourceIdentifiers: Credal.ResourceIdentifier[];
28
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
9
+ * mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
10
+ * config: {
11
+ * syncName: "My recent summarized sales transcripts",
12
+ * collectionName: "myCollection",
13
+ * filterExpression: {
14
+ * "transcriptDatetime": {
15
+ * "$gt": "2023-01-01T00:00:00.000Z"
16
+ * }
17
+ * },
18
+ * sourceFields: {
19
+ * body: "transcriptSummary",
20
+ * sourceName: "meetingName",
21
+ * sourceSystemUpdated: "transcriptDatetime",
22
+ * sourceUrl: "link"
23
+ * }
24
+ * }
25
+ * }
26
+ */
27
+ export interface UpdateMongoCollectionSyncRequest {
28
+ mongoCredentialId: string;
29
+ mongoUri: string;
30
+ config: Credal.MongoCollectionSyncConfig;
31
+ }