@mailwurf/e2e 0.0.0 → 0.2.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 +20 -34
- package/dist/client.d.ts +34 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +197 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +74 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +48 -7
package/README.md
CHANGED
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
# @mailwurf/e2e
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`fetch` client for the tenant-scoped Mailwurf API at `/v1`. No Playwright dependency. The app keeps its real mail sender; tests only set the recipient.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Public on [npm](https://www.npmjs.com/package/@mailwurf/e2e).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mailwurf/e2e
|
|
9
|
+
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
```ts
|
|
12
|
+
import { createMailwurf } from "@mailwurf/e2e";
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
14
|
+
const mailwurf = createMailwurf(process.env.MAILWURF_API_KEY!); // https://api.mailwurf.io
|
|
15
|
+
const inbox = await mailwurf.createInbox();
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
await page.fill("[name=email]", inbox.address);
|
|
18
|
+
await page.click("text=Sign up");
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
const mail = await inbox.waitFor({ subject: "Confirm", timeout: 15_000 });
|
|
21
|
+
await page.goto(mail.links[0]!);
|
|
22
|
+
// mail.otp → "482193"
|
|
23
|
+
```
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
The first argument is the organization key (`mw_live_…`) and is required; `createMailwurf()` throws when it is empty. The package reads no environment variables. It talks to `https://api.mailwurf.io`; pass `apiUrl` only for a self-hosted Mailwurf. A bare host is treated as `https://`:
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
```ts
|
|
28
|
+
createMailwurf("mw_live_…", { apiUrl: "mailwurf.example.com" });
|
|
29
|
+
```
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
2. Configure the trusted publisher (e.g., GitHub Actions)
|
|
26
|
-
3. Specify the repository and workflow that should be allowed to publish
|
|
27
|
-
4. Use the configured workflow to publish your actual package
|
|
28
|
-
|
|
29
|
-
## DO NOT USE THIS PACKAGE
|
|
30
|
-
|
|
31
|
-
This package is a placeholder for OIDC configuration only. It:
|
|
32
|
-
- Contains no executable code
|
|
33
|
-
- Provides no functionality
|
|
34
|
-
- Should not be installed as a dependency
|
|
35
|
-
- Exists only for administrative purposes
|
|
36
|
-
|
|
37
|
-
## More Information
|
|
38
|
-
|
|
39
|
-
For more details about npm's trusted publishing feature, see:
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
**Maintained for OIDC setup purposes only**
|
|
31
|
+
`subject` is a case-insensitive substring. `timeout` is milliseconds.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CreateInboxInput, Inbox, ListMessagesOptions, MailwurfOptions, Message, SendMessageInput, SentMessage, WaitForOptions } from "./types.js";
|
|
2
|
+
export declare const DEFAULT_API_URL = "https://api.mailwurf.io";
|
|
3
|
+
export declare class Mailwurf {
|
|
4
|
+
#private;
|
|
5
|
+
readonly apiUrl: string;
|
|
6
|
+
constructor(apiKey: string, options?: MailwurfOptions);
|
|
7
|
+
health(): Promise<void>;
|
|
8
|
+
createInbox(input?: CreateInboxInput): Promise<MailwurfInbox>;
|
|
9
|
+
getInbox(id: string): Promise<MailwurfInbox>;
|
|
10
|
+
inboxByAddress(address: string): Promise<MailwurfInbox>;
|
|
11
|
+
getMessage(id: string): Promise<Message>;
|
|
12
|
+
listMessages(inboxId: string, options?: ListMessagesOptions): Promise<Message[]>;
|
|
13
|
+
waitFor(inboxId: string, options?: WaitForOptions): Promise<Message>;
|
|
14
|
+
send(inboxId: string, input: SendMessageInput): Promise<SentMessage>;
|
|
15
|
+
deleteInbox(id: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class MailwurfInbox implements Inbox {
|
|
18
|
+
#private;
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly address: string;
|
|
21
|
+
readonly createdAt: Date;
|
|
22
|
+
readonly expiresAt: Date | null;
|
|
23
|
+
constructor(client: Mailwurf, inbox: Inbox);
|
|
24
|
+
waitFor(options?: WaitForOptions): Promise<Message>;
|
|
25
|
+
send(input: SendMessageInput): Promise<SentMessage>;
|
|
26
|
+
messages(options?: ListMessagesOptions): Promise<Message[]>;
|
|
27
|
+
delete(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `apiKey` is the organization key (`mw_live_…`) and is required.
|
|
31
|
+
* `apiUrl` is only needed for a self-hosted Mailwurf.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createMailwurf(apiKey: string, options?: MailwurfOptions): Mailwurf;
|
|
34
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,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AAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAInD,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAInD,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAI3D,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAGxB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,QAAQ,CAEtF"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { MailwurfError, MailwurfTimeoutError } from "./errors.js";
|
|
2
|
+
export const DEFAULT_API_URL = "https://api.mailwurf.io";
|
|
3
|
+
/** Accepts `mailwurf.example.com` as well as `https://mailwurf.example.com/`. */
|
|
4
|
+
function normalizeApiUrl(url) {
|
|
5
|
+
const trimmed = url.trim().replace(/\/+$/, "");
|
|
6
|
+
return /^https?:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
|
|
7
|
+
}
|
|
8
|
+
function requireApiKey(apiKey) {
|
|
9
|
+
if (typeof apiKey !== "string" || apiKey.trim().length === 0) {
|
|
10
|
+
throw new TypeError("Mailwurf: apiKey is required. Pass the organization key (mw_live_…) from the dashboard.");
|
|
11
|
+
}
|
|
12
|
+
return apiKey;
|
|
13
|
+
}
|
|
14
|
+
function asInbox(raw) {
|
|
15
|
+
return {
|
|
16
|
+
id: raw.id,
|
|
17
|
+
address: raw.address,
|
|
18
|
+
createdAt: new Date(raw.created_at),
|
|
19
|
+
expiresAt: raw.expires_at ? new Date(raw.expires_at) : null,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function asMessage(raw) {
|
|
23
|
+
return {
|
|
24
|
+
id: raw.id,
|
|
25
|
+
inboxId: raw.inbox_id,
|
|
26
|
+
from: raw.from,
|
|
27
|
+
to: raw.to,
|
|
28
|
+
subject: raw.subject,
|
|
29
|
+
text: raw.text,
|
|
30
|
+
html: raw.html,
|
|
31
|
+
links: raw.links ?? [],
|
|
32
|
+
otp: raw.otp,
|
|
33
|
+
receivedAt: new Date(raw.received_at),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function query(params) {
|
|
37
|
+
const q = new URLSearchParams();
|
|
38
|
+
for (const [key, value] of Object.entries(params)) {
|
|
39
|
+
if (value === undefined || value === "") {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
q.set(key, String(value));
|
|
43
|
+
}
|
|
44
|
+
const s = q.toString();
|
|
45
|
+
return s ? `?${s}` : "";
|
|
46
|
+
}
|
|
47
|
+
export class Mailwurf {
|
|
48
|
+
apiUrl;
|
|
49
|
+
#fetch;
|
|
50
|
+
#apiKey;
|
|
51
|
+
constructor(apiKey, options = {}) {
|
|
52
|
+
this.#apiKey = requireApiKey(apiKey);
|
|
53
|
+
this.apiUrl = normalizeApiUrl(options.apiUrl ?? DEFAULT_API_URL);
|
|
54
|
+
this.#fetch = options.fetch ?? fetch;
|
|
55
|
+
}
|
|
56
|
+
#headers(extra) {
|
|
57
|
+
const headers = new Headers(extra);
|
|
58
|
+
headers.set("authorization", `Bearer ${this.#apiKey}`);
|
|
59
|
+
return headers;
|
|
60
|
+
}
|
|
61
|
+
async health() {
|
|
62
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/health`);
|
|
63
|
+
await this.#read(res);
|
|
64
|
+
}
|
|
65
|
+
async createInbox(input = {}) {
|
|
66
|
+
const init = { method: "POST", headers: this.#headers() };
|
|
67
|
+
if (input.address) {
|
|
68
|
+
init.headers = this.#headers({ "content-type": "application/json" });
|
|
69
|
+
init.body = JSON.stringify({ address: input.address });
|
|
70
|
+
}
|
|
71
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes`, init);
|
|
72
|
+
const raw = await this.#read(res);
|
|
73
|
+
return this.#wrap(asInbox(raw));
|
|
74
|
+
}
|
|
75
|
+
async getInbox(id) {
|
|
76
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes/${encodeURIComponent(id)}`, {
|
|
77
|
+
headers: this.#headers(),
|
|
78
|
+
});
|
|
79
|
+
const raw = await this.#read(res);
|
|
80
|
+
return this.#wrap(asInbox(raw));
|
|
81
|
+
}
|
|
82
|
+
async inboxByAddress(address) {
|
|
83
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes${query({ address })}`, {
|
|
84
|
+
headers: this.#headers(),
|
|
85
|
+
});
|
|
86
|
+
const raw = await this.#read(res);
|
|
87
|
+
return this.#wrap(asInbox(raw));
|
|
88
|
+
}
|
|
89
|
+
async getMessage(id) {
|
|
90
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/messages/${encodeURIComponent(id)}`, {
|
|
91
|
+
headers: this.#headers(),
|
|
92
|
+
});
|
|
93
|
+
const raw = await this.#read(res);
|
|
94
|
+
return asMessage(raw);
|
|
95
|
+
}
|
|
96
|
+
async listMessages(inboxId, options = {}) {
|
|
97
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes/${encodeURIComponent(inboxId)}/messages${query(options)}`, { headers: this.#headers() });
|
|
98
|
+
const raw = await this.#read(res);
|
|
99
|
+
return (raw.messages ?? []).map(asMessage);
|
|
100
|
+
}
|
|
101
|
+
async waitFor(inboxId, options = {}) {
|
|
102
|
+
const timeout = options.timeout ?? 15_000;
|
|
103
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes/${encodeURIComponent(inboxId)}/messages/wait${query({
|
|
104
|
+
subject: options.subject,
|
|
105
|
+
after: options.after,
|
|
106
|
+
timeout,
|
|
107
|
+
})}`, { headers: this.#headers(), signal: options.signal });
|
|
108
|
+
if (res.status === 408) {
|
|
109
|
+
throw new MailwurfTimeoutError();
|
|
110
|
+
}
|
|
111
|
+
const raw = await this.#read(res);
|
|
112
|
+
return asMessage(raw);
|
|
113
|
+
}
|
|
114
|
+
async send(inboxId, input) {
|
|
115
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes/${encodeURIComponent(inboxId)}/messages`, {
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers: this.#headers({ "content-type": "application/json" }),
|
|
118
|
+
body: JSON.stringify({
|
|
119
|
+
to: input.to,
|
|
120
|
+
subject: input.subject,
|
|
121
|
+
text: input.text ?? "",
|
|
122
|
+
...(input.html ? { html: input.html } : {}),
|
|
123
|
+
...(input.inReplyTo ? { in_reply_to: input.inReplyTo } : {}),
|
|
124
|
+
}),
|
|
125
|
+
});
|
|
126
|
+
return this.#read(res);
|
|
127
|
+
}
|
|
128
|
+
async deleteInbox(id) {
|
|
129
|
+
const res = await this.#fetch(`${this.apiUrl}/v1/inboxes/${encodeURIComponent(id)}`, {
|
|
130
|
+
method: "DELETE",
|
|
131
|
+
headers: this.#headers(),
|
|
132
|
+
});
|
|
133
|
+
if (res.status === 204) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
await this.#read(res);
|
|
137
|
+
}
|
|
138
|
+
#wrap(inbox) {
|
|
139
|
+
return new MailwurfInbox(this, inbox);
|
|
140
|
+
}
|
|
141
|
+
async #read(res) {
|
|
142
|
+
const text = await res.text();
|
|
143
|
+
let body;
|
|
144
|
+
if (text.length > 0) {
|
|
145
|
+
try {
|
|
146
|
+
body = JSON.parse(text);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
body = text;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (!res.ok) {
|
|
153
|
+
const message = body && typeof body === "object" && "error" in body && typeof body.error === "string"
|
|
154
|
+
? body.error
|
|
155
|
+
: res.statusText || `HTTP ${res.status}`;
|
|
156
|
+
if (res.status === 408) {
|
|
157
|
+
throw new MailwurfTimeoutError(message);
|
|
158
|
+
}
|
|
159
|
+
throw new MailwurfError(res.status, message);
|
|
160
|
+
}
|
|
161
|
+
return body;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export class MailwurfInbox {
|
|
165
|
+
id;
|
|
166
|
+
address;
|
|
167
|
+
createdAt;
|
|
168
|
+
expiresAt;
|
|
169
|
+
#client;
|
|
170
|
+
constructor(client, inbox) {
|
|
171
|
+
this.#client = client;
|
|
172
|
+
this.id = inbox.id;
|
|
173
|
+
this.address = inbox.address;
|
|
174
|
+
this.createdAt = inbox.createdAt;
|
|
175
|
+
this.expiresAt = inbox.expiresAt;
|
|
176
|
+
}
|
|
177
|
+
waitFor(options) {
|
|
178
|
+
return this.#client.waitFor(this.id, options);
|
|
179
|
+
}
|
|
180
|
+
send(input) {
|
|
181
|
+
return this.#client.send(this.id, input);
|
|
182
|
+
}
|
|
183
|
+
messages(options) {
|
|
184
|
+
return this.#client.listMessages(this.id, options);
|
|
185
|
+
}
|
|
186
|
+
delete() {
|
|
187
|
+
return this.#client.deleteInbox(this.id);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* `apiKey` is the organization key (`mw_live_…`) and is required.
|
|
192
|
+
* `apiUrl` is only needed for a self-hosted Mailwurf.
|
|
193
|
+
*/
|
|
194
|
+
export function createMailwurf(apiKey, options = {}) {
|
|
195
|
+
return new Mailwurf(apiKey, options);
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAclE,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAEzD,iFAAiF;AACjF,SAAS,eAAe,CAAC,GAAW;IAClC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,OAAO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ChB,SAAS,CAAO;IAChB,SAAS,CAAc;IACvB,OAAO,CAAW;IAE3B,YAAY,MAAgB,EAAE,KAAY;QACxC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,OAAwB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,CAAC,KAAuB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,QAAQ,CAAC,OAA6B;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,UAA2B,EAAE;IAC1E,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class MailwurfError extends Error {
|
|
2
|
+
readonly status: number;
|
|
3
|
+
constructor(status: number, message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class MailwurfTimeoutError extends MailwurfError {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK5C;AAED,qBAAa,oBAAqB,SAAQ,aAAa;gBACzC,OAAO,SAAY;CAIhC"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class MailwurfError extends Error {
|
|
2
|
+
status;
|
|
3
|
+
constructor(status, message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "MailwurfError";
|
|
6
|
+
this.status = status;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class MailwurfTimeoutError extends MailwurfError {
|
|
10
|
+
constructor(message = "timeout") {
|
|
11
|
+
super(408, message);
|
|
12
|
+
this.name = "MailwurfTimeoutError";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,MAAM,CAAS;IAExB,YAAY,MAAc,EAAE,OAAe;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,YAAY,OAAO,GAAG,SAAS;QAC7B,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createMailwurf, DEFAULT_API_URL, Mailwurf, MailwurfInbox } from "./client.js";
|
|
2
|
+
export { MailwurfError, MailwurfTimeoutError } from "./errors.js";
|
|
3
|
+
export type { CreateInboxInput, Inbox, ListMessagesOptions, MailwurfOptions, Message, SendMessageInput, SentMessage, WaitForOptions, } from "./types.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type MailwurfOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* Origin of a self-hosted Mailwurf API. Calls are made under `/v1`.
|
|
4
|
+
* Defaults to `https://api.mailwurf.io`.
|
|
5
|
+
* A bare host such as `mailwurf.example.com` is treated as `https://`.
|
|
6
|
+
*/
|
|
7
|
+
apiUrl?: string;
|
|
8
|
+
/** Injected in tests. Defaults to global `fetch`. */
|
|
9
|
+
fetch?: typeof fetch;
|
|
10
|
+
};
|
|
11
|
+
export type CreateInboxInput = {
|
|
12
|
+
address?: string;
|
|
13
|
+
};
|
|
14
|
+
export type WaitForOptions = {
|
|
15
|
+
/** Case-insensitive substring matched against the subject (server-side). */
|
|
16
|
+
subject?: string;
|
|
17
|
+
/** Milliseconds to block. Default 15000. `0` is a single lookup. */
|
|
18
|
+
timeout?: number;
|
|
19
|
+
/** Skip messages up to and including this id. */
|
|
20
|
+
after?: string;
|
|
21
|
+
signal?: AbortSignal;
|
|
22
|
+
};
|
|
23
|
+
export type ListMessagesOptions = {
|
|
24
|
+
subject?: string;
|
|
25
|
+
after?: string;
|
|
26
|
+
};
|
|
27
|
+
export type SendMessageInput = {
|
|
28
|
+
to: string;
|
|
29
|
+
subject: string;
|
|
30
|
+
text?: string;
|
|
31
|
+
html?: string;
|
|
32
|
+
inReplyTo?: string;
|
|
33
|
+
};
|
|
34
|
+
export type SentMessage = {
|
|
35
|
+
id: string;
|
|
36
|
+
status: string;
|
|
37
|
+
};
|
|
38
|
+
export type Inbox = {
|
|
39
|
+
id: string;
|
|
40
|
+
address: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
expiresAt: Date | null;
|
|
43
|
+
};
|
|
44
|
+
export type Message = {
|
|
45
|
+
id: string;
|
|
46
|
+
inboxId: string;
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
subject: string;
|
|
50
|
+
text: string;
|
|
51
|
+
html: string;
|
|
52
|
+
links: string[];
|
|
53
|
+
otp: string;
|
|
54
|
+
receivedAt: Date;
|
|
55
|
+
};
|
|
56
|
+
export type RawInbox = {
|
|
57
|
+
id: string;
|
|
58
|
+
address: string;
|
|
59
|
+
created_at: string;
|
|
60
|
+
expires_at: string | null;
|
|
61
|
+
};
|
|
62
|
+
export type RawMessage = {
|
|
63
|
+
id: string;
|
|
64
|
+
inbox_id: string;
|
|
65
|
+
from: string;
|
|
66
|
+
to: string;
|
|
67
|
+
subject: string;
|
|
68
|
+
text: string;
|
|
69
|
+
html: string;
|
|
70
|
+
links: string[] | null;
|
|
71
|
+
otp: string;
|
|
72
|
+
received_at: string;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,10 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwurf/e2e",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Fetch client for the Mailwurf wait API",
|
|
5
6
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
"e2e",
|
|
8
|
+
"email",
|
|
9
|
+
"inbox",
|
|
10
|
+
"mailwurf",
|
|
11
|
+
"playwright",
|
|
12
|
+
"testing"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/wemogy/mailwurf",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/wemogy/mailwurf/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/wemogy/mailwurf.git",
|
|
22
|
+
"directory": "src/frontend/packages/client"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^24.0.0",
|
|
39
|
+
"typescript": "^5.9.2",
|
|
40
|
+
"vitest": "^3.2.6",
|
|
41
|
+
"@mailwurf/config": "0.0.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -p tsconfig.build.json",
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"test": "vitest run"
|
|
50
|
+
}
|
|
51
|
+
}
|