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 +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/package.json +1 -1
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
|
-
/**
|
|
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
|
-
/**
|
|
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;
|