@strapi/email 5.19.0 → 5.20.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/dist/server/routes/content-api.js +21 -10
- package/dist/server/routes/content-api.js.map +1 -1
- package/dist/server/routes/content-api.mjs +21 -10
- package/dist/server/routes/content-api.mjs.map +1 -1
- package/dist/server/routes/validation/email.js +46 -0
- package/dist/server/routes/validation/email.js.map +1 -0
- package/dist/server/routes/validation/email.mjs +25 -0
- package/dist/server/routes/validation/email.mjs.map +1 -0
- package/dist/server/src/index.d.ts +1 -8
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/routes/content-api.d.ts +2 -8
- package/dist/server/src/routes/content-api.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts +1 -8
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/routes/validation/email.d.ts +18 -0
- package/dist/server/src/routes/validation/email.d.ts.map +1 -0
- package/dist/server/src/routes/validation/index.d.ts +2 -0
- package/dist/server/src/routes/validation/index.d.ts.map +1 -0
- package/package.json +7 -6
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
var email = require('./validation/email.js');
|
|
4
|
+
|
|
5
|
+
var contentApi = (()=>{
|
|
6
|
+
const validator = new email.EmailRouteValidator(strapi);
|
|
7
|
+
return {
|
|
8
|
+
type: 'content-api',
|
|
9
|
+
routes: [
|
|
10
|
+
{
|
|
11
|
+
method: 'POST',
|
|
12
|
+
path: '/',
|
|
13
|
+
handler: 'email.send',
|
|
14
|
+
request: {
|
|
15
|
+
body: {
|
|
16
|
+
'application/json': validator.sendEmailInput
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
response: validator.emailResponse
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
});
|
|
13
24
|
|
|
14
25
|
module.exports = contentApi;
|
|
15
26
|
//# sourceMappingURL=content-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-api.js","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"content-api.js","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { EmailRouteValidator } from './validation';\n\nexport default (): Core.RouterInput => {\n const validator = new EmailRouteValidator(strapi);\n\n return {\n type: 'content-api',\n routes: [\n {\n method: 'POST',\n path: '/',\n handler: 'email.send',\n request: {\n body: { 'application/json': validator.sendEmailInput },\n },\n response: validator.emailResponse,\n },\n ],\n };\n};\n"],"names":["validator","EmailRouteValidator","strapi","type","routes","method","path","handler","request","body","sendEmailInput","response","emailResponse"],"mappings":";;;;AAGA,iBAAe,CAAA,IAAA;IACb,MAAMA,SAAAA,GAAY,IAAIC,yBAAoBC,CAAAA,MAAAA,CAAAA;IAE1C,OAAO;QACLC,IAAM,EAAA,aAAA;QACNC,MAAQ,EAAA;AACN,YAAA;gBACEC,MAAQ,EAAA,MAAA;gBACRC,IAAM,EAAA,GAAA;gBACNC,OAAS,EAAA,YAAA;gBACTC,OAAS,EAAA;oBACPC,IAAM,EAAA;AAAE,wBAAA,kBAAA,EAAoBT,UAAUU;AAAe;AACvD,iBAAA;AACAC,gBAAAA,QAAAA,EAAUX,UAAUY;AACtB;AACD;AACH,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { EmailRouteValidator } from './validation/email.mjs';
|
|
2
|
+
|
|
3
|
+
var contentApi = (()=>{
|
|
4
|
+
const validator = new EmailRouteValidator(strapi);
|
|
5
|
+
return {
|
|
6
|
+
type: 'content-api',
|
|
7
|
+
routes: [
|
|
8
|
+
{
|
|
9
|
+
method: 'POST',
|
|
10
|
+
path: '/',
|
|
11
|
+
handler: 'email.send',
|
|
12
|
+
request: {
|
|
13
|
+
body: {
|
|
14
|
+
'application/json': validator.sendEmailInput
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
response: validator.emailResponse
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
});
|
|
11
22
|
|
|
12
23
|
export { contentApi as default };
|
|
13
24
|
//# sourceMappingURL=content-api.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-api.mjs","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"content-api.mjs","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { EmailRouteValidator } from './validation';\n\nexport default (): Core.RouterInput => {\n const validator = new EmailRouteValidator(strapi);\n\n return {\n type: 'content-api',\n routes: [\n {\n method: 'POST',\n path: '/',\n handler: 'email.send',\n request: {\n body: { 'application/json': validator.sendEmailInput },\n },\n response: validator.emailResponse,\n },\n ],\n };\n};\n"],"names":["validator","EmailRouteValidator","strapi","type","routes","method","path","handler","request","body","sendEmailInput","response","emailResponse"],"mappings":";;AAGA,iBAAe,CAAA,IAAA;IACb,MAAMA,SAAAA,GAAY,IAAIC,mBAAoBC,CAAAA,MAAAA,CAAAA;IAE1C,OAAO;QACLC,IAAM,EAAA,aAAA;QACNC,MAAQ,EAAA;AACN,YAAA;gBACEC,MAAQ,EAAA,MAAA;gBACRC,IAAM,EAAA,GAAA;gBACNC,OAAS,EAAA,YAAA;gBACTC,OAAS,EAAA;oBACPC,IAAM,EAAA;AAAE,wBAAA,kBAAA,EAAoBT,UAAUU;AAAe;AACvD,iBAAA;AACAC,gBAAAA,QAAAA,EAAUX,UAAUY;AACtB;AACD;AACH,KAAA;AACF,CAAA;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var z = require('zod/v4');
|
|
4
|
+
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
var n = Object.create(null);
|
|
7
|
+
if (e) {
|
|
8
|
+
Object.keys(e).forEach(function (k) {
|
|
9
|
+
if (k !== 'default') {
|
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return e[k]; }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
23
|
+
|
|
24
|
+
class EmailRouteValidator {
|
|
25
|
+
get sendEmailInput() {
|
|
26
|
+
return z__namespace.object({
|
|
27
|
+
from: z__namespace.string().optional(),
|
|
28
|
+
to: z__namespace.string(),
|
|
29
|
+
cc: z__namespace.string().optional(),
|
|
30
|
+
bcc: z__namespace.string().optional(),
|
|
31
|
+
replyTo: z__namespace.string().optional(),
|
|
32
|
+
subject: z__namespace.string(),
|
|
33
|
+
text: z__namespace.string(),
|
|
34
|
+
html: z__namespace.string().optional()
|
|
35
|
+
}).catchall(z__namespace.string());
|
|
36
|
+
}
|
|
37
|
+
get emailResponse() {
|
|
38
|
+
return z__namespace.object({});
|
|
39
|
+
}
|
|
40
|
+
constructor(strapi){
|
|
41
|
+
this._strapi = strapi;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.EmailRouteValidator = EmailRouteValidator;
|
|
46
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.js","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.string());\n }\n\n get emailResponse() {\n return z.object({});\n }\n}\n"],"names":["EmailRouteValidator","sendEmailInput","z","object","from","string","optional","to","cc","bcc","replyTo","subject","text","html","catchall","emailResponse","strapi","_strapi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAMA,mBAAAA,CAAAA;AAOX,IAAA,IAAIC,cAAiB,GAAA;QACnB,OAAOC,YAAAA,CACJC,MAAM,CAAC;YACNC,IAAMF,EAAAA,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AACzBC,YAAAA,EAAAA,EAAIL,aAAEG,MAAM,EAAA;YACZG,EAAIN,EAAAA,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACvBG,GAAKP,EAAAA,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACxBI,OAASR,EAAAA,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BK,YAAAA,OAAAA,EAAST,aAAEG,MAAM,EAAA;AACjBO,YAAAA,IAAAA,EAAMV,aAAEG,MAAM,EAAA;YACdQ,IAAMX,EAAAA,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ;SAE1BQ,CAAAA,CAAAA,QAAQ,CAACZ,YAAAA,CAAEG,MAAM,EAAA,CAAA;AACtB;AAEA,IAAA,IAAIU,aAAgB,GAAA;QAClB,OAAOb,YAAAA,CAAEC,MAAM,CAAC,EAAC,CAAA;AACnB;AArBA,IAAA,WAAA,CAAmBa,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB;AAoBF;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
|
|
3
|
+
class EmailRouteValidator {
|
|
4
|
+
get sendEmailInput() {
|
|
5
|
+
return z.object({
|
|
6
|
+
from: z.string().optional(),
|
|
7
|
+
to: z.string(),
|
|
8
|
+
cc: z.string().optional(),
|
|
9
|
+
bcc: z.string().optional(),
|
|
10
|
+
replyTo: z.string().optional(),
|
|
11
|
+
subject: z.string(),
|
|
12
|
+
text: z.string(),
|
|
13
|
+
html: z.string().optional()
|
|
14
|
+
}).catchall(z.string());
|
|
15
|
+
}
|
|
16
|
+
get emailResponse() {
|
|
17
|
+
return z.object({});
|
|
18
|
+
}
|
|
19
|
+
constructor(strapi){
|
|
20
|
+
this._strapi = strapi;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { EmailRouteValidator };
|
|
25
|
+
//# sourceMappingURL=email.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.mjs","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.string());\n }\n\n get emailResponse() {\n return z.object({});\n }\n}\n"],"names":["EmailRouteValidator","sendEmailInput","z","object","from","string","optional","to","cc","bcc","replyTo","subject","text","html","catchall","emailResponse","strapi","_strapi"],"mappings":";;AAGO,MAAMA,mBAAAA,CAAAA;AAOX,IAAA,IAAIC,cAAiB,GAAA;QACnB,OAAOC,CAAAA,CACJC,MAAM,CAAC;YACNC,IAAMF,EAAAA,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AACzBC,YAAAA,EAAAA,EAAIL,EAAEG,MAAM,EAAA;YACZG,EAAIN,EAAAA,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACvBG,GAAKP,EAAAA,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACxBI,OAASR,EAAAA,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BK,YAAAA,OAAAA,EAAST,EAAEG,MAAM,EAAA;AACjBO,YAAAA,IAAAA,EAAMV,EAAEG,MAAM,EAAA;YACdQ,IAAMX,EAAAA,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ;SAE1BQ,CAAAA,CAAAA,QAAQ,CAACZ,CAAAA,CAAEG,MAAM,EAAA,CAAA;AACtB;AAEA,IAAA,IAAIU,aAAgB,GAAA;QAClB,OAAOb,CAAAA,CAAEC,MAAM,CAAC,EAAC,CAAA;AACnB;AArBA,IAAA,WAAA,CAAmBa,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB;AAoBF;;;;"}
|
|
@@ -27,14 +27,7 @@ declare const _default: {
|
|
|
27
27
|
};
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
|
-
'content-api':
|
|
31
|
-
type: string;
|
|
32
|
-
routes: {
|
|
33
|
-
method: string;
|
|
34
|
-
path: string;
|
|
35
|
-
handler: string;
|
|
36
|
-
}[];
|
|
37
|
-
};
|
|
30
|
+
'content-api': () => import("@strapi/types/dist/core").RouterInput;
|
|
38
31
|
};
|
|
39
32
|
controllers: {
|
|
40
33
|
email: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAOE"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
routes: {
|
|
4
|
-
method: string;
|
|
5
|
-
path: string;
|
|
6
|
-
handler: string;
|
|
7
|
-
}[];
|
|
8
|
-
};
|
|
1
|
+
import type { Core } from '@strapi/types';
|
|
2
|
+
declare const _default: () => Core.RouterInput;
|
|
9
3
|
export default _default;
|
|
10
4
|
//# sourceMappingURL=content-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/content-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/content-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;8BAGvB,KAAK,WAAW;AAAnC,wBAiBE"}
|
|
@@ -15,13 +15,6 @@ export declare const routes: {
|
|
|
15
15
|
};
|
|
16
16
|
}[];
|
|
17
17
|
};
|
|
18
|
-
'content-api':
|
|
19
|
-
type: string;
|
|
20
|
-
routes: {
|
|
21
|
-
method: string;
|
|
22
|
-
path: string;
|
|
23
|
-
handler: string;
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
18
|
+
'content-api': () => import("@strapi/types/dist/core").RouterInput;
|
|
26
19
|
};
|
|
27
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAGlB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Core } from '@strapi/types';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
export declare class EmailRouteValidator {
|
|
4
|
+
protected readonly _strapi: Core.Strapi;
|
|
5
|
+
constructor(strapi: Core.Strapi);
|
|
6
|
+
get sendEmailInput(): z.ZodObject<{
|
|
7
|
+
from: z.ZodOptional<z.ZodString>;
|
|
8
|
+
to: z.ZodString;
|
|
9
|
+
cc: z.ZodOptional<z.ZodString>;
|
|
10
|
+
bcc: z.ZodOptional<z.ZodString>;
|
|
11
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
12
|
+
subject: z.ZodString;
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
html: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$catchall<z.ZodString>>;
|
|
16
|
+
get emailResponse(): z.ZodObject<{}, z.core.$strip>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBAErB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC,IAAI,cAAc;;;;;;;;;sCAajB;IAED,IAAI,aAAa,mCAEhB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/email",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.0",
|
|
4
4
|
"description": "Easily configure your Strapi application to send emails.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,17 +58,18 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@strapi/design-system": "2.0.0-rc.29",
|
|
60
60
|
"@strapi/icons": "2.0.0-rc.29",
|
|
61
|
-
"@strapi/provider-email-sendmail": "5.
|
|
62
|
-
"@strapi/utils": "5.
|
|
61
|
+
"@strapi/provider-email-sendmail": "5.20.0",
|
|
62
|
+
"@strapi/utils": "5.20.0",
|
|
63
63
|
"koa2-ratelimit": "^1.1.3",
|
|
64
64
|
"lodash": "4.17.21",
|
|
65
65
|
"react-intl": "6.6.2",
|
|
66
66
|
"react-query": "3.39.3",
|
|
67
|
-
"yup": "0.32.9"
|
|
67
|
+
"yup": "0.32.9",
|
|
68
|
+
"zod": "3.25.67"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@strapi/admin": "5.
|
|
71
|
-
"@strapi/types": "5.
|
|
71
|
+
"@strapi/admin": "5.20.0",
|
|
72
|
+
"@strapi/types": "5.20.0",
|
|
72
73
|
"@testing-library/react": "15.0.7",
|
|
73
74
|
"@types/koa": "2.13.4",
|
|
74
75
|
"@types/lodash": "^4.14.191",
|