runlater-js 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -13,6 +13,9 @@ interface SendOptions {
13
13
  idempotencyKey?: string;
14
14
  on_failure_url?: string;
15
15
  on_recovery_url?: string;
16
+ script?: string;
17
+ debounce?: string | number;
18
+ debounceKey?: string;
16
19
  }
17
20
  interface DelayOptions extends SendOptions {
18
21
  delay: string | number;
@@ -33,12 +36,14 @@ interface CronOptions {
33
36
  enabled?: boolean;
34
37
  on_failure_url?: string;
35
38
  on_recovery_url?: string;
39
+ script?: string;
36
40
  }
37
41
  interface TaskResponse {
38
42
  task_id: string;
39
43
  execution_id: string;
40
44
  status: string;
41
45
  scheduled_for: string;
46
+ debounce_key?: string;
42
47
  }
43
48
  interface CronResponse {
44
49
  id: string;
@@ -70,6 +75,7 @@ interface Task {
70
75
  notify_on_recovery: boolean | null;
71
76
  on_failure_url: string | null;
72
77
  on_recovery_url: string | null;
78
+ script: string | null;
73
79
  next_run_at: string | null;
74
80
  inserted_at: string;
75
81
  updated_at: string;
@@ -84,6 +90,7 @@ interface Execution {
84
90
  duration_ms: number | null;
85
91
  error_message: string | null;
86
92
  attempt: number;
93
+ script_logs: string[];
87
94
  }
88
95
  interface ListOptions {
89
96
  queue?: string;
@@ -160,6 +167,7 @@ interface UpdateTaskOptions {
160
167
  on_recovery_url?: string;
161
168
  expected_status_codes?: string;
162
169
  expected_body_pattern?: string;
170
+ script?: string | null;
163
171
  }
164
172
  interface CreateMonitorOptions {
165
173
  name: string;
package/dist/index.d.ts CHANGED
@@ -13,6 +13,9 @@ interface SendOptions {
13
13
  idempotencyKey?: string;
14
14
  on_failure_url?: string;
15
15
  on_recovery_url?: string;
16
+ script?: string;
17
+ debounce?: string | number;
18
+ debounceKey?: string;
16
19
  }
17
20
  interface DelayOptions extends SendOptions {
18
21
  delay: string | number;
@@ -33,12 +36,14 @@ interface CronOptions {
33
36
  enabled?: boolean;
34
37
  on_failure_url?: string;
35
38
  on_recovery_url?: string;
39
+ script?: string;
36
40
  }
37
41
  interface TaskResponse {
38
42
  task_id: string;
39
43
  execution_id: string;
40
44
  status: string;
41
45
  scheduled_for: string;
46
+ debounce_key?: string;
42
47
  }
43
48
  interface CronResponse {
44
49
  id: string;
@@ -70,6 +75,7 @@ interface Task {
70
75
  notify_on_recovery: boolean | null;
71
76
  on_failure_url: string | null;
72
77
  on_recovery_url: string | null;
78
+ script: string | null;
73
79
  next_run_at: string | null;
74
80
  inserted_at: string;
75
81
  updated_at: string;
@@ -84,6 +90,7 @@ interface Execution {
84
90
  duration_ms: number | null;
85
91
  error_message: string | null;
86
92
  attempt: number;
93
+ script_logs: string[];
87
94
  }
88
95
  interface ListOptions {
89
96
  queue?: string;
@@ -160,6 +167,7 @@ interface UpdateTaskOptions {
160
167
  on_recovery_url?: string;
161
168
  expected_status_codes?: string;
162
169
  expected_body_pattern?: string;
170
+ script?: string | null;
163
171
  }
164
172
  interface CreateMonitorOptions {
165
173
  name: string;
package/dist/index.js CHANGED
@@ -142,7 +142,8 @@ var Runlater = class {
142
142
  retry_attempts: options.retries,
143
143
  queue: options.queue,
144
144
  callback_url: options.callback,
145
- enabled: options.enabled
145
+ enabled: options.enabled,
146
+ script: options.script
146
147
  }
147
148
  });
148
149
  return res.data;
@@ -175,7 +176,8 @@ var Runlater = class {
175
176
  retry_attempts: t.retries,
176
177
  queue: t.queue,
177
178
  callback_url: t.callback,
178
- enabled: t.enabled
179
+ enabled: t.enabled,
180
+ script: t.script
179
181
  }));
180
182
  }
181
183
  if (options.monitors) {
@@ -208,7 +210,10 @@ var Runlater = class {
208
210
  timeout_ms: options.timeout,
209
211
  retry_attempts: options.retries,
210
212
  queue: options.queue,
211
- callback_url: options.callback
213
+ callback_url: options.callback,
214
+ script: options.script,
215
+ debounce: options.debounce != null ? formatDelay(options.debounce) : void 0,
216
+ debounce_key: options.debounceKey
212
217
  };
213
218
  }
214
219
  /** @internal */
package/dist/index.mjs CHANGED
@@ -115,7 +115,8 @@ var Runlater = class {
115
115
  retry_attempts: options.retries,
116
116
  queue: options.queue,
117
117
  callback_url: options.callback,
118
- enabled: options.enabled
118
+ enabled: options.enabled,
119
+ script: options.script
119
120
  }
120
121
  });
121
122
  return res.data;
@@ -148,7 +149,8 @@ var Runlater = class {
148
149
  retry_attempts: t.retries,
149
150
  queue: t.queue,
150
151
  callback_url: t.callback,
151
- enabled: t.enabled
152
+ enabled: t.enabled,
153
+ script: t.script
152
154
  }));
153
155
  }
154
156
  if (options.monitors) {
@@ -181,7 +183,10 @@ var Runlater = class {
181
183
  timeout_ms: options.timeout,
182
184
  retry_attempts: options.retries,
183
185
  queue: options.queue,
184
- callback_url: options.callback
186
+ callback_url: options.callback,
187
+ script: options.script,
188
+ debounce: options.debounce != null ? formatDelay(options.debounce) : void 0,
189
+ debounce_key: options.debounceKey
185
190
  };
186
191
  }
187
192
  /** @internal */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runlater-js",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Delayed tasks, cron jobs, and reliable webhooks. No infrastructure required.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",