lemma-sdk 0.2.43 → 0.2.45

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 (502) hide show
  1. package/README.md +2 -5
  2. package/dist/assistant-events.d.ts +2 -0
  3. package/dist/assistant-events.js +50 -3
  4. package/dist/browser/lemma-client.js +1333 -435
  5. package/dist/client.d.ts +8 -0
  6. package/dist/client.js +13 -1
  7. package/dist/config.d.ts +2 -2
  8. package/dist/config.js +2 -2
  9. package/dist/hey_client/client/client.gen.d.ts +2 -0
  10. package/dist/hey_client/client/client.gen.js +216 -0
  11. package/dist/hey_client/client/index.d.ts +10 -0
  12. package/dist/hey_client/client/index.js +6 -0
  13. package/dist/hey_client/client/types.gen.d.ts +120 -0
  14. package/dist/hey_client/client/types.gen.js +2 -0
  15. package/dist/hey_client/client/utils.gen.d.ts +37 -0
  16. package/dist/hey_client/client/utils.gen.js +228 -0
  17. package/dist/hey_client/client.gen.d.ts +12 -0
  18. package/dist/hey_client/client.gen.js +3 -0
  19. package/dist/hey_client/core/auth.gen.d.ts +25 -0
  20. package/dist/hey_client/core/auth.gen.js +14 -0
  21. package/dist/hey_client/core/bodySerializer.gen.d.ts +25 -0
  22. package/dist/hey_client/core/bodySerializer.gen.js +57 -0
  23. package/dist/hey_client/core/params.gen.d.ts +43 -0
  24. package/dist/hey_client/core/params.gen.js +100 -0
  25. package/dist/hey_client/core/pathSerializer.gen.d.ts +33 -0
  26. package/dist/hey_client/core/pathSerializer.gen.js +106 -0
  27. package/dist/hey_client/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/hey_client/core/queryKeySerializer.gen.js +92 -0
  29. package/dist/hey_client/core/serverSentEvents.gen.d.ts +71 -0
  30. package/dist/hey_client/core/serverSentEvents.gen.js +132 -0
  31. package/dist/hey_client/core/types.gen.d.ts +83 -0
  32. package/dist/hey_client/core/types.gen.js +2 -0
  33. package/dist/hey_client/core/utils.gen.d.ts +19 -0
  34. package/dist/hey_client/core/utils.gen.js +87 -0
  35. package/dist/hey_client/index.d.ts +2 -0
  36. package/dist/hey_client/index.js +2 -0
  37. package/dist/hey_client/sdk.gen.d.ts +1005 -0
  38. package/dist/hey_client/sdk.gen.js +1438 -0
  39. package/dist/hey_client/types.gen.d.ts +13004 -0
  40. package/dist/hey_client/types.gen.js +2 -0
  41. package/dist/index.d.ts +4 -0
  42. package/dist/namespaces/agent-runtime.d.ts +28 -0
  43. package/dist/namespaces/agent-runtime.js +34 -0
  44. package/dist/namespaces/agents.d.ts +8 -3
  45. package/dist/namespaces/agents.js +4 -0
  46. package/dist/namespaces/conversations.d.ts +35 -7
  47. package/dist/namespaces/conversations.js +103 -22
  48. package/dist/namespaces/desks.d.ts +3 -3
  49. package/dist/namespaces/files.d.ts +17 -28
  50. package/dist/namespaces/files.js +10 -11
  51. package/dist/namespaces/functions.d.ts +8 -3
  52. package/dist/namespaces/functions.js +4 -0
  53. package/dist/namespaces/integrations.d.ts +54 -12
  54. package/dist/namespaces/integrations.js +52 -16
  55. package/dist/namespaces/pod-members.d.ts +1 -0
  56. package/dist/namespaces/pod-members.js +4 -1
  57. package/dist/namespaces/pod-permissions.d.ts +14 -0
  58. package/dist/namespaces/pod-permissions.js +18 -0
  59. package/dist/namespaces/pod-roles.d.ts +16 -0
  60. package/dist/namespaces/pod-roles.js +25 -0
  61. package/dist/namespaces/pod-surfaces.d.ts +8 -3
  62. package/dist/namespaces/pod-surfaces.js +15 -6
  63. package/dist/namespaces/pods.d.ts +2 -3
  64. package/dist/namespaces/pods.js +1 -6
  65. package/dist/namespaces/records.d.ts +7 -7
  66. package/dist/namespaces/resource-access.d.ts +11 -0
  67. package/dist/namespaces/resource-access.js +18 -0
  68. package/dist/namespaces/schedules.d.ts +4 -3
  69. package/dist/namespaces/schedules.js +1 -1
  70. package/dist/namespaces/tables.d.ts +6 -6
  71. package/dist/namespaces/workflows.d.ts +16 -12
  72. package/dist/namespaces/workflows.js +9 -18
  73. package/dist/openapi_client/index.d.ts +90 -61
  74. package/dist/openapi_client/index.js +17 -12
  75. package/dist/openapi_client/models/AccountCreateSchema.d.ts +18 -0
  76. package/dist/openapi_client/models/AccountResponseSchema.d.ts +3 -0
  77. package/dist/openapi_client/models/AgentActionResponse.d.ts +20 -0
  78. package/dist/openapi_client/models/AgentDetailResponse.d.ts +22 -0
  79. package/dist/openapi_client/models/AgentHarnessInfo.d.ts +11 -0
  80. package/dist/openapi_client/models/AgentHarnessListResponse.d.ts +4 -0
  81. package/dist/openapi_client/models/AgentListResponse.d.ts +2 -2
  82. package/dist/openapi_client/models/AgentNode.d.ts +1 -1
  83. package/dist/openapi_client/models/AgentNodeConfig.d.ts +1 -1
  84. package/dist/openapi_client/models/AgentPermissionsReplaceRequest.d.ts +4 -0
  85. package/dist/openapi_client/models/AgentPermissionsResponse.d.ts +6 -0
  86. package/dist/openapi_client/models/AgentResourcePermissionRequest.d.ts +6 -0
  87. package/dist/openapi_client/models/AgentResourcePermissionResponse.d.ts +6 -0
  88. package/dist/openapi_client/models/AgentRunApprovalDecision.d.ts +8 -0
  89. package/dist/openapi_client/models/AgentRunApprovalDecision.js +13 -0
  90. package/dist/openapi_client/models/AgentRuntimeConfig.d.ts +7 -0
  91. package/dist/openapi_client/models/AgentRuntimeProfileListResponse.d.ts +6 -0
  92. package/dist/openapi_client/models/AgentRuntimeProfileResponse.d.ts +28 -0
  93. package/dist/openapi_client/models/AgentSurfaceResponse.d.ts +8 -12
  94. package/dist/openapi_client/models/AgentSurfaceStatus.d.ts +3 -1
  95. package/dist/openapi_client/models/AgentSurfaceStatus.js +2 -0
  96. package/dist/openapi_client/models/ApplicationDetailResponseSchema.d.ts +3 -3
  97. package/dist/openapi_client/models/ApplicationResponseSchema.d.ts +3 -3
  98. package/dist/openapi_client/models/ApplicationSkillResponse.d.ts +6 -0
  99. package/dist/openapi_client/models/AuthConfigCreateSchema.d.ts +7 -0
  100. package/dist/openapi_client/models/AuthConfigListResponseSchema.d.ts +6 -0
  101. package/dist/openapi_client/models/AuthConfigResponseSchema.d.ts +13 -0
  102. package/dist/openapi_client/models/AuthScheme.d.ts +5 -0
  103. package/dist/openapi_client/models/AuthScheme.js +10 -0
  104. package/dist/openapi_client/models/ComposioProviderCapabilityResponseSchema.d.ts +9 -0
  105. package/dist/openapi_client/models/ConnectRequestInitiateSchema.d.ts +5 -1
  106. package/dist/openapi_client/models/ConnectRequestResponseSchema.d.ts +2 -0
  107. package/dist/openapi_client/models/ConnectedAccountSummary.d.ts +7 -0
  108. package/dist/openapi_client/models/ConversationResponse.d.ts +2 -2
  109. package/dist/openapi_client/models/ConvertedArtifactResponse.d.ts +1 -0
  110. package/dist/openapi_client/models/ConvertedFileResponse.d.ts +4 -0
  111. package/dist/openapi_client/models/ConvertedPageResponse.d.ts +8 -0
  112. package/dist/openapi_client/models/CreateAgentRequest.d.ts +4 -12
  113. package/dist/openapi_client/models/CreateAnthropicCompatibleRuntimeProfileRequest.d.ts +11 -0
  114. package/dist/openapi_client/models/CreateConversationRequest.d.ts +2 -2
  115. package/dist/openapi_client/models/CreateDeskRequest.d.ts +1 -1
  116. package/dist/openapi_client/models/CreateFolderRequest.d.ts +1 -1
  117. package/dist/openapi_client/models/CreateFunctionRequest.d.ts +2 -7
  118. package/dist/openapi_client/models/CreateOpenAICompatibleRuntimeProfileRequest.d.ts +11 -0
  119. package/dist/openapi_client/models/CreateScheduleRequest.d.ts +17 -1
  120. package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +6 -15
  121. package/dist/openapi_client/models/CreateTableRequest.d.ts +1 -1
  122. package/dist/openapi_client/models/CreateUserDaemonRuntimeProfileRequest.d.ts +11 -0
  123. package/dist/openapi_client/models/DataStoreFlowStartInput.d.ts +1 -1
  124. package/dist/openapi_client/models/DataStoreFlowStartOutput.d.ts +1 -1
  125. package/dist/openapi_client/models/DatastoreCountResponse.d.ts +6 -0
  126. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -1
  127. package/dist/openapi_client/models/DecisionNode.d.ts +2 -1
  128. package/dist/openapi_client/models/DecisionRule.d.ts +3 -0
  129. package/dist/openapi_client/models/DeskBundleUploadResponse.d.ts +2 -2
  130. package/dist/openapi_client/models/{DeskResponse.d.ts → DeskDetailResponse.d.ts} +2 -2
  131. package/dist/openapi_client/models/DeskListResponse.d.ts +2 -2
  132. package/dist/openapi_client/models/EndNode.d.ts +1 -1
  133. package/dist/openapi_client/models/EventFlowStartInput.d.ts +0 -8
  134. package/dist/openapi_client/models/EventFlowStartOutput.d.ts +0 -8
  135. package/dist/openapi_client/models/ExpressionInputBinding.d.ts +6 -2
  136. package/dist/openapi_client/models/{FileResponse.d.ts → FileDetailResponse.d.ts} +2 -2
  137. package/dist/openapi_client/models/FileListResponse.d.ts +3 -2
  138. package/dist/openapi_client/models/FileSearchResponse.d.ts +2 -2
  139. package/dist/openapi_client/models/{FlowResponse.d.ts → FlowDetailResponse.d.ts} +2 -2
  140. package/dist/openapi_client/models/FlowRunStatus.d.ts +4 -1
  141. package/dist/openapi_client/models/FlowRunStatus.js +4 -1
  142. package/dist/openapi_client/models/FormNode.d.ts +2 -1
  143. package/dist/openapi_client/models/FormNodeConfig.d.ts +1 -1
  144. package/dist/openapi_client/models/{FunctionResponse.d.ts → FunctionActionResponse.d.ts} +3 -10
  145. package/dist/openapi_client/models/FunctionDetailResponse.d.ts +34 -0
  146. package/dist/openapi_client/models/FunctionListResponse.d.ts +2 -2
  147. package/dist/openapi_client/models/FunctionNode.d.ts +2 -1
  148. package/dist/openapi_client/models/FunctionPermissionsReplaceRequest.d.ts +4 -0
  149. package/dist/openapi_client/models/FunctionPermissionsResponse.d.ts +6 -0
  150. package/dist/openapi_client/models/FunctionResourcePermissionRequest.d.ts +6 -0
  151. package/dist/openapi_client/models/FunctionResourcePermissionResponse.d.ts +6 -0
  152. package/dist/openapi_client/models/FunctionRunListResponse.d.ts +2 -2
  153. package/dist/openapi_client/models/FunctionRunSummaryResponse.d.ts +13 -0
  154. package/dist/openapi_client/models/HarnessKind.d.ts +4 -2
  155. package/dist/openapi_client/models/HarnessKind.js +4 -2
  156. package/dist/openapi_client/models/InstalledAppSummary.d.ts +7 -0
  157. package/dist/openapi_client/models/IntegrationStatusResponse.d.ts +6 -0
  158. package/dist/openapi_client/models/LemmaProviderCapabilityResponseSchema.d.ts +12 -0
  159. package/dist/openapi_client/models/LoopNode.d.ts +2 -1
  160. package/dist/openapi_client/models/LoopNodeConfig.d.ts +3 -3
  161. package/dist/openapi_client/models/OAuth2DefaultsResponseSchema.d.ts +10 -0
  162. package/dist/openapi_client/models/OperationSummary.d.ts +4 -0
  163. package/dist/openapi_client/models/PodConfig.d.ts +6 -0
  164. package/dist/openapi_client/models/PodCreateRequest.d.ts +2 -0
  165. package/dist/openapi_client/models/PodEffectivePermissionsResponse.d.ts +4 -0
  166. package/dist/openapi_client/models/PodMemberAddRequest.d.ts +1 -3
  167. package/dist/openapi_client/models/PodMemberDetailResponse.d.ts +0 -2
  168. package/dist/openapi_client/models/PodMemberResponse.d.ts +0 -2
  169. package/dist/openapi_client/models/PodMemberUpdateRoleRequest.d.ts +1 -3
  170. package/dist/openapi_client/models/PodPermissionCatalogResponse.d.ts +4 -0
  171. package/dist/openapi_client/models/PodPermissionResponse.d.ts +7 -0
  172. package/dist/openapi_client/models/PodResponse.d.ts +2 -0
  173. package/dist/openapi_client/models/PodRoleCreateRequest.d.ts +2 -0
  174. package/dist/openapi_client/models/PodRolePermissionsReplaceRequest.d.ts +4 -0
  175. package/dist/openapi_client/models/PodRolePermissionsResponse.d.ts +6 -0
  176. package/dist/openapi_client/models/PodRoleResourcePermissionRequest.d.ts +6 -0
  177. package/dist/openapi_client/models/PodRoleResourcePermissionResponse.d.ts +6 -0
  178. package/dist/openapi_client/models/PodRoleResponse.d.ts +3 -0
  179. package/dist/openapi_client/models/PodUpdateRequest.d.ts +2 -0
  180. package/dist/openapi_client/models/ResolveUserApprovalRequest.d.ts +5 -0
  181. package/dist/openapi_client/models/ResourceAccessGrantRequest.d.ts +3 -0
  182. package/dist/openapi_client/models/ResourceAccessGrantResponse.d.ts +12 -0
  183. package/dist/openapi_client/models/ResourceAccessResponse.d.ts +7 -0
  184. package/dist/openapi_client/models/ResourceType.d.ts +19 -0
  185. package/dist/openapi_client/models/ResourceType.js +24 -0
  186. package/dist/openapi_client/models/ResourceVisibility.d.ts +6 -0
  187. package/dist/openapi_client/models/ResourceVisibility.js +11 -0
  188. package/dist/openapi_client/models/RuntimeModelCapability.d.ts +8 -0
  189. package/dist/openapi_client/models/RuntimeModelCapability.js +13 -0
  190. package/dist/openapi_client/models/RuntimeModelCatalogEntry.d.ts +9 -0
  191. package/dist/openapi_client/models/RuntimeModelCatalogEntry.js +1 -0
  192. package/dist/openapi_client/models/RuntimeProfileKind.d.ts +4 -0
  193. package/dist/openapi_client/models/RuntimeProfileKind.js +9 -0
  194. package/dist/openapi_client/models/RuntimeProfileProtocol.d.ts +9 -0
  195. package/dist/openapi_client/models/RuntimeProfileProtocol.js +14 -0
  196. package/dist/openapi_client/models/RuntimeProfileScope.d.ts +5 -0
  197. package/dist/openapi_client/models/RuntimeProfileScope.js +10 -0
  198. package/dist/openapi_client/models/RuntimeProfileStatus.d.ts +5 -0
  199. package/dist/openapi_client/models/RuntimeProfileStatus.js +10 -0
  200. package/dist/openapi_client/models/{ScheduleResponse.d.ts → ScheduleDetailResponse.d.ts} +9 -3
  201. package/dist/openapi_client/models/ScheduleDetailResponse.js +1 -0
  202. package/dist/openapi_client/models/ScheduleFireStatus.d.ts +8 -0
  203. package/dist/openapi_client/models/ScheduleFireStatus.js +13 -0
  204. package/dist/openapi_client/models/ScheduleListResponse.d.ts +2 -2
  205. package/dist/openapi_client/models/StepRecordResponse.d.ts +10 -0
  206. package/dist/openapi_client/models/StepRecordResponse.js +1 -0
  207. package/dist/openapi_client/models/StepStatus.d.ts +7 -0
  208. package/dist/openapi_client/models/StepStatus.js +12 -0
  209. package/dist/openapi_client/models/SurfaceBehaviorConfigInput.d.ts +7 -0
  210. package/dist/openapi_client/models/SurfaceBehaviorConfigInput.js +1 -0
  211. package/dist/openapi_client/models/SurfaceChannelRouteInput.d.ts +6 -0
  212. package/dist/openapi_client/models/SurfaceChannelRouteInput.js +1 -0
  213. package/dist/openapi_client/models/SurfaceChannelRouteResponse.d.ts +6 -0
  214. package/dist/openapi_client/models/SurfaceChannelRouteResponse.js +1 -0
  215. package/dist/openapi_client/models/SurfaceConfigResponse.d.ts +10 -0
  216. package/dist/openapi_client/models/SurfaceConfigResponse.js +1 -0
  217. package/dist/openapi_client/models/SurfaceCredentialMode.d.ts +2 -2
  218. package/dist/openapi_client/models/SurfaceCredentialMode.js +2 -2
  219. package/dist/openapi_client/models/SurfaceIdentityConfigInput.d.ts +4 -0
  220. package/dist/openapi_client/models/SurfaceIdentityConfigInput.js +1 -0
  221. package/dist/openapi_client/models/SurfaceIdentityConfigResponse.d.ts +4 -0
  222. package/dist/openapi_client/models/SurfaceIdentityConfigResponse.js +1 -0
  223. package/dist/openapi_client/models/SurfaceSetupMode.d.ts +2 -3
  224. package/dist/openapi_client/models/SurfaceSetupMode.js +1 -2
  225. package/dist/openapi_client/models/SurfaceSetupStatusResponse.d.ts +10 -0
  226. package/dist/openapi_client/models/SurfaceSetupStatusResponse.js +1 -0
  227. package/dist/openapi_client/models/{TableResponse.d.ts → TableDetailResponse.d.ts} +3 -3
  228. package/dist/openapi_client/models/TableDetailResponse.js +1 -0
  229. package/dist/openapi_client/models/TableListResponse.d.ts +4 -2
  230. package/dist/openapi_client/models/ToggleSurfaceRequest.d.ts +1 -1
  231. package/dist/openapi_client/models/UpdateAgentRequest.d.ts +4 -12
  232. package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -2
  233. package/dist/openapi_client/models/UpdateDeskRequest.d.ts +0 -1
  234. package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +2 -6
  235. package/dist/openapi_client/models/UpdateScheduleRequest.d.ts +2 -1
  236. package/dist/openapi_client/models/UpdateSurfaceChannelsRequest.d.ts +4 -0
  237. package/dist/openapi_client/models/UpdateSurfaceChannelsRequest.js +1 -0
  238. package/dist/openapi_client/models/UpdateSurfaceRequest.d.ts +5 -15
  239. package/dist/openapi_client/models/UpdateTableRequest.d.ts +1 -1
  240. package/dist/openapi_client/models/UpsertSurfaceRequest.d.ts +9 -0
  241. package/dist/openapi_client/models/UpsertSurfaceRequest.js +1 -0
  242. package/dist/openapi_client/models/UsageLimitScopeResponse.d.ts +2 -3
  243. package/dist/openapi_client/models/UsageLimitsResponse.d.ts +1 -4
  244. package/dist/openapi_client/models/UsageListResponse.d.ts +0 -3
  245. package/dist/openapi_client/models/UsageRecordResponse.d.ts +10 -14
  246. package/dist/openapi_client/models/UsageStatsBucketResponse.d.ts +1 -4
  247. package/dist/openapi_client/models/UsageStatsResponse.d.ts +0 -3
  248. package/dist/openapi_client/models/UsageSummaryResponse.d.ts +4 -6
  249. package/dist/openapi_client/models/UserApprovalListResponse.d.ts +4 -0
  250. package/dist/openapi_client/models/UserApprovalListResponse.js +1 -0
  251. package/dist/openapi_client/models/UserProfileRequest.d.ts +1 -0
  252. package/dist/openapi_client/models/UserResponse.d.ts +1 -0
  253. package/dist/openapi_client/models/VerifyTokenResponse.d.ts +5 -0
  254. package/dist/openapi_client/models/WaitUntilNode.d.ts +1 -1
  255. package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +18 -1
  256. package/dist/openapi_client/models/WorkflowListResponse.d.ts +2 -2
  257. package/dist/openapi_client/models/WorkflowRunFormSubmitRequest.d.ts +13 -0
  258. package/dist/openapi_client/models/WorkflowRunFormSubmitRequest.js +1 -0
  259. package/dist/openapi_client/models/WorkflowRunListResponse.d.ts +2 -2
  260. package/dist/openapi_client/models/WorkflowRunResponse.d.ts +28 -0
  261. package/dist/openapi_client/models/WorkflowRunResponse.js +1 -0
  262. package/dist/openapi_client/models/WorkflowRunSummaryResponse.d.ts +17 -0
  263. package/dist/openapi_client/models/WorkflowRunSummaryResponse.js +1 -0
  264. package/dist/openapi_client/models/WorkflowRunWaitAssignment.d.ts +4 -4
  265. package/dist/openapi_client/models/{WorkflowRunWaitEntity.d.ts → WorkflowRunWaitResponse.d.ts} +4 -8
  266. package/dist/openapi_client/models/WorkflowRunWaitResponse.js +1 -0
  267. package/dist/openapi_client/models/WorkflowRunWaitType.d.ts +1 -2
  268. package/dist/openapi_client/models/WorkflowRunWaitType.js +0 -1
  269. package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +2 -1
  270. package/dist/openapi_client/models/WorkspaceAppAccessRequest.d.ts +3 -0
  271. package/dist/openapi_client/models/WorkspaceAppAccessRequest.js +1 -0
  272. package/dist/openapi_client/models/WorkspaceAppAccessResponse.d.ts +5 -0
  273. package/dist/openapi_client/models/WorkspaceAppAccessResponse.js +1 -0
  274. package/dist/openapi_client/models/WorkspaceMeApp.d.ts +5 -0
  275. package/dist/openapi_client/models/WorkspaceMeApp.js +1 -0
  276. package/dist/openapi_client/models/WorkspaceMeResponse.d.ts +9 -0
  277. package/dist/openapi_client/models/WorkspaceMeResponse.js +1 -0
  278. package/dist/openapi_client/models/WorkspaceMeSandbox.d.ts +7 -0
  279. package/dist/openapi_client/models/WorkspaceMeSandbox.js +1 -0
  280. package/dist/openapi_client/models/WorkspaceMeSession.d.ts +6 -0
  281. package/dist/openapi_client/models/WorkspaceMeSession.js +1 -0
  282. package/dist/openapi_client/models/update.d.ts +1 -1
  283. package/dist/openapi_client/services/AgentConversationsService.d.ts +28 -3
  284. package/dist/openapi_client/services/AgentConversationsService.js +54 -3
  285. package/dist/openapi_client/services/AgentRuntimeService.d.ts +30 -0
  286. package/dist/openapi_client/services/AgentRuntimeService.js +54 -0
  287. package/dist/openapi_client/services/AgentSurfacesIngressService.d.ts +15 -20
  288. package/dist/openapi_client/services/AgentSurfacesIngressService.js +23 -28
  289. package/dist/openapi_client/services/AgentSurfacesService.d.ts +41 -12
  290. package/dist/openapi_client/services/AgentSurfacesService.js +90 -24
  291. package/dist/openapi_client/services/AgentToolsService.d.ts +0 -10
  292. package/dist/openapi_client/services/AgentToolsService.js +0 -18
  293. package/dist/openapi_client/services/AgentsService.d.ts +31 -9
  294. package/dist/openapi_client/services/AgentsService.js +50 -5
  295. package/dist/openapi_client/services/ApplicationsService.d.ts +22 -8
  296. package/dist/openapi_client/services/ApplicationsService.js +47 -16
  297. package/dist/openapi_client/services/DesksService.d.ts +7 -7
  298. package/dist/openapi_client/services/DesksService.js +3 -3
  299. package/dist/openapi_client/services/FilesService.d.ts +20 -12
  300. package/dist/openapi_client/services/FilesService.js +29 -5
  301. package/dist/openapi_client/services/FunctionsService.d.ts +30 -8
  302. package/dist/openapi_client/services/FunctionsService.js +49 -4
  303. package/dist/openapi_client/services/IntegrationsService.d.ts +70 -11
  304. package/dist/openapi_client/services/IntegrationsService.js +159 -20
  305. package/dist/openapi_client/services/OrganizationsService.d.ts +8 -0
  306. package/dist/openapi_client/services/OrganizationsService.js +19 -0
  307. package/dist/openapi_client/services/PodMembersService.d.ts +0 -10
  308. package/dist/openapi_client/services/PodMembersService.js +0 -24
  309. package/dist/openapi_client/services/PodPermissionsService.d.ts +19 -0
  310. package/dist/openapi_client/services/PodPermissionsService.js +40 -0
  311. package/dist/openapi_client/services/PodResourceAccessService.d.ts +38 -0
  312. package/dist/openapi_client/services/PodResourceAccessService.js +81 -0
  313. package/dist/openapi_client/services/PodRolesService.d.ts +28 -0
  314. package/dist/openapi_client/services/PodRolesService.js +66 -0
  315. package/dist/openapi_client/services/RecordsService.d.ts +21 -22
  316. package/dist/openapi_client/services/RecordsService.js +13 -13
  317. package/dist/openapi_client/services/SchedulesService.d.ts +9 -8
  318. package/dist/openapi_client/services/SchedulesService.js +6 -4
  319. package/dist/openapi_client/services/TablesService.d.ts +13 -14
  320. package/dist/openapi_client/services/TablesService.js +6 -6
  321. package/dist/openapi_client/services/UsageService.d.ts +96 -0
  322. package/dist/openapi_client/services/UsageService.js +210 -0
  323. package/dist/openapi_client/services/WorkflowsService.d.ts +44 -35
  324. package/dist/openapi_client/services/WorkflowsService.js +61 -43
  325. package/dist/openapi_client/services/WorkspaceAppsService.d.ts +12 -0
  326. package/dist/openapi_client/services/WorkspaceAppsService.js +21 -0
  327. package/dist/openapi_client/services/WorkspaceService.d.ts +10 -0
  328. package/dist/openapi_client/services/WorkspaceService.js +15 -0
  329. package/dist/react/AuthGuard.d.ts +16 -2
  330. package/dist/react/AuthGuard.js +169 -130
  331. package/dist/react/index.d.ts +1 -1
  332. package/dist/react/useAddPodMember.js +1 -1
  333. package/dist/react/useAssistantController.d.ts +27 -3
  334. package/dist/react/useAssistantController.js +192 -70
  335. package/dist/react/useAssistantSession.d.ts +10 -6
  336. package/dist/react/useAssistantSession.js +146 -4
  337. package/dist/react/useBulkRecords.d.ts +5 -5
  338. package/dist/react/useBulkRecords.js +5 -5
  339. package/dist/react/useConversations.d.ts +1 -7
  340. package/dist/react/useConversations.js +4 -10
  341. package/dist/react/useCreateFolder.d.ts +2 -4
  342. package/dist/react/useCreateFolder.js +2 -3
  343. package/dist/react/useCreateRecord.d.ts +2 -2
  344. package/dist/react/useCreateRecord.js +1 -1
  345. package/dist/react/useDeleteFile.d.ts +1 -4
  346. package/dist/react/useDeleteFile.js +3 -3
  347. package/dist/react/useDeleteRecord.d.ts +1 -2
  348. package/dist/react/useDeleteRecord.js +3 -3
  349. package/dist/react/useFile.d.ts +2 -4
  350. package/dist/react/useFile.js +3 -3
  351. package/dist/react/useFilePreview.d.ts +1 -4
  352. package/dist/react/useFilePreview.js +4 -5
  353. package/dist/react/useFileSearch.d.ts +5 -1
  354. package/dist/react/useFileSearch.js +6 -4
  355. package/dist/react/useFileTree.d.ts +2 -4
  356. package/dist/react/useFileTree.js +2 -3
  357. package/dist/react/useFiles.d.ts +2 -4
  358. package/dist/react/useFiles.js +3 -5
  359. package/dist/react/useFlowRunHistory.d.ts +4 -4
  360. package/dist/react/useFlowRunHistory.js +9 -4
  361. package/dist/react/useFlowSession.d.ts +5 -3
  362. package/dist/react/useFlowSession.js +24 -17
  363. package/dist/react/useFunctionRun.d.ts +2 -2
  364. package/dist/react/useFunctionRuns.d.ts +5 -5
  365. package/dist/react/useFunctionSession.d.ts +2 -2
  366. package/dist/react/useGlobalSearch.js +1 -1
  367. package/dist/react/useRecord.d.ts +2 -2
  368. package/dist/react/useRecord.js +1 -1
  369. package/dist/react/useRecordForm.d.ts +2 -2
  370. package/dist/react/useRecordForm.js +2 -2
  371. package/dist/react/useReverseRelatedRecords.js +1 -1
  372. package/dist/react/useUpdateFile.d.ts +2 -4
  373. package/dist/react/useUpdateFile.js +2 -3
  374. package/dist/react/useUpdateRecord.d.ts +2 -2
  375. package/dist/react/useUpdateRecord.js +1 -1
  376. package/dist/react/useUploadFile.d.ts +2 -4
  377. package/dist/react/useUploadFile.js +2 -3
  378. package/dist/react/useWorkflowResume.d.ts +1 -0
  379. package/dist/react/useWorkflowResume.js +10 -1
  380. package/dist/react/useWorkflowRun.d.ts +2 -2
  381. package/dist/react/useWorkflowRun.js +1 -3
  382. package/dist/react/useWorkflowRuns.d.ts +5 -5
  383. package/dist/react/useWorkflowStart.d.ts +2 -2
  384. package/dist/react/useWorkflowStart.js +11 -26
  385. package/dist/react/utils.js +2 -0
  386. package/dist/types.d.ts +47 -10
  387. package/package.json +8 -3
  388. package/dist/openapi_client/models/AgentModelName.d.ts +0 -13
  389. package/dist/openapi_client/models/AgentModelName.js +0 -18
  390. package/dist/openapi_client/models/AgentResponse.d.ts +0 -29
  391. package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +0 -18
  392. package/dist/openapi_client/models/ApplicationMode.d.ts +0 -7
  393. package/dist/openapi_client/models/ApplicationMode.js +0 -12
  394. package/dist/openapi_client/models/BillingHistoryResponse.d.ts +0 -8
  395. package/dist/openapi_client/models/BillingInterval.d.ts +0 -7
  396. package/dist/openapi_client/models/BillingInterval.js +0 -12
  397. package/dist/openapi_client/models/BillingInvoiceResponse.d.ts +0 -29
  398. package/dist/openapi_client/models/BillingInvoiceStatus.d.ts +0 -10
  399. package/dist/openapi_client/models/BillingInvoiceStatus.js +0 -15
  400. package/dist/openapi_client/models/BillingScope.d.ts +0 -7
  401. package/dist/openapi_client/models/BillingScope.js +0 -12
  402. package/dist/openapi_client/models/CancelSubscriptionResponse.d.ts +0 -10
  403. package/dist/openapi_client/models/CreateInvoicePaymentUrlRequest.d.ts +0 -7
  404. package/dist/openapi_client/models/CreateInvoicePaymentUrlResponse.d.ts +0 -8
  405. package/dist/openapi_client/models/DatastoreMessageResponse.d.ts +0 -6
  406. package/dist/openapi_client/models/FlowRunEntity.d.ts +0 -36
  407. package/dist/openapi_client/models/FunctionTableAccessEntry.d.ts +0 -5
  408. package/dist/openapi_client/models/GmailSurfaceConfig.d.ts +0 -7
  409. package/dist/openapi_client/models/GmailSurfaceConfigInput.d.ts +0 -4
  410. package/dist/openapi_client/models/OutlookSurfaceConfig.d.ts +0 -7
  411. package/dist/openapi_client/models/OutlookSurfaceConfigInput.d.ts +0 -4
  412. package/dist/openapi_client/models/PlanListResponse.d.ts +0 -8
  413. package/dist/openapi_client/models/PlanResponse.d.ts +0 -17
  414. package/dist/openapi_client/models/RecentUsageResponse.d.ts +0 -9
  415. package/dist/openapi_client/models/RecordResponse.d.ts +0 -9
  416. package/dist/openapi_client/models/SeatInfoResponse.d.ts +0 -10
  417. package/dist/openapi_client/models/SlackCredentialsInput.d.ts +0 -5
  418. package/dist/openapi_client/models/SlackSurfaceConfig.d.ts +0 -10
  419. package/dist/openapi_client/models/SlackSurfaceConfigInput.d.ts +0 -6
  420. package/dist/openapi_client/models/StackFrame.d.ts +0 -11
  421. package/dist/openapi_client/models/StartSubscriptionRequest.d.ts +0 -14
  422. package/dist/openapi_client/models/StartSubscriptionResponse.d.ts +0 -9
  423. package/dist/openapi_client/models/StartTeamBillingRequest.d.ts +0 -6
  424. package/dist/openapi_client/models/StepExecution.d.ts +0 -13
  425. package/dist/openapi_client/models/SubscriptionResponse.d.ts +0 -22
  426. package/dist/openapi_client/models/SubscriptionStatus.d.ts +0 -10
  427. package/dist/openapi_client/models/SubscriptionStatus.js +0 -15
  428. package/dist/openapi_client/models/SubscriptionStatusResponse.d.ts +0 -10
  429. package/dist/openapi_client/models/SubscriptionWithPlanResponse.d.ts +0 -22
  430. package/dist/openapi_client/models/SurfaceRoutingScope.d.ts +0 -4
  431. package/dist/openapi_client/models/SurfaceRoutingScope.js +0 -9
  432. package/dist/openapi_client/models/SurfaceWebhookMode.d.ts +0 -4
  433. package/dist/openapi_client/models/SurfaceWebhookMode.js +0 -9
  434. package/dist/openapi_client/models/TableAccessEntry.d.ts +0 -8
  435. package/dist/openapi_client/models/TableAccessMode.d.ts +0 -7
  436. package/dist/openapi_client/models/TableAccessMode.js +0 -12
  437. package/dist/openapi_client/models/TeamsCredentialsInput.d.ts +0 -6
  438. package/dist/openapi_client/models/TeamsSurfaceConfig.d.ts +0 -9
  439. package/dist/openapi_client/models/TeamsSurfaceConfigInput.d.ts +0 -6
  440. package/dist/openapi_client/models/TelegramCredentialsInput.d.ts +0 -5
  441. package/dist/openapi_client/models/TelegramSurfaceConfig.d.ts +0 -6
  442. package/dist/openapi_client/models/TelegramSurfaceConfigInput.d.ts +0 -6
  443. package/dist/openapi_client/models/WebSearchAgentRequest.d.ts +0 -9
  444. package/dist/openapi_client/models/WebSearchAgentResponse.d.ts +0 -25
  445. package/dist/openapi_client/models/WhatsAppCredentialsInput.d.ts +0 -8
  446. package/dist/openapi_client/models/WhatsAppSurfaceConfig.d.ts +0 -6
  447. package/dist/openapi_client/models/WhatsAppSurfaceConfigInput.d.ts +0 -6
  448. package/dist/openapi_client/services/BillingSubscriptionsService.d.ts +0 -116
  449. package/dist/openapi_client/services/BillingSubscriptionsService.js +0 -230
  450. package/dist/openapi_client/services/BillingUsageService.d.ts +0 -138
  451. package/dist/openapi_client/services/BillingUsageService.js +0 -302
  452. package/dist/openapi_client/services/BillingWebhooksService.d.ts +0 -12
  453. package/dist/openapi_client/services/BillingWebhooksService.js +0 -25
  454. /package/dist/openapi_client/models/{AgentResponse.js → AccountCreateSchema.js} +0 -0
  455. /package/dist/openapi_client/models/{ApplicationAccessConfig.js → AgentActionResponse.js} +0 -0
  456. /package/dist/openapi_client/models/{BillingHistoryResponse.js → AgentDetailResponse.js} +0 -0
  457. /package/dist/openapi_client/models/{BillingInvoiceResponse.js → AgentHarnessInfo.js} +0 -0
  458. /package/dist/openapi_client/models/{CancelSubscriptionResponse.js → AgentHarnessListResponse.js} +0 -0
  459. /package/dist/openapi_client/models/{CreateInvoicePaymentUrlRequest.js → AgentPermissionsReplaceRequest.js} +0 -0
  460. /package/dist/openapi_client/models/{CreateInvoicePaymentUrlResponse.js → AgentPermissionsResponse.js} +0 -0
  461. /package/dist/openapi_client/models/{DatastoreMessageResponse.js → AgentResourcePermissionRequest.js} +0 -0
  462. /package/dist/openapi_client/models/{DeskResponse.js → AgentResourcePermissionResponse.js} +0 -0
  463. /package/dist/openapi_client/models/{FileResponse.js → AgentRuntimeConfig.js} +0 -0
  464. /package/dist/openapi_client/models/{FlowResponse.js → AgentRuntimeProfileListResponse.js} +0 -0
  465. /package/dist/openapi_client/models/{FlowRunEntity.js → AgentRuntimeProfileResponse.js} +0 -0
  466. /package/dist/openapi_client/models/{FunctionResponse.js → ApplicationSkillResponse.js} +0 -0
  467. /package/dist/openapi_client/models/{FunctionTableAccessEntry.js → AuthConfigCreateSchema.js} +0 -0
  468. /package/dist/openapi_client/models/{GmailSurfaceConfig.js → AuthConfigListResponseSchema.js} +0 -0
  469. /package/dist/openapi_client/models/{GmailSurfaceConfigInput.js → AuthConfigResponseSchema.js} +0 -0
  470. /package/dist/openapi_client/models/{OutlookSurfaceConfig.js → ComposioProviderCapabilityResponseSchema.js} +0 -0
  471. /package/dist/openapi_client/models/{OutlookSurfaceConfigInput.js → ConnectedAccountSummary.js} +0 -0
  472. /package/dist/openapi_client/models/{PlanListResponse.js → ConvertedPageResponse.js} +0 -0
  473. /package/dist/openapi_client/models/{PlanResponse.js → CreateAnthropicCompatibleRuntimeProfileRequest.js} +0 -0
  474. /package/dist/openapi_client/models/{RecentUsageResponse.js → CreateOpenAICompatibleRuntimeProfileRequest.js} +0 -0
  475. /package/dist/openapi_client/models/{RecordResponse.js → CreateUserDaemonRuntimeProfileRequest.js} +0 -0
  476. /package/dist/openapi_client/models/{ScheduleResponse.js → DatastoreCountResponse.js} +0 -0
  477. /package/dist/openapi_client/models/{SeatInfoResponse.js → DeskDetailResponse.js} +0 -0
  478. /package/dist/openapi_client/models/{SlackCredentialsInput.js → FileDetailResponse.js} +0 -0
  479. /package/dist/openapi_client/models/{SlackSurfaceConfig.js → FlowDetailResponse.js} +0 -0
  480. /package/dist/openapi_client/models/{SlackSurfaceConfigInput.js → FunctionActionResponse.js} +0 -0
  481. /package/dist/openapi_client/models/{StackFrame.js → FunctionDetailResponse.js} +0 -0
  482. /package/dist/openapi_client/models/{StartSubscriptionRequest.js → FunctionPermissionsReplaceRequest.js} +0 -0
  483. /package/dist/openapi_client/models/{StartSubscriptionResponse.js → FunctionPermissionsResponse.js} +0 -0
  484. /package/dist/openapi_client/models/{StartTeamBillingRequest.js → FunctionResourcePermissionRequest.js} +0 -0
  485. /package/dist/openapi_client/models/{StepExecution.js → FunctionResourcePermissionResponse.js} +0 -0
  486. /package/dist/openapi_client/models/{SubscriptionResponse.js → FunctionRunSummaryResponse.js} +0 -0
  487. /package/dist/openapi_client/models/{SubscriptionStatusResponse.js → InstalledAppSummary.js} +0 -0
  488. /package/dist/openapi_client/models/{SubscriptionWithPlanResponse.js → IntegrationStatusResponse.js} +0 -0
  489. /package/dist/openapi_client/models/{TableAccessEntry.js → LemmaProviderCapabilityResponseSchema.js} +0 -0
  490. /package/dist/openapi_client/models/{TableResponse.js → OAuth2DefaultsResponseSchema.js} +0 -0
  491. /package/dist/openapi_client/models/{TeamsCredentialsInput.js → PodConfig.js} +0 -0
  492. /package/dist/openapi_client/models/{TeamsSurfaceConfig.js → PodEffectivePermissionsResponse.js} +0 -0
  493. /package/dist/openapi_client/models/{TeamsSurfaceConfigInput.js → PodPermissionCatalogResponse.js} +0 -0
  494. /package/dist/openapi_client/models/{TelegramCredentialsInput.js → PodPermissionResponse.js} +0 -0
  495. /package/dist/openapi_client/models/{TelegramSurfaceConfig.js → PodRolePermissionsReplaceRequest.js} +0 -0
  496. /package/dist/openapi_client/models/{TelegramSurfaceConfigInput.js → PodRolePermissionsResponse.js} +0 -0
  497. /package/dist/openapi_client/models/{WebSearchAgentRequest.js → PodRoleResourcePermissionRequest.js} +0 -0
  498. /package/dist/openapi_client/models/{WebSearchAgentResponse.js → PodRoleResourcePermissionResponse.js} +0 -0
  499. /package/dist/openapi_client/models/{WhatsAppCredentialsInput.js → ResolveUserApprovalRequest.js} +0 -0
  500. /package/dist/openapi_client/models/{WhatsAppSurfaceConfig.js → ResourceAccessGrantRequest.js} +0 -0
  501. /package/dist/openapi_client/models/{WhatsAppSurfaceConfigInput.js → ResourceAccessGrantResponse.js} +0 -0
  502. /package/dist/openapi_client/models/{WorkflowRunWaitEntity.js → ResourceAccessResponse.js} +0 -0
@@ -13,6 +13,7 @@ export interface UseWorkflowResumeResult {
13
13
  error: Error | null;
14
14
  resume: (inputs?: WorkflowRunInputs, options?: {
15
15
  runId?: string | null;
16
+ nodeId?: string;
16
17
  }) => Promise<FlowRun>;
17
18
  }
18
19
  export declare function useWorkflowResume({ client, podId, runId, onRun, onError, }: UseWorkflowResumeOptions): UseWorkflowResumeResult;
@@ -21,7 +21,16 @@ export function useWorkflowResume({ client, podId, runId, onRun, onError, }) {
21
21
  try {
22
22
  const resolvedPodId = resolvePodId(client, podId);
23
23
  const resolvedRunId = resolveRunId(runId, options.runId);
24
- const nextRun = await client.workflows.runs.resume(resolvedRunId, inputs, resolvedPodId);
24
+ let nodeId = options.nodeId;
25
+ if (!nodeId) {
26
+ const current = await client.workflows.runs.get(resolvedRunId, resolvedPodId);
27
+ const wait = current.active_wait;
28
+ if (!wait || wait.wait_type !== "HUMAN") {
29
+ throw new Error("Run is not waiting on a form; pass nodeId explicitly.");
30
+ }
31
+ nodeId = wait.node_id;
32
+ }
33
+ const nextRun = await client.workflows.runs.submitForm(resolvedRunId, { node_id: nodeId, inputs }, resolvedPodId);
25
34
  setRun(nextRun);
26
35
  onRunRef.current?.(nextRun);
27
36
  return nextRun;
@@ -1,4 +1,4 @@
1
- import type { FlowRun, WorkflowRunInputs } from "../types.js";
1
+ import type { FlowRun, WorkflowRunInputs, WorkflowRunSummary } from "../types.js";
2
2
  import { type UseFlowSessionOptions, type UseFlowSessionResult } from "./useFlowSession.js";
3
3
  export interface UseWorkflowRunOptions extends Omit<UseFlowSessionOptions, "flowName"> {
4
4
  workflowName?: string;
@@ -16,6 +16,6 @@ export interface UseWorkflowRunResult extends Omit<UseFlowSessionResult, "start"
16
16
  workflowName?: string;
17
17
  limit?: number;
18
18
  pageToken?: string;
19
- }) => Promise<FlowRun[]>;
19
+ }) => Promise<WorkflowRunSummary[]>;
20
20
  }
21
21
  export declare function useWorkflowRun({ workflowName, ...options }: UseWorkflowRunOptions): UseWorkflowRunResult;
@@ -31,9 +31,7 @@ export function useWorkflowRun({ workflowName, ...options }) {
31
31
  const normalizedStatus = normalizeRunStatus(session.status);
32
32
  const isFinished = isTerminalFlowStatus(normalizedStatus);
33
33
  const isWaitingForInput = normalizedStatus === "WAITING"
34
- || !!session.run?.waiting_agent_conversation_id
35
- || !!session.run?.waiting_function_run_id
36
- || !!session.run?.waiting_timer_id;
34
+ && session.run?.active_wait?.wait_type === "HUMAN";
37
35
  const output = session.run?.execution_context ?? null;
38
36
  const finalOutput = isFinished ? output : null;
39
37
  return {
@@ -1,5 +1,5 @@
1
1
  import type { LemmaClient } from "../client.js";
2
- import type { FlowRun } from "../types.js";
2
+ import type { WorkflowRunSummary } from "../types.js";
3
3
  export interface UseWorkflowRunsOptions {
4
4
  client: LemmaClient;
5
5
  podId?: string;
@@ -11,12 +11,12 @@ export interface UseWorkflowRunsOptions {
11
11
  initialRunId?: string | null;
12
12
  }
13
13
  export interface UseWorkflowRunsResult {
14
- runs: FlowRun[];
14
+ runs: WorkflowRunSummary[];
15
15
  total: number;
16
16
  nextPageToken: string | null;
17
17
  selectedRunId: string | null;
18
18
  effectiveSelectedRunId: string | null;
19
- selectedRun: FlowRun | null;
19
+ selectedRun: WorkflowRunSummary | null;
20
20
  isLoading: boolean;
21
21
  isLoadingMore: boolean;
22
22
  error: Error | null;
@@ -25,9 +25,9 @@ export interface UseWorkflowRunsResult {
25
25
  refresh: (overrides?: {
26
26
  limit?: number;
27
27
  pageToken?: string;
28
- }) => Promise<FlowRun[]>;
28
+ }) => Promise<WorkflowRunSummary[]>;
29
29
  loadMore: (overrides?: {
30
30
  limit?: number;
31
- }) => Promise<FlowRun[]>;
31
+ }) => Promise<WorkflowRunSummary[]>;
32
32
  }
33
33
  export declare function useWorkflowRuns({ client, podId, workflowName, enabled, autoLoad, limit, pageToken, initialRunId, }: UseWorkflowRunsOptions): UseWorkflowRunsResult;
@@ -1,5 +1,5 @@
1
1
  import type { LemmaClient } from "../client.js";
2
- import type { FlowRun, Workflow, WorkflowStartType, WorkflowRunInputs } from "../types.js";
2
+ import type { FlowRun, Workflow, WorkflowStartType, WorkflowRunInputs, WorkflowRunSummary } from "../types.js";
3
3
  import { type UseFlowSessionResult } from "./useFlowSession.js";
4
4
  export interface UseWorkflowStartOptions {
5
5
  client: LemmaClient;
@@ -25,7 +25,7 @@ export interface UseWorkflowStartResult extends Omit<UseFlowSessionResult, "star
25
25
  listHistory: (options?: {
26
26
  limit?: number;
27
27
  pageToken?: string;
28
- }) => Promise<FlowRun[]>;
28
+ }) => Promise<WorkflowRunSummary[]>;
29
29
  start: (inputs?: WorkflowRunInputs, options?: {
30
30
  forceResume?: boolean;
31
31
  }) => Promise<FlowRun>;
@@ -16,14 +16,11 @@ function findFirstFormNode(workflow) {
16
16
  }
17
17
  return null;
18
18
  }
19
- function isWaitingFlowRun(run) {
19
+ function isWaitingOnForm(run) {
20
20
  if (!run)
21
21
  return false;
22
22
  const normalizedStatus = normalizeRunStatus(run.status);
23
- return normalizedStatus === "WAITING"
24
- || !!run.waiting_function_run_id
25
- || !!run.waiting_agent_conversation_id
26
- || !!run.waiting_timer_id;
23
+ return normalizedStatus === "WAITING" && run.active_wait?.wait_type === "HUMAN";
27
24
  }
28
25
  export function useWorkflowStart({ client, podId, workflowName, runId = null, enabled = true, autoLoad = true, autoPoll = true, pollIntervalMs = 2000, onRun, onError, }) {
29
26
  const [workflow, setWorkflow] = useState(null);
@@ -93,30 +90,18 @@ export function useWorkflowStart({ client, podId, workflowName, runId = null, en
93
90
  setIsStarting(true);
94
91
  setWorkflowError(null);
95
92
  try {
96
- const currentWorkflow = workflow?.name === workflowName
97
- ? workflow
98
- : await refreshWorkflow();
99
- const startType = currentWorkflow?.start?.type ?? "MANUAL";
100
- if (startType === "MANUAL") {
101
- const created = await session.start({
102
- flowName: workflowName,
103
- inputs: {},
104
- });
105
- const shouldResume = !!created.id && (options.forceResume === true
106
- || Object.keys(inputs).length > 0
107
- || isWaitingFlowRun(created));
108
- if (!shouldResume || !created.id) {
109
- return created;
110
- }
111
- return session.resume({
112
- runId: created.id,
113
- inputs,
114
- });
115
- }
116
- return session.start({
93
+ // Runs take no start inputs; session.start submits `inputs` to the
94
+ // entry form when the created run waits on one.
95
+ const created = await session.start({
117
96
  flowName: workflowName,
118
97
  inputs,
119
98
  });
99
+ if (options.forceResume === true
100
+ && created.id
101
+ && isWaitingOnForm(created)) {
102
+ return session.resume({ runId: created.id, inputs });
103
+ }
104
+ return created;
120
105
  }
121
106
  catch (startError) {
122
107
  const normalized = normalizeError(startError, "Failed to start workflow.");
@@ -1,6 +1,8 @@
1
1
  export function normalizeError(error, fallback) {
2
2
  if (error instanceof Error)
3
3
  return error;
4
+ if (typeof error === "string" && error.trim())
5
+ return new Error(error.trim());
4
6
  return new Error(fallback);
5
7
  }
6
8
  export function resolvePodClient(client, podId) {
package/dist/types.d.ts CHANGED
@@ -1,11 +1,22 @@
1
- import type { AgentModelName, AgentResponse, ColumnSchema, ConversationResponse as GeneratedConversationResponse, CreateAgentRequest, DatastoreQueryResponse, DirectoryTreeNode, DirectoryTreeResponse, FileResponse, FileSearchResponse, FileSearchResultSchema, FlowRunEntity, FlowResponse, FunctionRunResponse, IconUploadResponse, OrganizationInvitationResponse, OrganizationMemberResponse, OrganizationResponse, PodConfigResponse, PodJoinRequestCreateResponse, PodMemberResponse, PodResponse, ScheduleResponse, TableResponse, UpdateAgentRequest, UserResponse, WorkflowRunWaitAssignment } from "./openapi_client/index.js";
1
+ import type { AgentRuntimeConfig, AgentHarnessInfo, AgentHarnessListResponse, AgentDetailResponse, AgentRuntimeProfileListResponse, AgentRuntimeProfileResponse, ColumnSchema, ConversationResponse as GeneratedConversationResponse, CreateAgentRequest, DatastoreQueryResponse, DirectoryTreeNode, DirectoryTreeResponse, FileDetailResponse, FileSearchResponse, FileSearchResultSchema, FlowDetailResponse, WorkflowRunResponse, FunctionDetailResponse, FunctionRunResponse, FunctionRunSummaryResponse, HarnessKind, IconUploadResponse, OrganizationInvitationResponse, OrganizationMemberResponse, OrganizationResponse, PodConfigResponse, PodJoinRequestCreateResponse, PodMemberResponse, PodRoleResponse, PodResponse, ResourceAccessGrantResponse, ResourceAccessResponse, ResourceType as GeneratedResourceType, ScheduleDetailResponse, TableDetailResponse, UpdateAgentRequest, UsageRecordResponse as GeneratedUsageRecordResponse, UsageListResponse as GeneratedUsageListResponse, UsageStatsBucketResponse as GeneratedUsageStatsBucketResponse, UsageStatsResponse as GeneratedUsageStatsResponse, UsageSummaryResponse as GeneratedUsageSummaryResponse, UserResponse, WorkflowRunWaitAssignment, WorkflowRunSummaryResponse } from "./openapi_client/index.js";
2
2
  /** Public ergonomic types. */
3
3
  export interface AvailableModelInfo {
4
4
  id: ConversationModel;
5
5
  name: string;
6
+ runtime?: AgentRuntimeConfig;
7
+ agentRuntime?: AgentRuntimeResponse;
8
+ agentRuntimeId?: string;
9
+ profile?: AgentRuntimeProfileResponse;
10
+ profile_id?: string;
11
+ harness_kind?: HarnessKind;
6
12
  description?: string | null;
7
13
  }
8
- export type AvailableModels = AgentModelName;
14
+ export type AvailableModels = ConversationModel;
15
+ export type AgentRuntime = AgentRuntimeConfig;
16
+ export type AgentRuntimeAvailability = AgentHarnessInfo;
17
+ export type AgentRuntimeAvailabilityList = AgentHarnessListResponse;
18
+ export type AgentRuntimeListResponse = AgentRuntimeProfileListResponse;
19
+ export type AgentRuntimeResponse = AgentRuntimeProfileResponse;
9
20
  export interface PageResult<T> {
10
21
  items: T[];
11
22
  nextPageToken?: string;
@@ -35,6 +46,7 @@ export interface RunFunctionOptions {
35
46
  /** Input payload for the function */
36
47
  input?: Record<string, unknown>;
37
48
  }
49
+ /** Form field values submitted to a workflow form node. */
38
50
  export interface WorkflowRunInputs {
39
51
  [key: string]: unknown;
40
52
  }
@@ -42,10 +54,10 @@ export interface StreamOptions {
42
54
  signal?: AbortSignal;
43
55
  }
44
56
  /** Ergonomic entity aliases (instead of *Response/*Request names). */
45
- export type Agent = AgentResponse;
57
+ export type Agent = AgentDetailResponse;
46
58
  export type CreateAgentInput = CreateAgentRequest;
47
59
  export type UpdateAgentInput = UpdateAgentRequest;
48
- export type ConversationModel = `${AgentModelName}` | (string & {});
60
+ export type ConversationModel = string & {};
49
61
  export type Conversation = GeneratedConversationResponse & {
50
62
  model?: ConversationModel | null;
51
63
  status?: string | null;
@@ -57,36 +69,61 @@ export interface ConversationMessageResponse {
57
69
  created_at: string;
58
70
  conversation_id?: string;
59
71
  sequence?: number;
72
+ agent_run_id?: string | null;
60
73
  metadata?: Record<string, unknown> | null;
61
74
  tool_call_id?: string | null;
62
75
  tool_name?: string | null;
63
76
  }
64
77
  export type ConversationMessage = ConversationMessageResponse;
65
78
  export type FunctionRun = FunctionRunResponse;
66
- export type FlowRun = FlowRunEntity;
67
- export type Workflow = FlowResponse;
79
+ export type FunctionRunSummary = FunctionRunSummaryResponse;
80
+ export type FlowRun = WorkflowRunResponse;
81
+ export type WorkflowRunSummary = WorkflowRunSummaryResponse;
82
+ /** @deprecated Use Workflow or FlowDetailResponse. */
83
+ export type FlowResponse = FlowDetailResponse;
84
+ export type Workflow = FlowDetailResponse;
68
85
  export type WorkflowStart = Workflow["start"];
69
86
  export type WorkflowStartType = NonNullable<WorkflowStart>["type"];
70
- export type Schedule = ScheduleResponse;
87
+ export type Schedule = ScheduleDetailResponse;
71
88
  export type WorkflowRunWait = WorkflowRunWaitAssignment;
72
- export type Table = TableResponse;
89
+ /** @deprecated Use Table or TableDetailResponse. */
90
+ export type TableResponse = TableDetailResponse;
91
+ export type Table = TableDetailResponse;
73
92
  export type TableColumn = ColumnSchema;
74
93
  export type DatastoreQueryResult = DatastoreQueryResponse;
75
- export type DatastoreFile = FileResponse;
94
+ /** @deprecated Use DatastoreFile or FileDetailResponse. */
95
+ export type FileResponse = FileDetailResponse;
96
+ export type DatastoreFile = FileDetailResponse;
76
97
  export type DatastoreFileSearchResponse = FileSearchResponse;
77
98
  export type DatastoreFileSearchResult = FileSearchResultSchema;
78
99
  export type DatastoreDirectoryTree = DirectoryTreeResponse;
79
100
  export type DatastoreDirectoryTreeNode = DirectoryTreeNode;
80
- export type DatastoreFileNamespace = "PRIVATE" | "PERSONAL" | "POD";
81
101
  export type Pod = PodResponse;
82
102
  export type PodConfig = PodConfigResponse;
83
103
  export type PodMember = PodMemberResponse;
84
104
  export type PodJoinRequest = PodJoinRequestCreateResponse;
105
+ export type PodRoleInfo = PodRoleResponse;
106
+ export type ResourceAccess = ResourceAccessResponse;
107
+ export type ResourceAccessGrant = ResourceAccessGrantResponse;
108
+ export type ResourceAccessType = GeneratedResourceType;
85
109
  export type Organization = OrganizationResponse;
86
110
  export type OrganizationMember = OrganizationMemberResponse;
87
111
  export type OrganizationInvitation = OrganizationInvitationResponse;
88
112
  export type User = UserResponse;
89
113
  export type UploadedIcon = IconUploadResponse;
114
+ /** @deprecated Use FunctionDetailResponse. */
115
+ export type FunctionResponse = FunctionDetailResponse;
116
+ /** @deprecated Use UsageListResponse for recent usage events. */
117
+ export type RecentUsageResponse = Omit<GeneratedUsageListResponse, "items"> & {
118
+ items: UsageRecordResponse[];
119
+ };
120
+ export type UsageSummaryResponse = GeneratedUsageSummaryResponse;
121
+ export type UsageStatsBucketResponse = GeneratedUsageStatsBucketResponse;
122
+ export type UsageStatsResponse = Omit<GeneratedUsageStatsResponse, "items"> & {
123
+ items: UsageStatsBucketResponse[];
124
+ };
125
+ export type UsageRecordResponse = GeneratedUsageRecordResponse;
126
+ export type { AuthConfigCreateSchema, AuthConfigListResponseSchema, AuthConfigResponseSchema, } from "./namespaces/integrations.js";
90
127
  /** Generic cursor-style page shape used by many list endpoints. */
91
128
  export interface CursorPage<T> {
92
129
  items: T[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemma-sdk",
3
- "version": "0.2.43",
4
- "description": "Official TypeScript SDK for Lemma pod-scoped APIs",
3
+ "version": "0.2.45",
4
+ "description": "Official TypeScript SDK for Lemma APIs, optimized around pod-scoped workflows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -20,6 +20,9 @@
20
20
  "lemma",
21
21
  "sdk",
22
22
  "typescript",
23
+ "javascript",
24
+ "node",
25
+ "browser",
23
26
  "api",
24
27
  "react"
25
28
  ],
@@ -41,6 +44,7 @@
41
44
  ],
42
45
  "scripts": {
43
46
  "generate:client": "./scripts/generate_openapi_client.sh",
47
+ "generate:client:hey": "LEMMA_TS_GENERATOR=hey ./scripts/generate_openapi_client.sh",
44
48
  "build": "npm run clean && tsc -p tsconfig.json && npm run build:bundle",
45
49
  "build:bundle": "tsc -p tsconfig.bundle.json && node ./scripts/build_browser_bundle.mjs",
46
50
  "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true, maxRetries: 10, retryDelay: 100 })\"",
@@ -61,7 +65,8 @@
61
65
  "supertokens-web-js": "^0.16.0"
62
66
  },
63
67
  "devDependencies": {
64
- "@types/react": "^18.3.28",
68
+ "@hey-api/openapi-ts": "^0.73.0",
69
+ "@types/react": "^19.2.14",
65
70
  "openapi-typescript-codegen": "^0.29.0",
66
71
  "shadcn": "^4.2.0",
67
72
  "typescript": "^5.6.3"
@@ -1,13 +0,0 @@
1
- /**
2
- * Models that can be selected for an agent conversation.
3
- */
4
- export declare enum AgentModelName {
5
- GEMINI_PRO = "GEMINI_PRO",
6
- GEMINI_FLASH = "GEMINI_FLASH",
7
- GEMINI_FLASH_LITE = "GEMINI_FLASH_LITE",
8
- KIMI_K2 = "KIMI_K2",
9
- GPT_OSS = "GPT_OSS",
10
- DEEPSEEK_V32 = "DEEPSEEK_V32",
11
- GLM_5 = "GLM_5",
12
- QWEN3_6 = "QWEN3_6"
13
- }
@@ -1,18 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Models that can be selected for an agent conversation.
7
- */
8
- export var AgentModelName;
9
- (function (AgentModelName) {
10
- AgentModelName["GEMINI_PRO"] = "GEMINI_PRO";
11
- AgentModelName["GEMINI_FLASH"] = "GEMINI_FLASH";
12
- AgentModelName["GEMINI_FLASH_LITE"] = "GEMINI_FLASH_LITE";
13
- AgentModelName["KIMI_K2"] = "KIMI_K2";
14
- AgentModelName["GPT_OSS"] = "GPT_OSS";
15
- AgentModelName["DEEPSEEK_V32"] = "DEEPSEEK_V32";
16
- AgentModelName["GLM_5"] = "GLM_5";
17
- AgentModelName["QWEN3_6"] = "QWEN3_6";
18
- })(AgentModelName || (AgentModelName = {}));
@@ -1,29 +0,0 @@
1
- import type { AgentModelName } from './AgentModelName.js';
2
- import type { AgentToolset } from './AgentToolset.js';
3
- import type { ApplicationAccessConfig } from './ApplicationAccessConfig.js';
4
- import type { HarnessKind } from './HarnessKind.js';
5
- import type { TableAccessEntry } from './TableAccessEntry.js';
6
- export type AgentResponse = {
7
- accessible_applications?: Array<ApplicationAccessConfig>;
8
- accessible_folders?: Array<string>;
9
- accessible_tables?: Array<TableAccessEntry>;
10
- agent_names?: Array<string>;
11
- created_at: string;
12
- description?: (string | null);
13
- function_names?: Array<string>;
14
- harness_kind: HarnessKind;
15
- icon_url?: (string | null);
16
- id: string;
17
- input_schema?: (Record<string, any> | null);
18
- instruction: string;
19
- metadata?: (Record<string, any> | null);
20
- model_name: AgentModelName;
21
- name: string;
22
- output_schema?: (Record<string, any> | null);
23
- pod_id: string;
24
- toolsets?: Array<AgentToolset>;
25
- updated_at: string;
26
- user_id: string;
27
- visibility?: string;
28
- visibility_roles?: Array<string>;
29
- };
@@ -1,18 +0,0 @@
1
- import type { ApplicationMode } from './ApplicationMode.js';
2
- /**
3
- * Configuration for application access granted to a workload.
4
- */
5
- export type ApplicationAccessConfig = {
6
- /**
7
- * Required for AGENT_OWNED mode - specific account to use
8
- */
9
- account_id?: (string | null);
10
- /**
11
- * Name of the application
12
- */
13
- app_name: string;
14
- /**
15
- * Application account ownership mode
16
- */
17
- mode: ApplicationMode;
18
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Application account ownership mode for access configuration.
3
- */
4
- export declare enum ApplicationMode {
5
- AGENT_OWNED = "AGENT_OWNED",
6
- USER_OWNED = "USER_OWNED"
7
- }
@@ -1,12 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Application account ownership mode for access configuration.
7
- */
8
- export var ApplicationMode;
9
- (function (ApplicationMode) {
10
- ApplicationMode["AGENT_OWNED"] = "AGENT_OWNED";
11
- ApplicationMode["USER_OWNED"] = "USER_OWNED";
12
- })(ApplicationMode || (ApplicationMode = {}));
@@ -1,8 +0,0 @@
1
- import type { BillingInvoiceResponse } from './BillingInvoiceResponse.js';
2
- /**
3
- * Response schema for billing invoice history.
4
- */
5
- export type BillingHistoryResponse = {
6
- items: Array<BillingInvoiceResponse>;
7
- next_page_token?: (string | null);
8
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Billing interval enum.
3
- */
4
- export declare enum BillingInterval {
5
- MONTHLY = "monthly",
6
- YEARLY = "yearly"
7
- }
@@ -1,12 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Billing interval enum.
7
- */
8
- export var BillingInterval;
9
- (function (BillingInterval) {
10
- BillingInterval["MONTHLY"] = "monthly";
11
- BillingInterval["YEARLY"] = "yearly";
12
- })(BillingInterval || (BillingInterval = {}));
@@ -1,29 +0,0 @@
1
- import type { BillingInvoiceStatus } from './BillingInvoiceStatus.js';
2
- import type { BillingScope } from './BillingScope.js';
3
- /**
4
- * Response schema for a billing invoice.
5
- */
6
- export type BillingInvoiceResponse = {
7
- amount_cents: number;
8
- billing_scope: BillingScope;
9
- checkout_url: (string | null);
10
- created_at: string;
11
- currency: string;
12
- dodo_payment_id: (string | null);
13
- due_at: (string | null);
14
- id: string;
15
- llm_credit_cents: number;
16
- llm_overage_cents: number;
17
- metadata: Record<string, any>;
18
- organization_id: (string | null);
19
- paid_at: (string | null);
20
- period_end: string;
21
- period_start: string;
22
- plan_id: string;
23
- seat_count: number;
24
- status: BillingInvoiceStatus;
25
- subscription_id: (string | null);
26
- total_cents: number;
27
- updated_at: string;
28
- user_id: (string | null);
29
- };
@@ -1,10 +0,0 @@
1
- /**
2
- * Billing invoice status enum.
3
- */
4
- export declare enum BillingInvoiceStatus {
5
- DRAFT = "draft",
6
- UNPAID = "unpaid",
7
- PAID = "paid",
8
- FAILED = "failed",
9
- VOID = "void"
10
- }
@@ -1,15 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Billing invoice status enum.
7
- */
8
- export var BillingInvoiceStatus;
9
- (function (BillingInvoiceStatus) {
10
- BillingInvoiceStatus["DRAFT"] = "draft";
11
- BillingInvoiceStatus["UNPAID"] = "unpaid";
12
- BillingInvoiceStatus["PAID"] = "paid";
13
- BillingInvoiceStatus["FAILED"] = "failed";
14
- BillingInvoiceStatus["VOID"] = "void";
15
- })(BillingInvoiceStatus || (BillingInvoiceStatus = {}));
@@ -1,7 +0,0 @@
1
- /**
2
- * Billing owner scope enum.
3
- */
4
- export declare enum BillingScope {
5
- PERSONAL = "personal",
6
- ORGANIZATION = "organization"
7
- }
@@ -1,12 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Billing owner scope enum.
7
- */
8
- export var BillingScope;
9
- (function (BillingScope) {
10
- BillingScope["PERSONAL"] = "personal";
11
- BillingScope["ORGANIZATION"] = "organization";
12
- })(BillingScope || (BillingScope = {}));
@@ -1,10 +0,0 @@
1
- import type { SubscriptionStatus } from './SubscriptionStatus.js';
2
- /**
3
- * Response for subscription cancellation.
4
- */
5
- export type CancelSubscriptionResponse = {
6
- effective_date: (string | null);
7
- message: string;
8
- status: SubscriptionStatus;
9
- subscription_id: string;
10
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Request to generate a payment URL for an invoice.
3
- */
4
- export type CreateInvoicePaymentUrlRequest = {
5
- cancel_url: string;
6
- success_url: string;
7
- };
@@ -1,8 +0,0 @@
1
- import type { BillingInvoiceResponse } from './BillingInvoiceResponse.js';
2
- /**
3
- * Response with invoice payment checkout URL.
4
- */
5
- export type CreateInvoicePaymentUrlResponse = {
6
- checkout_url: string;
7
- invoice: BillingInvoiceResponse;
8
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Schema for datastore/table/record action message responses.
3
- */
4
- export type DatastoreMessageResponse = {
5
- message: string;
6
- };
@@ -1,36 +0,0 @@
1
- import type { FlowRunStatus } from './FlowRunStatus.js';
2
- import type { StackFrame } from './StackFrame.js';
3
- import type { StepExecution } from './StepExecution.js';
4
- /**
5
- * FlowRun Aggregate representing an execution of a Flow.
6
- */
7
- export type FlowRunEntity = {
8
- completed_at?: (string | null);
9
- created_at?: string;
10
- current_node_id?: (string | null);
11
- execution_context?: Record<string, any>;
12
- execution_stack?: Array<StackFrame>;
13
- flow_id: string;
14
- id?: string;
15
- pod_id: string;
16
- schedule_event_id?: (string | null);
17
- start_payload?: Record<string, any>;
18
- start_type?: string;
19
- started_at?: (string | null);
20
- status?: FlowRunStatus;
21
- step_history?: Array<StepExecution>;
22
- updated_at?: string;
23
- user_id: string;
24
- /**
25
- * Agent conversation id when the workflow is waiting for a pod agent execution.
26
- */
27
- waiting_agent_conversation_id?: (string | null);
28
- /**
29
- * Function run id when the workflow is waiting for an async function.
30
- */
31
- waiting_function_run_id?: (string | null);
32
- /**
33
- * Scheduler wake job id when the workflow is waiting for time.
34
- */
35
- waiting_timer_id?: (string | null);
36
- };
@@ -1,5 +0,0 @@
1
- import type { TableAccessMode } from './TableAccessMode.js';
2
- export type FunctionTableAccessEntry = {
3
- mode?: TableAccessMode;
4
- table_name: string;
5
- };
@@ -1,7 +0,0 @@
1
- export type GmailSurfaceConfig = {
2
- account_id: string;
3
- created_at?: string;
4
- id?: string;
5
- type?: string;
6
- updated_at?: string;
7
- };
@@ -1,4 +0,0 @@
1
- export type GmailSurfaceConfigInput = {
2
- account_id: string;
3
- type?: string;
4
- };
@@ -1,7 +0,0 @@
1
- export type OutlookSurfaceConfig = {
2
- account_id: string;
3
- created_at?: string;
4
- id?: string;
5
- type?: string;
6
- updated_at?: string;
7
- };