@upstash/qstash
Version:
Official Typescript client for QStash
36 lines (33 loc) • 680 B
JavaScript
import {
BaseProvider
} from "./chunk-QYBCXZKB.mjs";
// src/client/api/email.ts
var EmailProvider = class extends BaseProvider {
apiKind = "email";
batch;
method = "POST";
constructor(baseUrl, token, owner, batch) {
super(baseUrl, token, owner);
this.batch = batch;
}
getRoute() {
return this.batch ? ["emails", "batch"] : ["emails"];
}
getHeaders(_options) {
return {
authorization: `Bearer ${this.token}`
};
}
onFinish(providerInfo, _options) {
return providerInfo;
}
};
var resend = ({
token,
batch = false
}) => {
return new EmailProvider("https://api.resend.com", token, "resend", batch);
};
export {
resend
};