@owlrelay/api-sdk 0.0.2 → 0.0.3
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 +27 -4
- package/dist/index.d.mts +62 -56
- package/dist/index.mjs +70 -80
- package/package.json +24 -30
- package/dist/index.cjs +0 -92
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -62
- package/dist/index.d.ts +0 -62
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ Create a new email address that will forward emails to a webhook.
|
|
|
41
41
|
```ts
|
|
42
42
|
const createdEmail = await client.createEmail({
|
|
43
43
|
// The username of the email address.
|
|
44
|
-
username: 'john.doe',
|
|
45
|
-
|
|
44
|
+
username: 'john.doe',
|
|
45
|
+
|
|
46
46
|
// The domain of the email address.
|
|
47
47
|
// optional, defaults to 'callback.email'
|
|
48
48
|
domain: 'callback.email',
|
|
@@ -88,9 +88,32 @@ Get all processings for an email address.
|
|
|
88
88
|
const processings = await client.getEmailProcessings({ emailId: '...' });
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
### updateEmail
|
|
92
|
+
|
|
93
|
+
Update an email address. The first argument identifies the email (by id, by full address, or by username + domain). The second argument holds the fields to update — any field you omit is left unchanged.
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
const updatedEmail = await client.updateEmail(
|
|
97
|
+
// Identifier (pick one shape):
|
|
98
|
+
{ emailId: '...' },
|
|
99
|
+
// { emailAddress: 'john.doe@callback.email' },
|
|
100
|
+
// { username: 'john.doe', domain: 'callback.email' },
|
|
101
|
+
|
|
102
|
+
// Update fields (all optional):
|
|
103
|
+
{
|
|
104
|
+
username: 'john.doe',
|
|
105
|
+
domain: 'callback.email',
|
|
106
|
+
webhookUrl: 'https://my-app.invalid/new-webhook',
|
|
107
|
+
webhookSecret: 'my-new-webhook-secret',
|
|
108
|
+
allowedOrigins: ['foo@bar.com'],
|
|
109
|
+
isEnabled: true,
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
```
|
|
113
|
+
|
|
91
114
|
### disableEmail
|
|
92
115
|
|
|
93
|
-
Disable an email address. This will stop the email address from forwarding emails to your webhook.
|
|
116
|
+
Disable an email address. This will stop the email address from forwarding emails to your webhook. Accepts the same identifier shapes as `updateEmail`.
|
|
94
117
|
|
|
95
118
|
```ts
|
|
96
119
|
const disabledEmail = await client.disableEmail({ emailId: '...' });
|
|
@@ -98,7 +121,7 @@ const disabledEmail = await client.disableEmail({ emailId: '...' });
|
|
|
98
121
|
|
|
99
122
|
### enableEmail
|
|
100
123
|
|
|
101
|
-
Enable an email address.
|
|
124
|
+
Enable an email address. Accepts the same identifier shapes as `updateEmail`.
|
|
102
125
|
|
|
103
126
|
```ts
|
|
104
127
|
const enabledEmail = await client.enableEmail({ emailId: '...' });
|
package/dist/index.d.mts
CHANGED
|
@@ -1,62 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/api.types.d.ts
|
|
2
2
|
type OwlRelayEmail = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
domain: string;
|
|
5
|
+
username: string;
|
|
6
|
+
webhookUrl: string;
|
|
7
|
+
webhookSecret: string;
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
allowedOrigins: string[];
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
12
|
};
|
|
13
|
+
type OwlRelayEmailIdentifier = {
|
|
14
|
+
emailId: string;
|
|
15
|
+
} | {
|
|
16
|
+
emailAddress: string;
|
|
17
|
+
} | {
|
|
18
|
+
username: string;
|
|
19
|
+
domain: string;
|
|
20
|
+
};
|
|
21
|
+
type OwlRelayEmailUpdate = Partial<Omit<OwlRelayEmail, 'id' | 'createdAt' | 'updatedAt'>>;
|
|
13
22
|
type OwlRelayEmailProcessing = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
id: string;
|
|
24
|
+
emailId: string;
|
|
25
|
+
status: string;
|
|
26
|
+
error?: string;
|
|
27
|
+
fromAddress: string;
|
|
28
|
+
subject: string;
|
|
29
|
+
webhookUrl?: string;
|
|
30
|
+
webhookResponseStatusCode?: number;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
24
33
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/index.d.ts
|
|
36
|
+
declare const OWLRELAY_API_BASE_URL = "https://api.owlrelay.email";
|
|
37
|
+
declare function createClient({
|
|
38
|
+
apiKey,
|
|
39
|
+
baseApiUrl
|
|
40
|
+
}: {
|
|
41
|
+
apiKey: string;
|
|
42
|
+
baseApiUrl?: string;
|
|
28
43
|
}): {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
username: string;
|
|
52
|
-
domain: string;
|
|
53
|
-
}) => Promise<void>;
|
|
54
|
-
getEmail: ({ emailId }: {
|
|
55
|
-
emailId: string;
|
|
56
|
-
}) => Promise<OwlRelayEmail>;
|
|
57
|
-
getEmailProcessings: ({ emailId }: {
|
|
58
|
-
emailId: string;
|
|
59
|
-
}) => Promise<OwlRelayEmailProcessing[]>;
|
|
44
|
+
updateEmail: (identifier: OwlRelayEmailIdentifier, update: OwlRelayEmailUpdate) => Promise<OwlRelayEmail>;
|
|
45
|
+
enableEmail: (identifier: OwlRelayEmailIdentifier) => Promise<OwlRelayEmail>;
|
|
46
|
+
disableEmail: (identifier: OwlRelayEmailIdentifier) => Promise<OwlRelayEmail>;
|
|
47
|
+
getEmails: () => Promise<OwlRelayEmail[]>;
|
|
48
|
+
createEmail: (body: {
|
|
49
|
+
domain?: string;
|
|
50
|
+
username: string;
|
|
51
|
+
webhookUrl: string;
|
|
52
|
+
webhookSecret?: string;
|
|
53
|
+
allowedOrigins?: string[];
|
|
54
|
+
}) => Promise<OwlRelayEmail>;
|
|
55
|
+
deleteEmail: (identifier: OwlRelayEmailIdentifier) => Promise<void>;
|
|
56
|
+
getEmail: ({
|
|
57
|
+
emailId
|
|
58
|
+
}: {
|
|
59
|
+
emailId: string;
|
|
60
|
+
}) => Promise<OwlRelayEmail>;
|
|
61
|
+
getEmailProcessings: ({
|
|
62
|
+
emailId
|
|
63
|
+
}: {
|
|
64
|
+
emailId: string;
|
|
65
|
+
}) => Promise<OwlRelayEmailProcessing[]>;
|
|
60
66
|
};
|
|
61
|
-
|
|
62
|
-
export { OWLRELAY_API_BASE_URL,
|
|
67
|
+
//#endregion
|
|
68
|
+
export { OWLRELAY_API_BASE_URL, createClient };
|
package/dist/index.mjs
CHANGED
|
@@ -1,89 +1,79 @@
|
|
|
1
|
-
import { ofetch } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ofetch } from "ofetch";
|
|
2
|
+
//#region package.json
|
|
3
|
+
var version = "0.0.3";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/api.ts
|
|
5
6
|
function createApiClient({ apiKey, baseApiUrl }) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
apiClient
|
|
15
|
-
};
|
|
7
|
+
return { apiClient: ofetch.create({
|
|
8
|
+
headers: {
|
|
9
|
+
Authorization: `Bearer ${apiKey}`,
|
|
10
|
+
"X-OwlRelay-Source": `owlrelay-api-sdk-javascript/${version}`
|
|
11
|
+
},
|
|
12
|
+
baseURL: baseApiUrl
|
|
13
|
+
}) };
|
|
16
14
|
}
|
|
17
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/api.models.ts
|
|
18
17
|
function coerceDate(obj) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
return {
|
|
19
|
+
...obj,
|
|
20
|
+
createdAt: new Date(obj.createdAt),
|
|
21
|
+
updatedAt: new Date(obj.updatedAt)
|
|
22
|
+
};
|
|
24
23
|
}
|
|
25
24
|
function getEmailIdentifier(args) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if ("emailAddress" in args) {
|
|
30
|
-
return { emailIdentifier: args.emailAddress };
|
|
31
|
-
}
|
|
32
|
-
return { emailIdentifier: `${args.username}@${args.domain}` };
|
|
25
|
+
if ("emailId" in args) return { emailIdentifier: args.emailId };
|
|
26
|
+
if ("emailAddress" in args) return { emailIdentifier: args.emailAddress };
|
|
27
|
+
return { emailIdentifier: `${args.username}@${args.domain}` };
|
|
33
28
|
}
|
|
34
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/index.ts
|
|
35
31
|
const OWLRELAY_API_BASE_URL = "https://api.owlrelay.email";
|
|
36
|
-
function createClient({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
method: "GET"
|
|
82
|
-
});
|
|
83
|
-
return processings.map(coerceDate);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
32
|
+
function createClient({ apiKey, baseApiUrl = OWLRELAY_API_BASE_URL }) {
|
|
33
|
+
const { apiClient } = createApiClient({
|
|
34
|
+
apiKey,
|
|
35
|
+
baseApiUrl
|
|
36
|
+
});
|
|
37
|
+
const updateEmail = async (identifier, update) => {
|
|
38
|
+
const { emailIdentifier } = getEmailIdentifier(identifier);
|
|
39
|
+
const { emailCallback } = await apiClient(`/api/email-callbacks/${emailIdentifier}`, {
|
|
40
|
+
method: "PUT",
|
|
41
|
+
body: update
|
|
42
|
+
});
|
|
43
|
+
return coerceDate(emailCallback);
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
updateEmail,
|
|
47
|
+
enableEmail: async (identifier) => {
|
|
48
|
+
return updateEmail(identifier, { isEnabled: true });
|
|
49
|
+
},
|
|
50
|
+
disableEmail: async (identifier) => {
|
|
51
|
+
return updateEmail(identifier, { isEnabled: false });
|
|
52
|
+
},
|
|
53
|
+
getEmails: async () => {
|
|
54
|
+
const { emailCallbacks } = await apiClient("/api/email-callbacks", { method: "GET" });
|
|
55
|
+
return emailCallbacks.map(coerceDate);
|
|
56
|
+
},
|
|
57
|
+
createEmail: async (body) => {
|
|
58
|
+
const { emailCallback } = await apiClient("/api/email-callbacks", {
|
|
59
|
+
method: "POST",
|
|
60
|
+
body
|
|
61
|
+
});
|
|
62
|
+
return coerceDate(emailCallback);
|
|
63
|
+
},
|
|
64
|
+
deleteEmail: async (identifier) => {
|
|
65
|
+
const { emailIdentifier } = getEmailIdentifier(identifier);
|
|
66
|
+
await apiClient(`/api/email-callbacks/${emailIdentifier}`, { method: "DELETE" });
|
|
67
|
+
},
|
|
68
|
+
getEmail: async ({ emailId }) => {
|
|
69
|
+
const { emailCallback } = await apiClient(`/api/email-callbacks/${emailId}`, { method: "GET" });
|
|
70
|
+
return coerceDate(emailCallback);
|
|
71
|
+
},
|
|
72
|
+
getEmailProcessings: async ({ emailId }) => {
|
|
73
|
+
const { processings } = await apiClient(`/api/email-callbacks/${emailId}/processings`, { method: "GET" });
|
|
74
|
+
return processings.map(coerceDate);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
86
77
|
}
|
|
87
|
-
|
|
78
|
+
//#endregion
|
|
88
79
|
export { OWLRELAY_API_BASE_URL, createClient };
|
|
89
|
-
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,58 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlrelay/api-sdk",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.0.2",
|
|
3
|
+
"version": "0.0.3",
|
|
5
4
|
"description": "OwlRelay API SDK for JavaScript and TypeScript",
|
|
6
|
-
"author": "OwlRelay <hello@owlrelay.email> (https://owlrelay.email)",
|
|
7
|
-
"license": "AGPL-3.0",
|
|
8
|
-
"homepage": "https://owlrelay.email",
|
|
9
|
-
"repository": "github:papra-hq/owlrelay",
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/papra-hq/owlrelay/issues"
|
|
12
|
-
},
|
|
13
5
|
"keywords": [
|
|
14
|
-
"owlrelay",
|
|
15
6
|
"api",
|
|
16
|
-
"sdk",
|
|
7
|
+
"api-sdk",
|
|
17
8
|
"email",
|
|
18
|
-
"relay",
|
|
19
9
|
"http",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
10
|
+
"owlrelay",
|
|
11
|
+
"relay",
|
|
12
|
+
"sdk",
|
|
13
|
+
"webhook"
|
|
22
14
|
],
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
27
|
-
}
|
|
15
|
+
"homepage": "https://owlrelay.email",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/papra-hq/owlrelay/issues"
|
|
28
18
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
19
|
+
"license": "AGPL-3.0",
|
|
20
|
+
"author": "OwlRelay <hello@owlrelay.email> (https://owlrelay.email)",
|
|
21
|
+
"repository": "github:papra-hq/owlrelay",
|
|
31
22
|
"files": [
|
|
32
23
|
"dist"
|
|
33
24
|
],
|
|
34
|
-
"
|
|
35
|
-
|
|
25
|
+
"type": "module",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": "./dist/index.mjs",
|
|
29
|
+
"./package.json": "./package.json"
|
|
36
30
|
},
|
|
37
31
|
"dependencies": {
|
|
38
32
|
"ofetch": "^1.3.4"
|
|
39
33
|
},
|
|
40
34
|
"devDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@types/node": "^22.5.4",
|
|
35
|
+
"@types/node": "^25.9.1",
|
|
43
36
|
"@vitest/coverage-v8": "^2.0.5",
|
|
44
37
|
"bumpp": "^9.8.1",
|
|
45
38
|
"dotenv": "^16.4.5",
|
|
46
|
-
"
|
|
39
|
+
"tsdown": "^0.22.0",
|
|
47
40
|
"tsx": "^4.17.0",
|
|
48
41
|
"typescript": "^5.7.3",
|
|
49
|
-
"unbuild": "^2.0.0",
|
|
50
42
|
"vitest": "^3.0.5"
|
|
51
43
|
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=26.0.0"
|
|
46
|
+
},
|
|
52
47
|
"scripts": {
|
|
53
|
-
"build": "
|
|
54
|
-
"
|
|
55
|
-
"lint:fix": "eslint --fix .",
|
|
48
|
+
"build": "tsdown",
|
|
49
|
+
"build:watch": "tsdown --watch",
|
|
56
50
|
"test": "pnpm run test:unit",
|
|
57
51
|
"test:unit": "vitest run",
|
|
58
52
|
"test:unit:watch": "vitest watch",
|
package/dist/index.cjs
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const ofetch = require('ofetch');
|
|
4
|
-
|
|
5
|
-
const version = "0.0.2";
|
|
6
|
-
|
|
7
|
-
function createApiClient({ apiKey, baseApiUrl }) {
|
|
8
|
-
const apiClient = ofetch.ofetch.create({
|
|
9
|
-
headers: {
|
|
10
|
-
"Authorization": `Bearer ${apiKey}`,
|
|
11
|
-
"X-OwlRelay-Source": `owlrelay-api-sdk-javascript/${version}`
|
|
12
|
-
},
|
|
13
|
-
baseURL: baseApiUrl
|
|
14
|
-
});
|
|
15
|
-
return {
|
|
16
|
-
apiClient
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function coerceDate(obj) {
|
|
21
|
-
return {
|
|
22
|
-
...obj,
|
|
23
|
-
createdAt: new Date(obj.createdAt),
|
|
24
|
-
updatedAt: new Date(obj.updatedAt)
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function getEmailIdentifier(args) {
|
|
28
|
-
if ("emailId" in args) {
|
|
29
|
-
return { emailIdentifier: args.emailId };
|
|
30
|
-
}
|
|
31
|
-
if ("emailAddress" in args) {
|
|
32
|
-
return { emailIdentifier: args.emailAddress };
|
|
33
|
-
}
|
|
34
|
-
return { emailIdentifier: `${args.username}@${args.domain}` };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const OWLRELAY_API_BASE_URL = "https://api.owlrelay.email";
|
|
38
|
-
function createClient({
|
|
39
|
-
apiKey,
|
|
40
|
-
baseApiUrl = OWLRELAY_API_BASE_URL
|
|
41
|
-
}) {
|
|
42
|
-
const { apiClient } = createApiClient({ apiKey, baseApiUrl });
|
|
43
|
-
const updateEmail = async ({ emailId, ...body }) => {
|
|
44
|
-
const { emailCallback } = await apiClient(`/api/email-callbacks/${emailId}`, {
|
|
45
|
-
method: "PUT",
|
|
46
|
-
body
|
|
47
|
-
});
|
|
48
|
-
return coerceDate(emailCallback);
|
|
49
|
-
};
|
|
50
|
-
return {
|
|
51
|
-
updateEmail,
|
|
52
|
-
enableEmail: async ({ emailId }) => {
|
|
53
|
-
return updateEmail({ emailId, isEnabled: true });
|
|
54
|
-
},
|
|
55
|
-
disableEmail: async ({ emailId }) => {
|
|
56
|
-
return updateEmail({ emailId, isEnabled: false });
|
|
57
|
-
},
|
|
58
|
-
getEmails: async () => {
|
|
59
|
-
const { emailCallbacks } = await apiClient("/api/email-callbacks", {
|
|
60
|
-
method: "GET"
|
|
61
|
-
});
|
|
62
|
-
return emailCallbacks.map(coerceDate);
|
|
63
|
-
},
|
|
64
|
-
createEmail: async (body) => {
|
|
65
|
-
const { emailCallback } = await apiClient("/api/email-callbacks", {
|
|
66
|
-
method: "POST",
|
|
67
|
-
body
|
|
68
|
-
});
|
|
69
|
-
return coerceDate(emailCallback);
|
|
70
|
-
},
|
|
71
|
-
deleteEmail: async (args) => {
|
|
72
|
-
const { emailIdentifier } = getEmailIdentifier(args);
|
|
73
|
-
await apiClient(`/api/email-callbacks/${emailIdentifier}`, { method: "DELETE" });
|
|
74
|
-
},
|
|
75
|
-
getEmail: async ({ emailId }) => {
|
|
76
|
-
const { emailCallback } = await apiClient(`/api/email-callbacks/${emailId}`, {
|
|
77
|
-
method: "GET"
|
|
78
|
-
});
|
|
79
|
-
return coerceDate(emailCallback);
|
|
80
|
-
},
|
|
81
|
-
getEmailProcessings: async ({ emailId }) => {
|
|
82
|
-
const { processings } = await apiClient(`/api/email-callbacks/${emailId}/processings`, {
|
|
83
|
-
method: "GET"
|
|
84
|
-
});
|
|
85
|
-
return processings.map(coerceDate);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
exports.OWLRELAY_API_BASE_URL = OWLRELAY_API_BASE_URL;
|
|
91
|
-
exports.createClient = createClient;
|
|
92
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/api.ts","../src/api.models.ts","../src/index.ts"],"sourcesContent":["import { ofetch } from 'ofetch';\nimport { version } from '../package.json';\n\nexport function createApiClient({ apiKey, baseApiUrl }: { apiKey: string; baseApiUrl: string }) {\n const apiClient = ofetch.create({\n headers: {\n 'Authorization': `Bearer ${apiKey}`,\n 'X-OwlRelay-Source': `owlrelay-api-sdk-javascript/${version}`,\n },\n baseURL: baseApiUrl,\n });\n\n return {\n apiClient,\n };\n}\n","export function coerceDate<T extends { createdAt: string; updatedAt: string }>(\n obj: T,\n): T & { createdAt: Date; updatedAt: Date } {\n return {\n ...obj,\n createdAt: new Date(obj.createdAt),\n updatedAt: new Date(obj.updatedAt),\n } as T & { createdAt: Date; updatedAt: Date };\n}\n\nexport function getEmailIdentifier(args: { emailId: string } | { emailAddress: string } | { username: string; domain: string }) {\n if ('emailId' in args) {\n return { emailIdentifier: args.emailId };\n }\n\n if ('emailAddress' in args) {\n return { emailIdentifier: args.emailAddress };\n }\n\n return { emailIdentifier: `${args.username}@${args.domain}` };\n}\n","import { createApiClient } from './api';\nimport { coerceDate, getEmailIdentifier } from './api.models';\n\nexport const OWLRELAY_API_BASE_URL = 'https://api.owlrelay.email';\n\n type AsDto<T> = {\n [K in keyof T]: T[K] extends Date ? string : T[K];\n };\n\nexport type OwlRelayEmail = {\n id: string;\n domain: string;\n username: string;\n webhookUrl: string;\n webhookSecret: string;\n isEnabled: boolean;\n allowedOrigins: string[];\n createdAt: Date;\n updatedAt: Date;\n};\n\nexport type OwlRelayEmailProcessing = {\n id: string;\n emailId: string;\n status: string;\n error?: string;\n fromAddress: string;\n subject: string;\n webhookUrl?: string;\n webhookResponseStatusCode?: number;\n\n createdAt: Date;\n updatedAt: Date;\n};\n\nexport function createClient({\n apiKey,\n baseApiUrl = OWLRELAY_API_BASE_URL,\n}: {\n apiKey: string;\n baseApiUrl?: string;\n}) {\n const { apiClient } = createApiClient({ apiKey, baseApiUrl });\n\n const updateEmail = async ({ emailId, ...body }: { emailId: string } & Partial<Omit<OwlRelayEmail, 'id' | 'createdAt' | 'updatedAt'>>): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>(`/api/email-callbacks/${emailId}`, {\n method: 'PUT',\n body,\n });\n\n return coerceDate(emailCallback);\n };\n\n return {\n updateEmail,\n\n enableEmail: async ({ emailId }: { emailId: string }) => {\n return updateEmail({ emailId, isEnabled: true });\n },\n\n disableEmail: async ({ emailId }: { emailId: string }) => {\n return updateEmail({ emailId, isEnabled: false });\n },\n\n getEmails: async (): Promise<OwlRelayEmail[]> => {\n const { emailCallbacks } = await apiClient<{ emailCallbacks: AsDto<OwlRelayEmail>[] }>('/api/email-callbacks', {\n method: 'GET',\n });\n\n return emailCallbacks.map(coerceDate);\n },\n\n createEmail: async (body: {\n domain?: string;\n username: string;\n webhookUrl: string;\n webhookSecret?: string;\n allowedOrigins?: string[];\n }): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>('/api/email-callbacks', {\n method: 'POST',\n body,\n });\n\n return coerceDate(emailCallback);\n },\n\n deleteEmail: async (args: { emailId: string } | { emailAddress: string } | { username: string; domain: string }) => {\n const { emailIdentifier } = getEmailIdentifier(args);\n\n await apiClient(`/api/email-callbacks/${emailIdentifier}`, { method: 'DELETE' });\n },\n\n getEmail: async ({ emailId }: { emailId: string }): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>(`/api/email-callbacks/${emailId}`, {\n method: 'GET',\n });\n\n return coerceDate(emailCallback);\n },\n\n getEmailProcessings: async ({ emailId }: { emailId: string }): Promise<OwlRelayEmailProcessing[]> => {\n const { processings } = await apiClient<{ processings: AsDto<OwlRelayEmailProcessing>[] }>(`/api/email-callbacks/${emailId}/processings`, {\n method: 'GET',\n });\n\n return processings.map(coerceDate);\n },\n };\n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AAM,UAAU,CAAwB,qBAAA,EAAA,eAAe,IAAI,EAAE,MAAA,EAAQ,UAAU,CAAA,CAAA;AAAA,KACjF;AAAA,IAEA,QAAU,EAAA,OAAO,EAAE,OAAA,EAA2D,KAAA;AAC5E,MAAA,MAAM,EAAE,aAAc,EAAA,GAAI,MAAM,SAAmD,CAAA,CAAA,qBAAA,EAAwB,OAAO,CAAI,CAAA,EAAA;AAAA,QACpH,MAAQ,EAAA,KAAA;AAAA,OACT,CAAA,CAAA;AAED,MAAA,OAAO,WAAW,aAAa,CAAA,CAAA;AAAA,KACjC;AAAA,IAEA,mBAAqB,EAAA,OAAO,EAAE,OAAA,EAAuE,KAAA;AACnG,MAAA,MAAM,EAAE,WAAY,EAAA,GAAI,MAAM,SAA6D,CAAA,CAAA,qBAAA,EAAwB,OAAO,CAAgB,YAAA,CAAA,EAAA;AAAA,QACxI,MAAQ,EAAA,KAAA;AAAA,OACT,CAAA,CAAA;AAED,MAAO,OAAA,WAAA,CAAY,IAAI,UAAU,CAAA,CAAA;AAAA,KACnC;AAAA,GACF,CAAA;AACF;;;;;"}
|
package/dist/index.d.cts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
declare const OWLRELAY_API_BASE_URL = "https://api.owlrelay.email";
|
|
2
|
-
type OwlRelayEmail = {
|
|
3
|
-
id: string;
|
|
4
|
-
domain: string;
|
|
5
|
-
username: string;
|
|
6
|
-
webhookUrl: string;
|
|
7
|
-
webhookSecret: string;
|
|
8
|
-
isEnabled: boolean;
|
|
9
|
-
allowedOrigins: string[];
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
updatedAt: Date;
|
|
12
|
-
};
|
|
13
|
-
type OwlRelayEmailProcessing = {
|
|
14
|
-
id: string;
|
|
15
|
-
emailId: string;
|
|
16
|
-
status: string;
|
|
17
|
-
error?: string;
|
|
18
|
-
fromAddress: string;
|
|
19
|
-
subject: string;
|
|
20
|
-
webhookUrl?: string;
|
|
21
|
-
webhookResponseStatusCode?: number;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
};
|
|
25
|
-
declare function createClient({ apiKey, baseApiUrl, }: {
|
|
26
|
-
apiKey: string;
|
|
27
|
-
baseApiUrl?: string;
|
|
28
|
-
}): {
|
|
29
|
-
updateEmail: ({ emailId, ...body }: {
|
|
30
|
-
emailId: string;
|
|
31
|
-
} & Partial<Omit<OwlRelayEmail, "id" | "createdAt" | "updatedAt">>) => Promise<OwlRelayEmail>;
|
|
32
|
-
enableEmail: ({ emailId }: {
|
|
33
|
-
emailId: string;
|
|
34
|
-
}) => Promise<OwlRelayEmail>;
|
|
35
|
-
disableEmail: ({ emailId }: {
|
|
36
|
-
emailId: string;
|
|
37
|
-
}) => Promise<OwlRelayEmail>;
|
|
38
|
-
getEmails: () => Promise<OwlRelayEmail[]>;
|
|
39
|
-
createEmail: (body: {
|
|
40
|
-
domain?: string;
|
|
41
|
-
username: string;
|
|
42
|
-
webhookUrl: string;
|
|
43
|
-
webhookSecret?: string;
|
|
44
|
-
allowedOrigins?: string[];
|
|
45
|
-
}) => Promise<OwlRelayEmail>;
|
|
46
|
-
deleteEmail: (args: {
|
|
47
|
-
emailId: string;
|
|
48
|
-
} | {
|
|
49
|
-
emailAddress: string;
|
|
50
|
-
} | {
|
|
51
|
-
username: string;
|
|
52
|
-
domain: string;
|
|
53
|
-
}) => Promise<void>;
|
|
54
|
-
getEmail: ({ emailId }: {
|
|
55
|
-
emailId: string;
|
|
56
|
-
}) => Promise<OwlRelayEmail>;
|
|
57
|
-
getEmailProcessings: ({ emailId }: {
|
|
58
|
-
emailId: string;
|
|
59
|
-
}) => Promise<OwlRelayEmailProcessing[]>;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { OWLRELAY_API_BASE_URL, type OwlRelayEmail, type OwlRelayEmailProcessing, createClient };
|
package/dist/index.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
declare const OWLRELAY_API_BASE_URL = "https://api.owlrelay.email";
|
|
2
|
-
type OwlRelayEmail = {
|
|
3
|
-
id: string;
|
|
4
|
-
domain: string;
|
|
5
|
-
username: string;
|
|
6
|
-
webhookUrl: string;
|
|
7
|
-
webhookSecret: string;
|
|
8
|
-
isEnabled: boolean;
|
|
9
|
-
allowedOrigins: string[];
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
updatedAt: Date;
|
|
12
|
-
};
|
|
13
|
-
type OwlRelayEmailProcessing = {
|
|
14
|
-
id: string;
|
|
15
|
-
emailId: string;
|
|
16
|
-
status: string;
|
|
17
|
-
error?: string;
|
|
18
|
-
fromAddress: string;
|
|
19
|
-
subject: string;
|
|
20
|
-
webhookUrl?: string;
|
|
21
|
-
webhookResponseStatusCode?: number;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
};
|
|
25
|
-
declare function createClient({ apiKey, baseApiUrl, }: {
|
|
26
|
-
apiKey: string;
|
|
27
|
-
baseApiUrl?: string;
|
|
28
|
-
}): {
|
|
29
|
-
updateEmail: ({ emailId, ...body }: {
|
|
30
|
-
emailId: string;
|
|
31
|
-
} & Partial<Omit<OwlRelayEmail, "id" | "createdAt" | "updatedAt">>) => Promise<OwlRelayEmail>;
|
|
32
|
-
enableEmail: ({ emailId }: {
|
|
33
|
-
emailId: string;
|
|
34
|
-
}) => Promise<OwlRelayEmail>;
|
|
35
|
-
disableEmail: ({ emailId }: {
|
|
36
|
-
emailId: string;
|
|
37
|
-
}) => Promise<OwlRelayEmail>;
|
|
38
|
-
getEmails: () => Promise<OwlRelayEmail[]>;
|
|
39
|
-
createEmail: (body: {
|
|
40
|
-
domain?: string;
|
|
41
|
-
username: string;
|
|
42
|
-
webhookUrl: string;
|
|
43
|
-
webhookSecret?: string;
|
|
44
|
-
allowedOrigins?: string[];
|
|
45
|
-
}) => Promise<OwlRelayEmail>;
|
|
46
|
-
deleteEmail: (args: {
|
|
47
|
-
emailId: string;
|
|
48
|
-
} | {
|
|
49
|
-
emailAddress: string;
|
|
50
|
-
} | {
|
|
51
|
-
username: string;
|
|
52
|
-
domain: string;
|
|
53
|
-
}) => Promise<void>;
|
|
54
|
-
getEmail: ({ emailId }: {
|
|
55
|
-
emailId: string;
|
|
56
|
-
}) => Promise<OwlRelayEmail>;
|
|
57
|
-
getEmailProcessings: ({ emailId }: {
|
|
58
|
-
emailId: string;
|
|
59
|
-
}) => Promise<OwlRelayEmailProcessing[]>;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { OWLRELAY_API_BASE_URL, type OwlRelayEmail, type OwlRelayEmailProcessing, createClient };
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/api.ts","../src/api.models.ts","../src/index.ts"],"sourcesContent":["import { ofetch } from 'ofetch';\nimport { version } from '../package.json';\n\nexport function createApiClient({ apiKey, baseApiUrl }: { apiKey: string; baseApiUrl: string }) {\n const apiClient = ofetch.create({\n headers: {\n 'Authorization': `Bearer ${apiKey}`,\n 'X-OwlRelay-Source': `owlrelay-api-sdk-javascript/${version}`,\n },\n baseURL: baseApiUrl,\n });\n\n return {\n apiClient,\n };\n}\n","export function coerceDate<T extends { createdAt: string; updatedAt: string }>(\n obj: T,\n): T & { createdAt: Date; updatedAt: Date } {\n return {\n ...obj,\n createdAt: new Date(obj.createdAt),\n updatedAt: new Date(obj.updatedAt),\n } as T & { createdAt: Date; updatedAt: Date };\n}\n\nexport function getEmailIdentifier(args: { emailId: string } | { emailAddress: string } | { username: string; domain: string }) {\n if ('emailId' in args) {\n return { emailIdentifier: args.emailId };\n }\n\n if ('emailAddress' in args) {\n return { emailIdentifier: args.emailAddress };\n }\n\n return { emailIdentifier: `${args.username}@${args.domain}` };\n}\n","import { createApiClient } from './api';\nimport { coerceDate, getEmailIdentifier } from './api.models';\n\nexport const OWLRELAY_API_BASE_URL = 'https://api.owlrelay.email';\n\n type AsDto<T> = {\n [K in keyof T]: T[K] extends Date ? string : T[K];\n };\n\nexport type OwlRelayEmail = {\n id: string;\n domain: string;\n username: string;\n webhookUrl: string;\n webhookSecret: string;\n isEnabled: boolean;\n allowedOrigins: string[];\n createdAt: Date;\n updatedAt: Date;\n};\n\nexport type OwlRelayEmailProcessing = {\n id: string;\n emailId: string;\n status: string;\n error?: string;\n fromAddress: string;\n subject: string;\n webhookUrl?: string;\n webhookResponseStatusCode?: number;\n\n createdAt: Date;\n updatedAt: Date;\n};\n\nexport function createClient({\n apiKey,\n baseApiUrl = OWLRELAY_API_BASE_URL,\n}: {\n apiKey: string;\n baseApiUrl?: string;\n}) {\n const { apiClient } = createApiClient({ apiKey, baseApiUrl });\n\n const updateEmail = async ({ emailId, ...body }: { emailId: string } & Partial<Omit<OwlRelayEmail, 'id' | 'createdAt' | 'updatedAt'>>): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>(`/api/email-callbacks/${emailId}`, {\n method: 'PUT',\n body,\n });\n\n return coerceDate(emailCallback);\n };\n\n return {\n updateEmail,\n\n enableEmail: async ({ emailId }: { emailId: string }) => {\n return updateEmail({ emailId, isEnabled: true });\n },\n\n disableEmail: async ({ emailId }: { emailId: string }) => {\n return updateEmail({ emailId, isEnabled: false });\n },\n\n getEmails: async (): Promise<OwlRelayEmail[]> => {\n const { emailCallbacks } = await apiClient<{ emailCallbacks: AsDto<OwlRelayEmail>[] }>('/api/email-callbacks', {\n method: 'GET',\n });\n\n return emailCallbacks.map(coerceDate);\n },\n\n createEmail: async (body: {\n domain?: string;\n username: string;\n webhookUrl: string;\n webhookSecret?: string;\n allowedOrigins?: string[];\n }): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>('/api/email-callbacks', {\n method: 'POST',\n body,\n });\n\n return coerceDate(emailCallback);\n },\n\n deleteEmail: async (args: { emailId: string } | { emailAddress: string } | { username: string; domain: string }) => {\n const { emailIdentifier } = getEmailIdentifier(args);\n\n await apiClient(`/api/email-callbacks/${emailIdentifier}`, { method: 'DELETE' });\n },\n\n getEmail: async ({ emailId }: { emailId: string }): Promise<OwlRelayEmail> => {\n const { emailCallback } = await apiClient<{ emailCallback: AsDto<OwlRelayEmail> }>(`/api/email-callbacks/${emailId}`, {\n method: 'GET',\n });\n\n return coerceDate(emailCallback);\n },\n\n getEmailProcessings: async ({ emailId }: { emailId: string }): Promise<OwlRelayEmailProcessing[]> => {\n const { processings } = await apiClient<{ processings: AsDto<OwlRelayEmailProcessing>[] }>(`/api/email-callbacks/${emailId}/processings`, {\n method: 'GET',\n });\n\n return processings.map(coerceDate);\n },\n };\n}\n"],"names":[],"mappings":";;;;AAGO,SAAS,eAAgB,CAAA,EAAE,MAAQ,EAAA,UAAA,EAAsD,EAAA;AAC9F,EAAM,MAAA,SAAA,GAAY,OAAO,MAAO,CAAA;AAAA,IAC9B,OAAS,EAAA;AAAA,MACP,eAAA,EAAiB,UAAU,MAAM,CAAA,CAAA;AAAA,MACjC,mBAAA,EAAqB,+BAA+B,OAAO,CAAA,CAAA;AAAA,KAC7D;AAAA,IACA,OAAS,EAAA,UAAA;AAAA,GACV,CAAA,CAAA;AAED,EAAO,OAAA;AAAA,IACL,SAAA;AAAA,GACF,CAAA;AACF;;ACfO,SAAS,WACd,GAC0C,EAAA;AAC1C,EAAO,OAAA;AAAA,IACL,GAAG,GAAA;AAAA,IACH,SAAW,EAAA,IAAI,IAAK,CAAA,GAAA,CAAI,SAAS,CAAA;AAAA,IACjC,SAAW,EAAA,IAAI,IAAK,CAAA,GAAA,CAAI,SAAS,CAAA;AAAA,GACnC,CAAA;AACF,CAAA;AAEO,SAAS,mBAAmB,IAA6F,EAAA;AAC9H,EAAA,IAAI,aAAa,IAAM,EAAA;AACrB,IAAO,OAAA,EAAE,eAAiB,EAAA,IAAA,CAAK,OAAQ,EAAA,CAAA;AAAA,GACzC;AAEA,EAAA,IAAI,kBAAkB,IAAM,EAAA;AAC1B,IAAO,OAA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