"use strict";

exports.__esModule = true;
exports.defaultPython = void 0;
var defaultPython = "#!/usr/bin/python\n# -*- coding: UTF-8 -*-\nfrom flask import Response\nfrom microapp.context import Context\n\n\n# \u5165\u53E3\u51FD\u6570\uFF0C\u51FD\u6570\u540D\u79F0\u5FC5\u987B\u662Fhandler\n#     \u5165\u53C2\uFF1A\u53EA\u80FD\u5305\u542B\u4E00\u4E2A\u53C2\u6570\uFF0C\u540D\u79F0\u5FC5\u987B\u662Fcontext\uFF0C\u7C7B\u578B\u662FContext\uFF0C\u6CA1\u6709\u9ED8\u8BA4\u503C\n#     \u8FD4\u56DE\uFF1Aflask\u7684Response\u5BF9\u8C61\uFF0C\u5EFA\u8BAE\u4F7F\u7528context.response(data)\uFF0C\n#          data\u7684\u7C7B\u578B\u53EF\u4EE5\u662Fdict, list, set, tuple, int, str, float, bool\u4E2D\u7684\u4E00\u79CD\ndef handler(context: Context) -> Response:\n    # \u76F4\u63A5\u8FD4\u56DE\u8BF7\u6C42\u53C2\u6570\n    data = {\"text\": \"\u6211\u7684\u7B2C\u4E00\u4E2AFaaS API\", \"params\": context.request.get_json_body()}\n    # \u900F\u4F20\u7ED9\u5BA2\u6237\u7AEF\u7684\u5934\u4FE1\u606F\n    headers = {\"X-CustomValue\": \"custom_value\"}\n    # HTTP\u72B6\u6001\u7801\n    status_code = 200\n    # \u54CD\u5E94\u5185\u5BB9\u7C7B\u578B\n    content_type = \"application/json\"\n    # \u8C03\u7528\u5FAE\u5E94\u7528\u63A5\u53E3\uFF0C\u5FAE\u5E94\u7528\u63A5\u53E3\u9ED8\u8BA4\u90FD\u662FPOST\n    # context.app_client().post_form(\"baas_api_name\", {\"id\": 1})\n    # context.app_client().post_json(\"baas_api_name\", {\"id\": 1})\n    # \u8C03\u7528\u7384\u6B66\u4E91API post\n    # context.api_client(\"AK_microapp_account\", \"SK_rd^sg+muc*-<\").get(\"devops-bpc-service/api/v1/your-prefix/get\")\n    # context.api_client(\"AK_microapp_account\", \"SK_rd^sg+muc*-<\").post(\"devops-bpc-service/api/v1/your-prefix/add\", {\"name\": \"test_app\"})\n    # \u8C03\u7528\u5176\u5B83HTTP\u63A5\u53E3\n    # context.http_client().safe_get(url, params=None, headers=None, as_json=True, logger=None)\n    # context.http_client().safe_post(url, data=None, headers=None, as_json=True, logger=None)\n    return context.response(data, headers=headers, status_code=status_code, content_type=content_type)\n\n\n# if \"__main__\" == __name__:\n#     from microapp.command import command_test\n#     command_test(\"account\", \"faas-user-list-by-role\", \"lengguoning\", \"AK_microapp_account\", \"SK_rd^sg+muc*-<\")";
exports.defaultPython = defaultPython;