diff --git a/bun.lock b/bun.lock index 9e24397e..7a8ccd2f 100644 --- a/bun.lock +++ b/bun.lock @@ -11,9 +11,10 @@ "elm-codegen": "^0.6.3", "elm-format": "0.8.7", "elm-optimize-level-2": "0.3.5", - "elm-pages": "^3.0.28", + "elm-pages": "^3.1.1", "elm-review": "^2.13.5", "elm-test": "^0.19.1-revision17", + "lamdera": "^0.19.1-1.4.0", "vite": "^6.0.3", }, }, @@ -141,6 +142,16 @@ "@jsonjoy.com/util": ["@jsonjoy.com/util@1.9.0", "", { "dependencies": { "@jsonjoy.com/buffers": "^1.0.0", "@jsonjoy.com/codegen": "^1.0.0" }, "peerDependencies": { "tslib": "2" } }, "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ=="], + "@lamdera/compiler-darwin-arm64": ["@lamdera/compiler-darwin-arm64@0.19.1-1.4.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zLqkIm5wMtuWyFnWlpgXgN0/nfEYRqvcSXEg9R/SlDL5yb8cle3sJCkR5S7zcqBc3zknjb24gWgpWzd0BSkkZg=="], + + "@lamdera/compiler-darwin-x64": ["@lamdera/compiler-darwin-x64@0.19.1-1.4.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-hMG/uKWeL7hp8EeodmSo9Tg9X1P8Xzshai8E/RNtn2LpLCZ6yeRsIjzxpKqV8cEkVCI9yamnT6QTMywexPceYg=="], + + "@lamdera/compiler-linux-arm64": ["@lamdera/compiler-linux-arm64@0.19.1-1.4.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZLO4Z1jCW4O/9Zoa9LXME+DklUGaOOv6JW7ulWYxSdgvu68Lgkfx47HZidM96R9tehX0Q1wZ+fBmZQkU/a7biQ=="], + + "@lamdera/compiler-linux-x64": ["@lamdera/compiler-linux-x64@0.19.1-1.4.0", "", { "os": "linux", "cpu": "x64" }, "sha512-r7tx1p/+dSw9SLUL3K7dSj1RBb/1Y5kmE27i9jarOlTeEUr1pycUqt3FSomD0EbTp8Rcp7jRCaNWvb5IWFathg=="], + + "@lamdera/compiler-win32-x64": ["@lamdera/compiler-win32-x64@0.19.1-1.4.0", "", { "os": "win32", "cpu": "x64" }, "sha512-hLpi1eikdY9BA87ipqhTP8gY0l75yih7kjckD30CrIOMMqEWbgaK/0yr2JxTQJiSt6D2A1VZiUbqjHMiSTbPZg=="], + "@lydell/elm-json": ["@lydell/elm-json@0.2.13-1", "", { "optionalDependencies": { "@lydell/elm-json-darwin-arm64": "0.2.13-0", "@lydell/elm-json-darwin-x64": "0.2.13-0", "@lydell/elm-json-linux-arm": "0.2.13-0", "@lydell/elm-json-linux-x64": "0.2.13-0", "@lydell/elm-json-win32-x64": "0.2.13-0" }, "bin": { "elm-json": "bin/elm-json" } }, "sha512-KPeeeAzKAxZMq7wjPBFCOjQZNuitnE4QrVCsFRf7tHxRDpSVA9gd79WNnPfaHhBfIN3tgbgt4a5T+O1h6Jt6Og=="], "@lydell/elm-json-darwin-arm64": ["@lydell/elm-json-darwin-arm64@0.2.13-0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-p3BGHj1xFL2+kTw+/wmwXPFtGdSGmarYXxeIuxtp7QK5UeTY9+DV06DBfX5vIIf6ai8snHTpS7rtHacgVWSl+A=="], @@ -479,7 +490,7 @@ "elm-optimize-level-2": ["elm-optimize-level-2@0.3.5", "", { "dependencies": { "@types/jest": "^27.0.3", "chalk": "^4.1.0", "commander": "^6.0.0", "node-elm-compiler": "^5.0.4", "ts-union": "^2.2.1", "typescript": "^4.5.5" }, "bin": { "elm-optimize-level-2": "bin/elm-optimize-level-2" } }, "sha512-t1xl8zR9UBspdmEMuLBE/qTLP+Ew3L4PzKLhSY/PsO21HU3jZ1ULmKxDtZmJPVG4ciqsY1JSl/GFbaSdQ1sX9Q=="], - "elm-pages": ["elm-pages@3.0.28", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "busboy": "^1.6.0", "chokidar": "^5.0.0", "cli-cursor": "^5.0.0", "commander": "^14.0.2", "connect": "^3.7.0", "cookie-signature": "^1.2.2", "cross-spawn": "7.0.6", "devcert": "^1.2.2", "elm-doc-preview": "^6.0.1", "elm-hot": "^1.1.6", "esbuild": "^0.27.2", "fs-extra": "^11.3.3", "globby": "16.1.0", "gray-matter": "^4.0.3", "jsesc": "^3.1.0", "kleur": "^4.1.5", "make-fetch-happen": "^15.0.3", "memfs": "^4.51.1", "micromatch": "^4.0.8", "serve-static": "^2.2.1", "terser": "^5.44.1", "vite": "^7.3.1", "which": "^6.0.0" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.55.1" }, "bin": { "elm-pages": "generator/src/cli.js" } }, "sha512-gOO6z0/RoWp+eTZq2JgpMUutSaeIILUa1yyyHiSCstyPjyYmrfwsVa4WhpP83b8RMPgfE+qngt9ohsShA6p2Uw=="], + "elm-pages": ["elm-pages@3.1.1", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "busboy": "^1.6.0", "chokidar": "^5.0.0", "cli-cursor": "^5.0.0", "commander": "^14.0.3", "connect": "^3.7.0", "cookie-signature": "^1.2.2", "cross-spawn": "7.0.6", "devcert": "^1.2.2", "elm-doc-preview": "^6.0.1", "elm-hot": "^1.1.6", "esbuild": "^0.27.3", "fs-extra": "^11.3.3", "globby": "16.1.0", "gray-matter": "^4.0.3", "jsesc": "^3.1.0", "kleur": "^4.1.5", "make-fetch-happen": "^15.0.3", "memfs": "^4.56.10", "micromatch": "^4.0.8", "serve-static": "^2.2.1", "terser": "^5.44.1", "vite": "^7.3.1", "which": "^6.0.1" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.55.1" }, "bin": { "elm-pages": "generator/src/cli.js" } }, "sha512-cikCE5gjJpBjxhkcxbZUynojq/pyWvl+uGwXsWnJsyQNYYCgOY/HcNjwue8T2LlbhOQED4FTnyMSMRuY7dqDuQ=="], "elm-review": ["elm-review@2.13.5", "", { "dependencies": { "chalk": "^4.0.0", "chokidar": "^3.5.2", "cross-spawn": "^7.0.3", "elm-solve-deps-wasm": "^1.0.2 || ^2.0.0", "fastest-levenshtein": "^1.0.16", "find-up": "^4.1.0 || ^5.0.0", "folder-hash": "^3.3.0", "got": "^11.8.5", "graceful-fs": "^4.2.11", "minimist": "^1.2.6", "ora": "^5.4.0", "path-key": "^3.1.1", "prompts": "^2.2.1", "strip-ansi": "^6.0.0", "terminal-link": "^2.1.1", "tinyglobby": "^0.2.10", "which": "^2.0.2", "wrap-ansi": "^7.0.0" }, "bin": { "elm-review": "bin/elm-review" } }, "sha512-Iw3YztGjmuGyn4nIEVOxqx+dacJialprpB0ZVrBHA0sBBOQ9+QhBaQnQ0tp0G8U8UoIAush0M7XoBqzUN1F/+A=="], @@ -795,6 +806,8 @@ "ky": ["ky@1.14.3", "", {}, "sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw=="], + "lamdera": ["lamdera@0.19.1-1.4.0", "", { "optionalDependencies": { "@lamdera/compiler-darwin-arm64": "0.19.1-1.4.0", "@lamdera/compiler-darwin-x64": "0.19.1-1.4.0", "@lamdera/compiler-linux-arm64": "0.19.1-1.4.0", "@lamdera/compiler-linux-x64": "0.19.1-1.4.0", "@lamdera/compiler-win32-x64": "0.19.1-1.4.0" }, "bin": { "lamdera": "bin/lamdera" } }, "sha512-F5HqnNJPXulkr6/0XCNhaRhESjewG2iTHc+EKg8mJLj76E2PscuUOVhnBEjPqeFrEZF6RT53qSeWtSYG61fhpQ=="], + "latest-version": ["latest-version@9.0.0", "", { "dependencies": { "package-json": "^10.0.0" } }, "sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA=="], "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], diff --git a/cli/elm.json b/cli/elm.json index e9cd43c6..c302587a 100644 --- a/cli/elm.json +++ b/cli/elm.json @@ -8,8 +8,8 @@ "dependencies": { "direct": { "MaybeJustJames/yaml": "2.1.7", - "dillonkearns/elm-cli-options-parser": "3.2.0", - "dillonkearns/elm-pages": "10.3.0", + "dillonkearns/elm-cli-options-parser": "4.0.0", + "dillonkearns/elm-pages": "11.0.0", "elm/bytes": "1.0.8", "elm/core": "1.0.5", "elm/json": "1.1.4", diff --git a/cli/src/Cli.elm b/cli/src/Cli.elm index a685b48b..ea51b62f 100644 --- a/cli/src/Cli.elm +++ b/cli/src/Cli.elm @@ -43,12 +43,12 @@ type alias CliOptions = , outputDirectory : String , outputModuleName : Maybe String , effectTypes : List OpenApi.Config.EffectType - , generateTodos : Bool + , server : OpenApi.Config.Server , autoConvertSwagger : OpenApi.Config.AutoConvertSwagger , swaggerConversionUrl : Maybe String , swaggerConversionCommand : Maybe String , swaggerConversionCommandArgs : List String - , server : OpenApi.Config.Server + , generateTodos : Bool , overrides : List OpenApi.Config.Path , writeMergedTo : Maybe String , noElmFormat : Bool @@ -68,129 +68,142 @@ program = |> Cli.OptionsParser.with (Cli.Option.optionalKeywordArg "output-dir" |> Cli.Option.withDefault "generated" + |> Cli.Option.withDescription "The directory to output to. Defaults to `generated/`." ) |> Cli.OptionsParser.with - (Cli.Option.optionalKeywordArg "module-name") + (Cli.Option.optionalKeywordArg "module-name" + |> Cli.Option.withDescription "The Elm module name. Defaults to `OAS info.title`." + ) |> Cli.OptionsParser.with (Cli.Option.optionalKeywordArg "effect-types" |> Cli.Option.validateMap effectTypesValidation + |> Cli.Option.withDescription + ([ "A list of which kind of APIs to generate." + , "Each item should be of the form `package.type`." + , "If `package` is omitted it defaults to `elm/http`." + , "If `type` is omitted it defaults to `cmd,task`." + , "If not specified, defaults to `cmd,task` (for elm/http)." + , "The options for package are:" + , " - elm/http" + , " - dillonkearns/elm-pages" + , " - lamdera/program-test" + , "The options for type are:" + , " - cmd: Cmd for elm/http," + , " Effect.Command for lamdera/program-test" + , " - cmdrisky: as above, but using Http.riskyRequest" + , " - cmdrecord: the input to Http.request" + , " - task: Task for elm/http" + , " Effect.Task for lamdera/program-test" + , " BackendTask for dillonkearns/elm-pages" + , " - taskrisky: as above, but using Http.riskyTask" + , " cannot be used for dillonkearns/elm-pages" + , " - taskrecord: the input to Http.task" + ] + |> formatOptionDescription + ) ) |> Cli.OptionsParser.with - (Cli.Option.flag "generateTodos") + (Cli.Option.optionalKeywordArg "server" + |> Cli.Option.validateMap serverValidation + |> Cli.Option.withDescription + ([ "The base URL for the OpenAPI server." + , "If not specified this will be extracted from the OAS" + , "or default to root of the web application." + , "" + , "You can pass in an object to define multiple servers, like" + , """ {"dev": "http://localhost", "prod": "https://example.com"}.""" + , "" + , "This will add a `server` parameter to functions and define" + , "a `Servers` module with your servers. You can pass in an" + , "empty object if you have fully dynamic servers." + ] + |> formatOptionDescription + ) + ) |> Cli.OptionsParser.with (Cli.Option.optionalKeywordArg "auto-convert-swagger" |> Cli.Option.validateMap autoConvertValidation + |> Cli.Option.withDescription + ([ "\"ask\" If a Swagger doc is encountered, ask the user before converting" + , "it to an Open API file. This is the default." + , "\"never\" If a Swagger doc is encountered, error out." + , "\"always\" If a Swagger doc is encountered, automatically convert it" + , "to an Open API file." + ] + |> formatOptionDescription + ) ) |> Cli.OptionsParser.with - (Cli.Option.optionalKeywordArg "swagger-conversion-url") + (Cli.Option.optionalKeywordArg "swagger-conversion-url" + |> Cli.Option.withDescription + ([ "The URL to use to convert a Swagger doc to an Open API" + , "file. Defaults to `https://converter.swagger.io/api/convert`." + ] + |> formatOptionDescription + ) + ) |> Cli.OptionsParser.with - (Cli.Option.optionalKeywordArg "swagger-conversion-command") + (Cli.Option.optionalKeywordArg "swagger-conversion-command" + |> Cli.Option.withDescription + ([ "Instead of making an HTTP request to convert" + , "from Swagger to Open API, use this command." + ] + |> formatOptionDescription + ) + ) |> Cli.OptionsParser.with - (Cli.Option.keywordArgList "swagger-conversion-command-args") + (Cli.Option.keywordArgList "swagger-conversion-command-args" + |> Cli.Option.withDescription + ([ "Additional arguments to pass to the Swagger conversion command," + , "before the contents of the Swagger file are passed in." + ] + |> formatOptionDescription + ) + ) |> Cli.OptionsParser.with - (Cli.Option.optionalKeywordArg "server" - |> Cli.Option.validateMap serverValidation + (Cli.Option.flag "generateTodos" + |> Cli.Option.withDescription + ([ "Whether to generate TODOs for unimplemented endpoints," + , "or fail when something unexpected is encountered." + , "Defaults to `no`. To generate `Debug.todo \"\"`" + , "instead of failing use one of: `yes`, `y`, `true`." + ] + |> formatOptionDescription + ) ) |> Cli.OptionsParser.with (Cli.Option.keywordArgList "overrides" |> Cli.Option.map (List.map OpenApi.Config.pathFromString) + |> Cli.Option.withDescription "Load an additional file to override parts of the original Open API file." ) |> Cli.OptionsParser.with - (Cli.Option.optionalKeywordArg "write-merged-to") + (Cli.Option.optionalKeywordArg "write-merged-to" + |> Cli.Option.withDescription "Write the merged Open API spec to the given file." + ) |> Cli.OptionsParser.with - (Cli.Option.flag "no-elm-format") + (Cli.Option.flag "no-elm-format" + |> Cli.Option.withDescription "Don't run elm-format on the outputs." + ) |> Cli.OptionsParser.with - (Cli.Option.flag "keep-going") - |> Cli.OptionsParser.withDoc - ([ "" - , """version: 0.7.0""" - , """options:""" - , formatOption "output-dir" [ "The directory to output to. Defaults to `generated/`." ] - , formatOption "module-name" [ "The Elm module name. Defaults to `OAS info.title`." ] - , formatOption "effect-types" - [ "A list of which kind of APIs to generate." - , "Each item should be of the form `package.type`." - , "If `package` is omitted it defaults to `elm/http`." - , "If `type` is omitted it defaults to `cmd,task`." - , "If not specified, defaults to `cmd,task` (for elm/http)." - , "The options for package are:" - , " - elm/http" - , " - dillonkearns/elm-pages" - , " - lamdera/program-test" - , "The options for type are:" - , " - cmd: Cmd for elm/http," - , " Effect.Command for lamdera/program-test" - , " - cmdrisky: as above, but using Http.riskyRequest" - , " - cmdrecord: the input to Http.request" - , " - task: Task for elm/http" - , " Effect.Task for lamdera/program-test" - , " BackendTask for dillonkearns/elm-pages" - , " - taskrisky: as above, but using Http.riskyTask" - , " cannot be used for dillonkearns/elm-pages" - , " - taskrecord: the input to Http.task" - ] - , formatOption "server" - [ "The base URL for the OpenAPI server." - , "If not specified this will be extracted from the OAS" - , "or default to root of the web application." - , "" - , "You can pass in an object to define multiple servers, like" - , """{"dev": "http://localhost", "prod": "https://example.com"}.""" - , "" - , "This will add a `server` parameter to functions and define" - , "a `Servers` module with your servers. You can pass in an" - , "empty object if you have fully dynamic servers." - ] - , formatOption "auto-convert-swagger=ask" - [ "If a Swagger doc is encountered, ask the user before converting" - , "it to an Open API file. This is the default." - ] - , formatOption "auto-convert-swagger=never" [ "If a Swagger doc is encountered, error out." ] - , formatOption "auto-convert-swagger[=always]" - [ "If a Swagger doc is encountered, automatically convert it" - , "to an Open API file." - ] - , formatOption "swagger-conversion-url" - [ "The URL to use to convert a Swagger doc to an Open API" - , "file. Defaults to `https://converter.swagger.io/api/convert`." - ] - , formatOption "swagger-conversion-command" - [ "Instead of making an HTTP request to convert" - , "from Swagger to Open API, use this command." - ] - , formatOption "swagger-conversion-command-args" - [ "Additional arguments to pass to the Swagger conversion command," - , "before the contents of the Swagger file are passed in." - ] - , formatOption "generateTodos" - [ "Whether to generate TODOs for unimplemented endpoints," - , "or fail when something unexpected is encountered." - , "Defaults to `no`. To generate `Debug.todo \"\"`" - , "instead of failing use one of: `yes`, `y`, `true`." - ] - , formatOption "overrides" [ "Load an additional file to override parts of the original Open API file." ] - , formatOption "write-merged-to" [ "Write the merged Open API spec to the given file." ] - , formatOption "no-elm-format" [ "Don't run elm-format on the outputs." ] - , formatOption "keep-going" [ "If a route can't be generated, skip it instead of erroring out." ] - ] - |> String.join "\n\n" + (Cli.Option.flag "keep-going" + |> Cli.Option.withDescription "If a route can't be generated, skip it instead of erroring out." ) ) -formatOption : String -> List String -> String -formatOption key descriptionLines = +formatOptionDescription : List String -> String +formatOptionDescription descriptionLines = descriptionLines |> List.indexedMap (\i line -> if i == 0 then - " " ++ String.padRight 35 ' ' ("--" ++ key) ++ line + line else if String.isEmpty line then "" else - " " ++ String.padRight 35 ' ' "" ++ line + String.padRight 72 ' ' "" ++ line ) |> String.join "\n" diff --git a/codegen/elm.codegen.json b/codegen/elm.codegen.json index e4ab2a27..fbebab53 100644 --- a/codegen/elm.codegen.json +++ b/codegen/elm.codegen.json @@ -8,7 +8,7 @@ "elm/json": "1.1.3", "elm-community/json-extra": "4.3.0", "elm/url": "1.0.0", - "dillonkearns/elm-pages": "10.1.0", + "dillonkearns/elm-pages": "11.0.0", "justinmimbs/time-extra": "1.2.0", "justinmimbs/date": "4.1.0", "elm/time": "1.0.0", diff --git a/package.json b/package.json index a9515f25..17611426 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,10 @@ "elm-codegen": "^0.6.3", "elm-format": "0.8.7", "elm-optimize-level-2": "0.3.5", - "elm-pages": "^3.0.28", + "elm-pages": "^3.1.1", "elm-review": "^2.13.5", "elm-test": "^0.19.1-revision17", + "lamdera": "^0.19.1-1.4.0", "vite": "^6.0.3" }, "volta": { diff --git a/src/Gen/BackendTask/Http.elm b/src/Gen/BackendTask/Http.elm index cc4cb0ce..fe033246 100644 --- a/src/Gen/BackendTask/Http.elm +++ b/src/Gen/BackendTask/Http.elm @@ -1,8 +1,7 @@ module Gen.BackendTask.Http exposing ( expectString, expectJson , expectBytes, emptyBody, jsonBody - , annotation_ - , call_ + , annotation_, call_ , bytesBody ) @@ -13,8 +12,8 @@ module Gen.BackendTask.Http exposing @docs get, expectString, expectJson @docs expectBytes, emptyBody, jsonBody -@docs bytesBodyWithOptions, annotation_ -@docs call_ +@docs bytesBodyWithOptions +@docs annotation_, call_ -} @@ -187,6 +186,7 @@ annotation_ : { expect : Type.Annotation -> Type.Annotation , error : Type.Annotation , body : Type.Annotation + , part : Type.Annotation , cacheStrategy : Type.Annotation , metadata : Type.Annotation } @@ -201,6 +201,7 @@ annotation_ = "Body" [] (Type.namedWith [ "Pages", "Internal", "StaticHttpBody" ] "Body" []) + , part = Type.namedWith [ "BackendTask", "Http" ] "Part" [] , cacheStrategy = Type.namedWith [ "BackendTask", "Http" ] "CacheStrategy" [] , metadata = @@ -235,6 +236,16 @@ call_ : , stringBody : Elm.Expression -> Elm.Expression -> Elm.Expression , jsonBody : Elm.Expression -> Elm.Expression , bytesBody : Elm.Expression -> Elm.Expression -> Elm.Expression + , multipartBody : Elm.Expression -> Elm.Expression + , stringPart : Elm.Expression -> Elm.Expression -> Elm.Expression + , bytesPart : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , bytesPartWithFilename : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression , getWithOptions : Elm.Expression -> Elm.Expression , withMetadata : Elm.Expression -> Elm.Expression -> Elm.Expression } @@ -542,6 +553,99 @@ call_ = } ) [ bytesBodyArg_, bytesBodyArg_0 ] + , multipartBody = + \multipartBodyArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "BackendTask", "Http" ] + , name = "multipartBody" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "BackendTask", "Http" ] + "Part" + [] + ) + ] + (Type.namedWith + [ "BackendTask", "Http" ] + "Body" + [] + ) + ) + } + ) + [ multipartBodyArg_ ] + , stringPart = + \stringPartArg_ stringPartArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "BackendTask", "Http" ] + , name = "stringPart" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.namedWith + [ "BackendTask", "Http" ] + "Part" + [] + ) + ) + } + ) + [ stringPartArg_, stringPartArg_0 ] + , bytesPart = + \bytesPartArg_ bytesPartArg_0 bytesPartArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "BackendTask", "Http" ] + , name = "bytesPart" + , annotation = + Just + (Type.function + [ Type.string + , Type.string + , Type.namedWith [ "Bytes" ] "Bytes" [] + ] + (Type.namedWith + [ "BackendTask", "Http" ] + "Part" + [] + ) + ) + } + ) + [ bytesPartArg_, bytesPartArg_0, bytesPartArg_1 ] + , bytesPartWithFilename = + \bytesPartWithFilenameArg_ bytesPartWithFilenameArg_0 bytesPartWithFilenameArg_1 bytesPartWithFilenameArg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "BackendTask", "Http" ] + , name = "bytesPartWithFilename" + , annotation = + Just + (Type.function + [ Type.string + , Type.string + , Type.string + , Type.namedWith [ "Bytes" ] "Bytes" [] + ] + (Type.namedWith + [ "BackendTask", "Http" ] + "Part" + [] + ) + ) + } + ) + [ bytesPartWithFilenameArg_ + , bytesPartWithFilenameArg_0 + , bytesPartWithFilenameArg_1 + , bytesPartWithFilenameArg_2 + ] , getWithOptions = \getWithOptionsArg_ -> Elm.apply