@schemavaults/send-email-api-options 0.0.4 → 0.0.6

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/bun.lock CHANGED
@@ -5,13 +5,14 @@
5
5
  "": {
6
6
  "name": "@schemavaults/send-email-api-options",
7
7
  "dependencies": {
8
+ "@schemavaults/app-definitions": "0.6.23",
8
9
  "zod": "3.25.8",
9
10
  },
10
11
  "devDependencies": {
11
12
  "@eslint/js": "9.39.1",
12
13
  "@typescript-eslint/eslint-plugin": "8.48.1",
13
14
  "@typescript-eslint/parser": "8.48.1",
14
- "bun-types": "1.3.6",
15
+ "bun-types": "1.3.11",
15
16
  "eslint": "9.39.1",
16
17
  "globals": "16.5.0",
17
18
  "tsc-alias": "1.8.16",
@@ -52,6 +53,8 @@
52
53
 
53
54
  "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
54
55
 
56
+ "@schemavaults/app-definitions": ["@schemavaults/app-definitions@0.6.23", "", { "dependencies": { "zod": "3.25.8" } }, "sha512-gdI1PVujXrcHObcjiqO0/aeiKCKSzsGzWu8fWwOwCp9BQeDu2iovAJRp3Gme9iWBnWz1Yv+Mg4A5Y/G3HXp1jA=="],
57
+
55
58
  "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
56
59
 
57
60
  "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
@@ -100,7 +103,7 @@
100
103
 
101
104
  "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
102
105
 
103
- "bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
106
+ "bun-types": ["bun-types@1.3.11", "", { "dependencies": { "@types/node": "*" } }, "sha512-1KGPpoxQWl9f6wcZh57LvrPIInQMn2TQ7jsgxqpRzg+l0QPOFvJVH7HmvHo/AiPgwXy+/Thf6Ov3EdVn1vOabg=="],
104
107
 
105
108
  "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="],
106
109
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@schemavaults/send-email-api-options",
3
3
  "description": "Schema defining the shape of the request body to send an email via @schemavaults/mail-server",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
7
7
  "repository": {
@@ -13,7 +13,8 @@
13
13
  "module": "dist/index.js",
14
14
  "types": "dist/index.d.ts",
15
15
  "dependencies": {
16
- "zod": "3.25.8"
16
+ "zod": "3.25.8",
17
+ "@schemavaults/app-definitions": "0.6.23"
17
18
  },
18
19
  "scripts": {
19
20
  "build": "tsc --project tsconfig.json && tsc-alias --project tsconfig.json",
@@ -27,7 +28,7 @@
27
28
  "devDependencies": {
28
29
  "typescript": "5.9.3",
29
30
  "tsc-alias": "1.8.16",
30
- "bun-types": "1.3.6",
31
+ "bun-types": "1.3.11",
31
32
  "eslint": "9.39.1",
32
33
  "@eslint/js": "9.39.1",
33
34
  "globals": "16.5.0",
@@ -37,7 +38,6 @@
37
38
  "publishConfig": {
38
39
  "access": "public"
39
40
  },
40
- "packageManager": "bun@1.3.6",
41
41
  "exports": {
42
42
  ".": {
43
43
  "types": "./dist/index.d.ts",
@@ -54,5 +54,6 @@
54
54
  "import": "./dist/*",
55
55
  "require": "./dist/*"
56
56
  }
57
- }
57
+ },
58
+ "packageManager": "bun@1.3.11"
58
59
  }
@@ -1,2 +0,0 @@
1
- import { z } from "zod";
2
- export declare const emailTemplateIdSchema: z.ZodString;
@@ -1,7 +0,0 @@
1
- import { z } from "zod";
2
- export const emailTemplateIdSchema = z
3
- .string()
4
- .min(1, "Email template ID must be non-empty!")
5
- .max(64)
6
- .regex(/^[a-z][a-z0-9_-]+$/, "Template ID must start with a letter, and may only contain lowercase alphanumeric characters, hyphens and underscores.");
7
- //# sourceMappingURL=email-template-id-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-template-id-schema.js","sourceRoot":"","sources":["../src/email-template-id-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;KAC9C,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,oBAAoB,EACpB,wHAAwH,CACzH,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { sendEmailRequestBodySchema, sendEmailRequestBodySchema as default, } from "./send-email-request-body-schema";
2
- export type { SendEmailRequestBody } from "./send-email-request-body-schema";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export { sendEmailRequestBodySchema, sendEmailRequestBodySchema as default, } from "./send-email-request-body-schema";
2
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,IAAI,OAAO,GACtC,MAAM,kCAAkC,CAAC"}
@@ -1,57 +0,0 @@
1
- import { z } from "zod";
2
- export declare const sendEmailRequestBodySchema: z.ZodObject<{
3
- message: z.ZodUnion<[z.ZodObject<{
4
- template_id: z.ZodString;
5
- template_props: z.ZodUnknown;
6
- }, "strict", z.ZodTypeAny, {
7
- template_id: string;
8
- template_props?: unknown;
9
- }, {
10
- template_id: string;
11
- template_props?: unknown;
12
- }>, z.ZodObject<{
13
- text: z.ZodString;
14
- html: z.ZodString;
15
- }, "strict", z.ZodTypeAny, {
16
- text: string;
17
- html: string;
18
- }, {
19
- text: string;
20
- html: string;
21
- }>]>;
22
- to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
23
- from: z.ZodOptional<z.ZodString>;
24
- subject: z.ZodString;
25
- replyTo: z.ZodOptional<z.ZodString>;
26
- cc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
27
- bcc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
28
- }, "strict", z.ZodTypeAny, {
29
- message: {
30
- template_id: string;
31
- template_props?: unknown;
32
- } | {
33
- text: string;
34
- html: string;
35
- };
36
- to: string | string[];
37
- subject: string;
38
- from?: string | undefined;
39
- replyTo?: string | undefined;
40
- cc?: string | string[] | undefined;
41
- bcc?: string | string[] | undefined;
42
- }, {
43
- message: {
44
- template_id: string;
45
- template_props?: unknown;
46
- } | {
47
- text: string;
48
- html: string;
49
- };
50
- to: string | string[];
51
- subject: string;
52
- from?: string | undefined;
53
- replyTo?: string | undefined;
54
- cc?: string | string[] | undefined;
55
- bcc?: string | string[] | undefined;
56
- }>;
57
- export type SendEmailRequestBody = z.infer<typeof sendEmailRequestBodySchema>;
@@ -1,52 +0,0 @@
1
- import { z } from "zod";
2
- import { emailTemplateIdSchema } from "./email-template-id-schema";
3
- const sendEmailTemplateOptions = z
4
- .object({
5
- template_id: emailTemplateIdSchema,
6
- template_props: z.unknown(),
7
- })
8
- .required({
9
- template_id: true,
10
- })
11
- .strict();
12
- const sendRawEmailOptions = z
13
- .object({
14
- text: z.string().nonempty(),
15
- html: z.string().nonempty(),
16
- })
17
- .required({
18
- text: true,
19
- html: true,
20
- })
21
- .strict();
22
- const MAX_RECIPIENTS = 50;
23
- export const sendEmailRequestBodySchema = z
24
- .object({
25
- to: z.union([
26
- z.string().email(),
27
- z.string().email().array().min(1).max(MAX_RECIPIENTS),
28
- ]),
29
- from: z.string().email().optional(),
30
- subject: z.string().nonempty(),
31
- message: z.union([sendEmailTemplateOptions, sendRawEmailOptions]),
32
- replyTo: z.string().email().optional(),
33
- cc: z
34
- .union([
35
- z.string().email(),
36
- z.string().email().array().min(1).max(MAX_RECIPIENTS),
37
- ])
38
- .optional(),
39
- bcc: z
40
- .union([
41
- z.string().email(),
42
- z.string().email().array().min(1).max(MAX_RECIPIENTS),
43
- ])
44
- .optional(),
45
- })
46
- .required({
47
- to: true,
48
- message: true,
49
- subject: true,
50
- })
51
- .strict();
52
- //# sourceMappingURL=send-email-request-body-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-email-request-body-schema.js","sourceRoot":"","sources":["../src/send-email-request-body-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,wBAAwB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;CAC5B,CAAC;KACD,QAAQ,CAAC;IACR,WAAW,EAAE,IAAI;CAClB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,mBAAmB,GAAG,CAAC;KAC1B,MA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