@upstash/qstash 2.8.0-canary → 2.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/README.md +19 -0
- package/{dist/chunk-XLCNEVA2.mjs → chunk-PWDZVKVD.mjs} +1 -1
- package/chunk-UJ7YXITX.mjs +35 -0
- package/{dist/chunk-KWSSCN6R.mjs → chunk-X3J2ACLT.mjs} +420 -556
- package/{dist/client-DkrYCqaq.d.ts → client-BQXugsxm.d.mts} +280 -54
- package/{dist/client-DkrYCqaq.d.mts → client-BQXugsxm.d.ts} +280 -54
- package/{dist/cloudflare.d.mts → cloudflare.d.mts} +6 -2
- package/{dist/cloudflare.d.ts → cloudflare.d.ts} +6 -2
- package/{dist/cloudflare.js → cloudflare.js} +408 -511
- package/{dist/cloudflare.mjs → cloudflare.mjs} +1 -1
- package/{dist/h3.d.mts → h3.d.mts} +6 -1
- package/{dist/h3.d.ts → h3.d.ts} +6 -1
- package/{dist/h3.js → h3.js} +424 -527
- package/h3.mjs +10 -0
- package/{dist/hono.d.mts → hono.d.mts} +6 -2
- package/{dist/hono.d.ts → hono.d.ts} +6 -2
- package/{dist/hono.js → hono.js} +408 -511
- package/{dist/hono.mjs → hono.mjs} +1 -1
- package/index.d.mts +92 -0
- package/index.d.ts +92 -0
- package/{dist/index.js → index.js} +437 -513
- package/{dist/index.mjs → index.mjs} +7 -2
- package/{dist/nextjs.d.mts → nextjs.d.mts} +16 -7
- package/{dist/nextjs.d.ts → nextjs.d.ts} +16 -7
- package/nextjs.js +3013 -0
- package/nextjs.mjs +177 -0
- package/{dist/nuxt.d.mts → nuxt.d.mts} +3 -1
- package/{dist/nuxt.d.ts → nuxt.d.ts} +3 -1
- package/{dist/nuxt.js → nuxt.js} +35 -393
- package/{dist/nuxt.mjs → nuxt.mjs} +3 -3
- package/package.json +1 -1
- package/{dist/solidjs.d.mts → solidjs.d.mts} +6 -2
- package/{dist/solidjs.d.ts → solidjs.d.ts} +6 -2
- package/{dist/solidjs.js → solidjs.js} +408 -511
- package/{dist/solidjs.mjs → solidjs.mjs} +2 -2
- package/{dist/svelte.d.mts → svelte.d.mts} +6 -2
- package/{dist/svelte.d.ts → svelte.d.ts} +6 -2
- package/{dist/svelte.js → svelte.js} +408 -511
- package/{dist/svelte.mjs → svelte.mjs} +2 -2
- package/workflow.d.mts +2 -0
- package/workflow.d.ts +2 -0
- package/{dist/workflow.js → workflow.js} +408 -511
- package/{dist/workflow.mjs → workflow.mjs} +1 -1
- package/dist/chunk-CIVGPRQN.mjs +0 -0
- package/dist/h3.mjs +0 -10
- package/dist/index.d.mts +0 -67
- package/dist/index.d.ts +0 -67
- package/dist/nextjs.js +0 -4742
- package/dist/nextjs.mjs +0 -1802
- package/dist/workflow.d.mts +0 -2
- package/dist/workflow.d.ts +0 -2
package/README.md
CHANGED
|
@@ -131,6 +131,25 @@ const result = await client.publishJSON({
|
|
|
131
131
|
|
|
132
132
|
See [the documentation](https://docs.upstash.com/qstash) for details.
|
|
133
133
|
|
|
134
|
+
## Telemetry
|
|
135
|
+
|
|
136
|
+
This sdk sends anonymous telemetry headers to help us improve your experience.
|
|
137
|
+
We collect the following:
|
|
138
|
+
|
|
139
|
+
- SDK version
|
|
140
|
+
- Platform (Cloudflare, AWS or Vercel)
|
|
141
|
+
- Runtime version (node@18.x)
|
|
142
|
+
|
|
143
|
+
You can opt out by setting the `UPSTASH_DISABLE_TELEMETRY` environment variable
|
|
144
|
+
to any truthy value. Or setting `enableTelemetry: false` in the client options.
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
const client = new Client({
|
|
148
|
+
token: "<QSTASH_TOKEN>",
|
|
149
|
+
enableTelemetry: false,
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
134
153
|
## Contributing
|
|
135
154
|
|
|
136
155
|
### Setup
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseProvider
|
|
3
|
+
} from "./chunk-X3J2ACLT.mjs";
|
|
4
|
+
|
|
5
|
+
// src/client/api/email.ts
|
|
6
|
+
var EmailProvider = class extends BaseProvider {
|
|
7
|
+
apiKind = "email";
|
|
8
|
+
batch;
|
|
9
|
+
method = "POST";
|
|
10
|
+
constructor(baseUrl, token, owner, batch) {
|
|
11
|
+
super(baseUrl, token, owner);
|
|
12
|
+
this.batch = batch;
|
|
13
|
+
}
|
|
14
|
+
getRoute() {
|
|
15
|
+
return this.batch ? ["emails", "batch"] : ["emails"];
|
|
16
|
+
}
|
|
17
|
+
getHeaders(_options) {
|
|
18
|
+
return {
|
|
19
|
+
authorization: `Bearer ${this.token}`
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
onFinish(providerInfo, _options) {
|
|
23
|
+
return providerInfo;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var resend = ({
|
|
27
|
+
token,
|
|
28
|
+
batch = false
|
|
29
|
+
}) => {
|
|
30
|
+
return new EmailProvider("https://api.resend.com", token, "resend", batch);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
resend
|
|
35
|
+
};
|