@nfdi4plants/arctrl 1.0.0-alpha10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARC.js +262 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +848 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1105 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +479 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2281 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +48 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +668 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +338 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Template.Json.js +85 -0
- package/Templates/Template.Spreadsheet.js +315 -0
- package/Templates/Template.Web.js +27 -0
- package/Templates/Template.js +179 -0
- package/Templates/Templates.js +82 -0
- package/WebRequest/WebRequest.js +38 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
- package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/index.js +13 -0
- package/package.json +24 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { fromContinuations } from "../fable-library.4.1.4/Async.js";
|
|
2
|
+
import { HttpResponse, ResponseContent, HttpRequest, BodyContent, HttpMethod, Header } from "./Types.fs.js";
|
|
3
|
+
import { tail, head, isEmpty, ofArray as ofArray_1, singleton, append, empty } from "../fable-library.4.1.4/List.js";
|
|
4
|
+
import { ofArray, empty as empty_1 } from "../fable-library.4.1.4/Map.js";
|
|
5
|
+
import { disposeSafe, getEnumerator, comparePrimitives } from "../fable-library.4.1.4/Util.js";
|
|
6
|
+
import { join, split, isNullOrEmpty } from "../fable-library.4.1.4/String.js";
|
|
7
|
+
import { choose } from "../fable-library.4.1.4/Array.js";
|
|
8
|
+
import { some } from "../fable-library.4.1.4/Option.js";
|
|
9
|
+
import { singleton as singleton_1 } from "../fable-library.4.1.4/AsyncBuilder.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Download a Blob
|
|
13
|
+
*/
|
|
14
|
+
export function Blob_download(blob, fileName) {
|
|
15
|
+
const element = document.createElement("a");
|
|
16
|
+
element.target = "_blank";
|
|
17
|
+
element.href = (window.URL.createObjectURL(blob));
|
|
18
|
+
element.setAttribute("download", fileName);
|
|
19
|
+
document.body.appendChild(element);
|
|
20
|
+
element.click();
|
|
21
|
+
document.body.removeChild(element);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Asynchronously reads the blob data content as string
|
|
26
|
+
*/
|
|
27
|
+
export function FileReader_readBlobAsText(blob) {
|
|
28
|
+
return fromContinuations((tupledArg) => {
|
|
29
|
+
const reader = new FileReader();
|
|
30
|
+
reader.onload = ((_arg_2) => {
|
|
31
|
+
if (reader.readyState === 2) {
|
|
32
|
+
tupledArg[0](reader.result);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
reader.readAsText(blob);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Asynchronously reads the blob data content as string
|
|
41
|
+
*/
|
|
42
|
+
export function FileReader_readFileAsText(file) {
|
|
43
|
+
return fromContinuations((tupledArg) => {
|
|
44
|
+
const reader = new FileReader();
|
|
45
|
+
reader.onload = ((_arg_2) => {
|
|
46
|
+
if (reader.readyState === 2) {
|
|
47
|
+
tupledArg[0](reader.result);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
reader.readAsText(file);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Appends a key-value pair to the form data
|
|
56
|
+
*/
|
|
57
|
+
export function FormData_append(key, value, form) {
|
|
58
|
+
form.append(key, value);
|
|
59
|
+
return form;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Appends a file to the form data
|
|
64
|
+
*/
|
|
65
|
+
export function FormData_appendFile(key, file, form) {
|
|
66
|
+
form.append(key, file);
|
|
67
|
+
return form;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Appends a named file to the form data
|
|
72
|
+
*/
|
|
73
|
+
export function FormData_appendNamedFile(key, fileName, file, form) {
|
|
74
|
+
form.append(key, file, fileName);
|
|
75
|
+
return form;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Appends a blog to the form data
|
|
80
|
+
*/
|
|
81
|
+
export function FormData_appendBlob(key, blob, form) {
|
|
82
|
+
form.append(key, blob);
|
|
83
|
+
return form;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Appends a blog to the form data
|
|
88
|
+
*/
|
|
89
|
+
export function FormData_appendNamedBlob(key, fileName, blob, form) {
|
|
90
|
+
form.append(key, blob, fileName);
|
|
91
|
+
return form;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function Headers_contentType(value) {
|
|
95
|
+
return new Header("Content-Type", value);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function Headers_accept(value) {
|
|
99
|
+
return new Header("Accept", value);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function Headers_acceptCharset(value) {
|
|
103
|
+
return new Header("Accept-Charset", value);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function Headers_acceptEncoding(value) {
|
|
107
|
+
return new Header("Accept-Encoding", value);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function Headers_acceptLanguage(value) {
|
|
111
|
+
return new Header("Accept-Language", value);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function Headers_acceptDateTime(value) {
|
|
115
|
+
return new Header("Accept-Datetime", value);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function Headers_authorization(value) {
|
|
119
|
+
return new Header("Authorization", value);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function Headers_cacheControl(value) {
|
|
123
|
+
return new Header("Cache-Control", value);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function Headers_connection(value) {
|
|
127
|
+
return new Header("Connection", value);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function Headers_cookie(value) {
|
|
131
|
+
return new Header("Cookie", value);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function Headers_contentMD5(value) {
|
|
135
|
+
return new Header("Content-MD5", value);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function Headers_date(value) {
|
|
139
|
+
return new Header("Date", value);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function Headers_expect(value) {
|
|
143
|
+
return new Header("Expect", value);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function Headers_ifMatch(value) {
|
|
147
|
+
return new Header("If-Match", value);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function Headers_ifModifiedSince(value) {
|
|
151
|
+
return new Header("If-Modified-Since", value);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function Headers_ifNoneMatch(value) {
|
|
155
|
+
return new Header("If-None-Match", value);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function Headers_ifRange(value) {
|
|
159
|
+
return new Header("If-Range", value);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function Headers_IfUnmodifiedSince(value) {
|
|
163
|
+
return new Header("If-Unmodified-Since", value);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function Headers_maxForwards(value) {
|
|
167
|
+
return new Header("Max-Forwards", value);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function Headers_origin(value) {
|
|
171
|
+
return new Header("Origin", value);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function Headers_pragma(value) {
|
|
175
|
+
return new Header("Pragma", value);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function Headers_proxyAuthorization(value) {
|
|
179
|
+
return new Header("Proxy-Authorization", value);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function Headers_range(value) {
|
|
183
|
+
return new Header("Range", value);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function Headers_referer(value) {
|
|
187
|
+
return new Header("Referer", value);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function Headers_userAgent(value) {
|
|
191
|
+
return new Header("User-Agent", value);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function Headers_create(key, value) {
|
|
195
|
+
return new Header(key, value);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const Http_defaultRequest = new HttpRequest("", new HttpMethod(0, []), empty(), false, void 0, void 0, void 0, new BodyContent(0, []));
|
|
199
|
+
|
|
200
|
+
const Http_emptyResponse = new HttpResponse(0, "", "", "", empty_1({
|
|
201
|
+
Compare: comparePrimitives,
|
|
202
|
+
}), new ResponseContent(0, [""]));
|
|
203
|
+
|
|
204
|
+
function Http_splitAt(delimiter, input) {
|
|
205
|
+
if (isNullOrEmpty(input)) {
|
|
206
|
+
return [input];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
return split(input, [delimiter], void 0, 0);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function Http_serializeMethod(_arg) {
|
|
214
|
+
switch (_arg.tag) {
|
|
215
|
+
case 1:
|
|
216
|
+
return "POST";
|
|
217
|
+
case 3:
|
|
218
|
+
return "PATCH";
|
|
219
|
+
case 2:
|
|
220
|
+
return "PUT";
|
|
221
|
+
case 4:
|
|
222
|
+
return "DELETE";
|
|
223
|
+
case 6:
|
|
224
|
+
return "OPTIONS";
|
|
225
|
+
case 5:
|
|
226
|
+
return "HEAD";
|
|
227
|
+
default:
|
|
228
|
+
return "GET";
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Starts the configuration of the request with the specified url
|
|
234
|
+
*/
|
|
235
|
+
export function Http_request(url) {
|
|
236
|
+
return new HttpRequest(url, Http_defaultRequest.method, Http_defaultRequest.headers, Http_defaultRequest.withCredentials, Http_defaultRequest.overridenMimeType, Http_defaultRequest.overridenResponseType, Http_defaultRequest.timeout, Http_defaultRequest.content);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Sets the Http method of the request
|
|
241
|
+
*/
|
|
242
|
+
export function Http_method(httpVerb, req) {
|
|
243
|
+
return new HttpRequest(req.url, httpVerb, req.headers, req.withCredentials, req.overridenMimeType, req.overridenResponseType, req.timeout, req.content);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Appends a header to the request configuration
|
|
248
|
+
*/
|
|
249
|
+
export function Http_header(singleHeader, req) {
|
|
250
|
+
return new HttpRequest(req.url, req.method, append(req.headers, singleton(singleHeader)), req.withCredentials, req.overridenMimeType, req.overridenResponseType, req.timeout, req.content);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Appends a list of headers to the request configuration
|
|
255
|
+
*/
|
|
256
|
+
export function Http_headers(values, req) {
|
|
257
|
+
return new HttpRequest(req.url, req.method, append(req.headers, values), req.withCredentials, req.overridenMimeType, req.overridenResponseType, req.timeout, req.content);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Enables cross-site credentials such as cookies
|
|
262
|
+
*/
|
|
263
|
+
export function Http_withCredentials(enabled, req) {
|
|
264
|
+
return new HttpRequest(req.url, req.method, req.headers, enabled, req.overridenMimeType, req.overridenResponseType, req.timeout, req.content);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Enables Http request timeout
|
|
269
|
+
*/
|
|
270
|
+
export function Http_withTimeout(timeoutInMilliseconds, req) {
|
|
271
|
+
return new HttpRequest(req.url, req.method, req.headers, req.withCredentials, req.overridenMimeType, req.overridenResponseType, timeoutInMilliseconds, req.content);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. This may be used, for example, to force a stream to be treated and parsed as "text/xml", even if the server does not report it as such.
|
|
276
|
+
*/
|
|
277
|
+
export function Http_overrideMimeType(value, req) {
|
|
278
|
+
return new HttpRequest(req.url, req.method, req.headers, req.withCredentials, value, req.overridenResponseType, req.timeout, req.content);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Change the expected response type from the server
|
|
283
|
+
*/
|
|
284
|
+
export function Http_overrideResponseType(value, req) {
|
|
285
|
+
return new HttpRequest(req.url, req.method, req.headers, req.withCredentials, req.overridenMimeType, value, req.timeout, req.content);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Sets the body content of the request
|
|
290
|
+
*/
|
|
291
|
+
export function Http_content(bodyContent, req) {
|
|
292
|
+
return new HttpRequest(req.url, req.method, req.headers, req.withCredentials, req.overridenMimeType, req.overridenResponseType, req.timeout, bodyContent);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Sends the request to the server, this function does not throw
|
|
297
|
+
*/
|
|
298
|
+
export function Http_send(req) {
|
|
299
|
+
return fromContinuations((tupledArg) => {
|
|
300
|
+
const xhr = new XMLHttpRequest();
|
|
301
|
+
xhr.open(Http_serializeMethod(req.method), req.url);
|
|
302
|
+
xhr.onreadystatechange = (() => {
|
|
303
|
+
let responseText, matchValue, statusCode, responseType, content, matchValue_1, responseHeaders;
|
|
304
|
+
if (xhr.readyState === 4) {
|
|
305
|
+
tupledArg[0]((responseText = ((matchValue = xhr.responseType, (matchValue === "") ? xhr.responseText : ((matchValue === "text") ? xhr.responseText : ""))), (statusCode = (xhr.status | 0), (responseType = xhr.responseType, (content = ((matchValue_1 = xhr.responseType, (matchValue_1 === "") ? (new ResponseContent(0, [xhr.responseText])) : ((matchValue_1 === "text") ? (new ResponseContent(0, [xhr.responseText])) : ((matchValue_1 === "arraybuffer") ? (new ResponseContent(2, [xhr.response])) : ((matchValue_1 === "blob") ? (new ResponseContent(1, [xhr.response])) : (new ResponseContent(3, [xhr.response]))))))), (responseHeaders = ofArray(choose((headerLine) => {
|
|
306
|
+
const matchValue_2 = ofArray_1(Http_splitAt(":", headerLine));
|
|
307
|
+
if (!isEmpty(matchValue_2)) {
|
|
308
|
+
return [head(matchValue_2).toLocaleLowerCase(), join(":", tail(matchValue_2)).trim()];
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
return void 0;
|
|
312
|
+
}
|
|
313
|
+
}, Http_splitAt("\r\n", xhr.getAllResponseHeaders())), {
|
|
314
|
+
Compare: comparePrimitives,
|
|
315
|
+
}), new HttpResponse(statusCode, responseText, responseType, xhr.responseURL, responseHeaders, content)))))));
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
const enumerator = getEnumerator(req.headers);
|
|
319
|
+
try {
|
|
320
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
321
|
+
const forLoopVar = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
322
|
+
xhr.setRequestHeader(forLoopVar.fields[0], forLoopVar.fields[1]);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
finally {
|
|
326
|
+
disposeSafe(enumerator);
|
|
327
|
+
}
|
|
328
|
+
xhr.withCredentials = req.withCredentials;
|
|
329
|
+
const matchValue_3 = req.overridenMimeType;
|
|
330
|
+
if (matchValue_3 == null) {
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
const mimeType = matchValue_3;
|
|
334
|
+
xhr.overrideMimeType(mimeType);
|
|
335
|
+
}
|
|
336
|
+
const matchValue_4 = req.overridenResponseType;
|
|
337
|
+
if (matchValue_4 == null) {
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
switch (matchValue_4.tag) {
|
|
341
|
+
case 1: {
|
|
342
|
+
xhr.responseType = "blob";
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
case 2: {
|
|
346
|
+
xhr.responseType = "arraybuffer";
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
default:
|
|
350
|
+
xhr.responseType = "text";
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const matchValue_5 = req.timeout;
|
|
354
|
+
if (matchValue_5 == null) {
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
const timeout = matchValue_5 | 0;
|
|
358
|
+
xhr.timeout = (timeout | 0);
|
|
359
|
+
}
|
|
360
|
+
const matchValue_6 = req.content;
|
|
361
|
+
switch (matchValue_6.tag) {
|
|
362
|
+
case 1: {
|
|
363
|
+
xhr.send(some(matchValue_6.fields[0]));
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
case 3: {
|
|
367
|
+
xhr.send(some(matchValue_6.fields[0]));
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
case 2: {
|
|
371
|
+
xhr.send(some(matchValue_6.fields[0]));
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
default:
|
|
375
|
+
xhr.send();
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Safely sends a GET request and returns a tuple(status code * response text). This function does not throw.
|
|
382
|
+
*/
|
|
383
|
+
export function Http_get(url) {
|
|
384
|
+
return singleton_1.Delay(() => singleton_1.Bind(Http_send(Http_method(new HttpMethod(0, []), Http_request(url))), (_arg) => {
|
|
385
|
+
const response = _arg;
|
|
386
|
+
return singleton_1.Return([response.statusCode, response.responseText]);
|
|
387
|
+
}));
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Safely sends a PUT request and returns a tuple(status code * response text). This function does not throw.
|
|
392
|
+
*/
|
|
393
|
+
export function Http_put(url, data) {
|
|
394
|
+
return singleton_1.Delay(() => singleton_1.Bind(Http_send(Http_content(new BodyContent(1, [data]), Http_method(new HttpMethod(2, []), Http_request(url)))), (_arg) => {
|
|
395
|
+
const response = _arg;
|
|
396
|
+
return singleton_1.Return([response.statusCode, response.responseText]);
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Safely sends a DELETE request and returns a tuple(status code * response text). This function does not throw.
|
|
402
|
+
*/
|
|
403
|
+
export function Http_delete(url) {
|
|
404
|
+
return singleton_1.Delay(() => singleton_1.Bind(Http_send(Http_method(new HttpMethod(4, []), Http_request(url))), (_arg) => {
|
|
405
|
+
const response = _arg;
|
|
406
|
+
return singleton_1.Return([response.statusCode, response.responseText]);
|
|
407
|
+
}));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Safely sends a PATCH request and returns a tuple(status code * response text). This function does not throw.
|
|
412
|
+
*/
|
|
413
|
+
export function Http_patch(url, data) {
|
|
414
|
+
return singleton_1.Delay(() => singleton_1.Bind(Http_send(Http_content(new BodyContent(1, [data]), Http_method(new HttpMethod(3, []), Http_request(url)))), (_arg) => {
|
|
415
|
+
const response = _arg;
|
|
416
|
+
return singleton_1.Return([response.statusCode, response.responseText]);
|
|
417
|
+
}));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Safely sends a POST request and returns a tuple(status code * response text). This function does not throw.
|
|
422
|
+
*/
|
|
423
|
+
export function Http_post(url, data) {
|
|
424
|
+
return singleton_1.Delay(() => singleton_1.Bind(Http_send(Http_content(new BodyContent(1, [data]), Http_method(new HttpMethod(1, []), Http_request(url)))), (_arg) => {
|
|
425
|
+
const response = _arg;
|
|
426
|
+
return singleton_1.Return([response.statusCode, response.responseText]);
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
namespace Fable.SimpleHttp
|
|
2
|
+
|
|
3
|
+
type HttpMethod =
|
|
4
|
+
| GET
|
|
5
|
+
| POST
|
|
6
|
+
| PUT
|
|
7
|
+
| PATCH
|
|
8
|
+
| DELETE
|
|
9
|
+
| HEAD
|
|
10
|
+
| OPTIONS
|
|
11
|
+
|
|
12
|
+
type Header = Header of string * string
|
|
13
|
+
|
|
14
|
+
[<RequireQualifiedAccess>]
|
|
15
|
+
type BodyContent =
|
|
16
|
+
| Empty
|
|
17
|
+
| Text of string
|
|
18
|
+
| Binary of Browser.Types.Blob
|
|
19
|
+
| Form of Browser.Types.FormData
|
|
20
|
+
|
|
21
|
+
[<RequireQualifiedAccess>]
|
|
22
|
+
type ResponseTypes =
|
|
23
|
+
| Text
|
|
24
|
+
| Blob
|
|
25
|
+
| ArrayBuffer
|
|
26
|
+
|
|
27
|
+
type HttpRequest = {
|
|
28
|
+
url: string
|
|
29
|
+
method: HttpMethod
|
|
30
|
+
headers: Header list
|
|
31
|
+
withCredentials: bool
|
|
32
|
+
overridenMimeType: Option<string>
|
|
33
|
+
overridenResponseType: Option<ResponseTypes>
|
|
34
|
+
timeout: Option<int>
|
|
35
|
+
content: BodyContent
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[<RequireQualifiedAccess>]
|
|
39
|
+
type ResponseContent =
|
|
40
|
+
| Text of string
|
|
41
|
+
| Blob of Browser.Types.Blob
|
|
42
|
+
| ArrayBuffer of Fable.Core.JS.ArrayBuffer
|
|
43
|
+
| Unknown of obj
|
|
44
|
+
|
|
45
|
+
type HttpResponse = {
|
|
46
|
+
statusCode: int
|
|
47
|
+
responseText: string
|
|
48
|
+
responseType: string
|
|
49
|
+
responseUrl: string
|
|
50
|
+
responseHeaders: Map<string, string>
|
|
51
|
+
content : ResponseContent
|
|
52
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Record, Union } from "../fable-library.4.1.4/Types.js";
|
|
2
|
+
import { obj_type, record_type, int32_type, option_type, bool_type, list_type, class_type, string_type, union_type } from "../fable-library.4.1.4/Reflection.js";
|
|
3
|
+
|
|
4
|
+
export class HttpMethod extends Union {
|
|
5
|
+
constructor(tag, fields) {
|
|
6
|
+
super();
|
|
7
|
+
this.tag = tag;
|
|
8
|
+
this.fields = fields;
|
|
9
|
+
}
|
|
10
|
+
cases() {
|
|
11
|
+
return ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function HttpMethod_$reflection() {
|
|
16
|
+
return union_type("Fable.SimpleHttp.HttpMethod", [], HttpMethod, () => [[], [], [], [], [], [], []]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class Header extends Union {
|
|
20
|
+
constructor(Item1, Item2) {
|
|
21
|
+
super();
|
|
22
|
+
this.tag = 0;
|
|
23
|
+
this.fields = [Item1, Item2];
|
|
24
|
+
}
|
|
25
|
+
cases() {
|
|
26
|
+
return ["Header"];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function Header_$reflection() {
|
|
31
|
+
return union_type("Fable.SimpleHttp.Header", [], Header, () => [[["Item1", string_type], ["Item2", string_type]]]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class BodyContent extends Union {
|
|
35
|
+
constructor(tag, fields) {
|
|
36
|
+
super();
|
|
37
|
+
this.tag = tag;
|
|
38
|
+
this.fields = fields;
|
|
39
|
+
}
|
|
40
|
+
cases() {
|
|
41
|
+
return ["Empty", "Text", "Binary", "Form"];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function BodyContent_$reflection() {
|
|
46
|
+
return union_type("Fable.SimpleHttp.BodyContent", [], BodyContent, () => [[], [["Item", string_type]], [["Item", class_type("Browser.Types.Blob", void 0)]], [["Item", class_type("Browser.Types.FormData", void 0)]]]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class ResponseTypes extends Union {
|
|
50
|
+
constructor(tag, fields) {
|
|
51
|
+
super();
|
|
52
|
+
this.tag = tag;
|
|
53
|
+
this.fields = fields;
|
|
54
|
+
}
|
|
55
|
+
cases() {
|
|
56
|
+
return ["Text", "Blob", "ArrayBuffer"];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ResponseTypes_$reflection() {
|
|
61
|
+
return union_type("Fable.SimpleHttp.ResponseTypes", [], ResponseTypes, () => [[], [], []]);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class HttpRequest extends Record {
|
|
65
|
+
constructor(url, method, headers, withCredentials, overridenMimeType, overridenResponseType, timeout, content) {
|
|
66
|
+
super();
|
|
67
|
+
this.url = url;
|
|
68
|
+
this.method = method;
|
|
69
|
+
this.headers = headers;
|
|
70
|
+
this.withCredentials = withCredentials;
|
|
71
|
+
this.overridenMimeType = overridenMimeType;
|
|
72
|
+
this.overridenResponseType = overridenResponseType;
|
|
73
|
+
this.timeout = timeout;
|
|
74
|
+
this.content = content;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function HttpRequest_$reflection() {
|
|
79
|
+
return record_type("Fable.SimpleHttp.HttpRequest", [], HttpRequest, () => [["url", string_type], ["method", HttpMethod_$reflection()], ["headers", list_type(Header_$reflection())], ["withCredentials", bool_type], ["overridenMimeType", option_type(string_type)], ["overridenResponseType", option_type(ResponseTypes_$reflection())], ["timeout", option_type(int32_type)], ["content", BodyContent_$reflection()]]);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export class ResponseContent extends Union {
|
|
83
|
+
constructor(tag, fields) {
|
|
84
|
+
super();
|
|
85
|
+
this.tag = tag;
|
|
86
|
+
this.fields = fields;
|
|
87
|
+
}
|
|
88
|
+
cases() {
|
|
89
|
+
return ["Text", "Blob", "ArrayBuffer", "Unknown"];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function ResponseContent_$reflection() {
|
|
94
|
+
return union_type("Fable.SimpleHttp.ResponseContent", [], ResponseContent, () => [[["Item", string_type]], [["Item", class_type("Browser.Types.Blob", void 0)]], [["Item", class_type("Fable.Core.JS.ArrayBuffer")]], [["Item", obj_type]]]);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export class HttpResponse extends Record {
|
|
98
|
+
constructor(statusCode, responseText, responseType, responseUrl, responseHeaders, content) {
|
|
99
|
+
super();
|
|
100
|
+
this.statusCode = (statusCode | 0);
|
|
101
|
+
this.responseText = responseText;
|
|
102
|
+
this.responseType = responseType;
|
|
103
|
+
this.responseUrl = responseUrl;
|
|
104
|
+
this.responseHeaders = responseHeaders;
|
|
105
|
+
this.content = content;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function HttpResponse_$reflection() {
|
|
110
|
+
return record_type("Fable.SimpleHttp.HttpResponse", [], HttpResponse, () => [["statusCode", int32_type], ["responseText", string_type], ["responseType", string_type], ["responseUrl", string_type], ["responseHeaders", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, string_type])], ["content", ResponseContent_$reflection()]]);
|
|
111
|
+
}
|
|
112
|
+
|