@burdenoff/sdk-libs 2026.523.1 → 2026.525.1

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.
@@ -1,16 +1,16 @@
1
- 'use strict';var i=`
1
+ 'use strict';var n=`
2
2
  fragment ScheduledJobFields on ScheduledJob {
3
3
  id name description scheduleType cronExpression interval intervalUnit
4
4
  rrule timezone startDate endDate status workspaceId metadata payload
5
5
  createdAt updatedAt
6
6
  }
7
- `,c=`
7
+ `,r=`
8
8
  fragment JobExecutionFields on JobExecution {
9
9
  id scheduleId status attemptNumber startedAt completedAt
10
10
  errorMessage result createdAt updatedAt
11
11
  }
12
- `,r=`
13
- ${i}
12
+ `,l=`
13
+ ${n}
14
14
  query ScheduledJobs(
15
15
  $workspaceId: ID!
16
16
  $filter: JobFilterInput
@@ -22,25 +22,25 @@
22
22
  pageInfo { hasNextPage endCursor }
23
23
  }
24
24
  }
25
- `,a=`
26
- ${i}
25
+ `,p=`
26
+ ${n}
27
27
  query ScheduledJob($id: ID!) {
28
28
  scheduledJob(id: $id) { ...ScheduledJobFields }
29
29
  }
30
- `,s=`
31
- ${i}
30
+ `,S=`
31
+ ${n}
32
32
  mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
33
33
  createScheduledJob(workspaceId: $workspaceId, input: $input) { ...ScheduledJobFields }
34
34
  }
35
- `,p=`
36
- ${i}
35
+ `,h=`
36
+ ${n}
37
37
  mutation UpdateScheduledJob($id: ID!, $input: UpdateScheduledJobInput!) {
38
38
  updateScheduledJob(id: $id, input: $input) { ...ScheduledJobFields }
39
39
  }
40
- `,l=`
40
+ `,E=`
41
41
  mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
42
- `,b=`
43
- ${c}
42
+ `,T=`
43
+ ${r}
44
44
  query JobExecutions($jobId: ID!, $pagination: SchedulerPaginationInput) {
45
45
  jobExecutions(jobId: $jobId, pagination: $pagination) {
46
46
  edges { cursor node { ...JobExecutionFields } }
@@ -48,14 +48,190 @@
48
48
  pageInfo { hasNextPage endCursor }
49
49
  }
50
50
  }
51
- `,J=`
52
- ${c}
51
+ `,b=`
52
+ ${r}
53
53
  query JobExecution($id: ID!) {
54
54
  jobExecution(id: $id) { ...JobExecutionFields }
55
55
  }
56
- `,E=`
57
- ${c}
56
+ `,m=`
57
+ ${r}
58
58
  mutation RetryJobExecution($executionId: ID!) {
59
59
  retryJobExecution(executionId: $executionId) { ...JobExecutionFields }
60
60
  }
61
- `;function S(d){let{workspace:o}=d.gql;return {async list(e,t){return (await o.request(b,{jobId:e,pagination:t})).jobExecutions},async get(e){return (await o.request(J,{id:e})).jobExecution},async retry(e){return (await o.request(E,{executionId:e})).retryJobExecution}}}function x(d){let{workspace:o}=d.gql;return {async list(e,t,n){return (await o.request(r,{workspaceId:e,filter:t,pagination:n})).scheduledJobs},async get(e){return (await o.request(a,{id:e})).scheduledJob},async create(e,t){return (await o.request(s,{workspaceId:e,input:t})).createScheduledJob},async update(e,t){return (await o.request(p,{id:e,input:t})).updateScheduledJob},async delete(e){return (await o.request(l,{id:e})).deleteScheduledJob}}}var h={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth"],attach(d){return {jobs:x(d),executions:S(d)}}},w=h;module.exports=w;
61
+ `,c=`
62
+ fragment ScheduleTemplateFields on ScheduleTemplate {
63
+ id name description category isPublic scheduleType executorType
64
+ scheduleConfig executorConfig payloadTemplate retryPolicy failurePolicy
65
+ circuitBreaker businessCalendarId workspaceId createdBy createdAt updatedAt usageCount
66
+ }
67
+ `,s=`
68
+ fragment ScheduledJobTagFields on ScheduledJobTagAssignment {
69
+ id entityId entityType tagId source assignedAt assignedBy
70
+ }
71
+ `,X=`
72
+ fragment ScheduleVersionFields on ScheduleVersion {
73
+ id scheduleId version changedBy changedFields changeReason config context createdAt
74
+ }
75
+ `,I=`
76
+ ${n}
77
+ mutation PauseScheduledJob($id: ID!) {
78
+ pauseScheduledJob(id: $id) { ...ScheduledJobFields }
79
+ }
80
+ `,J=`
81
+ ${n}
82
+ mutation ResumeScheduledJob($id: ID!) {
83
+ resumeScheduledJob(id: $id) { ...ScheduledJobFields }
84
+ }
85
+ `,g=`
86
+ ${n}
87
+ mutation ActivateSchedule($id: ID!) {
88
+ activateSchedule(id: $id) { ...ScheduledJobFields }
89
+ }
90
+ `,$=`
91
+ ${n}
92
+ mutation ArchiveSchedule($id: ID!) {
93
+ archiveSchedule(id: $id) { ...ScheduledJobFields }
94
+ }
95
+ `,x=`
96
+ ${n}
97
+ mutation DisableSchedule($id: ID!, $reason: String) {
98
+ disableSchedule(id: $id, reason: $reason) { ...ScheduledJobFields }
99
+ }
100
+ `,A=`
101
+ ${n}
102
+ mutation CloneSchedule(
103
+ $sourceId: ID!
104
+ $newWorkspaceId: ID
105
+ $overrides: CreateScheduledJobInput
106
+ ) {
107
+ cloneSchedule(sourceId: $sourceId, newWorkspaceId: $newWorkspaceId, overrides: $overrides) {
108
+ ...ScheduledJobFields
109
+ }
110
+ }
111
+ `,C=`
112
+ ${r}
113
+ mutation ExecuteJobNow($id: ID!) {
114
+ executeJobNow(id: $id) { ...JobExecutionFields }
115
+ }
116
+ `,D=`
117
+ query PreviewSchedule(
118
+ $scheduleType: ScheduleType!
119
+ $cronExpression: String
120
+ $rrule: String
121
+ $interval: Int
122
+ $intervalUnit: String
123
+ $count: Int
124
+ $startDate: DateTime
125
+ $endDate: DateTime
126
+ $timezone: String
127
+ ) {
128
+ previewSchedule(
129
+ scheduleType: $scheduleType
130
+ cronExpression: $cronExpression
131
+ rrule: $rrule
132
+ interval: $interval
133
+ intervalUnit: $intervalUnit
134
+ count: $count
135
+ startDate: $startDate
136
+ endDate: $endDate
137
+ timezone: $timezone
138
+ ) {
139
+ count startDate endDate nextExecutions
140
+ }
141
+ }
142
+ `,_=`
143
+ ${r}
144
+ subscription ExecutionUpdated($workspaceId: ID!, $scheduleId: ID, $executionId: ID) {
145
+ executionUpdated(workspaceId: $workspaceId, scheduleId: $scheduleId, executionId: $executionId) {
146
+ executionId scheduleId status success timestamp duration error output progress
147
+ }
148
+ }
149
+ `,y=`
150
+ subscription JobStatusUpdated($workspaceId: ID!, $scheduleId: ID) {
151
+ jobStatusUpdated(workspaceId: $workspaceId, scheduleId: $scheduleId) {
152
+ scheduleId scheduleName status previousStatus lastExecutionAt nextExecutionAt metadata timestamp
153
+ }
154
+ }
155
+ `,U=`
156
+ ${n}
157
+ mutation CreateScheduleFromTemplate(
158
+ $templateId: ID!
159
+ $workspaceId: ID!
160
+ $overrides: CreateScheduledJobInput
161
+ ) {
162
+ createScheduleFromTemplate(templateId: $templateId, workspaceId: $workspaceId, overrides: $overrides) {
163
+ ...ScheduledJobFields
164
+ }
165
+ }
166
+ `,w=`
167
+ ${c}
168
+ mutation CreateScheduleTemplate($input: CreateScheduleTemplateInput!, $workspaceId: ID!) {
169
+ createScheduleTemplate(input: $input, workspaceId: $workspaceId) { ...ScheduleTemplateFields }
170
+ }
171
+ `,P=`
172
+ ${c}
173
+ mutation UpdateScheduleTemplate($id: ID!, $input: UpdateScheduleTemplateInput!) {
174
+ updateScheduleTemplate(id: $id, input: $input) { ...ScheduleTemplateFields }
175
+ }
176
+ `,L=`
177
+ mutation DeleteScheduleTemplate($id: ID!) { deleteScheduleTemplate(id: $id) }
178
+ `,v=`
179
+ ${c}
180
+ query ScheduleTemplate($id: ID!) {
181
+ scheduleTemplate(id: $id) { ...ScheduleTemplateFields }
182
+ }
183
+ `,f=`
184
+ ${c}
185
+ query ScheduleTemplates(
186
+ $workspaceId: ID!
187
+ $filter: ScheduleTemplateFilterInput
188
+ $pagination: SchedulerPaginationInput
189
+ ) {
190
+ scheduleTemplates(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
191
+ templates { ...ScheduleTemplateFields }
192
+ total
193
+ nextCursor
194
+ }
195
+ }
196
+ `,F=`
197
+ ${c}
198
+ query PublicScheduleTemplates(
199
+ $filter: ScheduleTemplateFilterInput
200
+ $pagination: SchedulerPaginationInput
201
+ ) {
202
+ publicScheduleTemplates(filter: $filter, pagination: $pagination) {
203
+ templates { ...ScheduleTemplateFields }
204
+ total
205
+ nextCursor
206
+ }
207
+ }
208
+ `,k=`
209
+ ${s}
210
+ mutation TagScheduledJob($input: TagScheduledJobInput!) {
211
+ tagScheduledJob(input: $input) { ...ScheduledJobTagFields }
212
+ }
213
+ `,O=`
214
+ mutation UntagScheduledJob($input: UntagScheduledJobInput!) {
215
+ untagScheduledJob(input: $input)
216
+ }
217
+ `,q=`
218
+ ${s}
219
+ mutation ReplaceScheduledJobTags($input: ReplaceScheduledJobTagsInput!) {
220
+ replaceScheduledJobTags(input: $input) { ...ScheduledJobTagFields }
221
+ }
222
+ `,R=`
223
+ ${s}
224
+ query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
225
+ getScheduledJobTags(input: $input) { ...ScheduledJobTagFields }
226
+ }
227
+ `,H=`
228
+ ${X}
229
+ query ScheduleVersionHistory($scheduleId: ID!) {
230
+ scheduleVersionHistory(scheduleId: $scheduleId) { ...ScheduleVersionFields }
231
+ }
232
+ `,B=`
233
+ ${n}
234
+ mutation RestoreScheduleVersion($scheduleId: ID!, $versionId: ID!) {
235
+ restoreScheduleVersion(scheduleId: $scheduleId, versionId: $versionId) { ...ScheduledJobFields }
236
+ }
237
+ `;function N(a){let{workspace:d}=a.gql;return {async list(e,t){return (await d.request(T,{jobId:e,pagination:t})).jobExecutions},async get(e){return (await d.request(b,{id:e})).jobExecution},async retry(e){return (await d.request(m,{executionId:e})).retryJobExecution},updatedSubscription(){return {query:_,variablesFor({workspaceId:e,scheduleId:t,executionId:o}){return {workspaceId:e,scheduleId:t??null,executionId:o??null}}}}}}function V(a){let{workspace:d}=a.gql;return {async list(e,t,o){return (await d.request(l,{workspaceId:e,filter:t,pagination:o})).scheduledJobs},async get(e){return (await d.request(p,{id:e})).scheduledJob},async create(e,t){return (await d.request(S,{workspaceId:e,input:t})).createScheduledJob},async update(e,t){return (await d.request(h,{id:e,input:t})).updateScheduledJob},async delete(e){return (await d.request(E,{id:e})).deleteScheduledJob},async pause(e){return (await d.request(I,{id:e})).pauseScheduledJob},async resume(e){return (await d.request(J,{id:e})).resumeScheduledJob},async activate(e){return (await d.request(g,{id:e})).activateSchedule},async archive(e){return (await d.request($,{id:e})).archiveSchedule},async disable(e,t){return (await d.request(x,{id:e,reason:t??null})).disableSchedule},async clone({sourceId:e,newWorkspaceId:t,overrides:o}){return (await d.request(A,{sourceId:e,newWorkspaceId:t??null,overrides:o??null})).cloneSchedule},async executeNow(e){return (await d.request(C,{id:e})).executeJobNow},async preview(e){return (await d.request(D,{scheduleType:e.scheduleType,cronExpression:e.cronExpression??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.startDate??null,endDate:e.endDate??null,timezone:e.timezone??null})).previewSchedule},statusUpdatedSubscription(){return {query:y,variablesFor({workspaceId:e,scheduleId:t}){return {workspaceId:e,scheduleId:t??null}}}}}}function M(a){let{workspace:d}=a.gql;return {async add(e){return (await d.request(k,{input:e})).tagScheduledJob},async remove(e){return (await d.request(O,{input:e})).untagScheduledJob},async replace(e){return (await d.request(q,{input:e})).replaceScheduledJobTags},async list(e){return (await d.request(R,{input:e})).getScheduledJobTags}}}function G(a){let{workspace:d}=a.gql;return {async list(e,t,o){return (await d.request(f,{workspaceId:e,filter:t,pagination:o})).scheduleTemplates},async listPublic(e,t){return (await d.request(F,{filter:e,pagination:t})).publicScheduleTemplates},async get(e){return (await d.request(v,{id:e})).scheduleTemplate},async create(e,t){return (await d.request(w,{workspaceId:e,input:t})).createScheduleTemplate},async update(e,t){return (await d.request(P,{id:e,input:t})).updateScheduleTemplate},async delete(e){return (await d.request(L,{id:e})).deleteScheduleTemplate},async createScheduleFromTemplate({templateId:e,workspaceId:t,overrides:o}){return (await d.request(U,{templateId:e,workspaceId:t,overrides:o??null})).createScheduleFromTemplate}}}function j(a){let{workspace:d}=a.gql;return {async history(e){return (await d.request(H,{scheduleId:e})).scheduleVersionHistory},async restore(e,t){return (await d.request(B,{scheduleId:e,versionId:t})).restoreScheduleVersion}}}var W={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth"],attach(a){return {jobs:V(a),executions:N(a),templates:G(a),tags:M(a),versions:j(a)}}},be=W;module.exports=be;
@@ -97,11 +97,155 @@ interface JobExecutionConnection {
97
97
  endCursor?: string | null;
98
98
  };
99
99
  }
100
+ interface SchedulePreview {
101
+ count: number;
102
+ startDate: string;
103
+ endDate: string;
104
+ nextExecutions: string[];
105
+ }
106
+ interface PreviewScheduleInput {
107
+ scheduleType: ScheduleType | string;
108
+ cronExpression?: string;
109
+ rrule?: string;
110
+ interval?: number;
111
+ intervalUnit?: string;
112
+ count?: number;
113
+ startDate?: string;
114
+ endDate?: string;
115
+ timezone?: string;
116
+ }
117
+ interface ScheduleTemplate {
118
+ id: string;
119
+ name: string;
120
+ description?: string | null;
121
+ category?: string | null;
122
+ isPublic: boolean;
123
+ scheduleType: string;
124
+ executorType: string;
125
+ scheduleConfig: Json;
126
+ executorConfig: Json;
127
+ payloadTemplate?: Json;
128
+ retryPolicy?: Json;
129
+ failurePolicy?: Json;
130
+ circuitBreaker?: Json;
131
+ businessCalendarId?: string | null;
132
+ workspaceId: string;
133
+ createdBy: string;
134
+ createdAt: string;
135
+ updatedAt: string;
136
+ usageCount: number;
137
+ }
138
+ interface ScheduleTemplateConnection {
139
+ templates: ScheduleTemplate[];
140
+ total: number;
141
+ nextCursor?: string | null;
142
+ }
143
+ interface ScheduleTemplateFilterInput {
144
+ category?: string;
145
+ createdBy?: string;
146
+ executorType?: string;
147
+ isPublic?: boolean;
148
+ scheduleType?: string;
149
+ search?: string;
150
+ }
151
+ interface CreateScheduleTemplateInput {
152
+ name: string;
153
+ scheduleType: string;
154
+ executorType: string;
155
+ scheduleConfig: Json;
156
+ executorConfig: Json;
157
+ description?: string;
158
+ category?: string;
159
+ isPublic?: boolean;
160
+ businessCalendarId?: string;
161
+ circuitBreaker?: Json;
162
+ failurePolicy?: Json;
163
+ payloadTemplate?: Json;
164
+ retryPolicy?: Json;
165
+ }
166
+ interface UpdateScheduleTemplateInput {
167
+ name?: string;
168
+ description?: string;
169
+ category?: string;
170
+ isPublic?: boolean;
171
+ businessCalendarId?: string;
172
+ circuitBreaker?: Json;
173
+ failurePolicy?: Json;
174
+ payloadTemplate?: Json;
175
+ retryPolicy?: Json;
176
+ scheduleConfig?: Json;
177
+ executorConfig?: Json;
178
+ }
179
+ interface ScheduledJobTagAssignment {
180
+ id: string;
181
+ entityId: string;
182
+ entityType: string;
183
+ tagId: string;
184
+ source: string;
185
+ assignedAt?: string | null;
186
+ assignedBy?: string | null;
187
+ }
188
+ interface TagScheduledJobInput {
189
+ entityId: string;
190
+ tagId: string;
191
+ source?: string;
192
+ }
193
+ interface UntagScheduledJobInput {
194
+ entityId: string;
195
+ tagId: string;
196
+ }
197
+ interface ReplaceScheduledJobTagsInput {
198
+ entityId: string;
199
+ tagIds: string[];
200
+ }
201
+ interface GetScheduledJobTagsInput {
202
+ entityId: string;
203
+ }
204
+ interface ScheduleVersion {
205
+ id: string;
206
+ scheduleId: string;
207
+ version: number;
208
+ changedBy: string;
209
+ changedFields: string[];
210
+ changeReason?: string | null;
211
+ config: Json;
212
+ context?: Json;
213
+ createdAt: string;
214
+ }
215
+ interface ExecutionUpdate {
216
+ executionId: string;
217
+ scheduleId: string;
218
+ status: JobStatus;
219
+ success: boolean;
220
+ timestamp: string;
221
+ duration?: number | null;
222
+ error?: string | null;
223
+ output?: Json;
224
+ progress?: number | null;
225
+ }
226
+ interface JobStatusUpdate {
227
+ scheduleId: string;
228
+ scheduleName?: string | null;
229
+ status: JobStatus;
230
+ previousStatus?: JobStatus | null;
231
+ lastExecutionAt?: string | null;
232
+ nextExecutionAt?: string | null;
233
+ metadata?: Json;
234
+ timestamp: string;
235
+ }
100
236
 
101
237
  interface ExecutionsApi {
102
238
  list(jobId: string, pagination?: SchedulerPaginationInput): Promise<JobExecutionConnection>;
103
239
  get(id: string): Promise<JobExecution | null>;
104
240
  retry(executionId: string): Promise<JobExecution>;
241
+ updatedSubscription(): {
242
+ query: string;
243
+ variablesFor(args: {
244
+ workspaceId: string;
245
+ scheduleId?: string;
246
+ executionId?: string;
247
+ }): Record<string, unknown>;
248
+ };
105
249
  }
106
250
 
107
251
  interface JobsApi {
@@ -110,12 +254,60 @@ interface JobsApi {
110
254
  create(workspaceId: string, input: CreateScheduledJobInput): Promise<ScheduledJob>;
111
255
  update(id: string, input: UpdateScheduledJobInput): Promise<ScheduledJob>;
112
256
  delete(id: string): Promise<boolean>;
257
+ pause(id: string): Promise<ScheduledJob>;
258
+ resume(id: string): Promise<ScheduledJob>;
259
+ activate(id: string): Promise<ScheduledJob>;
260
+ archive(id: string): Promise<ScheduledJob>;
261
+ disable(id: string, reason?: string): Promise<ScheduledJob>;
262
+ clone(args: {
263
+ sourceId: string;
264
+ newWorkspaceId?: string;
265
+ overrides?: CreateScheduledJobInput;
266
+ }): Promise<ScheduledJob>;
267
+ executeNow(id: string): Promise<JobExecution>;
268
+ preview(input: PreviewScheduleInput): Promise<SchedulePreview>;
269
+ statusUpdatedSubscription(): {
270
+ query: string;
271
+ variablesFor(args: {
272
+ workspaceId: string;
273
+ scheduleId?: string;
274
+ }): Record<string, unknown>;
275
+ };
276
+ }
277
+
278
+ interface ScheduledJobTagsApi {
279
+ add(input: TagScheduledJobInput): Promise<ScheduledJobTagAssignment>;
280
+ remove(input: UntagScheduledJobInput): Promise<boolean>;
281
+ replace(input: ReplaceScheduledJobTagsInput): Promise<ScheduledJobTagAssignment[]>;
282
+ list(input: GetScheduledJobTagsInput): Promise<ScheduledJobTagAssignment[]>;
283
+ }
284
+
285
+ interface TemplatesApi {
286
+ list(workspaceId: string, filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise<ScheduleTemplateConnection>;
287
+ listPublic(filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise<ScheduleTemplateConnection>;
288
+ get(id: string): Promise<ScheduleTemplate | null>;
289
+ create(workspaceId: string, input: CreateScheduleTemplateInput): Promise<ScheduleTemplate>;
290
+ update(id: string, input: UpdateScheduleTemplateInput): Promise<ScheduleTemplate>;
291
+ delete(id: string): Promise<boolean>;
292
+ createScheduleFromTemplate(args: {
293
+ templateId: string;
294
+ workspaceId: string;
295
+ overrides?: CreateScheduledJobInput;
296
+ }): Promise<ScheduledJob>;
297
+ }
298
+
299
+ interface VersionsApi {
300
+ history(scheduleId: string): Promise<ScheduleVersion[]>;
301
+ restore(scheduleId: string, versionId: string): Promise<ScheduledJob>;
113
302
  }
114
303
 
115
304
  interface SchedulerApi {
116
305
  jobs: JobsApi;
117
306
  executions: ExecutionsApi;
307
+ templates: TemplatesApi;
308
+ tags: ScheduledJobTagsApi;
309
+ versions: VersionsApi;
118
310
  }
119
311
  declare const schedulerModule: SdkModule<SchedulerApi>;
120
312
 
121
- export { type CreateScheduledJobInput, type ExecutionsApi, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobsApi, type ScheduleType, type ScheduledJob, type ScheduledJobConnection, type SchedulerApi, type SchedulerPaginationInput, type UpdateScheduledJobInput, schedulerModule as default };
313
+ export { type CreateScheduleTemplateInput, type CreateScheduledJobInput, type ExecutionUpdate, type ExecutionsApi, type GetScheduledJobTagsInput, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobStatusUpdate, type JobsApi, type PreviewScheduleInput, type ReplaceScheduledJobTagsInput, type SchedulePreview, type ScheduleTemplate, type ScheduleTemplateConnection, type ScheduleTemplateFilterInput, type ScheduleType, type ScheduleVersion, type ScheduledJob, type ScheduledJobConnection, type ScheduledJobTagAssignment, type ScheduledJobTagsApi, type SchedulerApi, type SchedulerPaginationInput, type TagScheduledJobInput, type TemplatesApi, type UntagScheduledJobInput, type UpdateScheduleTemplateInput, type UpdateScheduledJobInput, type VersionsApi, schedulerModule as default };
@@ -97,11 +97,155 @@ interface JobExecutionConnection {
97
97
  endCursor?: string | null;
98
98
  };
99
99
  }
100
+ interface SchedulePreview {
101
+ count: number;
102
+ startDate: string;
103
+ endDate: string;
104
+ nextExecutions: string[];
105
+ }
106
+ interface PreviewScheduleInput {
107
+ scheduleType: ScheduleType | string;
108
+ cronExpression?: string;
109
+ rrule?: string;
110
+ interval?: number;
111
+ intervalUnit?: string;
112
+ count?: number;
113
+ startDate?: string;
114
+ endDate?: string;
115
+ timezone?: string;
116
+ }
117
+ interface ScheduleTemplate {
118
+ id: string;
119
+ name: string;
120
+ description?: string | null;
121
+ category?: string | null;
122
+ isPublic: boolean;
123
+ scheduleType: string;
124
+ executorType: string;
125
+ scheduleConfig: Json;
126
+ executorConfig: Json;
127
+ payloadTemplate?: Json;
128
+ retryPolicy?: Json;
129
+ failurePolicy?: Json;
130
+ circuitBreaker?: Json;
131
+ businessCalendarId?: string | null;
132
+ workspaceId: string;
133
+ createdBy: string;
134
+ createdAt: string;
135
+ updatedAt: string;
136
+ usageCount: number;
137
+ }
138
+ interface ScheduleTemplateConnection {
139
+ templates: ScheduleTemplate[];
140
+ total: number;
141
+ nextCursor?: string | null;
142
+ }
143
+ interface ScheduleTemplateFilterInput {
144
+ category?: string;
145
+ createdBy?: string;
146
+ executorType?: string;
147
+ isPublic?: boolean;
148
+ scheduleType?: string;
149
+ search?: string;
150
+ }
151
+ interface CreateScheduleTemplateInput {
152
+ name: string;
153
+ scheduleType: string;
154
+ executorType: string;
155
+ scheduleConfig: Json;
156
+ executorConfig: Json;
157
+ description?: string;
158
+ category?: string;
159
+ isPublic?: boolean;
160
+ businessCalendarId?: string;
161
+ circuitBreaker?: Json;
162
+ failurePolicy?: Json;
163
+ payloadTemplate?: Json;
164
+ retryPolicy?: Json;
165
+ }
166
+ interface UpdateScheduleTemplateInput {
167
+ name?: string;
168
+ description?: string;
169
+ category?: string;
170
+ isPublic?: boolean;
171
+ businessCalendarId?: string;
172
+ circuitBreaker?: Json;
173
+ failurePolicy?: Json;
174
+ payloadTemplate?: Json;
175
+ retryPolicy?: Json;
176
+ scheduleConfig?: Json;
177
+ executorConfig?: Json;
178
+ }
179
+ interface ScheduledJobTagAssignment {
180
+ id: string;
181
+ entityId: string;
182
+ entityType: string;
183
+ tagId: string;
184
+ source: string;
185
+ assignedAt?: string | null;
186
+ assignedBy?: string | null;
187
+ }
188
+ interface TagScheduledJobInput {
189
+ entityId: string;
190
+ tagId: string;
191
+ source?: string;
192
+ }
193
+ interface UntagScheduledJobInput {
194
+ entityId: string;
195
+ tagId: string;
196
+ }
197
+ interface ReplaceScheduledJobTagsInput {
198
+ entityId: string;
199
+ tagIds: string[];
200
+ }
201
+ interface GetScheduledJobTagsInput {
202
+ entityId: string;
203
+ }
204
+ interface ScheduleVersion {
205
+ id: string;
206
+ scheduleId: string;
207
+ version: number;
208
+ changedBy: string;
209
+ changedFields: string[];
210
+ changeReason?: string | null;
211
+ config: Json;
212
+ context?: Json;
213
+ createdAt: string;
214
+ }
215
+ interface ExecutionUpdate {
216
+ executionId: string;
217
+ scheduleId: string;
218
+ status: JobStatus;
219
+ success: boolean;
220
+ timestamp: string;
221
+ duration?: number | null;
222
+ error?: string | null;
223
+ output?: Json;
224
+ progress?: number | null;
225
+ }
226
+ interface JobStatusUpdate {
227
+ scheduleId: string;
228
+ scheduleName?: string | null;
229
+ status: JobStatus;
230
+ previousStatus?: JobStatus | null;
231
+ lastExecutionAt?: string | null;
232
+ nextExecutionAt?: string | null;
233
+ metadata?: Json;
234
+ timestamp: string;
235
+ }
100
236
 
101
237
  interface ExecutionsApi {
102
238
  list(jobId: string, pagination?: SchedulerPaginationInput): Promise<JobExecutionConnection>;
103
239
  get(id: string): Promise<JobExecution | null>;
104
240
  retry(executionId: string): Promise<JobExecution>;
241
+ updatedSubscription(): {
242
+ query: string;
243
+ variablesFor(args: {
244
+ workspaceId: string;
245
+ scheduleId?: string;
246
+ executionId?: string;
247
+ }): Record<string, unknown>;
248
+ };
105
249
  }
106
250
 
107
251
  interface JobsApi {
@@ -110,12 +254,60 @@ interface JobsApi {
110
254
  create(workspaceId: string, input: CreateScheduledJobInput): Promise<ScheduledJob>;
111
255
  update(id: string, input: UpdateScheduledJobInput): Promise<ScheduledJob>;
112
256
  delete(id: string): Promise<boolean>;
257
+ pause(id: string): Promise<ScheduledJob>;
258
+ resume(id: string): Promise<ScheduledJob>;
259
+ activate(id: string): Promise<ScheduledJob>;
260
+ archive(id: string): Promise<ScheduledJob>;
261
+ disable(id: string, reason?: string): Promise<ScheduledJob>;
262
+ clone(args: {
263
+ sourceId: string;
264
+ newWorkspaceId?: string;
265
+ overrides?: CreateScheduledJobInput;
266
+ }): Promise<ScheduledJob>;
267
+ executeNow(id: string): Promise<JobExecution>;
268
+ preview(input: PreviewScheduleInput): Promise<SchedulePreview>;
269
+ statusUpdatedSubscription(): {
270
+ query: string;
271
+ variablesFor(args: {
272
+ workspaceId: string;
273
+ scheduleId?: string;
274
+ }): Record<string, unknown>;
275
+ };
276
+ }
277
+
278
+ interface ScheduledJobTagsApi {
279
+ add(input: TagScheduledJobInput): Promise<ScheduledJobTagAssignment>;
280
+ remove(input: UntagScheduledJobInput): Promise<boolean>;
281
+ replace(input: ReplaceScheduledJobTagsInput): Promise<ScheduledJobTagAssignment[]>;
282
+ list(input: GetScheduledJobTagsInput): Promise<ScheduledJobTagAssignment[]>;
283
+ }
284
+
285
+ interface TemplatesApi {
286
+ list(workspaceId: string, filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise<ScheduleTemplateConnection>;
287
+ listPublic(filter?: ScheduleTemplateFilterInput, pagination?: SchedulerPaginationInput): Promise<ScheduleTemplateConnection>;
288
+ get(id: string): Promise<ScheduleTemplate | null>;
289
+ create(workspaceId: string, input: CreateScheduleTemplateInput): Promise<ScheduleTemplate>;
290
+ update(id: string, input: UpdateScheduleTemplateInput): Promise<ScheduleTemplate>;
291
+ delete(id: string): Promise<boolean>;
292
+ createScheduleFromTemplate(args: {
293
+ templateId: string;
294
+ workspaceId: string;
295
+ overrides?: CreateScheduledJobInput;
296
+ }): Promise<ScheduledJob>;
297
+ }
298
+
299
+ interface VersionsApi {
300
+ history(scheduleId: string): Promise<ScheduleVersion[]>;
301
+ restore(scheduleId: string, versionId: string): Promise<ScheduledJob>;
113
302
  }
114
303
 
115
304
  interface SchedulerApi {
116
305
  jobs: JobsApi;
117
306
  executions: ExecutionsApi;
307
+ templates: TemplatesApi;
308
+ tags: ScheduledJobTagsApi;
309
+ versions: VersionsApi;
118
310
  }
119
311
  declare const schedulerModule: SdkModule<SchedulerApi>;
120
312
 
121
- export { type CreateScheduledJobInput, type ExecutionsApi, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobsApi, type ScheduleType, type ScheduledJob, type ScheduledJobConnection, type SchedulerApi, type SchedulerPaginationInput, type UpdateScheduledJobInput, schedulerModule as default };
313
+ export { type CreateScheduleTemplateInput, type CreateScheduledJobInput, type ExecutionUpdate, type ExecutionsApi, type GetScheduledJobTagsInput, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobStatusUpdate, type JobsApi, type PreviewScheduleInput, type ReplaceScheduledJobTagsInput, type SchedulePreview, type ScheduleTemplate, type ScheduleTemplateConnection, type ScheduleTemplateFilterInput, type ScheduleType, type ScheduleVersion, type ScheduledJob, type ScheduledJobConnection, type ScheduledJobTagAssignment, type ScheduledJobTagsApi, type SchedulerApi, type SchedulerPaginationInput, type TagScheduledJobInput, type TemplatesApi, type UntagScheduledJobInput, type UpdateScheduleTemplateInput, type UpdateScheduledJobInput, type VersionsApi, schedulerModule as default };