lemma-sdk 0.2.38 → 0.2.40

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 (86) hide show
  1. package/README.md +10 -3
  2. package/dist/browser/lemma-client.js +259 -92
  3. package/dist/client.d.ts +2 -0
  4. package/dist/client.js +3 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/namespaces/pod-members.d.ts +5 -3
  7. package/dist/namespaces/pod-members.js +12 -6
  8. package/dist/namespaces/schedules.d.ts +22 -0
  9. package/dist/namespaces/schedules.js +24 -0
  10. package/dist/namespaces/workflows.d.ts +4 -5
  11. package/dist/namespaces/workflows.js +1 -4
  12. package/dist/openapi_client/index.d.ts +12 -12
  13. package/dist/openapi_client/index.js +5 -3
  14. package/dist/openapi_client/models/CreateScheduleRequest.d.ts +14 -0
  15. package/dist/openapi_client/models/FlowResponse.d.ts +2 -2
  16. package/dist/openapi_client/models/FlowRunEntity.d.ts +5 -4
  17. package/dist/openapi_client/models/FormNodeConfig.d.ts +8 -0
  18. package/dist/openapi_client/models/PodConfigResponse.d.ts +0 -2
  19. package/dist/openapi_client/models/PodMemberDetailResponse.d.ts +2 -0
  20. package/dist/openapi_client/models/PodMemberResponse.d.ts +2 -0
  21. package/dist/openapi_client/models/ScheduleListResponse.d.ts +9 -0
  22. package/dist/openapi_client/models/{TriggerResponse.d.ts → ScheduleResponse.d.ts} +8 -4
  23. package/dist/openapi_client/models/{TriggerType.d.ts → ScheduleType.d.ts} +2 -2
  24. package/dist/openapi_client/models/ScheduleType.js +13 -0
  25. package/dist/openapi_client/models/ScheduledFlowStartInput.d.ts +1 -1
  26. package/dist/openapi_client/models/ScheduledFlowStartOutput.d.ts +1 -1
  27. package/dist/openapi_client/models/SendMessageRequest.d.ts +0 -2
  28. package/dist/openapi_client/models/{UpdateTriggerRequest.d.ts → UpdateScheduleRequest.d.ts} +4 -2
  29. package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +3 -3
  30. package/dist/openapi_client/models/WorkflowMode.d.ts +7 -0
  31. package/dist/openapi_client/models/WorkflowMode.js +12 -0
  32. package/dist/openapi_client/models/WorkflowRunWaitAssignment.d.ts +6 -0
  33. package/dist/openapi_client/models/WorkflowRunWaitAssignmentListResponse.d.ts +6 -0
  34. package/dist/openapi_client/models/WorkflowRunWaitEntity.d.ts +20 -0
  35. package/dist/openapi_client/models/WorkflowRunWaitStatus.d.ts +6 -0
  36. package/dist/openapi_client/models/WorkflowRunWaitStatus.js +11 -0
  37. package/dist/openapi_client/models/WorkflowRunWaitType.d.ts +7 -0
  38. package/dist/openapi_client/models/WorkflowRunWaitType.js +12 -0
  39. package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +3 -3
  40. package/dist/openapi_client/services/PodMembersService.d.ts +25 -7
  41. package/dist/openapi_client/services/PodMembersService.js +57 -13
  42. package/dist/openapi_client/services/SchedulesService.d.ts +59 -0
  43. package/dist/openapi_client/services/SchedulesService.js +125 -0
  44. package/dist/openapi_client/services/WebhooksService.d.ts +4 -4
  45. package/dist/openapi_client/services/WebhooksService.js +6 -6
  46. package/dist/openapi_client/services/WorkflowsService.d.ts +12 -33
  47. package/dist/openapi_client/services/WorkflowsService.js +26 -69
  48. package/dist/react/AuthGuard.js +1 -1
  49. package/dist/react/index.d.ts +10 -0
  50. package/dist/react/index.js +5 -0
  51. package/dist/react/useCreateSchedule.d.ts +17 -0
  52. package/dist/react/useCreateSchedule.js +45 -0
  53. package/dist/react/useDeleteSchedule.d.ts +19 -0
  54. package/dist/react/useDeleteSchedule.js +49 -0
  55. package/dist/react/usePodAccess.js +1 -1
  56. package/dist/react/useSchedules.d.ts +30 -0
  57. package/dist/react/useSchedules.js +123 -0
  58. package/dist/react/useUpdateSchedule.d.ts +20 -0
  59. package/dist/react/useUpdateSchedule.js +49 -0
  60. package/dist/react/useWorkflowRun.js +1 -1
  61. package/dist/react/useWorkflowRunWaitAssignments.d.ts +26 -0
  62. package/dist/react/useWorkflowRunWaitAssignments.js +102 -0
  63. package/dist/react/useWorkflowStart.js +1 -1
  64. package/dist/types.d.ts +3 -1
  65. package/package.json +1 -1
  66. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +0 -13
  67. package/dist/openapi_client/models/FlowInstallResponse.d.ts +0 -15
  68. package/dist/openapi_client/models/PodFlowConfigItem.d.ts +0 -7
  69. package/dist/openapi_client/models/TriggerListResponse.d.ts +0 -9
  70. package/dist/openapi_client/models/TriggerType.js +0 -13
  71. package/dist/openapi_client/models/WorkflowInstallListResponse.d.ts +0 -4
  72. package/dist/openapi_client/models/WorkflowInstallMode.d.ts +0 -7
  73. package/dist/openapi_client/models/WorkflowInstallMode.js +0 -12
  74. package/dist/openapi_client/models/WorkflowInstallRequest.d.ts +0 -11
  75. package/dist/openapi_client/models/WorkflowInstallRequest.js +0 -1
  76. package/dist/openapi_client/models/WorkflowTimeInstallConfig.d.ts +0 -19
  77. package/dist/openapi_client/models/WorkflowTimeInstallConfig.js +0 -1
  78. package/dist/openapi_client/services/TriggersService.d.ts +0 -53
  79. package/dist/openapi_client/services/TriggersService.js +0 -109
  80. /package/dist/openapi_client/models/{CreateTriggerRequest.js → CreateScheduleRequest.js} +0 -0
  81. /package/dist/openapi_client/models/{FlowInstallResponse.js → ScheduleListResponse.js} +0 -0
  82. /package/dist/openapi_client/models/{PodFlowConfigItem.js → ScheduleResponse.js} +0 -0
  83. /package/dist/openapi_client/models/{TriggerListResponse.js → UpdateScheduleRequest.js} +0 -0
  84. /package/dist/openapi_client/models/{TriggerResponse.js → WorkflowRunWaitAssignment.js} +0 -0
  85. /package/dist/openapi_client/models/{UpdateTriggerRequest.js → WorkflowRunWaitAssignmentListResponse.js} +0 -0
  86. /package/dist/openapi_client/models/{WorkflowInstallListResponse.js → WorkflowRunWaitEntity.js} +0 -0
@@ -48,21 +48,65 @@ export class PodMembersService {
48
48
  },
49
49
  });
50
50
  }
51
+ /**
52
+ * Lookup Pod Member By Email
53
+ * Resolve a pod member by email
54
+ * @param podId
55
+ * @param email
56
+ * @returns PodMemberDetailResponse Successful Response
57
+ * @throws ApiError
58
+ */
59
+ static podMemberLookupByEmail(podId, email) {
60
+ return __request(OpenAPI, {
61
+ method: 'GET',
62
+ url: '/pods/{pod_id}/members/lookup/by-email',
63
+ path: {
64
+ 'pod_id': podId,
65
+ },
66
+ query: {
67
+ 'email': email,
68
+ },
69
+ errors: {
70
+ 422: `Validation Error`,
71
+ },
72
+ });
73
+ }
74
+ /**
75
+ * Lookup Pod Member By User ID
76
+ * Resolve a pod member by user id
77
+ * @param podId
78
+ * @param userId
79
+ * @returns PodMemberDetailResponse Successful Response
80
+ * @throws ApiError
81
+ */
82
+ static podMemberLookupByUserId(podId, userId) {
83
+ return __request(OpenAPI, {
84
+ method: 'GET',
85
+ url: '/pods/{pod_id}/members/lookup/by-user-id/{user_id}',
86
+ path: {
87
+ 'pod_id': podId,
88
+ 'user_id': userId,
89
+ },
90
+ errors: {
91
+ 422: `Validation Error`,
92
+ },
93
+ });
94
+ }
51
95
  /**
52
96
  * Remove Pod Member
53
97
  * Remove a member from a pod
54
98
  * @param podId
55
- * @param userId
99
+ * @param podMemberId
56
100
  * @returns void
57
101
  * @throws ApiError
58
102
  */
59
- static podMemberRemove(podId, userId) {
103
+ static podMemberRemove(podId, podMemberId) {
60
104
  return __request(OpenAPI, {
61
105
  method: 'DELETE',
62
- url: '/pods/{pod_id}/members/{user_id}',
106
+ url: '/pods/{pod_id}/members/{pod_member_id}',
63
107
  path: {
64
108
  'pod_id': podId,
65
- 'user_id': userId,
109
+ 'pod_member_id': podMemberId,
66
110
  },
67
111
  errors: {
68
112
  422: `Validation Error`,
@@ -71,19 +115,19 @@ export class PodMembersService {
71
115
  }
72
116
  /**
73
117
  * Get Pod Member
74
- * Get a pod member by user id
118
+ * Get a pod member by pod member id
75
119
  * @param podId
76
- * @param userId
120
+ * @param podMemberId
77
121
  * @returns PodMemberDetailResponse Successful Response
78
122
  * @throws ApiError
79
123
  */
80
- static podMemberGet(podId, userId) {
124
+ static podMemberGet(podId, podMemberId) {
81
125
  return __request(OpenAPI, {
82
126
  method: 'GET',
83
- url: '/pods/{pod_id}/members/{user_id}',
127
+ url: '/pods/{pod_id}/members/{pod_member_id}',
84
128
  path: {
85
129
  'pod_id': podId,
86
- 'user_id': userId,
130
+ 'pod_member_id': podMemberId,
87
131
  },
88
132
  errors: {
89
133
  422: `Validation Error`,
@@ -94,18 +138,18 @@ export class PodMembersService {
94
138
  * Update Member Role
95
139
  * Update a pod member's role
96
140
  * @param podId
97
- * @param userId
141
+ * @param podMemberId
98
142
  * @param requestBody
99
143
  * @returns PodMemberResponse Successful Response
100
144
  * @throws ApiError
101
145
  */
102
- static podMemberUpdateRole(podId, userId, requestBody) {
146
+ static podMemberUpdateRole(podId, podMemberId, requestBody) {
103
147
  return __request(OpenAPI, {
104
148
  method: 'PATCH',
105
- url: '/pods/{pod_id}/members/{user_id}/role',
149
+ url: '/pods/{pod_id}/members/{pod_member_id}/role',
106
150
  path: {
107
151
  'pod_id': podId,
108
- 'user_id': userId,
152
+ 'pod_member_id': podMemberId,
109
153
  },
110
154
  body: requestBody,
111
155
  mediaType: 'application/json',
@@ -0,0 +1,59 @@
1
+ import type { CreateScheduleRequest } from '../models/CreateScheduleRequest.js';
2
+ import type { ScheduleListResponse } from '../models/ScheduleListResponse.js';
3
+ import type { ScheduleResponse } from '../models/ScheduleResponse.js';
4
+ import type { ScheduleType } from '../models/ScheduleType.js';
5
+ import type { UpdateScheduleRequest } from '../models/UpdateScheduleRequest.js';
6
+ import type { CancelablePromise } from '../core/CancelablePromise.js';
7
+ export declare class SchedulesService {
8
+ /**
9
+ * List Schedules
10
+ * List pod schedules.
11
+ * @param podId
12
+ * @param scheduleType
13
+ * @param isActive
14
+ * @param agentName
15
+ * @param workflowName
16
+ * @param limit
17
+ * @param pageToken
18
+ * @returns ScheduleListResponse Successful Response
19
+ * @throws ApiError
20
+ */
21
+ static scheduleList(podId: string, scheduleType?: (ScheduleType | null), isActive?: (boolean | null), agentName?: (string | null), workflowName?: (string | null), limit?: number, pageToken?: (string | null)): CancelablePromise<ScheduleListResponse>;
22
+ /**
23
+ * Create Schedule
24
+ * Create a new pod schedule.
25
+ * @param podId
26
+ * @param requestBody
27
+ * @returns ScheduleResponse Successful Response
28
+ * @throws ApiError
29
+ */
30
+ static scheduleCreate(podId: string, requestBody: CreateScheduleRequest): CancelablePromise<ScheduleResponse>;
31
+ /**
32
+ * Delete Schedule
33
+ * Delete a schedule.
34
+ * @param podId
35
+ * @param scheduleId
36
+ * @returns void
37
+ * @throws ApiError
38
+ */
39
+ static scheduleDelete(podId: string, scheduleId: string): CancelablePromise<void>;
40
+ /**
41
+ * Get Schedule
42
+ * Get a schedule by ID.
43
+ * @param podId
44
+ * @param scheduleId
45
+ * @returns ScheduleResponse Successful Response
46
+ * @throws ApiError
47
+ */
48
+ static scheduleGet(podId: string, scheduleId: string): CancelablePromise<ScheduleResponse>;
49
+ /**
50
+ * Update Schedule
51
+ * Update a schedule.
52
+ * @param podId
53
+ * @param scheduleId
54
+ * @param requestBody
55
+ * @returns ScheduleResponse Successful Response
56
+ * @throws ApiError
57
+ */
58
+ static scheduleUpdate(podId: string, scheduleId: string, requestBody: UpdateScheduleRequest): CancelablePromise<ScheduleResponse>;
59
+ }
@@ -0,0 +1,125 @@
1
+ import { OpenAPI } from '../core/OpenAPI.js';
2
+ import { request as __request } from '../core/request.js';
3
+ export class SchedulesService {
4
+ /**
5
+ * List Schedules
6
+ * List pod schedules.
7
+ * @param podId
8
+ * @param scheduleType
9
+ * @param isActive
10
+ * @param agentName
11
+ * @param workflowName
12
+ * @param limit
13
+ * @param pageToken
14
+ * @returns ScheduleListResponse Successful Response
15
+ * @throws ApiError
16
+ */
17
+ static scheduleList(podId, scheduleType, isActive, agentName, workflowName, limit = 100, pageToken) {
18
+ return __request(OpenAPI, {
19
+ method: 'GET',
20
+ url: '/pods/{pod_id}/schedules',
21
+ path: {
22
+ 'pod_id': podId,
23
+ },
24
+ query: {
25
+ 'schedule_type': scheduleType,
26
+ 'is_active': isActive,
27
+ 'agent_name': agentName,
28
+ 'workflow_name': workflowName,
29
+ 'limit': limit,
30
+ 'page_token': pageToken,
31
+ },
32
+ errors: {
33
+ 422: `Validation Error`,
34
+ },
35
+ });
36
+ }
37
+ /**
38
+ * Create Schedule
39
+ * Create a new pod schedule.
40
+ * @param podId
41
+ * @param requestBody
42
+ * @returns ScheduleResponse Successful Response
43
+ * @throws ApiError
44
+ */
45
+ static scheduleCreate(podId, requestBody) {
46
+ return __request(OpenAPI, {
47
+ method: 'POST',
48
+ url: '/pods/{pod_id}/schedules',
49
+ path: {
50
+ 'pod_id': podId,
51
+ },
52
+ body: requestBody,
53
+ mediaType: 'application/json',
54
+ errors: {
55
+ 422: `Validation Error`,
56
+ },
57
+ });
58
+ }
59
+ /**
60
+ * Delete Schedule
61
+ * Delete a schedule.
62
+ * @param podId
63
+ * @param scheduleId
64
+ * @returns void
65
+ * @throws ApiError
66
+ */
67
+ static scheduleDelete(podId, scheduleId) {
68
+ return __request(OpenAPI, {
69
+ method: 'DELETE',
70
+ url: '/pods/{pod_id}/schedules/{schedule_id}',
71
+ path: {
72
+ 'pod_id': podId,
73
+ 'schedule_id': scheduleId,
74
+ },
75
+ errors: {
76
+ 422: `Validation Error`,
77
+ },
78
+ });
79
+ }
80
+ /**
81
+ * Get Schedule
82
+ * Get a schedule by ID.
83
+ * @param podId
84
+ * @param scheduleId
85
+ * @returns ScheduleResponse Successful Response
86
+ * @throws ApiError
87
+ */
88
+ static scheduleGet(podId, scheduleId) {
89
+ return __request(OpenAPI, {
90
+ method: 'GET',
91
+ url: '/pods/{pod_id}/schedules/{schedule_id}',
92
+ path: {
93
+ 'pod_id': podId,
94
+ 'schedule_id': scheduleId,
95
+ },
96
+ errors: {
97
+ 422: `Validation Error`,
98
+ },
99
+ });
100
+ }
101
+ /**
102
+ * Update Schedule
103
+ * Update a schedule.
104
+ * @param podId
105
+ * @param scheduleId
106
+ * @param requestBody
107
+ * @returns ScheduleResponse Successful Response
108
+ * @throws ApiError
109
+ */
110
+ static scheduleUpdate(podId, scheduleId, requestBody) {
111
+ return __request(OpenAPI, {
112
+ method: 'PATCH',
113
+ url: '/pods/{pod_id}/schedules/{schedule_id}',
114
+ path: {
115
+ 'pod_id': podId,
116
+ 'schedule_id': scheduleId,
117
+ },
118
+ body: requestBody,
119
+ mediaType: 'application/json',
120
+ errors: {
121
+ 422: `Validation Error`,
122
+ },
123
+ });
124
+ }
125
+ }
@@ -1,13 +1,13 @@
1
1
  import type { CancelablePromise } from '../core/CancelablePromise.js';
2
2
  export declare class WebhooksService {
3
3
  /**
4
- * Handle Specific Trigger Webhook
5
- * Receive webhook for a specific trigger ID
6
- * @param triggerId
4
+ * Handle Specific Schedule Webhook
5
+ * Receive webhook for a specific schedule ID
6
+ * @param scheduleId
7
7
  * @returns any Successful Response
8
8
  * @throws ApiError
9
9
  */
10
- static webhookTriggerHandle(triggerId: string): CancelablePromise<Record<string, any>>;
10
+ static webhookScheduleHandle(scheduleId: string): CancelablePromise<Record<string, any>>;
11
11
  /**
12
12
  * Handle Webhook
13
13
  * Receive webhooks from various sources (slack, composio, jira, email, etc.)
@@ -2,18 +2,18 @@ import { OpenAPI } from '../core/OpenAPI.js';
2
2
  import { request as __request } from '../core/request.js';
3
3
  export class WebhooksService {
4
4
  /**
5
- * Handle Specific Trigger Webhook
6
- * Receive webhook for a specific trigger ID
7
- * @param triggerId
5
+ * Handle Specific Schedule Webhook
6
+ * Receive webhook for a specific schedule ID
7
+ * @param scheduleId
8
8
  * @returns any Successful Response
9
9
  * @throws ApiError
10
10
  */
11
- static webhookTriggerHandle(triggerId) {
11
+ static webhookScheduleHandle(scheduleId) {
12
12
  return __request(OpenAPI, {
13
13
  method: 'POST',
14
- url: '/webhooks/trigger/{trigger_id}',
14
+ url: '/webhooks/schedules/{schedule_id}',
15
15
  path: {
16
- 'trigger_id': triggerId,
16
+ 'schedule_id': scheduleId,
17
17
  },
18
18
  errors: {
19
19
  422: `Validation Error`,
@@ -1,15 +1,23 @@
1
- import type { FlowInstallResponse } from '../models/FlowInstallResponse.js';
2
1
  import type { FlowResponse } from '../models/FlowResponse.js';
3
2
  import type { FlowRunEntity } from '../models/FlowRunEntity.js';
4
3
  import type { WorkflowCreateRequest } from '../models/WorkflowCreateRequest.js';
5
4
  import type { WorkflowGraphUpdateRequest } from '../models/WorkflowGraphUpdateRequest.js';
6
- import type { WorkflowInstallListResponse } from '../models/WorkflowInstallListResponse.js';
7
- import type { WorkflowInstallRequest } from '../models/WorkflowInstallRequest.js';
8
5
  import type { WorkflowListResponse } from '../models/WorkflowListResponse.js';
9
6
  import type { WorkflowRunListResponse } from '../models/WorkflowRunListResponse.js';
7
+ import type { WorkflowRunWaitAssignmentListResponse } from '../models/WorkflowRunWaitAssignmentListResponse.js';
10
8
  import type { WorkflowUpdateRequest } from '../models/WorkflowUpdateRequest.js';
11
9
  import type { CancelablePromise } from '../core/CancelablePromise.js';
12
10
  export declare class WorkflowsService {
11
+ /**
12
+ * List Workflow Runs Waiting For Current User
13
+ * List active human form waits assigned to the current pod member.
14
+ * @param podId
15
+ * @param limit
16
+ * @param pageToken
17
+ * @returns WorkflowRunWaitAssignmentListResponse Successful Response
18
+ * @throws ApiError
19
+ */
20
+ static workflowRunWaitingAssignedToMe(podId: string, limit?: number, pageToken?: (string | null)): CancelablePromise<WorkflowRunWaitAssignmentListResponse>;
13
21
  /**
14
22
  * Get Workflow Run
15
23
  * Get current state, context, and step history of a workflow run.
@@ -88,7 +96,7 @@ export declare class WorkflowsService {
88
96
  static workflowGet(podId: string, workflowName: string): CancelablePromise<FlowResponse>;
89
97
  /**
90
98
  * Update Workflow Metadata
91
- * Update workflow-level metadata such as description/install mode. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
99
+ * Update workflow-level metadata such as description and schedule mode. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
92
100
  * @param podId
93
101
  * @param workflowName
94
102
  * @param requestBody
@@ -106,35 +114,6 @@ export declare class WorkflowsService {
106
114
  * @throws ApiError
107
115
  */
108
116
  static workflowGraphUpdate(podId: string, workflowName: string, requestBody: WorkflowGraphUpdateRequest): CancelablePromise<FlowResponse>;
109
- /**
110
- * Install Workflow
111
- * Install a workflow for runtime execution. Provide `account_id` when the workflow needs an integration account binding, and provide `schedule` when installing a scheduled workflow.
112
- * @param podId
113
- * @param workflowName
114
- * @param requestBody
115
- * @returns FlowInstallResponse Successful Response
116
- * @throws ApiError
117
- */
118
- static workflowInstallCreate(podId: string, workflowName: string, requestBody: WorkflowInstallRequest): CancelablePromise<FlowInstallResponse>;
119
- /**
120
- * List Workflow Installs
121
- * List workflow installations visible to the current user. `GLOBAL` workflows return the pod-level install; `USER` workflows return the current user's install.
122
- * @param podId
123
- * @param workflowName
124
- * @returns WorkflowInstallListResponse Successful Response
125
- * @throws ApiError
126
- */
127
- static workflowInstallList(podId: string, workflowName: string): CancelablePromise<WorkflowInstallListResponse>;
128
- /**
129
- * Uninstall Workflow
130
- * Remove a previously created workflow installation binding.
131
- * @param podId
132
- * @param workflowName
133
- * @param installId
134
- * @returns void
135
- * @throws ApiError
136
- */
137
- static workflowInstallDelete(podId: string, workflowName: string, installId: string): CancelablePromise<void>;
138
117
  /**
139
118
  * Start Workflow
140
119
  * Start a new workflow run. For event/scheduled/datastore starts, the request body is treated as initial trigger payload and merged into execution context.
@@ -1,6 +1,31 @@
1
1
  import { OpenAPI } from '../core/OpenAPI.js';
2
2
  import { request as __request } from '../core/request.js';
3
3
  export class WorkflowsService {
4
+ /**
5
+ * List Workflow Runs Waiting For Current User
6
+ * List active human form waits assigned to the current pod member.
7
+ * @param podId
8
+ * @param limit
9
+ * @param pageToken
10
+ * @returns WorkflowRunWaitAssignmentListResponse Successful Response
11
+ * @throws ApiError
12
+ */
13
+ static workflowRunWaitingAssignedToMe(podId, limit = 100, pageToken) {
14
+ return __request(OpenAPI, {
15
+ method: 'GET',
16
+ url: '/pods/{pod_id}/workflow-runs/waiting/assigned-to-me',
17
+ path: {
18
+ 'pod_id': podId,
19
+ },
20
+ query: {
21
+ 'limit': limit,
22
+ 'page_token': pageToken,
23
+ },
24
+ errors: {
25
+ 422: `Validation Error`,
26
+ },
27
+ });
28
+ }
4
29
  /**
5
30
  * Get Workflow Run
6
31
  * Get current state, context, and step history of a workflow run.
@@ -185,7 +210,7 @@ export class WorkflowsService {
185
210
  }
186
211
  /**
187
212
  * Update Workflow Metadata
188
- * Update workflow-level metadata such as description/install mode. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
213
+ * Update workflow-level metadata such as description and schedule mode. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
189
214
  * @param podId
190
215
  * @param workflowName
191
216
  * @param requestBody
@@ -231,74 +256,6 @@ export class WorkflowsService {
231
256
  },
232
257
  });
233
258
  }
234
- /**
235
- * Install Workflow
236
- * Install a workflow for runtime execution. Provide `account_id` when the workflow needs an integration account binding, and provide `schedule` when installing a scheduled workflow.
237
- * @param podId
238
- * @param workflowName
239
- * @param requestBody
240
- * @returns FlowInstallResponse Successful Response
241
- * @throws ApiError
242
- */
243
- static workflowInstallCreate(podId, workflowName, requestBody) {
244
- return __request(OpenAPI, {
245
- method: 'POST',
246
- url: '/pods/{pod_id}/workflows/{workflow_name}/install',
247
- path: {
248
- 'pod_id': podId,
249
- 'workflow_name': workflowName,
250
- },
251
- body: requestBody,
252
- mediaType: 'application/json',
253
- errors: {
254
- 422: `Validation Error`,
255
- },
256
- });
257
- }
258
- /**
259
- * List Workflow Installs
260
- * List workflow installations visible to the current user. `GLOBAL` workflows return the pod-level install; `USER` workflows return the current user's install.
261
- * @param podId
262
- * @param workflowName
263
- * @returns WorkflowInstallListResponse Successful Response
264
- * @throws ApiError
265
- */
266
- static workflowInstallList(podId, workflowName) {
267
- return __request(OpenAPI, {
268
- method: 'GET',
269
- url: '/pods/{pod_id}/workflows/{workflow_name}/installs',
270
- path: {
271
- 'pod_id': podId,
272
- 'workflow_name': workflowName,
273
- },
274
- errors: {
275
- 422: `Validation Error`,
276
- },
277
- });
278
- }
279
- /**
280
- * Uninstall Workflow
281
- * Remove a previously created workflow installation binding.
282
- * @param podId
283
- * @param workflowName
284
- * @param installId
285
- * @returns void
286
- * @throws ApiError
287
- */
288
- static workflowInstallDelete(podId, workflowName, installId) {
289
- return __request(OpenAPI, {
290
- method: 'DELETE',
291
- url: '/pods/{pod_id}/workflows/{workflow_name}/installs/{install_id}',
292
- path: {
293
- 'pod_id': podId,
294
- 'workflow_name': workflowName,
295
- 'install_id': installId,
296
- },
297
- errors: {
298
- 422: `Validation Error`,
299
- },
300
- });
301
- }
302
259
  /**
303
260
  * Start Workflow
304
261
  * Start a new workflow run. For event/scheduled/datastore starts, the request body is treated as initial trigger payload and merged into execution context.
@@ -98,7 +98,7 @@ export function AuthGuard({ client, children, loadingFallback = null, unauthenti
98
98
  setMembershipError(null);
99
99
  try {
100
100
  const currentUser = await client.users.current();
101
- await client.podMembers.get(client.podId, currentUser.id);
101
+ await client.podMembers.lookupByUserId(client.podId, currentUser.id);
102
102
  setMembershipState("member");
103
103
  setJoinRequest(null);
104
104
  return;
@@ -92,6 +92,14 @@ export { useFunctionRun } from "./useFunctionRun.js";
92
92
  export type { UseFunctionRunOptions, UseFunctionRunResult } from "./useFunctionRun.js";
93
93
  export { useFunctionRuns } from "./useFunctionRuns.js";
94
94
  export type { UseFunctionRunsOptions, UseFunctionRunsResult } from "./useFunctionRuns.js";
95
+ export { useSchedules } from "./useSchedules.js";
96
+ export type { UseSchedulesOptions, UseSchedulesResult } from "./useSchedules.js";
97
+ export { useCreateSchedule } from "./useCreateSchedule.js";
98
+ export type { UseCreateScheduleOptions, UseCreateScheduleResult } from "./useCreateSchedule.js";
99
+ export { useUpdateSchedule } from "./useUpdateSchedule.js";
100
+ export type { UseUpdateScheduleOptions, UseUpdateScheduleResult } from "./useUpdateSchedule.js";
101
+ export { useDeleteSchedule } from "./useDeleteSchedule.js";
102
+ export type { UseDeleteScheduleOptions, UseDeleteScheduleResult } from "./useDeleteSchedule.js";
95
103
  export { useFlowSession } from "./useFlowSession.js";
96
104
  export type { UseFlowSessionOptions, UseFlowSessionResult, } from "./useFlowSession.js";
97
105
  export { useWorkflowStart } from "./useWorkflowStart.js";
@@ -100,6 +108,8 @@ export { useWorkflowRun } from "./useWorkflowRun.js";
100
108
  export type { UseWorkflowRunOptions, UseWorkflowRunResult } from "./useWorkflowRun.js";
101
109
  export { useWorkflowRuns } from "./useWorkflowRuns.js";
102
110
  export type { UseWorkflowRunsOptions, UseWorkflowRunsResult } from "./useWorkflowRuns.js";
111
+ export { useWorkflowRunWaitAssignments } from "./useWorkflowRunWaitAssignments.js";
112
+ export type { UseWorkflowRunWaitAssignmentsOptions, UseWorkflowRunWaitAssignmentsResult, } from "./useWorkflowRunWaitAssignments.js";
103
113
  export { useWorkflowResume } from "./useWorkflowResume.js";
104
114
  export type { UseWorkflowResumeOptions, UseWorkflowResumeResult, } from "./useWorkflowResume.js";
105
115
  export { useFlowRunHistory } from "./useFlowRunHistory.js";
@@ -45,9 +45,14 @@ export { useAssistantController } from "./useAssistantController.js";
45
45
  export { useFunctionSession } from "./useFunctionSession.js";
46
46
  export { useFunctionRun } from "./useFunctionRun.js";
47
47
  export { useFunctionRuns } from "./useFunctionRuns.js";
48
+ export { useSchedules } from "./useSchedules.js";
49
+ export { useCreateSchedule } from "./useCreateSchedule.js";
50
+ export { useUpdateSchedule } from "./useUpdateSchedule.js";
51
+ export { useDeleteSchedule } from "./useDeleteSchedule.js";
48
52
  export { useFlowSession } from "./useFlowSession.js";
49
53
  export { useWorkflowStart } from "./useWorkflowStart.js";
50
54
  export { useWorkflowRun } from "./useWorkflowRun.js";
51
55
  export { useWorkflowRuns } from "./useWorkflowRuns.js";
56
+ export { useWorkflowRunWaitAssignments } from "./useWorkflowRunWaitAssignments.js";
52
57
  export { useWorkflowResume } from "./useWorkflowResume.js";
53
58
  export { useFlowRunHistory } from "./useFlowRunHistory.js";
@@ -0,0 +1,17 @@
1
+ import type { LemmaClient } from "../client.js";
2
+ import type { CreateScheduleRequest, Schedule } from "../types.js";
3
+ export interface UseCreateScheduleOptions {
4
+ client: LemmaClient;
5
+ podId?: string;
6
+ enabled?: boolean;
7
+ onSuccess?: (schedule: Schedule) => void;
8
+ onError?: (error: unknown) => void;
9
+ }
10
+ export interface UseCreateScheduleResult {
11
+ schedule: Schedule | null;
12
+ isSubmitting: boolean;
13
+ error: Error | null;
14
+ create: (payload: CreateScheduleRequest) => Promise<Schedule | null>;
15
+ reset: () => void;
16
+ }
17
+ export declare function useCreateSchedule({ client, podId, enabled, onSuccess, onError, }: UseCreateScheduleOptions): UseCreateScheduleResult;
@@ -0,0 +1,45 @@
1
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
+ import { normalizeError, resolvePodClient } from "./utils.js";
3
+ export function useCreateSchedule({ client, podId, enabled = true, onSuccess, onError, }) {
4
+ const [schedule, setSchedule] = useState(null);
5
+ const [isSubmitting, setIsSubmitting] = useState(false);
6
+ const [error, setError] = useState(null);
7
+ const onSuccessRef = useRef(onSuccess);
8
+ const onErrorRef = useRef(onError);
9
+ useEffect(() => { onSuccessRef.current = onSuccess; }, [onSuccess]);
10
+ useEffect(() => { onErrorRef.current = onError; }, [onError]);
11
+ const create = useCallback(async (payload) => {
12
+ if (!enabled)
13
+ return null;
14
+ setIsSubmitting(true);
15
+ setError(null);
16
+ try {
17
+ const scopedClient = resolvePodClient(client, podId);
18
+ const nextSchedule = await scopedClient.schedules.create(payload);
19
+ setSchedule(nextSchedule);
20
+ onSuccessRef.current?.(nextSchedule);
21
+ return nextSchedule;
22
+ }
23
+ catch (mutationError) {
24
+ const normalized = normalizeError(mutationError, "Failed to create schedule.");
25
+ setError(normalized);
26
+ onErrorRef.current?.(mutationError);
27
+ return null;
28
+ }
29
+ finally {
30
+ setIsSubmitting(false);
31
+ }
32
+ }, [client, enabled, podId]);
33
+ const reset = useCallback(() => {
34
+ setSchedule(null);
35
+ setError(null);
36
+ setIsSubmitting(false);
37
+ }, []);
38
+ return useMemo(() => ({
39
+ schedule,
40
+ isSubmitting,
41
+ error,
42
+ create,
43
+ reset,
44
+ }), [create, error, isSubmitting, reset, schedule]);
45
+ }
@@ -0,0 +1,19 @@
1
+ import type { LemmaClient } from "../client.js";
2
+ export interface UseDeleteScheduleOptions {
3
+ client: LemmaClient;
4
+ podId?: string;
5
+ scheduleId?: string | null;
6
+ enabled?: boolean;
7
+ onSuccess?: (scheduleId: string) => void;
8
+ onError?: (error: unknown) => void;
9
+ }
10
+ export interface UseDeleteScheduleResult {
11
+ deletedScheduleId: string | null;
12
+ isSubmitting: boolean;
13
+ error: Error | null;
14
+ remove: (overrides?: {
15
+ scheduleId?: string | null;
16
+ }) => Promise<boolean>;
17
+ reset: () => void;
18
+ }
19
+ export declare function useDeleteSchedule({ client, podId, scheduleId, enabled, onSuccess, onError, }: UseDeleteScheduleOptions): UseDeleteScheduleResult;