{"version":3,"sources":["../src/templates.ts","../src/code-templates/class-api-client/index.ts","../src/internal/TsGenerator/index.ts","../src/internal/Exception/index.ts","../src/internal/TsGenerator/factory/index.ts","../src/internal/TsGenerator/factory/ArrowFunction.ts","../src/internal/TsGenerator/factory/BinaryExpression.ts","../src/internal/TsGenerator/factory/Block.ts","../src/internal/TsGenerator/factory/CallExpression.ts","../src/internal/TsGenerator/factory/ClassDeclaration.ts","../src/internal/TsGenerator/factory/ConstructorDeclaration.ts","../src/internal/TsGenerator/factory/ElementAccessExpression.ts","../src/internal/TsGenerator/factory/ExpressionStatement.ts","../src/internal/TsGenerator/factory/FunctionTypeNode.ts","../src/internal/TsGenerator/factory/Identifier.ts","../src/internal/TsGenerator/factory/IndexSignatureDeclaration.ts","../src/internal/TsGenerator/factory/IndexedAccessTypeNode.ts","../src/internal/TsGenerator/factory/InterfaceDeclaration.ts","../src/internal/TsGenerator/factory/utils.ts","../src/internal/TsGenerator/factory/IntersectionTypeNode.ts","../src/internal/TsGenerator/factory/LiteralTypeNode.ts","../src/internal/TsGenerator/factory/MethodDeclaration.ts","../src/internal/TsGenerator/factory/Namespace.ts","../src/internal/TsGenerator/factory/ModuleBlock.ts","../src/internal/TsGenerator/factory/NoSubstitutionTemplateLiteral.ts","../src/internal/TsGenerator/factory/ObjectLiteralExpression.ts","../src/internal/TsGenerator/factory/ParameterDeclaration.ts","../src/internal/TsGenerator/factory/PropertyAccessExpression.ts","../src/internal/TsGenerator/factory/PropertyAssignment.ts","../src/internal/TsGenerator/factory/PropertyDeclaration.ts","../src/internal/TsGenerator/factory/PropertySignature.ts","../src/internal/TsGenerator/factory/RegularExpressionLiteral.ts","../src/internal/TsGenerator/factory/ReturnStatement.ts","../src/internal/TsGenerator/factory/ShorthandPropertyAssignment.ts","../src/internal/TsGenerator/factory/StringLiteral.ts","../src/internal/TsGenerator/factory/TemplateExpression.ts","../src/internal/TsGenerator/factory/TemplateHead.ts","../src/internal/TsGenerator/factory/TemplateMiddle.ts","../src/internal/TsGenerator/factory/TemplateSpan.ts","../src/internal/TsGenerator/factory/TemplateTail.ts","../src/internal/TsGenerator/factory/TypeAliasDeclaration.ts","../src/internal/TsGenerator/factory/TypeLiteralNode.ts","../src/internal/TsGenerator/factory/TypeNode.ts","../src/internal/TsGenerator/factory/UnionTypeNode.ts","../src/internal/TsGenerator/factory/TypeOperatorNode.ts","../src/internal/TsGenerator/factory/TypeParameterDeclaration.ts","../src/internal/TsGenerator/factory/TypeReferenceNode.ts","../src/internal/TsGenerator/factory/VariableDeclaration.ts","../src/internal/TsGenerator/factory/VariableDeclarationList.ts","../src/internal/TsGenerator/factory/VariableStatement.ts","../src/internal/TsGenerator/traverse.ts","../src/internal/TsGenerator/utils.ts","../src/utils.ts","../src/code-templates/_shared/ApiClientArgument.ts","../src/code-templates/_shared/ApiClientInterface.ts","../src/code-templates/class-api-client/ApiClientClass/Class.ts","../src/code-templates/class-api-client/ApiClientClass/Constructor.ts","../src/code-templates/class-api-client/ApiClientClass/Method.ts","../src/code-templates/_shared/utils.ts","../src/code-templates/_shared/MethodBody/createEncodingMap.ts","../src/code-templates/_shared/MethodBody/CallRequest.ts","../src/code-templates/_shared/MethodBody/HeaderParameter.ts","../src/code-templates/_shared/MethodBody/PathParameter.ts","../src/code-templates/_shared/MethodBody/QueryParameter.ts","../src/code-templates/_shared/MethodBody/index.ts","../src/code-templates/class-api-client/ApiClientClass/index.ts","../src/code-templates/functional-api-client/index.ts","../src/code-templates/functional-api-client/FunctionalApiClient/index.ts","../src/code-templates/functional-api-client/FunctionalApiClient/ArrowFunction.ts","../src/code-templates/functional-api-client/FunctionalApiClient/ClientTypeDefinition.ts","../src/code-templates/currying-functional-api-client/index.ts","../src/code-templates/currying-functional-api-client/FunctionalApiClient/index.ts","../src/code-templates/currying-functional-api-client/FunctionalApiClient/CurryingArrowFunction.ts"],"sourcesContent":["export * as ClassApiClient from \"./code-templates/class-api-client\";\nexport * as FunctionalApiClient from \"./code-templates/functional-api-client\";\nexport * as CurryingFunctionalApiClient from \"./code-templates/currying-functional-api-client\";\n","import ts from \"typescript\";\n\nimport { TsGenerator } from \"../../api\";\nimport type { CodeGenerator } from \"../../types\";\nimport * as ApiClientArgument from \"../_shared/ApiClientArgument\";\nimport type { Option } from \"../_shared/types\";\nimport * as ApiClientClass from \"./ApiClientClass\";\n\nexport { Option };\n\nexport const generator: CodeGenerator.GenerateFunction<Option> = (\n  codeGeneratorParamsList: CodeGenerator.Params[],\n  option?: Option,\n): CodeGenerator.IntermediateCode[] => {\n  const statements: ts.Statement[] = [];\n  const factory = TsGenerator.Factory.create();\n  codeGeneratorParamsList.forEach(codeGeneratorParams => {\n    const { convertedParams } = codeGeneratorParams;\n    if (convertedParams.hasRequestBody) {\n      statements.push(ApiClientArgument.createRequestContentTypeReference(factory, codeGeneratorParams));\n    }\n    if (convertedParams.responseSuccessNames.length > 0) {\n      statements.push(ApiClientArgument.createResponseContentTypeReference(factory, codeGeneratorParams));\n    }\n    const typeDeclaration = ApiClientArgument.create(factory, codeGeneratorParams);\n    if (typeDeclaration) {\n      statements.push(typeDeclaration);\n    }\n  });\n  ApiClientClass.create(factory, codeGeneratorParamsList, option || {}).forEach(newStatement => {\n    statements.push(newStatement);\n  });\n  return statements;\n};\n","import ts from \"typescript\";\n\nimport { DevelopmentError } from \"../Exception\";\nimport * as Factory from \"./factory\";\nimport { CreateFunction, traverse } from \"./traverse\";\n\nexport * as Utils from \"./utils\";\n\nexport { type CreateFunction, Factory };\n\nexport type TransformerFactory<T extends ts.Node> = ts.TransformerFactory<T>;\n\nexport const convertAstToTypeScriptCode = (sourceFile: ts.SourceFile): string => {\n  const printer = ts.createPrinter(); // AST -> TypeScriptに変換\n  return printer.printFile(sourceFile);\n};\n\nexport const generate = (createFunction: CreateFunction): string => {\n  const source = ts.createSourceFile(\"\", \"\", ts.ScriptTarget.ESNext);\n  const transformers: TransformerFactory<ts.SourceFile>[] = [traverse(createFunction)];\n  const result = ts.transform(source, transformers);\n  result.dispose();\n  if (result.transformed.length > 1) {\n    throw new DevelopmentError(\"Invalid length\");\n  }\n  return convertAstToTypeScriptCode(result.transformed[0]);\n};\n","export abstract class BaseError extends Error {\n  constructor(message: string) {\n    super(message);\n    Object.setPrototypeOf(this, new.target.prototype);\n  }\n}\n\nexport class UnsetTypeError extends BaseError {}\n\nexport class UnSupportError extends BaseError {}\n\nexport class UnknownError extends BaseError {}\n\nexport class NotFoundFileError extends BaseError {}\n\nexport class NotFoundReference extends BaseError {}\n\nexport class FeatureDevelopmentError extends BaseError {}\n\nexport class SchemaOnlySupportError extends BaseError {}\n\nexport class UndefinedComponent extends BaseError {}\n\nexport class DevelopmentError extends BaseError {}\n","import ts from \"typescript\";\n\nimport * as ArrowFunction from \"./ArrowFunction\";\nimport * as BinaryExpression from \"./BinaryExpression\";\nimport * as Block from \"./Block\";\nimport * as CallExpression from \"./CallExpression\";\nimport * as ClassDeclaration from \"./ClassDeclaration\";\nimport * as ConstructorDeclaration from \"./ConstructorDeclaration\";\nimport * as ElementAccessExpression from \"./ElementAccessExpression\";\nimport * as ExpressionStatement from \"./ExpressionStatement\";\nimport * as FunctionTypeNode from \"./FunctionTypeNode\";\nimport * as Identifier from \"./Identifier\";\nimport * as IndexSignatureDeclaration from \"./IndexSignatureDeclaration\";\nimport * as IndexedAccessTypeNode from \"./IndexedAccessTypeNode\";\nimport * as InterfaceDeclaration from \"./InterfaceDeclaration\";\nimport * as IntersectionTypeNode from \"./IntersectionTypeNode\";\nimport * as LiteralTypeNode from \"./LiteralTypeNode\";\nimport * as MethodDeclaration from \"./MethodDeclaration\";\nimport * as Namespace from \"./Namespace\";\nimport * as NoSubstitutionTemplateLiteral from \"./NoSubstitutionTemplateLiteral\";\nimport * as ObjectLiteralExpression from \"./ObjectLiteralExpression\";\nimport * as ParameterDeclaration from \"./ParameterDeclaration\";\nimport * as PropertyAccessExpression from \"./PropertyAccessExpression\";\nimport * as PropertyAssignment from \"./PropertyAssignment\";\nimport * as PropertyDeclaration from \"./PropertyDeclaration\";\nimport * as PropertySignature from \"./PropertySignature\";\nimport * as RegularExpressionLiteral from \"./RegularExpressionLiteral\";\nimport * as ReturnStatement from \"./ReturnStatement\";\nimport * as ShorthandPropertyAssignment from \"./ShorthandPropertyAssignment\";\nimport * as StringLiteral from \"./StringLiteral\";\nimport * as TemplateExpression from \"./TemplateExpression\";\nimport * as TemplateHead from \"./TemplateHead\";\nimport * as TemplateMiddle from \"./TemplateMiddle\";\nimport * as TemplateSpan from \"./TemplateSpan\";\nimport * as TemplateTail from \"./TemplateTail\";\nimport * as TypeAliasDeclaration from \"./TypeAliasDeclaration\";\nimport * as TypeLiteralNode from \"./TypeLiteralNode\";\nimport * as TypeNode from \"./TypeNode\";\nimport * as TypeOperatorNode from \"./TypeOperatorNode\";\nimport * as TypeParameterDeclaration from \"./TypeParameterDeclaration\";\nimport * as TypeReferenceNode from \"./TypeReferenceNode\";\nimport * as UnionTypeNode from \"./UnionTypeNode\";\nimport * as VariableDeclaration from \"./VariableDeclaration\";\nimport * as VariableDeclarationList from \"./VariableDeclarationList\";\nimport * as VariableStatement from \"./VariableStatement\";\nexport interface Type {\n  ArrowFunction: ArrowFunction.Factory;\n  Block: Block.Factory;\n  ClassDeclaration: ClassDeclaration.Factory;\n  InterfaceDeclaration: InterfaceDeclaration.Factory;\n  ParameterDeclaration: ParameterDeclaration.Factory;\n  IndexedAccessTypeNode: IndexedAccessTypeNode.Factory;\n  MethodDeclaration: MethodDeclaration.Factory;\n  TypeOperatorNode: TypeOperatorNode.Factory;\n  Namespace: Namespace.Factory;\n  PropertySignature: PropertySignature.Factory;\n  PropertyDeclaration: PropertyDeclaration.Factory;\n  RegularExpressionLiteral: RegularExpressionLiteral.Factory;\n  TypeAliasDeclaration: TypeAliasDeclaration.Factory;\n  TypeNode: TypeNode.Factory;\n  LiteralTypeNode: LiteralTypeNode.Factory;\n  IndexSignatureDeclaration: IndexSignatureDeclaration.Factory;\n  UnionTypeNode: UnionTypeNode.Factory;\n  IntersectionTypeNode: IntersectionTypeNode.Factory;\n  TypeReferenceNode: TypeReferenceNode.Factory;\n  TypeParameterDeclaration: TypeParameterDeclaration.Factory;\n  ConstructorDeclaration: ConstructorDeclaration.Factory;\n  ReturnStatement: ReturnStatement.Factory;\n  VariableDeclaration: VariableDeclaration.Factory;\n  VariableDeclarationList: VariableDeclarationList.Factory;\n  VariableStatement: VariableStatement.Factory;\n  BinaryExpression: BinaryExpression.Factory;\n  PropertyAccessExpression: PropertyAccessExpression.Factory;\n  NoSubstitutionTemplateLiteral: NoSubstitutionTemplateLiteral.Factory;\n  TemplateSpan: TemplateSpan.Factory;\n  TemplateExpression: TemplateExpression.Factory;\n  TemplateHead: TemplateHead.Factory;\n  TemplateMiddle: TemplateMiddle.Factory;\n  TemplateTail: TemplateTail.Factory;\n  Identifier: Identifier.Factory;\n  PropertyAssignment: PropertyAssignment.Factory;\n  ObjectLiteralExpression: ObjectLiteralExpression.Factory;\n  ElementAccessExpression: ElementAccessExpression.Factory;\n  ExpressionStatement: ExpressionStatement.Factory;\n  CallExpression: CallExpression.Factory;\n  StringLiteral: StringLiteral.Factory;\n  FunctionTypeNode: FunctionTypeNode.Factory;\n  TypeLiteralNode: TypeLiteralNode.Factory;\n  ShorthandPropertyAssignment: ShorthandPropertyAssignment.Factory;\n}\n\nexport const create = (): Type => {\n  const context: Pick<ts.TransformationContext, \"factory\"> = {\n    factory: ts.factory,\n  };\n  return {\n    ArrowFunction: ArrowFunction.make(context),\n    Block: Block.make(context),\n    ClassDeclaration: ClassDeclaration.make(context),\n    ParameterDeclaration: ParameterDeclaration.make(context),\n    InterfaceDeclaration: InterfaceDeclaration.make(context),\n    IndexedAccessTypeNode: IndexedAccessTypeNode.make(context),\n    Namespace: Namespace.make(context),\n    PropertySignature: PropertySignature.make(context),\n    PropertyDeclaration: PropertyDeclaration.make(context),\n    TypeAliasDeclaration: TypeAliasDeclaration.make(context),\n    TypeNode: TypeNode.make(context),\n    LiteralTypeNode: LiteralTypeNode.make(context),\n    IndexSignatureDeclaration: IndexSignatureDeclaration.make(context),\n    UnionTypeNode: UnionTypeNode.make(context),\n    IntersectionTypeNode: IntersectionTypeNode.make(context),\n    TypeReferenceNode: TypeReferenceNode.make(context),\n    TypeParameterDeclaration: TypeParameterDeclaration.make(context),\n    TypeOperatorNode: TypeOperatorNode.make(context),\n    MethodDeclaration: MethodDeclaration.make(context),\n    ConstructorDeclaration: ConstructorDeclaration.make(context),\n    ReturnStatement: ReturnStatement.make(context),\n    VariableDeclaration: VariableDeclaration.make(context),\n    VariableDeclarationList: VariableDeclarationList.make(context),\n    VariableStatement: VariableStatement.make(context),\n    BinaryExpression: BinaryExpression.make(context),\n    PropertyAccessExpression: PropertyAccessExpression.make(context),\n    RegularExpressionLiteral: RegularExpressionLiteral.make(context),\n    NoSubstitutionTemplateLiteral: NoSubstitutionTemplateLiteral.make(context),\n    TemplateSpan: TemplateSpan.make(context),\n    TemplateExpression: TemplateExpression.make(context),\n    TemplateHead: TemplateHead.make(context),\n    TemplateMiddle: TemplateMiddle.make(context),\n    TemplateTail: TemplateTail.make(context),\n    Identifier: Identifier.make(context),\n    ShorthandPropertyAssignment: ShorthandPropertyAssignment.make(context),\n    PropertyAssignment: PropertyAssignment.make(context),\n    ObjectLiteralExpression: ObjectLiteralExpression.make(context),\n    ElementAccessExpression: ElementAccessExpression.make(context),\n    ExpressionStatement: ExpressionStatement.make(context),\n    CallExpression: CallExpression.make(context),\n    StringLiteral: StringLiteral.make(context),\n    FunctionTypeNode: FunctionTypeNode.make(context),\n    TypeLiteralNode: TypeLiteralNode.make(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  typeParameters: ts.TypeParameterDeclaration[] | undefined;\n  parameters: ts.ParameterDeclaration[];\n  type?: ts.TypeNode;\n  equalsGreaterThanToken?: ts.EqualsGreaterThanToken;\n  body: ts.ConciseBody;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ArrowFunction;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ArrowFunction => {\n    const node = factory.createArrowFunction(\n      undefined,\n      params.typeParameters,\n      params.parameters,\n      params.type,\n      params.equalsGreaterThanToken,\n      params.body,\n    );\n\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nconst operators = {\n  \"+\": ts.SyntaxKind.PlusToken,\n  \"=\": ts.SyntaxKind.EqualsToken,\n} as const;\n\nexport interface Params {\n  left: ts.Expression;\n  operator: keyof typeof operators;\n  right: ts.Expression;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.BinaryExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.BinaryExpression => {\n    const node = factory.createBinaryExpression(params.left, operators[params.operator], params.right);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  statements: readonly ts.Statement[];\n  multiLine: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.Block;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.Block => {\n    const node = factory.createBlock(params.statements, params.multiLine);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  expression: ts.Expression;\n  typeArguments?: readonly ts.TypeNode[] | undefined;\n  argumentsArray: readonly ts.Expression[];\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.CallExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.CallExpression => {\n    const node = factory.createCallExpression(params.expression, params.typeArguments, params.argumentsArray);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n  export?: true;\n  members: readonly ts.ClassElement[];\n  typeParameterDeclaration: readonly ts.TypeParameterDeclaration[];\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ClassDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ClassDeclaration => {\n    const node = factory.createClassDeclaration(\n      params.export && [factory.createModifier(ts.SyntaxKind.ExportKeyword)],\n      factory.createIdentifier(params.name),\n      params.typeParameterDeclaration,\n      undefined,\n      params.members,\n    );\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  parameters?: ts.ParameterDeclaration[];\n  body?: ts.Block;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ConstructorDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ConstructorDeclaration => {\n    const node = factory.createConstructorDeclaration(undefined, params.parameters || [], params.body);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  expression: ts.Expression;\n  index: number | string | ts.Expression;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ElementAccessExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ElementAccessExpression => {\n    const index = typeof params.index === \"string\" ? factory.createStringLiteral(params.index) : params.index;\n    const node = factory.createElementAccessExpression(params.expression, index);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  expression: ts.Expression;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ExpressionStatement;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ExpressionStatement => {\n    const node = factory.createExpressionStatement(params.expression);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  typeParameters: readonly ts.TypeParameterDeclaration[] | undefined;\n  parameters: readonly ts.ParameterDeclaration[];\n  type: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.FunctionTypeNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.FunctionTypeNode => {\n    const node = factory.createFunctionTypeNode(params.typeParameters, params.parameters, params.type);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  name: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.Identifier;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.Identifier => {\n    const node = factory.createIdentifier(params.name);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n  type: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.IndexSignatureDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.IndexSignatureDeclaration => {\n    const node = factory.createIndexSignature(\n      undefined,\n      // TODO Feature Development: Refactoring\n      [\n        factory.createParameterDeclaration(\n          undefined,\n          undefined,\n          factory.createIdentifier(params.name),\n          undefined,\n          factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword),\n          undefined,\n        ),\n      ],\n      params.type,\n    );\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  objectType: ts.TypeNode;\n  indexType: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.IndexedAccessTypeNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.IndexedAccessTypeNode => {\n    const node = factory.createIndexedAccessTypeNode(params.objectType, params.indexType);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { escapeIdentiferText, generateComment } from \"./utils\";\n\nexport interface Params$Create {\n  export?: true;\n  deprecated?: boolean;\n  name: string;\n  members: readonly ts.TypeElement[];\n  typeParameters?: readonly ts.TypeParameterDeclaration[];\n  comment?: string;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.InterfaceDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.InterfaceDeclaration => {\n    const node = ts.factory.createInterfaceDeclaration(\n      params.export && [factory.createModifier(ts.SyntaxKind.ExportKeyword)],\n      factory.createIdentifier(escapeIdentiferText(params.name)),\n      params.typeParameters,\n      undefined,\n      params.members,\n    );\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import { EOL } from \"os\";\n\nexport interface Comment {\n  hasTrailingNewLine: boolean;\n  value: string;\n}\n\nexport const isOnlyAlphabetText = (text: string): boolean => {\n  return new RegExp(/^[a-zA-Z]+$/).test(text);\n};\n\nexport const escapeIdentiferText = (text: string): string => {\n  return text.replace(/-/g, \"_\");\n};\n\nexport const generateComment = (comment: string, deprecated?: boolean): Comment => {\n  const excapedComment = comment\n    .replace(/\\*\\//, \"\\\\*\\\\\\\\/\") // */  -> \\*\\/\n    .replace(/\\/\\*/, \"/\\\\\\\\*\") // /*  -> \\/\\*\n    .replace(/\\*\\/\\*/, \"\\\\*\\\\/\\\\*\"); // */* -> \\*\\/\\*\n  const splitComments = deprecated ? [\"@deprecated\"].concat(excapedComment.split(/\\r?\\n/)) : excapedComment.split(/\\r?\\n/);\n  const comments = splitComments.filter((comment, index) => {\n    if (index === splitComments.length - 1 && comment === \"\") {\n      return false;\n    }\n    return true;\n  });\n  if (comments.length === 1) {\n    return {\n      hasTrailingNewLine: true,\n      value: `* ${comments.join(\"\")} `,\n    };\n  }\n  return {\n    hasTrailingNewLine: true,\n    value: `*${EOL}${comments.map(comment => ` * ${comment}`).join(EOL)}${EOL} `,\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  typeNodes: ts.TypeNode[];\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.IntersectionTypeNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.IntersectionTypeNode => {\n    const node = factory.createIntersectionTypeNode(params.typeNodes);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { generateComment } from \"./utils\";\n\nexport interface Params {\n  value: string | boolean | number;\n  comment?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.LiteralTypeNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.LiteralTypeNode => {\n    const createNode = () => {\n      if (typeof params.value === \"string\") {\n        const literal = ts.setEmitFlags(factory.createStringLiteral(params.value), ts.EmitFlags.NoAsciiEscaping);\n        return factory.createLiteralTypeNode(literal);\n      }\n\n      if (typeof params.value === \"number\") {\n        return factory.createLiteralTypeNode(factory.createNumericLiteral(params.value));\n      }\n      return factory.createLiteralTypeNode(params.value ? factory.createTrue() : factory.createFalse());\n    };\n    const node = createNode();\n    if (params.comment) {\n      const comment = generateComment(params.comment);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { generateComment } from \"./utils\";\n\nexport interface Params$Create {\n  name: string;\n  async?: boolean;\n  private?: boolean;\n  typeParameters?: readonly ts.TypeParameterDeclaration[];\n  parameters?: ts.ParameterDeclaration[];\n  type?: ts.TypeNode;\n  body?: ts.Block;\n  comment?: string;\n  deprecated?: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.MethodDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.MethodDeclaration => {\n    const modifiers: ts.Modifier[] = [];\n    if (params.private) {\n      modifiers.push(factory.createModifier(ts.SyntaxKind.PrivateKeyword));\n    } else {\n      modifiers.push(factory.createModifier(ts.SyntaxKind.PublicKeyword));\n    }\n    if (params.async) {\n      modifiers.push(factory.createModifier(ts.SyntaxKind.AsyncKeyword));\n    }\n    const node = factory.createMethodDeclaration(\n      modifiers,\n      undefined,\n      factory.createIdentifier(params.name),\n      undefined,\n      params.typeParameters,\n      params.parameters || [],\n      params.type,\n      params.body,\n    );\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport * as ModuleBlock from \"./ModuleBlock\";\nimport { generateComment } from \"./utils\";\n\nexport interface Params$FindStatement {\n  node: ts.ModuleDeclaration;\n  name: string;\n}\n\nexport interface Params$Create {\n  export?: true;\n  name: string;\n  statements: ts.Statement[];\n  comment?: string;\n  deprecated?: boolean;\n}\n\nexport interface Params$CreateMulti extends Omit<Params$Create, \"name\"> {\n  names: string[];\n}\nexport interface Params$Update {\n  node: ts.ModuleDeclaration;\n  statements: ts.Statement[];\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ModuleDeclaration;\n  findNamespace: (params: Params$FindStatement) => ts.Statement | undefined;\n  createMultiple: (params: Params$CreateMulti) => ts.ModuleDeclaration;\n  update: (params: Params$Update) => ts.ModuleDeclaration;\n  addStatements: (params: Params$Update) => ts.ModuleDeclaration;\n}\n\n// eslint-disable-next-line no-unused-vars\nexport const findStatement =\n  (_context: Pick<ts.TransformationContext, \"factory\">): Factory[\"findNamespace\"] =>\n  (params: Params$FindStatement): ts.Statement | undefined => {\n    let statement: ts.Statement | undefined;\n    params.node.forEachChild(node => {\n      if (ts.isModuleDeclaration(node) && node.name.text === params.name) {\n        statement = node;\n      }\n    });\n    return statement;\n  };\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ModuleDeclaration => {\n    const node = factory.createModuleDeclaration(\n      params.export && [factory.createModifier(ts.SyntaxKind.ExportKeyword)],\n      factory.createIdentifier(params.name),\n      factory.createModuleBlock(params.statements),\n      ts.NodeFlags.Namespace,\n    );\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const createMultiple =\n  (context: Pick<ts.TransformationContext, \"factory\">): Factory[\"createMultiple\"] =>\n  (params: Params$CreateMulti): ts.ModuleDeclaration => {\n    const names = params.names.reverse();\n    const firstName = names[0];\n    const restNames = names.slice(1, names.length);\n    const child = create(context)({\n      export: true,\n      name: firstName,\n      statements: params.statements,\n      comment: params.comment,\n      deprecated: params.deprecated,\n    });\n    return restNames.reduce<ts.ModuleDeclaration>((previousStatement, currentName) => {\n      return create(context)({\n        export: true,\n        name: currentName,\n        statements: [previousStatement],\n      });\n    }, child);\n  };\n\nexport const update =\n  (context: Pick<ts.TransformationContext, \"factory\">): Factory[\"update\"] =>\n  (params: Params$Update): ts.ModuleDeclaration => {\n    const { factory } = context;\n    const { node, statements } = params;\n    if (node.body && ts.isModuleBlock(node.body)) {\n      const body = ModuleBlock.update(context)({ node: node.body, statements });\n      return factory.updateModuleDeclaration(node, node.modifiers, node.name, body);\n    }\n    return factory.updateModuleDeclaration(node, node.modifiers, node.name, node.body);\n  };\n\nexport const addStatements =\n  (context: Pick<ts.TransformationContext, \"factory\">): Factory[\"addStatements\"] =>\n  (params: Params$Update): ts.ModuleDeclaration => {\n    const { factory } = context;\n    const { node, statements } = params;\n    if (node.body && ts.isModuleBlock(node.body)) {\n      const body = ModuleBlock.update(context)({ node: node.body, statements: node.body.statements.concat(statements) });\n      return factory.updateModuleDeclaration(node, node.modifiers, node.name, body);\n    }\n    return factory.updateModuleDeclaration(node, node.modifiers, node.name, node.body);\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    findNamespace: findStatement(context),\n    create: create(context),\n    update: update(context),\n    createMultiple: createMultiple(context),\n    addStatements: addStatements(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface UpdateParams {\n  node: ts.ModuleBlock;\n  statements: ts.Statement[];\n}\n\nexport interface Factory {\n  update: (params: UpdateParams) => ts.ModuleBlock;\n}\n\nexport const update =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"update\"] =>\n  (params: UpdateParams): ts.ModuleBlock => {\n    const { node, statements } = params;\n    return factory.updateModuleBlock(node, statements);\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    update: update(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  text: string;\n  rawText?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.NoSubstitutionTemplateLiteral;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.NoSubstitutionTemplateLiteral => {\n    const node = factory.createNoSubstitutionTemplateLiteral(params.text, params.rawText);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  properties: ts.ObjectLiteralElementLike[];\n  multiLine?: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.ObjectLiteralExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.ObjectLiteralExpression => {\n    const node = factory.createObjectLiteralExpression(params.properties, params.multiLine);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n  optional?: true;\n  modifiers?: \"private\" | \"public\";\n  type?: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ParameterDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ParameterDeclaration => {\n    const modifiers = (() => {\n      if (params.modifiers === \"private\") {\n        return [factory.createModifier(ts.SyntaxKind.PrivateKeyword)];\n      }\n      if (params.modifiers === \"public\") {\n        return [factory.createModifier(ts.SyntaxKind.PublicKeyword)];\n      }\n      return;\n    })();\n    const node = factory.createParameterDeclaration(\n      modifiers,\n      undefined,\n      factory.createIdentifier(params.name),\n      params.optional && factory.createToken(ts.SyntaxKind.QuestionToken),\n      params.type,\n      undefined,\n    );\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nconst generateExpression = (factory: ts.NodeFactory) => {\n  return {\n    this: factory.createThis(),\n  };\n};\n\nexport interface Params$Create {\n  expression: string | \"this\" | ts.Expression;\n  name: string;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.PropertyAccessExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.PropertyAccessExpression => {\n    let expression: ts.Expression = typeof params.expression === \"string\" ? factory.createIdentifier(params.expression) : params.expression;\n    const expressionMap = generateExpression(factory);\n    if (typeof params.expression === \"string\" && params.expression in expressionMap) {\n      expression = generateExpression(factory)[params.expression as \"this\"];\n    }\n    const node = factory.createPropertyAccessExpression(expression, factory.createIdentifier(params.name));\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\nimport { generateComment } from \"./utils\";\n\nexport interface Params {\n  name: string;\n  initializer: ts.Expression;\n  comment?: string;\n  deprecated?: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.PropertyAssignment;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.PropertyAssignment => {\n    const node = factory.createPropertyAssignment(params.name, params.initializer);\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  modifiers: readonly ts.Modifier[] | undefined;\n  name: string | ts.PropertyName;\n  questionOrExclamationToken?: ts.QuestionToken | ts.ExclamationToken | undefined;\n  type: ts.TypeNode | undefined;\n  initializer?: ts.Expression | undefined;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.PropertyDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.PropertyDeclaration => {\n    const node = factory.createPropertyDeclaration(\n      params.modifiers,\n      params.name,\n      params.questionOrExclamationToken,\n      params.type,\n      params.initializer,\n    );\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { generateComment } from \"./utils\";\n\nexport interface Params {\n  name: string;\n  readOnly: boolean;\n  optional: boolean;\n  type: ts.TypeNode;\n  comment?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.PropertySignature;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.PropertySignature => {\n    const node = factory.createPropertySignature(\n      params.readOnly ? [factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)] : undefined,\n      params.name,\n      params.optional ? factory.createToken(ts.SyntaxKind.QuestionToken) : undefined,\n      params.type,\n    );\n    if (params.comment) {\n      const comment = generateComment(params.comment);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  text: string;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.RegularExpressionLiteral;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.RegularExpressionLiteral => {\n    return factory.createRegularExpressionLiteral(params.text);\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  expression?: ts.Expression;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ReturnStatement;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ReturnStatement => {\n    const node = factory.createReturnStatement(params.expression);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.ShorthandPropertyAssignment;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.ShorthandPropertyAssignment => {\n    const node = factory.createShorthandPropertyAssignment(params.name, undefined);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  text: string;\n  isSingleQuote?: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.StringLiteral;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.StringLiteral => {\n    const node = factory.createStringLiteral(params.text, params.isSingleQuote);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  head: ts.TemplateHead;\n  templateSpans: readonly ts.TemplateSpan[];\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.TemplateExpression;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.TemplateExpression => {\n    const node = factory.createTemplateExpression(params.head, params.templateSpans);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  text: string;\n  rawText?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.TemplateHead;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.TemplateHead => {\n    const node = factory.createTemplateHead(params.text, params.rawText, undefined);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  text: string;\n  rawText?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.TemplateMiddle;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.TemplateMiddle => {\n    const node = factory.createTemplateMiddle(params.text, params.rawText, undefined);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  expression: ts.Expression;\n  literal: ts.TemplateMiddle | ts.TemplateTail;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.TemplateSpan;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.TemplateSpan => {\n    const node = factory.createTemplateSpan(params.expression, params.literal);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  text: string;\n  rawText?: string;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.TemplateTail;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.TemplateTail => {\n    const node = factory.createTemplateTail(params.text, params.rawText);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { generateComment } from \"./utils\";\n\nexport interface Params$Create {\n  export?: true;\n  name: string;\n  type: ts.TypeNode;\n  comment?: string;\n  deprecated?: boolean;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeAliasDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeAliasDeclaration => {\n    const node = factory.createTypeAliasDeclaration(\n      params.export && [factory.createModifier(ts.SyntaxKind.ExportKeyword)],\n      factory.createIdentifier(params.name),\n      undefined,\n      params.type,\n    );\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  members: readonly ts.TypeElement[] | undefined;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeLiteralNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeLiteralNode => {\n    const node = factory.createTypeLiteralNode(params.members);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nimport { UnSupportError } from \"../../Exception\";\nimport * as LiteralTypeNode from \"./LiteralTypeNode\";\nimport * as UnionTypeNode from \"./UnionTypeNode\";\n\nexport interface StringParams {\n  type: \"string\";\n  enum?: string[];\n}\n\nexport interface IntegerParams {\n  type: \"integer\";\n  enum?: number[];\n}\n\nexport interface NumberParams {\n  type: \"number\";\n  enum?: number[];\n}\n\nexport interface BooleanParams {\n  type: \"boolean\";\n  enum?: boolean[];\n}\n\nexport interface ObjectParams {\n  type: \"object\";\n  value: ts.TypeElement[];\n}\n\nexport interface UndefinedParams {\n  type: \"undefined\";\n}\n\nexport interface ArrayParams {\n  type: \"array\";\n  value: ts.TypeNode;\n}\n\nexport interface NullParams {\n  type: \"null\";\n}\n\nexport interface NeverParams {\n  type: \"never\";\n}\n\nexport interface AnyParams {\n  type: \"any\";\n}\n\nexport interface VoidParams {\n  type: \"void\";\n}\n\nexport type Params$Create =\n  | StringParams\n  | IntegerParams\n  | NumberParams\n  | BooleanParams\n  | ObjectParams\n  | ArrayParams\n  | UndefinedParams\n  | NullParams\n  | VoidParams\n  | NeverParams\n  | AnyParams;\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeNode;\n}\n\nexport const create =\n  (context: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeNode => {\n    const { factory } = context;\n    const literalTypeNode = LiteralTypeNode.create(context);\n    const unionTypeNode = UnionTypeNode.create(context);\n    const createNode = () => {\n      switch (params.type) {\n        case \"string\":\n          if (params.enum) {\n            return unionTypeNode({\n              typeNodes: params.enum.map(value => literalTypeNode({ value })),\n            });\n          }\n          return factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword);\n        case \"number\":\n        case \"integer\":\n          if (params.enum) {\n            return unionTypeNode({\n              typeNodes: params.enum.map(value => literalTypeNode({ value })),\n            });\n          }\n          return factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword);\n        case \"boolean\": {\n          if (params.enum) {\n            return unionTypeNode({\n              typeNodes: params.enum.map(value => literalTypeNode({ value })),\n            });\n          }\n          return factory.createKeywordTypeNode(ts.SyntaxKind.BooleanKeyword);\n        }\n        case \"object\":\n          return factory.createTypeLiteralNode(params.value);\n        case \"undefined\":\n          return factory.createKeywordTypeNode(ts.SyntaxKind.UndefinedKeyword);\n        case \"null\":\n          return factory.createLiteralTypeNode(factory.createNull());\n        case \"array\":\n          return factory.createArrayTypeNode(params.value);\n        case \"never\":\n          return factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword);\n        case \"void\":\n          return factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword);\n        case \"any\":\n          return factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword);\n        default:\n          throw new UnSupportError(`UnSupport Type: ${JSON.stringify(params)}`);\n      }\n    };\n    const node = createNode();\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  typeNodes: ts.TypeNode[];\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.UnionTypeNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.UnionTypeNode => {\n    const node = factory.createUnionTypeNode(params.typeNodes);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nconst syntaxKinds = {\n  keyof: ts.SyntaxKind.KeyOfKeyword,\n  unique: ts.SyntaxKind.UniqueKeyword,\n  readonly: ts.SyntaxKind.ReadonlyKeyword,\n} as const;\n\nexport interface Params$Create {\n  syntaxKind: keyof typeof syntaxKinds;\n  type: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeOperatorNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeOperatorNode => {\n    const node = factory.createTypeOperatorNode(syntaxKinds[params.syntaxKind], params.type);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n  constraint?: ts.TypeNode;\n  defaultType?: ts.TypeNode;\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeParameterDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeParameterDeclaration => {\n    const node = factory.createTypeParameterDeclaration([], factory.createIdentifier(params.name), params.constraint, params.defaultType);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params$Create {\n  name: string;\n  typeArguments?: readonly ts.TypeNode[];\n}\n\nexport interface Factory {\n  create: (params: Params$Create) => ts.TypeReferenceNode;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params$Create): ts.TypeReferenceNode => {\n    const node = factory.createTypeReferenceNode(factory.createIdentifier(params.name), params.typeArguments);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport interface Params {\n  name: string | ts.BindingName;\n  type?: ts.TypeNode;\n  initializer?: ts.Expression;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.VariableDeclaration;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.VariableDeclaration => {\n    const node = factory.createVariableDeclaration(params.name, undefined, params.type, params.initializer);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nconst flags = {\n  const: ts.NodeFlags.Const,\n} as const;\n\nexport interface Params {\n  declarations: readonly ts.VariableDeclaration[];\n  flag: keyof typeof flags;\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.VariableDeclarationList;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.VariableDeclarationList => {\n    const node = factory.createVariableDeclarationList(params.declarations, flags[params.flag]);\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\nimport { generateComment } from \"./utils\";\n\nexport interface Params {\n  comment?: string;\n  deprecated?: boolean;\n  modifiers?: ts.Modifier[];\n  declarationList: ts.VariableDeclarationList | ts.VariableDeclaration[];\n}\n\nexport interface Factory {\n  create: (params: Params) => ts.VariableStatement;\n}\n\nexport const create =\n  ({ factory }: Pick<ts.TransformationContext, \"factory\">): Factory[\"create\"] =>\n  (params: Params): ts.VariableStatement => {\n    const node = factory.createVariableStatement(params.modifiers, params.declarationList);\n    if (params.comment) {\n      const comment = generateComment(params.comment, params.deprecated);\n      return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, comment.value, comment.hasTrailingNewLine);\n    }\n    return node;\n  };\n\nexport const make = (context: Pick<ts.TransformationContext, \"factory\">): Factory => {\n  return {\n    create: create(context),\n  };\n};\n","import ts from \"typescript\";\n\nexport type CreateFunction = (context: Pick<ts.TransformationContext, \"factory\">) => ts.Statement[];\n\nexport const traverse =\n  (create: CreateFunction) =>\n  <T extends ts.Node>(context: Pick<ts.TransformationContext, \"factory\">): ts.Transformer<T> =>\n  (rootNode: T): T => {\n    const visit = (node: ts.Node): ts.Node => {\n      if (!ts.isSourceFile(node)) {\n        return node;\n      }\n      return context.factory.updateSourceFile(\n        node,\n        create(context),\n        node.isDeclarationFile,\n        node.referencedFiles,\n        node.typeReferenceDirectives,\n        node.hasNoDefaultLib,\n        node.libReferenceDirectives,\n      );\n    };\n    return ts.visitNode(rootNode, visit) as T;\n  };\n","import ts from \"typescript\";\n\nimport type { CodeGenerator } from \"../../types\";\n\nexport const stringToStatements = (code: string): ts.Statement[] => {\n  const source = ts.createSourceFile(\"\", code, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS);\n  return Array.from(source.statements);\n};\n\nexport const convertIntermediateCodes = (intermediateCodes: CodeGenerator.IntermediateCode[]): ts.Statement[] => {\n  return intermediateCodes.reduce<ts.Statement[]>((result, intermediateCode) => {\n    if (typeof intermediateCode === \"string\") {\n      return [...result, ...stringToStatements(intermediateCode)];\n    }\n    return result.concat(intermediateCode);\n  }, []);\n};\n","export const parameterName = (operationId: string): string => `Parameter$${operationId}`;\nexport const requestBodyName = (operationId: string): string => `RequestBody$${operationId}`;\nexport const argumentParamsTypeDeclaration = (operationId: string): string => `Params$${operationId}`;\nexport const responseName = (operationId: string, statusCode: string): string => `Response$${operationId}$Status$${statusCode}`;\nexport const requestContentType = (operationId: string): string => `RequestContentType$${operationId}`;\nexport const responseContentType = (operationId: string): string => `ResponseContentType$${operationId}`;\n\nexport const isAvailableVariableName = (text: string): boolean => {\n  return /^[A-Za-z_0-9]+$/.test(text);\n};\n\nexport const isFirstCharacterIsValidText = (text: string): boolean => {\n  return /^[A-Za-z]+/.test(text);\n};\n\nexport const escapeText = (text: string): string => {\n  if (isAvailableVariableName(text) && isFirstCharacterIsValidText(text)) {\n    return text;\n  }\n  return `\"${text}\"`;\n};\n\n/** TODO escapeTextにマージする */\nexport const escapeText2 = (text: string): { escaped: boolean; text: string } => {\n  if (isAvailableVariableName(text)) {\n    return {\n      escaped: false,\n      text: text,\n    };\n  }\n  return {\n    escaped: true,\n    text: `\"${text}\"`,\n  };\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../api\";\nimport type { CodeGenerator } from \"../../types\";\n\n/**\n * export type RequestContentType${operationId} = keyof RequestBody${operationId};\n */\nexport const createRequestContentTypeReference = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  return factory.TypeAliasDeclaration.create({\n    export: true,\n    name: convertedParams.requestContentTypeName,\n    type: factory.TypeOperatorNode.create({\n      syntaxKind: \"keyof\",\n      type: factory.TypeReferenceNode.create({\n        name: convertedParams.requestBodyName,\n      }),\n    }),\n  });\n};\n/**\n * export type ResponseContentType${operationId} = keyof Response${operationId}$Status$200;\n * export type ResponseContentType${operationId} = keyof Response${operationId}$Status$200 | keyof Response${operationId}$Status$203;\n */\nexport const createResponseContentTypeReference = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    return factory.TypeAliasDeclaration.create({\n      export: true,\n      name: convertedParams.responseContentTypeName,\n      type: factory.UnionTypeNode.create({\n        typeNodes: convertedParams.responseSuccessNames.map(item => {\n          return factory.TypeOperatorNode.create({\n            syntaxKind: \"keyof\",\n            type: factory.TypeReferenceNode.create({\n              name: item,\n            }),\n          });\n        }),\n      }),\n    });\n  }\n  return factory.TypeAliasDeclaration.create({\n    export: true,\n    name: convertedParams.responseContentTypeName,\n    type: factory.TypeOperatorNode.create({\n      syntaxKind: \"keyof\",\n      type: factory.TypeReferenceNode.create({\n        name: convertedParams.responseSuccessNames[0],\n      }),\n    }),\n  });\n};\n\nconst createHeaders = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  const members = [];\n\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    members.push(\n      factory.PropertySignature.create({\n        readOnly: false,\n        name: `\"Content-Type\"`,\n        optional: false,\n        type: factory.TypeReferenceNode.create({ name: \"T\" }),\n      }),\n    );\n  }\n\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    members.push(\n      factory.PropertySignature.create({\n        readOnly: false,\n        name: \"Accept\",\n        optional: false,\n        type: factory.TypeReferenceNode.create({ name: \"U\" }),\n      }),\n    );\n  }\n  if (members.length === 0) {\n    return undefined;\n  }\n\n  return factory.TypeLiteralNode.create({ members });\n};\n\n/**\n * Function Template\n *\n * export interface {name}<T extends keyof {requestBodyName}> {\n *   parameter: {parameterName};\n *   requestBody: {requestBodyName}[T];\n * }\n */\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params): ts.InterfaceDeclaration | undefined => {\n  const { convertedParams } = params;\n  const typeParameters: ts.TypeParameterDeclaration[] = [];\n  const members: ts.TypeElement[] = [];\n  if (convertedParams.hasRequestBody && convertedParams.has2OrMoreRequestContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"T\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.requestContentTypeName,\n        }),\n      }),\n    );\n  }\n\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"U\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.responseContentTypeName,\n        }),\n      }),\n    );\n  }\n\n  const headerDeclaration = createHeaders(factory, params);\n  if (headerDeclaration) {\n    const extraHeader = factory.PropertySignature.create({\n      readOnly: false,\n      name: \"headers\",\n      optional: false,\n      type: headerDeclaration,\n    });\n    members.push(extraHeader);\n  }\n\n  if (convertedParams.hasParameter) {\n    const parameter = factory.PropertySignature.create({\n      readOnly: false,\n      name: \"parameter\",\n      optional: false,\n      type: factory.TypeReferenceNode.create({\n        name: convertedParams.parameterName,\n      }),\n    });\n    members.push(parameter);\n  }\n\n  if (convertedParams.hasRequestBody) {\n    const requestBody = factory.PropertySignature.create({\n      readOnly: false,\n      name: \"requestBody\",\n      optional: false,\n      type: factory.IndexedAccessTypeNode.create({\n        objectType: factory.TypeReferenceNode.create({\n          name: convertedParams.requestBodyName,\n        }),\n        indexType: factory.TypeReferenceNode.create({\n          name: convertedParams.requestFirstContentType ? `\"${convertedParams.requestFirstContentType}\"` : \"T\",\n        }),\n      }),\n    });\n    members.push(requestBody);\n  }\n\n  if (members.length === 0) {\n    return;\n  }\n\n  return factory.InterfaceDeclaration.create({\n    export: true,\n    name: convertedParams.argumentParamsTypeDeclaration,\n    members,\n    typeParameters,\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../api\";\nimport type { CodeGenerator } from \"../../types\";\nimport type { MethodType } from \"./MethodBody/types\";\nimport type { Option } from \"./types\";\n\nconst httpMethodList: string[] = [\"GET\", \"PUT\", \"POST\", \"DELETE\", \"OPTIONS\", \"HEAD\", \"PATCH\", \"TRACE\"];\n\nconst createErrorResponsesTypeAlias = (typeName: string, factory: TsGenerator.Factory.Type, errorResponseNames: string[]) => {\n  if (errorResponseNames.length === 0) {\n    return factory.TypeAliasDeclaration.create({\n      export: true,\n      name: typeName,\n      type: ts.factory.createToken(ts.SyntaxKind.VoidKeyword),\n    });\n  }\n  return factory.TypeAliasDeclaration.create({\n    export: true,\n    name: typeName,\n    type: factory.UnionTypeNode.create({\n      typeNodes: errorResponseNames.map(name => {\n        return factory.TypeReferenceNode.create({\n          name,\n        });\n      }),\n    }),\n  });\n};\n\nconst createSuccessResponseTypeAlias = (typeName: string, factory: TsGenerator.Factory.Type, successResponseNames: string[]) => {\n  if (successResponseNames.length === 0) {\n    return factory.TypeAliasDeclaration.create({\n      export: true,\n      name: typeName,\n      type: ts.factory.createToken(ts.SyntaxKind.VoidKeyword),\n    });\n  }\n  return factory.TypeAliasDeclaration.create({\n    export: true,\n    name: typeName,\n    type: factory.UnionTypeNode.create({\n      typeNodes: successResponseNames.map(name => {\n        return factory.TypeReferenceNode.create({\n          name,\n        });\n      }),\n    }),\n  });\n};\n\nconst createHttpMethod = (factory: TsGenerator.Factory.Type) => {\n  return factory.TypeAliasDeclaration.create({\n    export: true,\n    name: \"HttpMethod\",\n    type: factory.TypeNode.create({ type: \"string\", enum: httpMethodList }),\n  });\n};\n\nconst createQueryParamsDeclarations = (factory: TsGenerator.Factory.Type) => {\n  const queryParameterDeclaration = factory.InterfaceDeclaration.create({\n    export: true,\n    name: \"QueryParameter\",\n    members: [\n      factory.PropertySignature.create({\n        readOnly: false,\n        name: \"value\",\n        optional: false,\n        type: factory.TypeNode.create({ type: \"any\" }),\n      }),\n      factory.PropertySignature.create({\n        readOnly: false,\n        name: \"style\",\n        optional: true,\n        type: factory.TypeNode.create({ type: \"string\", enum: [\"form\", \"spaceDelimited\", \"pipeDelimited\", \"deepObject\"] }),\n      }),\n      factory.PropertySignature.create({\n        readOnly: false,\n        name: \"explode\",\n        optional: false,\n        type: factory.TypeNode.create({ type: \"boolean\" }),\n      }),\n    ],\n  });\n  const queryParametersDeclaration = factory.InterfaceDeclaration.create({\n    export: true,\n    name: \"QueryParameters\",\n    members: [\n      factory.IndexSignatureDeclaration.create({\n        name: \"key\",\n        type: factory.TypeReferenceNode.create({ name: \"QueryParameter\" }),\n      }),\n    ],\n  });\n\n  return [queryParameterDeclaration, queryParametersDeclaration];\n};\n\nconst createObjectLikeInterface = (factory: TsGenerator.Factory.Type) => {\n  return factory.InterfaceDeclaration.create({\n    export: true,\n    name: \"ObjectLike\",\n    members: [\n      factory.IndexSignatureDeclaration.create({\n        name: \"key\",\n        type: factory.TypeNode.create({ type: \"any\" }),\n      }),\n    ],\n  });\n};\n\nconst createEncodingInterface = (factory: TsGenerator.Factory.Type) => {\n  return factory.InterfaceDeclaration.create({\n    export: true,\n    name: \"Encoding\",\n    members: [\n      factory.PropertySignature.create({\n        name: \"contentType\",\n        readOnly: true,\n        optional: true,\n        type: factory.TypeReferenceNode.create({\n          name: \"string\",\n        }),\n      }),\n      factory.PropertySignature.create({\n        name: \"headers\",\n        readOnly: false,\n        optional: true,\n        type: factory.TypeReferenceNode.create({\n          name: \"Record<string, any>\",\n        }),\n      }),\n      factory.PropertySignature.create({\n        name: \"style\",\n        readOnly: true,\n        optional: true,\n        type: factory.TypeNode.create({ type: \"string\", enum: [\"form\", \"spaceDelimited\", \"pipeDelimited\", \"deepObject\"] }),\n      }),\n      factory.PropertySignature.create({\n        name: \"explode\",\n        readOnly: true,\n        optional: true,\n        type: factory.TypeReferenceNode.create({\n          name: \"boolean\",\n        }),\n      }),\n      factory.PropertySignature.create({\n        name: \"allowReserved\",\n        readOnly: true,\n        optional: true,\n        type: factory.TypeReferenceNode.create({\n          name: \"boolean\",\n        }),\n      }),\n    ],\n  });\n};\n\nexport const create = (\n  factory: TsGenerator.Factory.Type,\n  list: CodeGenerator.Params[],\n  methodType: MethodType,\n  option: Option,\n): ts.Statement[] => {\n  const objectLikeOrAnyType = factory.UnionTypeNode.create({\n    typeNodes: [\n      factory.TypeReferenceNode.create({\n        name: \"ObjectLike\",\n      }),\n      factory.TypeNode.create({\n        type: \"any\",\n      }),\n    ],\n  });\n\n  const encodingInterface = createEncodingInterface(factory);\n\n  const requestArgs = factory.ParameterDeclaration.create({\n    name: \"requestArgs\",\n    type: factory.TypeReferenceNode.create({\n      name: \"RequestArgs\",\n    }),\n  });\n\n  const options = factory.ParameterDeclaration.create({\n    name: \"options\",\n    optional: true,\n    type: factory.TypeReferenceNode.create({\n      name: \"RequestOption\",\n    }),\n  });\n\n  const successResponseNames = list.flatMap(item => item.convertedParams.responseSuccessNames);\n\n  const errorResponseNamespace = factory.Namespace.create({\n    export: true,\n    name: \"ErrorResponse\",\n    statements: list.map(item => {\n      return createErrorResponsesTypeAlias(`${item.convertedParams.escapedOperationId}`, factory, item.convertedParams.responseErrorNames);\n    }),\n  });\n\n  const returnType = option.sync\n    ? factory.TypeReferenceNode.create({\n        name: \"T\",\n      })\n    : factory.TypeReferenceNode.create({\n        name: \"Promise\",\n        typeArguments: [\n          factory.TypeReferenceNode.create({\n            name: \"T\",\n          }),\n        ],\n      });\n\n  const functionType = factory.FunctionTypeNode.create({\n    typeParameters: [\n      factory.TypeParameterDeclaration.create({\n        name: \"T\",\n        defaultType: factory.TypeReferenceNode.create({\n          name: \"SuccessResponses\",\n        }),\n      }),\n    ],\n    parameters: [requestArgs, options],\n    type: returnType,\n  });\n\n  const requestFunction = factory.PropertySignature.create({\n    readOnly: false,\n    name: \"request\",\n    optional: false,\n    type: functionType,\n  });\n\n  const requestArgsInterfaceDeclaration = factory.InterfaceDeclaration.create({\n    export: true,\n    name: \"RequestArgs\",\n    members: [\n      factory.PropertySignature.create({\n        name: \"httpMethod\",\n        readOnly: true,\n        optional: false,\n        type: factory.TypeReferenceNode.create({ name: \"HttpMethod\" }),\n      }),\n      factory.PropertySignature.create({\n        name: methodType === \"currying-function\" ? \"uri\" : \"url\",\n        readOnly: true,\n        optional: false,\n        type: factory.TypeReferenceNode.create({ name: \"string\" }),\n      }),\n      factory.PropertySignature.create({\n        name: \"headers\",\n        readOnly: false,\n        optional: false,\n        type: objectLikeOrAnyType,\n      }),\n      factory.PropertySignature.create({\n        name: \"requestBody\",\n        readOnly: false,\n        optional: true,\n        type: objectLikeOrAnyType,\n      }),\n      factory.PropertySignature.create({\n        name: \"requestBodyEncoding\",\n        readOnly: false,\n        optional: true,\n        type: factory.TypeReferenceNode.create({ name: \"Record<string, Encoding>\" }),\n      }),\n      factory.PropertySignature.create({\n        name: \"queryParameters\",\n        optional: true,\n        readOnly: false,\n        type: factory.UnionTypeNode.create({\n          typeNodes: [\n            factory.TypeReferenceNode.create({\n              name: \"QueryParameters\",\n            }),\n            factory.TypeNode.create({ type: \"undefined\" }),\n          ],\n        }),\n      }),\n    ],\n    typeParameters: [],\n  });\n\n  return [\n    createHttpMethod(factory),\n    createObjectLikeInterface(factory),\n    ...createQueryParamsDeclarations(factory),\n    createSuccessResponseTypeAlias(\"SuccessResponses\", factory, successResponseNames),\n    errorResponseNamespace,\n    encodingInterface,\n    requestArgsInterfaceDeclaration,\n    factory.InterfaceDeclaration.create({\n      export: true,\n      name: \"ApiClient\",\n      members: [requestFunction],\n      typeParameters: [\n        factory.TypeParameterDeclaration.create({\n          name: \"RequestOption\",\n        }),\n      ],\n    }),\n  ];\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\n\n/**\n * export class Client<ApiClient> {\n *   {members}\n * }\n */\nexport const create = (factory: TsGenerator.Factory.Type, members: ts.ClassElement[]): ts.ClassDeclaration => {\n  return factory.ClassDeclaration.create({\n    name: \"Client\",\n    export: true,\n    members: [\n      factory.PropertyDeclaration.create({\n        modifiers: [ts.factory.createModifier(ts.SyntaxKind.PrivateKeyword)],\n        name: \"baseUrl\",\n        type: ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword),\n      }),\n      ...members,\n    ],\n    typeParameterDeclaration: [\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestOption\",\n      }),\n    ],\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\n\n/**\n * constructor(private apiClient: ApiClient, private baseUrl: string) { }\n */\nexport const create = (factory: TsGenerator.Factory.Type): ts.ConstructorDeclaration => {\n  const parameter1 = factory.ParameterDeclaration.create({\n    modifiers: \"private\",\n    name: \"apiClient\",\n    type: factory.TypeReferenceNode.create({\n      name: \"ApiClient\",\n      typeArguments: [\n        factory.TypeReferenceNode.create({\n          name: \"RequestOption\",\n        }),\n      ],\n    }),\n  });\n  const parameter2 = factory.ParameterDeclaration.create({\n    name: \"baseUrl\",\n    type: factory.TypeNode.create({\n      type: \"string\",\n    }),\n  });\n\n  return factory.ConstructorDeclaration.create({\n    parameters: [parameter1, parameter2],\n    body: factory.Block.create({\n      statements: [\n        factory.ExpressionStatement.create({\n          expression: factory.BinaryExpression.create({\n            left: factory.PropertyAccessExpression.create({\n              expression: \"this\",\n              name: \"baseUrl\",\n            }),\n            operator: \"=\",\n            right: factory.CallExpression.create({\n              expression: factory.PropertyAccessExpression.create({\n                expression: \"baseUrl\",\n                name: \"replace\",\n              }),\n              argumentsArray: [factory.RegularExpressionLiteral.create({ text: \"/\\\\/$/\" }), factory.StringLiteral.create({ text: \"\" })],\n            }),\n          }),\n        }),\n      ],\n      multiLine: false,\n    }),\n  });\n};\n","import { EOL } from \"os\";\n\nimport ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport * as MethodBody from \"../../_shared/MethodBody\";\nimport type { Option } from \"../../_shared/types\";\n\nexport { MethodBody };\n\nconst generateParams = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  const typeArguments: ts.TypeNode[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"RequestContentType\",\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"ResponseContentType\",\n      }),\n    );\n  }\n  return factory.ParameterDeclaration.create({\n    name: \"params\",\n    modifiers: undefined,\n    type: factory.TypeReferenceNode.create({\n      name: convertedParams.argumentParamsTypeDeclaration,\n      typeArguments,\n    }),\n  });\n};\n\nconst generateResponseReturnType = (\n  factory: TsGenerator.Factory.Type,\n  successResponseNameList: string[],\n  successResponseContentTypeList: string[],\n  option: Option,\n) => {\n  let objectType: ts.TypeNode = factory.TypeNode.create({\n    type: \"void\",\n  });\n  if (successResponseNameList.length === 1) {\n    objectType = factory.TypeReferenceNode.create({\n      name: successResponseNameList[0],\n    });\n  } else if (successResponseNameList.length > 1) {\n    objectType = factory.UnionTypeNode.create({\n      typeNodes: successResponseNameList.map(item => factory.TypeReferenceNode.create({ name: item })),\n    });\n  }\n\n  // レスポンスが存在しないので Promise<void>\n  if (successResponseNameList.length === 0) {\n    if (option.sync) {\n      return objectType;\n    }\n    return factory.TypeReferenceNode.create({\n      name: \"Promise\",\n      typeArguments: [objectType],\n    });\n  }\n\n  const isOnlyOneResponseContentType = successResponseContentTypeList.length === 1;\n  let indexType: ts.TypeNode = factory.TypeReferenceNode.create({\n    name: \"ResponseContentType\",\n  });\n  if (isOnlyOneResponseContentType) {\n    indexType = factory.TypeReferenceNode.create({\n      name: `\"${successResponseContentTypeList[0]}\"`,\n    });\n  }\n\n  if (option.sync) {\n    return factory.IndexedAccessTypeNode.create({\n      objectType,\n      indexType,\n    });\n  }\n\n  return factory.TypeReferenceNode.create({\n    name: \"Promise\",\n    typeArguments: [\n      factory.IndexedAccessTypeNode.create({\n        objectType,\n        indexType,\n      }),\n    ],\n  });\n};\n\nconst methodTypeParameters = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params): ts.TypeParameterDeclaration[] => {\n  const typeParameters: ts.TypeParameterDeclaration[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.requestContentTypeName,\n        }),\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"ResponseContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.responseContentTypeName,\n        }),\n      }),\n    );\n  }\n  return typeParameters;\n};\n\n/**\n *\n * public async {functionName}(params: {argumentParamsTypeDeclaration}<{RequestContentType}>): Promise<{requestBodyName}[ResponseContentType]> {\n *\n * }\n */\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params, option: Option): ts.MethodDeclaration => {\n  const { convertedParams } = params;\n  const typeParameters: ts.TypeParameterDeclaration[] = methodTypeParameters(factory, params);\n  const methodArguments: ts.ParameterDeclaration[] = [];\n  const hasParamsArguments =\n    convertedParams.hasParameter ||\n    convertedParams.hasRequestBody ||\n    convertedParams.has2OrMoreSuccessResponseContentTypes ||\n    convertedParams.has2OrMoreRequestContentTypes;\n\n  if (hasParamsArguments) {\n    methodArguments.push(generateParams(factory, params));\n  }\n\n  const returnType: ts.TypeNode = generateResponseReturnType(\n    factory,\n    convertedParams.responseSuccessNames,\n    convertedParams.successResponseContentTypes,\n    option,\n  );\n\n  methodArguments.push(\n    factory.ParameterDeclaration.create({\n      name: \"option\",\n      modifiers: undefined,\n      optional: true,\n      type: factory.TypeReferenceNode.create({\n        name: \"RequestOption\",\n      }),\n    }),\n  );\n\n  return factory.MethodDeclaration.create({\n    name: convertedParams.functionName,\n    async: !option.sync,\n    parameters: methodArguments,\n    comment: option.additionalMethodComment\n      ? [params.operationParams.comment, `operationId: ${params.operationId}`, `Request URI: ${params.operationParams.requestUri}`]\n          .filter(t => !!t)\n          .join(EOL)\n      : params.operationParams.comment,\n    deprecated: params.operationParams.deprecated,\n    type: returnType,\n    typeParameters: typeParameters,\n    body: factory.Block.create({\n      statements: MethodBody.create(factory, params, \"class\"),\n      multiLine: true,\n    }),\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../api\";\nimport * as Utils from \"../../utils\";\n\nexport interface StringItem {\n  type: \"string\";\n  value: string;\n}\n\nexport interface ExpressionItem {\n  type: \"property\";\n  value: ts.Expression;\n}\n\nexport type Item = StringItem | ExpressionItem;\n\nexport type Params$TemplateExpression = Item[];\n\nconst getTemplateSpan = (\n  factory: TsGenerator.Factory.Type,\n  currentIndex: number,\n  nextIndex: number,\n  lastIndex: number,\n  currentItem: ExpressionItem,\n  nextItem: Item | undefined,\n): ts.TemplateSpan[] => {\n  // == last\n  if (!nextItem) {\n    return [\n      factory.TemplateSpan.create({\n        expression: currentItem.value,\n        literal: factory.TemplateTail.create({\n          text: \"\",\n        }),\n      }),\n    ];\n  }\n\n  if (nextItem.type === \"property\") {\n    if (lastIndex === nextIndex) {\n      return [\n        factory.TemplateSpan.create({\n          expression: currentItem.value,\n          literal: factory.TemplateTail.create({\n            text: \"\",\n          }),\n        }),\n        factory.TemplateSpan.create({\n          expression: nextItem.value,\n          literal: factory.TemplateTail.create({\n            text: \"\",\n          }),\n        }),\n      ];\n    }\n    return [\n      factory.TemplateSpan.create({\n        expression: currentItem.value,\n        literal: factory.TemplateTail.create({\n          text: \"\",\n        }),\n      }),\n      factory.TemplateSpan.create({\n        expression: nextItem.value,\n        literal: factory.TemplateMiddle.create({\n          text: \"\",\n        }),\n      }),\n    ];\n  }\n  if (lastIndex === nextIndex) {\n    return [\n      factory.TemplateSpan.create({\n        expression: currentItem.value,\n        literal: factory.TemplateTail.create({\n          text: nextItem.value,\n        }),\n      }),\n    ];\n  }\n  return [\n    factory.TemplateSpan.create({\n      expression: currentItem.value,\n      literal: factory.TemplateMiddle.create({\n        text: nextItem.value,\n      }),\n    }),\n  ];\n};\n\n/**\n *\n * ``\n * `a`\n * `${b}`\n * `a${b}`\n * `${a}${b}`\n * `${a}b${c}`\n * ``\n */\nexport const generateTemplateExpression = (factory: TsGenerator.Factory.Type, list: Params$TemplateExpression): ts.Expression => {\n  if (list.length === 0) {\n    return factory.NoSubstitutionTemplateLiteral.create({\n      text: \"\",\n    });\n  }\n  const templateHead = factory.TemplateHead.create({\n    text: list[0].type === \"property\" ? \"\" : list[0].value,\n  });\n\n  const spanList = list.splice(1, list.length);\n  if (spanList.length === 0 && list[0].type === \"string\") {\n    return factory.NoSubstitutionTemplateLiteral.create({\n      text: list[0].value,\n    });\n  }\n  const lastIndex = spanList.length - 1;\n  const restValue = lastIndex % 2;\n  let templateSpans: ts.TemplateSpan[] = [];\n  for (let i = 0; i <= (lastIndex - restValue) / 2; i++) {\n    if (spanList.length === 0) {\n      continue;\n    }\n    const currentIndex = 2 * i;\n    const nextIndex = 2 * i + 1;\n    const currentItem = spanList[currentIndex];\n    const nextItem = spanList[nextIndex];\n    if (currentItem.type === \"string\") {\n      throw new Error(\"Logic Error\");\n    }\n    templateSpans = templateSpans.concat(getTemplateSpan(factory, currentIndex, nextIndex, lastIndex, currentItem, nextItem));\n  }\n  return factory.TemplateExpression.create({\n    head: templateHead,\n    templateSpans: templateSpans,\n  });\n};\n\nexport interface VariableAccessIdentifer {\n  kind: \"string\";\n  value: string;\n}\n\nexport interface ElementAccessExpression {\n  kind: \"element-access\";\n  value: string;\n}\n\nexport type VariableElement = VariableAccessIdentifer | ElementAccessExpression;\n\nexport const splitVariableText = (text: string): VariableElement[] => {\n  // [\"....\"] にマッチする\n  const pattern = '[\"[a-zA-Z_0-9.]+\"]';\n  // 'a.b.c[\"a\"][\"b\"]'.split(/(\\[\"[a-zA-Z_0-9\\.]+\"\\])/g)\n  const splitTexts = text.split(/(\\[\"[a-zA-Z_0-9\\\\.]+\"\\])/g); // 区切り文字も含めて分割\n  return splitTexts.reduce<VariableElement[]>((splitList, value) => {\n    if (value === \"\") {\n      return splitList;\n    }\n    // [\"book.name\"] にマッチするか\n    if (new RegExp(pattern).test(value)) {\n      // [\"book.name\"] から book.name を抽出\n      const matchedValue = value.match(/[a-zA-Z_0-9\\\\.]+/);\n      if (matchedValue) {\n        splitList.push({\n          kind: \"element-access\",\n          value: matchedValue[0],\n        });\n      }\n      return splitList;\n    }\n    const dotSplited = value.split(\".\");\n    const items = dotSplited.map<VariableAccessIdentifer>(childValue => ({ kind: \"string\", value: childValue }));\n    return splitList.concat(items);\n  }, []);\n};\n\nexport const generateVariableIdentifier = (\n  factory: TsGenerator.Factory.Type,\n  name: string,\n): ts.Identifier | ts.PropertyAccessExpression | ts.ElementAccessExpression => {\n  if (name.startsWith(\"/\")) {\n    throw new Error(`can't start '/'. name=${name}`);\n  }\n  const list = splitVariableText(name);\n  // Object参照していない変数名の場合\n  if (list.length === 1) {\n    return factory.Identifier.create({\n      name: name,\n    });\n  }\n  const [n1, n2, ...rest] = list;\n  // a.b のような単純な変数名の場合\n  const first = factory.PropertyAccessExpression.create({\n    expression: n1.value,\n    name: n2.value,\n  });\n\n  return rest.reduce<ts.PropertyAccessExpression | ts.ElementAccessExpression>((previous, current) => {\n    if (current.kind === \"string\" && Utils.isAvailableVariableName(current.value)) {\n      return factory.PropertyAccessExpression.create({\n        expression: previous,\n        name: current.value,\n      });\n    }\n    // 直接 .value でアクセスできない場合に [\"value\"] といった形で参照する\n    return factory.ElementAccessExpression.create({\n      expression: previous,\n      index: current.value,\n    });\n  }, first);\n};\n\nexport interface LiteralExpressionObject {\n  [key: string]: { type: \"string\" | \"variable\"; value: string };\n}\n\nexport const generateObjectLiteralExpression = (\n  factory: TsGenerator.Factory.Type,\n  obj: LiteralExpressionObject,\n  extraProperties: ts.PropertyAssignment[] = [],\n): ts.ObjectLiteralExpression => {\n  const properties = Object.entries(obj).map(([key, item]) => {\n    const initializer =\n      item.type === \"variable\" ? generateVariableIdentifier(factory, item.value) : factory.StringLiteral.create({ text: item.value });\n    return factory.PropertyAssignment.create({\n      name: Utils.escapeText(key),\n      initializer,\n    });\n  });\n\n  return factory.ObjectLiteralExpression.create({\n    properties: extraProperties.concat(properties),\n    multiLine: true,\n  });\n};\n\n/**\n * \"/{a}/b/{a}/c{a}/\".split(new RegExp(\"({a})\"))\n * => [\"/\", \"{a}\", \"/b/\", \"{a}\", \"/c\", \"{a}\", \"/\"]\n */\nexport const stringToArray = (text: string, delimiter: string): string[] => text.split(new RegExp(`(${delimiter})`));\n\nexport const multiSplitStringToArray = (text: string, delimiters: string[]): string[] => {\n  return delimiters.reduce<string[]>(\n    (current, delimiter) => {\n      return current.reduce<string[]>((result, currentText) => {\n        return result.concat(stringToArray(currentText, delimiter));\n      }, []);\n    },\n    [text],\n  );\n};\n","import { Encoding, MediaType } from \"../../../typedef/OpenApi\";\n\ntype EncodingMap = Record<string, Encoding>;\n\nexport const createEncodingMap = (content: Record<string, MediaType>): EncodingMap => {\n  return Object.keys(content).reduce<EncodingMap>((all, key) => {\n    const { encoding } = content[key];\n    if (!encoding) {\n      return all;\n    }\n    return { ...all, [key]: encoding };\n  }, {});\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport * as Utils from \"../utils\";\nimport { createEncodingMap } from \"./createEncodingMap\";\nimport type { MethodType } from \"./types\";\n\nexport interface Params {\n  httpMethod: string;\n  hasRequestBody: boolean;\n}\n\n/**\n *\n * const encodingMap = {\n *   \"application/json\": {},\n *   \"application/x-www-form-urlencoded\": {},\n * }\n */\nconst createEncodingParams = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params): ts.Expression | undefined => {\n  const content = params.operationParams.requestBody?.content;\n  if (!content) {\n    return;\n  }\n  const encodingMap = createEncodingMap(content);\n  if (Object.keys(encodingMap).length === 0) {\n    return;\n  }\n  if (params.convertedParams.has2OrMoreRequestContentTypes) {\n    return factory.Identifier.create({ name: `requestEncodings[params.headers[\"Content-Type\"]]` });\n  }\n  return factory.Identifier.create({ name: `requestEncodings[\"${params.convertedParams.requestFirstContentType}\"]` });\n};\n\n/**\n * this.apiClient.request(\"GET\", url, requestBody, headers, queryParameters);\n */\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params, methodType: MethodType): ts.CallExpression => {\n  const { convertedParams } = params;\n  const apiClientVariableIdentifier: Record<MethodType, string> = {\n    class: \"this.apiClient.request\",\n    function: \"apiClient.request\",\n    \"currying-function\": \"apiClient.request\",\n  };\n  const expression = Utils.generateVariableIdentifier(factory, apiClientVariableIdentifier[methodType]);\n  const requestBodyEncoding = createEncodingParams(factory, params);\n\n  const requestArgs = factory.ObjectLiteralExpression.create({\n    properties: [\n      factory.PropertyAssignment.create({\n        name: \"httpMethod\",\n        initializer: factory.StringLiteral.create({ text: params.operationParams.httpMethod.toUpperCase() }),\n      }),\n      factory.ShorthandPropertyAssignment.create({\n        name: methodType === \"currying-function\" ? \"uri\" : \"url\",\n      }),\n      factory.ShorthandPropertyAssignment.create({\n        name: \"headers\",\n      }),\n      convertedParams.hasRequestBody &&\n        factory.PropertyAssignment.create({\n          name: \"requestBody\",\n          initializer: Utils.generateVariableIdentifier(factory, \"params.requestBody\"),\n        }),\n      requestBodyEncoding &&\n        factory.PropertyAssignment.create({\n          name: \"requestBodyEncoding\",\n          initializer: requestBodyEncoding,\n        }),\n      convertedParams.hasQueryParameters &&\n        factory.PropertyAssignment.create({\n          name: \"queryParameters\",\n          initializer: factory.Identifier.create({ name: \"queryParameters\" }),\n        }),\n    ].flatMap(v => (v ? [v] : [])),\n    multiLine: true,\n  });\n\n  const argumentsArray = [requestArgs, factory.Identifier.create({ name: \"option\" })];\n\n  return factory.CallExpression.create({\n    expression: expression,\n    typeArguments: [],\n    argumentsArray: argumentsArray,\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport * as Utils from \"../utils\";\n\nexport interface Params {\n  variableName: string;\n  object: Utils.LiteralExpressionObject;\n}\n\nexport const create = (factory: TsGenerator.Factory.Type, params: Params): ts.VariableStatement => {\n  return factory.VariableStatement.create({\n    declarationList: factory.VariableDeclarationList.create({\n      flag: \"const\",\n      declarations: [\n        factory.VariableDeclaration.create({\n          name: params.variableName,\n          initializer: Utils.generateObjectLiteralExpression(factory, params.object),\n        }),\n      ],\n    }),\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport { escapeText2 as escapeText } from \"../../../utils\";\nimport * as Utils from \"../utils\";\nimport type { MethodType } from \"./types\";\n\nexport const isPathParameter = (params: any): params is CodeGenerator.PickedParameter => {\n  return params.in === \"path\";\n};\n\n/**\n * const url = this.baseUrl + `[head]${params.parameter.[parameterName]}`;\n */\nconst generateUrlVariableStatement = (\n  factory: TsGenerator.Factory.Type,\n  urlTemplate: Utils.Params$TemplateExpression,\n  variableExpression: ts.Expression,\n): ts.VariableStatement => {\n  return factory.VariableStatement.create({\n    declarationList: factory.VariableDeclarationList.create({\n      declarations: [\n        factory.VariableDeclaration.create({\n          name: \"url\",\n          initializer: factory.BinaryExpression.create({\n            left: variableExpression,\n            operator: \"+\",\n            right: Utils.generateTemplateExpression(factory, urlTemplate),\n          }),\n        }),\n      ],\n      flag: \"const\",\n    }),\n  });\n};\n\n/**\n * const uri = `[head]${params.parameter.[parameterName]}`;\n */\nconst generateUriVariableStatement = (\n  factory: TsGenerator.Factory.Type,\n  urlTemplate: Utils.Params$TemplateExpression,\n): ts.VariableStatement => {\n  return factory.VariableStatement.create({\n    declarationList: factory.VariableDeclarationList.create({\n      declarations: [\n        factory.VariableDeclaration.create({\n          name: \"uri\",\n          initializer: Utils.generateTemplateExpression(factory, urlTemplate),\n        }),\n      ],\n      flag: \"const\",\n    }),\n  });\n};\n\nexport const generateUrlTemplateExpression = (\n  factory: TsGenerator.Factory.Type,\n  requestUri: string,\n  pathParameters: CodeGenerator.PickedParameter[],\n): Utils.Params$TemplateExpression => {\n  const patternMap = pathParameters.reduce<{ [key: string]: string }>((previous, item) => {\n    previous[`{${item.name}}`] = item.name;\n    return previous;\n  }, {});\n  const urlTemplate: Utils.Params$TemplateExpression = [];\n  let temporaryStringList: string[] = [];\n  // TODO generateVariableIdentifierに噛み合わ下げいいように変換する\n  const replaceText = (text: string): string | undefined => {\n    let replacedText = text;\n    for (const pathParameterName of Object.keys(patternMap)) {\n      if (new RegExp(pathParameterName).test(replacedText)) {\n        const { text, escaped } = escapeText(patternMap[pathParameterName]);\n        const variableDeclareText = escaped ? `params.parameter[${text}]` : `params.parameter.${text}`;\n        replacedText = replacedText.replace(new RegExp(pathParameterName, \"g\"), variableDeclareText);\n      }\n    }\n    return replacedText === text ? undefined : replacedText;\n  };\n\n  const requestUrlTicks: string[] = Utils.multiSplitStringToArray(requestUri, Object.keys(patternMap));\n  requestUrlTicks.forEach((requestUriTick, index) => {\n    if (requestUri === \"\") {\n      temporaryStringList.push(\"\");\n      return;\n    }\n    const replacedText = replaceText(requestUriTick);\n    if (replacedText) {\n      if (temporaryStringList.length > 0) {\n        const value = temporaryStringList.join(\"/\");\n        urlTemplate.push({\n          type: \"string\",\n          value: value,\n        });\n        temporaryStringList = [];\n      }\n\n      /**\n       * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating\n       */\n      urlTemplate.push({\n        type: \"property\",\n        value: factory.CallExpression.create({\n          expression: factory.Identifier.create({\n            name: \"encodeURIComponent\",\n          }),\n          argumentsArray: [Utils.generateVariableIdentifier(factory, replacedText)],\n        }),\n      });\n    } else {\n      temporaryStringList.push(requestUriTick);\n    }\n    if (index === requestUrlTicks.length - 1) {\n      const value = temporaryStringList.join(\"/\");\n      if (value === \"\") {\n        urlTemplate.push({\n          type: \"string\",\n          value: requestUri.endsWith(\"/\") ? \"/\" : \"\",\n        });\n      } else {\n        urlTemplate.push({\n          type: \"string\",\n          value: value,\n        });\n      }\n    }\n  });\n  return urlTemplate;\n};\n\nexport const create = (\n  factory: TsGenerator.Factory.Type,\n  requestUri: string,\n  pathParameters: CodeGenerator.PickedParameter[],\n  methodType: MethodType,\n): ts.VariableStatement => {\n  const urlTemplate: Utils.Params$TemplateExpression =\n    pathParameters.length > 0 ? generateUrlTemplateExpression(factory, requestUri, pathParameters) : [{ type: \"string\", value: requestUri }];\n  if (methodType === \"currying-function\") {\n    return generateUriVariableStatement(factory, urlTemplate);\n  }\n  if (methodType === \"class\") {\n    const variableExpression = factory.PropertyAccessExpression.create({\n      name: \"baseUrl\",\n      expression: \"this\",\n    });\n    return generateUrlVariableStatement(factory, urlTemplate, variableExpression);\n  }\n  if (methodType === \"function\") {\n    const variableExpression = factory.Identifier.create({\n      name: \"_baseUrl\",\n    });\n    return generateUrlVariableStatement(factory, urlTemplate, variableExpression);\n  }\n  throw new Error(`Invalid MethodType: ${methodType}`);\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport * as Utils from \"../../../utils\";\nimport * as UtilsExtra from \"../utils\";\n\nexport interface Item {\n  type: \"string\" | \"variable\";\n  value: string;\n  style?: string;\n  explode: boolean;\n}\n\nexport interface Params {\n  variableName: string;\n  object: {\n    [key: string]: Item;\n  };\n}\n\nexport const create = (factory: TsGenerator.Factory.Type, params: Params): ts.VariableStatement => {\n  const properties: ts.PropertyAssignment[] = Object.entries(params.object).reduce<ts.PropertyAssignment[]>((previous, [key, item]) => {\n    const childProperties: ts.PropertyAssignment[] = [\n      factory.PropertyAssignment.create({\n        name: \"value\",\n        initializer:\n          item.type === \"variable\"\n            ? UtilsExtra.generateVariableIdentifier(factory, item.value)\n            : factory.StringLiteral.create({ text: item.value }),\n      }),\n    ];\n    if (item.style) {\n      childProperties.push(\n        factory.PropertyAssignment.create({\n          name: \"style\",\n          initializer: factory.StringLiteral.create({ text: item.style }),\n        }),\n      );\n    }\n    childProperties.push(\n      factory.PropertyAssignment.create({\n        name: \"explode\",\n        initializer: item.explode ? ts.factory.createTrue() : ts.factory.createFalse(),\n      }),\n    );\n    const childObjectInitializer = factory.ObjectLiteralExpression.create({\n      properties: childProperties,\n    });\n    const childObject = factory.PropertyAssignment.create({\n      name: Utils.escapeText(key),\n      initializer: childObjectInitializer,\n    });\n    return previous.concat(childObject);\n  }, []);\n\n  return factory.VariableStatement.create({\n    declarationList: factory.VariableDeclarationList.create({\n      flag: \"const\",\n      declarations: [\n        factory.VariableDeclaration.create({\n          name: params.variableName,\n          type: factory.TypeReferenceNode.create({\n            name: \"QueryParameters\",\n          }),\n          initializer: factory.ObjectLiteralExpression.create({\n            properties,\n            multiLine: true,\n          }),\n        }),\n      ],\n    }),\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport { escapeText2 as escapeText } from \"../../../utils\";\nimport * as Utils from \"../utils\";\nimport * as CallRequest from \"./CallRequest\";\nimport * as HeaderParameter from \"./HeaderParameter\";\nimport * as PathParameter from \"./PathParameter\";\nimport * as QueryParameter from \"./QueryParameter\";\nimport { createEncodingMap } from \"./createEncodingMap\";\nimport type { MethodType } from \"./types\";\n\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params, methodType: MethodType): ts.Statement[] => {\n  const statements: ts.Statement[] = [];\n  const { convertedParams, operationParams } = params;\n  const { pickedParameters } = convertedParams;\n\n  // Generate Path Parameter\n  const pathParameters = pickedParameters.filter(PathParameter.isPathParameter);\n  statements.push(PathParameter.create(factory, params.operationParams.requestUri, pathParameters, methodType));\n\n  /**\n   * Create Variable: const header = {};\n   */\n  const initialHeaderObject: Utils.LiteralExpressionObject = {};\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    initialHeaderObject[\"Content-Type\"] = {\n      type: \"variable\",\n      value: \"params.headers.Content-Type\",\n    };\n  } else if (convertedParams.requestFirstContentType) {\n    initialHeaderObject[\"Content-Type\"] = {\n      type: \"string\",\n      value: convertedParams.requestFirstContentType,\n    };\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    initialHeaderObject.Accept = {\n      type: \"variable\",\n      value: \"params.headers.Accept\",\n    };\n  } else if (convertedParams.successResponseFirstContentType) {\n    initialHeaderObject.Accept = {\n      type: \"string\",\n      value: convertedParams.successResponseFirstContentType,\n    };\n  }\n\n  // Generate Header Parameter\n  const headerParameter = pickedParameters.filter(item => item.in === \"header\");\n  const headerObject = Object.values(headerParameter).reduce<Utils.LiteralExpressionObject>((previous, current) => {\n    return { ...previous, [current.name]: { type: \"variable\", value: `params.parameter.${current.name}` } };\n  }, initialHeaderObject);\n  statements.push(\n    HeaderParameter.create(factory, {\n      variableName: \"headers\",\n      object: headerObject,\n    }),\n  );\n\n  /**\n   * Create Variable: const requestEncoding = {};\n   */\n  const content = operationParams.requestBody?.content;\n  if (content) {\n    const encodingMap = createEncodingMap(content);\n    let identifier: ts.Identifier | undefined;\n    if (convertedParams.has2OrMoreRequestContentTypes) {\n      identifier = factory.Identifier.create({\n        name: JSON.stringify(encodingMap, null, 2),\n      });\n    } else if (convertedParams.requestFirstContentType) {\n      identifier = factory.Identifier.create({\n        name: JSON.stringify({ [convertedParams.requestFirstContentType]: encodingMap[convertedParams.requestFirstContentType] }, null, 2),\n      });\n    }\n    const requestEncodingsVariableStatement = factory.VariableStatement.create({\n      declarationList: factory.VariableDeclarationList.create({\n        flag: \"const\",\n        declarations: [\n          factory.VariableDeclaration.create({\n            name: \"requestEncodings\",\n            initializer: identifier,\n            type: factory.TypeReferenceNode.create({\n              name: \"Record<string, Record<string, Encoding>>\",\n            }),\n          }),\n        ],\n      }),\n    });\n\n    if (identifier && Object.keys(encodingMap).length > 0) {\n      statements.push(requestEncodingsVariableStatement);\n    }\n  }\n\n  // Generate Query Parameter\n  if (convertedParams.hasQueryParameters) {\n    const queryParameter = pickedParameters.filter(item => item.in === \"query\");\n    const queryObject = Object.values(queryParameter).reduce<{ [key: string]: QueryParameter.Item }>((previous, current) => {\n      const { text, escaped } = escapeText(current.name);\n      const variableDeclareText = escaped ? `params.parameter[${text}]` : `params.parameter.${text}`;\n      return {\n        ...previous,\n        [current.name]: { type: \"variable\", value: variableDeclareText, style: current.style, explode: !!current.explode },\n      };\n    }, {});\n    statements.push(QueryParameter.create(factory, { variableName: \"queryParameters\", object: queryObject }));\n  }\n\n  // Generate CallRequest\n  statements.push(\n    factory.ReturnStatement.create({\n      expression: CallRequest.create(factory, params, methodType),\n    }),\n  );\n\n  return statements.length === 0 ? [factory.ReturnStatement.create({})] : statements;\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport * as ApiClientInterface from \"../../_shared/ApiClientInterface\";\nimport type { Option } from \"../../_shared/types\";\nimport * as Class from \"./Class\";\nimport * as Constructor from \"./Constructor\";\nimport * as Method from \"./Method\";\n\nexport { Method };\n\nexport const create = (factory: TsGenerator.Factory.Type, list: CodeGenerator.Params[], option: Option): ts.Statement[] => {\n  const methodList = list.map(params => {\n    return Method.create(factory, params, option);\n  });\n  const members = [Constructor.create(factory), ...methodList];\n  return [...ApiClientInterface.create(factory, list, \"class\", option), Class.create(factory, members)];\n};\n","import ts from \"typescript\";\n\nimport { TsGenerator } from \"../../api\";\nimport type { CodeGenerator } from \"../../types\";\nimport * as ApiClientArgument from \"../_shared/ApiClientArgument\";\nimport * as ApiClientInterface from \"../_shared/ApiClientInterface\";\nimport * as FunctionalApiClient from \"./FunctionalApiClient\";\nimport * as ClientTypeDefinition from \"./FunctionalApiClient/ClientTypeDefinition\";\n\nimport type { Option } from \"../_shared/types\";\n\nexport { Option };\n\nexport const generator: CodeGenerator.GenerateFunction<Option> = (\n  codeGeneratorParamsList: CodeGenerator.Params[],\n  option?: Option,\n): CodeGenerator.IntermediateCode[] => {\n  const statements: ts.Statement[] = [];\n  const factory = TsGenerator.Factory.create();\n  codeGeneratorParamsList.forEach(codeGeneratorParams => {\n    const { convertedParams } = codeGeneratorParams;\n    if (convertedParams.hasRequestBody) {\n      statements.push(ApiClientArgument.createRequestContentTypeReference(factory, codeGeneratorParams));\n    }\n    if (convertedParams.responseSuccessNames.length > 0) {\n      statements.push(ApiClientArgument.createResponseContentTypeReference(factory, codeGeneratorParams));\n    }\n    const typeDeclaration = ApiClientArgument.create(factory, codeGeneratorParams);\n    if (typeDeclaration) {\n      statements.push(typeDeclaration);\n    }\n  });\n\n  ApiClientInterface.create(factory, codeGeneratorParamsList, \"function\", option || {}).forEach(statement => {\n    statements.push(statement);\n  });\n\n  const apiClientStatement = FunctionalApiClient.create(factory, codeGeneratorParamsList, option || {});\n  statements.push(apiClientStatement);\n  ClientTypeDefinition.create(factory).forEach(statement => {\n    statements.push(statement);\n  });\n\n  return statements;\n};\n","import { EOL } from \"os\";\nimport ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport type { Option } from \"../../_shared/types\";\nimport * as ArrowFunction from \"./ArrowFunction\";\n\nexport const create = (factory: TsGenerator.Factory.Type, list: CodeGenerator.Params[], option: Option): ts.VariableStatement => {\n  const properties = list.map(params => {\n    return factory.PropertyAssignment.create({\n      name: params.convertedParams.functionName,\n      initializer: ArrowFunction.create(factory, params, option),\n      comment: option.additionalMethodComment\n        ? [params.operationParams.comment, `operationId: ${params.operationId}`, `Request URI: ${params.operationParams.requestUri}`]\n            .filter(t => !!t)\n            .join(EOL)\n        : params.operationParams.comment,\n    });\n  });\n\n  const returnValue = factory.ReturnStatement.create({\n    expression: factory.ObjectLiteralExpression.create({\n      properties,\n      multiLine: true,\n    }),\n  });\n\n  const arrowFunction = factory.ArrowFunction.create({\n    typeParameters: [\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestOption\",\n      }),\n    ],\n    parameters: [\n      factory.ParameterDeclaration.create({\n        name: \"apiClient\",\n        type: factory.TypeReferenceNode.create({\n          name: \"ApiClient\",\n          typeArguments: [\n            factory.TypeReferenceNode.create({\n              name: \"RequestOption\",\n            }),\n          ],\n        }),\n      }),\n      factory.ParameterDeclaration.create({\n        name: \"baseUrl\",\n        type: ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword),\n      }),\n    ],\n    body: factory.Block.create({\n      statements: [\n        factory.VariableStatement.create({\n          declarationList: factory.VariableDeclarationList.create({\n            flag: \"const\",\n            declarations: [\n              factory.VariableDeclaration.create({\n                name: \"_baseUrl\",\n                initializer: factory.CallExpression.create({\n                  expression: factory.PropertyAccessExpression.create({\n                    expression: \"baseUrl\",\n                    name: \"replace\",\n                  }),\n                  argumentsArray: [factory.RegularExpressionLiteral.create({ text: \"/\\\\/$/\" }), factory.StringLiteral.create({ text: \"\" })],\n                }),\n              }),\n            ],\n          }),\n        }),\n        returnValue,\n      ],\n      multiLine: true,\n    }),\n  });\n\n  return factory.VariableStatement.create({\n    modifiers: [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)],\n    declarationList: factory.VariableDeclarationList.create({\n      declarations: [\n        factory.VariableDeclaration.create({\n          name: \"createClient\",\n          initializer: arrowFunction,\n        }),\n      ],\n      flag: \"const\",\n    }),\n  });\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport * as MethodBody from \"../../_shared/MethodBody\";\nimport type { Option } from \"../../_shared/types\";\n\nexport { MethodBody };\n\nconst generateParams = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  const typeArguments: ts.TypeNode[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"RequestContentType\",\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"ResponseContentType\",\n      }),\n    );\n  }\n  return factory.ParameterDeclaration.create({\n    name: \"params\",\n    modifiers: undefined,\n    type: factory.TypeReferenceNode.create({\n      name: convertedParams.argumentParamsTypeDeclaration,\n      typeArguments,\n    }),\n  });\n};\n\nconst generateResponseReturnType = (\n  factory: TsGenerator.Factory.Type,\n  successResponseNameList: string[],\n  successResponseContentTypeList: string[],\n  option: Option,\n) => {\n  let objectType: ts.TypeNode = factory.TypeNode.create({\n    type: \"void\",\n  });\n  if (successResponseNameList.length === 1) {\n    objectType = factory.TypeReferenceNode.create({\n      name: successResponseNameList[0],\n    });\n  } else if (successResponseNameList.length > 1) {\n    objectType = factory.UnionTypeNode.create({\n      typeNodes: successResponseNameList.map(item => factory.TypeReferenceNode.create({ name: item })),\n    });\n  }\n\n  // レスポンスが存在しないので Promise<void>\n  if (successResponseNameList.length === 0) {\n    if (option.sync) {\n      return objectType;\n    }\n    return factory.TypeReferenceNode.create({\n      name: \"Promise\",\n      typeArguments: [objectType],\n    });\n  }\n\n  const isOnlyOneResponseContentType = successResponseContentTypeList.length === 1;\n  let indexType: ts.TypeNode = factory.TypeReferenceNode.create({\n    name: \"ResponseContentType\",\n  });\n  if (isOnlyOneResponseContentType) {\n    indexType = factory.TypeReferenceNode.create({\n      name: `\"${successResponseContentTypeList[0]}\"`,\n    });\n  }\n\n  if (option.sync) {\n    return factory.IndexedAccessTypeNode.create({\n      objectType,\n      indexType,\n    });\n  }\n\n  return factory.TypeReferenceNode.create({\n    name: \"Promise\",\n    typeArguments: [\n      factory.IndexedAccessTypeNode.create({\n        objectType,\n        indexType,\n      }),\n    ],\n  });\n};\n\nconst methodTypeParameters = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params): ts.TypeParameterDeclaration[] => {\n  const typeParameters: ts.TypeParameterDeclaration[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.requestContentTypeName,\n        }),\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"ResponseContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.responseContentTypeName,\n        }),\n      }),\n    );\n  }\n  return typeParameters;\n};\n\n/**\n * async (params: {argumentParamsTypeDeclaration}<{RequestContentType}>): Promise<{requestBodyName}[ResponseContentType]> => {}\n */\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params, option: Option): ts.ArrowFunction => {\n  const { convertedParams } = params;\n  const typeParameters: ts.TypeParameterDeclaration[] = methodTypeParameters(factory, params);\n  const methodArguments: ts.ParameterDeclaration[] = [];\n  const hasParamsArguments =\n    convertedParams.hasParameter ||\n    convertedParams.hasRequestBody ||\n    convertedParams.has2OrMoreSuccessResponseContentTypes ||\n    convertedParams.has2OrMoreRequestContentTypes;\n\n  if (hasParamsArguments) {\n    methodArguments.push(generateParams(factory, params));\n  }\n\n  const returnType: ts.TypeNode = generateResponseReturnType(\n    factory,\n    convertedParams.responseSuccessNames,\n    convertedParams.successResponseContentTypes,\n    option,\n  );\n\n  methodArguments.push(\n    factory.ParameterDeclaration.create({\n      name: \"option\",\n      modifiers: undefined,\n      optional: true,\n      type: factory.TypeReferenceNode.create({\n        name: \"RequestOption\",\n      }),\n    }),\n  );\n\n  return factory.ArrowFunction.create({\n    typeParameters: typeParameters,\n    parameters: methodArguments,\n    type: returnType,\n    body: factory.Block.create({\n      statements: MethodBody.create(factory, params, \"function\"),\n      multiLine: true,\n    }),\n  });\n};\n","import ts from \"typescript\";\nimport type { TsGenerator } from \"../../../api\";\n\nexport const create = (factory: TsGenerator.Factory.Type): ts.TypeAliasDeclaration[] => {\n  return [\n    factory.TypeAliasDeclaration.create({\n      name: \"ClientFunction<RequestOption>\",\n      type: factory.TypeReferenceNode.create({\n        name: \"typeof createClient<RequestOption>\",\n      }),\n    }),\n    factory.TypeAliasDeclaration.create({\n      export: true,\n      name: \"Client<RequestOption>\",\n      type: factory.TypeReferenceNode.create({\n        name: \"ReturnType<ClientFunction<RequestOption>>\",\n      }),\n    }),\n  ];\n};\n","import ts from \"typescript\";\n\nimport { TsGenerator } from \"../../api\";\nimport type { CodeGenerator } from \"../../types\";\nimport * as ApiClientArgument from \"../_shared/ApiClientArgument\";\nimport * as ApiClientInterface from \"../_shared/ApiClientInterface\";\nimport * as FunctionalApiClient from \"./FunctionalApiClient\";\n\nimport type { Option } from \"../_shared/types\";\n\nexport { Option };\n\nexport const generator: CodeGenerator.GenerateFunction<Option> = (\n  codeGeneratorParamsList: CodeGenerator.Params[],\n  option?: Option,\n): CodeGenerator.IntermediateCode[] => {\n  const statements: ts.Statement[] = [];\n  const factory = TsGenerator.Factory.create();\n  codeGeneratorParamsList.forEach(codeGeneratorParams => {\n    const { convertedParams } = codeGeneratorParams;\n    if (convertedParams.hasRequestBody) {\n      statements.push(ApiClientArgument.createRequestContentTypeReference(factory, codeGeneratorParams));\n    }\n    if (convertedParams.responseSuccessNames.length > 0) {\n      statements.push(ApiClientArgument.createResponseContentTypeReference(factory, codeGeneratorParams));\n    }\n    const typeDeclaration = ApiClientArgument.create(factory, codeGeneratorParams);\n    if (typeDeclaration) {\n      statements.push(typeDeclaration);\n    }\n  });\n\n  ApiClientInterface.create(factory, codeGeneratorParamsList, \"currying-function\", option || {}).forEach(statement => {\n    statements.push(statement);\n  });\n\n  const apiClientStatements = FunctionalApiClient.create(factory, codeGeneratorParamsList, option || {});\n  apiClientStatements.forEach(apiClientStatement => {\n    statements.push(apiClientStatement);\n  });\n\n  return statements;\n};\n","import { EOL } from \"os\";\nimport ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport type { Option } from \"../../_shared/types\";\nimport * as ArrowFunction from \"./CurryingArrowFunction\";\n\nexport const create = (factory: TsGenerator.Factory.Type, list: CodeGenerator.Params[], option: Option): ts.Statement[] => {\n  const variableStatements = list.map(params => {\n    return factory.VariableStatement.create({\n      comment: option.additionalMethodComment\n        ? [params.operationParams.comment, `operationId: ${params.operationId}`, `Request URI: ${params.operationParams.requestUri}`]\n            .filter(t => !!t)\n            .join(EOL)\n        : params.operationParams.comment,\n      modifiers: [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)],\n      declarationList: factory.VariableDeclarationList.create({\n        declarations: [\n          factory.VariableDeclaration.create({\n            name: params.convertedParams.functionName,\n            initializer: ArrowFunction.create(factory, params, option),\n          }),\n        ],\n        flag: \"const\",\n      }),\n    });\n  });\n\n  return variableStatements;\n};\n","import ts from \"typescript\";\n\nimport type { TsGenerator } from \"../../../api\";\nimport type { CodeGenerator } from \"../../../types\";\nimport * as MethodBody from \"../../_shared/MethodBody\";\nimport type { Option } from \"../../_shared/types\";\n\nexport { MethodBody };\n\nconst generateParams = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params) => {\n  const typeArguments: ts.TypeNode[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"RequestContentType\",\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeArguments.push(\n      factory.TypeReferenceNode.create({\n        name: \"ResponseContentType\",\n      }),\n    );\n  }\n  return factory.ParameterDeclaration.create({\n    name: \"params\",\n    modifiers: undefined,\n    type: factory.TypeReferenceNode.create({\n      name: convertedParams.argumentParamsTypeDeclaration,\n      typeArguments,\n    }),\n  });\n};\n\nconst generateResponseReturnType = (\n  factory: TsGenerator.Factory.Type,\n  successResponseNameList: string[],\n  successResponseContentTypeList: string[],\n  option: Option,\n) => {\n  let objectType: ts.TypeNode = factory.TypeNode.create({\n    type: \"void\",\n  });\n  if (successResponseNameList.length === 1) {\n    objectType = factory.TypeReferenceNode.create({\n      name: successResponseNameList[0],\n    });\n  } else if (successResponseNameList.length > 1) {\n    objectType = factory.UnionTypeNode.create({\n      typeNodes: successResponseNameList.map(item => factory.TypeReferenceNode.create({ name: item })),\n    });\n  }\n\n  // レスポンスが存在しないので Promise<void>\n  if (successResponseNameList.length === 0) {\n    if (option.sync) {\n      return objectType;\n    }\n    return factory.TypeReferenceNode.create({\n      name: \"Promise\",\n      typeArguments: [objectType],\n    });\n  }\n\n  const isOnlyOneResponseContentType = successResponseContentTypeList.length === 1;\n  let indexType: ts.TypeNode = factory.TypeReferenceNode.create({\n    name: \"ResponseContentType\",\n  });\n  if (isOnlyOneResponseContentType) {\n    indexType = factory.TypeReferenceNode.create({\n      name: `\"${successResponseContentTypeList[0]}\"`,\n    });\n  }\n\n  if (option.sync) {\n    return factory.IndexedAccessTypeNode.create({\n      objectType,\n      indexType,\n    });\n  }\n\n  return factory.TypeReferenceNode.create({\n    name: \"Promise\",\n    typeArguments: [\n      factory.IndexedAccessTypeNode.create({\n        objectType,\n        indexType,\n      }),\n    ],\n  });\n};\n\nconst methodTypeParameters = (factory: TsGenerator.Factory.Type, { convertedParams }: CodeGenerator.Params): ts.TypeParameterDeclaration[] => {\n  const typeParameters: ts.TypeParameterDeclaration[] = [];\n  if (convertedParams.has2OrMoreRequestContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.requestContentTypeName,\n        }),\n      }),\n    );\n  }\n  if (convertedParams.has2OrMoreSuccessResponseContentTypes) {\n    typeParameters.push(\n      factory.TypeParameterDeclaration.create({\n        name: \"ResponseContentType\",\n        constraint: factory.TypeReferenceNode.create({\n          name: convertedParams.responseContentTypeName,\n        }),\n      }),\n    );\n  }\n  return typeParameters;\n};\n\n/**\n * async (params: {argumentParamsTypeDeclaration}<{RequestContentType}>): Promise<{requestBodyName}[ResponseContentType]> => {}\n */\nexport const create = (factory: TsGenerator.Factory.Type, params: CodeGenerator.Params, option: Option): ts.ArrowFunction => {\n  const { convertedParams } = params;\n  const typeParameters: ts.TypeParameterDeclaration[] = methodTypeParameters(factory, params);\n  const methodArguments: ts.ParameterDeclaration[] = [];\n  const hasParamsArguments =\n    convertedParams.hasParameter ||\n    convertedParams.hasRequestBody ||\n    convertedParams.has2OrMoreSuccessResponseContentTypes ||\n    convertedParams.has2OrMoreRequestContentTypes;\n\n  if (hasParamsArguments) {\n    methodArguments.push(generateParams(factory, params));\n  }\n\n  const returnType: ts.TypeNode = generateResponseReturnType(\n    factory,\n    convertedParams.responseSuccessNames,\n    convertedParams.successResponseContentTypes,\n    option,\n  );\n\n  methodArguments.push(\n    factory.ParameterDeclaration.create({\n      name: \"option\",\n      modifiers: undefined,\n      optional: true,\n      type: factory.TypeReferenceNode.create({\n        name: \"RequestOption\",\n      }),\n    }),\n  );\n\n  const curryingFunction = factory.ArrowFunction.create({\n    typeParameters: typeParameters,\n    parameters: methodArguments,\n    type: returnType,\n    body: factory.Block.create({\n      statements: MethodBody.create(factory, params, \"currying-function\"),\n      multiLine: true,\n    }),\n  });\n\n  return factory.ArrowFunction.create({\n    typeParameters: [\n      factory.TypeParameterDeclaration.create({\n        name: \"RequestOption\",\n      }),\n    ],\n    parameters: [\n      factory.ParameterDeclaration.create({\n        name: \"apiClient\",\n        type: factory.TypeReferenceNode.create({\n          name: \"ApiClient<RequestOption>\",\n        }),\n      }),\n    ],\n    equalsGreaterThanToken: ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken),\n    body: curryingFunction,\n  });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AA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3D,CAAC;AAAA,QACH;AAAA,QACA,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AACT;;;ADlBO,IAAME,aAAoD,CAC/D,yBACA,WACqC;AACrC,QAAM,aAA6B,CAAC;AACpC,QAAM,UAAU,oBAAY,QAAQ,OAAO;AAC3C,0BAAwB,QAAQ,yBAAuB;AACrD,UAAM,EAAE,gBAAgB,IAAI;AAC5B,QAAI,gBAAgB,gBAAgB;AAClC,iBAAW,KAAuB,kCAAkC,SAAS,mBAAmB,CAAC;AAAA,IACnG;AACA,QAAI,gBAAgB,qBAAqB,SAAS,GAAG;AACnD,iBAAW,KAAuB,mCAAmC,SAAS,mBAAmB,CAAC;AAAA,IACpG;AACA,UAAM,kBAAoCC,SAAO,SAAS,mBAAmB;AAC7E,QAAI,iBAAiB;AACnB,iBAAW,KAAK,eAAe;AAAA,IACjC;AAAA,EACF,CAAC;AAED,EAAmBA,SAAO,SAAS,yBAAyB,qBAAqB,UAAU,CAAC,CAAC,EAAE,QAAQ,eAAa;AAClH,eAAW,KAAK,SAAS;AAAA,EAC3B,CAAC;AAED,QAAM,sBAA0CA,SAAO,SAAS,yBAAyB,UAAU,CAAC,CAAC;AACrG,sBAAoB,QAAQ,wBAAsB;AAChD,eAAW,KAAK,kBAAkB;AAAA,EACpC,CAAC;AAED,SAAO;AACT;","names":["import_typescript","create","import_typescript","ts","create","make","create","make","create","make","import_typescript","create","ts","make","create","make","create","make","create","make","create","make","create","make","import_typescript","create","ts","make","create","make","import_typescript","comment","create","ts","make","create","make","import_typescript","create","ts","make","import_typescript","create","ts","make","import_typescript","ts","create","update","make","create","make","create","make","import_typescript","create","ts","make","create","make","import_typescript","create","ts","make","create","make","import_typescript","create","ts","make","create","make","create","make","create","make","create","make","create","make","create","make","create","make","create","make","create","make","import_typescript","create","ts","make","create","make","import_typescript","create","make","create","ts","make","import_typescript","ts","create","make","create","make","create","make","create","make","import_typescript","ts","create","make","import_typescript","create","ts","make","create","ts","make","import_typescript","create","ts","import_typescript","ts","ts","create","import_typescript","ts","create","import_typescript","create","ts","create","import_os","create","create","text","create","import_typescript","create","ts","create","create","create","create","generator","import_os","import_typescript","generateParams","generateResponseReturnType","methodTypeParameters","create","create","ts","create","generator","create","generator","import_os","import_typescript","import_typescript","generateParams","generateResponseReturnType","methodTypeParameters","create","ts","create","ts","generator","create"]}