Sidecar Logo

middleware/mailhandler.ts

Created: 2025-12-18T19:36:56.028Z Modified: 2025-12-19T15:53:24.759Z

Configuration

/**
 * Sidecar Config for middleware/mailhandler.ts
 */
module.exports = {
  title: "mailhandler.ts",
  description: "Auto-generated draft",
  created: "2025-12-18T19:36:56.028Z",
  modified: "2025-12-19T15:53:24.759Z",
};

Route Flow Map

--- title: "Route Flow: ssutil /src/middleware/mailhandler.ts " --- flowchart TD subgraph GET ["GET"] hono_get__ui["GET /ui"] style hono_get__ui fill:#5E377B,color:#fff,stroke:#B4976A listTemplatesRoute["GET /templates"] style listTemplatesRoute fill:#5E377B,color:#fff,stroke:#B4976A getTemplateRoute["GET /{template}"] style getTemplateRoute fill:#5E377B,color:#fff,stroke:#B4976A end subgraph POST ["POST"] sendEmailRoute["POST /{template}"] style sendEmailRoute fill:#5E377B,color:#fff,stroke:#B4976A end subgraph API ["API"] openapi_listTemplatesRoute["API listTemplatesRoute"] style openapi_listTemplatesRoute fill:#5E377B,color:#fff,stroke:#B4976A openapi_getTemplateRoute["API getTemplateRoute"] style openapi_getTemplateRoute fill:#5E377B,color:#fff,stroke:#B4976A openapi_sendEmailRoute["API sendEmailRoute"] style openapi_sendEmailRoute fill:#5E377B,color:#fff,stroke:#B4976A end subgraph DOC ["DOC"] hono_doc__doc["DOC /doc"] style hono_doc__doc fill:#5E377B,color:#fff,stroke:#B4976A end generateExampleValue{{"generateExampleValue"}} style generateExampleValue fill:#161b22,color:#fff,stroke:#c2a35d cleanSubject{{"cleanSubject"}} style cleanSubject fill:#161b22,color:#fff,stroke:#c2a35d generateTemplateExamples{{"generateTemplateExamples"}} style generateTemplateExamples fill:#161b22,color:#fff,stroke:#c2a35d listTemplatesRoute --> openapi_listTemplatesRoute getTemplateRoute --> openapi_getTemplateRoute sendEmailRoute --> openapi_sendEmailRoute generateTemplateExamples --> generateExampleValue linkStyle default stroke:#c2a35d,stroke-width:2px,color:#fff classDef default color:#fff

AST Code Structure

--- title: "AST Structure: ssutil /src/middleware/mailhandler.ts " --- %%{init: { 'flowchart': { 'nodeSpacing': 20, 'rankSpacing': 30 }, 'themeVariables': { 'fontSize': '11px' } } }%% graph LR n0["SF"] n2["@hono/zod-openapi"] style n2 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n3["ID: OpenAPIHono"] n0 --> n3 n3 --> n2 style n3 stroke-dasharray:5,stroke:#B4976A n4["ID: createRoute"] n0 --> n4 n4 --> n2 style n4 stroke-dasharray:5,stroke:#B4976A n5["ID: z"] n0 --> n5 n5 --> n2 style n5 stroke-dasharray:5,stroke:#B4976A n7["@hono/swagger-ui"] style n7 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n8["ID: swaggerUI"] n0 --> n8 n8 --> n7 style n8 stroke-dasharray:5,stroke:#B4976A n10["../utils/mailout.js"] style n10 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 style n10 cursor:pointer,stroke-width:2px,stroke:#B4976A n11["ID: sendEmail"] n0 --> n11 n11 --> n10 style n11 stroke-dasharray:5,stroke:#B4976A n12["ID: prepareTemplateData"] n0 --> n12 n12 --> n10 style n12 stroke-dasharray:5,stroke:#B4976A n13["ID: listEmailTemplates"] n0 --> n13 n13 --> n10 style n13 stroke-dasharray:5,stroke:#B4976A n14["ID: getEmailTemplate"] n0 --> n14 n14 --> n10 style n14 stroke-dasharray:5,stroke:#B4976A n587["CE: app.openAPIRegistry.registerComponent('securitySchemes')"] n0 --> n587 n608["CE: app.doc('/doc')"] n0 --> n608 n639["CE: app.get('/ui')"] n0 --> n639 n644["CE: swaggerUI"] n639 --> n644 n650["FD: generateExampleValue"] n0 --> n650 n800["FD: cleanSubject"] n0 --> n800 n819["FD: generateTemplateExamples"] n0 --> n819 n949["CE: createRoute(listTemplatesRoute)"] n0 --> n949 n990["CE: app.openapi(listTemplatesRoute)"] n0 --> n990 n1068["CE: c.json"] n990 --> n1068 n1078["CE: createRoute(getTemplateRoute)"] n0 --> n1078 n1166["CE: app.openapi(getTemplateRoute)"] n0 --> n1166 n1203["CE: c.json(400)"] n1166 --> n1203 n1225["CE: c.json"] n1166 --> n1225 n1278["CE: createRoute(sendEmailRoute)"] n0 --> n1278 n1396["CE: app.openapi(sendEmailRoute)"] n0 --> n1396 subgraph sub1408 ["Safe Boundary"] n1467["CE: c.json(400)"] n1396 --> n1467 n1524["CE: c.json(400)"] n1396 --> n1524 subgraph sub1559 ["Safe Boundary"] n1564["CE: sendEmail"] n1396 --> n1564 n1591["CE: c.json({ success:)"] n1396 --> n1591 n1608["CE: c.json(500)"] n1396 --> n1608 end end style n0 fill:#5E377B,color:#fff,stroke:#B4976A linkStyle default stroke:#c2a35d,stroke-width:1px,opacity:0.6 click n10 "../utils/mailout.html" "View Documentation"
CE CallExpressionFD FunctionDeclarationID ImportDeclarationSF SourceFileTS TryStatement