runlater-js 0.7.0 → 0.8.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
@@ -225,6 +225,7 @@ interface Endpoint {
225
225
  inbound_url: string;
226
226
  forward_urls: string[];
227
227
  enabled: boolean;
228
+ paused: boolean;
228
229
  retry_attempts: number;
229
230
  use_queue: boolean;
230
231
  notify_on_failure: boolean | null;
@@ -417,6 +418,8 @@ declare class Endpoints {
417
418
  delete(id: string): Promise<void>;
418
419
  events(id: string, limit?: number): Promise<InboundEvent[]>;
419
420
  replay(endpointId: string, eventId: string): Promise<void>;
421
+ pause(id: string): Promise<Endpoint>;
422
+ resume(id: string): Promise<Endpoint>;
420
423
  }
421
424
 
422
425
  export { type BatchOptions, type BatchResponse, type CancelQueueResponse, type CreateEndpointOptions, type CreateMonitorOptions, type CronOptions, type CronResponse, type DelayOptions, type Endpoint, type Execution, type InboundEvent, type ListOptions, type ListResponse, type Monitor, type Ping, type PingResponse, Runlater, RunlaterError, type RunlaterOptions, type ScheduleOptions, type SendOptions, type SyncOptions, type SyncResponse, type Task, type TaskResponse, type TriggerResponse, type UpdateEndpointOptions, type UpdateMonitorOptions, type UpdateTaskOptions };
package/dist/index.d.ts CHANGED
@@ -225,6 +225,7 @@ interface Endpoint {
225
225
  inbound_url: string;
226
226
  forward_urls: string[];
227
227
  enabled: boolean;
228
+ paused: boolean;
228
229
  retry_attempts: number;
229
230
  use_queue: boolean;
230
231
  notify_on_failure: boolean | null;
@@ -417,6 +418,8 @@ declare class Endpoints {
417
418
  delete(id: string): Promise<void>;
418
419
  events(id: string, limit?: number): Promise<InboundEvent[]>;
419
420
  replay(endpointId: string, eventId: string): Promise<void>;
421
+ pause(id: string): Promise<Endpoint>;
422
+ resume(id: string): Promise<Endpoint>;
420
423
  }
421
424
 
422
425
  export { type BatchOptions, type BatchResponse, type CancelQueueResponse, type CreateEndpointOptions, type CreateMonitorOptions, type CronOptions, type CronResponse, type DelayOptions, type Endpoint, type Execution, type InboundEvent, type ListOptions, type ListResponse, type Monitor, type Ping, type PingResponse, Runlater, RunlaterError, type RunlaterOptions, type ScheduleOptions, type SendOptions, type SyncOptions, type SyncResponse, type Task, type TaskResponse, type TriggerResponse, type UpdateEndpointOptions, type UpdateMonitorOptions, type UpdateTaskOptions };
package/dist/index.js CHANGED
@@ -429,6 +429,14 @@ var Endpoints = class {
429
429
  async replay(endpointId, eventId) {
430
430
  await this.client.request("POST", `/endpoints/${endpointId}/events/${eventId}/replay`);
431
431
  }
432
+ async pause(id) {
433
+ const res = await this.client.request("POST", `/endpoints/${id}/pause`);
434
+ return res.data;
435
+ }
436
+ async resume(id) {
437
+ const res = await this.client.request("POST", `/endpoints/${id}/resume`);
438
+ return res.data;
439
+ }
432
440
  };
433
441
  function formatDelay(delay) {
434
442
  if (typeof delay === "number") return `${delay}s`;
package/dist/index.mjs CHANGED
@@ -402,6 +402,14 @@ var Endpoints = class {
402
402
  async replay(endpointId, eventId) {
403
403
  await this.client.request("POST", `/endpoints/${endpointId}/events/${eventId}/replay`);
404
404
  }
405
+ async pause(id) {
406
+ const res = await this.client.request("POST", `/endpoints/${id}/pause`);
407
+ return res.data;
408
+ }
409
+ async resume(id) {
410
+ const res = await this.client.request("POST", `/endpoints/${id}/resume`);
411
+ return res.data;
412
+ }
405
413
  };
406
414
  function formatDelay(delay) {
407
415
  if (typeof delay === "number") return `${delay}s`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runlater-js",
3
- "version": "0.7.0",
3
+ "version": "0.8.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",