pushq 1.0.1 → 1.1.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/README.md CHANGED
@@ -24,7 +24,7 @@ await pq.upsertQueue("account-42", {
24
24
 
25
25
  await pq.createTask("account-42", {
26
26
  path: "/hooks/send-message", // resolved against the queue's baseUrl
27
- jsonBody: { userId: 1 },
27
+ jsonBody: { userId: 1 }, // any JSON.stringify-able value: class instances, toJSON(), Zod output
28
28
  delaySeconds: 3600, // or scheduleTime: new Date(...)
29
29
  taskId: "follow_up_abc", // optional: dedup (409 on collision)
30
30
  retry: { maxAttempts: 3 }, // per-task override of the queue config
package/dist/index.d.cts CHANGED
@@ -82,7 +82,12 @@ interface TaskCreate {
82
82
  headers?: Record<string, string>;
83
83
  /** Raw body bytes or string. Exclusive with jsonBody. POST/PUT/PATCH only. */
84
84
  body?: Uint8Array | string;
85
- /** Any JSON value, sent with Content-Type: application/json. */
85
+ /**
86
+ * Request body as JSON, sent with Content-Type: application/json. Any value
87
+ * JSON.stringify accepts: plain objects, class instances (own enumerable
88
+ * fields), objects with toJSON(), values parsed by Zod/Valibot, etc.
89
+ * Exclusive with body.
90
+ */
86
91
  jsonBody?: unknown;
87
92
  /** Exclusive with delaySeconds. */
88
93
  scheduleTime?: Date | string;
package/dist/index.d.ts CHANGED
@@ -82,7 +82,12 @@ interface TaskCreate {
82
82
  headers?: Record<string, string>;
83
83
  /** Raw body bytes or string. Exclusive with jsonBody. POST/PUT/PATCH only. */
84
84
  body?: Uint8Array | string;
85
- /** Any JSON value, sent with Content-Type: application/json. */
85
+ /**
86
+ * Request body as JSON, sent with Content-Type: application/json. Any value
87
+ * JSON.stringify accepts: plain objects, class instances (own enumerable
88
+ * fields), objects with toJSON(), values parsed by Zod/Valibot, etc.
89
+ * Exclusive with body.
90
+ */
86
91
  jsonBody?: unknown;
87
92
  /** Exclusive with delaySeconds. */
88
93
  scheduleTime?: Date | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushq",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Client for pushq — self-hosted HTTP push task queue (open-source Cloud Tasks alternative)",
5
5
  "license": "MIT",
6
6
  "repository": {