Sidecar Logo

middleware/slackhandler.ts

Configuration

/**
 * Sidecar Config for middleware/slackhandler.ts
 */
module.exports = {
  title: "slackhandler.ts",
  description: "Auto-generated draft",
};

Route Flow Map

--- title: "Route Flow: ssutil/src/middleware/slackhandler.ts" --- flowchart TD title["Route Flow: ssutil/src/middleware/slackhandler.ts"] style title fill:none,stroke:none,color:#B4976A,font-size:18px 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"] sendSlackMessageRoute["POST /{template}"] style sendSlackMessageRoute 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_sendSlackMessageRoute["API sendSlackMessageRoute"] style openapi_sendSlackMessageRoute 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 generateTemplateExamples{{"generateTemplateExamples"}} style generateTemplateExamples fill:#161b22,color:#fff,stroke:#c2a35d listTemplatesRoute --> openapi_listTemplatesRoute getTemplateRoute --> openapi_getTemplateRoute sendSlackMessageRoute --> openapi_sendSlackMessageRoute generateTemplateExamples --> generateExampleValue linkStyle default stroke:#c2a35d,stroke-width:2px,color:#fff classDef default color:#fff

AST Code Structure

--- title: "AST Structure: ssutil/src/middleware/slackhandler.ts" --- graph TD n0["SF"] n1["ID"] n0 --> n1 n3["OpenAPIHono"] n1 --> n3 n3 --> n2 style n3 stroke-dasharray:5,stroke:#B4976A n4["createRoute"] n1 --> n4 n4 --> n2 style n4 stroke-dasharray:5,stroke:#B4976A n5["z"] n1 --> n5 n5 --> n2 style n5 stroke-dasharray:5,stroke:#B4976A n2["@hono/zod-openapi"] style n2 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n6["ID"] n0 --> n6 n8["swaggerUI"] n6 --> n8 n8 --> n7 style n8 stroke-dasharray:5,stroke:#B4976A n7["@hono/swagger-ui"] style n7 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n9["ID"] n0 --> n9 n11["sendSlackMessage"] n9 --> n11 n11 --> n10 style n11 stroke-dasharray:5,stroke:#B4976A n12["prepareSlackTemplateData"] n9 --> n12 n12 --> n10 style n12 stroke-dasharray:5,stroke:#B4976A n13["validateSlackTemplateData"] n9 --> n13 n13 --> n10 style n13 stroke-dasharray:5,stroke:#B4976A n14["getSlackTemplate"] n9 --> n14 n14 --> n10 style n14 stroke-dasharray:5,stroke:#B4976A n15["listSlackTemplates"] n9 --> n15 n15 --> n10 style n15 stroke-dasharray:5,stroke:#B4976A n16["getSlackTemplateVariables"] n9 --> n16 n16 --> n10 style n16 stroke-dasharray:5,stroke:#B4976A n10["../utils/slack.js"] style n10 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n27["VS"] n0 --> n27 n29["VD: TemplateNameSchema"] n27 --> n29 n31["CE: z.enum"] n29 --> n31 n47["VS"] n0 --> n47 n49["VD: SlackMessageRequestSchema"] n47 --> n49 n51["CE: z.object({ webhookUrls: z.union([ z.string().url(), z.array(z.string().url()) ]).optional().openapi({ description: 'Slack webhook URL(s) to send the message to. Can be a single URL string or array of URLs. If not provided, will use SLACK_WEBHOOK_URL from environment.', example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' }), webhookUrl: z.string().url().optional().openapi({ description: 'Alternative field name for webhookUrls (single URL)', deprecated: true }), domain: z.string().optional().openapi({ description: 'Domain for ID mapping', example: 'example.com' }), // Common template fields (all optional, as different templates need different fields) _id: z.string().optional(), dealer_name: z.string().optional(), dealerName: z.string().optional(), company: z.string().optional(), partner: z.string().optional(), FirstName: z.string().optional(), firstName: z.string().optional(), namefirst: z.string().optional(), LastName: z.string().optional(), lastName: z.string().optional(), namelast: z.string().optional(), Email: z.string().email().optional(), email: z.string().email().optional(), Phone: z.string().optional(), phone: z.string().optional(), Address1: z.string().optional(), address: z.string().optional(), City: z.string().optional(), city: z.string().optional(), State: z.string().optional(), state: z.string().optional(), Zipcode: z.string().optional(), zipcode: z.string().optional(), zip: z.string().optional(), ClickDate: z.string().optional(), clickDate: z.string().optional(), Page: z.string().optional(), page: z.string().optional(), Source: z.string().optional(), source: z.string().optional(), visitorID: z.string().optional(), visitor_id: z.string().optional(), persona: z.string().optional(), segment: z.string().optional(), personaName: z.string().optional(), segmentName: z.string().optional(), description: z.string().optional(), hashtags: z.string().optional(), median_age: z.string().optional(), median_income: z.string().optional(), married: z.string().optional(), children: z.string().optional(), renters: z.string().optional(), gender_emoji: z.string().optional(), gender_label: z.string().optional(), maplink: z.string().url().optional(), OptInDate: z.string().optional(), optInDate: z.string().optional() }).passthrough"] n49 --> n51 n53["CE: z.object"] n51 --> n53 n60["CE: z.union([ z.string().url(), z.array(z.string().url()) ]).optional().openapi"] n53 --> n60 n62["CE: z.union([ z.string().url(), z.array(z.string().url()) ]).optional"] n60 --> n62 n73["CE: z.string().url().optional().openapi"] n53 --> n73 n75["CE: z.string().url().optional"] n73 --> n75 n86["CE: z.string().optional().openapi"] n53 --> n86 n88["CE: z.string().optional"] n86 --> n88 n99["CE: z.string().optional"] n53 --> n99 n101["CE: z.string"] n99 --> n101 n105["CE: z.string().optional"] n53 --> n105 n107["CE: z.string"] n105 --> n107 n111["CE: z.string().optional"] n53 --> n111 n113["CE: z.string"] n111 --> n113 n117["CE: z.string().optional"] n53 --> n117 n119["CE: z.string"] n117 --> n119 n123["CE: z.string().optional"] n53 --> n123 n125["CE: z.string"] n123 --> n125 n129["CE: z.string().optional"] n53 --> n129 n131["CE: z.string"] n129 --> n131 n135["CE: z.string().optional"] n53 --> n135 n137["CE: z.string"] n135 --> n137 n141["CE: z.string().optional"] n53 --> n141 n143["CE: z.string"] n141 --> n143 n147["CE: z.string().optional"] n53 --> n147 n149["CE: z.string"] n147 --> n149 n153["CE: z.string().optional"] n53 --> n153 n155["CE: z.string"] n153 --> n155 n159["CE: z.string().optional"] n53 --> n159 n161["CE: z.string"] n159 --> n161 n165["CE: z.string().email().optional"] n53 --> n165 n167["CE: z.string().email"] n165 --> n167 n171["CE: z.string().email().optional"] n53 --> n171 n173["CE: z.string().email"] n171 --> n173 n177["CE: z.string().optional"] n53 --> n177 n179["CE: z.string"] n177 --> n179 n183["CE: z.string().optional"] n53 --> n183 n185["CE: z.string"] n183 --> n185 n189["CE: z.string().optional"] n53 --> n189 n191["CE: z.string"] n189 --> n191 n195["CE: z.string().optional"] n53 --> n195 n197["CE: z.string"] n195 --> n197 n201["CE: z.string().optional"] n53 --> n201 n203["CE: z.string"] n201 --> n203 n207["CE: z.string().optional"] n53 --> n207 n209["CE: z.string"] n207 --> n209 n213["CE: z.string().optional"] n53 --> n213 n215["CE: z.string"] n213 --> n215 n219["CE: z.string().optional"] n53 --> n219 n221["CE: z.string"] n219 --> n221 n225["CE: z.string().optional"] n53 --> n225 n227["CE: z.string"] n225 --> n227 n231["CE: z.string().optional"] n53 --> n231 n233["CE: z.string"] n231 --> n233 n237["CE: z.string().optional"] n53 --> n237 n239["CE: z.string"] n237 --> n239 n243["CE: z.string().optional"] n53 --> n243 n245["CE: z.string"] n243 --> n245 n249["CE: z.string().optional"] n53 --> n249 n251["CE: z.string"] n249 --> n251 n255["CE: z.string().optional"] n53 --> n255 n257["CE: z.string"] n255 --> n257 n261["CE: z.string().optional"] n53 --> n261 n263["CE: z.string"] n261 --> n263 n267["CE: z.string().optional"] n53 --> n267 n269["CE: z.string"] n267 --> n269 n273["CE: z.string().optional"] n53 --> n273 n275["CE: z.string"] n273 --> n275 n279["CE: z.string().optional"] n53 --> n279 n281["CE: z.string"] n279 --> n281 n285["CE: z.string().optional"] n53 --> n285 n287["CE: z.string"] n285 --> n287 n291["CE: z.string().optional"] n53 --> n291 n293["CE: z.string"] n291 --> n293 n297["CE: z.string().optional"] n53 --> n297 n299["CE: z.string"] n297 --> n299 n303["CE: z.string().optional"] n53 --> n303 n305["CE: z.string"] n303 --> n305 n309["CE: z.string().optional"] n53 --> n309 n311["CE: z.string"] n309 --> n311 n315["CE: z.string().optional"] n53 --> n315 n317["CE: z.string"] n315 --> n317 n321["CE: z.string().optional"] n53 --> n321 n323["CE: z.string"] n321 --> n323 n327["CE: z.string().optional"] n53 --> n327 n329["CE: z.string"] n327 --> n329 n333["CE: z.string().optional"] n53 --> n333 n335["CE: z.string"] n333 --> n335 n339["CE: z.string().optional"] n53 --> n339 n341["CE: z.string"] n339 --> n341 n345["CE: z.string().optional"] n53 --> n345 n347["CE: z.string"] n345 --> n347 n351["CE: z.string().optional"] n53 --> n351 n353["CE: z.string"] n351 --> n353 n357["CE: z.string().optional"] n53 --> n357 n359["CE: z.string"] n357 --> n359 n363["CE: z.string().optional"] n53 --> n363 n365["CE: z.string"] n363 --> n365 n369["CE: z.string().url().optional"] n53 --> n369 n371["CE: z.string().url"] n369 --> n371 n375["CE: z.string().optional"] n53 --> n375 n377["CE: z.string"] n375 --> n377 n381["CE: z.string().optional"] n53 --> n381 n383["CE: z.string"] n381 --> n383 n386["VS"] n0 --> n386 n388["VD: SlackMessageSuccessResponseSchema"] n386 --> n388 n390["CE: z.object"] n388 --> n390 n397["CE: z.boolean().openapi"] n390 --> n397 n399["CE: z.boolean"] n397 --> n399 n410["CE: z.string().openapi"] n390 --> n410 n412["CE: z.string"] n410 --> n412 n423["CE: z.string().openapi"] n390 --> n423 n425["CE: z.string"] n423 --> n425 n434["VS"] n0 --> n434 n436["VD: SlackMessageErrorResponseSchema"] n434 --> n436 n438["CE: z.object"] n436 --> n438 n445["CE: z.string"] n438 --> n445 n451["CE: z.array(z.string()).optional"] n438 --> n451 n453["CE: z.array"] n451 --> n453 n457["CE: z.string"] n453 --> n457 n461["CE: z.array(z.string()).optional"] n438 --> n461 n463["CE: z.array"] n461 --> n463 n467["CE: z.string"] n463 --> n467 n471["CE: z.boolean().optional"] n438 --> n471 n473["CE: z.boolean"] n471 --> n473 n478["VS"] n0 --> n478 n480["VD: TemplateInfoSchema"] n478 --> n480 n482["CE: z.object"] n480 --> n482 n489["CE: z.string"] n482 --> n489 n495["CE: z.string"] n482 --> n495 n501["CE: z.array"] n482 --> n501 n505["CE: z.string"] n501 --> n505 n509["VS"] n0 --> n509 n511["VD: TemplateDetailResponseSchema"] n509 --> n511 n513["CE: z.object"] n511 --> n513 n520["CE: z.string"] n513 --> n520 n526["CE: z.string"] n513 --> n526 n532["CE: z.array"] n513 --> n532 n536["CE: z.string"] n532 --> n536 n542["CE: z.boolean"] n513 --> n542 n546["VS"] n0 --> n546 n548["VD: TemplatesListResponseSchema"] n546 --> n548 n550["CE: z.object"] n548 --> n550 n557["CE: z.array"] n550 --> n557 n562["VS"] n0 --> n562 n564["VD: app"] n562 --> n564 n566["NE"] n564 --> n566 n574["CE: app.openAPIRegistry.registerComponent"] n0 --> n574 n596["CE: app.doc"] n0 --> n596 n628["CE: app.get"] n0 --> n628 n633["CE: swaggerUI"] n628 --> n633 n639["FD: generateExampleValue"] n0 --> n639 n646["VS"] n639 --> n646 n648["VD: lowerVar"] n646 --> n648 n650["CE: variableName.toLowerCase"] n648 --> n650 n654["IS"] n639 --> n654 n655["BE"] n654 --> n655 n659["RS"] n654 --> n659 n661["IS"] n639 --> n661 n662["BE"] n661 --> n662 n666["RS"] n661 --> n666 n668["IS"] n639 --> n668 n669["BE"] n668 --> n669 n670["BE"] n669 --> n670 n671["BE"] n670 --> n671 n676["BE"] n670 --> n676 n681["BE"] n669 --> n681 n685["RS"] n668 --> n685 n687["IS"] n639 --> n687 n688["BE"] n687 --> n688 n692["RS"] n687 --> n692 n694["IS"] n639 --> n694 n695["BE"] n694 --> n695 n696["BE"] n695 --> n696 n701["BE"] n695 --> n701 n705["RS"] n694 --> n705 n707["IS"] n639 --> n707 n708["BE"] n707 --> n708 n709["BE"] n708 --> n709 n714["BE"] n708 --> n714 n718["RS"] n707 --> n718 n720["IS"] n639 --> n720 n721["BE"] n720 --> n721 n725["RS"] n720 --> n725 n727["IS"] n639 --> n727 n728["BE"] n727 --> n728 n732["RS"] n727 --> n732 n734["IS"] n639 --> n734 n735["BE"] n734 --> n735 n736["BE"] n735 --> n736 n741["BE"] n735 --> n741 n745["RS"] n734 --> n745 n747["IS"] n639 --> n747 n748["BE"] n747 --> n748 n752["RS"] n747 --> n752 n754["IS"] n639 --> n754 n755["BE"] n754 --> n755 n759["RS"] n754 --> n759 n761["IS"] n639 --> n761 n762["BE"] n761 --> n762 n763["BE"] n762 --> n763 n768["BE"] n762 --> n768 n772["RS"] n761 --> n772 n774["IS"] n639 --> n774 n775["BE"] n774 --> n775 n776["BE"] n775 --> n776 n781["BE"] n775 --> n781 n785["RS"] n774 --> n785 n786["CE: new Date().toISOString"] n785 --> n786 n788["NE"] n786 --> n788 n791["IS"] n639 --> n791 n792["BE"] n791 --> n792 n796["RS"] n791 --> n796 n798["IS"] n639 --> n798 n799["BE"] n798 --> n799 n803["RS"] n798 --> n803 n805["IS"] n639 --> n805 n806["BE"] n805 --> n806 n807["BE"] n806 --> n807 n812["BE"] n806 --> n812 n816["RS"] n805 --> n816 n818["IS"] n639 --> n818 n819["BE"] n818 --> n819 n820["BE"] n819 --> n820 n825["BE"] n819 --> n825 n829["RS"] n818 --> n829 n831["IS"] n639 --> n831 n832["BE"] n831 --> n832 n833["BE"] n832 --> n833 n838["BE"] n832 --> n838 n842["RS"] n831 --> n842 n844["IS"] n639 --> n844 n845["BE"] n844 --> n845 n849["RS"] n844 --> n849 n851["IS"] n639 --> n851 n852["BE"] n851 --> n852 n856["RS"] n851 --> n856 n858["IS"] n639 --> n858 n859["BE"] n858 --> n859 n863["RS"] n858 --> n863 n865["IS"] n639 --> n865 n866["BE"] n865 --> n866 n870["RS"] n865 --> n870 n872["IS"] n639 --> n872 n873["BE"] n872 --> n873 n877["RS"] n872 --> n877 n879["IS"] n639 --> n879 n880["BE"] n879 --> n880 n884["RS"] n879 --> n884 n886["IS"] n639 --> n886 n887["BE"] n886 --> n887 n891["RS"] n886 --> n891 n893["IS"] n639 --> n893 n894["BE"] n893 --> n894 n898["RS"] n893 --> n898 n900["IS"] n639 --> n900 n901["BE"] n900 --> n901 n905["RS"] n900 --> n905 n907["IS"] n639 --> n907 n908["BE"] n907 --> n908 n912["RS"] n907 --> n912 n914["RS"] n639 --> n914 n916["FD: generateTemplateExamples"] n0 --> n916 n932["VS"] n916 --> n932 n934["VD: examples"] n932 --> n934 n950["VS"] n916 --> n950 n952["VD: templateNames"] n950 --> n952 n954["CE: listSlackTemplates"] n952 --> n954 n957["CE: templateNames.forEach"] n916 --> n957 n961["AF"] n957 --> n961 n967["VS"] n961 --> n967 n969["VD: template"] n967 --> n969 n971["CE: getSlackTemplate"] n969 --> n971 n972["IS"] n961 --> n972 n975["RS"] n972 --> n975 n976["VS"] n961 --> n976 n978["VD: exampleValue"] n976 --> n978 n993["CE: template.variables?.forEach"] n961 --> n993 n1000["AF"] n993 --> n1000 n1006["IS"] n1000 --> n1006 n1008["BE"] n1000 --> n1008 n1010["BE"] n961 --> n1010 n1022["RS"] n916 --> n1022 n1024["VS"] n0 --> n1024 n1026["VD: templateExamples"] n1024 --> n1026 n1028["CE: generateTemplateExamples"] n1026 --> n1028 n1030["VS"] n0 --> n1030 n1032["VD: listTemplatesRoute"] n1030 --> n1032 n1034["CE: createRoute"] n1032 --> n1034 n1076["CE: app.openapi"] n0 --> n1076 n1081["AF"] n1076 --> n1081 n1087["VS"] n1081 --> n1087 n1089["VD: templateNames"] n1087 --> n1089 n1091["CE: listSlackTemplates"] n1089 --> n1091 n1093["VS"] n1081 --> n1093 n1095["VD: templates"] n1093 --> n1095 n1097["CE: templateNames.map"] n1095 --> n1097 n1101["AF"] n1097 --> n1101 n1102["RS"] n1081 --> n1102 n1103["CE: c.json"] n1102 --> n1103 n1110["VS"] n0 --> n1110 n1112["VD: getTemplateRoute"] n1110 --> n1112 n1114["CE: createRoute"] n1112 --> n1114 n1142["CE: z.object"] n1114 --> n1142 n1149["CE: TemplateNameSchema.openapi"] n1142 --> n1149 n1203["CE: app.openapi"] n0 --> n1203 n1208["AF"] n1203 --> n1208 n1214["VS"] n1208 --> n1214 n1216["VD: { template }"] n1214 --> n1216 n1220["CE: c.req.valid"] n1216 --> n1220 n1227["VS"] n1208 --> n1227 n1229["VD: templateConfig"] n1227 --> n1229 n1231["CE: getSlackTemplate"] n1229 --> n1231 n1234["IS"] n1208 --> n1234 n1238["VS"] n1234 --> n1238 n1240["VD: availableTemplates"] n1238 --> n1240 n1242["CE: listSlackTemplates"] n1240 --> n1242 n1243["RS"] n1234 --> n1243 n1244["CE: c.json"] n1243 --> n1244 n1257["CE: availableTemplates.join"] n1244 --> n1257 n1260["RS"] n1208 --> n1260 n1261["CE: c.json"] n1260 --> n1261 n1270["BE"] n1261 --> n1270 n1278["BE"] n1261 --> n1278 n1287["VS"] n0 --> n1287 n1289["VD: sendSlackMessageRoute"] n1287 --> n1289 n1291["CE: createRoute"] n1289 --> n1291 n1319["CE: z.object"] n1291 --> n1319 n1326["CE: TemplateNameSchema.openapi"] n1319 --> n1326 n1410["CE: app.openapi"] n0 --> n1410 n1415["AF"] n1410 --> n1415 n1421["TS"] n1415 --> n1421 n1423["VS"] n1421 --> n1423 n1425["VD: { template }"] n1423 --> n1425 n1429["CE: c.req.valid"] n1425 --> n1429 n1430["VS"] n1421 --> n1430 n1432["VD: body"] n1430 --> n1432 n1434["CE: c.req.valid"] n1432 --> n1434 n1436["CE: console.log"] n1421 --> n1436 n1443["CE: console.log"] n1421 --> n1443 n1448["CE: JSON.stringify"] n1443 --> n1448 n1453["VS"] n1421 --> n1453 n1455["VD: templateConfig"] n1453 --> n1455 n1457["CE: getSlackTemplate"] n1455 --> n1457 n1458["IS"] n1421 --> n1458 n1462["VS"] n1458 --> n1462 n1464["VD: availableTemplates"] n1462 --> n1464 n1466["CE: console.log"] n1458 --> n1466 n1472["RS"] n1458 --> n1472 n1473["CE: c.json"] n1472 --> n1473 n1474["VS"] n1421 --> n1474 n1476["VD: webhookUrls"] n1474 --> n1476 n1478["BE"] n1476 --> n1478 n1480["CE: console.log"] n1421 --> n1480 n1491["IS"] n1421 --> n1491 n1496["CE: console.log"] n1491 --> n1496 n1501["CE: Object.keys"] n1496 --> n1501 n1511["RS"] n1491 --> n1511 n1512["CE: c.json"] n1511 --> n1512 n1513["VS"] n1421 --> n1513 n1515["VD: templateData"] n1513 --> n1515 n1517["CE: prepareSlackTemplateData"] n1515 --> n1517 n1518["VS"] n1421 --> n1518 n1520["VD: validation"] n1518 --> n1520 n1522["CE: validateSlackTemplateData"] n1520 --> n1522 n1524["CE: console.log"] n1421 --> n1524 n1529["CE: JSON.stringify"] n1524 --> n1529 n1534["IS"] n1421 --> n1534 n1541["CE: console.log"] n1534 --> n1541 n1553["RS"] n1534 --> n1553 n1554["CE: c.json"] n1553 --> n1554 n1555["TS"] n1421 --> n1555 n1557["VS"] n1555 --> n1557 n1559["VD: success"] n1557 --> n1559 n1560["IS"] n1555 --> n1560 n1563["RS"] n1560 --> n1563 n1565["RS"] n1560 --> n1565 n1567["VD: slackError"] n1555 --> n1567 n1570["IS"] n1555 --> n1570 n1571["BE"] n1570 --> n1571 n1573["RS"] n1570 --> n1573 n1577["VD: error"] n1421 --> n1577 n1581["CE: console.error"] n1421 --> n1581 n1587["RS"] n1421 --> n1587 n1588["CE: c.json"] n1587 --> n1588 n1597["BE"] n1588 --> n1597 style n0 fill:#5E377B,color:#fff,stroke:#B4976A linkStyle default stroke:#c2a35d,stroke-width:1px,opacity:0.6
AF ArrowFunctionBE BinaryExpressionCE CallExpressionFD FunctionDeclarationIS IfStatementID ImportDeclarationNE NewExpressionRS ReturnStatementSF SourceFileTS TryStatementVD VariableDeclarationVS VariableStatement