lemma-sdk 0.2.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 (549) hide show
  1. package/README.md +100 -0
  2. package/dist/auth.d.ts +72 -0
  3. package/dist/auth.js +166 -0
  4. package/dist/browser/lemma-client.js +4020 -0
  5. package/dist/browser.d.ts +13 -0
  6. package/dist/browser.js +13 -0
  7. package/dist/client.d.ts +55 -0
  8. package/dist/client.js +92 -0
  9. package/dist/config.d.ts +14 -0
  10. package/dist/config.js +49 -0
  11. package/dist/generated.d.ts +8 -0
  12. package/dist/generated.js +51 -0
  13. package/dist/http.d.ts +24 -0
  14. package/dist/http.js +98 -0
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.js +4 -0
  17. package/dist/namespaces/agents.d.ts +16 -0
  18. package/dist/namespaces/agents.js +24 -0
  19. package/dist/namespaces/assistants.d.ts +36 -0
  20. package/dist/namespaces/assistants.js +46 -0
  21. package/dist/namespaces/datastores.d.ts +18 -0
  22. package/dist/namespaces/datastores.js +28 -0
  23. package/dist/namespaces/desks.d.ts +28 -0
  24. package/dist/namespaces/desks.js +35 -0
  25. package/dist/namespaces/files.d.ts +40 -0
  26. package/dist/namespaces/files.js +61 -0
  27. package/dist/namespaces/functions.d.ts +25 -0
  28. package/dist/namespaces/functions.js +32 -0
  29. package/dist/namespaces/integrations.d.ts +36 -0
  30. package/dist/namespaces/integrations.js +37 -0
  31. package/dist/namespaces/records.d.ts +19 -0
  32. package/dist/namespaces/records.js +46 -0
  33. package/dist/namespaces/tables.d.ts +21 -0
  34. package/dist/namespaces/tables.js +31 -0
  35. package/dist/namespaces/tasks.d.ts +22 -0
  36. package/dist/namespaces/tasks.js +29 -0
  37. package/dist/namespaces/workflows.d.ts +35 -0
  38. package/dist/namespaces/workflows.js +37 -0
  39. package/dist/openapi_client/core/ApiError.d.ts +10 -0
  40. package/dist/openapi_client/core/ApiError.js +16 -0
  41. package/dist/openapi_client/core/ApiRequestOptions.d.ts +13 -0
  42. package/dist/openapi_client/core/ApiRequestOptions.js +1 -0
  43. package/dist/openapi_client/core/ApiResult.d.ts +7 -0
  44. package/dist/openapi_client/core/ApiResult.js +1 -0
  45. package/dist/openapi_client/core/CancelablePromise.d.ts +20 -0
  46. package/dist/openapi_client/core/CancelablePromise.js +99 -0
  47. package/dist/openapi_client/core/OpenAPI.d.ts +16 -0
  48. package/dist/openapi_client/core/OpenAPI.js +11 -0
  49. package/dist/openapi_client/core/request.d.ts +30 -0
  50. package/dist/openapi_client/core/request.js +275 -0
  51. package/dist/openapi_client/index.d.ts +247 -0
  52. package/dist/openapi_client/index.js +62 -0
  53. package/dist/openapi_client/models/AccountCredentialsResponseSchema.d.ts +11 -0
  54. package/dist/openapi_client/models/AccountCredentialsResponseSchema.js +1 -0
  55. package/dist/openapi_client/models/AccountListResponseSchema.d.ts +9 -0
  56. package/dist/openapi_client/models/AccountListResponseSchema.js +1 -0
  57. package/dist/openapi_client/models/AccountResponseSchema.d.ts +16 -0
  58. package/dist/openapi_client/models/AccountResponseSchema.js +1 -0
  59. package/dist/openapi_client/models/AddColumnRequest.d.ts +10 -0
  60. package/dist/openapi_client/models/AddColumnRequest.js +1 -0
  61. package/dist/openapi_client/models/AddMessageRequest.d.ts +6 -0
  62. package/dist/openapi_client/models/AddMessageRequest.js +1 -0
  63. package/dist/openapi_client/models/AgentListResponse.d.ts +8 -0
  64. package/dist/openapi_client/models/AgentListResponse.js +1 -0
  65. package/dist/openapi_client/models/AgentMessageResponse.d.ts +6 -0
  66. package/dist/openapi_client/models/AgentMessageResponse.js +1 -0
  67. package/dist/openapi_client/models/AgentNode.d.ts +11 -0
  68. package/dist/openapi_client/models/AgentNode.js +1 -0
  69. package/dist/openapi_client/models/AgentNodeConfig.d.ts +15 -0
  70. package/dist/openapi_client/models/AgentNodeConfig.js +1 -0
  71. package/dist/openapi_client/models/AgentResponse.d.ts +21 -0
  72. package/dist/openapi_client/models/AgentResponse.js +1 -0
  73. package/dist/openapi_client/models/ApiKeyCredentialsResponseSchema.d.ts +7 -0
  74. package/dist/openapi_client/models/ApiKeyCredentialsResponseSchema.js +1 -0
  75. package/dist/openapi_client/models/AppDescriptorResponse.d.ts +5 -0
  76. package/dist/openapi_client/models/AppDescriptorResponse.js +1 -0
  77. package/dist/openapi_client/models/AppTriggerListResponseSchema.d.ts +9 -0
  78. package/dist/openapi_client/models/AppTriggerListResponseSchema.js +1 -0
  79. package/dist/openapi_client/models/AppTriggerResponseSchema.d.ts +13 -0
  80. package/dist/openapi_client/models/AppTriggerResponseSchema.js +1 -0
  81. package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +20 -0
  82. package/dist/openapi_client/models/ApplicationAccessConfig.js +1 -0
  83. package/dist/openapi_client/models/ApplicationDetailResponseSchema.d.ts +17 -0
  84. package/dist/openapi_client/models/ApplicationDetailResponseSchema.js +1 -0
  85. package/dist/openapi_client/models/ApplicationListResponseSchema.d.ts +9 -0
  86. package/dist/openapi_client/models/ApplicationListResponseSchema.js +1 -0
  87. package/dist/openapi_client/models/ApplicationMode.d.ts +7 -0
  88. package/dist/openapi_client/models/ApplicationMode.js +12 -0
  89. package/dist/openapi_client/models/ApplicationResponseSchema.d.ts +15 -0
  90. package/dist/openapi_client/models/ApplicationResponseSchema.js +1 -0
  91. package/dist/openapi_client/models/AssistantListResponse.d.ts +6 -0
  92. package/dist/openapi_client/models/AssistantListResponse.js +1 -0
  93. package/dist/openapi_client/models/AssistantResponse.d.ts +19 -0
  94. package/dist/openapi_client/models/AssistantResponse.js +1 -0
  95. package/dist/openapi_client/models/AssistantSurfaceListResponse.d.ts +6 -0
  96. package/dist/openapi_client/models/AssistantSurfaceListResponse.js +1 -0
  97. package/dist/openapi_client/models/AssistantSurfaceResponse.d.ts +9 -0
  98. package/dist/openapi_client/models/AssistantSurfaceResponse.js +1 -0
  99. package/dist/openapi_client/models/AvailableModels.d.ts +11 -0
  100. package/dist/openapi_client/models/AvailableModels.js +16 -0
  101. package/dist/openapi_client/models/BillingInterval.d.ts +7 -0
  102. package/dist/openapi_client/models/BillingInterval.js +12 -0
  103. package/dist/openapi_client/models/Body_file_update.d.ts +7 -0
  104. package/dist/openapi_client/models/Body_file_update.js +1 -0
  105. package/dist/openapi_client/models/Body_file_upload.d.ts +7 -0
  106. package/dist/openapi_client/models/Body_file_upload.js +1 -0
  107. package/dist/openapi_client/models/Body_icon_upload.d.ts +3 -0
  108. package/dist/openapi_client/models/Body_icon_upload.js +1 -0
  109. package/dist/openapi_client/models/Body_pod_desk_bundle_upload.d.ts +4 -0
  110. package/dist/openapi_client/models/Body_pod_desk_bundle_upload.js +1 -0
  111. package/dist/openapi_client/models/Body_upload_file_files__resource_type___resource_id__upload_post.d.ts +3 -0
  112. package/dist/openapi_client/models/Body_upload_file_files__resource_type___resource_id__upload_post.js +1 -0
  113. package/dist/openapi_client/models/BulkCreateRecordsRequest.d.ts +9 -0
  114. package/dist/openapi_client/models/BulkCreateRecordsRequest.js +1 -0
  115. package/dist/openapi_client/models/BulkDeleteRecordsRequest.d.ts +9 -0
  116. package/dist/openapi_client/models/BulkDeleteRecordsRequest.js +1 -0
  117. package/dist/openapi_client/models/BulkUpdateRecordsRequest.d.ts +9 -0
  118. package/dist/openapi_client/models/BulkUpdateRecordsRequest.js +1 -0
  119. package/dist/openapi_client/models/CancelSubscriptionResponse.d.ts +10 -0
  120. package/dist/openapi_client/models/CancelSubscriptionResponse.js +1 -0
  121. package/dist/openapi_client/models/ColumnSchema.d.ts +59 -0
  122. package/dist/openapi_client/models/ColumnSchema.js +1 -0
  123. package/dist/openapi_client/models/ConnectRequestInitiateSchema.d.ts +9 -0
  124. package/dist/openapi_client/models/ConnectRequestInitiateSchema.js +1 -0
  125. package/dist/openapi_client/models/ConnectRequestResponseSchema.d.ts +13 -0
  126. package/dist/openapi_client/models/ConnectRequestResponseSchema.js +1 -0
  127. package/dist/openapi_client/models/ConversationListResponse.d.ts +6 -0
  128. package/dist/openapi_client/models/ConversationListResponse.js +1 -0
  129. package/dist/openapi_client/models/ConversationMessageListResponse.d.ts +6 -0
  130. package/dist/openapi_client/models/ConversationMessageListResponse.js +1 -0
  131. package/dist/openapi_client/models/ConversationMessageResponse.d.ts +15 -0
  132. package/dist/openapi_client/models/ConversationMessageResponse.js +1 -0
  133. package/dist/openapi_client/models/ConversationResponse.d.ts +22 -0
  134. package/dist/openapi_client/models/ConversationResponse.js +1 -0
  135. package/dist/openapi_client/models/ConversationStatus.d.ts +7 -0
  136. package/dist/openapi_client/models/ConversationStatus.js +12 -0
  137. package/dist/openapi_client/models/CreateAgentRequest.d.ts +16 -0
  138. package/dist/openapi_client/models/CreateAgentRequest.js +1 -0
  139. package/dist/openapi_client/models/CreateAssistantRequest.d.ts +14 -0
  140. package/dist/openapi_client/models/CreateAssistantRequest.js +1 -0
  141. package/dist/openapi_client/models/CreateConversationRequest.d.ts +11 -0
  142. package/dist/openapi_client/models/CreateConversationRequest.js +1 -0
  143. package/dist/openapi_client/models/CreateDatastoreRequest.d.ts +21 -0
  144. package/dist/openapi_client/models/CreateDatastoreRequest.js +1 -0
  145. package/dist/openapi_client/models/CreateDeskRequest.d.ts +6 -0
  146. package/dist/openapi_client/models/CreateDeskRequest.js +1 -0
  147. package/dist/openapi_client/models/CreateFolderRequest.d.ts +5 -0
  148. package/dist/openapi_client/models/CreateFolderRequest.js +1 -0
  149. package/dist/openapi_client/models/CreateFunctionRequest.d.ts +16 -0
  150. package/dist/openapi_client/models/CreateFunctionRequest.js +1 -0
  151. package/dist/openapi_client/models/CreateMessageRequest.d.ts +6 -0
  152. package/dist/openapi_client/models/CreateMessageRequest.js +1 -0
  153. package/dist/openapi_client/models/CreateRecordRequest.d.ts +9 -0
  154. package/dist/openapi_client/models/CreateRecordRequest.js +1 -0
  155. package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +8 -0
  156. package/dist/openapi_client/models/CreateSurfaceRequest.js +1 -0
  157. package/dist/openapi_client/models/CreateTableRequest.d.ts +26 -0
  158. package/dist/openapi_client/models/CreateTableRequest.js +1 -0
  159. package/dist/openapi_client/models/CreateTaskRequest.d.ts +10 -0
  160. package/dist/openapi_client/models/CreateTaskRequest.js +1 -0
  161. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +14 -0
  162. package/dist/openapi_client/models/CreateTriggerRequest.js +1 -0
  163. package/dist/openapi_client/models/CredentialTypes.d.ts +7 -0
  164. package/dist/openapi_client/models/CredentialTypes.js +12 -0
  165. package/dist/openapi_client/models/DataStoreFlowStart.d.ts +14 -0
  166. package/dist/openapi_client/models/DataStoreFlowStart.js +1 -0
  167. package/dist/openapi_client/models/DatastoreDataType.d.ts +16 -0
  168. package/dist/openapi_client/models/DatastoreDataType.js +21 -0
  169. package/dist/openapi_client/models/DatastoreListResponse.d.ts +9 -0
  170. package/dist/openapi_client/models/DatastoreListResponse.js +1 -0
  171. package/dist/openapi_client/models/DatastoreMessageResponse.d.ts +6 -0
  172. package/dist/openapi_client/models/DatastoreMessageResponse.js +1 -0
  173. package/dist/openapi_client/models/DatastoreQueryRequest.d.ts +9 -0
  174. package/dist/openapi_client/models/DatastoreQueryRequest.js +1 -0
  175. package/dist/openapi_client/models/DatastoreResponse.d.ts +15 -0
  176. package/dist/openapi_client/models/DatastoreResponse.js +1 -0
  177. package/dist/openapi_client/models/DecisionNode.d.ts +11 -0
  178. package/dist/openapi_client/models/DecisionNode.js +1 -0
  179. package/dist/openapi_client/models/DecisionNodeConfig.d.ts +7 -0
  180. package/dist/openapi_client/models/DecisionNodeConfig.js +1 -0
  181. package/dist/openapi_client/models/DecisionRule.d.ts +4 -0
  182. package/dist/openapi_client/models/DecisionRule.js +1 -0
  183. package/dist/openapi_client/models/DeskBundleUploadResponse.d.ts +5 -0
  184. package/dist/openapi_client/models/DeskBundleUploadResponse.js +1 -0
  185. package/dist/openapi_client/models/DeskListResponse.d.ts +6 -0
  186. package/dist/openapi_client/models/DeskListResponse.js +1 -0
  187. package/dist/openapi_client/models/DeskMessageResponse.d.ts +3 -0
  188. package/dist/openapi_client/models/DeskMessageResponse.js +1 -0
  189. package/dist/openapi_client/models/DeskResponse.d.ts +15 -0
  190. package/dist/openapi_client/models/DeskResponse.js +1 -0
  191. package/dist/openapi_client/models/DeskStatus.d.ts +4 -0
  192. package/dist/openapi_client/models/DeskStatus.js +9 -0
  193. package/dist/openapi_client/models/EmailSurfaceConfigCreate.d.ts +5 -0
  194. package/dist/openapi_client/models/EmailSurfaceConfigCreate.js +1 -0
  195. package/dist/openapi_client/models/EndNode.d.ts +11 -0
  196. package/dist/openapi_client/models/EndNode.js +1 -0
  197. package/dist/openapi_client/models/EndNodeConfig.d.ts +4 -0
  198. package/dist/openapi_client/models/EndNodeConfig.js +1 -0
  199. package/dist/openapi_client/models/EventFlowStart.d.ts +19 -0
  200. package/dist/openapi_client/models/EventFlowStart.js +1 -0
  201. package/dist/openapi_client/models/ExecuteFunctionRequest.d.ts +6 -0
  202. package/dist/openapi_client/models/ExecuteFunctionRequest.js +1 -0
  203. package/dist/openapi_client/models/ExpressionInputBinding.d.ts +10 -0
  204. package/dist/openapi_client/models/ExpressionInputBinding.js +1 -0
  205. package/dist/openapi_client/models/FileInfo.d.ts +14 -0
  206. package/dist/openapi_client/models/FileInfo.js +8 -0
  207. package/dist/openapi_client/models/FileListResponse.d.ts +6 -0
  208. package/dist/openapi_client/models/FileListResponse.js +1 -0
  209. package/dist/openapi_client/models/FileResponse.d.ts +18 -0
  210. package/dist/openapi_client/models/FileResponse.js +1 -0
  211. package/dist/openapi_client/models/FileSearchRequest.d.ts +10 -0
  212. package/dist/openapi_client/models/FileSearchRequest.js +1 -0
  213. package/dist/openapi_client/models/FileSearchResponse.d.ts +8 -0
  214. package/dist/openapi_client/models/FileSearchResponse.js +1 -0
  215. package/dist/openapi_client/models/FileSearchResultSchema.d.ts +7 -0
  216. package/dist/openapi_client/models/FileSearchResultSchema.js +1 -0
  217. package/dist/openapi_client/models/FileUploadResponse.d.ts +6 -0
  218. package/dist/openapi_client/models/FileUploadResponse.js +1 -0
  219. package/dist/openapi_client/models/FlowEntity.d.ts +26 -0
  220. package/dist/openapi_client/models/FlowEntity.js +1 -0
  221. package/dist/openapi_client/models/FlowInstallEntity.d.ts +16 -0
  222. package/dist/openapi_client/models/FlowInstallEntity.js +1 -0
  223. package/dist/openapi_client/models/FlowRunEntity.d.ts +24 -0
  224. package/dist/openapi_client/models/FlowRunEntity.js +1 -0
  225. package/dist/openapi_client/models/FlowRunStatus.d.ts +12 -0
  226. package/dist/openapi_client/models/FlowRunStatus.js +17 -0
  227. package/dist/openapi_client/models/FlowStart.d.ts +14 -0
  228. package/dist/openapi_client/models/FlowStart.js +1 -0
  229. package/dist/openapi_client/models/FlowStartType.d.ts +6 -0
  230. package/dist/openapi_client/models/FlowStartType.js +11 -0
  231. package/dist/openapi_client/models/ForeignKeySpec.d.ts +9 -0
  232. package/dist/openapi_client/models/ForeignKeySpec.js +1 -0
  233. package/dist/openapi_client/models/FormNode.d.ts +11 -0
  234. package/dist/openapi_client/models/FormNode.js +1 -0
  235. package/dist/openapi_client/models/FormNodeConfig.d.ts +13 -0
  236. package/dist/openapi_client/models/FormNodeConfig.js +1 -0
  237. package/dist/openapi_client/models/FunctionListResponse.d.ts +9 -0
  238. package/dist/openapi_client/models/FunctionListResponse.js +1 -0
  239. package/dist/openapi_client/models/FunctionMessageResponse.d.ts +6 -0
  240. package/dist/openapi_client/models/FunctionMessageResponse.js +1 -0
  241. package/dist/openapi_client/models/FunctionNode.d.ts +11 -0
  242. package/dist/openapi_client/models/FunctionNode.js +1 -0
  243. package/dist/openapi_client/models/FunctionNodeConfig.d.ts +15 -0
  244. package/dist/openapi_client/models/FunctionNodeConfig.js +1 -0
  245. package/dist/openapi_client/models/FunctionResponse.d.ts +24 -0
  246. package/dist/openapi_client/models/FunctionResponse.js +1 -0
  247. package/dist/openapi_client/models/FunctionRunListResponse.d.ts +9 -0
  248. package/dist/openapi_client/models/FunctionRunListResponse.js +1 -0
  249. package/dist/openapi_client/models/FunctionRunResponse.d.ts +17 -0
  250. package/dist/openapi_client/models/FunctionRunResponse.js +1 -0
  251. package/dist/openapi_client/models/FunctionRunStatus.d.ts +10 -0
  252. package/dist/openapi_client/models/FunctionRunStatus.js +15 -0
  253. package/dist/openapi_client/models/FunctionStatus.d.ts +9 -0
  254. package/dist/openapi_client/models/FunctionStatus.js +14 -0
  255. package/dist/openapi_client/models/HTTPValidationError.d.ts +4 -0
  256. package/dist/openapi_client/models/HTTPValidationError.js +1 -0
  257. package/dist/openapi_client/models/IconUploadResponse.d.ts +8 -0
  258. package/dist/openapi_client/models/IconUploadResponse.js +1 -0
  259. package/dist/openapi_client/models/LiteralInputBinding.d.ts +10 -0
  260. package/dist/openapi_client/models/LiteralInputBinding.js +1 -0
  261. package/dist/openapi_client/models/LoopNode.d.ts +11 -0
  262. package/dist/openapi_client/models/LoopNode.js +1 -0
  263. package/dist/openapi_client/models/LoopNodeConfig.d.ts +17 -0
  264. package/dist/openapi_client/models/LoopNodeConfig.js +1 -0
  265. package/dist/openapi_client/models/MessageResponseSchema.d.ts +7 -0
  266. package/dist/openapi_client/models/MessageResponseSchema.js +1 -0
  267. package/dist/openapi_client/models/NotificationContent.d.ts +4 -0
  268. package/dist/openapi_client/models/NotificationContent.js +1 -0
  269. package/dist/openapi_client/models/OauthCredentialsResponseSchema.d.ts +7 -0
  270. package/dist/openapi_client/models/OauthCredentialsResponseSchema.js +1 -0
  271. package/dist/openapi_client/models/OperationDetail.d.ts +6 -0
  272. package/dist/openapi_client/models/OperationDetail.js +1 -0
  273. package/dist/openapi_client/models/OperationExecutionRequest.d.ts +4 -0
  274. package/dist/openapi_client/models/OperationExecutionRequest.js +1 -0
  275. package/dist/openapi_client/models/OperationExecutionResponse.d.ts +3 -0
  276. package/dist/openapi_client/models/OperationExecutionResponse.js +1 -0
  277. package/dist/openapi_client/models/OperationListResponse.d.ts +6 -0
  278. package/dist/openapi_client/models/OperationListResponse.js +1 -0
  279. package/dist/openapi_client/models/OperationSummary.d.ts +4 -0
  280. package/dist/openapi_client/models/OperationSummary.js +1 -0
  281. package/dist/openapi_client/models/OrganizationCreateRequest.d.ts +6 -0
  282. package/dist/openapi_client/models/OrganizationCreateRequest.js +1 -0
  283. package/dist/openapi_client/models/OrganizationInvitationListResponse.d.ts +9 -0
  284. package/dist/openapi_client/models/OrganizationInvitationListResponse.js +1 -0
  285. package/dist/openapi_client/models/OrganizationInvitationRequest.d.ts +8 -0
  286. package/dist/openapi_client/models/OrganizationInvitationRequest.js +1 -0
  287. package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +17 -0
  288. package/dist/openapi_client/models/OrganizationInvitationResponse.js +1 -0
  289. package/dist/openapi_client/models/OrganizationInvitationStatus.d.ts +9 -0
  290. package/dist/openapi_client/models/OrganizationInvitationStatus.js +14 -0
  291. package/dist/openapi_client/models/OrganizationListResponse.d.ts +9 -0
  292. package/dist/openapi_client/models/OrganizationListResponse.js +1 -0
  293. package/dist/openapi_client/models/OrganizationMemberListResponse.d.ts +9 -0
  294. package/dist/openapi_client/models/OrganizationMemberListResponse.js +1 -0
  295. package/dist/openapi_client/models/OrganizationMemberResponse.d.ts +14 -0
  296. package/dist/openapi_client/models/OrganizationMemberResponse.js +1 -0
  297. package/dist/openapi_client/models/OrganizationMessageResponse.d.ts +7 -0
  298. package/dist/openapi_client/models/OrganizationMessageResponse.js +1 -0
  299. package/dist/openapi_client/models/OrganizationResponse.d.ts +10 -0
  300. package/dist/openapi_client/models/OrganizationResponse.js +1 -0
  301. package/dist/openapi_client/models/OrganizationRole.d.ts +8 -0
  302. package/dist/openapi_client/models/OrganizationRole.js +13 -0
  303. package/dist/openapi_client/models/PlanListResponse.d.ts +8 -0
  304. package/dist/openapi_client/models/PlanListResponse.js +1 -0
  305. package/dist/openapi_client/models/PlanResponse.d.ts +17 -0
  306. package/dist/openapi_client/models/PlanResponse.js +1 -0
  307. package/dist/openapi_client/models/PodAppConfigItem.d.ts +8 -0
  308. package/dist/openapi_client/models/PodAppConfigItem.js +1 -0
  309. package/dist/openapi_client/models/PodAppMode.d.ts +5 -0
  310. package/dist/openapi_client/models/PodAppMode.js +10 -0
  311. package/dist/openapi_client/models/PodConfigResponse.d.ts +6 -0
  312. package/dist/openapi_client/models/PodConfigResponse.js +1 -0
  313. package/dist/openapi_client/models/PodCreateRequest.d.ts +13 -0
  314. package/dist/openapi_client/models/PodCreateRequest.js +1 -0
  315. package/dist/openapi_client/models/PodFlowConfigItem.d.ts +7 -0
  316. package/dist/openapi_client/models/PodFlowConfigItem.js +1 -0
  317. package/dist/openapi_client/models/PodListResponse.d.ts +10 -0
  318. package/dist/openapi_client/models/PodListResponse.js +1 -0
  319. package/dist/openapi_client/models/PodMemberAddRequest.d.ts +8 -0
  320. package/dist/openapi_client/models/PodMemberAddRequest.js +1 -0
  321. package/dist/openapi_client/models/PodMemberListResponse.d.ts +10 -0
  322. package/dist/openapi_client/models/PodMemberListResponse.js +1 -0
  323. package/dist/openapi_client/models/PodMemberResponse.d.ts +12 -0
  324. package/dist/openapi_client/models/PodMemberResponse.js +1 -0
  325. package/dist/openapi_client/models/PodMemberUpdateRoleRequest.d.ts +7 -0
  326. package/dist/openapi_client/models/PodMemberUpdateRoleRequest.js +1 -0
  327. package/dist/openapi_client/models/PodPermissionsResponse.d.ts +4 -0
  328. package/dist/openapi_client/models/PodPermissionsResponse.js +1 -0
  329. package/dist/openapi_client/models/PodResponse.d.ts +18 -0
  330. package/dist/openapi_client/models/PodResponse.js +1 -0
  331. package/dist/openapi_client/models/PodRole.d.ts +9 -0
  332. package/dist/openapi_client/models/PodRole.js +14 -0
  333. package/dist/openapi_client/models/PodStatus.d.ts +4 -0
  334. package/dist/openapi_client/models/PodStatus.js +9 -0
  335. package/dist/openapi_client/models/PodType.d.ts +6 -0
  336. package/dist/openapi_client/models/PodType.js +11 -0
  337. package/dist/openapi_client/models/PodUpdateRequest.d.ts +12 -0
  338. package/dist/openapi_client/models/PodUpdateRequest.js +1 -0
  339. package/dist/openapi_client/models/RecentUsageResponse.d.ts +9 -0
  340. package/dist/openapi_client/models/RecentUsageResponse.js +1 -0
  341. package/dist/openapi_client/models/RecordFilter.d.ts +15 -0
  342. package/dist/openapi_client/models/RecordFilter.js +1 -0
  343. package/dist/openapi_client/models/RecordFilterOperator.d.ts +10 -0
  344. package/dist/openapi_client/models/RecordFilterOperator.js +15 -0
  345. package/dist/openapi_client/models/RecordListResponse.d.ts +9 -0
  346. package/dist/openapi_client/models/RecordListResponse.js +1 -0
  347. package/dist/openapi_client/models/RecordQueryRequest.d.ts +20 -0
  348. package/dist/openapi_client/models/RecordQueryRequest.js +1 -0
  349. package/dist/openapi_client/models/RecordQueryResponse.d.ts +13 -0
  350. package/dist/openapi_client/models/RecordQueryResponse.js +1 -0
  351. package/dist/openapi_client/models/RecordResponse.d.ts +9 -0
  352. package/dist/openapi_client/models/RecordResponse.js +1 -0
  353. package/dist/openapi_client/models/RecordSort.d.ts +11 -0
  354. package/dist/openapi_client/models/RecordSort.js +1 -0
  355. package/dist/openapi_client/models/RecordSortDirection.d.ts +4 -0
  356. package/dist/openapi_client/models/RecordSortDirection.js +9 -0
  357. package/dist/openapi_client/models/ResourceFileListResponse.d.ts +6 -0
  358. package/dist/openapi_client/models/ResourceFileListResponse.js +1 -0
  359. package/dist/openapi_client/models/ResourceType.d.ts +5 -0
  360. package/dist/openapi_client/models/ResourceType.js +10 -0
  361. package/dist/openapi_client/models/ScheduledFlowStart.d.ts +10 -0
  362. package/dist/openapi_client/models/ScheduledFlowStart.js +1 -0
  363. package/dist/openapi_client/models/SearchMethod.d.ts +5 -0
  364. package/dist/openapi_client/models/SearchMethod.js +10 -0
  365. package/dist/openapi_client/models/SearchResult.d.ts +7 -0
  366. package/dist/openapi_client/models/SearchResult.js +1 -0
  367. package/dist/openapi_client/models/SeatInfoResponse.d.ts +10 -0
  368. package/dist/openapi_client/models/SeatInfoResponse.js +1 -0
  369. package/dist/openapi_client/models/SlackSurfaceConfigCreate.d.ts +6 -0
  370. package/dist/openapi_client/models/SlackSurfaceConfigCreate.js +1 -0
  371. package/dist/openapi_client/models/StackFrame.d.ts +11 -0
  372. package/dist/openapi_client/models/StackFrame.js +1 -0
  373. package/dist/openapi_client/models/StartSubscriptionRequest.d.ts +14 -0
  374. package/dist/openapi_client/models/StartSubscriptionRequest.js +1 -0
  375. package/dist/openapi_client/models/StartSubscriptionResponse.d.ts +7 -0
  376. package/dist/openapi_client/models/StartSubscriptionResponse.js +1 -0
  377. package/dist/openapi_client/models/StepExecution.d.ts +13 -0
  378. package/dist/openapi_client/models/StepExecution.js +1 -0
  379. package/dist/openapi_client/models/SubscriptionStatus.d.ts +10 -0
  380. package/dist/openapi_client/models/SubscriptionStatus.js +15 -0
  381. package/dist/openapi_client/models/SubscriptionStatusResponse.d.ts +10 -0
  382. package/dist/openapi_client/models/SubscriptionStatusResponse.js +1 -0
  383. package/dist/openapi_client/models/SubscriptionWithPlanResponse.d.ts +19 -0
  384. package/dist/openapi_client/models/SubscriptionWithPlanResponse.js +1 -0
  385. package/dist/openapi_client/models/TableListResponse.d.ts +8 -0
  386. package/dist/openapi_client/models/TableListResponse.js +1 -0
  387. package/dist/openapi_client/models/TableResponse.d.ts +15 -0
  388. package/dist/openapi_client/models/TableResponse.js +1 -0
  389. package/dist/openapi_client/models/TaskListResponse.d.ts +9 -0
  390. package/dist/openapi_client/models/TaskListResponse.js +1 -0
  391. package/dist/openapi_client/models/TaskMessageListResponse.d.ts +9 -0
  392. package/dist/openapi_client/models/TaskMessageListResponse.js +1 -0
  393. package/dist/openapi_client/models/TaskMessageResponse.d.ts +15 -0
  394. package/dist/openapi_client/models/TaskMessageResponse.js +1 -0
  395. package/dist/openapi_client/models/TaskResponse.d.ts +16 -0
  396. package/dist/openapi_client/models/TaskResponse.js +1 -0
  397. package/dist/openapi_client/models/TaskStatus.d.ts +12 -0
  398. package/dist/openapi_client/models/TaskStatus.js +17 -0
  399. package/dist/openapi_client/models/TeamsSurfaceConfigCreate.d.ts +6 -0
  400. package/dist/openapi_client/models/TeamsSurfaceConfigCreate.js +1 -0
  401. package/dist/openapi_client/models/TextContent.d.ts +4 -0
  402. package/dist/openapi_client/models/TextContent.js +1 -0
  403. package/dist/openapi_client/models/ThinkingContent.d.ts +4 -0
  404. package/dist/openapi_client/models/ThinkingContent.js +1 -0
  405. package/dist/openapi_client/models/ToggleSurfaceRequest.d.ts +3 -0
  406. package/dist/openapi_client/models/ToggleSurfaceRequest.js +1 -0
  407. package/dist/openapi_client/models/ToolCallRequest.d.ts +6 -0
  408. package/dist/openapi_client/models/ToolCallRequest.js +1 -0
  409. package/dist/openapi_client/models/ToolCallResponse.d.ts +5 -0
  410. package/dist/openapi_client/models/ToolCallResponse.js +1 -0
  411. package/dist/openapi_client/models/ToolSet.d.ts +14 -0
  412. package/dist/openapi_client/models/ToolSet.js +19 -0
  413. package/dist/openapi_client/models/TriggerListResponse.d.ts +9 -0
  414. package/dist/openapi_client/models/TriggerListResponse.js +1 -0
  415. package/dist/openapi_client/models/TriggerResponse.d.ts +20 -0
  416. package/dist/openapi_client/models/TriggerResponse.js +1 -0
  417. package/dist/openapi_client/models/TriggerType.d.ts +8 -0
  418. package/dist/openapi_client/models/TriggerType.js +13 -0
  419. package/dist/openapi_client/models/UpdateAgentRequest.d.ts +15 -0
  420. package/dist/openapi_client/models/UpdateAgentRequest.js +1 -0
  421. package/dist/openapi_client/models/UpdateAssistantRequest.d.ts +13 -0
  422. package/dist/openapi_client/models/UpdateAssistantRequest.js +1 -0
  423. package/dist/openapi_client/models/UpdateConversationRequest.d.ts +8 -0
  424. package/dist/openapi_client/models/UpdateConversationRequest.js +1 -0
  425. package/dist/openapi_client/models/UpdateDatastoreRequest.d.ts +17 -0
  426. package/dist/openapi_client/models/UpdateDatastoreRequest.js +1 -0
  427. package/dist/openapi_client/models/UpdateDeskRequest.d.ts +4 -0
  428. package/dist/openapi_client/models/UpdateDeskRequest.js +1 -0
  429. package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +12 -0
  430. package/dist/openapi_client/models/UpdateFunctionRequest.js +1 -0
  431. package/dist/openapi_client/models/UpdateMemberRoleRequest.d.ts +7 -0
  432. package/dist/openapi_client/models/UpdateMemberRoleRequest.js +1 -0
  433. package/dist/openapi_client/models/UpdateRecordRequest.d.ts +9 -0
  434. package/dist/openapi_client/models/UpdateRecordRequest.js +1 -0
  435. package/dist/openapi_client/models/UpdateSurfaceRequest.d.ts +7 -0
  436. package/dist/openapi_client/models/UpdateSurfaceRequest.js +1 -0
  437. package/dist/openapi_client/models/UpdateTableRequest.d.ts +9 -0
  438. package/dist/openapi_client/models/UpdateTableRequest.js +1 -0
  439. package/dist/openapi_client/models/UpdateTriggerRequest.d.ts +9 -0
  440. package/dist/openapi_client/models/UpdateTriggerRequest.js +1 -0
  441. package/dist/openapi_client/models/UsageRecordResponse.d.ts +21 -0
  442. package/dist/openapi_client/models/UsageRecordResponse.js +1 -0
  443. package/dist/openapi_client/models/UsageSummaryResponse.d.ts +16 -0
  444. package/dist/openapi_client/models/UsageSummaryResponse.js +1 -0
  445. package/dist/openapi_client/models/UserProfileRequest.d.ts +11 -0
  446. package/dist/openapi_client/models/UserProfileRequest.js +1 -0
  447. package/dist/openapi_client/models/UserResponse.d.ts +18 -0
  448. package/dist/openapi_client/models/UserResponse.js +1 -0
  449. package/dist/openapi_client/models/ValidationError.d.ts +5 -0
  450. package/dist/openapi_client/models/ValidationError.js +1 -0
  451. package/dist/openapi_client/models/VerifyTokenResponse.d.ts +4 -0
  452. package/dist/openapi_client/models/VerifyTokenResponse.js +1 -0
  453. package/dist/openapi_client/models/WaitUntilNode.d.ts +11 -0
  454. package/dist/openapi_client/models/WaitUntilNode.js +1 -0
  455. package/dist/openapi_client/models/WaitUntilNodeConfig.d.ts +3 -0
  456. package/dist/openapi_client/models/WaitUntilNodeConfig.js +1 -0
  457. package/dist/openapi_client/models/WebSearchAgentRequest.d.ts +9 -0
  458. package/dist/openapi_client/models/WebSearchAgentRequest.js +1 -0
  459. package/dist/openapi_client/models/WebSearchAgentResponse.d.ts +25 -0
  460. package/dist/openapi_client/models/WebSearchAgentResponse.js +1 -0
  461. package/dist/openapi_client/models/WebSearchRequest.d.ts +13 -0
  462. package/dist/openapi_client/models/WebSearchRequest.js +1 -0
  463. package/dist/openapi_client/models/WebSearchResponse.d.ts +22 -0
  464. package/dist/openapi_client/models/WebSearchResponse.js +1 -0
  465. package/dist/openapi_client/models/WhatsAppSurfaceConfigCreate.d.ts +5 -0
  466. package/dist/openapi_client/models/WhatsAppSurfaceConfigCreate.js +1 -0
  467. package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +23 -0
  468. package/dist/openapi_client/models/WorkflowCreateRequest.js +1 -0
  469. package/dist/openapi_client/models/WorkflowEdge.d.ts +9 -0
  470. package/dist/openapi_client/models/WorkflowEdge.js +1 -0
  471. package/dist/openapi_client/models/WorkflowGraphUpdateRequest.d.ts +26 -0
  472. package/dist/openapi_client/models/WorkflowGraphUpdateRequest.js +1 -0
  473. package/dist/openapi_client/models/WorkflowInstallRequest.d.ts +6 -0
  474. package/dist/openapi_client/models/WorkflowInstallRequest.js +1 -0
  475. package/dist/openapi_client/models/WorkflowListResponse.d.ts +6 -0
  476. package/dist/openapi_client/models/WorkflowListResponse.js +1 -0
  477. package/dist/openapi_client/models/WorkflowRunListResponse.d.ts +6 -0
  478. package/dist/openapi_client/models/WorkflowRunListResponse.js +1 -0
  479. package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +19 -0
  480. package/dist/openapi_client/models/WorkflowUpdateRequest.js +1 -0
  481. package/dist/openapi_client/services/AgentToolsService.d.ts +23 -0
  482. package/dist/openapi_client/services/AgentToolsService.js +40 -0
  483. package/dist/openapi_client/services/AgentsService.d.ts +55 -0
  484. package/dist/openapi_client/services/AgentsService.js +117 -0
  485. package/dist/openapi_client/services/ApplicationsService.d.ts +82 -0
  486. package/dist/openapi_client/services/ApplicationsService.js +175 -0
  487. package/dist/openapi_client/services/AssistantSurfacesService.d.ts +55 -0
  488. package/dist/openapi_client/services/AssistantSurfacesService.js +120 -0
  489. package/dist/openapi_client/services/AssistantsService.d.ts +49 -0
  490. package/dist/openapi_client/services/AssistantsService.js +112 -0
  491. package/dist/openapi_client/services/AuthService.d.ts +11 -0
  492. package/dist/openapi_client/services/AuthService.js +16 -0
  493. package/dist/openapi_client/services/AuthorizationService.d.ts +11 -0
  494. package/dist/openapi_client/services/AuthorizationService.js +22 -0
  495. package/dist/openapi_client/services/BillingSubscriptionsService.d.ts +56 -0
  496. package/dist/openapi_client/services/BillingSubscriptionsService.js +93 -0
  497. package/dist/openapi_client/services/BillingUsageService.d.ts +54 -0
  498. package/dist/openapi_client/services/BillingUsageService.js +122 -0
  499. package/dist/openapi_client/services/BillingWebhooksService.d.ts +12 -0
  500. package/dist/openapi_client/services/BillingWebhooksService.js +25 -0
  501. package/dist/openapi_client/services/ConversationsService.d.ts +80 -0
  502. package/dist/openapi_client/services/ConversationsService.js +190 -0
  503. package/dist/openapi_client/services/DatastoreService.d.ts +67 -0
  504. package/dist/openapi_client/services/DatastoreService.js +141 -0
  505. package/dist/openapi_client/services/DefaultService.d.ts +9 -0
  506. package/dist/openapi_client/services/DefaultService.js +15 -0
  507. package/dist/openapi_client/services/DesksService.d.ts +77 -0
  508. package/dist/openapi_client/services/DesksService.js +175 -0
  509. package/dist/openapi_client/services/FilesService.d.ts +129 -0
  510. package/dist/openapi_client/services/FilesService.js +291 -0
  511. package/dist/openapi_client/services/FunctionsService.d.ts +89 -0
  512. package/dist/openapi_client/services/FunctionsService.js +191 -0
  513. package/dist/openapi_client/services/IconsService.d.ts +21 -0
  514. package/dist/openapi_client/services/IconsService.js +41 -0
  515. package/dist/openapi_client/services/IntegrationsService.d.ts +59 -0
  516. package/dist/openapi_client/services/IntegrationsService.js +121 -0
  517. package/dist/openapi_client/services/OrganizationsService.d.ts +122 -0
  518. package/dist/openapi_client/services/OrganizationsService.js +262 -0
  519. package/dist/openapi_client/services/PodMembersService.d.ts +45 -0
  520. package/dist/openapi_client/services/PodMembersService.js +96 -0
  521. package/dist/openapi_client/services/PodsService.d.ts +59 -0
  522. package/dist/openapi_client/services/PodsService.js +126 -0
  523. package/dist/openapi_client/services/PublicSdkService.d.ts +17 -0
  524. package/dist/openapi_client/services/PublicSdkService.js +35 -0
  525. package/dist/openapi_client/services/RecordsService.d.ts +113 -0
  526. package/dist/openapi_client/services/RecordsService.js +241 -0
  527. package/dist/openapi_client/services/TablesService.d.ts +83 -0
  528. package/dist/openapi_client/services/TablesService.js +178 -0
  529. package/dist/openapi_client/services/TasksService.d.ts +76 -0
  530. package/dist/openapi_client/services/TasksService.js +167 -0
  531. package/dist/openapi_client/services/TriggersService.d.ts +53 -0
  532. package/dist/openapi_client/services/TriggersService.js +109 -0
  533. package/dist/openapi_client/services/UsersService.d.ts +27 -0
  534. package/dist/openapi_client/services/UsersService.js +46 -0
  535. package/dist/openapi_client/services/WebhooksService.d.ts +27 -0
  536. package/dist/openapi_client/services/WebhooksService.js +61 -0
  537. package/dist/openapi_client/services/WorkflowsService.d.ts +147 -0
  538. package/dist/openapi_client/services/WorkflowsService.js +326 -0
  539. package/dist/react/AuthGuard.d.ts +22 -0
  540. package/dist/react/AuthGuard.js +62 -0
  541. package/dist/react/index.d.ts +4 -0
  542. package/dist/react/index.js +2 -0
  543. package/dist/react/useAuth.d.ts +16 -0
  544. package/dist/react/useAuth.js +29 -0
  545. package/dist/supertokens.d.ts +1 -0
  546. package/dist/supertokens.js +67 -0
  547. package/dist/types.d.ts +27 -0
  548. package/dist/types.js +1 -0
  549. package/package.json +62 -0
@@ -0,0 +1,4020 @@
1
+ (() => {
2
+ const modules = {
3
+ "./browser.js": function (module, exports, require) {
4
+ "use strict";
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ApiError = exports.AuthManager = exports.LemmaClient = void 0;
7
+ /**
8
+ * Browser bundle entry point.
9
+ * Exposes LemmaClient as globalThis.LemmaClient.LemmaClient
10
+ *
11
+ * Usage in HTML:
12
+ * <script src="/lemma-client.js"></script>
13
+ * <script>
14
+ * const client = new window.LemmaClient.LemmaClient({ podId: "...", apiUrl: "..." });
15
+ * </script>
16
+ */
17
+ var client_js_1 = require("./client.js");
18
+ Object.defineProperty(exports, "LemmaClient", { enumerable: true, get: function () { return client_js_1.LemmaClient; } });
19
+ var auth_js_1 = require("./auth.js");
20
+ Object.defineProperty(exports, "AuthManager", { enumerable: true, get: function () { return auth_js_1.AuthManager; } });
21
+ var http_js_1 = require("./http.js");
22
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return http_js_1.ApiError; } });
23
+
24
+ },
25
+ "./client.js": function (module, exports, require) {
26
+ "use strict";
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.LemmaClient = exports.AuthManager = void 0;
29
+ const config_js_1 = require("./config.js");
30
+ const auth_js_1 = require("./auth.js");
31
+ Object.defineProperty(exports, "AuthManager", { enumerable: true, get: function () { return auth_js_1.AuthManager; } });
32
+ const generated_js_1 = require("./generated.js");
33
+ const http_js_1 = require("./http.js");
34
+ const datastores_js_1 = require("./namespaces/datastores.js");
35
+ const tables_js_1 = require("./namespaces/tables.js");
36
+ const records_js_1 = require("./namespaces/records.js");
37
+ const files_js_1 = require("./namespaces/files.js");
38
+ const functions_js_1 = require("./namespaces/functions.js");
39
+ const agents_js_1 = require("./namespaces/agents.js");
40
+ const tasks_js_1 = require("./namespaces/tasks.js");
41
+ const assistants_js_1 = require("./namespaces/assistants.js");
42
+ const workflows_js_1 = require("./namespaces/workflows.js");
43
+ const desks_js_1 = require("./namespaces/desks.js");
44
+ const integrations_js_1 = require("./namespaces/integrations.js");
45
+ class LemmaClient {
46
+ constructor(overrides = {}) {
47
+ this._config = (0, config_js_1.resolveConfig)(overrides);
48
+ this._currentPodId = this._config.podId;
49
+ this._podId = this._config.podId;
50
+ this.auth = new auth_js_1.AuthManager(this._config.apiUrl, this._config.authUrl);
51
+ this._http = new http_js_1.HttpClient(this._config.apiUrl, this.auth);
52
+ this._generated = new generated_js_1.GeneratedClientAdapter(this._config.apiUrl, this.auth);
53
+ const podIdFn = () => {
54
+ if (!this._currentPodId) {
55
+ throw new Error("pod_id is required. Pass podId in the constructor or call client.setPodId(id).");
56
+ }
57
+ return this._currentPodId;
58
+ };
59
+ this.datastores = new datastores_js_1.DatastoresNamespace(this._generated, podIdFn);
60
+ this.tables = new tables_js_1.TablesNamespace(this._generated, podIdFn);
61
+ this.records = new records_js_1.RecordsNamespace(this._generated, podIdFn);
62
+ this.files = new files_js_1.FilesNamespace(this._generated, this._http, podIdFn);
63
+ this.functions = new functions_js_1.FunctionsNamespace(this._generated, podIdFn);
64
+ this.agents = new agents_js_1.AgentsNamespace(this._generated, podIdFn);
65
+ this.tasks = new tasks_js_1.TasksNamespace(this._generated, podIdFn);
66
+ this.assistants = new assistants_js_1.AssistantsNamespace(this._generated, podIdFn);
67
+ this.conversations = new assistants_js_1.ConversationsNamespace(this._generated, podIdFn);
68
+ this.workflows = new workflows_js_1.WorkflowsNamespace(this._generated, podIdFn);
69
+ this.desks = new desks_js_1.DesksNamespace(this._generated, this._http, podIdFn);
70
+ this.integrations = new integrations_js_1.IntegrationsNamespace(this._generated);
71
+ }
72
+ /** Change the active pod ID for subsequent calls. */
73
+ setPodId(podId) {
74
+ this._currentPodId = podId;
75
+ }
76
+ /** Return a new client scoped to a specific pod, sharing auth state. */
77
+ withPod(podId) {
78
+ return new LemmaClient({ ...this._config, podId });
79
+ }
80
+ get podId() {
81
+ return this._currentPodId;
82
+ }
83
+ get apiUrl() {
84
+ return this._config.apiUrl;
85
+ }
86
+ get authUrl() {
87
+ return this._config.authUrl;
88
+ }
89
+ /**
90
+ * Initialize the client by checking auth state.
91
+ * Call this once on app startup (or let AuthGuard handle it).
92
+ */
93
+ async initialize() {
94
+ return this.auth.checkAuth();
95
+ }
96
+ /** Raw HTTP request — escape hatch for operations not covered by namespaces. */
97
+ request(method, path, options) {
98
+ return this._http.request(method, path, options);
99
+ }
100
+ }
101
+ exports.LemmaClient = LemmaClient;
102
+
103
+ },
104
+ "./config.js": function (module, exports, require) {
105
+ "use strict";
106
+ Object.defineProperty(exports, "__esModule", { value: true });
107
+ exports.resolveConfig = resolveConfig;
108
+ function fromEnv(key) {
109
+ // Vite: import.meta.env.VITE_*
110
+ // CRA / webpack: process.env.REACT_APP_*
111
+ // Node: process.env.*
112
+ try {
113
+ // @ts-ignore — import.meta is valid in ESM/Vite builds; try/catch guards CJS bundles
114
+ const meta = import.meta.env; // eslint-disable-line
115
+ if (meta) {
116
+ return (meta[`VITE_LEMMA_${key}`] ??
117
+ meta[`REACT_APP_LEMMA_${key}`] ??
118
+ meta[`LEMMA_${key}`]);
119
+ }
120
+ }
121
+ catch {
122
+ // not available in CJS/browser bundle context
123
+ }
124
+ try {
125
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
+ const env = globalThis.process?.env;
127
+ if (env) {
128
+ return env[`LEMMA_${key}`];
129
+ }
130
+ }
131
+ catch {
132
+ // not available
133
+ }
134
+ return undefined;
135
+ }
136
+ function windowConfig() {
137
+ if (typeof window !== "undefined" && window.__LEMMA_CONFIG__) {
138
+ return window.__LEMMA_CONFIG__;
139
+ }
140
+ return {};
141
+ }
142
+ function resolveConfig(overrides = {}) {
143
+ const win = windowConfig();
144
+ const apiUrl = overrides.apiUrl ??
145
+ win.apiUrl ??
146
+ fromEnv("API_URL") ??
147
+ "http://localhost:8000";
148
+ const authUrl = overrides.authUrl ??
149
+ win.authUrl ??
150
+ fromEnv("AUTH_URL") ??
151
+ "http://localhost:3000";
152
+ const podId = overrides.podId ??
153
+ win.podId ??
154
+ fromEnv("POD_ID");
155
+ return { apiUrl: apiUrl.replace(/\/$/, ""), authUrl: authUrl.replace(/\/$/, ""), podId };
156
+ }
157
+
158
+ },
159
+ "./auth.js": function (module, exports, require) {
160
+ "use strict";
161
+ /**
162
+ * Auth module — cookie-based auth (production) with Bearer token fallback
163
+ * for agent/dev testing.
164
+ *
165
+ * Auth resolution order on init:
166
+ * 1. ?lemma_token=<token> query param (stored in memory for session)
167
+ * 2. localStorage.getItem("lemma_token")
168
+ * 3. Session cookie (credentials: "include") — production path
169
+ *
170
+ * If a token is found in (1) or (2), all requests use Authorization: Bearer <token>.
171
+ * Otherwise requests rely on cookies, and the server must set the session cookie
172
+ * after the user authenticates at the auth service. In cookie mode we initialise
173
+ * the SuperTokens browser SDK so fetch/XHR automatically handles anti-CSRF and
174
+ * refresh-token flows for mutating requests.
175
+ *
176
+ * Auth state is determined by calling GET /users/me (user.current.get).
177
+ * 401 → unauthenticated. 200 → authenticated.
178
+ */
179
+ Object.defineProperty(exports, "__esModule", { value: true });
180
+ exports.AuthManager = void 0;
181
+ const supertokens_js_1 = require("./supertokens.js");
182
+ const LOCALSTORAGE_TOKEN_KEY = "lemma_token";
183
+ const QUERY_PARAM_TOKEN_KEY = "lemma_token";
184
+ function detectInjectedToken() {
185
+ if (typeof window === "undefined")
186
+ return null;
187
+ // 1. Query param — highest priority, persist to sessionStorage for this session
188
+ try {
189
+ const params = new URLSearchParams(window.location.search);
190
+ const qpToken = params.get(QUERY_PARAM_TOKEN_KEY);
191
+ if (qpToken) {
192
+ try {
193
+ sessionStorage.setItem(LOCALSTORAGE_TOKEN_KEY, qpToken);
194
+ }
195
+ catch { /* ignore */ }
196
+ return qpToken;
197
+ }
198
+ }
199
+ catch { /* ignore */ }
200
+ // 2. sessionStorage — survives HMR and same-tab navigation
201
+ try {
202
+ const stored = sessionStorage.getItem(LOCALSTORAGE_TOKEN_KEY);
203
+ if (stored)
204
+ return stored;
205
+ }
206
+ catch { /* ignore */ }
207
+ // 3. localStorage — set manually by dev/agent for persistent testing
208
+ try {
209
+ const stored = localStorage.getItem(LOCALSTORAGE_TOKEN_KEY);
210
+ if (stored)
211
+ return stored;
212
+ }
213
+ catch { /* ignore */ }
214
+ return null;
215
+ }
216
+ class AuthManager {
217
+ constructor(apiUrl, authUrl) {
218
+ this.state = { status: "loading", user: null };
219
+ this.listeners = new Set();
220
+ this.apiUrl = apiUrl;
221
+ this.authUrl = authUrl;
222
+ this.injectedToken = detectInjectedToken();
223
+ if (!this.injectedToken) {
224
+ (0, supertokens_js_1.ensureCookieSessionSupport)(this.apiUrl, () => this.markUnauthenticated());
225
+ }
226
+ }
227
+ /** Whether requests will use an injected Bearer token (testing mode). */
228
+ get isTokenMode() {
229
+ return this.injectedToken !== null;
230
+ }
231
+ /** The current injected Bearer token, if token-mode auth is active. */
232
+ getBearerToken() {
233
+ return this.injectedToken;
234
+ }
235
+ /** The current auth state. */
236
+ getState() {
237
+ return this.state;
238
+ }
239
+ /** True if currently authenticated (status === "authenticated"). */
240
+ isAuthenticated() {
241
+ return this.state.status === "authenticated";
242
+ }
243
+ /** Subscribe to auth state changes. Returns an unsubscribe function. */
244
+ subscribe(listener) {
245
+ this.listeners.add(listener);
246
+ return () => this.listeners.delete(listener);
247
+ }
248
+ notify() {
249
+ this.listeners.forEach((l) => l(this.state));
250
+ }
251
+ setState(state) {
252
+ this.state = state;
253
+ this.notify();
254
+ }
255
+ /**
256
+ * Build request headers for an API call.
257
+ * Uses Bearer token if one was injected, otherwise omits Authorization
258
+ * and lets cookies carry the session.
259
+ */
260
+ getRequestInit(init = {}) {
261
+ const headers = {
262
+ "Content-Type": "application/json",
263
+ Accept: "application/json",
264
+ ...init.headers,
265
+ };
266
+ if (this.injectedToken) {
267
+ headers["Authorization"] = `Bearer ${this.injectedToken}`;
268
+ }
269
+ return {
270
+ ...init,
271
+ credentials: this.injectedToken ? "omit" : "include",
272
+ headers,
273
+ };
274
+ }
275
+ /**
276
+ * Call GET /users/me to determine auth state.
277
+ * Sets internal state and notifies listeners.
278
+ */
279
+ async checkAuth() {
280
+ this.setState({ status: "loading", user: null });
281
+ try {
282
+ const response = await fetch(`${this.apiUrl}/users/me`, this.getRequestInit({ method: "GET" }));
283
+ // Only 401 means not authenticated — 403 means authenticated but forbidden
284
+ if (response.status === 401) {
285
+ const next = { status: "unauthenticated", user: null };
286
+ this.setState(next);
287
+ return next;
288
+ }
289
+ if (!response.ok) {
290
+ // For non-401 errors on /users/me, treat as unauthenticated (conservative)
291
+ const next = { status: "unauthenticated", user: null };
292
+ this.setState(next);
293
+ return next;
294
+ }
295
+ const user = (await response.json());
296
+ const next = { status: "authenticated", user };
297
+ this.setState(next);
298
+ return next;
299
+ }
300
+ catch {
301
+ const next = { status: "unauthenticated", user: null };
302
+ this.setState(next);
303
+ return next;
304
+ }
305
+ }
306
+ /**
307
+ * Mark the session as unauthenticated (e.g. after a 401 response).
308
+ * Does NOT redirect — call redirectToAuth() explicitly if desired.
309
+ */
310
+ markUnauthenticated() {
311
+ this.setState({ status: "unauthenticated", user: null });
312
+ }
313
+ /**
314
+ * Redirect to the auth service, passing the current URL as redirect_uri.
315
+ * After the user authenticates, the auth service should redirect back to
316
+ * the original URL and set the session cookie.
317
+ */
318
+ redirectToAuth() {
319
+ if (typeof window === "undefined") {
320
+ return;
321
+ }
322
+ const redirectUri = encodeURIComponent(window.location.href);
323
+ window.location.href = `${this.authUrl}?redirect_uri=${redirectUri}`;
324
+ }
325
+ }
326
+ exports.AuthManager = AuthManager;
327
+
328
+ },
329
+ "./supertokens.js": function (module, exports, require) {
330
+ "use strict";
331
+ Object.defineProperty(exports, "__esModule", { value: true });
332
+ exports.ensureCookieSessionSupport = ensureCookieSessionSupport;
333
+ const supertokens_web_js_1 = require("supertokens-web-js");
334
+ const session_1 = require("supertokens-web-js/recipe/session");
335
+ const APP_NAME = "Lemma";
336
+ const SESSION_API_SUFFIX = "/st/auth";
337
+ let initializedSignature = null;
338
+ const unauthorisedListeners = new Set();
339
+ function normalizePath(pathname) {
340
+ const trimmed = pathname.trim();
341
+ if (!trimmed || trimmed === "/") {
342
+ return "";
343
+ }
344
+ const withLeadingSlash = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
345
+ return withLeadingSlash.endsWith("/") ? withLeadingSlash.slice(0, -1) : withLeadingSlash;
346
+ }
347
+ function resolveApiBase(apiUrl) {
348
+ if (typeof window === "undefined") {
349
+ throw new Error("Cookie session support requires a browser environment.");
350
+ }
351
+ if (/^https?:\/\//.test(apiUrl)) {
352
+ const url = new URL(apiUrl);
353
+ const apiPrefix = normalizePath(url.pathname);
354
+ return {
355
+ apiDomain: url.origin,
356
+ apiBasePath: `${apiPrefix}${SESSION_API_SUFFIX}` || SESSION_API_SUFFIX,
357
+ };
358
+ }
359
+ const apiPrefix = normalizePath(apiUrl);
360
+ return {
361
+ apiDomain: window.location.origin,
362
+ apiBasePath: `${apiPrefix}${SESSION_API_SUFFIX}` || SESSION_API_SUFFIX,
363
+ };
364
+ }
365
+ function ensureCookieSessionSupport(apiUrl, onUnauthorised) {
366
+ if (typeof window === "undefined") {
367
+ return;
368
+ }
369
+ if (onUnauthorised) {
370
+ unauthorisedListeners.add(onUnauthorised);
371
+ }
372
+ const { apiDomain, apiBasePath } = resolveApiBase(apiUrl);
373
+ const signature = `${apiDomain}${apiBasePath}`;
374
+ if (initializedSignature === signature) {
375
+ return;
376
+ }
377
+ if (initializedSignature !== null && initializedSignature !== signature) {
378
+ console.warn(`[lemma] SuperTokens was already initialised for ${initializedSignature}; continuing with the existing session config.`);
379
+ return;
380
+ }
381
+ supertokens_web_js_1.default.init({
382
+ appInfo: {
383
+ appName: APP_NAME,
384
+ apiDomain,
385
+ apiBasePath,
386
+ },
387
+ recipeList: [
388
+ session_1.default.init({
389
+ tokenTransferMethod: "cookie",
390
+ onHandleEvent: (event) => {
391
+ if (event.action === "UNAUTHORISED") {
392
+ unauthorisedListeners.forEach((listener) => listener());
393
+ }
394
+ },
395
+ }),
396
+ ],
397
+ });
398
+ initializedSignature = signature;
399
+ }
400
+
401
+ },
402
+ "./generated.js": function (module, exports, require) {
403
+ "use strict";
404
+ Object.defineProperty(exports, "__esModule", { value: true });
405
+ exports.GeneratedClientAdapter = void 0;
406
+ const http_js_1 = require("./http.js");
407
+ const ApiError_js_1 = require("./openapi_client/core/ApiError.js");
408
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
409
+ function extractMessage(body, fallback) {
410
+ if (body && typeof body === "object" && typeof body.message === "string") {
411
+ return body.message;
412
+ }
413
+ return fallback;
414
+ }
415
+ function extractCode(body) {
416
+ if (body && typeof body === "object" && typeof body.code === "string") {
417
+ return body.code;
418
+ }
419
+ return undefined;
420
+ }
421
+ function extractDetails(body) {
422
+ if (body && typeof body === "object" && "details" in body) {
423
+ return body.details;
424
+ }
425
+ return undefined;
426
+ }
427
+ class GeneratedClientAdapter {
428
+ constructor(apiUrl, auth) {
429
+ this.apiUrl = apiUrl;
430
+ this.auth = auth;
431
+ }
432
+ configure() {
433
+ OpenAPI_js_1.OpenAPI.BASE = this.apiUrl;
434
+ OpenAPI_js_1.OpenAPI.WITH_CREDENTIALS = true;
435
+ OpenAPI_js_1.OpenAPI.CREDENTIALS = this.auth.isTokenMode ? "omit" : "include";
436
+ OpenAPI_js_1.OpenAPI.TOKEN = this.auth.getBearerToken() ?? undefined;
437
+ OpenAPI_js_1.OpenAPI.HEADERS = undefined;
438
+ }
439
+ async request(operation) {
440
+ this.configure();
441
+ try {
442
+ return await operation();
443
+ }
444
+ catch (error) {
445
+ if (error instanceof ApiError_js_1.ApiError) {
446
+ if (error.status === 401) {
447
+ this.auth.markUnauthenticated();
448
+ }
449
+ throw new http_js_1.ApiError(error.status, extractMessage(error.body, error.message), extractCode(error.body), extractDetails(error.body), error.body);
450
+ }
451
+ throw error;
452
+ }
453
+ }
454
+ }
455
+ exports.GeneratedClientAdapter = GeneratedClientAdapter;
456
+
457
+ },
458
+ "./http.js": function (module, exports, require) {
459
+ "use strict";
460
+ /**
461
+ * Thin HTTP layer that wraps fetch with auth injection, error handling,
462
+ * and automatic 401→unauthenticated state propagation.
463
+ */
464
+ Object.defineProperty(exports, "__esModule", { value: true });
465
+ exports.HttpClient = exports.ApiError = void 0;
466
+ class ApiError extends Error {
467
+ constructor(statusCode, message, code, details, rawResponse) {
468
+ super(message);
469
+ this.statusCode = statusCode;
470
+ this.code = code;
471
+ this.details = details;
472
+ this.rawResponse = rawResponse;
473
+ this.name = "ApiError";
474
+ }
475
+ }
476
+ exports.ApiError = ApiError;
477
+ class HttpClient {
478
+ constructor(apiUrl, auth) {
479
+ this.apiUrl = apiUrl;
480
+ this.auth = auth;
481
+ }
482
+ async parseError(response) {
483
+ let message = response.statusText || "Request failed";
484
+ let code;
485
+ let details;
486
+ let raw = null;
487
+ try {
488
+ const body = await response.json();
489
+ raw = body;
490
+ if (body && typeof body === "object") {
491
+ message = body.message ?? message;
492
+ code = body.code;
493
+ details = body.details;
494
+ }
495
+ }
496
+ catch {
497
+ // non-JSON error body
498
+ }
499
+ return new ApiError(response.status, message, code, details, raw);
500
+ }
501
+ async request(method, path, options = {}) {
502
+ let url = `${this.apiUrl}${path}`;
503
+ if (options.params) {
504
+ const qs = Object.entries(options.params)
505
+ .filter(([, v]) => v !== undefined && v !== null)
506
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`)
507
+ .join("&");
508
+ if (qs) {
509
+ url += `?${qs}`;
510
+ }
511
+ }
512
+ const initBase = { method };
513
+ if (options.body !== undefined && !options.isFormData) {
514
+ initBase.body = JSON.stringify(options.body);
515
+ }
516
+ else if (options.isFormData && options.body instanceof FormData) {
517
+ initBase.body = options.body;
518
+ }
519
+ // For FormData, let the browser set Content-Type with boundary
520
+ const init = options.isFormData
521
+ ? {
522
+ ...this.auth.getRequestInit(initBase),
523
+ headers: Object.fromEntries(Object.entries(this.auth.getRequestInit(initBase).headers ?? {}).filter(([k]) => k.toLowerCase() !== "content-type")),
524
+ }
525
+ : this.auth.getRequestInit(initBase);
526
+ const response = await fetch(url, init);
527
+ // Only 401 means the session is gone — 403 is a permission/RLS error, not an auth failure
528
+ if (response.status === 401) {
529
+ this.auth.markUnauthenticated();
530
+ }
531
+ if (!response.ok) {
532
+ throw await this.parseError(response);
533
+ }
534
+ if (response.status === 204) {
535
+ return undefined;
536
+ }
537
+ const contentType = response.headers.get("content-type") ?? "";
538
+ if (contentType.includes("application/json")) {
539
+ return response.json();
540
+ }
541
+ return response.text();
542
+ }
543
+ async requestBytes(method, path) {
544
+ const url = `${this.apiUrl}${path}`;
545
+ const response = await fetch(url, this.auth.getRequestInit({ method }));
546
+ if (response.status === 401) {
547
+ this.auth.markUnauthenticated();
548
+ }
549
+ if (!response.ok) {
550
+ throw await this.parseError(response);
551
+ }
552
+ return response.blob();
553
+ }
554
+ }
555
+ exports.HttpClient = HttpClient;
556
+
557
+ },
558
+ "./openapi_client/core/ApiError.js": function (module, exports, require) {
559
+ "use strict";
560
+ Object.defineProperty(exports, "__esModule", { value: true });
561
+ exports.ApiError = void 0;
562
+ class ApiError extends Error {
563
+ constructor(request, response, message) {
564
+ super(message);
565
+ this.name = 'ApiError';
566
+ this.url = response.url;
567
+ this.status = response.status;
568
+ this.statusText = response.statusText;
569
+ this.body = response.body;
570
+ this.request = request;
571
+ }
572
+ }
573
+ exports.ApiError = ApiError;
574
+
575
+ },
576
+ "./openapi_client/core/OpenAPI.js": function (module, exports, require) {
577
+ "use strict";
578
+ Object.defineProperty(exports, "__esModule", { value: true });
579
+ exports.OpenAPI = void 0;
580
+ exports.OpenAPI = {
581
+ BASE: '',
582
+ VERSION: '1.0.0',
583
+ WITH_CREDENTIALS: false,
584
+ CREDENTIALS: 'include',
585
+ TOKEN: undefined,
586
+ USERNAME: undefined,
587
+ PASSWORD: undefined,
588
+ HEADERS: undefined,
589
+ ENCODE_PATH: undefined,
590
+ };
591
+
592
+ },
593
+ "./namespaces/datastores.js": function (module, exports, require) {
594
+ "use strict";
595
+ Object.defineProperty(exports, "__esModule", { value: true });
596
+ exports.DatastoresNamespace = void 0;
597
+ const DatastoreService_js_1 = require("./openapi_client/services/DatastoreService.js");
598
+ class DatastoresNamespace {
599
+ constructor(client, podId) {
600
+ this.client = client;
601
+ this.podId = podId;
602
+ }
603
+ list(options = {}) {
604
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreList(this.podId(), options.limit ?? 100, options.pageToken));
605
+ }
606
+ create(payload) {
607
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreCreate(this.podId(), payload));
608
+ }
609
+ get(name) {
610
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreGet(this.podId(), name));
611
+ }
612
+ update(name, payload) {
613
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreUpdate(this.podId(), name, payload));
614
+ }
615
+ delete(name) {
616
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreDelete(this.podId(), name));
617
+ }
618
+ query(name, request) {
619
+ const payload = typeof request === "string" ? { query: request } : request;
620
+ return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreQuery(this.podId(), name, payload));
621
+ }
622
+ }
623
+ exports.DatastoresNamespace = DatastoresNamespace;
624
+
625
+ },
626
+ "./openapi_client/services/DatastoreService.js": function (module, exports, require) {
627
+ "use strict";
628
+ Object.defineProperty(exports, "__esModule", { value: true });
629
+ exports.DatastoreService = void 0;
630
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
631
+ const request_js_1 = require("./openapi_client/core/request.js");
632
+ class DatastoreService {
633
+ /**
634
+ * Create Datastore
635
+ * Create a datastore namespace inside a pod. Use this before creating tables. Datastore names are normalized for stable API paths.
636
+ * @param podId
637
+ * @param requestBody
638
+ * @returns DatastoreResponse Successful Response
639
+ * @throws ApiError
640
+ */
641
+ static datastoreCreate(podId, requestBody) {
642
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
643
+ method: 'POST',
644
+ url: '/pods/{pod_id}/datastores',
645
+ path: {
646
+ 'pod_id': podId,
647
+ },
648
+ body: requestBody,
649
+ mediaType: 'application/json',
650
+ errors: {
651
+ 422: `Validation Error`,
652
+ },
653
+ });
654
+ }
655
+ /**
656
+ * List Datastores
657
+ * List datastores available in the pod.
658
+ * @param podId
659
+ * @param limit Max number of datastores to return.
660
+ * @param pageToken Cursor from a previous response to fetch the next page.
661
+ * @returns DatastoreListResponse Successful Response
662
+ * @throws ApiError
663
+ */
664
+ static datastoreList(podId, limit = 100, pageToken) {
665
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
666
+ method: 'GET',
667
+ url: '/pods/{pod_id}/datastores',
668
+ path: {
669
+ 'pod_id': podId,
670
+ },
671
+ query: {
672
+ 'limit': limit,
673
+ 'page_token': pageToken,
674
+ },
675
+ errors: {
676
+ 422: `Validation Error`,
677
+ },
678
+ });
679
+ }
680
+ /**
681
+ * Get Datastore
682
+ * Get datastore metadata by datastore name.
683
+ * @param podId
684
+ * @param datastoreName
685
+ * @returns DatastoreResponse Successful Response
686
+ * @throws ApiError
687
+ */
688
+ static datastoreGet(podId, datastoreName) {
689
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
690
+ method: 'GET',
691
+ url: '/pods/{pod_id}/datastores/{datastore_name}',
692
+ path: {
693
+ 'pod_id': podId,
694
+ 'datastore_name': datastoreName,
695
+ },
696
+ errors: {
697
+ 422: `Validation Error`,
698
+ },
699
+ });
700
+ }
701
+ /**
702
+ * Update Datastore
703
+ * Update datastore metadata and event emission settings.
704
+ * @param podId
705
+ * @param datastoreName
706
+ * @param requestBody
707
+ * @returns DatastoreResponse Successful Response
708
+ * @throws ApiError
709
+ */
710
+ static datastoreUpdate(podId, datastoreName, requestBody) {
711
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
712
+ method: 'PATCH',
713
+ url: '/pods/{pod_id}/datastores/{datastore_name}',
714
+ path: {
715
+ 'pod_id': podId,
716
+ 'datastore_name': datastoreName,
717
+ },
718
+ body: requestBody,
719
+ mediaType: 'application/json',
720
+ errors: {
721
+ 422: `Validation Error`,
722
+ },
723
+ });
724
+ }
725
+ /**
726
+ * Delete Datastore
727
+ * Delete a datastore and its underlying resources.
728
+ * @param podId
729
+ * @param datastoreName
730
+ * @returns DatastoreMessageResponse Successful Response
731
+ * @throws ApiError
732
+ */
733
+ static datastoreDelete(podId, datastoreName) {
734
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
735
+ method: 'DELETE',
736
+ url: '/pods/{pod_id}/datastores/{datastore_name}',
737
+ path: {
738
+ 'pod_id': podId,
739
+ 'datastore_name': datastoreName,
740
+ },
741
+ errors: {
742
+ 422: `Validation Error`,
743
+ },
744
+ });
745
+ }
746
+ /**
747
+ * Execute Query
748
+ * Execute a read-only SQL query in the datastore schema. Mutating statements (`INSERT`, `UPDATE`, `DELETE`, `DROP`, etc.) are blocked.
749
+ * @param podId
750
+ * @param datastoreName
751
+ * @param requestBody
752
+ * @returns RecordQueryResponse Successful Response
753
+ * @throws ApiError
754
+ */
755
+ static datastoreQuery(podId, datastoreName, requestBody) {
756
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
757
+ method: 'POST',
758
+ url: '/pods/{pod_id}/datastores/{datastore_name}/query',
759
+ path: {
760
+ 'pod_id': podId,
761
+ 'datastore_name': datastoreName,
762
+ },
763
+ body: requestBody,
764
+ mediaType: 'application/json',
765
+ errors: {
766
+ 422: `Validation Error`,
767
+ },
768
+ });
769
+ }
770
+ }
771
+ exports.DatastoreService = DatastoreService;
772
+
773
+ },
774
+ "./openapi_client/core/request.js": function (module, exports, require) {
775
+ "use strict";
776
+ Object.defineProperty(exports, "__esModule", { value: true });
777
+ exports.request = exports.catchErrorCodes = exports.getResponseBody = exports.getResponseHeader = exports.sendRequest = exports.getRequestBody = exports.getHeaders = exports.resolve = exports.getFormData = exports.getQueryString = exports.base64 = exports.isFormData = exports.isBlob = exports.isStringWithValue = exports.isString = exports.isDefined = void 0;
778
+ /* generated using openapi-typescript-codegen -- do not edit */
779
+ /* istanbul ignore file */
780
+ /* tslint:disable */
781
+ /* eslint-disable */
782
+ const ApiError_js_1 = require("./openapi_client/core/ApiError.js");
783
+ const CancelablePromise_js_1 = require("./openapi_client/core/CancelablePromise.js");
784
+ const isDefined = (value) => {
785
+ return value !== undefined && value !== null;
786
+ };
787
+ exports.isDefined = isDefined;
788
+ const isString = (value) => {
789
+ return typeof value === 'string';
790
+ };
791
+ exports.isString = isString;
792
+ const isStringWithValue = (value) => {
793
+ return (0, exports.isString)(value) && value !== '';
794
+ };
795
+ exports.isStringWithValue = isStringWithValue;
796
+ const isBlob = (value) => {
797
+ return (typeof value === 'object' &&
798
+ typeof value.type === 'string' &&
799
+ typeof value.stream === 'function' &&
800
+ typeof value.arrayBuffer === 'function' &&
801
+ typeof value.constructor === 'function' &&
802
+ typeof value.constructor.name === 'string' &&
803
+ /^(Blob|File)$/.test(value.constructor.name) &&
804
+ /^(Blob|File)$/.test(value[Symbol.toStringTag]));
805
+ };
806
+ exports.isBlob = isBlob;
807
+ const isFormData = (value) => {
808
+ return value instanceof FormData;
809
+ };
810
+ exports.isFormData = isFormData;
811
+ const base64 = (str) => {
812
+ try {
813
+ return btoa(str);
814
+ }
815
+ catch (err) {
816
+ // @ts-ignore
817
+ return Buffer.from(str).toString('base64');
818
+ }
819
+ };
820
+ exports.base64 = base64;
821
+ const getQueryString = (params) => {
822
+ const qs = [];
823
+ const append = (key, value) => {
824
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
825
+ };
826
+ const process = (key, value) => {
827
+ if ((0, exports.isDefined)(value)) {
828
+ if (Array.isArray(value)) {
829
+ value.forEach(v => {
830
+ process(key, v);
831
+ });
832
+ }
833
+ else if (typeof value === 'object') {
834
+ Object.entries(value).forEach(([k, v]) => {
835
+ process(`${key}[${k}]`, v);
836
+ });
837
+ }
838
+ else {
839
+ append(key, value);
840
+ }
841
+ }
842
+ };
843
+ Object.entries(params).forEach(([key, value]) => {
844
+ process(key, value);
845
+ });
846
+ if (qs.length > 0) {
847
+ return `?${qs.join('&')}`;
848
+ }
849
+ return '';
850
+ };
851
+ exports.getQueryString = getQueryString;
852
+ const getUrl = (config, options) => {
853
+ const encoder = config.ENCODE_PATH || encodeURI;
854
+ const path = options.url
855
+ .replace('{api-version}', config.VERSION)
856
+ .replace(/{(.*?)}/g, (substring, group) => {
857
+ if (options.path?.hasOwnProperty(group)) {
858
+ return encoder(String(options.path[group]));
859
+ }
860
+ return substring;
861
+ });
862
+ const url = `${config.BASE}${path}`;
863
+ if (options.query) {
864
+ return `${url}${(0, exports.getQueryString)(options.query)}`;
865
+ }
866
+ return url;
867
+ };
868
+ const getFormData = (options) => {
869
+ if (options.formData) {
870
+ const formData = new FormData();
871
+ const process = (key, value) => {
872
+ if ((0, exports.isString)(value) || (0, exports.isBlob)(value)) {
873
+ formData.append(key, value);
874
+ }
875
+ else {
876
+ formData.append(key, JSON.stringify(value));
877
+ }
878
+ };
879
+ Object.entries(options.formData)
880
+ .filter(([_, value]) => (0, exports.isDefined)(value))
881
+ .forEach(([key, value]) => {
882
+ if (Array.isArray(value)) {
883
+ value.forEach(v => process(key, v));
884
+ }
885
+ else {
886
+ process(key, value);
887
+ }
888
+ });
889
+ return formData;
890
+ }
891
+ return undefined;
892
+ };
893
+ exports.getFormData = getFormData;
894
+ const resolve = async (options, resolver) => {
895
+ if (typeof resolver === 'function') {
896
+ return resolver(options);
897
+ }
898
+ return resolver;
899
+ };
900
+ exports.resolve = resolve;
901
+ const getHeaders = async (config, options) => {
902
+ const [token, username, password, additionalHeaders] = await Promise.all([
903
+ (0, exports.resolve)(options, config.TOKEN),
904
+ (0, exports.resolve)(options, config.USERNAME),
905
+ (0, exports.resolve)(options, config.PASSWORD),
906
+ (0, exports.resolve)(options, config.HEADERS),
907
+ ]);
908
+ const headers = Object.entries({
909
+ Accept: 'application/json',
910
+ ...additionalHeaders,
911
+ ...options.headers,
912
+ })
913
+ .filter(([_, value]) => (0, exports.isDefined)(value))
914
+ .reduce((headers, [key, value]) => ({
915
+ ...headers,
916
+ [key]: String(value),
917
+ }), {});
918
+ if ((0, exports.isStringWithValue)(token)) {
919
+ headers['Authorization'] = `Bearer ${token}`;
920
+ }
921
+ if ((0, exports.isStringWithValue)(username) && (0, exports.isStringWithValue)(password)) {
922
+ const credentials = (0, exports.base64)(`${username}:${password}`);
923
+ headers['Authorization'] = `Basic ${credentials}`;
924
+ }
925
+ if (options.body !== undefined) {
926
+ if (options.mediaType) {
927
+ headers['Content-Type'] = options.mediaType;
928
+ }
929
+ else if ((0, exports.isBlob)(options.body)) {
930
+ headers['Content-Type'] = options.body.type || 'application/octet-stream';
931
+ }
932
+ else if ((0, exports.isString)(options.body)) {
933
+ headers['Content-Type'] = 'text/plain';
934
+ }
935
+ else if (!(0, exports.isFormData)(options.body)) {
936
+ headers['Content-Type'] = 'application/json';
937
+ }
938
+ }
939
+ return new Headers(headers);
940
+ };
941
+ exports.getHeaders = getHeaders;
942
+ const getRequestBody = (options) => {
943
+ if (options.body !== undefined) {
944
+ if (options.mediaType?.includes('/json')) {
945
+ return JSON.stringify(options.body);
946
+ }
947
+ else if ((0, exports.isString)(options.body) || (0, exports.isBlob)(options.body) || (0, exports.isFormData)(options.body)) {
948
+ return options.body;
949
+ }
950
+ else {
951
+ return JSON.stringify(options.body);
952
+ }
953
+ }
954
+ return undefined;
955
+ };
956
+ exports.getRequestBody = getRequestBody;
957
+ const sendRequest = async (config, options, url, body, formData, headers, onCancel) => {
958
+ const controller = new AbortController();
959
+ const request = {
960
+ headers,
961
+ body: body ?? formData,
962
+ method: options.method,
963
+ signal: controller.signal,
964
+ };
965
+ if (config.WITH_CREDENTIALS) {
966
+ request.credentials = config.CREDENTIALS;
967
+ }
968
+ onCancel(() => controller.abort());
969
+ return await fetch(url, request);
970
+ };
971
+ exports.sendRequest = sendRequest;
972
+ const getResponseHeader = (response, responseHeader) => {
973
+ if (responseHeader) {
974
+ const content = response.headers.get(responseHeader);
975
+ if ((0, exports.isString)(content)) {
976
+ return content;
977
+ }
978
+ }
979
+ return undefined;
980
+ };
981
+ exports.getResponseHeader = getResponseHeader;
982
+ const getResponseBody = async (response) => {
983
+ if (response.status !== 204) {
984
+ try {
985
+ const contentType = response.headers.get('Content-Type');
986
+ if (contentType) {
987
+ const jsonTypes = ['application/json', 'application/problem+json'];
988
+ const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
989
+ if (isJSON) {
990
+ return await response.json();
991
+ }
992
+ else {
993
+ return await response.text();
994
+ }
995
+ }
996
+ }
997
+ catch (error) {
998
+ console.error(error);
999
+ }
1000
+ }
1001
+ return undefined;
1002
+ };
1003
+ exports.getResponseBody = getResponseBody;
1004
+ const catchErrorCodes = (options, result) => {
1005
+ const errors = {
1006
+ 400: 'Bad Request',
1007
+ 401: 'Unauthorized',
1008
+ 403: 'Forbidden',
1009
+ 404: 'Not Found',
1010
+ 500: 'Internal Server Error',
1011
+ 502: 'Bad Gateway',
1012
+ 503: 'Service Unavailable',
1013
+ ...options.errors,
1014
+ };
1015
+ const error = errors[result.status];
1016
+ if (error) {
1017
+ throw new ApiError_js_1.ApiError(options, result, error);
1018
+ }
1019
+ if (!result.ok) {
1020
+ const errorStatus = result.status ?? 'unknown';
1021
+ const errorStatusText = result.statusText ?? 'unknown';
1022
+ const errorBody = (() => {
1023
+ try {
1024
+ return JSON.stringify(result.body, null, 2);
1025
+ }
1026
+ catch (e) {
1027
+ return undefined;
1028
+ }
1029
+ })();
1030
+ throw new ApiError_js_1.ApiError(options, result, `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`);
1031
+ }
1032
+ };
1033
+ exports.catchErrorCodes = catchErrorCodes;
1034
+ /**
1035
+ * Request method
1036
+ * @param config The OpenAPI configuration object
1037
+ * @param options The request options from the service
1038
+ * @returns CancelablePromise<T>
1039
+ * @throws ApiError
1040
+ */
1041
+ const request = (config, options) => {
1042
+ return new CancelablePromise_js_1.CancelablePromise(async (resolve, reject, onCancel) => {
1043
+ try {
1044
+ const url = getUrl(config, options);
1045
+ const formData = (0, exports.getFormData)(options);
1046
+ const body = (0, exports.getRequestBody)(options);
1047
+ const headers = await (0, exports.getHeaders)(config, options);
1048
+ if (!onCancel.isCancelled) {
1049
+ const response = await (0, exports.sendRequest)(config, options, url, body, formData, headers, onCancel);
1050
+ const responseBody = await (0, exports.getResponseBody)(response);
1051
+ const responseHeader = (0, exports.getResponseHeader)(response, options.responseHeader);
1052
+ const result = {
1053
+ url,
1054
+ ok: response.ok,
1055
+ status: response.status,
1056
+ statusText: response.statusText,
1057
+ body: responseHeader ?? responseBody,
1058
+ };
1059
+ (0, exports.catchErrorCodes)(options, result);
1060
+ resolve(result.body);
1061
+ }
1062
+ }
1063
+ catch (error) {
1064
+ reject(error);
1065
+ }
1066
+ });
1067
+ };
1068
+ exports.request = request;
1069
+
1070
+ },
1071
+ "./openapi_client/core/CancelablePromise.js": function (module, exports, require) {
1072
+ "use strict";
1073
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
1074
+ if (kind === "m") throw new TypeError("Private method is not writable");
1075
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1076
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1077
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1078
+ };
1079
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
1080
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1081
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1082
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1083
+ };
1084
+ var _CancelablePromise_isResolved, _CancelablePromise_isRejected, _CancelablePromise_isCancelled, _CancelablePromise_cancelHandlers, _CancelablePromise_promise, _CancelablePromise_resolve, _CancelablePromise_reject;
1085
+ Object.defineProperty(exports, "__esModule", { value: true });
1086
+ exports.CancelablePromise = exports.CancelError = void 0;
1087
+ /* generated using openapi-typescript-codegen -- do not edit */
1088
+ /* istanbul ignore file */
1089
+ /* tslint:disable */
1090
+ /* eslint-disable */
1091
+ class CancelError extends Error {
1092
+ constructor(message) {
1093
+ super(message);
1094
+ this.name = 'CancelError';
1095
+ }
1096
+ get isCancelled() {
1097
+ return true;
1098
+ }
1099
+ }
1100
+ exports.CancelError = CancelError;
1101
+ class CancelablePromise {
1102
+ constructor(executor) {
1103
+ _CancelablePromise_isResolved.set(this, void 0);
1104
+ _CancelablePromise_isRejected.set(this, void 0);
1105
+ _CancelablePromise_isCancelled.set(this, void 0);
1106
+ _CancelablePromise_cancelHandlers.set(this, void 0);
1107
+ _CancelablePromise_promise.set(this, void 0);
1108
+ _CancelablePromise_resolve.set(this, void 0);
1109
+ _CancelablePromise_reject.set(this, void 0);
1110
+ __classPrivateFieldSet(this, _CancelablePromise_isResolved, false, "f");
1111
+ __classPrivateFieldSet(this, _CancelablePromise_isRejected, false, "f");
1112
+ __classPrivateFieldSet(this, _CancelablePromise_isCancelled, false, "f");
1113
+ __classPrivateFieldSet(this, _CancelablePromise_cancelHandlers, [], "f");
1114
+ __classPrivateFieldSet(this, _CancelablePromise_promise, new Promise((resolve, reject) => {
1115
+ __classPrivateFieldSet(this, _CancelablePromise_resolve, resolve, "f");
1116
+ __classPrivateFieldSet(this, _CancelablePromise_reject, reject, "f");
1117
+ const onResolve = (value) => {
1118
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
1119
+ return;
1120
+ }
1121
+ __classPrivateFieldSet(this, _CancelablePromise_isResolved, true, "f");
1122
+ if (__classPrivateFieldGet(this, _CancelablePromise_resolve, "f"))
1123
+ __classPrivateFieldGet(this, _CancelablePromise_resolve, "f").call(this, value);
1124
+ };
1125
+ const onReject = (reason) => {
1126
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
1127
+ return;
1128
+ }
1129
+ __classPrivateFieldSet(this, _CancelablePromise_isRejected, true, "f");
1130
+ if (__classPrivateFieldGet(this, _CancelablePromise_reject, "f"))
1131
+ __classPrivateFieldGet(this, _CancelablePromise_reject, "f").call(this, reason);
1132
+ };
1133
+ const onCancel = (cancelHandler) => {
1134
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
1135
+ return;
1136
+ }
1137
+ __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").push(cancelHandler);
1138
+ };
1139
+ Object.defineProperty(onCancel, 'isResolved', {
1140
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isResolved, "f"),
1141
+ });
1142
+ Object.defineProperty(onCancel, 'isRejected', {
1143
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f"),
1144
+ });
1145
+ Object.defineProperty(onCancel, 'isCancelled', {
1146
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f"),
1147
+ });
1148
+ return executor(onResolve, onReject, onCancel);
1149
+ }), "f");
1150
+ }
1151
+ get [(_CancelablePromise_isResolved = new WeakMap(), _CancelablePromise_isRejected = new WeakMap(), _CancelablePromise_isCancelled = new WeakMap(), _CancelablePromise_cancelHandlers = new WeakMap(), _CancelablePromise_promise = new WeakMap(), _CancelablePromise_resolve = new WeakMap(), _CancelablePromise_reject = new WeakMap(), Symbol.toStringTag)]() {
1152
+ return "Cancellable Promise";
1153
+ }
1154
+ then(onFulfilled, onRejected) {
1155
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").then(onFulfilled, onRejected);
1156
+ }
1157
+ catch(onRejected) {
1158
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").catch(onRejected);
1159
+ }
1160
+ finally(onFinally) {
1161
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").finally(onFinally);
1162
+ }
1163
+ cancel() {
1164
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
1165
+ return;
1166
+ }
1167
+ __classPrivateFieldSet(this, _CancelablePromise_isCancelled, true, "f");
1168
+ if (__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length) {
1169
+ try {
1170
+ for (const cancelHandler of __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f")) {
1171
+ cancelHandler();
1172
+ }
1173
+ }
1174
+ catch (error) {
1175
+ console.warn('Cancellation threw an error', error);
1176
+ return;
1177
+ }
1178
+ }
1179
+ __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length = 0;
1180
+ if (__classPrivateFieldGet(this, _CancelablePromise_reject, "f"))
1181
+ __classPrivateFieldGet(this, _CancelablePromise_reject, "f").call(this, new CancelError('Request aborted'));
1182
+ }
1183
+ get isCancelled() {
1184
+ return __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f");
1185
+ }
1186
+ }
1187
+ exports.CancelablePromise = CancelablePromise;
1188
+
1189
+ },
1190
+ "./namespaces/tables.js": function (module, exports, require) {
1191
+ "use strict";
1192
+ Object.defineProperty(exports, "__esModule", { value: true });
1193
+ exports.TablesNamespace = void 0;
1194
+ const TablesService_js_1 = require("./openapi_client/services/TablesService.js");
1195
+ class TablesNamespace {
1196
+ constructor(client, podId) {
1197
+ this.client = client;
1198
+ this.podId = podId;
1199
+ this.columns = {
1200
+ add: (datastore, tableName, request) => {
1201
+ const payload = "column" in request ? request : { column: request };
1202
+ return this.client.request(() => TablesService_js_1.TablesService.tableColumnAdd(this.podId(), datastore, tableName, payload));
1203
+ },
1204
+ remove: (datastore, tableName, columnName) => this.client.request(() => TablesService_js_1.TablesService.tableColumnRemove(this.podId(), datastore, tableName, columnName)),
1205
+ };
1206
+ }
1207
+ list(datastore, options = {}) {
1208
+ return this.client.request(() => TablesService_js_1.TablesService.tableList(this.podId(), datastore, options.limit ?? 100, options.pageToken));
1209
+ }
1210
+ create(datastore, payload) {
1211
+ return this.client.request(() => TablesService_js_1.TablesService.tableCreate(this.podId(), datastore, payload));
1212
+ }
1213
+ get(datastore, tableName) {
1214
+ return this.client.request(() => TablesService_js_1.TablesService.tableGet(this.podId(), datastore, tableName));
1215
+ }
1216
+ update(datastore, tableName, payload) {
1217
+ return this.client.request(() => TablesService_js_1.TablesService.tableUpdate(this.podId(), datastore, tableName, payload));
1218
+ }
1219
+ delete(datastore, tableName) {
1220
+ return this.client.request(() => TablesService_js_1.TablesService.tableDelete(this.podId(), datastore, tableName));
1221
+ }
1222
+ }
1223
+ exports.TablesNamespace = TablesNamespace;
1224
+
1225
+ },
1226
+ "./openapi_client/services/TablesService.js": function (module, exports, require) {
1227
+ "use strict";
1228
+ Object.defineProperty(exports, "__esModule", { value: true });
1229
+ exports.TablesService = void 0;
1230
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
1231
+ const request_js_1 = require("./openapi_client/core/request.js");
1232
+ class TablesService {
1233
+ /**
1234
+ * Create Table
1235
+ * Create a table in a datastore. Define primary key, column schema, and optional RLS behavior.
1236
+ * @param podId
1237
+ * @param datastoreName
1238
+ * @param requestBody
1239
+ * @returns TableResponse Successful Response
1240
+ * @throws ApiError
1241
+ */
1242
+ static tableCreate(podId, datastoreName, requestBody) {
1243
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1244
+ method: 'POST',
1245
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables',
1246
+ path: {
1247
+ 'pod_id': podId,
1248
+ 'datastore_name': datastoreName,
1249
+ },
1250
+ body: requestBody,
1251
+ mediaType: 'application/json',
1252
+ errors: {
1253
+ 422: `Validation Error`,
1254
+ },
1255
+ });
1256
+ }
1257
+ /**
1258
+ * List Tables
1259
+ * List tables in a datastore.
1260
+ * @param podId
1261
+ * @param datastoreName
1262
+ * @param limit Max number of tables to return.
1263
+ * @param pageToken Cursor from a previous response for pagination.
1264
+ * @returns TableListResponse Successful Response
1265
+ * @throws ApiError
1266
+ */
1267
+ static tableList(podId, datastoreName, limit = 100, pageToken) {
1268
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1269
+ method: 'GET',
1270
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables',
1271
+ path: {
1272
+ 'pod_id': podId,
1273
+ 'datastore_name': datastoreName,
1274
+ },
1275
+ query: {
1276
+ 'limit': limit,
1277
+ 'page_token': pageToken,
1278
+ },
1279
+ errors: {
1280
+ 422: `Validation Error`,
1281
+ },
1282
+ });
1283
+ }
1284
+ /**
1285
+ * Get Table
1286
+ * Get table schema metadata by table name.
1287
+ * @param podId
1288
+ * @param datastoreName
1289
+ * @param tableName
1290
+ * @returns TableResponse Successful Response
1291
+ * @throws ApiError
1292
+ */
1293
+ static tableGet(podId, datastoreName, tableName) {
1294
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1295
+ method: 'GET',
1296
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
1297
+ path: {
1298
+ 'pod_id': podId,
1299
+ 'datastore_name': datastoreName,
1300
+ 'table_name': tableName,
1301
+ },
1302
+ errors: {
1303
+ 422: `Validation Error`,
1304
+ },
1305
+ });
1306
+ }
1307
+ /**
1308
+ * Delete Table
1309
+ * Delete a table and all records in it.
1310
+ * @param podId
1311
+ * @param datastoreName
1312
+ * @param tableName
1313
+ * @returns DatastoreMessageResponse Successful Response
1314
+ * @throws ApiError
1315
+ */
1316
+ static tableDelete(podId, datastoreName, tableName) {
1317
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1318
+ method: 'DELETE',
1319
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
1320
+ path: {
1321
+ 'pod_id': podId,
1322
+ 'datastore_name': datastoreName,
1323
+ 'table_name': tableName,
1324
+ },
1325
+ errors: {
1326
+ 422: `Validation Error`,
1327
+ },
1328
+ });
1329
+ }
1330
+ /**
1331
+ * Update Table
1332
+ * Update table metadata/configuration payload.
1333
+ * @param podId
1334
+ * @param datastoreName
1335
+ * @param tableName
1336
+ * @param requestBody
1337
+ * @returns TableResponse Successful Response
1338
+ * @throws ApiError
1339
+ */
1340
+ static tableUpdate(podId, datastoreName, tableName, requestBody) {
1341
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1342
+ method: 'PATCH',
1343
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
1344
+ path: {
1345
+ 'pod_id': podId,
1346
+ 'datastore_name': datastoreName,
1347
+ 'table_name': tableName,
1348
+ },
1349
+ body: requestBody,
1350
+ mediaType: 'application/json',
1351
+ errors: {
1352
+ 422: `Validation Error`,
1353
+ },
1354
+ });
1355
+ }
1356
+ /**
1357
+ * Add Column
1358
+ * Add a new column to a table. Column names must be unique and compatible with existing table schema rules.
1359
+ * @param podId
1360
+ * @param datastoreName
1361
+ * @param tableName
1362
+ * @param requestBody
1363
+ * @returns TableResponse Successful Response
1364
+ * @throws ApiError
1365
+ */
1366
+ static tableColumnAdd(podId, datastoreName, tableName, requestBody) {
1367
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1368
+ method: 'POST',
1369
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/columns',
1370
+ path: {
1371
+ 'pod_id': podId,
1372
+ 'datastore_name': datastoreName,
1373
+ 'table_name': tableName,
1374
+ },
1375
+ body: requestBody,
1376
+ mediaType: 'application/json',
1377
+ errors: {
1378
+ 422: `Validation Error`,
1379
+ },
1380
+ });
1381
+ }
1382
+ /**
1383
+ * Remove Column
1384
+ * Remove a non-primary, non-system column from a table. System columns and the primary key cannot be removed.
1385
+ * @param podId
1386
+ * @param datastoreName
1387
+ * @param tableName
1388
+ * @param columnName
1389
+ * @returns DatastoreMessageResponse Successful Response
1390
+ * @throws ApiError
1391
+ */
1392
+ static tableColumnRemove(podId, datastoreName, tableName, columnName) {
1393
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1394
+ method: 'DELETE',
1395
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/columns/{column_name}',
1396
+ path: {
1397
+ 'pod_id': podId,
1398
+ 'datastore_name': datastoreName,
1399
+ 'table_name': tableName,
1400
+ 'column_name': columnName,
1401
+ },
1402
+ errors: {
1403
+ 422: `Validation Error`,
1404
+ },
1405
+ });
1406
+ }
1407
+ }
1408
+ exports.TablesService = TablesService;
1409
+
1410
+ },
1411
+ "./namespaces/records.js": function (module, exports, require) {
1412
+ "use strict";
1413
+ Object.defineProperty(exports, "__esModule", { value: true });
1414
+ exports.RecordsNamespace = void 0;
1415
+ const RecordsService_js_1 = require("./openapi_client/services/RecordsService.js");
1416
+ class RecordsNamespace {
1417
+ constructor(client, podId) {
1418
+ this.client = client;
1419
+ this.podId = podId;
1420
+ this.bulk = {
1421
+ create: (datastore, table, records) => {
1422
+ const payload = { records };
1423
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkCreate(this.podId(), datastore, table, payload));
1424
+ },
1425
+ update: (datastore, table, records) => {
1426
+ const payload = { records };
1427
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkUpdate(this.podId(), datastore, table, payload));
1428
+ },
1429
+ delete: (datastore, table, recordIds) => {
1430
+ const payload = { record_ids: recordIds };
1431
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkDelete(this.podId(), datastore, table, payload));
1432
+ },
1433
+ };
1434
+ }
1435
+ list(datastore, table, options = {}) {
1436
+ const { filters, sort, limit, pageToken } = options;
1437
+ if (filters || sort) {
1438
+ const payload = { filters, sort, limit, page_token: pageToken };
1439
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordQuery(this.podId(), datastore, table, payload));
1440
+ }
1441
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), datastore, table, limit ?? 20, pageToken));
1442
+ }
1443
+ create(datastore, table, data) {
1444
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordCreate(this.podId(), datastore, table, { data }));
1445
+ }
1446
+ get(datastore, table, recordId) {
1447
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordGet(this.podId(), datastore, table, recordId));
1448
+ }
1449
+ update(datastore, table, recordId, data) {
1450
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordUpdate(this.podId(), datastore, table, recordId, { data }));
1451
+ }
1452
+ delete(datastore, table, recordId) {
1453
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordDelete(this.podId(), datastore, table, recordId));
1454
+ }
1455
+ query(datastore, table, payload) {
1456
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordQuery(this.podId(), datastore, table, payload));
1457
+ }
1458
+ }
1459
+ exports.RecordsNamespace = RecordsNamespace;
1460
+
1461
+ },
1462
+ "./openapi_client/services/RecordsService.js": function (module, exports, require) {
1463
+ "use strict";
1464
+ Object.defineProperty(exports, "__esModule", { value: true });
1465
+ exports.RecordsService = void 0;
1466
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
1467
+ const request_js_1 = require("./openapi_client/core/request.js");
1468
+ class RecordsService {
1469
+ /**
1470
+ * Create Record
1471
+ * Insert a record into a table. Reserved tables (`reserved_*`) are system-managed and cannot be mutated through record write endpoints.
1472
+ * @param podId
1473
+ * @param datastoreName
1474
+ * @param tableName
1475
+ * @param requestBody
1476
+ * @returns RecordResponse Successful Response
1477
+ * @throws ApiError
1478
+ */
1479
+ static recordCreate(podId, datastoreName, tableName, requestBody) {
1480
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1481
+ method: 'POST',
1482
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records',
1483
+ path: {
1484
+ 'pod_id': podId,
1485
+ 'datastore_name': datastoreName,
1486
+ 'table_name': tableName,
1487
+ },
1488
+ body: requestBody,
1489
+ mediaType: 'application/json',
1490
+ errors: {
1491
+ 422: `Validation Error`,
1492
+ },
1493
+ });
1494
+ }
1495
+ /**
1496
+ * List Records
1497
+ * List table records with token pagination only. Use `record.query` when you need structured filters or explicit sort clauses.
1498
+ * @param podId
1499
+ * @param datastoreName
1500
+ * @param tableName
1501
+ * @param limit Max number of rows to return.
1502
+ * @param pageToken Opaque token from a previous response page.
1503
+ * @returns RecordListResponse Successful Response
1504
+ * @throws ApiError
1505
+ */
1506
+ static recordList(podId, datastoreName, tableName, limit = 20, pageToken) {
1507
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1508
+ method: 'GET',
1509
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records',
1510
+ path: {
1511
+ 'pod_id': podId,
1512
+ 'datastore_name': datastoreName,
1513
+ 'table_name': tableName,
1514
+ },
1515
+ query: {
1516
+ 'limit': limit,
1517
+ 'page_token': pageToken,
1518
+ },
1519
+ errors: {
1520
+ 422: `Validation Error`,
1521
+ },
1522
+ });
1523
+ }
1524
+ /**
1525
+ * Get Record
1526
+ * Fetch one record by primary key value. The `record_id` path segment is the table's primary key value as stored in the table, not necessarily a UUID.
1527
+ * @param podId
1528
+ * @param datastoreName
1529
+ * @param tableName
1530
+ * @param recordId
1531
+ * @returns RecordResponse Successful Response
1532
+ * @throws ApiError
1533
+ */
1534
+ static recordGet(podId, datastoreName, tableName, recordId) {
1535
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1536
+ method: 'GET',
1537
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
1538
+ path: {
1539
+ 'pod_id': podId,
1540
+ 'datastore_name': datastoreName,
1541
+ 'table_name': tableName,
1542
+ 'record_id': recordId,
1543
+ },
1544
+ errors: {
1545
+ 422: `Validation Error`,
1546
+ },
1547
+ });
1548
+ }
1549
+ /**
1550
+ * Update Record
1551
+ * Patch a record by primary key.
1552
+ * @param podId
1553
+ * @param datastoreName
1554
+ * @param tableName
1555
+ * @param recordId
1556
+ * @param requestBody
1557
+ * @returns RecordResponse Successful Response
1558
+ * @throws ApiError
1559
+ */
1560
+ static recordUpdate(podId, datastoreName, tableName, recordId, requestBody) {
1561
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1562
+ method: 'PATCH',
1563
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
1564
+ path: {
1565
+ 'pod_id': podId,
1566
+ 'datastore_name': datastoreName,
1567
+ 'table_name': tableName,
1568
+ 'record_id': recordId,
1569
+ },
1570
+ body: requestBody,
1571
+ mediaType: 'application/json',
1572
+ errors: {
1573
+ 422: `Validation Error`,
1574
+ },
1575
+ });
1576
+ }
1577
+ /**
1578
+ * Delete Record
1579
+ * Delete a record by primary key.
1580
+ * @param podId
1581
+ * @param datastoreName
1582
+ * @param tableName
1583
+ * @param recordId
1584
+ * @returns DatastoreMessageResponse Successful Response
1585
+ * @throws ApiError
1586
+ */
1587
+ static recordDelete(podId, datastoreName, tableName, recordId) {
1588
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1589
+ method: 'DELETE',
1590
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
1591
+ path: {
1592
+ 'pod_id': podId,
1593
+ 'datastore_name': datastoreName,
1594
+ 'table_name': tableName,
1595
+ 'record_id': recordId,
1596
+ },
1597
+ errors: {
1598
+ 422: `Validation Error`,
1599
+ },
1600
+ });
1601
+ }
1602
+ /**
1603
+ * Bulk Create
1604
+ * Insert multiple records in one request.
1605
+ * @param podId
1606
+ * @param datastoreName
1607
+ * @param tableName
1608
+ * @param requestBody
1609
+ * @returns DatastoreMessageResponse Successful Response
1610
+ * @throws ApiError
1611
+ */
1612
+ static recordBulkCreate(podId, datastoreName, tableName, requestBody) {
1613
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1614
+ method: 'POST',
1615
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/create',
1616
+ path: {
1617
+ 'pod_id': podId,
1618
+ 'datastore_name': datastoreName,
1619
+ 'table_name': tableName,
1620
+ },
1621
+ body: requestBody,
1622
+ mediaType: 'application/json',
1623
+ errors: {
1624
+ 422: `Validation Error`,
1625
+ },
1626
+ });
1627
+ }
1628
+ /**
1629
+ * Bulk Update
1630
+ * Update multiple records in one request (each item needs primary key).
1631
+ * @param podId
1632
+ * @param datastoreName
1633
+ * @param tableName
1634
+ * @param requestBody
1635
+ * @returns DatastoreMessageResponse Successful Response
1636
+ * @throws ApiError
1637
+ */
1638
+ static recordBulkUpdate(podId, datastoreName, tableName, requestBody) {
1639
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1640
+ method: 'POST',
1641
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/update',
1642
+ path: {
1643
+ 'pod_id': podId,
1644
+ 'datastore_name': datastoreName,
1645
+ 'table_name': tableName,
1646
+ },
1647
+ body: requestBody,
1648
+ mediaType: 'application/json',
1649
+ errors: {
1650
+ 422: `Validation Error`,
1651
+ },
1652
+ });
1653
+ }
1654
+ /**
1655
+ * Bulk Delete
1656
+ * Delete multiple records by primary key values.
1657
+ * @param podId
1658
+ * @param datastoreName
1659
+ * @param tableName
1660
+ * @param requestBody
1661
+ * @returns DatastoreMessageResponse Successful Response
1662
+ * @throws ApiError
1663
+ */
1664
+ static recordBulkDelete(podId, datastoreName, tableName, requestBody) {
1665
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1666
+ method: 'POST',
1667
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/delete',
1668
+ path: {
1669
+ 'pod_id': podId,
1670
+ 'datastore_name': datastoreName,
1671
+ 'table_name': tableName,
1672
+ },
1673
+ body: requestBody,
1674
+ mediaType: 'application/json',
1675
+ errors: {
1676
+ 422: `Validation Error`,
1677
+ },
1678
+ });
1679
+ }
1680
+ /**
1681
+ * Query Records
1682
+ * Query one table with structured filters and sorting. Use this instead of dynamic query parameters when you need filtering. Example filters: `[{"field": "status", "op": "eq", "value": "OPEN"}]`.
1683
+ * @param podId
1684
+ * @param datastoreName
1685
+ * @param tableName
1686
+ * @param requestBody
1687
+ * @returns RecordListResponse Successful Response
1688
+ * @throws ApiError
1689
+ */
1690
+ static recordQuery(podId, datastoreName, tableName, requestBody) {
1691
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1692
+ method: 'POST',
1693
+ url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/query',
1694
+ path: {
1695
+ 'pod_id': podId,
1696
+ 'datastore_name': datastoreName,
1697
+ 'table_name': tableName,
1698
+ },
1699
+ body: requestBody,
1700
+ mediaType: 'application/json',
1701
+ errors: {
1702
+ 422: `Validation Error`,
1703
+ },
1704
+ });
1705
+ }
1706
+ }
1707
+ exports.RecordsService = RecordsService;
1708
+
1709
+ },
1710
+ "./namespaces/files.js": function (module, exports, require) {
1711
+ "use strict";
1712
+ Object.defineProperty(exports, "__esModule", { value: true });
1713
+ exports.FilesNamespace = void 0;
1714
+ const SearchMethod_js_1 = require("./openapi_client/models/SearchMethod.js");
1715
+ const FilesService_js_1 = require("./openapi_client/services/FilesService.js");
1716
+ class FilesNamespace {
1717
+ constructor(client, http, podId) {
1718
+ this.client = client;
1719
+ this.http = http;
1720
+ this.podId = podId;
1721
+ this.folder = {
1722
+ create: (datastore, name, options = {}) => {
1723
+ const payload = {
1724
+ name,
1725
+ description: options.description,
1726
+ parent_id: options.parentId,
1727
+ };
1728
+ return this.client.request(() => FilesService_js_1.FilesService.fileFolderCreate(this.podId(), datastore, payload));
1729
+ },
1730
+ };
1731
+ }
1732
+ list(datastore, options = {}) {
1733
+ return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), datastore, options.parentId, options.limit ?? 100, options.pageToken));
1734
+ }
1735
+ get(datastore, fileId) {
1736
+ return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), datastore, fileId));
1737
+ }
1738
+ delete(datastore, fileId) {
1739
+ return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), datastore, fileId));
1740
+ }
1741
+ search(datastore, query, options = {}) {
1742
+ return this.client.request(() => FilesService_js_1.FilesService.fileSearch(this.podId(), datastore, {
1743
+ query,
1744
+ limit: options.limit ?? 10,
1745
+ search_method: options.searchMethod ?? SearchMethod_js_1.SearchMethod.HYBRID,
1746
+ }));
1747
+ }
1748
+ download(datastore, fileId) {
1749
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastores/${datastore}/files/${fileId}/download`);
1750
+ }
1751
+ upload(datastore, file, options = {}) {
1752
+ const payload = {
1753
+ data: file,
1754
+ name: options.name ?? (file instanceof File ? file.name : undefined),
1755
+ description: options.description,
1756
+ parent_id: options.parentId,
1757
+ search_enabled: options.searchEnabled ?? true,
1758
+ };
1759
+ return this.client.request(() => FilesService_js_1.FilesService.fileUpload(this.podId(), datastore, payload));
1760
+ }
1761
+ update(datastore, fileId, options = {}) {
1762
+ const payload = {
1763
+ data: options.file,
1764
+ name: options.name,
1765
+ description: options.description,
1766
+ parent_id: options.parentId,
1767
+ search_enabled: options.searchEnabled,
1768
+ };
1769
+ return this.client.request(() => FilesService_js_1.FilesService.fileUpdate(this.podId(), datastore, fileId, payload));
1770
+ }
1771
+ }
1772
+ exports.FilesNamespace = FilesNamespace;
1773
+
1774
+ },
1775
+ "./openapi_client/models/SearchMethod.js": function (module, exports, require) {
1776
+ "use strict";
1777
+ Object.defineProperty(exports, "__esModule", { value: true });
1778
+ exports.SearchMethod = void 0;
1779
+ /* generated using openapi-typescript-codegen -- do not edit */
1780
+ /* istanbul ignore file */
1781
+ /* tslint:disable */
1782
+ /* eslint-disable */
1783
+ var SearchMethod;
1784
+ (function (SearchMethod) {
1785
+ SearchMethod["VECTOR"] = "VECTOR";
1786
+ SearchMethod["TEXT"] = "TEXT";
1787
+ SearchMethod["HYBRID"] = "HYBRID";
1788
+ })(SearchMethod || (exports.SearchMethod = SearchMethod = {}));
1789
+
1790
+ },
1791
+ "./openapi_client/services/FilesService.js": function (module, exports, require) {
1792
+ "use strict";
1793
+ Object.defineProperty(exports, "__esModule", { value: true });
1794
+ exports.FilesService = void 0;
1795
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
1796
+ const request_js_1 = require("./openapi_client/core/request.js");
1797
+ class FilesService {
1798
+ /**
1799
+ * List Files
1800
+ * @param resourceType
1801
+ * @param resourceId
1802
+ * @param path
1803
+ * @param limit
1804
+ * @param pageToken
1805
+ * @returns ResourceFileListResponse Successful Response
1806
+ * @throws ApiError
1807
+ */
1808
+ static listFilesFilesResourceTypeResourceIdListGet(resourceType, resourceId, path = '', limit = 100, pageToken) {
1809
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1810
+ method: 'GET',
1811
+ url: '/files/{resource_type}/{resource_id}/list',
1812
+ path: {
1813
+ 'resource_type': resourceType,
1814
+ 'resource_id': resourceId,
1815
+ },
1816
+ query: {
1817
+ 'path': path,
1818
+ 'limit': limit,
1819
+ 'page_token': pageToken,
1820
+ },
1821
+ errors: {
1822
+ 422: `Validation Error`,
1823
+ },
1824
+ });
1825
+ }
1826
+ /**
1827
+ * Upload File
1828
+ * @param resourceType
1829
+ * @param resourceId
1830
+ * @param formData
1831
+ * @param path
1832
+ * @returns FileUploadResponse Successful Response
1833
+ * @throws ApiError
1834
+ */
1835
+ static uploadFileFilesResourceTypeResourceIdUploadPost(resourceType, resourceId, formData, path) {
1836
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1837
+ method: 'POST',
1838
+ url: '/files/{resource_type}/{resource_id}/upload',
1839
+ path: {
1840
+ 'resource_type': resourceType,
1841
+ 'resource_id': resourceId,
1842
+ },
1843
+ query: {
1844
+ 'path': path,
1845
+ },
1846
+ formData: formData,
1847
+ mediaType: 'multipart/form-data',
1848
+ errors: {
1849
+ 422: `Validation Error`,
1850
+ },
1851
+ });
1852
+ }
1853
+ /**
1854
+ * Download File
1855
+ * @param resourceType
1856
+ * @param resourceId
1857
+ * @param filePath
1858
+ * @returns any Successful Response
1859
+ * @throws ApiError
1860
+ */
1861
+ static downloadFileFilesResourceTypeResourceIdDownloadFilePathGet(resourceType, resourceId, filePath) {
1862
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1863
+ method: 'GET',
1864
+ url: '/files/{resource_type}/{resource_id}/download/{file_path}',
1865
+ path: {
1866
+ 'resource_type': resourceType,
1867
+ 'resource_id': resourceId,
1868
+ 'file_path': filePath,
1869
+ },
1870
+ errors: {
1871
+ 422: `Validation Error`,
1872
+ },
1873
+ });
1874
+ }
1875
+ /**
1876
+ * Delete File
1877
+ * @param resourceType
1878
+ * @param resourceId
1879
+ * @param filePath
1880
+ * @returns any Successful Response
1881
+ * @throws ApiError
1882
+ */
1883
+ static deleteFileFilesResourceTypeResourceIdDeleteFilePathDelete(resourceType, resourceId, filePath) {
1884
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1885
+ method: 'DELETE',
1886
+ url: '/files/{resource_type}/{resource_id}/delete/{file_path}',
1887
+ path: {
1888
+ 'resource_type': resourceType,
1889
+ 'resource_id': resourceId,
1890
+ 'file_path': filePath,
1891
+ },
1892
+ errors: {
1893
+ 422: `Validation Error`,
1894
+ },
1895
+ });
1896
+ }
1897
+ /**
1898
+ * Upload File
1899
+ * @param podId
1900
+ * @param datastoreName
1901
+ * @param formData
1902
+ * @returns FileResponse Successful Response
1903
+ * @throws ApiError
1904
+ */
1905
+ static fileUpload(podId, datastoreName, formData) {
1906
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1907
+ method: 'POST',
1908
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files',
1909
+ path: {
1910
+ 'pod_id': podId,
1911
+ 'datastore_name': datastoreName,
1912
+ },
1913
+ formData: formData,
1914
+ mediaType: 'multipart/form-data',
1915
+ errors: {
1916
+ 422: `Validation Error`,
1917
+ },
1918
+ });
1919
+ }
1920
+ /**
1921
+ * List Files
1922
+ * @param podId
1923
+ * @param datastoreName
1924
+ * @param parentId
1925
+ * @param limit
1926
+ * @param pageToken
1927
+ * @returns FileListResponse Successful Response
1928
+ * @throws ApiError
1929
+ */
1930
+ static fileList(podId, datastoreName, parentId, limit = 100, pageToken) {
1931
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1932
+ method: 'GET',
1933
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files',
1934
+ path: {
1935
+ 'pod_id': podId,
1936
+ 'datastore_name': datastoreName,
1937
+ },
1938
+ query: {
1939
+ 'parent_id': parentId,
1940
+ 'limit': limit,
1941
+ 'page_token': pageToken,
1942
+ },
1943
+ errors: {
1944
+ 422: `Validation Error`,
1945
+ },
1946
+ });
1947
+ }
1948
+ /**
1949
+ * Create Folder
1950
+ * @param podId
1951
+ * @param datastoreName
1952
+ * @param requestBody
1953
+ * @returns FileResponse Successful Response
1954
+ * @throws ApiError
1955
+ */
1956
+ static fileFolderCreate(podId, datastoreName, requestBody) {
1957
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1958
+ method: 'POST',
1959
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/folders',
1960
+ path: {
1961
+ 'pod_id': podId,
1962
+ 'datastore_name': datastoreName,
1963
+ },
1964
+ body: requestBody,
1965
+ mediaType: 'application/json',
1966
+ errors: {
1967
+ 422: `Validation Error`,
1968
+ },
1969
+ });
1970
+ }
1971
+ /**
1972
+ * Get File
1973
+ * @param podId
1974
+ * @param datastoreName
1975
+ * @param fileId
1976
+ * @returns FileResponse Successful Response
1977
+ * @throws ApiError
1978
+ */
1979
+ static fileGet(podId, datastoreName, fileId) {
1980
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1981
+ method: 'GET',
1982
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/{file_id}',
1983
+ path: {
1984
+ 'pod_id': podId,
1985
+ 'datastore_name': datastoreName,
1986
+ 'file_id': fileId,
1987
+ },
1988
+ errors: {
1989
+ 422: `Validation Error`,
1990
+ },
1991
+ });
1992
+ }
1993
+ /**
1994
+ * Update File
1995
+ * @param podId
1996
+ * @param datastoreName
1997
+ * @param fileId
1998
+ * @param formData
1999
+ * @returns FileResponse Successful Response
2000
+ * @throws ApiError
2001
+ */
2002
+ static fileUpdate(podId, datastoreName, fileId, formData) {
2003
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2004
+ method: 'PATCH',
2005
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/{file_id}',
2006
+ path: {
2007
+ 'pod_id': podId,
2008
+ 'datastore_name': datastoreName,
2009
+ 'file_id': fileId,
2010
+ },
2011
+ formData: formData,
2012
+ mediaType: 'multipart/form-data',
2013
+ errors: {
2014
+ 422: `Validation Error`,
2015
+ },
2016
+ });
2017
+ }
2018
+ /**
2019
+ * Delete File
2020
+ * @param podId
2021
+ * @param datastoreName
2022
+ * @param fileId
2023
+ * @returns DatastoreMessageResponse Successful Response
2024
+ * @throws ApiError
2025
+ */
2026
+ static fileDelete(podId, datastoreName, fileId) {
2027
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2028
+ method: 'DELETE',
2029
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/{file_id}',
2030
+ path: {
2031
+ 'pod_id': podId,
2032
+ 'datastore_name': datastoreName,
2033
+ 'file_id': fileId,
2034
+ },
2035
+ errors: {
2036
+ 422: `Validation Error`,
2037
+ },
2038
+ });
2039
+ }
2040
+ /**
2041
+ * Download File
2042
+ * @param podId
2043
+ * @param datastoreName
2044
+ * @param fileId
2045
+ * @returns any Successful Response
2046
+ * @throws ApiError
2047
+ */
2048
+ static fileDownload(podId, datastoreName, fileId) {
2049
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2050
+ method: 'GET',
2051
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/{file_id}/download',
2052
+ path: {
2053
+ 'pod_id': podId,
2054
+ 'datastore_name': datastoreName,
2055
+ 'file_id': fileId,
2056
+ },
2057
+ errors: {
2058
+ 422: `Validation Error`,
2059
+ },
2060
+ });
2061
+ }
2062
+ /**
2063
+ * Search Files
2064
+ * @param podId
2065
+ * @param datastoreName
2066
+ * @param requestBody
2067
+ * @returns FileSearchResponse Successful Response
2068
+ * @throws ApiError
2069
+ */
2070
+ static fileSearch(podId, datastoreName, requestBody) {
2071
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2072
+ method: 'POST',
2073
+ url: '/pods/{pod_id}/datastores/{datastore_name}/files/search',
2074
+ path: {
2075
+ 'pod_id': podId,
2076
+ 'datastore_name': datastoreName,
2077
+ },
2078
+ body: requestBody,
2079
+ mediaType: 'application/json',
2080
+ errors: {
2081
+ 422: `Validation Error`,
2082
+ },
2083
+ });
2084
+ }
2085
+ }
2086
+ exports.FilesService = FilesService;
2087
+
2088
+ },
2089
+ "./namespaces/functions.js": function (module, exports, require) {
2090
+ "use strict";
2091
+ Object.defineProperty(exports, "__esModule", { value: true });
2092
+ exports.FunctionsNamespace = void 0;
2093
+ const FunctionsService_js_1 = require("./openapi_client/services/FunctionsService.js");
2094
+ class FunctionsNamespace {
2095
+ constructor(client, podId) {
2096
+ this.client = client;
2097
+ this.podId = podId;
2098
+ this.runs = {
2099
+ create: (name, options = {}) => this.client.request(() => {
2100
+ const payload = { input_data: options.input };
2101
+ return FunctionsService_js_1.FunctionsService.functionRun(this.podId(), name, payload);
2102
+ }),
2103
+ list: (name, params = {}) => this.client.request(() => FunctionsService_js_1.FunctionsService.functionRunList(this.podId(), name, params.limit ?? 100, params.pageToken)),
2104
+ get: (name, runId) => this.client.request(() => FunctionsService_js_1.FunctionsService.functionRunGet(this.podId(), name, runId)),
2105
+ };
2106
+ }
2107
+ list(options = {}) {
2108
+ return this.client.request(() => FunctionsService_js_1.FunctionsService.functionList(this.podId(), options.limit ?? 100, options.pageToken));
2109
+ }
2110
+ create(payload) {
2111
+ return this.client.request(() => FunctionsService_js_1.FunctionsService.functionCreate(this.podId(), payload));
2112
+ }
2113
+ get(name) {
2114
+ return this.client.request(() => FunctionsService_js_1.FunctionsService.functionGet(this.podId(), name));
2115
+ }
2116
+ update(name, payload) {
2117
+ return this.client.request(() => FunctionsService_js_1.FunctionsService.functionUpdate(this.podId(), name, payload));
2118
+ }
2119
+ delete(name) {
2120
+ return this.client.request(() => FunctionsService_js_1.FunctionsService.functionDelete(this.podId(), name));
2121
+ }
2122
+ }
2123
+ exports.FunctionsNamespace = FunctionsNamespace;
2124
+
2125
+ },
2126
+ "./openapi_client/services/FunctionsService.js": function (module, exports, require) {
2127
+ "use strict";
2128
+ Object.defineProperty(exports, "__esModule", { value: true });
2129
+ exports.FunctionsService = void 0;
2130
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2131
+ const request_js_1 = require("./openapi_client/core/request.js");
2132
+ class FunctionsService {
2133
+ /**
2134
+ * Create Function
2135
+ * Create a new function in a pod
2136
+ * @param podId
2137
+ * @param requestBody
2138
+ * @returns FunctionResponse Successful Response
2139
+ * @throws ApiError
2140
+ */
2141
+ static functionCreate(podId, requestBody) {
2142
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2143
+ method: 'POST',
2144
+ url: '/pods/{pod_id}/functions',
2145
+ path: {
2146
+ 'pod_id': podId,
2147
+ },
2148
+ body: requestBody,
2149
+ mediaType: 'application/json',
2150
+ errors: {
2151
+ 422: `Validation Error`,
2152
+ },
2153
+ });
2154
+ }
2155
+ /**
2156
+ * List Functions
2157
+ * List all functions in a pod
2158
+ * @param podId
2159
+ * @param limit
2160
+ * @param pageToken
2161
+ * @returns FunctionListResponse Successful Response
2162
+ * @throws ApiError
2163
+ */
2164
+ static functionList(podId, limit = 100, pageToken) {
2165
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2166
+ method: 'GET',
2167
+ url: '/pods/{pod_id}/functions',
2168
+ path: {
2169
+ 'pod_id': podId,
2170
+ },
2171
+ query: {
2172
+ 'limit': limit,
2173
+ 'page_token': pageToken,
2174
+ },
2175
+ errors: {
2176
+ 422: `Validation Error`,
2177
+ },
2178
+ });
2179
+ }
2180
+ /**
2181
+ * Get Function
2182
+ * Get a function by name
2183
+ * @param podId
2184
+ * @param functionName
2185
+ * @returns FunctionResponse Successful Response
2186
+ * @throws ApiError
2187
+ */
2188
+ static functionGet(podId, functionName) {
2189
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2190
+ method: 'GET',
2191
+ url: '/pods/{pod_id}/functions/{function_name}',
2192
+ path: {
2193
+ 'pod_id': podId,
2194
+ 'function_name': functionName,
2195
+ },
2196
+ errors: {
2197
+ 422: `Validation Error`,
2198
+ },
2199
+ });
2200
+ }
2201
+ /**
2202
+ * Update Function
2203
+ * Update a function
2204
+ * @param podId
2205
+ * @param functionName
2206
+ * @param requestBody
2207
+ * @returns FunctionResponse Successful Response
2208
+ * @throws ApiError
2209
+ */
2210
+ static functionUpdate(podId, functionName, requestBody) {
2211
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2212
+ method: 'PATCH',
2213
+ url: '/pods/{pod_id}/functions/{function_name}',
2214
+ path: {
2215
+ 'pod_id': podId,
2216
+ 'function_name': functionName,
2217
+ },
2218
+ body: requestBody,
2219
+ mediaType: 'application/json',
2220
+ errors: {
2221
+ 422: `Validation Error`,
2222
+ },
2223
+ });
2224
+ }
2225
+ /**
2226
+ * Delete Function
2227
+ * Delete a function
2228
+ * @param podId
2229
+ * @param functionName
2230
+ * @returns FunctionMessageResponse Successful Response
2231
+ * @throws ApiError
2232
+ */
2233
+ static functionDelete(podId, functionName) {
2234
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2235
+ method: 'DELETE',
2236
+ url: '/pods/{pod_id}/functions/{function_name}',
2237
+ path: {
2238
+ 'pod_id': podId,
2239
+ 'function_name': functionName,
2240
+ },
2241
+ errors: {
2242
+ 422: `Validation Error`,
2243
+ },
2244
+ });
2245
+ }
2246
+ /**
2247
+ * Execute Function
2248
+ * Execute a function
2249
+ * @param podId
2250
+ * @param functionName
2251
+ * @param requestBody
2252
+ * @returns FunctionRunResponse Successful Response
2253
+ * @throws ApiError
2254
+ */
2255
+ static functionRun(podId, functionName, requestBody) {
2256
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2257
+ method: 'POST',
2258
+ url: '/pods/{pod_id}/functions/{function_name}/runs',
2259
+ path: {
2260
+ 'pod_id': podId,
2261
+ 'function_name': functionName,
2262
+ },
2263
+ body: requestBody,
2264
+ mediaType: 'application/json',
2265
+ errors: {
2266
+ 422: `Validation Error`,
2267
+ },
2268
+ });
2269
+ }
2270
+ /**
2271
+ * List Runs
2272
+ * List runs for a function
2273
+ * @param podId
2274
+ * @param functionName
2275
+ * @param limit
2276
+ * @param pageToken
2277
+ * @returns FunctionRunListResponse Successful Response
2278
+ * @throws ApiError
2279
+ */
2280
+ static functionRunList(podId, functionName, limit = 100, pageToken) {
2281
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2282
+ method: 'GET',
2283
+ url: '/pods/{pod_id}/functions/{function_name}/runs',
2284
+ path: {
2285
+ 'pod_id': podId,
2286
+ 'function_name': functionName,
2287
+ },
2288
+ query: {
2289
+ 'limit': limit,
2290
+ 'page_token': pageToken,
2291
+ },
2292
+ errors: {
2293
+ 422: `Validation Error`,
2294
+ },
2295
+ });
2296
+ }
2297
+ /**
2298
+ * Get Run
2299
+ * Get a specific function run
2300
+ * @param podId
2301
+ * @param functionName
2302
+ * @param runId
2303
+ * @returns FunctionRunResponse Successful Response
2304
+ * @throws ApiError
2305
+ */
2306
+ static functionRunGet(podId, functionName, runId) {
2307
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2308
+ method: 'GET',
2309
+ url: '/pods/{pod_id}/functions/{function_name}/runs/{run_id}',
2310
+ path: {
2311
+ 'pod_id': podId,
2312
+ 'function_name': functionName,
2313
+ 'run_id': runId,
2314
+ },
2315
+ errors: {
2316
+ 422: `Validation Error`,
2317
+ },
2318
+ });
2319
+ }
2320
+ }
2321
+ exports.FunctionsService = FunctionsService;
2322
+
2323
+ },
2324
+ "./namespaces/agents.js": function (module, exports, require) {
2325
+ "use strict";
2326
+ Object.defineProperty(exports, "__esModule", { value: true });
2327
+ exports.AgentsNamespace = void 0;
2328
+ const AgentsService_js_1 = require("./openapi_client/services/AgentsService.js");
2329
+ class AgentsNamespace {
2330
+ constructor(client, podId) {
2331
+ this.client = client;
2332
+ this.podId = podId;
2333
+ }
2334
+ list(options = {}) {
2335
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.limit ?? 100, options.pageToken));
2336
+ }
2337
+ create(payload) {
2338
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentCreate(this.podId(), payload));
2339
+ }
2340
+ get(agentName) {
2341
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentGet(this.podId(), agentName));
2342
+ }
2343
+ update(agentName, payload) {
2344
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentUpdate(this.podId(), agentName, payload));
2345
+ }
2346
+ delete(agentName) {
2347
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentDelete(this.podId(), agentName));
2348
+ }
2349
+ }
2350
+ exports.AgentsNamespace = AgentsNamespace;
2351
+
2352
+ },
2353
+ "./openapi_client/services/AgentsService.js": function (module, exports, require) {
2354
+ "use strict";
2355
+ Object.defineProperty(exports, "__esModule", { value: true });
2356
+ exports.AgentsService = void 0;
2357
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2358
+ const request_js_1 = require("./openapi_client/core/request.js");
2359
+ class AgentsService {
2360
+ /**
2361
+ * Create Agent
2362
+ * Create a new agent in a pod
2363
+ * @param podId
2364
+ * @param requestBody
2365
+ * @returns AgentResponse Successful Response
2366
+ * @throws ApiError
2367
+ */
2368
+ static agentCreate(podId, requestBody) {
2369
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2370
+ method: 'POST',
2371
+ url: '/pods/{pod_id}/agents',
2372
+ path: {
2373
+ 'pod_id': podId,
2374
+ },
2375
+ body: requestBody,
2376
+ mediaType: 'application/json',
2377
+ errors: {
2378
+ 422: `Validation Error`,
2379
+ },
2380
+ });
2381
+ }
2382
+ /**
2383
+ * List Agents
2384
+ * List all agents in a pod
2385
+ * @param podId
2386
+ * @param limit
2387
+ * @param pageToken
2388
+ * @returns AgentListResponse Successful Response
2389
+ * @throws ApiError
2390
+ */
2391
+ static agentList(podId, limit = 100, pageToken) {
2392
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2393
+ method: 'GET',
2394
+ url: '/pods/{pod_id}/agents',
2395
+ path: {
2396
+ 'pod_id': podId,
2397
+ },
2398
+ query: {
2399
+ 'limit': limit,
2400
+ 'page_token': pageToken,
2401
+ },
2402
+ errors: {
2403
+ 422: `Validation Error`,
2404
+ },
2405
+ });
2406
+ }
2407
+ /**
2408
+ * Get Agent
2409
+ * Get an agent by name
2410
+ * @param podId
2411
+ * @param agentName
2412
+ * @returns AgentResponse Successful Response
2413
+ * @throws ApiError
2414
+ */
2415
+ static agentGet(podId, agentName) {
2416
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2417
+ method: 'GET',
2418
+ url: '/pods/{pod_id}/agents/{agent_name}',
2419
+ path: {
2420
+ 'pod_id': podId,
2421
+ 'agent_name': agentName,
2422
+ },
2423
+ errors: {
2424
+ 422: `Validation Error`,
2425
+ },
2426
+ });
2427
+ }
2428
+ /**
2429
+ * Update Agent
2430
+ * Update an agent
2431
+ * @param podId
2432
+ * @param agentName
2433
+ * @param requestBody
2434
+ * @returns AgentResponse Successful Response
2435
+ * @throws ApiError
2436
+ */
2437
+ static agentUpdate(podId, agentName, requestBody) {
2438
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2439
+ method: 'PATCH',
2440
+ url: '/pods/{pod_id}/agents/{agent_name}',
2441
+ path: {
2442
+ 'pod_id': podId,
2443
+ 'agent_name': agentName,
2444
+ },
2445
+ body: requestBody,
2446
+ mediaType: 'application/json',
2447
+ errors: {
2448
+ 422: `Validation Error`,
2449
+ },
2450
+ });
2451
+ }
2452
+ /**
2453
+ * Delete Agent
2454
+ * Delete an agent
2455
+ * @param podId
2456
+ * @param agentName
2457
+ * @returns AgentMessageResponse Successful Response
2458
+ * @throws ApiError
2459
+ */
2460
+ static agentDelete(podId, agentName) {
2461
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2462
+ method: 'DELETE',
2463
+ url: '/pods/{pod_id}/agents/{agent_name}',
2464
+ path: {
2465
+ 'pod_id': podId,
2466
+ 'agent_name': agentName,
2467
+ },
2468
+ errors: {
2469
+ 422: `Validation Error`,
2470
+ },
2471
+ });
2472
+ }
2473
+ }
2474
+ exports.AgentsService = AgentsService;
2475
+
2476
+ },
2477
+ "./namespaces/tasks.js": function (module, exports, require) {
2478
+ "use strict";
2479
+ Object.defineProperty(exports, "__esModule", { value: true });
2480
+ exports.TasksNamespace = void 0;
2481
+ const TasksService_js_1 = require("./openapi_client/services/TasksService.js");
2482
+ class TasksNamespace {
2483
+ constructor(client, podId) {
2484
+ this.client = client;
2485
+ this.podId = podId;
2486
+ this.messages = {
2487
+ list: (taskId, options = {}) => this.client.request(() => TasksService_js_1.TasksService.taskMessageList(this.podId(), taskId, options.limit ?? 100, options.pageToken)),
2488
+ add: (taskId, content) => {
2489
+ const payload = { content };
2490
+ return this.client.request(() => TasksService_js_1.TasksService.taskMessageAdd(this.podId(), taskId, payload));
2491
+ },
2492
+ };
2493
+ }
2494
+ list(options = {}) {
2495
+ return this.client.request(() => TasksService_js_1.TasksService.taskList(this.podId(), options.agentName, options.limit ?? 100, options.pageToken));
2496
+ }
2497
+ create(options) {
2498
+ const payload = { agent_name: options.agentName, input_data: options.input };
2499
+ return this.client.request(() => TasksService_js_1.TasksService.taskCreate(this.podId(), payload));
2500
+ }
2501
+ get(taskId) {
2502
+ return this.client.request(() => TasksService_js_1.TasksService.taskGet(this.podId(), taskId));
2503
+ }
2504
+ stop(taskId) {
2505
+ return this.client.request(() => TasksService_js_1.TasksService.taskStop(this.podId(), taskId));
2506
+ }
2507
+ }
2508
+ exports.TasksNamespace = TasksNamespace;
2509
+
2510
+ },
2511
+ "./openapi_client/services/TasksService.js": function (module, exports, require) {
2512
+ "use strict";
2513
+ Object.defineProperty(exports, "__esModule", { value: true });
2514
+ exports.TasksService = void 0;
2515
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2516
+ const request_js_1 = require("./openapi_client/core/request.js");
2517
+ class TasksService {
2518
+ /**
2519
+ * Create Task
2520
+ * Create and start a new task
2521
+ * @param podId
2522
+ * @param requestBody
2523
+ * @returns TaskResponse Successful Response
2524
+ * @throws ApiError
2525
+ */
2526
+ static taskCreate(podId, requestBody) {
2527
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2528
+ method: 'POST',
2529
+ url: '/pods/{pod_id}/tasks',
2530
+ path: {
2531
+ 'pod_id': podId,
2532
+ },
2533
+ body: requestBody,
2534
+ mediaType: 'application/json',
2535
+ errors: {
2536
+ 422: `Validation Error`,
2537
+ },
2538
+ });
2539
+ }
2540
+ /**
2541
+ * List Tasks
2542
+ * List all tasks in a pod
2543
+ * @param podId
2544
+ * @param agentName
2545
+ * @param limit
2546
+ * @param pageToken
2547
+ * @returns TaskListResponse Successful Response
2548
+ * @throws ApiError
2549
+ */
2550
+ static taskList(podId, agentName, limit = 100, pageToken) {
2551
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2552
+ method: 'GET',
2553
+ url: '/pods/{pod_id}/tasks',
2554
+ path: {
2555
+ 'pod_id': podId,
2556
+ },
2557
+ query: {
2558
+ 'agent_name': agentName,
2559
+ 'limit': limit,
2560
+ 'page_token': pageToken,
2561
+ },
2562
+ errors: {
2563
+ 422: `Validation Error`,
2564
+ },
2565
+ });
2566
+ }
2567
+ /**
2568
+ * Get Task
2569
+ * Get a task by ID
2570
+ * @param podId
2571
+ * @param taskId
2572
+ * @returns TaskResponse Successful Response
2573
+ * @throws ApiError
2574
+ */
2575
+ static taskGet(podId, taskId) {
2576
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2577
+ method: 'GET',
2578
+ url: '/pods/{pod_id}/tasks/{task_id}',
2579
+ path: {
2580
+ 'pod_id': podId,
2581
+ 'task_id': taskId,
2582
+ },
2583
+ errors: {
2584
+ 422: `Validation Error`,
2585
+ },
2586
+ });
2587
+ }
2588
+ /**
2589
+ * Stop Task
2590
+ * Stop a running task
2591
+ * @param podId
2592
+ * @param taskId
2593
+ * @returns TaskResponse Successful Response
2594
+ * @throws ApiError
2595
+ */
2596
+ static taskStop(podId, taskId) {
2597
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2598
+ method: 'PATCH',
2599
+ url: '/pods/{pod_id}/tasks/{task_id}/stop',
2600
+ path: {
2601
+ 'pod_id': podId,
2602
+ 'task_id': taskId,
2603
+ },
2604
+ errors: {
2605
+ 422: `Validation Error`,
2606
+ },
2607
+ });
2608
+ }
2609
+ /**
2610
+ * Add Message
2611
+ * Add a message to a task
2612
+ * @param podId
2613
+ * @param taskId
2614
+ * @param requestBody
2615
+ * @returns TaskResponse Successful Response
2616
+ * @throws ApiError
2617
+ */
2618
+ static taskMessageAdd(podId, taskId, requestBody) {
2619
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2620
+ method: 'POST',
2621
+ url: '/pods/{pod_id}/tasks/{task_id}/messages',
2622
+ path: {
2623
+ 'pod_id': podId,
2624
+ 'task_id': taskId,
2625
+ },
2626
+ body: requestBody,
2627
+ mediaType: 'application/json',
2628
+ errors: {
2629
+ 422: `Validation Error`,
2630
+ },
2631
+ });
2632
+ }
2633
+ /**
2634
+ * List Messages
2635
+ * List messages for a task
2636
+ * @param podId
2637
+ * @param taskId
2638
+ * @param limit
2639
+ * @param pageToken
2640
+ * @returns TaskMessageListResponse Successful Response
2641
+ * @throws ApiError
2642
+ */
2643
+ static taskMessageList(podId, taskId, limit = 100, pageToken) {
2644
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2645
+ method: 'GET',
2646
+ url: '/pods/{pod_id}/tasks/{task_id}/messages',
2647
+ path: {
2648
+ 'pod_id': podId,
2649
+ 'task_id': taskId,
2650
+ },
2651
+ query: {
2652
+ 'limit': limit,
2653
+ 'page_token': pageToken,
2654
+ },
2655
+ errors: {
2656
+ 422: `Validation Error`,
2657
+ },
2658
+ });
2659
+ }
2660
+ /**
2661
+ * Stream Task Updates
2662
+ * Stream task updates via Server-Sent Events
2663
+ * @param podId
2664
+ * @param taskId
2665
+ * @returns any Successful Response
2666
+ * @throws ApiError
2667
+ */
2668
+ static taskStream(podId, taskId) {
2669
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2670
+ method: 'GET',
2671
+ url: '/pods/{pod_id}/tasks/{task_id}/stream',
2672
+ path: {
2673
+ 'pod_id': podId,
2674
+ 'task_id': taskId,
2675
+ },
2676
+ errors: {
2677
+ 422: `Validation Error`,
2678
+ },
2679
+ });
2680
+ }
2681
+ }
2682
+ exports.TasksService = TasksService;
2683
+
2684
+ },
2685
+ "./namespaces/assistants.js": function (module, exports, require) {
2686
+ "use strict";
2687
+ Object.defineProperty(exports, "__esModule", { value: true });
2688
+ exports.ConversationsNamespace = exports.AssistantsNamespace = void 0;
2689
+ const AssistantsService_js_1 = require("./openapi_client/services/AssistantsService.js");
2690
+ const ConversationsService_js_1 = require("./openapi_client/services/ConversationsService.js");
2691
+ class AssistantsNamespace {
2692
+ constructor(client, podId) {
2693
+ this.client = client;
2694
+ this.podId = podId;
2695
+ }
2696
+ list(options = {}) {
2697
+ return this.client.request(() => AssistantsService_js_1.AssistantsService.assistantList(this.podId(), options.limit ?? 100, options.pageToken));
2698
+ }
2699
+ create(payload) {
2700
+ return this.client.request(() => AssistantsService_js_1.AssistantsService.assistantCreate(this.podId(), payload));
2701
+ }
2702
+ get(assistantName) {
2703
+ return this.client.request(() => AssistantsService_js_1.AssistantsService.assistantGet(this.podId(), assistantName));
2704
+ }
2705
+ update(assistantName, payload) {
2706
+ return this.client.request(() => AssistantsService_js_1.AssistantsService.assistantUpdate(this.podId(), assistantName, payload));
2707
+ }
2708
+ delete(assistantName) {
2709
+ return this.client.request(() => AssistantsService_js_1.AssistantsService.assistantDelete(this.podId(), assistantName));
2710
+ }
2711
+ }
2712
+ exports.AssistantsNamespace = AssistantsNamespace;
2713
+ class ConversationsNamespace {
2714
+ constructor(client, podId) {
2715
+ this.client = client;
2716
+ this.podId = podId;
2717
+ this.messages = {
2718
+ list: (conversationId, options = {}) => this.client.request(() => ConversationsService_js_1.ConversationsService.conversationMessageList(conversationId, this.podId(), options.pageToken, options.limit ?? 20)),
2719
+ send: (conversationId, payload) => this.client.request(() => ConversationsService_js_1.ConversationsService.conversationMessageCreate(conversationId, payload, this.podId())),
2720
+ };
2721
+ }
2722
+ list(options = {}) {
2723
+ return this.client.request(() => ConversationsService_js_1.ConversationsService.conversationList(undefined, this.podId(), undefined, options.pageToken, options.limit ?? 20));
2724
+ }
2725
+ create(payload) {
2726
+ return this.client.request(() => ConversationsService_js_1.ConversationsService.conversationCreate({ ...payload, pod_id: this.podId() }));
2727
+ }
2728
+ get(conversationId) {
2729
+ return this.client.request(() => ConversationsService_js_1.ConversationsService.conversationGet(conversationId, this.podId()));
2730
+ }
2731
+ }
2732
+ exports.ConversationsNamespace = ConversationsNamespace;
2733
+
2734
+ },
2735
+ "./openapi_client/services/AssistantsService.js": function (module, exports, require) {
2736
+ "use strict";
2737
+ Object.defineProperty(exports, "__esModule", { value: true });
2738
+ exports.AssistantsService = void 0;
2739
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2740
+ const request_js_1 = require("./openapi_client/core/request.js");
2741
+ class AssistantsService {
2742
+ /**
2743
+ * Create Assistant
2744
+ * @param podId
2745
+ * @param requestBody
2746
+ * @returns AssistantResponse Successful Response
2747
+ * @throws ApiError
2748
+ */
2749
+ static assistantCreate(podId, requestBody) {
2750
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2751
+ method: 'POST',
2752
+ url: '/pods/{pod_id}/assistants',
2753
+ path: {
2754
+ 'pod_id': podId,
2755
+ },
2756
+ body: requestBody,
2757
+ mediaType: 'application/json',
2758
+ errors: {
2759
+ 422: `Validation Error`,
2760
+ },
2761
+ });
2762
+ }
2763
+ /**
2764
+ * List Assistants
2765
+ * @param podId
2766
+ * @param limit
2767
+ * @param pageToken
2768
+ * @returns AssistantListResponse Successful Response
2769
+ * @throws ApiError
2770
+ */
2771
+ static assistantList(podId, limit = 100, pageToken) {
2772
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2773
+ method: 'GET',
2774
+ url: '/pods/{pod_id}/assistants',
2775
+ path: {
2776
+ 'pod_id': podId,
2777
+ },
2778
+ query: {
2779
+ 'limit': limit,
2780
+ 'page_token': pageToken,
2781
+ },
2782
+ errors: {
2783
+ 422: `Validation Error`,
2784
+ },
2785
+ });
2786
+ }
2787
+ /**
2788
+ * Get Assistant
2789
+ * @param podId
2790
+ * @param assistantName
2791
+ * @returns AssistantResponse Successful Response
2792
+ * @throws ApiError
2793
+ */
2794
+ static assistantGet(podId, assistantName) {
2795
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2796
+ method: 'GET',
2797
+ url: '/pods/{pod_id}/assistants/{assistant_name}',
2798
+ path: {
2799
+ 'pod_id': podId,
2800
+ 'assistant_name': assistantName,
2801
+ },
2802
+ errors: {
2803
+ 422: `Validation Error`,
2804
+ },
2805
+ });
2806
+ }
2807
+ /**
2808
+ * Update Assistant
2809
+ * @param podId
2810
+ * @param assistantName
2811
+ * @param requestBody
2812
+ * @returns AssistantResponse Successful Response
2813
+ * @throws ApiError
2814
+ */
2815
+ static assistantUpdate(podId, assistantName, requestBody) {
2816
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2817
+ method: 'PATCH',
2818
+ url: '/pods/{pod_id}/assistants/{assistant_name}',
2819
+ path: {
2820
+ 'pod_id': podId,
2821
+ 'assistant_name': assistantName,
2822
+ },
2823
+ body: requestBody,
2824
+ mediaType: 'application/json',
2825
+ errors: {
2826
+ 422: `Validation Error`,
2827
+ },
2828
+ });
2829
+ }
2830
+ /**
2831
+ * Delete Assistant
2832
+ * @param podId
2833
+ * @param assistantName
2834
+ * @returns void
2835
+ * @throws ApiError
2836
+ */
2837
+ static assistantDelete(podId, assistantName) {
2838
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2839
+ method: 'DELETE',
2840
+ url: '/pods/{pod_id}/assistants/{assistant_name}',
2841
+ path: {
2842
+ 'pod_id': podId,
2843
+ 'assistant_name': assistantName,
2844
+ },
2845
+ errors: {
2846
+ 422: `Validation Error`,
2847
+ },
2848
+ });
2849
+ }
2850
+ }
2851
+ exports.AssistantsService = AssistantsService;
2852
+
2853
+ },
2854
+ "./openapi_client/services/ConversationsService.js": function (module, exports, require) {
2855
+ "use strict";
2856
+ Object.defineProperty(exports, "__esModule", { value: true });
2857
+ exports.ConversationsService = void 0;
2858
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2859
+ const request_js_1 = require("./openapi_client/core/request.js");
2860
+ class ConversationsService {
2861
+ /**
2862
+ * Create Conversation
2863
+ * @param requestBody
2864
+ * @returns ConversationResponse Successful Response
2865
+ * @throws ApiError
2866
+ */
2867
+ static conversationCreate(requestBody) {
2868
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2869
+ method: 'POST',
2870
+ url: '/conversations',
2871
+ body: requestBody,
2872
+ mediaType: 'application/json',
2873
+ errors: {
2874
+ 422: `Validation Error`,
2875
+ },
2876
+ });
2877
+ }
2878
+ /**
2879
+ * List Conversations
2880
+ * @param assistantId
2881
+ * @param podId
2882
+ * @param organizationId
2883
+ * @param pageToken
2884
+ * @param limit
2885
+ * @returns ConversationListResponse Successful Response
2886
+ * @throws ApiError
2887
+ */
2888
+ static conversationList(assistantId, podId, organizationId, pageToken, limit = 20) {
2889
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2890
+ method: 'GET',
2891
+ url: '/conversations',
2892
+ query: {
2893
+ 'assistant_id': assistantId,
2894
+ 'pod_id': podId,
2895
+ 'organization_id': organizationId,
2896
+ 'page_token': pageToken,
2897
+ 'limit': limit,
2898
+ },
2899
+ errors: {
2900
+ 422: `Validation Error`,
2901
+ },
2902
+ });
2903
+ }
2904
+ /**
2905
+ * Get Conversation
2906
+ * @param conversationId
2907
+ * @param podId
2908
+ * @returns ConversationResponse Successful Response
2909
+ * @throws ApiError
2910
+ */
2911
+ static conversationGet(conversationId, podId) {
2912
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2913
+ method: 'GET',
2914
+ url: '/conversations/{conversation_id}',
2915
+ path: {
2916
+ 'conversation_id': conversationId,
2917
+ },
2918
+ query: {
2919
+ 'pod_id': podId,
2920
+ },
2921
+ errors: {
2922
+ 422: `Validation Error`,
2923
+ },
2924
+ });
2925
+ }
2926
+ /**
2927
+ * Update Conversation
2928
+ * @param conversationId
2929
+ * @param requestBody
2930
+ * @param podId
2931
+ * @returns ConversationResponse Successful Response
2932
+ * @throws ApiError
2933
+ */
2934
+ static conversationUpdate(conversationId, requestBody, podId) {
2935
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2936
+ method: 'PATCH',
2937
+ url: '/conversations/{conversation_id}',
2938
+ path: {
2939
+ 'conversation_id': conversationId,
2940
+ },
2941
+ query: {
2942
+ 'pod_id': podId,
2943
+ },
2944
+ body: requestBody,
2945
+ mediaType: 'application/json',
2946
+ errors: {
2947
+ 422: `Validation Error`,
2948
+ },
2949
+ });
2950
+ }
2951
+ /**
2952
+ * List Messages
2953
+ * List messages in a conversation with token pagination. Use `page_token` to fetch older messages.
2954
+ * @param conversationId
2955
+ * @param podId
2956
+ * @param pageToken
2957
+ * @param limit
2958
+ * @returns ConversationMessageListResponse Successful Response
2959
+ * @throws ApiError
2960
+ */
2961
+ static conversationMessageList(conversationId, podId, pageToken, limit = 20) {
2962
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2963
+ method: 'GET',
2964
+ url: '/conversations/{conversation_id}/messages',
2965
+ path: {
2966
+ 'conversation_id': conversationId,
2967
+ },
2968
+ query: {
2969
+ 'pod_id': podId,
2970
+ 'page_token': pageToken,
2971
+ 'limit': limit,
2972
+ },
2973
+ errors: {
2974
+ 422: `Validation Error`,
2975
+ },
2976
+ });
2977
+ }
2978
+ /**
2979
+ * Send Message (Stream)
2980
+ * @param conversationId
2981
+ * @param requestBody
2982
+ * @param podId
2983
+ * @returns any Server-Sent Events
2984
+ * @throws ApiError
2985
+ */
2986
+ static conversationMessageCreate(conversationId, requestBody, podId) {
2987
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2988
+ method: 'POST',
2989
+ url: '/conversations/{conversation_id}/messages',
2990
+ path: {
2991
+ 'conversation_id': conversationId,
2992
+ },
2993
+ query: {
2994
+ 'pod_id': podId,
2995
+ },
2996
+ body: requestBody,
2997
+ mediaType: 'application/json',
2998
+ errors: {
2999
+ 422: `Validation Error`,
3000
+ },
3001
+ });
3002
+ }
3003
+ /**
3004
+ * Resume Conversation Stream
3005
+ * @param conversationId
3006
+ * @param podId
3007
+ * @returns any Server-Sent Events for an already-running conversation.
3008
+ * @throws ApiError
3009
+ */
3010
+ static conversationStreamResume(conversationId, podId) {
3011
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3012
+ method: 'GET',
3013
+ url: '/conversations/{conversation_id}/stream',
3014
+ path: {
3015
+ 'conversation_id': conversationId,
3016
+ },
3017
+ query: {
3018
+ 'pod_id': podId,
3019
+ },
3020
+ errors: {
3021
+ 422: `Validation Error`,
3022
+ },
3023
+ });
3024
+ }
3025
+ /**
3026
+ * Stop Conversation Run
3027
+ * @param conversationId
3028
+ * @param podId
3029
+ * @returns any Successful Response
3030
+ * @throws ApiError
3031
+ */
3032
+ static conversationRunStop(conversationId, podId) {
3033
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3034
+ method: 'PATCH',
3035
+ url: '/conversations/{conversation_id}/stop',
3036
+ path: {
3037
+ 'conversation_id': conversationId,
3038
+ },
3039
+ query: {
3040
+ 'pod_id': podId,
3041
+ },
3042
+ errors: {
3043
+ 422: `Validation Error`,
3044
+ },
3045
+ });
3046
+ }
3047
+ }
3048
+ exports.ConversationsService = ConversationsService;
3049
+
3050
+ },
3051
+ "./namespaces/workflows.js": function (module, exports, require) {
3052
+ "use strict";
3053
+ Object.defineProperty(exports, "__esModule", { value: true });
3054
+ exports.WorkflowsNamespace = void 0;
3055
+ const WorkflowsService_js_1 = require("./openapi_client/services/WorkflowsService.js");
3056
+ class WorkflowsNamespace {
3057
+ constructor(client, podId) {
3058
+ this.client = client;
3059
+ this.podId = podId;
3060
+ this.graph = {
3061
+ update: (workflowName, graph) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowGraphUpdate(this.podId(), workflowName, graph)),
3062
+ };
3063
+ this.installs = {
3064
+ create: (workflowName, payload = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowInstallCreate(this.podId(), workflowName, payload)),
3065
+ delete: (workflowName, installId) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowInstallDelete(this.podId(), workflowName, installId)),
3066
+ };
3067
+ this.runs = {
3068
+ start: (workflowName, inputs = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowStart(this.podId(), workflowName, inputs)),
3069
+ list: (workflowName, options = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunList(this.podId(), workflowName, options.limit ?? 100, options.pageToken)),
3070
+ get: (runId, podId = this.podId()) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunGet(podId, runId)),
3071
+ resume: (runId, inputs = {}, podId = this.podId()) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunResume(podId, runId, inputs)),
3072
+ };
3073
+ }
3074
+ list(options = {}) {
3075
+ return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowList(this.podId(), options.limit ?? 100, options.pageToken));
3076
+ }
3077
+ create(payload) {
3078
+ return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowCreate(this.podId(), payload));
3079
+ }
3080
+ get(workflowName) {
3081
+ return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowGet(this.podId(), workflowName));
3082
+ }
3083
+ update(workflowName, payload) {
3084
+ return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowUpdate(this.podId(), workflowName, payload));
3085
+ }
3086
+ delete(workflowName) {
3087
+ return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowDelete(this.podId(), workflowName));
3088
+ }
3089
+ }
3090
+ exports.WorkflowsNamespace = WorkflowsNamespace;
3091
+
3092
+ },
3093
+ "./openapi_client/services/WorkflowsService.js": function (module, exports, require) {
3094
+ "use strict";
3095
+ Object.defineProperty(exports, "__esModule", { value: true });
3096
+ exports.WorkflowsService = void 0;
3097
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
3098
+ const request_js_1 = require("./openapi_client/core/request.js");
3099
+ class WorkflowsService {
3100
+ /**
3101
+ * Create Workflow
3102
+ * Create a workflow definition. Use this before uploading graph nodes/edges with `workflow.graph.update`.
3103
+ * @param podId
3104
+ * @param requestBody
3105
+ * @returns FlowEntity Successful Response
3106
+ * @throws ApiError
3107
+ */
3108
+ static workflowCreate(podId, requestBody) {
3109
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3110
+ method: 'POST',
3111
+ url: '/pods/{pod_id}/workflows',
3112
+ path: {
3113
+ 'pod_id': podId,
3114
+ },
3115
+ body: requestBody,
3116
+ mediaType: 'application/json',
3117
+ errors: {
3118
+ 422: `Validation Error`,
3119
+ },
3120
+ });
3121
+ }
3122
+ /**
3123
+ * List Workflows
3124
+ * List all workflows in a pod.
3125
+ * @param podId
3126
+ * @param limit
3127
+ * @param pageToken
3128
+ * @returns WorkflowListResponse Successful Response
3129
+ * @throws ApiError
3130
+ */
3131
+ static workflowList(podId, limit = 100, pageToken) {
3132
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3133
+ method: 'GET',
3134
+ url: '/pods/{pod_id}/workflows',
3135
+ path: {
3136
+ 'pod_id': podId,
3137
+ },
3138
+ query: {
3139
+ 'limit': limit,
3140
+ 'page_token': pageToken,
3141
+ },
3142
+ errors: {
3143
+ 422: `Validation Error`,
3144
+ },
3145
+ });
3146
+ }
3147
+ /**
3148
+ * Get Workflow
3149
+ * Get a single workflow definition including graph and start configuration.
3150
+ * @param podId
3151
+ * @param workflowName
3152
+ * @returns FlowEntity Successful Response
3153
+ * @throws ApiError
3154
+ */
3155
+ static workflowGet(podId, workflowName) {
3156
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3157
+ method: 'GET',
3158
+ url: '/pods/{pod_id}/workflows/{workflow_name}',
3159
+ path: {
3160
+ 'pod_id': podId,
3161
+ 'workflow_name': workflowName,
3162
+ },
3163
+ errors: {
3164
+ 422: `Validation Error`,
3165
+ },
3166
+ });
3167
+ }
3168
+ /**
3169
+ * Update Workflow Metadata
3170
+ * Update workflow-level metadata such as description/install requirements. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
3171
+ * @param podId
3172
+ * @param workflowName
3173
+ * @param requestBody
3174
+ * @returns FlowEntity Successful Response
3175
+ * @throws ApiError
3176
+ */
3177
+ static workflowUpdate(podId, workflowName, requestBody) {
3178
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3179
+ method: 'PATCH',
3180
+ url: '/pods/{pod_id}/workflows/{workflow_name}',
3181
+ path: {
3182
+ 'pod_id': podId,
3183
+ 'workflow_name': workflowName,
3184
+ },
3185
+ body: requestBody,
3186
+ mediaType: 'application/json',
3187
+ errors: {
3188
+ 422: `Validation Error`,
3189
+ },
3190
+ });
3191
+ }
3192
+ /**
3193
+ * Delete Workflow
3194
+ * Delete a workflow definition.
3195
+ * @param podId
3196
+ * @param workflowName
3197
+ * @returns void
3198
+ * @throws ApiError
3199
+ */
3200
+ static workflowDelete(podId, workflowName) {
3201
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3202
+ method: 'DELETE',
3203
+ url: '/pods/{pod_id}/workflows/{workflow_name}',
3204
+ path: {
3205
+ 'pod_id': podId,
3206
+ 'workflow_name': workflowName,
3207
+ },
3208
+ errors: {
3209
+ 422: `Validation Error`,
3210
+ },
3211
+ });
3212
+ }
3213
+ /**
3214
+ * Update Workflow Graph
3215
+ * Replace the workflow graph. Agent/function node `input_mapping` entries must use explicit typed bindings. Use `{type: "expression", value: "start.payload.issue.key"}` for context lookups and `{type: "literal", value: "abc"}` for fixed JSON values.
3216
+ * @param podId
3217
+ * @param workflowName
3218
+ * @param requestBody
3219
+ * @returns FlowEntity Successful Response
3220
+ * @throws ApiError
3221
+ */
3222
+ static workflowGraphUpdate(podId, workflowName, requestBody) {
3223
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3224
+ method: 'PUT',
3225
+ url: '/pods/{pod_id}/workflows/{workflow_name}/graph',
3226
+ path: {
3227
+ 'pod_id': podId,
3228
+ 'workflow_name': workflowName,
3229
+ },
3230
+ body: requestBody,
3231
+ mediaType: 'application/json',
3232
+ errors: {
3233
+ 422: `Validation Error`,
3234
+ },
3235
+ });
3236
+ }
3237
+ /**
3238
+ * Install Workflow
3239
+ * Install a workflow for runtime execution. Provide `account_id` when the workflow needs an integration account binding.
3240
+ * @param podId
3241
+ * @param workflowName
3242
+ * @param requestBody
3243
+ * @returns FlowInstallEntity Successful Response
3244
+ * @throws ApiError
3245
+ */
3246
+ static workflowInstallCreate(podId, workflowName, requestBody) {
3247
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3248
+ method: 'POST',
3249
+ url: '/pods/{pod_id}/workflows/{workflow_name}/install',
3250
+ path: {
3251
+ 'pod_id': podId,
3252
+ 'workflow_name': workflowName,
3253
+ },
3254
+ body: requestBody,
3255
+ mediaType: 'application/json',
3256
+ errors: {
3257
+ 422: `Validation Error`,
3258
+ },
3259
+ });
3260
+ }
3261
+ /**
3262
+ * Uninstall Workflow
3263
+ * Remove a previously created workflow installation binding.
3264
+ * @param podId
3265
+ * @param workflowName
3266
+ * @param installId
3267
+ * @returns void
3268
+ * @throws ApiError
3269
+ */
3270
+ static workflowInstallDelete(podId, workflowName, installId) {
3271
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3272
+ method: 'DELETE',
3273
+ url: '/pods/{pod_id}/workflows/{workflow_name}/installs/{install_id}',
3274
+ path: {
3275
+ 'pod_id': podId,
3276
+ 'workflow_name': workflowName,
3277
+ 'install_id': installId,
3278
+ },
3279
+ errors: {
3280
+ 422: `Validation Error`,
3281
+ },
3282
+ });
3283
+ }
3284
+ /**
3285
+ * Start Workflow
3286
+ * Start a new workflow run. For event/scheduled/datastore starts, the request body is treated as initial trigger payload and merged into execution context.
3287
+ * @param podId
3288
+ * @param workflowName
3289
+ * @param requestBody
3290
+ * @returns FlowRunEntity Successful Response
3291
+ * @throws ApiError
3292
+ */
3293
+ static workflowStart(podId, workflowName, requestBody) {
3294
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3295
+ method: 'POST',
3296
+ url: '/pods/{pod_id}/workflows/{workflow_name}/start',
3297
+ path: {
3298
+ 'pod_id': podId,
3299
+ 'workflow_name': workflowName,
3300
+ },
3301
+ body: requestBody,
3302
+ mediaType: 'application/json',
3303
+ errors: {
3304
+ 422: `Validation Error`,
3305
+ },
3306
+ });
3307
+ }
3308
+ /**
3309
+ * Visualize Workflow
3310
+ * Render an HTML visualization for debugging workflow graph structure.
3311
+ * @param podId
3312
+ * @param workflowName
3313
+ * @returns string Successful Response
3314
+ * @throws ApiError
3315
+ */
3316
+ static workflowVisualize(podId, workflowName) {
3317
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3318
+ method: 'GET',
3319
+ url: '/pods/{pod_id}/workflows/{workflow_name}/visualize',
3320
+ path: {
3321
+ 'pod_id': podId,
3322
+ 'workflow_name': workflowName,
3323
+ },
3324
+ errors: {
3325
+ 422: `Validation Error`,
3326
+ },
3327
+ });
3328
+ }
3329
+ /**
3330
+ * Resume Workflow Run
3331
+ * Resume a run in WAITING or EXECUTING state. The payload is written back into the current waiting node output and execution continues.
3332
+ * @param podId
3333
+ * @param runId
3334
+ * @param requestBody
3335
+ * @returns FlowRunEntity Successful Response
3336
+ * @throws ApiError
3337
+ */
3338
+ static workflowRunResume(podId, runId, requestBody) {
3339
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3340
+ method: 'POST',
3341
+ url: '/pods/{pod_id}/workflow-runs/{run_id}/resume',
3342
+ path: {
3343
+ 'pod_id': podId,
3344
+ 'run_id': runId,
3345
+ },
3346
+ body: requestBody,
3347
+ mediaType: 'application/json',
3348
+ errors: {
3349
+ 422: `Validation Error`,
3350
+ },
3351
+ });
3352
+ }
3353
+ /**
3354
+ * Get Workflow Run
3355
+ * Get current state, context, and step history of a workflow run.
3356
+ * @param podId
3357
+ * @param runId
3358
+ * @returns FlowRunEntity Successful Response
3359
+ * @throws ApiError
3360
+ */
3361
+ static workflowRunGet(podId, runId) {
3362
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3363
+ method: 'GET',
3364
+ url: '/pods/{pod_id}/workflow-runs/{run_id}',
3365
+ path: {
3366
+ 'pod_id': podId,
3367
+ 'run_id': runId,
3368
+ },
3369
+ errors: {
3370
+ 422: `Validation Error`,
3371
+ },
3372
+ });
3373
+ }
3374
+ /**
3375
+ * List Workflow Runs
3376
+ * List recent runs for a given workflow.
3377
+ * @param podId
3378
+ * @param workflowName
3379
+ * @param limit
3380
+ * @param pageToken
3381
+ * @returns WorkflowRunListResponse Successful Response
3382
+ * @throws ApiError
3383
+ */
3384
+ static workflowRunList(podId, workflowName, limit = 100, pageToken) {
3385
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3386
+ method: 'GET',
3387
+ url: '/pods/{pod_id}/workflow-runs/{workflow_name}/runs',
3388
+ path: {
3389
+ 'pod_id': podId,
3390
+ 'workflow_name': workflowName,
3391
+ },
3392
+ query: {
3393
+ 'limit': limit,
3394
+ 'page_token': pageToken,
3395
+ },
3396
+ errors: {
3397
+ 422: `Validation Error`,
3398
+ },
3399
+ });
3400
+ }
3401
+ /**
3402
+ * Visualize Workflow Run
3403
+ * Render an HTML view of a run overlaid on its workflow graph.
3404
+ * @param podId
3405
+ * @param runId
3406
+ * @returns string Successful Response
3407
+ * @throws ApiError
3408
+ */
3409
+ static workflowRunVisualize(podId, runId) {
3410
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3411
+ method: 'GET',
3412
+ url: '/pods/{pod_id}/workflow-runs/{run_id}/visualize',
3413
+ path: {
3414
+ 'pod_id': podId,
3415
+ 'run_id': runId,
3416
+ },
3417
+ errors: {
3418
+ 422: `Validation Error`,
3419
+ },
3420
+ });
3421
+ }
3422
+ }
3423
+ exports.WorkflowsService = WorkflowsService;
3424
+
3425
+ },
3426
+ "./namespaces/desks.js": function (module, exports, require) {
3427
+ "use strict";
3428
+ Object.defineProperty(exports, "__esModule", { value: true });
3429
+ exports.DesksNamespace = void 0;
3430
+ const DesksService_js_1 = require("./openapi_client/services/DesksService.js");
3431
+ class DesksNamespace {
3432
+ constructor(client, http, podId) {
3433
+ this.client = client;
3434
+ this.http = http;
3435
+ this.podId = podId;
3436
+ this.html = {
3437
+ get: (name) => this.client.request(() => DesksService_js_1.DesksService.podDeskHtmlGet(this.podId(), name)),
3438
+ };
3439
+ this.bundle = {
3440
+ upload: (name, payload) => this.client.request(() => DesksService_js_1.DesksService.podDeskBundleUpload(this.podId(), name, payload)),
3441
+ };
3442
+ this.source = {
3443
+ download: (name) => this.http.requestBytes("GET", `/pods/${this.podId()}/desks/${name}/source/archive`),
3444
+ };
3445
+ }
3446
+ list(options = {}) {
3447
+ return this.client.request(() => DesksService_js_1.DesksService.podDeskList(this.podId(), options.limit ?? 100, options.pageToken));
3448
+ }
3449
+ create(payload) {
3450
+ return this.client.request(() => DesksService_js_1.DesksService.podDeskCreate(this.podId(), payload));
3451
+ }
3452
+ get(name) {
3453
+ return this.client.request(() => DesksService_js_1.DesksService.podDeskGet(this.podId(), name));
3454
+ }
3455
+ update(name, payload) {
3456
+ return this.client.request(() => DesksService_js_1.DesksService.podDeskUpdate(this.podId(), name, payload));
3457
+ }
3458
+ delete(name) {
3459
+ return this.client.request(() => DesksService_js_1.DesksService.podDeskDelete(this.podId(), name));
3460
+ }
3461
+ }
3462
+ exports.DesksNamespace = DesksNamespace;
3463
+
3464
+ },
3465
+ "./openapi_client/services/DesksService.js": function (module, exports, require) {
3466
+ "use strict";
3467
+ Object.defineProperty(exports, "__esModule", { value: true });
3468
+ exports.DesksService = void 0;
3469
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
3470
+ const request_js_1 = require("./openapi_client/core/request.js");
3471
+ class DesksService {
3472
+ /**
3473
+ * Create Desk
3474
+ * @param podId
3475
+ * @param requestBody
3476
+ * @returns DeskResponse Successful Response
3477
+ * @throws ApiError
3478
+ */
3479
+ static podDeskCreate(podId, requestBody) {
3480
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3481
+ method: 'POST',
3482
+ url: '/pods/{pod_id}/desks',
3483
+ path: {
3484
+ 'pod_id': podId,
3485
+ },
3486
+ body: requestBody,
3487
+ mediaType: 'application/json',
3488
+ errors: {
3489
+ 422: `Validation Error`,
3490
+ },
3491
+ });
3492
+ }
3493
+ /**
3494
+ * List Desks
3495
+ * @param podId
3496
+ * @param limit
3497
+ * @param pageToken
3498
+ * @returns DeskListResponse Successful Response
3499
+ * @throws ApiError
3500
+ */
3501
+ static podDeskList(podId, limit = 100, pageToken) {
3502
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3503
+ method: 'GET',
3504
+ url: '/pods/{pod_id}/desks',
3505
+ path: {
3506
+ 'pod_id': podId,
3507
+ },
3508
+ query: {
3509
+ 'limit': limit,
3510
+ 'page_token': pageToken,
3511
+ },
3512
+ errors: {
3513
+ 422: `Validation Error`,
3514
+ },
3515
+ });
3516
+ }
3517
+ /**
3518
+ * Get Desk
3519
+ * @param podId
3520
+ * @param deskName
3521
+ * @returns DeskResponse Successful Response
3522
+ * @throws ApiError
3523
+ */
3524
+ static podDeskGet(podId, deskName) {
3525
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3526
+ method: 'GET',
3527
+ url: '/pods/{pod_id}/desks/{desk_name}',
3528
+ path: {
3529
+ 'pod_id': podId,
3530
+ 'desk_name': deskName,
3531
+ },
3532
+ errors: {
3533
+ 422: `Validation Error`,
3534
+ },
3535
+ });
3536
+ }
3537
+ /**
3538
+ * Update Desk
3539
+ * @param podId
3540
+ * @param deskName
3541
+ * @param requestBody
3542
+ * @returns DeskResponse Successful Response
3543
+ * @throws ApiError
3544
+ */
3545
+ static podDeskUpdate(podId, deskName, requestBody) {
3546
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3547
+ method: 'PATCH',
3548
+ url: '/pods/{pod_id}/desks/{desk_name}',
3549
+ path: {
3550
+ 'pod_id': podId,
3551
+ 'desk_name': deskName,
3552
+ },
3553
+ body: requestBody,
3554
+ mediaType: 'application/json',
3555
+ errors: {
3556
+ 422: `Validation Error`,
3557
+ },
3558
+ });
3559
+ }
3560
+ /**
3561
+ * Delete Desk
3562
+ * @param podId
3563
+ * @param deskName
3564
+ * @returns DeskMessageResponse Successful Response
3565
+ * @throws ApiError
3566
+ */
3567
+ static podDeskDelete(podId, deskName) {
3568
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3569
+ method: 'DELETE',
3570
+ url: '/pods/{pod_id}/desks/{desk_name}',
3571
+ path: {
3572
+ 'pod_id': podId,
3573
+ 'desk_name': deskName,
3574
+ },
3575
+ errors: {
3576
+ 422: `Validation Error`,
3577
+ },
3578
+ });
3579
+ }
3580
+ /**
3581
+ * Upload Desk Bundle
3582
+ * @param podId
3583
+ * @param deskName
3584
+ * @param formData
3585
+ * @returns DeskBundleUploadResponse Successful Response
3586
+ * @throws ApiError
3587
+ */
3588
+ static podDeskBundleUpload(podId, deskName, formData) {
3589
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3590
+ method: 'POST',
3591
+ url: '/pods/{pod_id}/desks/{desk_name}/bundle',
3592
+ path: {
3593
+ 'pod_id': podId,
3594
+ 'desk_name': deskName,
3595
+ },
3596
+ formData: formData,
3597
+ mediaType: 'multipart/form-data',
3598
+ errors: {
3599
+ 422: `Validation Error`,
3600
+ },
3601
+ });
3602
+ }
3603
+ /**
3604
+ * Get Desk HTML
3605
+ * @param podId
3606
+ * @param deskName
3607
+ * @returns any Successful Response
3608
+ * @throws ApiError
3609
+ */
3610
+ static podDeskHtmlGet(podId, deskName) {
3611
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3612
+ method: 'GET',
3613
+ url: '/pods/{pod_id}/desks/{desk_name}/html',
3614
+ path: {
3615
+ 'pod_id': podId,
3616
+ 'desk_name': deskName,
3617
+ },
3618
+ errors: {
3619
+ 422: `Validation Error`,
3620
+ },
3621
+ });
3622
+ }
3623
+ /**
3624
+ * Download Desk Source Archive
3625
+ * @param podId
3626
+ * @param deskName
3627
+ * @returns any Successful Response
3628
+ * @throws ApiError
3629
+ */
3630
+ static podDeskSourceArchiveGet(podId, deskName) {
3631
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3632
+ method: 'GET',
3633
+ url: '/pods/{pod_id}/desks/{desk_name}/source/archive',
3634
+ path: {
3635
+ 'pod_id': podId,
3636
+ 'desk_name': deskName,
3637
+ },
3638
+ errors: {
3639
+ 422: `Validation Error`,
3640
+ },
3641
+ });
3642
+ }
3643
+ }
3644
+ exports.DesksService = DesksService;
3645
+
3646
+ },
3647
+ "./namespaces/integrations.js": function (module, exports, require) {
3648
+ "use strict";
3649
+ Object.defineProperty(exports, "__esModule", { value: true });
3650
+ exports.IntegrationsNamespace = void 0;
3651
+ const ApplicationsService_js_1 = require("./openapi_client/services/ApplicationsService.js");
3652
+ const IntegrationsService_js_1 = require("./openapi_client/services/IntegrationsService.js");
3653
+ class IntegrationsNamespace {
3654
+ constructor(client) {
3655
+ this.client = client;
3656
+ this.operations = {
3657
+ list: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationList(applicationId)),
3658
+ get: (applicationId, operationName) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetail(applicationId, operationName)),
3659
+ execute: (applicationId, operationName, payload, accountId) => {
3660
+ const body = { payload, account_id: accountId };
3661
+ return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
3662
+ },
3663
+ descriptor: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationDescriptor(applicationId)),
3664
+ };
3665
+ this.triggers = {
3666
+ list: (options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
3667
+ get: (triggerId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerGet(triggerId)),
3668
+ };
3669
+ this.accounts = {
3670
+ list: (options = {}) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountList(options.applicationId, options.limit ?? 100, options.pageToken)),
3671
+ get: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountGet(accountId)),
3672
+ credentials: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountCredentialsGet(accountId)),
3673
+ delete: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountDelete(accountId)),
3674
+ };
3675
+ }
3676
+ list(options = {}) {
3677
+ return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationList(options.limit ?? 100, options.pageToken));
3678
+ }
3679
+ get(applicationId) {
3680
+ return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationGet(applicationId));
3681
+ }
3682
+ createConnectRequest(applicationId) {
3683
+ const payload = { application_id: applicationId };
3684
+ return this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationConnectRequestCreate(payload));
3685
+ }
3686
+ }
3687
+ exports.IntegrationsNamespace = IntegrationsNamespace;
3688
+
3689
+ },
3690
+ "./openapi_client/services/ApplicationsService.js": function (module, exports, require) {
3691
+ "use strict";
3692
+ Object.defineProperty(exports, "__esModule", { value: true });
3693
+ exports.ApplicationsService = void 0;
3694
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
3695
+ const request_js_1 = require("./openapi_client/core/request.js");
3696
+ class ApplicationsService {
3697
+ /**
3698
+ * List Applications
3699
+ * Get all active applications available for integration
3700
+ * @param limit
3701
+ * @param pageToken
3702
+ * @returns ApplicationListResponseSchema Successful Response
3703
+ * @throws ApiError
3704
+ */
3705
+ static applicationList(limit = 100, pageToken) {
3706
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3707
+ method: 'GET',
3708
+ url: '/integrations/applications',
3709
+ query: {
3710
+ 'limit': limit,
3711
+ 'page_token': pageToken,
3712
+ },
3713
+ errors: {
3714
+ 422: `Validation Error`,
3715
+ },
3716
+ });
3717
+ }
3718
+ /**
3719
+ * List Triggers
3720
+ * Get all triggers. Optionally filter by application_id and search in description
3721
+ * @param applicationId
3722
+ * @param search
3723
+ * @param limit
3724
+ * @param pageToken
3725
+ * @returns AppTriggerListResponseSchema Successful Response
3726
+ * @throws ApiError
3727
+ */
3728
+ static applicationTriggerList(applicationId, search, limit = 100, pageToken) {
3729
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3730
+ method: 'GET',
3731
+ url: '/integrations/applications/triggers',
3732
+ query: {
3733
+ 'application_id': applicationId,
3734
+ 'search': search,
3735
+ 'limit': limit,
3736
+ 'page_token': pageToken,
3737
+ },
3738
+ errors: {
3739
+ 422: `Validation Error`,
3740
+ },
3741
+ });
3742
+ }
3743
+ /**
3744
+ * Get Trigger
3745
+ * Get a specific trigger by ID
3746
+ * @param triggerId
3747
+ * @returns AppTriggerResponseSchema Successful Response
3748
+ * @throws ApiError
3749
+ */
3750
+ static applicationTriggerGet(triggerId) {
3751
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3752
+ method: 'GET',
3753
+ url: '/integrations/applications/triggers/{trigger_id}',
3754
+ path: {
3755
+ 'trigger_id': triggerId,
3756
+ },
3757
+ errors: {
3758
+ 422: `Validation Error`,
3759
+ },
3760
+ });
3761
+ }
3762
+ /**
3763
+ * Get Application
3764
+ * Get a specific application by ID along with its operation catalog
3765
+ * @param applicationId
3766
+ * @returns ApplicationDetailResponseSchema Successful Response
3767
+ * @throws ApiError
3768
+ */
3769
+ static applicationGet(applicationId) {
3770
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3771
+ method: 'GET',
3772
+ url: '/integrations/applications/{application_id}',
3773
+ path: {
3774
+ 'application_id': applicationId,
3775
+ },
3776
+ errors: {
3777
+ 422: `Validation Error`,
3778
+ },
3779
+ });
3780
+ }
3781
+ /**
3782
+ * Get Application Descriptor
3783
+ * @param applicationId
3784
+ * @returns AppDescriptorResponse Successful Response
3785
+ * @throws ApiError
3786
+ */
3787
+ static applicationDescriptor(applicationId) {
3788
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3789
+ method: 'GET',
3790
+ url: '/integrations/applications/{application_id}/operations/descriptor',
3791
+ path: {
3792
+ 'application_id': applicationId,
3793
+ },
3794
+ errors: {
3795
+ 422: `Validation Error`,
3796
+ },
3797
+ });
3798
+ }
3799
+ /**
3800
+ * List Application Operations
3801
+ * @param applicationId
3802
+ * @param search
3803
+ * @param limit
3804
+ * @param pageToken
3805
+ * @returns OperationListResponse Successful Response
3806
+ * @throws ApiError
3807
+ */
3808
+ static applicationOperationList(applicationId, search, limit = 100, pageToken) {
3809
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3810
+ method: 'GET',
3811
+ url: '/integrations/applications/{application_id}/operations',
3812
+ path: {
3813
+ 'application_id': applicationId,
3814
+ },
3815
+ query: {
3816
+ 'search': search,
3817
+ 'limit': limit,
3818
+ 'page_token': pageToken,
3819
+ },
3820
+ errors: {
3821
+ 422: `Validation Error`,
3822
+ },
3823
+ });
3824
+ }
3825
+ /**
3826
+ * Get Application Operation Details
3827
+ * @param applicationId
3828
+ * @param operationName
3829
+ * @returns OperationDetail Successful Response
3830
+ * @throws ApiError
3831
+ */
3832
+ static applicationOperationDetail(applicationId, operationName) {
3833
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3834
+ method: 'GET',
3835
+ url: '/integrations/applications/{application_id}/operations/{operation_name}',
3836
+ path: {
3837
+ 'application_id': applicationId,
3838
+ 'operation_name': operationName,
3839
+ },
3840
+ errors: {
3841
+ 422: `Validation Error`,
3842
+ },
3843
+ });
3844
+ }
3845
+ /**
3846
+ * Execute Application Operation
3847
+ * @param applicationId
3848
+ * @param operationName
3849
+ * @param requestBody
3850
+ * @returns OperationExecutionResponse Successful Response
3851
+ * @throws ApiError
3852
+ */
3853
+ static applicationOperationExecute(applicationId, operationName, requestBody) {
3854
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3855
+ method: 'POST',
3856
+ url: '/integrations/applications/{application_id}/operations/{operation_name}/execute',
3857
+ path: {
3858
+ 'application_id': applicationId,
3859
+ 'operation_name': operationName,
3860
+ },
3861
+ body: requestBody,
3862
+ mediaType: 'application/json',
3863
+ errors: {
3864
+ 422: `Validation Error`,
3865
+ },
3866
+ });
3867
+ }
3868
+ }
3869
+ exports.ApplicationsService = ApplicationsService;
3870
+
3871
+ },
3872
+ "./openapi_client/services/IntegrationsService.js": function (module, exports, require) {
3873
+ "use strict";
3874
+ Object.defineProperty(exports, "__esModule", { value: true });
3875
+ exports.IntegrationsService = void 0;
3876
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
3877
+ const request_js_1 = require("./openapi_client/core/request.js");
3878
+ class IntegrationsService {
3879
+ /**
3880
+ * Initiate Connect Request
3881
+ * Initiate an OAuth connection request for an application
3882
+ * @param requestBody
3883
+ * @returns ConnectRequestResponseSchema Successful Response
3884
+ * @throws ApiError
3885
+ */
3886
+ static integrationConnectRequestCreate(requestBody) {
3887
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3888
+ method: 'POST',
3889
+ url: '/integrations/connect-requests',
3890
+ body: requestBody,
3891
+ mediaType: 'application/json',
3892
+ errors: {
3893
+ 422: `Validation Error`,
3894
+ },
3895
+ });
3896
+ }
3897
+ /**
3898
+ * OAuth Callback
3899
+ * Handle OAuth callback and complete account connection. This endpoint is public and uses state parameter for security.
3900
+ * @param error
3901
+ * @returns AccountResponseSchema Successful Response
3902
+ * @throws ApiError
3903
+ */
3904
+ static integrationOauthCallback(error) {
3905
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3906
+ method: 'GET',
3907
+ url: '/integrations/connect-requests/oauth/callback',
3908
+ query: {
3909
+ 'error': error,
3910
+ },
3911
+ errors: {
3912
+ 422: `Validation Error`,
3913
+ },
3914
+ });
3915
+ }
3916
+ /**
3917
+ * List Accounts
3918
+ * Get all connected accounts for the current user. Optionally filter by application_id or application_name
3919
+ * @param applicationId
3920
+ * @param limit
3921
+ * @param pageToken
3922
+ * @returns AccountListResponseSchema Successful Response
3923
+ * @throws ApiError
3924
+ */
3925
+ static integrationAccountList(applicationId, limit = 100, pageToken) {
3926
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3927
+ method: 'GET',
3928
+ url: '/integrations/accounts',
3929
+ query: {
3930
+ 'application_id': applicationId,
3931
+ 'limit': limit,
3932
+ 'page_token': pageToken,
3933
+ },
3934
+ errors: {
3935
+ 422: `Validation Error`,
3936
+ },
3937
+ });
3938
+ }
3939
+ /**
3940
+ * Get Account
3941
+ * Get a specific account by ID
3942
+ * @param accountId
3943
+ * @returns AccountResponseSchema Successful Response
3944
+ * @throws ApiError
3945
+ */
3946
+ static integrationAccountGet(accountId) {
3947
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3948
+ method: 'GET',
3949
+ url: '/integrations/accounts/{account_id}',
3950
+ path: {
3951
+ 'account_id': accountId,
3952
+ },
3953
+ errors: {
3954
+ 422: `Validation Error`,
3955
+ },
3956
+ });
3957
+ }
3958
+ /**
3959
+ * Delete Account
3960
+ * Delete a connected account and revoke the connection
3961
+ * @param accountId
3962
+ * @returns MessageResponseSchema Successful Response
3963
+ * @throws ApiError
3964
+ */
3965
+ static integrationAccountDelete(accountId) {
3966
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3967
+ method: 'DELETE',
3968
+ url: '/integrations/accounts/{account_id}',
3969
+ path: {
3970
+ 'account_id': accountId,
3971
+ },
3972
+ errors: {
3973
+ 422: `Validation Error`,
3974
+ },
3975
+ });
3976
+ }
3977
+ /**
3978
+ * Get Credentials
3979
+ * Get the credentials for a specific account
3980
+ * @param accountId
3981
+ * @returns AccountCredentialsResponseSchema Successful Response
3982
+ * @throws ApiError
3983
+ */
3984
+ static integrationAccountCredentialsGet(accountId) {
3985
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3986
+ method: 'GET',
3987
+ url: '/integrations/accounts/{account_id}/credentials',
3988
+ path: {
3989
+ 'account_id': accountId,
3990
+ },
3991
+ errors: {
3992
+ 422: `Validation Error`,
3993
+ },
3994
+ });
3995
+ }
3996
+ }
3997
+ exports.IntegrationsService = IntegrationsService;
3998
+
3999
+ }
4000
+ };
4001
+
4002
+ const moduleCache = {};
4003
+ const requireModule = (id) => {
4004
+ if (moduleCache[id]) {
4005
+ return moduleCache[id].exports;
4006
+ }
4007
+ const factory = modules[id];
4008
+ if (!factory) {
4009
+ throw new Error("Module not found: " + id);
4010
+ }
4011
+ const module = { exports: {} };
4012
+ moduleCache[id] = module;
4013
+ factory(module, module.exports, requireModule);
4014
+ return module.exports;
4015
+ };
4016
+
4017
+ const entry = requireModule("./browser.js");
4018
+ const globalScope = typeof window !== "undefined" ? window : globalThis;
4019
+ globalScope.LemmaClient = entry;
4020
+ })();