@upstash/qstash
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -181,7 +181,24 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
return _chunkEQTYEU4Ujs.__async.call(void 0, this, null, function* () { | ||
const headers = new Headers(req.headers); | ||
if (!headers.has("Content-Type")) { | ||
headers.set("Content-Type", "application/json"); | ||
} | ||
headers.set("Upstash-Cron", req.cron); | ||
if (typeof req.method !== "undefined") { | ||
headers.set("Upstash-Method", req.method); | ||
} | ||
if (typeof req.delay !== "undefined") { | ||
headers.set("Upstash-Delay", `${req.delay.toFixed()}s`); | ||
} | ||
if (typeof req.retries !== "undefined") { | ||
headers.set("Upstash-Retries", req.retries.toFixed()); | ||
} | ||
if (typeof req.callback !== "undefined") { | ||
headers.set("Upstash-Callback", req.callback); | ||
} | ||
return yield this.http.request({ | ||
method: "POST", | ||
headers: { "Content-Type": "application/json" }, | ||
path: ["v2", "schedules"], | ||
body: JSON.stringify(req) | ||
headers, | ||
path: ["v2", "schedules", req.destination], | ||
body: req.body | ||
}); | ||
@@ -188,0 +205,0 @@ }); |
@@ -297,5 +297,3 @@ /** | ||
/** | ||
* Optionally specify a cron expression to repeatedly send this message to the destination. | ||
* | ||
* @default undefined | ||
* Specify a cron expression to repeatedly send this message to the destination. | ||
*/ | ||
@@ -302,0 +300,0 @@ cron: string; |
@@ -181,7 +181,24 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
return _chunkEQTYEU4Ujs.__async.call(void 0, this, null, function* () { | ||
const headers = new Headers(req.headers); | ||
if (!headers.has("Content-Type")) { | ||
headers.set("Content-Type", "application/json"); | ||
} | ||
headers.set("Upstash-Cron", req.cron); | ||
if (typeof req.method !== "undefined") { | ||
headers.set("Upstash-Method", req.method); | ||
} | ||
if (typeof req.delay !== "undefined") { | ||
headers.set("Upstash-Delay", `${req.delay.toFixed()}s`); | ||
} | ||
if (typeof req.retries !== "undefined") { | ||
headers.set("Upstash-Retries", req.retries.toFixed()); | ||
} | ||
if (typeof req.callback !== "undefined") { | ||
headers.set("Upstash-Callback", req.callback); | ||
} | ||
return yield this.http.request({ | ||
method: "POST", | ||
headers: { "Content-Type": "application/json" }, | ||
path: ["v2", "schedules"], | ||
body: JSON.stringify(req) | ||
headers, | ||
path: ["v2", "schedules", req.destination], | ||
body: req.body | ||
}); | ||
@@ -188,0 +205,0 @@ }); |
{ | ||
"name": "@upstash/qstash", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Official Typescript client for QStash", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
162861
2193