diff --git a/schema/ifcx-api.tsp b/schema/ifcx-api.tsp new file mode 100644 index 00000000..4e8945c1 --- /dev/null +++ b/schema/ifcx-api.tsp @@ -0,0 +1,160 @@ + +import "@typespec/openapi3"; +import "@typespec/http"; + +using Http; + +@pattern("") +scalar path extends string; + +@pattern("") +scalar attribute_uri extends string; + +@pattern("; // make additionalProperties = false show up +} + +model UpdateLayerCommand +{ + name: string; +} + +model CreateLayerVersionCommand +{ + id: uuid; + previousLayerVersionId: uuid; + blobId: uuid; +} + +model BlobResponse +{ + blobId: uuid; + putURL: string; +} + +enum IfcxFileDownloadType +{ + just_this_version, + whole_layer_history_intact, + whole_layer_history_condensed, + whole_layer_and_imports_history_condensed +} + +enum CreateLayerVersionResponseState +{ + OK, + OUT_OF_DATE +} + +model CreateLayerVersionResponse +{ + state: CreateLayerVersionResponseState; +} + +@service +@route("/ifcx-api") +namespace IfcxApi { + + @route("/upload/{blobId}") + @put op upload(@path blobId: uuid, @bodyRoot file: File): OkResponse; + + @route("/download/{blobId}") + @put op download(@path blobId: uuid): File; + + @route("/layers") + namespace Layers + { + @get op layers(): LayerStatus[]; + + @post op createLayer(@body cmd: CreateLayerCommand): OkResponse; + + @route("/{layerId}") + namespace LayerRoutes { + @get op get_layer(@path layerId: uuid): LayerDetails; + @delete op delete_layer(@path layerId: uuid): OkResponse; + + @route("/upload-ifcx-blob-url") + @post op uploadIfcxBlobUrl(@path layerId: uuid): BlobResponse; + + @route("/versions") + namespace VersionsRoutes { + @post op createLayerVersion(@path layerId: uuid, @body version: CreateLayerVersionCommand): CreateLayerVersionResponse; + + @route("/{versionId}") + namespace LayerVersionRoutes + { + @get op get_layer_version(@path layerId: uuid, @path versionId: uuid): LayerVersion; + + @route("/download-ifcx") + @put op layer_ifcx( + @path layerId: uuid, + @path versionId: uuid, + @query downloadType: IfcxFileDownloadType + ): LayerVersionIfcxFile; + + @route("/query") + op query is IfcxQueryApi.query; + } + } + } + } +} + +model IfcxQueryApiResponse +{ + +} + +interface IfcxQueryApi { + @get op query( + @path layerId: uuid, + @path versionId: uuid, + @query path: string; + @query provenance: boolean; + @query expandChildren: boolean; + @query expandChildrenRecursive: boolean; + ): IfcxQueryApiResponse; +} \ No newline at end of file diff --git a/schema/ifcx-codegen.js b/schema/ifcx-codegen.js new file mode 100644 index 00000000..19b97006 --- /dev/null +++ b/schema/ifcx-codegen.js @@ -0,0 +1,149 @@ +let { + quicktype, + InputData, + JSONSchemaInput, + FetchingJSONSchemaStore +} = require("quicktype-core"); +let fs = require("fs"); +let path = require("path"); + +async function quicktypeJSONSchema(targetLanguage, typeName, jsonSchemaString, options) { + const schemaInput = new JSONSchemaInput(new FetchingJSONSchemaStore()); + + // We could add multiple schemas for multiple types, + // but here we're just making one type from JSON schema. + await schemaInput.addSource({ name: typeName, schema: jsonSchemaString }); + + const inputData = new InputData(); + inputData.addInput(schemaInput); + + return await quicktype({ + inputData, + lang: targetLanguage, + rendererOptions: { + ...options + } + }); +} + +function capitalize(word) { + return word.charAt(0).toUpperCase() + word.slice(1); +} +function decapitalize(word) { + return word.charAt(0).toLowerCase() + word.slice(1); +} + +// !!! pkg does not support recursive readdirsync !!! +function getAllFiles(dir) { + let results = []; + + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + results = results.concat(getAllFiles(fullPath)); + } else { + results.push(fullPath); + } + } + + return results; +} + +async function ConvertFile(input_path, output_path, language) +{ + console.log(`Converting: ${input_path} -> ${output_path}`); + + let schema = fs.readFileSync(input_path).toString(); + let userSpecifiedId = JSON.parse(schema)["x-ifc5-id"]; + let className = capitalize(userSpecifiedId.split("::").at(-1)); + + if (language === "ts") + { + const { lines: cscode } = await quicktypeJSONSchema("ts", className, schema, {}); + + let code = cscode; + code.push("\t// start insert"); + code.push(`\texport let Identity = {`); + code.push(`\t\t typeID: "${userSpecifiedId}",`); + code.push(`\t\t originSchemaSrc: ${JSON.stringify(schema)},`); + code.push(`\t\t fromJSONString: Convert.to${className},`); + code.push(`\t\t toJSONString: Convert.${decapitalize(className)}ToJson`); + code.push(`\t\t }`); + code.push("\t// end insert"); + + fs.writeFileSync(output_path, cscode.join("\n")); + } + else + { + let ns = `${userSpecifiedId.replaceAll("::", "_")}`; + const { lines: cscode } = await quicktypeJSONSchema("cs", className, schema, { + namespace: ns, + framework: "SystemTextJson", + + }); + + let code = cscode; + code.push("// start insert"); + code.push(`namespace ${ns} {`); + code.push(`\tpartial class ${className} {`); + code.push(`\t\tpublic static ifcx_sdk.IfcxIdentity<${className}> Identity() {`); + code.push(`\t\t\treturn new ifcx_sdk.IfcxIdentity<${className}> {`); + code.push(`\t\t\t typeID = "${userSpecifiedId}",`); + code.push(`\t\t\t originSchemaSrc = ${JSON.stringify(schema)},`); + code.push(`\t\t\t fromJSONString = str => ${className}.FromJson(str),`); + code.push(`\t\t\t toJSONString = obj => Serialize.ToJson(obj)`); + code.push(`\t\t\t};`); + code.push(`\t\t}`); + code.push(`\t}`); + code.push(`}`); + code.push("// end insert"); + + fs.writeFileSync(output_path, cscode.join("\n")); + } +} + +async function main(input_dir, output_dir, language) +{ + if (!fs.existsSync(input_dir)) throw new Error(`Dir ${input_dir} does not exist`); + if (["ts", "cs"].indexOf(language) === -1) throw new Error(`Unknown language ${language}, only support: [ts,cs]`); + + let files = getAllFiles(input_dir); + console.log(files); + files = files.filter(f => f.endsWith(".schema.json")); + + console.log(); + console.log(`Files (looking for .schema.json):`); + files.forEach(filepath => { + console.log(` - ${filepath}`); + }); + console.log(); + + if (files.length === 0) + { + throw new Error(`No files found!`); + } + + files.forEach(filepath => { + let input_path = filepath; + let output_path = path.join(output_dir, filepath.replace(input_dir, "").replace(".schema.json", `.${language}`)); + fs.mkdirSync(path.dirname(output_path), { recursive: true }) + ConvertFile(input_path, output_path, language); + }) + +} + +let args = process.argv; +console.log(); +console.log(`Invoke like: ifcx-codgen.exe `); +console.log(`Invoked ifcx-codgen with: `, args); +console.log(); +let input_dir = process.argv[2]; +let output_dir = process.argv[3]; +let language = process.argv[4]; +console.log(`input_dir:`, input_dir); +console.log(`output_dir:`, output_dir); +console.log(`language:`, language); +main(input_dir, output_dir, language); \ No newline at end of file diff --git a/schema/ifcx-index-file.tsp b/schema/ifcx-index-file.tsp new file mode 100644 index 00000000..f709e6f6 --- /dev/null +++ b/schema/ifcx-index-file.tsp @@ -0,0 +1,87 @@ +// @note This is a schema that attempts to depart from the current Alpha schema without breaking backwards compatibility of the viewer, examples & tooling + +import "@typespec/json-schema"; + +using JsonSchema; + +@pattern("") +scalar path extends string; + +@pattern("") +scalar attribute_uri extends string; + +@pattern(" +{ + opinion: OpinionType; + name: string; // may make this guid + value?: T; +} + +model IfcxNode { + path: path; + children?: OpinionatedValue[]; + inherits?: OpinionatedValue[]; + attributes?: OpinionatedValue[]; +} + +model IfcxProvenanceHeader +{ + id: string; // identifier of the full dataset; name or path e.g. "ifc5.technical.buildingsmart.org/examples/example@v1.ifcx" + dataVersion: string; // "1.0.0" + author: string; // who created the dataset, e.g. "John.Doe@mail.com" + timestamp: string; // ISO 8601 datetime e.g. "2025-06-25" + application: string; +} + +model IfcxFileHeader { + ifcxVersion: string; // "ifcx_post_alpha" +} + +model ImportNode +{ + uri: string; + integrity?: string; +} + +enum AttributeFileType +{ + NDJSON, + PARQUET +} + +model AttributeTableReference +{ + filename: attribute_file_name; + type: AttributeFileType; + schema: unknown; +} + +model IfcxDataSection +{ + header: IfcxProvenanceHeader; + nodes: IfcxNode[]; +} + +@jsonSchema +model IfcxIndexFile { + header: IfcxFileHeader; + "imports": ImportNode[]; + attributeTables: AttributeTableReference[]; + sections: IfcxDataSection[]; +} \ No newline at end of file diff --git a/schema/out/.gitignore b/schema/out/.gitignore deleted file mode 100644 index b810763a..00000000 --- a/schema/out/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.DS_Store -*.vscode -*.dot - -*.js -*.exe -temp -cs \ No newline at end of file diff --git a/schema/out/@typespec/openapi3/openapi.yaml b/schema/out/@typespec/openapi3/openapi.yaml deleted file mode 100644 index 310cbeec..00000000 --- a/schema/out/@typespec/openapi3/openapi.yaml +++ /dev/null @@ -1,170 +0,0 @@ -openapi: 3.0.0 -info: - title: (title) - version: 0.0.0 -tags: [] -paths: {} -components: - schemas: - ArrayRestrictions: - type: object - required: - - value - properties: - min: - type: number - max: - type: number - value: - $ref: '#/components/schemas/IfcxValueDescription' - DataType: - type: string - enum: - - Real - - Boolean - - Integer - - String - - DateTime - - Enum - - Array - - Object - - Reference - - Blob - EnumRestrictions: - type: object - required: - - options - properties: - options: - type: array - items: - type: string - IfcxFile: - type: object - required: - - header - - imports - - schemas - - data - properties: - header: - $ref: '#/components/schemas/IfcxHeader' - imports: - type: array - items: - $ref: '#/components/schemas/ImportNode' - schemas: - type: object - additionalProperties: - $ref: '#/components/schemas/IfcxSchema' - data: - type: array - items: - $ref: '#/components/schemas/IfcxNode' - IfcxHeader: - type: object - required: - - id - - version - - author - - timestamp - properties: - id: - type: string - version: - type: string - author: - type: string - timestamp: - type: string - IfcxNode: - type: object - required: - - path - properties: - path: - $ref: '#/components/schemas/path' - children: - type: object - additionalProperties: - type: string - nullable: true - inherits: - type: object - additionalProperties: - type: string - nullable: true - attributes: - type: object - additionalProperties: {} - IfcxSchema: - type: object - required: - - value - properties: - uri: - type: string - value: - $ref: '#/components/schemas/IfcxValueDescription' - IfcxValueDescription: - type: object - required: - - dataType - properties: - dataType: - $ref: '#/components/schemas/DataType' - optional: - type: boolean - inherits: - type: array - items: - type: string - quantityKind: - $ref: '#/components/schemas/QuantityKind' - enumRestrictions: - $ref: '#/components/schemas/EnumRestrictions' - arrayRestrictions: - $ref: '#/components/schemas/ArrayRestrictions' - objectRestrictions: - $ref: '#/components/schemas/ObjectRestrictions' - ImportNode: - type: object - required: - - uri - properties: - uri: - type: string - integrity: - type: string - ObjectRestrictions: - type: object - required: - - values - properties: - values: - type: object - additionalProperties: - $ref: '#/components/schemas/IfcxValueDescription' - QuantityKind: - type: string - enum: - - Plane angle - - Thermodynamic temperature - - Electric current - - Time - - Frequency - - Mass - - Length - - Linear velocity - - Force - - Pressure - - Area - - Energy - - Power - - Volume - code: - type: string - pattern: - path: - type: string - pattern: diff --git a/schema/out/ts/ifcx.d.ts b/schema/out/ts/ifcx.d.ts deleted file mode 100644 index 745fa2bb..00000000 --- a/schema/out/ts/ifcx.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export type paths = Record; -export type webhooks = Record; -export interface components { - schemas: { - ArrayRestrictions: { - min?: number; - max?: number; - value: components["schemas"]["IfcxValueDescription"]; - }; - /** @enum {string} */ - DataType: "Real" | "Boolean" | "Integer" | "String" | "DateTime" | "Enum" | "Array" | "Object" | "Reference" | "Blob"; - EnumRestrictions: { - options: string[]; - }; - IfcxFile: { - header: components["schemas"]["IfcxHeader"]; - imports: components["schemas"]["ImportNode"][]; - schemas: { - [key: string]: components["schemas"]["IfcxSchema"]; - }; - data: components["schemas"]["IfcxNode"][]; - }; - IfcxHeader: { - id: string; - version: string; - author: string; - timestamp: string; - }; - IfcxNode: { - path: components["schemas"]["path"]; - children?: { - [key: string]: string | null; - }; - inherits?: { - [key: string]: string | null; - }; - attributes?: { - [key: string]: unknown; - }; - }; - IfcxSchema: { - uri?: string; - value: components["schemas"]["IfcxValueDescription"]; - }; - IfcxValueDescription: { - dataType: components["schemas"]["DataType"]; - optional?: boolean; - inherits?: string[]; - quantityKind?: components["schemas"]["QuantityKind"]; - enumRestrictions?: components["schemas"]["EnumRestrictions"]; - arrayRestrictions?: components["schemas"]["ArrayRestrictions"]; - objectRestrictions?: components["schemas"]["ObjectRestrictions"]; - }; - ImportNode: { - uri: string; - integrity?: string; - }; - ObjectRestrictions: { - values: { - [key: string]: components["schemas"]["IfcxValueDescription"]; - }; - }; - /** @enum {string} */ - QuantityKind: "Plane angle" | "Thermodynamic temperature" | "Electric current" | "Time" | "Frequency" | "Mass" | "Length" | "Linear velocity" | "Force" | "Pressure" | "Area" | "Energy" | "Power" | "Volume"; - code: string; - path: string; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} -export type $defs = Record; -export type operations = Record; diff --git a/schema/package-lock.json b/schema/package-lock.json index 8895b17e..770921f7 100644 --- a/schema/package-lock.json +++ b/schema/package-lock.json @@ -7,624 +7,577 @@ "": { "name": "ifcx-schema", "version": "0.1.0", - "dependencies": { - "@typespec/json-schema": "^0.63.0" - }, "devDependencies": { - "@typespec/compiler": "latest", - "@typespec/openapi3": "latest", - "json-schema-to-typescript": "^15.0.3", - "openapi-typescript": "^7.6.1" - }, - "peerDependencies": { - "@typespec/compiler": "latest", - "@typespec/openapi3": "latest" + "@typespec/compiler": "^1.9.0", + "@typespec/json-schema": "^1.9.0", + "@typespec/openapi3": "^1.9.0", + "pkg": "^5.8.1", + "quicktype": "^23.2.6" } }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.7.3", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.3.tgz", - "integrity": "sha512-WApSdLdXEBb/1FUPca2lteASewEfpjEYJ8oXZP+0gExK5qSfsEKBKcA+WjY6Q4wvXwyv0+W6Kvc372pSceib9w==", + "node_modules/@babel/code-frame": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", + "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", "dev": true, "license": "MIT", "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0" + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" + "node": ">=6.9.0" } }, - "node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", - "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "node_modules/@babel/generator": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", "dev": true, - "license": "MIT" - }, - "node_modules/@babel/code-frame": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.9.tgz", - "integrity": "sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==", "license": "MIT", "dependencies": { - "@babel/highlight": "^7.25.9", - "picocolors": "^1.0.0" + "@babel/types": "^7.18.2", + "@jridgewell/gen-mapping": "^0.3.0", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", - "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "node_modules/@babel/parser": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", + "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", "dev": true, "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@humanwhocodes/momoa": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", - "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", + "node_modules/@babel/types": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, "engines": { - "node": ">=10.10.0" + "node": ">=6.9.0" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "license": "MIT" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } + "node_modules/@glideapps/ts-necessities": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.4.0.tgz", + "integrity": "sha512-mDC+qosuNa4lxR3ioMBb6CD0XLRsQBplU+zRPUYiMLXKeVPZ6UYphdNG/EGReig0YyfnVlBKZEXl1wzTotYmPA==", + "dev": true, + "license": "MIT" }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@inquirer/ansi": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.3.tgz", + "integrity": "sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==", + "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, "engines": { - "node": ">= 8" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, - "node_modules/@readme/better-ajv-errors": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@readme/better-ajv-errors/-/better-ajv-errors-1.6.0.tgz", - "integrity": "sha512-9gO9rld84Jgu13kcbKRU+WHseNhaVt76wYMeRDGsUGYxwJtI3RmEJ9LY9dZCYQGI8eUZLuxb5qDja0nqklpFjQ==", + "node_modules/@inquirer/checkbox": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.0.4.tgz", + "integrity": "sha512-DrAMU3YBGMUAp6ArwTIp/25CNDtDbxk7UjIrrtM25JVVrlVYlVzHh5HR1BDFu9JMyUoZ4ZanzeaHqNDttf3gVg==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/runtime": "^7.21.0", - "@humanwhocodes/momoa": "^2.0.3", - "chalk": "^4.1.2", - "json-to-ast": "^2.0.3", - "jsonpointer": "^5.0.0", - "leven": "^3.1.0" + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.1", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=14" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "ajv": "4.11.8 - 8" + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/better-ajv-errors/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@inquirer/confirm": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.4.tgz", + "integrity": "sha512-WdaPe7foUnoGYvXzH4jp4wH/3l+dBhZ3uwhKjXjwdrq5tEIFaANxj6zrGHxLdsIA0yKM0kFPVcEalOZXBB5ISA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=8" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/better-ajv-errors/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@inquirer/core": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.1.tgz", + "integrity": "sha512-hV9o15UxX46OyQAtaoMqAOxGR8RVl1aZtDx1jHbCtSJy1tBdTfKxLPKf7utsE4cRy4tcmCQ4+vdV+ca+oNxqNA==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@inquirer/ansi": "^2.0.3", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3", + "cli-width": "^4.1.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^9.0.2" }, "engines": { - "node": ">=10" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/better-ajv-errors/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@inquirer/editor": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.4.tgz", + "integrity": "sha512-QI3Jfqcv6UO2/VJaEFONH8Im1ll++Xn/AJTBn9Xf+qx2M+H8KZAdQ5sAe2vtYlo+mLW+d7JaMJB4qWtK4BG3pw==", "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@inquirer/core": "^11.1.1", + "@inquirer/external-editor": "^2.0.3", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@readme/better-ajv-errors/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@readme/better-ajv-errors/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/better-ajv-errors/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@inquirer/expand": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.4.tgz", + "integrity": "sha512-0I/16YwPPP0Co7a5MsomlZLpch48NzYfToyqYAOWtBmaXSB80RiNQ1J+0xx2eG+Wfxt0nHtpEWSRr6CzNVnOGg==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@readme/json-schema-ref-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@readme/json-schema-ref-parser/-/json-schema-ref-parser-1.2.0.tgz", - "integrity": "sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/openapi-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@readme/openapi-parser/-/openapi-parser-2.6.0.tgz", - "integrity": "sha512-pyFJXezWj9WI1O+gdp95CoxfY+i+Uq3kKk4zXIFuRAZi9YnHpHOpjumWWr67wkmRTw19Hskh9spyY0Iyikf3fA==", + "node_modules/@inquirer/external-editor": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.3.tgz", + "integrity": "sha512-LgyI7Agbda74/cL5MvA88iDpvdXI2KuMBCGRkbCl2Dg1vzHeOgs+s0SDcXV7b+WZJrv2+ERpWSM65Fpi9VfY3w==", "dev": true, "license": "MIT", "dependencies": { - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "@readme/better-ajv-errors": "^1.6.0", - "@readme/json-schema-ref-parser": "^1.2.0", - "@readme/openapi-schemas": "^3.1.0", - "ajv": "^8.12.0", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" + "chardet": "^2.1.1", + "iconv-lite": "^0.7.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "openapi-types": ">=7" + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@readme/openapi-schemas": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@readme/openapi-schemas/-/openapi-schemas-3.1.0.tgz", - "integrity": "sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw==", + "node_modules/@inquirer/figures": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.3.tgz", + "integrity": "sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, - "node_modules/@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "node_modules/@inquirer/input": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.4.tgz", + "integrity": "sha512-4B3s3jvTREDFvXWit92Yc6jF1RJMDy2VpSqKtm4We2oVU65YOh2szY5/G14h4fHlyQdpUmazU5MPCFZPRJ0AOw==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@redocly/config": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.1.tgz", - "integrity": "sha512-1CqQfiG456v9ZgYBG9xRQHnpXjt8WoSnDwdkX6gxktuK69v2037hTAR1eh0DGIqpZ1p4k82cGH8yTNwt7/pI9g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@redocly/openapi-core": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.0.tgz", - "integrity": "sha512-Ji00EiLQRXq0pJIz5pAjGF9MfQvQVsQehc6uIis6sqat8tG/zh25Zi64w6HVGEDgJEzUeq/CuUlD0emu3Hdaqw==", + "node_modules/@inquirer/number": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.4.tgz", + "integrity": "sha512-CmMp9LF5HwE+G/xWsC333TlCzYYbXMkcADkKzcawh49fg2a1ryLc7JL1NJYYt1lJ+8f4slikNjJM9TEL/AljYQ==", "dev": true, "license": "MIT", "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.22.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.5", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "minimatch": "^5.0.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" - } - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "license": "MIT", - "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/lodash": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", - "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==", + "node_modules/@inquirer/password": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.4.tgz", + "integrity": "sha512-ZCEPyVYvHK4W4p2Gy6sTp9nqsdHQCfiPXIP9LbJVW4yCinnxL/dDDmPaEZVysGrj8vxVReRnpfS2fOeODe9zjg==", "dev": true, - "license": "MIT" - }, - "node_modules/@typespec/compiler": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.63.0.tgz", - "integrity": "sha512-cC3YniwbFghn1fASX3r1IgNjMrwaY4gmzznkHT4f/NxE+HK4XoXWn4EG7287QgVMCaHUykzJCIfW9k7kIleW5A==", "license": "MIT", "dependencies": { - "@babel/code-frame": "~7.25.7", - "ajv": "~8.17.1", - "change-case": "~5.4.4", - "globby": "~14.0.2", - "mustache": "~4.2.0", - "picocolors": "~1.1.1", - "prettier": "~3.3.3", - "prompts": "~2.4.2", - "semver": "^7.6.3", - "temporal-polyfill": "^0.2.5", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.12", - "yaml": "~2.5.1", - "yargs": "~17.7.2" - }, - "bin": { - "tsp": "cmd/tsp.js", - "tsp-server": "cmd/tsp-server.js" + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@typespec/http": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.63.0.tgz", - "integrity": "sha512-SYVbBmLPAPdWZfdMs0QlbpTnFREDnkINu2FR+0kRX12qzbRgpRbLsdhg59qx4TfKoh4IAPgSV+Fq84w7BWGsyQ==", + "node_modules/@inquirer/prompts": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.2.0.tgz", + "integrity": "sha512-rqTzOprAj55a27jctS3vhvDDJzYXsr33WXTjODgVOru21NvBo9yIgLIAf7SBdSV0WERVly3dR6TWyp7ZHkvKFA==", "dev": true, "license": "MIT", - "peer": true, + "dependencies": { + "@inquirer/checkbox": "^5.0.4", + "@inquirer/confirm": "^6.0.4", + "@inquirer/editor": "^5.0.4", + "@inquirer/expand": "^5.0.4", + "@inquirer/input": "^5.0.4", + "@inquirer/number": "^4.0.4", + "@inquirer/password": "^5.0.4", + "@inquirer/rawlist": "^5.2.0", + "@inquirer/search": "^4.1.0", + "@inquirer/select": "^5.0.4" + }, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "@typespec/compiler": "~0.63.0", - "@typespec/streams": "~0.63.0" + "@types/node": ">=18" }, "peerDependenciesMeta": { - "@typespec/streams": { + "@types/node": { "optional": true } } }, - "node_modules/@typespec/json-schema": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-0.63.0.tgz", - "integrity": "sha512-jGRXxUxdrwW/XzvaDqyt5mS/V1iBnrDaHUMRIkrFLCwzgll/NenquLI/nopihzLFXK78MfFYuHg4DEPYY5PdFw==", + "node_modules/@inquirer/rawlist": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.0.tgz", + "integrity": "sha512-CciqGoOUMrFo6HxvOtU5uL8fkjCmzyeB6fG7O1vdVAZVSopUBYECOwevDBlqNLyyYmzpm2Gsn/7nLrpruy9RFg==", + "dev": true, "license": "MIT", "dependencies": { - "yaml": "~2.5.1" + "@inquirer/core": "^11.1.1", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "@typespec/compiler": "~0.63.0" + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@typespec/openapi": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.63.0.tgz", - "integrity": "sha512-/KzR60mj3P/LnNWd/QfH0KTN/If4+mjrsWNSB7/uab6c8Qu/lNsGlZDkmWq4EFiwBR7VmpdFz9FP7d/m3O+tGw==", + "node_modules/@inquirer/search": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.0.tgz", + "integrity": "sha512-EAzemfiP4IFvIuWnrHpgZs9lAhWDA0GM3l9F4t4mTQ22IFtzfrk8xbkMLcAN7gmVML9O/i+Hzu8yOUyAaL6BKA==", "dev": true, "license": "MIT", - "peer": true, + "dependencies": { + "@inquirer/core": "^11.1.1", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" + }, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "@typespec/compiler": "~0.63.0", - "@typespec/http": "~0.63.0" + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@typespec/openapi3": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.63.0.tgz", - "integrity": "sha512-HC8VeakPznXNn7euAyAxUFNsOcfSzM8tQwYPNUMWs0qGJqGgb6vjf5rShQmfgrCe5Y6zcMM2PPBuxaFV3xXYLw==", + "node_modules/@inquirer/select": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.0.4.tgz", + "integrity": "sha512-s8KoGpPYMEQ6WXc0dT9blX2NtIulMdLOO3LA1UKOiv7KFWzlJ6eLkEYTDBIi+JkyKXyn8t/CD6TinxGjyLt57g==", "dev": true, "license": "MIT", "dependencies": { - "@readme/openapi-parser": "~2.6.0", - "openapi-types": "~12.1.3", - "yaml": "~2.5.1" - }, - "bin": { - "tsp-openapi3": "cmd/tsp-openapi3.js" + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.1", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" }, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "@typespec/compiler": "~0.63.0", - "@typespec/http": "~0.63.0", - "@typespec/openapi": "~0.63.0", - "@typespec/versioning": "~0.63.0" + "@types/node": ">=18" }, "peerDependenciesMeta": { - "@typespec/xml": { + "@types/node": { "optional": true } } }, - "node_modules/@typespec/versioning": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.63.0.tgz", - "integrity": "sha512-BPvmPL+g20yEmSA8XRfbIHdToNOjssq4QfwOU6D7kKLLXnZHFb1hmuwW0tf0Wa/lYgoaUC60ONAeoXgNT1ZOIQ==", + "node_modules/@inquirer/type": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.3.tgz", + "integrity": "sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": ">=18.0.0" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { - "@typespec/compiler": "~0.63.0" + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, "engines": { - "node": ">= 14" + "node": ">=18.0.0" } }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/ajv-draft-04": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", - "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=6.0.0" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/@mark.probst/typescript-json-schema": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@mark.probst/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz", + "integrity": "sha512-jI48mSnRgFQxXiE/UTUCVCpX8lK3wCFKLF1Ss2aEreboKNuLQGt3e0/YFqWVHe/WENxOaqiJvwOz+L/SrN2+qQ==", "dev": true, - "license": "Python-2.0" + "license": "BSD-3-Clause", + "dependencies": { + "@types/json-schema": "^7.0.9", + "@types/node": "^16.9.2", + "glob": "^7.1.7", + "path-equal": "^1.1.2", + "safe-stable-stringify": "^2.2.0", + "ts-node": "^10.9.1", + "typescript": "4.9.4", + "yargs": "^17.1.1" + }, + "bin": { + "typescript-json-schema": "bin/typescript-json-schema" + } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/@types/node": { + "version": "16.18.126", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", + "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", "dev": true, "license": "MIT" }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, "engines": { "node": ">=8" } }, - "node_modules/call-me-maybe": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", - "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT" - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/change-case": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "license": "MIT" - }, - "node_modules/cliui": { + "node_modules/@mark.probst/typescript-json-schema/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", @@ -635,213 +588,220 @@ "node": ">=12" } }, - "node_modules/code-error-fragment": { - "version": "0.0.230", - "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", - "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@mark.probst/typescript-json-schema/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { - "node": ">= 4" + "node": ">=8" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "license": "MIT" - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.3" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=10" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/@mark.probst/typescript-json-schema/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, "engines": { - "node": ">=0.8.0" + "node": ">=12" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=8.6.0" + "node": ">= 8" } }, - "node_modules/fast-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", - "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", - "license": "BSD-3-Clause" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", + "node_modules/@scalar/helpers": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@scalar/helpers/-/helpers-0.2.11.tgz", + "integrity": "sha512-Y7DLt1bIZF9dvHzJwSJTcC1lpSr1Tbf4VBhHOCRIHu23Rr7/lhQnddRxFmPV1tZXwEQKz7F7yRrubwCfKPCucw==", + "dev": true, + "license": "MIT", "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">=20" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", + "node_modules/@scalar/json-magic": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@scalar/json-magic/-/json-magic-0.9.6.tgz", + "integrity": "sha512-2TKoqkAophHti1nH+rvQlR4lhD6X9tqQpuNeAE0cytHSX/yndkSOE0yA7cep5T9tFjGN4Km0gMnelvY3LgWs4A==", + "dev": true, + "license": "MIT", "dependencies": { - "is-glob": "^4.0.1" + "@scalar/helpers": "0.2.11", + "yaml": "^2.8.0" }, "engines": { - "node": ">= 6" + "node": ">=20" } }, - "node_modules/globby": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", - "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "node_modules/@scalar/openapi-parser": { + "version": "0.24.9", + "resolved": "https://registry.npmjs.org/@scalar/openapi-parser/-/openapi-parser-0.24.9.tgz", + "integrity": "sha512-uqpwt6ZQJQu4c3CvMsJiXMUj32113yrclsDC31hlL33vEUS5JU9dCYfY27oLSCVoKl8R8KihlnEcbfRnH/O/GA==", + "dev": true, "license": "MIT", "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" + "@scalar/helpers": "0.2.11", + "@scalar/json-magic": "0.11.0", + "@scalar/openapi-types": "0.5.3", + "@scalar/openapi-upgrader": "0.1.8", + "ajv": "^8.17.1", + "ajv-draft-04": "^1.0.0", + "ajv-formats": "^3.0.1", + "jsonpointer": "^5.0.1", + "leven": "^4.0.0", + "yaml": "^2.8.0" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=20" } }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/@scalar/openapi-parser/node_modules/@scalar/json-magic": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@scalar/json-magic/-/json-magic-0.11.0.tgz", + "integrity": "sha512-1zBseDDEPkKlAVd9lT1HlK9Nefeh0YEE+pcmyDL3J5derIZn9UYXAFecdkeXMdjDtWDgcrkmWCrHhpoT7zVKdQ==", "dev": true, - "license": "MIT" - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "license": "MIT", + "dependencies": { + "@scalar/helpers": "0.2.11", + "yaml": "^2.8.0" + }, "engines": { - "node": ">=4" + "node": ">=20" } }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "node_modules/@scalar/openapi-types": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.5.3.tgz", + "integrity": "sha512-m4n/Su3K01d15dmdWO1LlqecdSPKuNjuokrJLdiQ485kW/hRHbXW1QP6tJL75myhw/XhX5YhYAR+jrwnGjXiMw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" + "zod": "^4.1.11" }, "engines": { - "node": ">= 14" + "node": ">=20" } }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "node_modules/@scalar/openapi-upgrader": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@scalar/openapi-upgrader/-/openapi-upgrader-0.1.8.tgz", + "integrity": "sha512-2xuYLLs0fBadLIk4I1ObjMiCnOyLPEMPf24A1HtHQvhKGDnGlvT63F2rU2Xw8lxCjgHnzveMPnOJEbwIy64RCg==", + "dev": true, "license": "MIT", + "dependencies": { + "@scalar/openapi-types": "0.5.3" + }, "engines": { - "node": ">= 4" + "node": ">=20" } }, - "node_modules/index-to-position": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.0.0.tgz", - "integrity": "sha512-sCO7uaLVhRJ25vz1o8s9IFM3nVS4DkuQnyjMwiQPKvQuBYBDmb8H7zx8ki7nVh4HJQOdVWebyvLE0qt+clruxA==", + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", "dev": true, "license": "MIT", "engines": { @@ -851,333 +811,1999 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.2.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.3.tgz", + "integrity": "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ==", + "dev": true, "license": "MIT", - "engines": { - "node": ">=0.12.0" + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" } }, - "node_modules/js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "node_modules/@typespec/asset-emitter": { + "version": "0.79.0", + "resolved": "https://registry.npmjs.org/@typespec/asset-emitter/-/asset-emitter-0.79.0.tgz", + "integrity": "sha512-pNMtfSSwgmTQ2ex6bd1l6BUW2RLjSFnWQO5C5bNSleV62YEH5jMLn3THWDU9oUB0JoiBjgomV8cPqNRTJ+iV9w==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.9.0" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/@typespec/compiler": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.9.0.tgz", + "integrity": "sha512-Rz9fFWQSTJSnhBfZvtA/bDIuO82fknYdtyMsL9lZNJE82rquC6JByHPFsnbGH1VXA0HhMj9L7Oqyp3f0m/BTOA==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^2.0.1" + "@babel/code-frame": "~7.28.6", + "@inquirer/prompts": "^8.0.1", + "ajv": "~8.17.1", + "change-case": "~5.4.4", + "env-paths": "^3.0.0", + "globby": "~16.1.0", + "is-unicode-supported": "^2.1.0", + "mustache": "~4.2.0", + "picocolors": "~1.1.1", + "prettier": "~3.8.0", + "semver": "^7.7.1", + "tar": "^7.5.2", + "temporal-polyfill": "^0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.8.2", + "yargs": "~18.0.0" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "tsp": "cmd/tsp.js", + "tsp-server": "cmd/tsp-server.js" + }, + "engines": { + "node": ">=20.0.0" } }, - "node_modules/json-schema-to-typescript": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.3.tgz", - "integrity": "sha512-iOKdzTUWEVM4nlxpFudFsWyUiu/Jakkga4OZPEt7CGoSEsAsUgdOZqR6pcgx2STBek9Gm4hcarJpXSzIvZ/hKA==", + "node_modules/@typespec/http": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.9.0.tgz", + "integrity": "sha512-JzlZZsgCo71f2KhWbf4BLOz5e+dVLj7gJJ4kvXvrmuG9QHoT41VaGPpCQamYgpZLMz2LQbsOtw34AmpovhuJSw==", "dev": true, "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.5.5", - "@types/json-schema": "^7.0.15", - "@types/lodash": "^4.17.7", - "is-glob": "^4.0.3", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "minimist": "^1.2.8", - "prettier": "^3.2.5", - "tinyglobby": "^0.2.9" + "peer": true, + "engines": { + "node": ">=20.0.0" }, - "bin": { - "json2ts": "dist/src/cli.js" + "peerDependencies": { + "@typespec/compiler": "^1.9.0", + "@typespec/streams": "^0.79.0" }, - "engines": { - "node": ">=16.0.0" + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } } }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "node_modules/json-to-ast": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", - "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "node_modules/@typespec/json-schema": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-1.9.0.tgz", + "integrity": "sha512-splP6YL1CWPtBDenOeaVEs058TBqSzMDZyX4h9A39Q5qwmhyQ00DPXdnmJWRP96IWVAlHnN806GJWc/yttzSVg==", "dev": true, "license": "MIT", "dependencies": { - "code-error-fragment": "0.0.230", - "grapheme-splitter": "^1.0.4" + "@typespec/asset-emitter": "^0.79.0", + "yaml": "~2.8.2" }, "engines": { - "node": ">= 4" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.9.0" } }, - "node_modules/jsonpointer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", - "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "node_modules/@typespec/openapi": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.9.0.tgz", + "integrity": "sha512-5ieXCWRLcyFLv3IFk26ena/RW/NxvT5KiHaoNVFRd79J0XZjFcE0Od6Lxxqj4dWmCo3C8oKtOwFoQuie18G3lQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.9.0", + "@typespec/http": "^1.9.0" } }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "node_modules/@typespec/openapi3": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-1.9.0.tgz", + "integrity": "sha512-htwhrGHQxuoNwAljeJE8CBt5yfKOv48T9Ugv91Y+4yNnlevJfDT29yrfD2mXYMujVOr3Kte1qilazClafkUIgg==", + "dev": true, "license": "MIT", + "dependencies": { + "@scalar/json-magic": "^0.9.1", + "@scalar/openapi-parser": "^0.24.1", + "@scalar/openapi-types": "^0.5.0", + "@typespec/asset-emitter": "^0.79.0", + "yaml": "~2.8.2" + }, + "bin": { + "tsp-openapi3": "cmd/tsp-openapi3.js" + }, "engines": { - "node": ">=6" + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.9.0", + "@typespec/events": "^0.79.0", + "@typespec/http": "^1.9.0", + "@typespec/json-schema": "^1.9.0", + "@typespec/openapi": "^1.9.0", + "@typespec/sse": "^0.79.0", + "@typespec/streams": "^0.79.0", + "@typespec/versioning": "^0.79.0" + }, + "peerDependenciesMeta": { + "@typespec/events": { + "optional": true + }, + "@typespec/json-schema": { + "optional": true + }, + "@typespec/sse": { + "optional": true + }, + "@typespec/streams": { + "optional": true + }, + "@typespec/versioning": { + "optional": true + }, + "@typespec/xml": { + "optional": true + } } }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dev": true, "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, "engines": { - "node": ">=6" + "node": ">=6.5" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">= 8" + "node": ">=0.4.0" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" + "acorn": "^8.11.0" }, "engines": { - "node": ">=8.6" + "node": ">=0.4.0" } }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "debug": "4" }, "engines": { - "node": ">=10" + "node": ">= 6.0.0" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", "dev": true, - "license": "MIT" - }, - "node_modules/mustache": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", - "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "license": "MIT", - "bin": { - "mustache": "bin/mustache" + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } } }, - "node_modules/openapi-types": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", - "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/openapi-typescript": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.6.1.tgz", - "integrity": "sha512-F7RXEeo/heF3O9lOXo2bNjCOtfp7u+D6W3a3VNEH2xE6v+fxLtn5nq0uvUcA1F5aT+CMhNeC5Uqtg5tlXFX/ag==", + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dev": true, "license": "MIT", "dependencies": { - "@redocly/openapi-core": "^1.28.0", - "ansi-colors": "^4.1.3", - "change-case": "^5.4.4", - "parse-json": "^8.1.0", - "supports-color": "^9.4.0", - "yargs-parser": "^21.1.1" - }, - "bin": { - "openapi-typescript": "bin/cli.js" + "ajv": "^8.0.0" }, "peerDependencies": { - "typescript": "^5.x" + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } } }, - "node_modules/openapi-typescript/node_modules/supports-color": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/parse-json": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.2.0.tgz", - "integrity": "sha512-eONBZy4hm2AgxjNFd8a4nyDJnzUAH0g34xSQAwWEVGCjdZ4ZL7dKZBfq267GWP/JaS9zW62Xs2FeAdDvpHHJGQ==", + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "index-to-position": "^1.0.0", - "type-fest": "^4.37.0" - }, "engines": { - "node": ">=18" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/parse-json/node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } + "license": "MIT" }, - "node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=8" } }, - "node_modules/pluralize": { + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-or-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-3.0.0.tgz", + "integrity": "sha512-iczIdVJzGEYhP5DqQxYM9Hh7Ztpqqi+CXZpSmX8ALFs9ecXkQIeqRyM6TfxEfMVpwhl3dSuDvxdzzo9sUOIVBQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/collection-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collection-utils/-/collection-utils-1.0.1.tgz", + "integrity": "sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.3.tgz", + "integrity": "sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-back": "^6.2.2", + "chalk-template": "^0.4.0", + "table-layout": "^4.1.0", + "typical": "^7.1.1" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", + "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/from2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/from2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/from2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-16.1.0.tgz", + "integrity": "sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.5", + "is-path-inside": "^4.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.4.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphql": { + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.11.7.tgz", + "integrity": "sha512-x7uDjyz8Jx+QPbpCFCMQ8lltnQa4p4vSYHx6ADe8rVYRTdsyhCJbvSty5DAsLVmU6cGakl+r8HQYolKHxk/tiw==", + "deprecated": "No longer supported; please update to a newer version. Details: https://github.com/graphql/graphql-js#version-support", + "dev": true, + "license": "MIT", + "dependencies": { + "iterall": "1.1.3" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true, + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/iterall": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.1.3.tgz", + "integrity": "sha512-Cu/kb+4HiNSejAPhSaN1VukdNTTi/r4/e+yykqjlG/IW+1gZH5b4+Bq3whDX4tvbYugta3r8KTMUiqT3fIGxuQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-base64": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.8.tgz", + "integrity": "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/leven": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-4.1.0.tgz", + "integrity": "sha512-KZ9W9nWDT7rF7Dazg8xyLHGLrmpgq2nVNFUckhqdW3szVP6YhCpp/RAnpmVExA9JvrMynjwSLVrEj3AepHR6ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/multistream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", + "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "once": "^1.4.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/multistream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "dev": true, + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/mute-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz", + "integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.87.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.87.0.tgz", + "integrity": "sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/path-equal": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", + "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", + "integrity": "sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/generator": "7.18.2", + "@babel/parser": "7.18.4", + "@babel/types": "7.19.0", + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "globby": "^11.1.0", + "into-stream": "^6.0.0", + "is-core-module": "2.9.0", + "minimist": "^1.2.6", + "multistream": "^4.1.0", + "pkg-fetch": "3.4.2", + "prebuild-install": "7.1.1", + "resolve": "^1.22.0", + "stream-meter": "^1.0.4" + }, + "bin": { + "pkg": "lib-es5/bin.js" + }, + "peerDependencies": { + "node-notifier": ">=9.0.1" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/pkg-fetch": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", + "integrity": "sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.6", + "progress": "^2.0.3", + "semver": "^7.3.5", + "tar-fs": "^2.1.1", + "yargs": "^16.2.0" + }, + "bin": { + "pkg-fetch": "lib-es5/bin.js" + } + }, + "node_modules/pkg-fetch/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-fetch/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pkg-fetch/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/pkg-fetch/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/pkg-fetch/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-fetch/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-fetch/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/pkg-fetch/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg-fetch/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/pkg/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=4" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", + "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -1189,23 +2815,49 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, "engines": { - "node": ">= 6" + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -1222,17 +2874,166 @@ ], "license": "MIT" }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "node_modules/quicktype": { + "version": "23.2.6", + "resolved": "https://registry.npmjs.org/quicktype/-/quicktype-23.2.6.tgz", + "integrity": "sha512-rlD1jF71bOmDn6SQ/ToLuuRkMQ7maxo5oVTn5dPCl11ymqoJCFCvl7FzRfh+fkDFmWt2etl+JiIEdWImLxferA==", + "dev": true, + "license": "Apache-2.0", + "workspaces": [ + "./packages/quicktype-core", + "./packages/quicktype-graphql-input", + "./packages/quicktype-typescript-input", + "./packages/quicktype-vscode" + ], + "dependencies": { + "@glideapps/ts-necessities": "^2.2.3", + "chalk": "^4.1.2", + "collection-utils": "^1.0.1", + "command-line-args": "^5.2.1", + "command-line-usage": "^7.0.1", + "cross-fetch": "^4.0.0", + "graphql": "^0.11.7", + "lodash": "^4.17.21", + "moment": "^2.30.1", + "quicktype-core": "23.2.6", + "quicktype-graphql-input": "23.2.6", + "quicktype-typescript-input": "23.2.6", + "readable-stream": "^4.5.2", + "stream-json": "1.8.0", + "string-to-stream": "^3.0.1", + "typescript": "~5.8.3" + }, + "bin": { + "quicktype": "dist/index.js" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/quicktype-core": { + "version": "23.2.6", + "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-23.2.6.tgz", + "integrity": "sha512-asfeSv7BKBNVb9WiYhFRBvBZHcRutPRBwJMxW0pefluK4kkKu4lv0IvZBwFKvw2XygLcL1Rl90zxWDHYgkwCmA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@glideapps/ts-necessities": "2.2.3", + "browser-or-node": "^3.0.0", + "collection-utils": "^1.0.1", + "cross-fetch": "^4.0.0", + "is-url": "^1.2.4", + "js-base64": "^3.7.7", + "lodash": "^4.17.21", + "pako": "^1.0.6", + "pluralize": "^8.0.0", + "readable-stream": "4.5.2", + "unicode-properties": "^1.4.1", + "urijs": "^1.19.1", + "wordwrap": "^1.0.0", + "yaml": "^2.4.1" + } + }, + "node_modules/quicktype-core/node_modules/@glideapps/ts-necessities": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.2.3.tgz", + "integrity": "sha512-gXi0awOZLHk3TbW55GZLCPP6O+y/b5X1pBXKBVckFONSwF1z1E5ND2BGJsghQFah+pW7pkkyFb2VhUQI2qhL5w==", "dev": true, "license": "MIT" }, + "node_modules/quicktype-core/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/quicktype-graphql-input": { + "version": "23.2.6", + "resolved": "https://registry.npmjs.org/quicktype-graphql-input/-/quicktype-graphql-input-23.2.6.tgz", + "integrity": "sha512-jHQ8XrEaccZnWA7h/xqUQhfl+0mR5o91T6k3I4QhlnZSLdVnbycrMq4FHa9EaIFcai783JKwSUl1+koAdJq4pg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "collection-utils": "^1.0.1", + "graphql": "^0.11.7", + "quicktype-core": "23.2.6" + } + }, + "node_modules/quicktype-typescript-input": { + "version": "23.2.6", + "resolved": "https://registry.npmjs.org/quicktype-typescript-input/-/quicktype-typescript-input-23.2.6.tgz", + "integrity": "sha512-dCNMxR+7PGs9/9Tsth9H6LOQV1G+Tv4sUGT8ZUfDRJ5Hq371qOYLma5BnLX6VxkPu8JT7mAMpQ9VFlxstX6Qaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@mark.probst/typescript-json-schema": "0.55.0", + "quicktype-core": "23.2.6", + "typescript": "4.9.5" + } + }, + "node_modules/quicktype-typescript-input/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dev": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -1242,15 +3043,54 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve/node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -1261,6 +3101,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -1280,135 +3121,427 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" }, "engines": { - "node": ">=10" + "node": ">=10" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stream-chain": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz", + "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stream-json": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.8.0.tgz", + "integrity": "sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "stream-chain": "^2.2.5" + } + }, + "node_modules/stream-meter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", + "integrity": "sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.1.4" + } + }, + "node_modules/stream-meter/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/stream-meter/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/stream-meter/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-to-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz", + "integrity": "sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^3.4.0" + } + }, + "node_modules/string-to-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" - }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": ">=14.16" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table-layout": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-4.1.1.tgz", + "integrity": "sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "array-back": "^6.2.2", + "wordwrapjs": "^5.1.0" }, "engines": { - "node": ">=8" + "node": ">=12.17" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/table-layout/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "dev": true, "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/tar": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz", + "integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==", + "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "has-flag": "^3.0.0" + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" }, "engines": { - "node": ">=4" + "node": ">=18" } }, - "node_modules/temporal-polyfill": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", - "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "dev": true, "license": "MIT", "dependencies": { - "temporal-spec": "^0.2.4" + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" } }, - "node_modules/temporal-spec": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", - "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, "license": "ISC" }, - "node_modules/tinyglobby": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", - "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.2", - "picomatch": "^4.0.2" + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=6" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "engines": { + "node": ">= 6" + } + }, + "node_modules/temporal-polyfill": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", + "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", + "dev": true, + "license": "MIT", + "dependencies": { + "temporal-spec": "0.3.0" } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "node_modules/temporal-spec": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", + "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -1417,26 +3550,76 @@ "node": ">=8.0" } }, - "node_modules/type-fest": { - "version": "4.37.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.37.0.tgz", - "integrity": "sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==", + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "license": "MIT" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1445,22 +3628,94 @@ "node": ">=14.17" } }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/unicode-properties": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", + "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/unicode-trie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", + "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/unicode-trie/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true, + "license": "MIT" + }, "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.4.0.tgz", + "integrity": "sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==", + "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js-replace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", - "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true, "license": "MIT" }, @@ -1468,6 +3723,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" @@ -1477,6 +3733,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dev": true, "license": "MIT", "dependencies": { "vscode-languageserver-protocol": "3.17.5" @@ -1489,6 +3746,7 @@ "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dev": true, "license": "MIT", "dependencies": { "vscode-jsonrpc": "8.2.0", @@ -1499,118 +3757,169 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "dev": true, "license": "MIT" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "dev": true, "license": "MIT" }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wordwrapjs": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.1.tgz", + "integrity": "sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg==", + "dev": true, "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=12.17" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "license": "ISC", "engines": { "node": ">=10" } }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, - "node_modules/yaml-ast-parser": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "dev": true, "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, "license": "ISC", "engines": { "node": ">=12" } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/schema/package.json b/schema/package.json index cd5ebb88..9bde8f44 100644 --- a/schema/package.json +++ b/schema/package.json @@ -1,23 +1,20 @@ { "name": "ifcx-schema", "version": "0.1.0", - "type": "module", - "peerDependencies": { - "@typespec/compiler": "latest", - "@typespec/openapi3": "latest" - }, "devDependencies": { - "@typespec/compiler": "latest", - "@typespec/openapi3": "latest", - "json-schema-to-typescript": "^15.0.3", - "openapi-typescript": "^7.6.1" + "@typespec/compiler": "^1.9.0", + "@typespec/json-schema": "^1.9.0", + "@typespec/openapi3": "^1.9.0", + "pkg": "^5.8.1", + "quicktype": "^23.2.6" }, "scripts": { - "compile": "tsp compile ifcx.tsp", - "gen": "npx openapi-typescript ./out/@typespec/openapi3/openapi.yaml -o ./out/ts/ifcx.d.ts" + "compile-alpha": "tsp compile ifcx.tsp", + "compile-ifcx-index-file": "tsp compile ifcx-index-file.tsp --emit @typespec/json-schema --output-dir ../standard/ifcxfile/", + "compile-ifcx-api": "tsp compile ifcx-api.tsp --emit @typespec/openapi3 --output-dir ../standard/api/", + "gen-code-index-cs": "quicktype -s schema ../standard/ifcxfile/IfcxIndexFile.json -l csharp -o ../sdk/cs/ifcx-sdk/IfcxIndexFile.cs --framework SystemTextJson --array-type list", + "gen-code-index-ts": "quicktype -s schema ../standard/ifcxfile/IfcxIndexFile.json -l ts -o ../sdk/ts/IfcxIndexFile.ts", + "pkg-codegen-tool": "pkg -t node*-win-x64 --output ../sdk/ifcx-codegen.exe ./ifcx-codegen.js" }, - "private": true, - "dependencies": { - "@typespec/json-schema": "^0.63.0" - } + "private": true } diff --git a/schema/tspconfig.yaml b/schema/tspconfig.yaml index b35ba591..2660b4dd 100644 --- a/schema/tspconfig.yaml +++ b/schema/tspconfig.yaml @@ -1,7 +1,11 @@ emit: - # - "@typespec/json-schema" + - "@typespec/json-schema" - "@typespec/openapi3" options: "@typespec/json-schema": file-type: json -output-dir: "{project-root}/out" \ No newline at end of file + emitter-output-dir: "{output-dir}" + "@typespec/openapi3": + file-type: json + emitter-output-dir: "{output-dir}" +output-dir: "{project-root}/../standard" \ No newline at end of file diff --git a/sdk/cs/.gitignore b/sdk/cs/.gitignore new file mode 100644 index 00000000..da47429e --- /dev/null +++ b/sdk/cs/.gitignore @@ -0,0 +1,4 @@ +*.vs +**/bin/ +**/obj/ +*.ifcx \ No newline at end of file diff --git a/sdk/cs/ifcx-sdk.sln b/sdk/cs/ifcx-sdk.sln new file mode 100644 index 00000000..51a8ad81 --- /dev/null +++ b/sdk/cs/ifcx-sdk.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35919.96 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ifcx-sdk", "ifcx-sdk\ifcx-sdk.csproj", "{034ADBE2-D459-4278-B14E-C19630E20E66}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ifcx-test", "ifcx-test\ifcx-test.csproj", "{32E73D67-CB24-4BE2-8FFC-F5B63801F182}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {034ADBE2-D459-4278-B14E-C19630E20E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {034ADBE2-D459-4278-B14E-C19630E20E66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {034ADBE2-D459-4278-B14E-C19630E20E66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {034ADBE2-D459-4278-B14E-C19630E20E66}.Release|Any CPU.Build.0 = Release|Any CPU + {32E73D67-CB24-4BE2-8FFC-F5B63801F182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32E73D67-CB24-4BE2-8FFC-F5B63801F182}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32E73D67-CB24-4BE2-8FFC-F5B63801F182}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32E73D67-CB24-4BE2-8FFC-F5B63801F182}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {914D298B-FE28-4B38-AE35-5C32C793F728} + EndGlobalSection +EndGlobal diff --git a/sdk/cs/ifcx-sdk/IfcxApiConnection.cs b/sdk/cs/ifcx-sdk/IfcxApiConnection.cs new file mode 100644 index 00000000..8712a063 --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxApiConnection.cs @@ -0,0 +1,86 @@ +using ApiSdk; +using Microsoft.Kiota.Abstractions.Authentication; +using Microsoft.Kiota.Http.HttpClientLibrary; +using Optional; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ifcx_sdk +{ + public interface IIfcxApiConnection + { + public Task CreateLayer(ApiSdk.Models.CreateLayerCommand cmd); + public Task DeleteLayer(Guid layerId); + public Task> GetLayer(Guid layerId); + public Task> ListLayers(); + public Task GetLayerVersion(Guid layerId, Guid versionId); + public Task Upload(Guid blobId, Stream body); + public Task Download(Guid blobId); + public Task CreateLayerVersion(Guid layerId, ApiSdk.Models.CreateLayerVersionCommand cmd); + } + + public class IfcxApiConnection : IIfcxApiConnection + { + ApiClient client; + + public IfcxApiConnection() { + + var authProvider = new AnonymousAuthenticationProvider(); + + var adapter = new HttpClientRequestAdapter(authProvider); + + adapter.BaseUrl = "https://api.example.com"; + + this.client = new ApiClient(adapter); + } + + public async Task CreateLayer(ApiSdk.Models.CreateLayerCommand cmd) + { + var result = await this.client.IfcxApi.Layers.PostAsync(cmd); + } + + public async Task DeleteLayer(Guid layerId) + { + await this.client.IfcxApi.Layers[layerId].DeleteAsync(); + } + + public async Task> GetLayer(Guid layerId) + { + var layerDetails = await this.client.IfcxApi.Layers[layerId].GetAsync(); + if (layerDetails == null) + { + return Option.None(); + } + return Option.Some(layerDetails); + } + + public async Task> ListLayers() + { + return await this.client.IfcxApi.Layers.GetAsync(); + } + + public async Task GetLayerVersion(Guid layerId, Guid versionId) + { + return await this.client.IfcxApi.Layers[layerId].Versions[versionId].GetAsync(); + } + + public async Task Upload(Guid blobId, Stream body) + { + await this.client.IfcxApi.Upload[blobId].PutAsync(body, "application/octet-stream"); + } + + public async Task Download(Guid blobId) + { + return await this.client.IfcxApi.Download[blobId].PutAsync(); + } + + public async Task CreateLayerVersion(Guid layerId, ApiSdk.Models.CreateLayerVersionCommand cmd) + { + return await this.client.IfcxApi.Layers[layerId].Versions.PostAsync(cmd); + } + } +} diff --git a/sdk/cs/ifcx-sdk/IfcxFile.cs b/sdk/cs/ifcx-sdk/IfcxFile.cs new file mode 100644 index 00000000..c00b8e14 --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxFile.cs @@ -0,0 +1,182 @@ +using QuickType; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO.Compression; +using System.Linq; +using System.Security.Principal; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ifcx_sdk +{ + + public class IfcxFile + { + public IfcxIndexFile index = new(); + public Dictionary> serializedComponents = new(); + + public IfcxFile() + { + index.Header = new(); + index.Header.IfcxVersion = "post-alpha"; + index.Sections = new(); + index.Imports = new(); + index.AttributeTables = new(); + } + + public Dictionary ComponentTypeCounts() + { + Dictionary counts = new(); + + foreach (var item in serializedComponents) + { + counts.Add(item.Key, item.Value.Count); + } + + return counts; + } + + public void AddImport(ImportElement imp) + { + this.index.Imports.Add(imp); + } + + public void AddSection(SectionElement se) + { + this.index.Sections.Add(se); + } + + private List GetSerializedComponentsArray(IfcxIdentity identity) + { + if (!this.serializedComponents.ContainsKey(identity.typeID)) + { + this.serializedComponents.Add(identity.typeID, new List()); + + var table = new AttributeTableElement(); + table.Filename = $"{identity.typeID}.ndjson"; + table.Type = TypeEnum.Ndjson; + table.Schema = identity.originSchemaSrc; + this.index.AttributeTables.Add(table); + } + return this.serializedComponents.GetValueOrDefault(identity.typeID)!; + } + public int AddSerializedComponent(string typeID, string data) + { + if (!this.serializedComponents.ContainsKey(typeID)) + { + this.serializedComponents.Add(typeID, new List()); + } + + var arr = this.serializedComponents.GetValueOrDefault(typeID)!; + + var index = arr.Count; + arr.Add(data); + return index; + } + + + public int AddComponent(IfcxIdentity id, T component) + { + var arr = this.GetSerializedComponentsArray(id); + var index = arr.Count; + var indentedStr = id.toJSONString(component); + arr.Add(JsonSerializer.Serialize(JsonSerializer.Deserialize(indentedStr))); // this dance is due to quicktype pretty printing... + return index; + } + public T ReadComponent(IfcxIdentity id, int index) + { + var arr = this.GetSerializedComponentsArray(id); + if (arr.Count <= index) + { + throw new Exception($"No component with index ${ index }"); + } + return id.fromJSONString(arr[index]); + } + + public string ReadRawComponent(string typeID, int index) + { + var arr = this.serializedComponents.GetValueOrDefault(typeID)!; + + if (arr.Count <= index) + { + throw new Exception($"No component with index ${index}"); + } + return arr[index]; + } + + public static byte[] WriteIfcxFile(IfcxFile file) + { + byte[] zipBytes; + + using (var memoryStream = new MemoryStream()) + { + using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true)) + { + var indexFile = archive.CreateEntry("index.json"); + + using (var writer = new StreamWriter(indexFile.Open(), Encoding.UTF8)) + { + // questionable namespace + writer.Write(Serialize.ToJson(file.index)); + } + + foreach (var id_comps in file.serializedComponents) + { + var componentsFile = archive.CreateEntry($"{id_comps.Key}.ndjson"); + + using (var writer = new StreamWriter(componentsFile.Open(), Encoding.UTF8)) + { + var str = string.Join("\n", id_comps.Value.ToArray()); + writer.Write(str); + } + } + } + + // Important: reset position before reading + memoryStream.Position = 0; + + zipBytes = memoryStream.ToArray(); + } + + return zipBytes; + } + + public static IfcxFile ReadIfcxFile(MemoryStream memoryStream) + { + var file = new IfcxFile(); + + // Open archive in Read mode + using var archive = new ZipArchive(memoryStream, ZipArchiveMode.Read); + + var files = new Dictionary(); + // Iterate entries + foreach (var entry in archive.Entries) + { + Console.WriteLine($"Entry: {entry.FullName}"); + + using var reader = new StreamReader(entry.Open(), Encoding.UTF8); + string content = reader.ReadToEnd(); + + files.Add(entry.FullName, content); + } + + var indexJSON = files.GetValueOrDefault("index.json"); + file.index = IfcxIndexFile.FromJson(indexJSON); + + foreach(var entry in files) + { + if (entry.Key.EndsWith(".ndjson")) + { + var type = entry.Key.Replace(".ndjson", ""); + + file.serializedComponents.Add(type, entry.Value.Split("\n").ToList()); + } + } + + return file; + } + } +} diff --git a/sdk/cs/ifcx-sdk/IfcxFileBuilder.cs b/sdk/cs/ifcx-sdk/IfcxFileBuilder.cs new file mode 100644 index 00000000..8c168089 --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxFileBuilder.cs @@ -0,0 +1,65 @@ +using QuickType; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ifcx_sdk +{ + public class NodeElementBuilder + { + NodeElement node; + + public NodeElementBuilder(string path) + { + this.node = new NodeElement(); + this.node.Path = path; + this.node.Inherits = new(); + this.node.Attributes = new(); + this.node.Children = new(); + } + + public NodeElementBuilder AddChild(Opinion op, string name, string value) + { + var c = new ChildElement(); + c.Opinion = op; + c.Name = name; + c.Value = value; + this.node.Children.Add(c); + + return this; + } + + public NodeElement Build() + { + return this.node; + } + } + + public class IfcxFileBuilder + { + IfcxFile file; + + public IfcxFileBuilder() { + this.file = new IfcxFile(); + } + + public IfcxFileBuilder AddSection(string id, NodeElement node) + { + SectionElement sec = new(); + sec.Header = new(); + sec.Header.Id = id; + sec.Nodes = new(); + sec.Nodes.Add(node); + this.file.AddSection(sec); + + return this; + } + + public IfcxFile Build() + { + return file; + } + } +} diff --git a/sdk/cs/ifcx-sdk/IfcxFileOperations.cs b/sdk/cs/ifcx-sdk/IfcxFileOperations.cs new file mode 100644 index 00000000..785da879 --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxFileOperations.cs @@ -0,0 +1,546 @@ +using ApiSdk.Models; +using Optional; +using QuickType; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ifcx_sdk +{ + public class IfcxFileOperations + { + record NodeLineage + ( + bool fromNew, + SectionHeader header, + NodeElement node + ); + + public static void Merge(NodeElement oldNode, NodeElement newNode) + { + // again lots of repetition + foreach (var item in newNode.Children) + { + var match = oldNode.Children.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + if (item.Opinion == Opinion.Value) + { + var ce = new ChildElement(); + ce.Name = item.Name; + ce.Value = item.Value; + ce.Opinion = item.Opinion; + oldNode.Children.Add(ce); + } + } + else + { + if (item.Opinion == Opinion.Delete) + { + oldNode.Children.RemoveAt(oldNode.Children.FindIndex(x => x.Name == item.Name)); + } + else if (item.Opinion == Opinion.Value) + { + match.Name = item.Name; + match.Value = item.Value; + match.Opinion = item.Opinion; + } + else + { + // passthrough + } + } + } + + foreach (var item in newNode.Inherits) + { + var match = oldNode.Inherits.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + if (item.Opinion == Opinion.Value) + { + var ce = new ChildElement(); + ce.Name = item.Name; + ce.Value = item.Value; + ce.Opinion = item.Opinion; + oldNode.Inherits.Add(ce); + } + } + else + { + if (item.Opinion == Opinion.Delete) + { + oldNode.Inherits.RemoveAt(oldNode.Children.FindIndex(x => x.Name == item.Name)); + } + else if (item.Opinion == Opinion.Value) + { + match.Name = item.Name; + match.Value = item.Value; + match.Opinion = item.Opinion; + } + else + { + // passthrough + } + } + } + + foreach (var item in newNode.Attributes) + { + var match = oldNode.Attributes.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + if (item.Opinion == Opinion.Value) + { + var ce = new AttributeElement(); + ce.Name = item.Name; + ce.Value = item.Value; + ce.Opinion = item.Opinion; + oldNode.Attributes.Add(ce); + } + } + else + { + if (item.Opinion == Opinion.Delete) + { + oldNode.Attributes.RemoveAt(oldNode.Attributes.FindIndex(x => x.Name == item.Name)); + } + else if (item.Opinion == Opinion.Value) + { + match.Name = item.Name; + match.Value = item.Value; + match.Opinion = item.Opinion; + } + else + { + // passthrough + } + } + } + } + + public static Dictionary CollapseNodesByPath(IfcxFile file) + { + Dictionary nodes = new(); + + foreach (var sec in file.index.Sections) + { + foreach (var node in sec.Nodes) + { + if (!nodes.ContainsKey(node.Path)) + { + var n = new NodeElement(); + n.Path = node.Path; + n.Children = new(); + n.Attributes = new(); + n.Inherits = new(); + nodes.Add(node.Path, n); + } + + Merge(nodes[node.Path], node); + } + } + + return nodes; + } + + private static NodeElement DiffNodes(NodeElement oldNode, NodeElement newNode, bool markMissingFromNewAsDelete) + { + NodeElement result = new(); + result.Path = oldNode.Path != null ? oldNode.Path : newNode.Path; + result.Children = new(); + result.Inherits = new(); + result.Attributes = new(); + + + // children + { + foreach (var item in newNode.Children) + { + var match = oldNode.Children.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // create + result.Children.Add(item); + } + else + { + if (match.Value != item.Value) + { + // edit/overwrite + result.Children.Add(item); + } + else + { + // equal, no diff + } + } + } + + if (markMissingFromNewAsDelete) + { + foreach (var item in oldNode.Children) + { + var match = newNode.Children.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // delete + var deleteItem = new ChildElement(); + deleteItem.Name = item.Name; + deleteItem.Opinion = Opinion.Delete; + result.Children.Add(deleteItem); + } + } + } + } + + // inherits + { + foreach (var item in newNode.Inherits) + { + var match = oldNode.Inherits.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // create + result.Inherits.Add(item); + } + else + { + if (match.Value != item.Value) + { + // edit/overwrite + result.Inherits.Add(item); + } + else + { + // equal, no diff + } + } + } + + if (markMissingFromNewAsDelete) + { + foreach (var item in oldNode.Inherits) + { + var match = newNode.Inherits.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // delete + var deleteItem = new ChildElement(); + deleteItem.Name = item.Name; + deleteItem.Opinion = Opinion.Delete; + result.Inherits.Add(deleteItem); + } + } + } + } + + // attributes + { + foreach (var item in newNode.Attributes) + { + var match = oldNode.Attributes.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // create + result.Attributes.Add(item); + } + else + { + if (match.Value != item.Value) + { + // edit/overwrite + result.Attributes.Add(item); + } + else + { + // equal, no diff + } + } + } + + if (markMissingFromNewAsDelete) + { + foreach (var item in oldNode.Attributes) + { + var match = newNode.Attributes.FirstOrDefault(x => x.Name == item.Name); + if (match == null) + { + // delete + var deleteItem = new ChildElement(); + deleteItem.Name = item.Name; + deleteItem.Opinion = Opinion.Delete; + result.Inherits.Add(deleteItem); + } + } + } + } + + return result; + } + + public static SectionElement DiffFiles(IfcxFile oldFile, IfcxFile newFile, bool markMissingFromNewAsDelete) + { + var oldNodes = CollapseNodesByPath(oldFile); + var newNodes = CollapseNodesByPath(newFile); + + // the returned section has component IDs of newFile + var result = new SectionElement(); + result.Nodes = new(); + + foreach (var item in newNodes) + { + var newNode = item.Value; + + if (oldNodes.ContainsKey(item.Key)) + { + var oldNode = oldNodes[item.Key]; + result.Nodes.Add(DiffNodes(oldNode, newNode, markMissingFromNewAsDelete)); + + } + else + { + // new + result.Nodes.Add(DiffNodes(new NodeElement(), newNode, markMissingFromNewAsDelete)); + } + } + + if (markMissingFromNewAsDelete) + { + foreach (var item in oldNodes) + { + var oldNode = item.Value; + + if (!newNodes.ContainsKey(item.Key)) + { + result.Nodes.Add(DiffNodes(oldNode, new NodeElement(), markMissingFromNewAsDelete)); + } + } + } + + result.Nodes.RemoveAll(x => x.Inherits.Count == 0 && x.Children.Count == 0 && x.Attributes.Count == 0); + + return result; + } + + public static IfcxFile Federate(IfcxFile oldFile, IfcxFile newFile, bool keepHistory) + { + IfcxFile returnValue = new(); + + // meta is predictable + returnValue.index.Header = newFile.index.Header; + returnValue.index.Imports = newFile.index.Imports; + returnValue.index.AttributeTables = oldFile.index.AttributeTables.Concat(newFile.index.AttributeTables).ToList(); + returnValue.index.AttributeTables.DistinctBy(at => at.Filename); // TODO: fix + + // TODO: this whole thing would be much easier if nodes were exploded into lists of operations + + // sections + if (keepHistory) + { + // we append the change to the old file data, keeping all information + + // add all sections of oldFile, leave component IDs as-is + foreach (var sec in oldFile.index.Sections) + { + returnValue.AddSection(sec); // todo: copy + } + + // add all components of oldFile, leave component IDs as-is + foreach (var item in oldFile.serializedComponents) + { + foreach (var component in item.Value) + { + returnValue.AddSerializedComponent(item.Key, component); + } + } + + var componentCounts = oldFile.ComponentTypeCounts(); + + foreach (var sec in newFile.index.Sections) + { + var newSection = new SectionElement(); + newSection.Header = sec.Header; + newSection.Nodes = []; + + foreach (var node in sec.Nodes) + { + var newNode = new NodeElement(); + newNode.Path = node.Path; + newNode.Inherits = node.Inherits; + newNode.Children = node.Children; + newNode.Attributes = []; + + foreach (var attribute in node.Attributes) + { + AttributeElement newAttribute = new(); + newAttribute.Name = attribute.Name; + newAttribute.Value = new Value(); + newAttribute.Value.TypeId = attribute.Value.TypeId; + + var component = newFile.ReadRawComponent(attribute.Value.TypeId, (int)attribute.Value.ComponentIndex); + var id = returnValue.AddSerializedComponent(attribute.Value.TypeId, component); + newAttribute.Value.ComponentIndex = id; + newNode.Attributes.Add(newAttribute); + + } + + newSection.Nodes.Add(newNode); + } + + // add section with rewritten component IDs + returnValue.AddSection(newSection); + } + } + else + { + // we append the change to the old file data, but we remove any historical data that is no longer leading + + // we do this by collecting all edits to all paths and condensing them, keeping around the original DataSection that produced it + Dictionary> pathToNodes = new(); + + // old file first, so later wins + foreach (var sec in oldFile.index.Sections) + { + foreach (var node in sec.Nodes) + { + pathToNodes.TryAdd(node.Path, new()); + pathToNodes[node.Path].Add(new(false, sec.Header, node)); + } + } + + // new file second, later wins + foreach (var sec in newFile.index.Sections) + { + foreach (var node in sec.Nodes) + { + pathToNodes.TryAdd(node.Path, new()); + pathToNodes[node.Path].Add(new(true, sec.Header, node)); + } + } + + Dictionary idToSection = new(); + + // pathToNodes now has an ordered list of all referenced nodes, in section order, including federation + foreach (var item in pathToNodes) + { + var path = item.Key; + + List all_children = new(); + List all_inherits = new(); + List all_attributes = new(); + + // walk backwards, newest first, so we can detect unique writes + for (int i = item.Value.Count - 1; i >= 0; i--) + { + var lineage = item.Value[i]; + var node = lineage.node; + + var resultNodeForThisLineage = new NodeElement(); + resultNodeForThisLineage.Path = node.Path; + resultNodeForThisLineage.Children = new(); + resultNodeForThisLineage.Attributes = new(); + resultNodeForThisLineage.Inherits = new(); + + // children + foreach (var child in node.Children) + { + if (!all_children.Contains(child.Name)) + { + // not yet filled, so we are the most recent edit to change this value, so we win! + + // check the type, if its pass through we can ignore + if (child.Opinion != Opinion.PassThrough) + { + resultNodeForThisLineage.Children.Add(child); + } + all_children.Add(child.Name); + } + else + { + // already filled, and we're going first to last, so we lost + } + } + + // inherits + foreach (var inherit in node.Inherits) + { + if (!all_inherits.Contains(inherit.Name)) + { + // not yet filled, so we are the most recent edit to change this value, so we win! + + // check the type, if its pass through we can ignore + if (inherit.Opinion != Opinion.PassThrough) + { + resultNodeForThisLineage.Inherits.Add(inherit); + } + all_children.Add(inherit.Name); + } + else + { + // already filled, and we're going first to last, so we lost + } + } + + // atributes + foreach (var attribute in node.Attributes) + { + if (!all_attributes.Contains(attribute.Name)) + { + // not yet filled, so we are the most recent edit to change this value, so we win! + + // check the type, if its pass through we can ignore + if (attribute.Opinion != Opinion.PassThrough) + { + if (attribute.Opinion == Opinion.Value) + { + // rewrite component + var component = lineage.fromNew ? newFile.ReadRawComponent(attribute.Value.TypeId, (int)attribute.Value.ComponentIndex) : oldFile.ReadRawComponent(attribute.Value.TypeId, (int)attribute.Value.ComponentIndex); + returnValue.AddSerializedComponent(attribute.Value.TypeId, component); + } + resultNodeForThisLineage.Attributes.Add(attribute); + } + all_children.Add(attribute.Name); + } + else + { + // already filled, and we're going first to last, so we lost + } + } + + if (!idToSection.ContainsKey(lineage.header.Id)) + { + var sec = new SectionElement(); + sec.Header = lineage.header; + sec.Nodes = new(); + idToSection.Add(lineage.header.Id, sec); + } + + idToSection[lineage.header.Id].Nodes.Add(resultNodeForThisLineage); + } + } + + //TODO: sort sections! + + foreach (var item in idToSection) + { + item.Value.Nodes.RemoveAll(x => x.Inherits.Count == 0 && x.Children.Count == 0 && x.Attributes.Count == 0); + + if (item.Value.Nodes.Count != 0) + { + returnValue.AddSection(item.Value); + } + } + } + + return returnValue; + } + + public static Option ValidateComponentsWithSchemas(IfcxFile ifcx) + { + return Option.None(); + } + } +} diff --git a/sdk/cs/ifcx-sdk/IfcxIdentity.cs b/sdk/cs/ifcx-sdk/IfcxIdentity.cs new file mode 100644 index 00000000..08f093b8 --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxIdentity.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ifcx_sdk +{ + public record IfcxIdentity + { + public string typeID { get; init; } + public string originSchemaSrc { get; init; } + public Func fromJSONString { get; init; } + public Func toJSONString { get; init; } + } +} diff --git a/sdk/cs/ifcx-sdk/IfcxIndexFile.cs b/sdk/cs/ifcx-sdk/IfcxIndexFile.cs new file mode 100644 index 00000000..f400f01a --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxIndexFile.cs @@ -0,0 +1,359 @@ +// +// +// To parse this JSON data, add NuGet 'System.Text.Json' then do: +// +// using QuickType; +// +// var ifcxIndexFile = IfcxIndexFile.FromJson(jsonString); +#nullable enable +#pragma warning disable CS8618 +#pragma warning disable CS8601 +#pragma warning disable CS8603 + +namespace QuickType +{ + using System; + using System.Collections.Generic; + + using System.Text.Json; + using System.Text.Json.Serialization; + using System.Globalization; + + public partial class IfcxIndexFile + { + [JsonPropertyName("attributeTables")] + public List AttributeTables { get; set; } + + [JsonPropertyName("header")] + public IfcxIndexFileHeader Header { get; set; } + + [JsonPropertyName("imports")] + public List Imports { get; set; } + + [JsonPropertyName("sections")] + public List Sections { get; set; } + } + + public partial class AttributeTableElement + { + [JsonPropertyName("filename")] + public string Filename { get; set; } + + [JsonPropertyName("schema")] + public object Schema { get; set; } + + [JsonPropertyName("type")] + public TypeEnum Type { get; set; } + } + + public partial class IfcxIndexFileHeader + { + [JsonPropertyName("ifcxVersion")] + public string IfcxVersion { get; set; } + } + + public partial class ImportElement + { + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("integrity")] + public string Integrity { get; set; } + + [JsonPropertyName("uri")] + public string Uri { get; set; } + } + + public partial class SectionElement + { + [JsonPropertyName("header")] + public SectionHeader Header { get; set; } + + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + } + + public partial class SectionHeader + { + [JsonPropertyName("application")] + public string Application { get; set; } + + [JsonPropertyName("author")] + public string Author { get; set; } + + [JsonPropertyName("dataVersion")] + public string DataVersion { get; set; } + + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("timestamp")] + public string Timestamp { get; set; } + } + + public partial class NodeElement + { + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("attributes")] + public List Attributes { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("children")] + public List Children { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("inherits")] + public List Inherits { get; set; } + + [JsonPropertyName("path")] + public string Path { get; set; } + } + + public partial class AttributeElement + { + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("opinion")] + public Opinion Opinion { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("value")] + public Value Value { get; set; } + } + + public partial class Value + { + [JsonPropertyName("componentIndex")] + public long ComponentIndex { get; set; } + + [JsonPropertyName("typeID")] + public string TypeId { get; set; } + } + + public partial class ChildElement + { + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("opinion")] + public Opinion Opinion { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("value")] + public string Value { get; set; } + } + + public enum TypeEnum { Ndjson, Parquet }; + + public enum Opinion { Delete, PassThrough, Value }; + + public partial class IfcxIndexFile + { + public static IfcxIndexFile FromJson(string json) => JsonSerializer.Deserialize(json, QuickType.Converter.Settings); + } + + public static class Serialize + { + public static string ToJson(this IfcxIndexFile self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings); + } + + internal static class Converter + { + public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General) + { + Converters = + { + TypeEnumConverter.Singleton, + OpinionConverter.Singleton, + new DateOnlyConverter(), + new TimeOnlyConverter(), + IsoDateTimeOffsetConverter.Singleton + }, + }; + } + + internal class TypeEnumConverter : JsonConverter + { + public override bool CanConvert(Type t) => t == typeof(TypeEnum); + + public override TypeEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + switch (value) + { + case "NDJSON": + return TypeEnum.Ndjson; + case "PARQUET": + return TypeEnum.Parquet; + } + throw new Exception("Cannot unmarshal type TypeEnum"); + } + + public override void Write(Utf8JsonWriter writer, TypeEnum value, JsonSerializerOptions options) + { + switch (value) + { + case TypeEnum.Ndjson: + JsonSerializer.Serialize(writer, "NDJSON", options); + return; + case TypeEnum.Parquet: + JsonSerializer.Serialize(writer, "PARQUET", options); + return; + } + throw new Exception("Cannot marshal type TypeEnum"); + } + + public static readonly TypeEnumConverter Singleton = new TypeEnumConverter(); + } + + internal class OpinionConverter : JsonConverter + { + public override bool CanConvert(Type t) => t == typeof(Opinion); + + public override Opinion Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + switch (value) + { + case "DELETE": + return Opinion.Delete; + case "PASS_THROUGH": + return Opinion.PassThrough; + case "VALUE": + return Opinion.Value; + } + throw new Exception("Cannot unmarshal type Opinion"); + } + + public override void Write(Utf8JsonWriter writer, Opinion value, JsonSerializerOptions options) + { + switch (value) + { + case Opinion.Delete: + JsonSerializer.Serialize(writer, "DELETE", options); + return; + case Opinion.PassThrough: + JsonSerializer.Serialize(writer, "PASS_THROUGH", options); + return; + case Opinion.Value: + JsonSerializer.Serialize(writer, "VALUE", options); + return; + } + throw new Exception("Cannot marshal type Opinion"); + } + + public static readonly OpinionConverter Singleton = new OpinionConverter(); + } + + public class DateOnlyConverter : JsonConverter + { + private readonly string serializationFormat; + public DateOnlyConverter() : this(null) { } + + public DateOnlyConverter(string? serializationFormat) + { + this.serializationFormat = serializationFormat ?? "yyyy-MM-dd"; + } + + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + return DateOnly.Parse(value!); + } + + public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options) + => writer.WriteStringValue(value.ToString(serializationFormat)); + } + + public class TimeOnlyConverter : JsonConverter + { + private readonly string serializationFormat; + + public TimeOnlyConverter() : this(null) { } + + public TimeOnlyConverter(string? serializationFormat) + { + this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff"; + } + + public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + return TimeOnly.Parse(value!); + } + + public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options) + => writer.WriteStringValue(value.ToString(serializationFormat)); + } + + internal class IsoDateTimeOffsetConverter : JsonConverter + { + public override bool CanConvert(Type t) => t == typeof(DateTimeOffset); + + private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + + private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind; + private string? _dateTimeFormat; + private CultureInfo? _culture; + + public DateTimeStyles DateTimeStyles + { + get => _dateTimeStyles; + set => _dateTimeStyles = value; + } + + public string? DateTimeFormat + { + get => _dateTimeFormat ?? string.Empty; + set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value; + } + + public CultureInfo Culture + { + get => _culture ?? CultureInfo.CurrentCulture; + set => _culture = value; + } + + public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) + { + string text; + + + if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal + || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal) + { + value = value.ToUniversalTime(); + } + + text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture); + + writer.WriteStringValue(text); + } + + public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? dateText = reader.GetString(); + + if (string.IsNullOrEmpty(dateText) == false) + { + if (!string.IsNullOrEmpty(_dateTimeFormat)) + { + return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles); + } + else + { + return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles); + } + } + else + { + return default(DateTimeOffset); + } + } + + + public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter(); + } +} +#pragma warning restore CS8618 +#pragma warning restore CS8601 +#pragma warning restore CS8603 diff --git a/sdk/cs/ifcx-sdk/IfcxRemoteFile.cs b/sdk/cs/ifcx-sdk/IfcxRemoteFile.cs new file mode 100644 index 00000000..49c9d36c --- /dev/null +++ b/sdk/cs/ifcx-sdk/IfcxRemoteFile.cs @@ -0,0 +1,126 @@ +using ApiSdk; +using ApiSdk.Models; +using Optional.Collections; +using Optional.Unsafe; +using QuickType; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ifcx_sdk +{ + public class IfcxRemoteFile + { + IIfcxApiConnection conn; + Guid id; + + public IfcxRemoteFile(IIfcxApiConnection conn, Guid id) + { + this.conn = conn; + this.id = id; + } + + public enum SyncState + { + UpToDate, + PleaseCatchUp, + RequestFullExport + } + + public record SyncResult(SyncState state, List versionsBehind); + + public async Task Sync(Guid currentVersionId) + { + var layerOpt = await this.conn.GetLayer(this.id); + + if (!layerOpt.HasValue) + { + // layer does not exist, lets create it + await this.conn.CreateLayer(new CreateLayerCommand() { Id=this.id, Name = "My Layer" }); + + // done + return new SyncResult(SyncState.RequestFullExport, new()); + } + + var layer = layerOpt.ValueOrDefault(); + + // figure out how we relate to history + var currentVersionOpt = layer.History.FirstOrNone(h => h.VersionId == currentVersionId); + + if (!currentVersionOpt.HasValue) + { + // somehow we have gotten off track, request a full re-export so server can diff + + return new SyncResult(SyncState.RequestFullExport, new()); + } + + // walk back and apply + int latestVersionAccordingToLayer = -1; + List catchUp = new List(); + for (int i = 0; i < layer.History.Count; i++) + { + if (layer.History[i].VersionId == currentVersionId) + { + latestVersionAccordingToLayer = i; + } + if (i > latestVersionAccordingToLayer) + { + catchUp.Add(layer.History[i].VersionId.Value); + } + } + + if (catchUp.Count == 0) + { + return new SyncResult(SyncState.UpToDate, new()); + } + + return new SyncResult(SyncState.RequestFullExport, catchUp); + } + + public static async Task ToMemoryStreamAsync(Stream input) + { + var memory = new MemoryStream(); + await input.CopyToAsync(memory); + memory.Position = 0; // rewind + return memory; + } + + public async Task GetVersionDiff(Guid version) + { + Guid blobId = Guid.Empty; + var versionDiffBlob = await this.conn.Download(blobId); + return IfcxFile.ReadIfcxFile(await ToMemoryStreamAsync(versionDiffBlob)); + } + + public enum CreateVersionResponse + { + OK, + OUT_OF_DATE + } + + public async Task CreateNextVersion(Guid currentVersionId, IfcxFile file) + { + var blob = IfcxFile.WriteIfcxFile(file); + Guid blobId = Guid.NewGuid(); + await this.conn.Upload(blobId, new MemoryStream(blob)); + + var cmd = new CreateLayerVersionCommand(); + cmd.PreviousLayerVersionId = currentVersionId; + cmd.BlobId = blobId; + cmd.Id = Guid.NewGuid(); + + var response = await this.conn.CreateLayerVersion(this.id, cmd); + + if (response.State == CreateLayerVersionResponseState.OUT_OF_DATE) + { + return CreateVersionResponse.OUT_OF_DATE; + } + + return CreateVersionResponse.OK; + } + + } +} \ No newline at end of file diff --git a/sdk/cs/ifcx-sdk/api-client/.kiota.log b/sdk/cs/ifcx-sdk/api-client/.kiota.log new file mode 100644 index 00000000..9b3570d0 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/.kiota.log @@ -0,0 +1,2 @@ +Warning: KiotaBuilder OpenAPI warning: #/ - A servers entry (v3) or host + basePath + schemes properties (v2) was not present in the OpenAPI description. The root URL will need to be set manually with the request adapter. +Warning: KiotaBuilder No server url found in the OpenAPI document. The base url will need to be set when using the client. diff --git a/sdk/cs/ifcx-sdk/api-client/ApiClient.cs b/sdk/cs/ifcx-sdk/api-client/ApiClient.cs new file mode 100644 index 00000000..6e7ef75f --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/ApiClient.cs @@ -0,0 +1,43 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Serialization.Form; +using Microsoft.Kiota.Serialization.Json; +using Microsoft.Kiota.Serialization.Multipart; +using Microsoft.Kiota.Serialization.Text; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace ApiSdk +{ + /// + /// The main entry point of the SDK, exposes the configuration and the fluent API. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiClient : BaseRequestBuilder + { + /// The ifcxApi property + public global::ApiSdk.IfcxApi.IfcxApiRequestBuilder IfcxApi + { + get => new global::ApiSdk.IfcxApi.IfcxApiRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// The request adapter to use to execute the requests. + public ApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary()) + { + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/DownloadRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/DownloadRequestBuilder.cs new file mode 100644 index 00000000..2b4a1ff2 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/DownloadRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Download.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace ApiSdk.IfcxApi.Download +{ + /// + /// Builds and executes requests for operations under \ifcx-api\download + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the ApiSdk.ifcxApi.download.item collection + /// Unique identifier of the item + /// A + public global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("blobId", position); + return new global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the ApiSdk.ifcxApi.download.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("blobId", position); + return new global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DownloadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/download", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DownloadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/download", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/Item/WithBlobItemRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/Item/WithBlobItemRequestBuilder.cs new file mode 100644 index 00000000..6b8881be --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Download/Item/WithBlobItemRequestBuilder.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Download.Item +{ + /// + /// Builds and executes requests for operations under \ifcx-api\download\{blobId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBlobItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBlobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/download/{blobId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBlobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/download/{blobId}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "*/*"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Download.Item.WithBlobItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBlobItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/IfcxApiRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/IfcxApiRequestBuilder.cs new file mode 100644 index 00000000..58ea1e3f --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/IfcxApiRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Download; +using ApiSdk.IfcxApi.Layers; +using ApiSdk.IfcxApi.Upload; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace ApiSdk.IfcxApi +{ + /// + /// Builds and executes requests for operations under \ifcx-api + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IfcxApiRequestBuilder : BaseRequestBuilder + { + /// The download property + public global::ApiSdk.IfcxApi.Download.DownloadRequestBuilder Download + { + get => new global::ApiSdk.IfcxApi.Download.DownloadRequestBuilder(PathParameters, RequestAdapter); + } + /// The layers property + public global::ApiSdk.IfcxApi.Layers.LayersRequestBuilder Layers + { + get => new global::ApiSdk.IfcxApi.Layers.LayersRequestBuilder(PathParameters, RequestAdapter); + } + /// The upload property + public global::ApiSdk.IfcxApi.Upload.UploadRequestBuilder Upload + { + get => new global::ApiSdk.IfcxApi.Upload.UploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IfcxApiRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IfcxApiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/History/HistoryRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/History/HistoryRequestBuilder.cs new file mode 100644 index 00000000..bfe59e14 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/History/HistoryRequestBuilder.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.History +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\history + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/history", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/history", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.LayerHistory.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.History.HistoryRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.History.HistoryRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/UploadIfcxBlobUrl/UploadIfcxBlobUrlRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/UploadIfcxBlobUrl/UploadIfcxBlobUrlRequestBuilder.cs new file mode 100644 index 00000000..eb95cce9 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/UploadIfcxBlobUrl/UploadIfcxBlobUrlRequestBuilder.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\upload-ifcx-blob-url + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UploadIfcxBlobUrlRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadIfcxBlobUrlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/upload-ifcx-blob-url", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadIfcxBlobUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/upload-ifcx-blob-url", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.BlobResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl.UploadIfcxBlobUrlRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl.UploadIfcxBlobUrlRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UploadIfcxBlobUrlRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/DownloadIfcx/DownloadIfcxRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/DownloadIfcx/DownloadIfcxRequestBuilder.cs new file mode 100644 index 00000000..827a2223 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/DownloadIfcx/DownloadIfcxRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\versions\{versionId}\download-ifcx + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadIfcxRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DownloadIfcxRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx?downloadType={downloadType}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DownloadIfcxRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx?downloadType={downloadType}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.LayerVersionIfcxFile.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx.DownloadIfcxRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx.DownloadIfcxRequestBuilder(rawUrl, RequestAdapter); + } + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DownloadIfcxRequestBuilderPutQueryParameters + #pragma warning restore CS1591 + { + [Obsolete("This property is deprecated, use DownloadTypeAsIfcxFileDownloadType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("downloadType")] + public string? DownloadType { get; set; } +#nullable restore +#else + [QueryParameter("downloadType")] + public string DownloadType { get; set; } +#endif + [QueryParameter("downloadType")] + public global::ApiSdk.Models.IfcxFileDownloadType? DownloadTypeAsIfcxFileDownloadType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadIfcxRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/Query/QueryRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/Query/QueryRequestBuilder.cs new file mode 100644 index 00000000..f80a537a --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/Query/QueryRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\versions\{versionId}\query + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class QueryRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public QueryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/query?expandChildren={expandChildren}&expandChildrenRecursive={expandChildrenRecursive}&path={path}&provenance={provenance}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public QueryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/query?expandChildren={expandChildren}&expandChildrenRecursive={expandChildrenRecursive}&path={path}&provenance={provenance}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query.QueryRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query.QueryRequestBuilder(rawUrl, RequestAdapter); + } + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class QueryRequestBuilderGetQueryParameters + #pragma warning restore CS1591 + { + [QueryParameter("expandChildren")] + public bool? ExpandChildren { get; set; } + [QueryParameter("expandChildrenRecursive")] + public bool? ExpandChildrenRecursive { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("path")] + public string? Path { get; set; } +#nullable restore +#else + [QueryParameter("path")] + public string Path { get; set; } +#endif + [QueryParameter("provenance")] + public bool? Provenance { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class QueryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/WithVersionItemRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/WithVersionItemRequestBuilder.cs new file mode 100644 index 00000000..2496bfba --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/Item/WithVersionItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx; +using ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.Versions.Item +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\versions\{versionId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersionItemRequestBuilder : BaseRequestBuilder + { + /// The downloadIfcx property + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx.DownloadIfcxRequestBuilder DownloadIfcx + { + get => new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.DownloadIfcx.DownloadIfcxRequestBuilder(PathParameters, RequestAdapter); + } + /// The query property + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query.QueryRequestBuilder Query + { + get => new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.Query.QueryRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithVersionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithVersionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.LayerVersion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersionItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsPostRequestBody.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsPostRequestBody.cs new file mode 100644 index 00000000..dbef51c2 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsPostRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.Versions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VersionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.CreateLayerVersionCommand? Version { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.CreateLayerVersionCommand Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VersionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "version", n => { Version = n.GetObjectValue(global::ApiSdk.Models.CreateLayerVersionCommand.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsRequestBuilder.cs new file mode 100644 index 00000000..b993bca4 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Layers.Item.Versions.Item; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item.Versions +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId}\versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the ApiSdk.ifcxApi.layers.item.versions.item collection + /// Unique identifier of the item + /// A + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("versionId", position); + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the ApiSdk.ifcxApi.layers.item.versions.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("versionId", position); + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.Item.WithVersionItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}/versions", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::ApiSdk.Models.CreateLayerVersionCommand body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::ApiSdk.Models.CreateLayerVersionCommand body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.CreateLayerVersionResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.CreateLayerVersionCommand body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.CreateLayerVersionCommand body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerItemRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerItemRequestBuilder.cs new file mode 100644 index 00000000..b1f696b0 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerItemRequestBuilder.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl; +using ApiSdk.IfcxApi.Layers.Item.Versions; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers.Item +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers\{layerId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLayerItemRequestBuilder : BaseRequestBuilder + { + /// The uploadIfcxBlobUrl property + public global::ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl.UploadIfcxBlobUrlRequestBuilder UploadIfcxBlobUrl + { + get => new global::ApiSdk.IfcxApi.Layers.Item.UploadIfcxBlobUrl.UploadIfcxBlobUrlRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsRequestBuilder Versions + { + get => new global::ApiSdk.IfcxApi.Layers.Item.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithLayerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithLayerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers/{layerId}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::ApiSdk.Models.LayerDetails.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLayerItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLayerItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerPutRequestBody.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerPutRequestBody.cs new file mode 100644 index 00000000..ea8cb235 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/Item/WithLayerPutRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.IfcxApi.Layers.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithLayerPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.UpdateLayerCommand? Version { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.UpdateLayerCommand Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithLayerPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.IfcxApi.Layers.Item.WithLayerPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.IfcxApi.Layers.Item.WithLayerPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "version", n => { Version = n.GetObjectValue(global::ApiSdk.Models.UpdateLayerCommand.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersPostRequestBody.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersPostRequestBody.cs new file mode 100644 index 00000000..a1821849 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersPostRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.IfcxApi.Layers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.CreateLayerCommand? Version { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.CreateLayerCommand Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LayersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.IfcxApi.Layers.LayersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.IfcxApi.Layers.LayersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "version", n => { Version = n.GetObjectValue(global::ApiSdk.Models.CreateLayerCommand.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersRequestBuilder.cs new file mode 100644 index 00000000..a2683990 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Layers/LayersRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Layers.Item; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Layers +{ + /// + /// Builds and executes requests for operations under \ifcx-api\layers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LayersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the ApiSdk.ifcxApi.layers.item collection + /// Unique identifier of the item + /// A + public global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("layerId", position); + return new global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the ApiSdk.ifcxApi.layers.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("layerId", position); + return new global::ApiSdk.IfcxApi.Layers.Item.WithLayerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LayersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LayersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/layers", rawUrl) + { + } + /// A List<global::ApiSdk.Models.LayerStatus> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::ApiSdk.Models.LayerStatus.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::ApiSdk.Models.CreateLayerCommand body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::ApiSdk.Models.CreateLayerCommand body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.CreateLayerCommand body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.CreateLayerCommand body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Layers.LayersRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Layers.LayersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LayersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LayersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/Item/WithBlobItemRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/Item/WithBlobItemRequestBuilder.cs new file mode 100644 index 00000000..ca3bb844 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/Item/WithBlobItemRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.IfcxApi.Upload.Item +{ + /// + /// Builds and executes requests for operations under \ifcx-api\upload\{blobId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBlobItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBlobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/upload/{blobId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBlobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/upload/{blobId}", rawUrl) + { + } + /// A + /// Binary request body + /// Cancellation token to use when cancelling requests + /// The request body content type. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Stream body, string contentType, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); + var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Binary request body + /// The request body content type. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetStreamContent(body, contentType); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder WithUrl(string rawUrl) + { + return new global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBlobItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/UploadRequestBuilder.cs b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/UploadRequestBuilder.cs new file mode 100644 index 00000000..2afd36a7 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/IfcxApi/Upload/UploadRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using ApiSdk.IfcxApi.Upload.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace ApiSdk.IfcxApi.Upload +{ + /// + /// Builds and executes requests for operations under \ifcx-api\upload + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UploadRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the ApiSdk.ifcxApi.upload.item collection + /// Unique identifier of the item + /// A + public global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("blobId", position); + return new global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the ApiSdk.ifcxApi.upload.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("blobId", position); + return new global::ApiSdk.IfcxApi.Upload.Item.WithBlobItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/upload", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ifcx-api/upload", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/BlobResponse.cs b/sdk/cs/ifcx-sdk/api-client/Models/BlobResponse.cs new file mode 100644 index 00000000..724f70cb --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/BlobResponse.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BlobResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The blobId property + public Guid? BlobId { get; set; } + /// The putURL property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PutURL { get; set; } +#nullable restore +#else + public string PutURL { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BlobResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.BlobResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.BlobResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blobId", n => { BlobId = n.GetGuidValue(); } }, + { "putURL", n => { PutURL = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteGuidValue("blobId", BlobId); + writer.WriteStringValue("putURL", PutURL); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerCommand.cs b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerCommand.cs new file mode 100644 index 00000000..954bf460 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerCommand.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CreateLayerCommand : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public Guid? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CreateLayerCommand() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.CreateLayerCommand CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CreateLayerCommand(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetGuidValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteGuidValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionCommand.cs b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionCommand.cs new file mode 100644 index 00000000..a0022b77 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionCommand.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CreateLayerVersionCommand : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The blobId property + public Guid? BlobId { get; set; } + /// The id property + public Guid? Id { get; set; } + /// The previousLayerVersionId property + public Guid? PreviousLayerVersionId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CreateLayerVersionCommand() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.CreateLayerVersionCommand CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CreateLayerVersionCommand(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blobId", n => { BlobId = n.GetGuidValue(); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "previousLayerVersionId", n => { PreviousLayerVersionId = n.GetGuidValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteGuidValue("blobId", BlobId); + writer.WriteGuidValue("id", Id); + writer.WriteGuidValue("previousLayerVersionId", PreviousLayerVersionId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponse.cs b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponse.cs new file mode 100644 index 00000000..22187319 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponse.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CreateLayerVersionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The state property + public global::ApiSdk.Models.CreateLayerVersionResponseState? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CreateLayerVersionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.CreateLayerVersionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CreateLayerVersionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponseState.cs b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponseState.cs new file mode 100644 index 00000000..9b1a5059 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/CreateLayerVersionResponseState.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CreateLayerVersionResponseState + #pragma warning restore CS1591 + { + [EnumMember(Value = "OK")] + #pragma warning disable CS1591 + OK, + #pragma warning restore CS1591 + [EnumMember(Value = "OUT_OF_DATE")] + #pragma warning disable CS1591 + OUT_OF_DATE, + #pragma warning restore CS1591 + } +} diff --git a/sdk/cs/ifcx-sdk/api-client/Models/IfcxFileDownloadType.cs b/sdk/cs/ifcx-sdk/api-client/Models/IfcxFileDownloadType.cs new file mode 100644 index 00000000..741985c8 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/IfcxFileDownloadType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum IfcxFileDownloadType + #pragma warning restore CS1591 + { + [EnumMember(Value = "just_this_version")] + #pragma warning disable CS1591 + Just_this_version, + #pragma warning restore CS1591 + [EnumMember(Value = "whole_layer_history_intact")] + #pragma warning disable CS1591 + Whole_layer_history_intact, + #pragma warning restore CS1591 + [EnumMember(Value = "whole_layer_history_condensed")] + #pragma warning disable CS1591 + Whole_layer_history_condensed, + #pragma warning restore CS1591 + [EnumMember(Value = "whole_layer_and_imports_history_condensed")] + #pragma warning disable CS1591 + Whole_layer_and_imports_history_condensed, + #pragma warning restore CS1591 + } +} diff --git a/sdk/cs/ifcx-sdk/api-client/Models/IfcxProvenanceData.cs b/sdk/cs/ifcx-sdk/api-client/Models/IfcxProvenanceData.cs new file mode 100644 index 00000000..3df5c46e --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/IfcxProvenanceData.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IfcxProvenanceData : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The application property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Application { get; set; } +#nullable restore +#else + public string Application { get; set; } +#endif + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Author { get; set; } +#nullable restore +#else + public string Author { get; set; } +#endif + /// The timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Timestamp { get; set; } +#nullable restore +#else + public string Timestamp { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IfcxProvenanceData() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.IfcxProvenanceData CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.IfcxProvenanceData(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "application", n => { Application = n.GetStringValue(); } }, + { "author", n => { Author = n.GetStringValue(); } }, + { "timestamp", n => { Timestamp = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("application", Application); + writer.WriteStringValue("author", Author); + writer.WriteStringValue("timestamp", Timestamp); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/LayerDetails.cs b/sdk/cs/ifcx-sdk/api-client/Models/LayerDetails.cs new file mode 100644 index 00000000..abf90e8a --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/LayerDetails.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayerDetails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The history property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? History { get; set; } +#nullable restore +#else + public List History { get; set; } +#endif + /// The id property + public Guid? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LayerDetails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.LayerDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.LayerDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "history", n => { History = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LayerVersion.CreateFromDiscriminatorValue)?.AsList(); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("history", History); + writer.WriteGuidValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/LayerHistory.cs b/sdk/cs/ifcx-sdk/api-client/Models/LayerHistory.cs new file mode 100644 index 00000000..eca525fe --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/LayerHistory.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayerHistory : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The versions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Versions { get; set; } +#nullable restore +#else + public List Versions { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LayerHistory() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.LayerHistory CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.LayerHistory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "versions", n => { Versions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteCollectionOfPrimitiveValues("versions", Versions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/LayerStatus.cs b/sdk/cs/ifcx-sdk/api-client/Models/LayerStatus.cs new file mode 100644 index 00000000..ee872bb8 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/LayerStatus.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayerStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public Guid? Id { get; set; } + /// The latestVersion property + public Guid? LatestVersion { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LayerStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.LayerStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.LayerStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetGuidValue(); } }, + { "latestVersion", n => { LatestVersion = n.GetGuidValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteGuidValue("id", Id); + writer.WriteGuidValue("latestVersion", LatestVersion); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/LayerVersion.cs b/sdk/cs/ifcx-sdk/api-client/Models/LayerVersion.cs new file mode 100644 index 00000000..6257149d --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/LayerVersion.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayerVersion : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The layerId property + public Guid? LayerId { get; set; } + /// The previousVersionId property + public Guid? PreviousVersionId { get; set; } + /// The provenance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.IfcxProvenanceData? Provenance { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.IfcxProvenanceData Provenance { get; set; } +#endif + /// The versionId property + public Guid? VersionId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LayerVersion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.LayerVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.LayerVersion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "layerId", n => { LayerId = n.GetGuidValue(); } }, + { "previousVersionId", n => { PreviousVersionId = n.GetGuidValue(); } }, + { "provenance", n => { Provenance = n.GetObjectValue(global::ApiSdk.Models.IfcxProvenanceData.CreateFromDiscriminatorValue); } }, + { "versionId", n => { VersionId = n.GetGuidValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteGuidValue("layerId", LayerId); + writer.WriteGuidValue("previousVersionId", PreviousVersionId); + writer.WriteObjectValue("provenance", Provenance); + writer.WriteGuidValue("versionId", VersionId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/LayerVersionIfcxFile.cs b/sdk/cs/ifcx-sdk/api-client/Models/LayerVersionIfcxFile.cs new file mode 100644 index 00000000..a407dcb8 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/LayerVersionIfcxFile.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LayerVersionIfcxFile : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The blobUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobUrl { get; set; } +#nullable restore +#else + public string BlobUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LayerVersionIfcxFile() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.LayerVersionIfcxFile CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.LayerVersionIfcxFile(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blobUrl", n => { BlobUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("blobUrl", BlobUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/Models/UpdateLayerCommand.cs b/sdk/cs/ifcx-sdk/api-client/Models/UpdateLayerCommand.cs new file mode 100644 index 00000000..5f3a441b --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/Models/UpdateLayerCommand.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UpdateLayerCommand : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UpdateLayerCommand() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.UpdateLayerCommand CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UpdateLayerCommand(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/sdk/cs/ifcx-sdk/api-client/kiota-lock.json b/sdk/cs/ifcx-sdk/api-client/kiota-lock.json new file mode 100644 index 00000000..11b9ce19 --- /dev/null +++ b/sdk/cs/ifcx-sdk/api-client/kiota-lock.json @@ -0,0 +1,34 @@ +{ + "descriptionHash": "7D76D26E014CCB63502D64EF36EBFFC31FB5F70CF07B8CEB714EACE1C0FBEA2074D9183C35DF984CBFDACE96BDA48ABD785DDF7F5BB23C79A389612D5782051E", + "descriptionLocation": "../../../../standard/api/openapi.json", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.30.0", + "clientClassName": "ApiClient", + "typeAccessModifier": "Public", + "clientNamespaceName": "ApiSdk", + "language": "CSharp", + "usesBackingStore": false, + "excludeBackwardCompatible": false, + "includeAdditionalData": true, + "disableSSLValidation": false, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/sdk/cs/ifcx-sdk/ifcx-sdk.csproj b/sdk/cs/ifcx-sdk/ifcx-sdk.csproj new file mode 100644 index 00000000..cea4c024 --- /dev/null +++ b/sdk/cs/ifcx-sdk/ifcx-sdk.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + ifcx_sdk + enable + enable + + + + + + + + + + + + + diff --git a/sdk/cs/ifcx-test/IfcxSDKTest.cs b/sdk/cs/ifcx-test/IfcxSDKTest.cs new file mode 100644 index 00000000..325ddebb --- /dev/null +++ b/sdk/cs/ifcx-test/IfcxSDKTest.cs @@ -0,0 +1,143 @@ +using examples_ifc5_mycomponent; +using ifcx_sdk; +using QuickType; + +namespace ifcx_test +{ + public class IfcxSDKTest + { + private ChildElement MakeChild(Opinion o, string name, string value) + { + var c = new ChildElement(); + + c.Opinion = o; + c.Name = name; + c.Value = value; + + return c; + } + + private IfcxFile GenTestFile(string versionId, ChildElement? child) + { + var returnValue = new IfcxFile(); + + var node = new NodeElement(); + node.Path = "path"; + node.Children = new(); + node.Inherits = new(); + node.Attributes = new(); + + if (child != null) + { + node.Children.Add(child); + } + + var section = new SectionElement(); + section.Header = new(); + section.Header.Id = versionId; + section.Nodes = new List(); + section.Nodes.Add(node); + + returnValue.AddSection(section); + + return returnValue; + } + + [Fact] + public void LoadFile() + { + Console.WriteLine("Hello, World!"); + + byte[] bytes = File.ReadAllBytes("./../../../../../server/cs/Test/data/example.ifcx"); + + MemoryStream memoryStream = new MemoryStream(bytes); + + var file = IfcxFile.ReadIfcxFile(memoryStream); + + var comp = file.ReadComponent(Mycomponent.Identity(), 1); + + Assert.Equal("Bob", comp.FirstName); + } + + [Fact] + public void DiffFiles_WithNewValue_ReturnsOpinionValue() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", MakeChild(Opinion.Value, "child", "child2")); + + var result = IfcxFileOperations.DiffFiles(oldFile, newFile, false); + + Assert.NotEmpty(result.Nodes); + Assert.Equal("path", result.Nodes[0].Path); + Assert.Equal("child", result.Nodes[0].Children[0].Name); + Assert.Equal("child2", result.Nodes[0].Children[0].Value); + Assert.Equal(Opinion.Value, result.Nodes[0].Children[0].Opinion); + + + } + + [Fact] + public void DiffFiles_WithSameValue_ReturnsNoChange() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", MakeChild(Opinion.Value, "child", "child1")); + + var result = IfcxFileOperations.DiffFiles(oldFile, newFile, false); + + Assert.Empty(result.Nodes); + } + + [Fact] + public void DiffFiles_WithoutNewValue_ReturnsOpinionDelete() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", null); + + var result = IfcxFileOperations.DiffFiles(oldFile, newFile, true); + + Assert.NotEmpty(result.Nodes); + Assert.Equal("path", result.Nodes[0].Path); + Assert.Equal("child", result.Nodes[0].Children[0].Name); + Assert.Equal(Opinion.Delete, result.Nodes[0].Children[0].Opinion); + } + + [Fact] + public void FederateWithoutHistory_WithMultipleNames_CombinesData() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", MakeChild(Opinion.Value, "child2", "child2")); + + var result = IfcxFileOperations.Federate(oldFile, newFile, false); + + Assert.Equal(2, result.index.Sections.Count); + } + + [Fact] + public void FederateWithoutHistory_WithSameName_OverwritesData() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", MakeChild(Opinion.Value, "child", "child2")); + + var result = IfcxFileOperations.Federate(oldFile, newFile, false); + + Assert.Equal(1, result.index.Sections.Count); + Assert.Equal("child2", result.index.Sections[0].Nodes[0].Children.First().Value); + Assert.Equal("v2", result.index.Sections[0].Header.Id); + } + + [Fact] + public void FederateWithHistory_WithSameName_KeepsHistory() + { + IfcxFile oldFile = GenTestFile("v1", MakeChild(Opinion.Value, "child", "child1")); + IfcxFile newFile = GenTestFile("v2", MakeChild(Opinion.Value, "child", "child2")); + + var result = IfcxFileOperations.Federate(oldFile, newFile, true); + + Assert.Equal(2, result.index.Sections.Count); + Assert.Equal("child1", result.index.Sections[0].Nodes[0].Children.First().Value); + Assert.Equal("v1", result.index.Sections[0].Header.Id); + Assert.Equal("child2", result.index.Sections[1].Nodes[0].Children.First().Value); + Assert.Equal("v2", result.index.Sections[1].Header.Id); + } + } +} \ No newline at end of file diff --git a/sdk/cs/ifcx-test/ifcx-test.csproj b/sdk/cs/ifcx-test/ifcx-test.csproj new file mode 100644 index 00000000..bc87300d --- /dev/null +++ b/sdk/cs/ifcx-test/ifcx-test.csproj @@ -0,0 +1,28 @@ + + + + net8.0 + ifcx_test + enable + enable + + false + true + + + + + + + + + + + + + + + + + + diff --git a/sdk/cs/ifcx-test/mycomponent.cs b/sdk/cs/ifcx-test/mycomponent.cs new file mode 100644 index 00000000..e84aa92d --- /dev/null +++ b/sdk/cs/ifcx-test/mycomponent.cs @@ -0,0 +1,196 @@ +// +// +// To parse this JSON data, add NuGet 'System.Text.Json' then do: +// +// using examples_ifc5_mycomponent; +// +// var mycomponent = Mycomponent.FromJson(jsonString); +#nullable enable +#pragma warning disable CS8618 +#pragma warning disable CS8601 +#pragma warning disable CS8603 + +namespace examples_ifc5_mycomponent +{ + using System; + using System.Collections.Generic; + + using System.Text.Json; + using System.Text.Json.Serialization; + using System.Globalization; + + public partial class Mycomponent + { + /// + /// Age in years which must be equal to or greater than zero. + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("age")] + public long? Age { get; set; } + + /// + /// The person's first name. + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("firstName")] + public string FirstName { get; set; } + + /// + /// The person's last name. + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("lastName")] + public string LastName { get; set; } + } + + public partial class Mycomponent + { + public static Mycomponent FromJson(string json) => JsonSerializer.Deserialize(json, examples_ifc5_mycomponent.Converter.Settings); + } + + public static class Serialize + { + public static string ToJson(this Mycomponent self) => JsonSerializer.Serialize(self, examples_ifc5_mycomponent.Converter.Settings); + } + + internal static class Converter + { + public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General) + { + Converters = + { + new DateOnlyConverter(), + new TimeOnlyConverter(), + IsoDateTimeOffsetConverter.Singleton + }, + }; + } + + public class DateOnlyConverter : JsonConverter + { + private readonly string serializationFormat; + public DateOnlyConverter() : this(null) { } + + public DateOnlyConverter(string? serializationFormat) + { + this.serializationFormat = serializationFormat ?? "yyyy-MM-dd"; + } + + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + return DateOnly.Parse(value!); + } + + public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options) + => writer.WriteStringValue(value.ToString(serializationFormat)); + } + + public class TimeOnlyConverter : JsonConverter + { + private readonly string serializationFormat; + + public TimeOnlyConverter() : this(null) { } + + public TimeOnlyConverter(string? serializationFormat) + { + this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff"; + } + + public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var value = reader.GetString(); + return TimeOnly.Parse(value!); + } + + public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options) + => writer.WriteStringValue(value.ToString(serializationFormat)); + } + + internal class IsoDateTimeOffsetConverter : JsonConverter + { + public override bool CanConvert(Type t) => t == typeof(DateTimeOffset); + + private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + + private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind; + private string? _dateTimeFormat; + private CultureInfo? _culture; + + public DateTimeStyles DateTimeStyles + { + get => _dateTimeStyles; + set => _dateTimeStyles = value; + } + + public string? DateTimeFormat + { + get => _dateTimeFormat ?? string.Empty; + set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value; + } + + public CultureInfo Culture + { + get => _culture ?? CultureInfo.CurrentCulture; + set => _culture = value; + } + + public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) + { + string text; + + + if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal + || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal) + { + value = value.ToUniversalTime(); + } + + text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture); + + writer.WriteStringValue(text); + } + + public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? dateText = reader.GetString(); + + if (string.IsNullOrEmpty(dateText) == false) + { + if (!string.IsNullOrEmpty(_dateTimeFormat)) + { + return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles); + } + else + { + return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles); + } + } + else + { + return default(DateTimeOffset); + } + } + + + public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter(); + } +} +#pragma warning restore CS8618 +#pragma warning restore CS8601 +#pragma warning restore CS8603 + +// start insert +namespace examples_ifc5_mycomponent { + partial class Mycomponent { + public static ifcx_sdk.IfcxIdentity Identity() { + return new ifcx_sdk.IfcxIdentity { + typeID = "examples::ifc5::mycomponent", + originSchemaSrc = "{\r\n \"$id\": \"https://example.com/person.schema.json\",\r\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n \"x-ifc5-id\": \"examples::ifc5::mycomponent\",\r\n \"title\": \"Person\",\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"firstName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The person's first name.\"\r\n },\r\n \"lastName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The person's last name.\"\r\n },\r\n \"age\": {\r\n \"description\": \"Age in years which must be equal to or greater than zero.\",\r\n \"type\": \"integer\",\r\n \"minimum\": 0\r\n }\r\n }\r\n}", + fromJSONString = str => Mycomponent.FromJson(str), + toJSONString = obj => Serialize.ToJson(obj) + }; + } + } +} +// end insert \ No newline at end of file diff --git a/sdk/cs/ifcx-test/mycomponent.schema.json b/sdk/cs/ifcx-test/mycomponent.schema.json new file mode 100644 index 00000000..6b62cbf7 --- /dev/null +++ b/sdk/cs/ifcx-test/mycomponent.schema.json @@ -0,0 +1,22 @@ +{ + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "x-ifc5-id": "examples::ifc5::mycomponent", + "title": "Person", + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + }, + "age": { + "description": "Age in years which must be equal to or greater than zero.", + "type": "integer", + "minimum": 0 + } + } +} \ No newline at end of file diff --git a/sdk/ifcx-codegen.exe b/sdk/ifcx-codegen.exe new file mode 100644 index 00000000..9c4a5bb6 Binary files /dev/null and b/sdk/ifcx-codegen.exe differ diff --git a/sdk/kiota.exe b/sdk/kiota.exe new file mode 100644 index 00000000..16cef573 Binary files /dev/null and b/sdk/kiota.exe differ diff --git a/sdk/kiota_gen_api_client_libs.bat b/sdk/kiota_gen_api_client_libs.bat new file mode 100644 index 00000000..63d30e9c --- /dev/null +++ b/sdk/kiota_gen_api_client_libs.bat @@ -0,0 +1,2 @@ +kiota.exe generate -d ../standard/api/openapi.json -o ./ts/api-client -l TypeScript +kiota.exe generate -d ../standard/api/openapi.json -o ./cs/ifcx-sdk/api-client -l CSharp \ No newline at end of file diff --git a/sdk/ogc_gen_server_stub.bat b/sdk/ogc_gen_server_stub.bat new file mode 100644 index 00000000..15b07514 --- /dev/null +++ b/sdk/ogc_gen_server_stub.bat @@ -0,0 +1,3 @@ +java -jar openapi-generator-cli.jar generate -g aspnetcore -i ../standard/api/openapi.json -o ./server/cs/api --additional-properties=useNewtonsoft=false --additional-properties=packageName=IfcxApi.Server --additional-properties=generateBody=false --additional-properties=operationModifier=abstract --additional-properties=classModifier=abstract --additional-properties=enumValueSuffix= + +powershell -Command "$file = '.\server\cs\api\src\IfcxApi.Server\Controllers\DefaultApi.cs'; $content = Get-Content $file -Raw; $content = $content -replace 'using System.ComponentModel.DataAnnotations;', \"using System.ComponentModel.DataAnnotations;`r`nusing System.Threading.Tasks;\"; $content = $content -replace 'public abstract IActionResult', 'public abstract Task'; Set-Content $file $content" diff --git a/sdk/openapi-generator-cli.jar b/sdk/openapi-generator-cli.jar new file mode 100644 index 00000000..26662ec3 Binary files /dev/null and b/sdk/openapi-generator-cli.jar differ diff --git a/sdk/server/cs/.gitignore b/sdk/server/cs/.gitignore new file mode 100644 index 00000000..b16cb4a1 --- /dev/null +++ b/sdk/server/cs/.gitignore @@ -0,0 +1,4 @@ +**/.vs +**/bin +**/obj +api/IfcxApi.Server.sln \ No newline at end of file diff --git a/sdk/server/cs/ApiController.cs b/sdk/server/cs/ApiController.cs new file mode 100644 index 00000000..64a887a1 --- /dev/null +++ b/sdk/server/cs/ApiController.cs @@ -0,0 +1,138 @@ +using IfcxApi.Server.Controllers; +using IfcxApi.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Optional.Unsafe; +using System; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Threading.Tasks; + +namespace Application +{ + public class ApiController : DefaultApiController + { + public static LayerService layerService = new LayerService(new InMemoryFileSystem(), "::in_mem"); + + + public override async Task LayerRoutesDeleteLayer([FromRoute(Name = "layerId"), Required] Guid layerId) + { + await layerService.DeleteLayerAsync(layerId); + return Ok(); + } + + public override async Task LayerRoutesGetLayer([FromRoute(Name = "layerId"), Required] Guid layerId) + { + var layerOpt = await layerService.GetLayerAsync(layerId); + + if (!layerOpt.HasValue) return NotFound(); + + var layer = layerOpt.ValueOrDefault(); + + LayerDetails layerDetails = new LayerDetails(); + layerDetails.Id = layerId; + layerDetails.Name = layer.name; + layerDetails.History = layer.versions.Select(v => + { + var prov = new LayerVersion(); + prov.LayerId = v.layerId; + prov.VersionId = v.id; + prov.PreviousVersionId = v.previousVersionId; + prov.Provenance = new(); + prov.Provenance.Author = v.provenance.author; + prov.Provenance.Timestamp = v.provenance.timestamp; + prov.Provenance.Application = v.provenance.application; + + prov.Provenance.Author = v.provenance.author; + + return prov; + }).ToList(); + + return Ok(layerDetails); + } + + + public override Task LayerRoutesUploadIfcxBlobUrl([FromRoute(Name = "layerId"), Required] Guid layerId) + { + throw new NotImplementedException(); + } + + public override async Task LayersCreateLayer([FromBody] CreateLayerCommand createLayerCommand) + { + await layerService.CreateLayerAsync(createLayerCommand.Name, createLayerCommand.Id); + return Ok(); + } + + public override async Task LayersLayers() + { + var layers = await layerService.ListLayersAsync(); + + var response = layers.Select(layer => + { + var s = new LayerStatus(); + s.LatestVersion = layer.versions.Count == 0 ? Guid.Empty : layer.versions.Last().id; + s.Name = layer.name; + s.Id = layer.id; + return s; + }); + + return Ok(response); + } + + public override async Task LayerVersionRoutesGetLayerVersion([FromRoute(Name = "layerId"), Required] Guid layerId, [FromRoute(Name = "versionId"), Required] Guid versionId) + { + var layerOpt = await layerService.GetLayerAsync(layerId); + + if (!layerOpt.HasValue) return NotFound(); + + var layer = layerOpt.ValueOrDefault(); + + var v = layer.versions.FirstOrDefault(x => x.id == versionId); + if (v == null) + return NotFound(); + + var result = new LayerVersion(); + result.LayerId = v.layerId; + result.VersionId = v.id; + result.PreviousVersionId = v.previousVersionId; + result.Provenance = new(); + result.Provenance.Author = v.provenance.author; + result.Provenance.Timestamp = v.provenance.timestamp; + result.Provenance.Application = v.provenance.application; + + return Ok(result); + } + + public override Task LayerVersionRoutesLayerIfcx([FromRoute(Name = "layerId"), Required] Guid layerId, [FromRoute(Name = "versionId"), Required] Guid versionId, [FromQuery(Name = "downloadType"), Required] IfcxFileDownloadType downloadType) + { + throw new NotImplementedException(); + } + + public override Task LayerVersionRoutesQuery([FromRoute(Name = "layerId"), Required] Guid layerId, [FromRoute(Name = "versionId"), Required] Guid versionId, [FromQuery(Name = "path"), Required] string path, [FromQuery(Name = "provenance"), Required] bool provenance, [FromQuery(Name = "expandChildren"), Required] bool expandChildren, [FromQuery(Name = "expandChildrenRecursive"), Required] bool expandChildrenRecursive) + { + throw new NotImplementedException(); + } + + public override async Task Upload([FromRoute(Name = "blobId"), Required] Guid blobId, [FromBody] Stream body) + { + await layerService.UploadFileAsync(blobId, body); + return Ok(); + } + + public override async Task Download([FromRoute(Name = "blobId"), Required] Guid blobId) + { + var stream = await layerService.DownloadFileAsync(blobId); + return File(stream, "application/octet-stream"); + } + + public override async Task VersionsRoutesCreateLayerVersion([FromRoute(Name = "layerId"), Required] Guid layerId, [FromBody] CreateLayerVersionCommand createLayerVersionCommand) + { + var result = await layerService.CreateLayerVersionAsync(layerId, createLayerVersionCommand.Id, createLayerVersionCommand.PreviousLayerVersionId, createLayerVersionCommand.BlobId); + + var response = new CreateLayerVersionResponse(); + response.State = result == LayerService.CreateLayerVersionResponse.OUT_OF_DATE ? CreateLayerVersionResponseState.OUTOFDATE : CreateLayerVersionResponseState.OK; + + return Ok(response); + } + } +} diff --git a/sdk/server/cs/Application/Application.csproj b/sdk/server/cs/Application/Application.csproj new file mode 100644 index 00000000..667f77ff --- /dev/null +++ b/sdk/server/cs/Application/Application.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + diff --git a/sdk/server/cs/Application/FileSystem.cs b/sdk/server/cs/Application/FileSystem.cs new file mode 100644 index 00000000..26518f7a --- /dev/null +++ b/sdk/server/cs/Application/FileSystem.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Application +{ + public interface IFileSystem + { + public Task WriteFileAsync(string path, Stream s, CancellationToken cancellationToken = default); + public Task ReadFileAsync(string path, CancellationToken cancellationToken = default); + public Task ListFilesAsync(string path, CancellationToken cancellationToken = default); + public Task ExistsAsync(string path, CancellationToken cancellationToken = default); + public Task DeleteAsync(string path, CancellationToken cancellationToken = default); + } + + + public class InMemoryFileSystem : IFileSystem + { + private readonly ConcurrentDictionary _files = new(); + + public async Task WriteFileAsync(string path, Stream s, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + throw new ArgumentException("Path cannot be null or empty.", nameof(path)); + + if (s == null) + throw new ArgumentNullException(nameof(s)); + + using var ms = new MemoryStream(); + await s.CopyToAsync(ms, cancellationToken); + + _files[NormalizePath(path)] = ms.ToArray(); + } + + public Task ReadFileAsync(string path, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + throw new ArgumentException("Path cannot be null or empty.", nameof(path)); + + if (!_files.TryGetValue(NormalizePath(path), out var bytes)) + throw new FileNotFoundException($"File not found: {path}"); + + return Task.FromResult(new MemoryStream(bytes, writable: false)); + } + + public Task ListFilesAsync(string path, CancellationToken cancellationToken = default) + { + var prefix = NormalizeDirectoryPrefix(path); + + var result = _files.Keys + .Where(k => k.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) + .ToArray(); + + return Task.FromResult(result); + } + + public Task ExistsAsync(string path, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + return Task.FromResult(false); + + var normalized = NormalizePath(path); + + if (_files.ContainsKey(normalized)) + return Task.FromResult(true); + + var dirPrefix = NormalizeDirectoryPrefix(path); + return Task.FromResult(_files.Keys.Any(k => k.StartsWith(dirPrefix, StringComparison.OrdinalIgnoreCase))); + } + + public Task DeleteAsync(string path, CancellationToken cancellationToken = default) + { + var normalized = NormalizePath(path); + if (!_files.ContainsKey(normalized)) + throw new Exception($"Couldn't delete {path} it does not exist"); + + _files.TryRemove(normalized, out _); + return Task.CompletedTask; + } + + private static string NormalizePath(string path) + { + return path.Replace("\\", "/"); + } + + private static string NormalizeDirectoryPrefix(string path) + { + if (string.IsNullOrWhiteSpace(path)) + return string.Empty; + + var normalized = NormalizePath(path); + + return normalized.EndsWith("/") + ? normalized + : normalized + "/"; + } + } + + public class RealFileSystem : IFileSystem + { + public async Task WriteFileAsync(string path, Stream s, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + throw new ArgumentException("Path cannot be null or empty.", nameof(path)); + + if (s == null) + throw new ArgumentNullException(nameof(s)); + + var fullPath = Path.GetFullPath(path); + + var directory = Path.GetDirectoryName(fullPath); + if (!string.IsNullOrEmpty(directory)) + Directory.CreateDirectory(directory); + + await using var fileStream = new FileStream( + fullPath, + FileMode.Create, + FileAccess.Write, + FileShare.None, + bufferSize: 4096, + useAsync: true); + + await s.CopyToAsync(fileStream, cancellationToken); + } + + public Task ReadFileAsync(string path, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + throw new ArgumentException("Path cannot be null or empty.", nameof(path)); + + var fullPath = Path.GetFullPath(path); + + if (!File.Exists(fullPath)) + throw new FileNotFoundException($"File not found: {path}"); + + Stream stream = new FileStream( + fullPath, + FileMode.Open, + FileAccess.Read, + FileShare.Read, + bufferSize: 4096, + useAsync: true); + + return Task.FromResult(stream); + } + + public Task ListFilesAsync(string path, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + return Task.FromResult(Array.Empty()); + + var fullPath = Path.GetFullPath(path); + + if (!Directory.Exists(fullPath)) + return Task.FromResult(Array.Empty()); + + return Task.FromResult(Directory.GetFiles(fullPath)); + } + + public Task ExistsAsync(string path, CancellationToken cancellationToken = default) + { + if (string.IsNullOrWhiteSpace(path)) + return Task.FromResult(false); + + var fullPath = Path.GetFullPath(path); + + return Task.FromResult(File.Exists(fullPath) || Directory.Exists(fullPath)); + } + + public Task DeleteAsync(string path, CancellationToken cancellationToken = default) + { + File.Delete(path); + return Task.CompletedTask; + } + } +} diff --git a/sdk/server/cs/Application/LayerService.cs b/sdk/server/cs/Application/LayerService.cs new file mode 100644 index 00000000..58f4c995 --- /dev/null +++ b/sdk/server/cs/Application/LayerService.cs @@ -0,0 +1,200 @@ +using Application.model; +using ifcx_sdk; +using Optional; +using Optional.Unsafe; +using QuickType; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace Application +{ + // @TODO: add layer repository + + public class LayerService + { + static string BLOB_PATH = "blobs"; + static string LAYERS_PATH = "layers"; + static string LAYER_LATEST_PATH= "layer_latest"; + static string LAYER_VERSION_DIFF_PATH = "layer_diff"; + + + IFileSystem fs; + string basePath = ""; + + public LayerService(IFileSystem fs, string basePath) + { + this.fs = fs; + this.basePath = basePath; + } + + public async Task DeleteLayerAsync(Guid layerId) + { + await this.fs.DeleteAsync(Path.Combine(basePath, LAYERS_PATH, layerId.ToString())); + } + + public Stream ToStream(T obj) + { + var text = JsonSerializer.Serialize(obj); + byte[] bytes = Encoding.UTF8.GetBytes(text); + return new MemoryStream(bytes); + } + + public async Task FromStreamAsync(Stream stream) + { + using var reader = new StreamReader(stream, Encoding.UTF8); + string text = await reader.ReadToEndAsync(); + return JsonSerializer.Deserialize(text); + } + + public async Task CreateLayerAsync(string name, Guid id) + { + Layer l = new Layer(name, id, new()); + await this.fs.WriteFileAsync(Path.Combine(this.basePath, LAYERS_PATH, id.ToString()), ToStream(l)); + } + + public enum CreateLayerVersionResponse + { + OK, + OUT_OF_DATE + } + public static async Task ToMemoryStreamAsync(Stream input) + { + var memory = new MemoryStream(); + await input.CopyToAsync(memory); + memory.Position = 0; // rewind + return memory; + } + + public async Task CreateLayerVersionAsync(Guid layerId, Guid id, Guid previousLayerVersionId, Guid blobId) + { + var layerOpt = (await this.GetLayerAsync(layerId)); + + if (!layerOpt.HasValue) + { + throw new Exception($"Layer {layerId} not found"); + } + + var layer = layerOpt.ValueOrDefault(); + + if (previousLayerVersionId != Guid.Empty) + { + if (layer.versions.Count == 0) + throw new Exception($"previousLayerVersionId specified but layer has no versions"); + + if (!layer.versions.Exists(x => x.id == previousLayerVersionId)) + throw new Exception($"previousLayerVersionId {previousLayerVersionId} not found"); + + if (layer.versions.Last().id != previousLayerVersionId) + return CreateLayerVersionResponse.OUT_OF_DATE; + } + + if (!await this.fs.ExistsAsync(Path.Combine(this.basePath, BLOB_PATH, blobId.ToString()))) + throw new Exception($"Blobid {blobId} not found"); + + var stream = await this.fs.ReadFileAsync(Path.Combine(this.basePath, BLOB_PATH, blobId.ToString())); + var memoryStream = new MemoryStream(); + await stream.CopyToAsync(memoryStream); + memoryStream.Position = 0; + var newIfcxFile = IfcxFile.ReadIfcxFile(memoryStream); + + if (newIfcxFile.index.Sections.Count == 0) + throw new Exception("Expected at least one data section in the IfcxFile"); + + var firstSection = newIfcxFile.index.Sections[0]; + var provenance = new LayerProvenance( + author: firstSection.Header.Author, + timestamp: firstSection.Header.Timestamp, + application: firstSection.Header.Application + ); + + LayerVersion layerVersion = new LayerVersion(id, layerId, previousLayerVersionId, blobId, provenance); + layer.versions.Add(layerVersion); + + var latestPath = Path.Combine(this.basePath, LAYER_LATEST_PATH, $"{layerId.ToString()}_latest"); + + if (await fs.ExistsAsync(latestPath)) + { + var currentFederatedBlob = await this.fs.ReadFileAsync(latestPath); + var currentFederatedIfcx = IfcxFile.ReadIfcxFile(await ToMemoryStreamAsync(currentFederatedBlob)); + var nextFederatedIfcx = IfcxFileOperations.Federate(currentFederatedIfcx, newIfcxFile, false); + var nextFederatedBlob = IfcxFile.WriteIfcxFile(nextFederatedIfcx); + await this.fs.WriteFileAsync(latestPath, new MemoryStream(nextFederatedBlob)); + } + else + { + // version is federated + var newFileBlob = IfcxFile.WriteIfcxFile(newIfcxFile); + await this.fs.WriteFileAsync(latestPath, new MemoryStream(newFileBlob)); + } + + await this.fs.WriteFileAsync(Path.Combine(this.basePath, LAYERS_PATH, layerId.ToString()), ToStream(layer)); + await this.fs.WriteFileAsync(Path.Combine(this.basePath, LAYER_VERSION_DIFF_PATH, $"{layerId.ToString()}_{firstSection.Header.Id}"), stream); + + return CreateLayerVersionResponse.OK; + } + + public async Task> GetLayerAsync(Guid id) + { + var path = Path.Combine(this.basePath, LAYERS_PATH, id.ToString()); + if (!(await this.fs.ExistsAsync(path))) + { + return Option.None(); + } + + var stream = await this.fs.ReadFileAsync(path); + return Option.Some(await FromStreamAsync(stream)); + } + + public async Task> ListLayersAsync() + { + var files = await this.fs.ListFilesAsync(Path.Combine(this.basePath, LAYERS_PATH)); + + var layers = new List(); + foreach (var file in files) + { + var stream = await this.fs.ReadFileAsync(file); + layers.Add(await FromStreamAsync(stream)); + } + return layers; + } + + public async Task UploadFileAsync(Guid blobId, Stream file) + { + await this.fs.WriteFileAsync(Path.Combine(this.basePath, BLOB_PATH, blobId.ToString()), file); + } + + public async Task> Query(Guid layerId, Guid versionId, string path) + { + if (versionId == Guid.Empty) + { + var latestPath = Path.Combine(this.basePath, LAYER_LATEST_PATH, $"{layerId.ToString()}_latest"); + var versionFileBlob = await fs.ReadFileAsync(latestPath); + var ifcxFileLatest = IfcxFile.ReadIfcxFile(await ToMemoryStreamAsync(versionFileBlob)); + var nodes = IfcxFileOperations.CollapseNodesByPath(ifcxFileLatest); + + if (nodes.ContainsKey(path)) + { + return Option.Some(nodes[path]); + } + else + { + return Option.None(); + } + } + else + { + throw new Exception("Not implemented"); + } + } + + public async Task DownloadFileAsync(Guid blobId) + { + return await this.fs.ReadFileAsync(Path.Combine(this.basePath, BLOB_PATH, blobId.ToString())); + } + } +} diff --git a/sdk/server/cs/Application/model/Layer.cs b/sdk/server/cs/Application/model/Layer.cs new file mode 100644 index 00000000..4969ace7 --- /dev/null +++ b/sdk/server/cs/Application/model/Layer.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Application.model +{ + public record LayerProvenance + ( + string author, + string timestamp, + string application + ); + + + public record LayerVersion + ( + Guid id, + Guid layerId, + Guid previousVersionId, + Guid uploadedBlobId, + LayerProvenance provenance + ); + + + public record Layer + ( + string name, + Guid id, + List versions + ); +} diff --git a/sdk/server/cs/IfcxApi.Server.sln b/sdk/server/cs/IfcxApi.Server.sln new file mode 100644 index 00000000..fccb5d34 --- /dev/null +++ b/sdk/server/cs/IfcxApi.Server.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35919.96 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IfcxApi.Server", "api\src\IfcxApi.Server\IfcxApi.Server.csproj", "{EAF30A80-D530-4A07-ACE0-2CFE4A61374B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{A341E45F-3E26-47B4-B715-547A1BC0B9E7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ifcx-sdk", "..\..\cs\ifcx-sdk\ifcx-sdk.csproj", "{7C952AFB-D1A5-AAFA-E1B8-77662166A87C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{1C05A71C-145C-4D84-B964-A211084CD413}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EAF30A80-D530-4A07-ACE0-2CFE4A61374B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAF30A80-D530-4A07-ACE0-2CFE4A61374B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAF30A80-D530-4A07-ACE0-2CFE4A61374B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAF30A80-D530-4A07-ACE0-2CFE4A61374B}.Release|Any CPU.Build.0 = Release|Any CPU + {A341E45F-3E26-47B4-B715-547A1BC0B9E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A341E45F-3E26-47B4-B715-547A1BC0B9E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A341E45F-3E26-47B4-B715-547A1BC0B9E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A341E45F-3E26-47B4-B715-547A1BC0B9E7}.Release|Any CPU.Build.0 = Release|Any CPU + {7C952AFB-D1A5-AAFA-E1B8-77662166A87C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C952AFB-D1A5-AAFA-E1B8-77662166A87C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C952AFB-D1A5-AAFA-E1B8-77662166A87C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C952AFB-D1A5-AAFA-E1B8-77662166A87C}.Release|Any CPU.Build.0 = Release|Any CPU + {1C05A71C-145C-4D84-B964-A211084CD413}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C05A71C-145C-4D84-B964-A211084CD413}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C05A71C-145C-4D84-B964-A211084CD413}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C05A71C-145C-4D84-B964-A211084CD413}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {627703D3-1613-41B5-B01E-7F32ABFBB0BF} + EndGlobalSection +EndGlobal diff --git a/sdk/server/cs/Test/ApiBridge.cs b/sdk/server/cs/Test/ApiBridge.cs new file mode 100644 index 00000000..1d9e4086 --- /dev/null +++ b/sdk/server/cs/Test/ApiBridge.cs @@ -0,0 +1,87 @@ +using ApiSdk.Models; +using Application; +using ifcx_sdk; +using Microsoft.AspNetCore.Mvc; +using Optional; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace Test +{ + public class ApiBridge : IIfcxApiConnection + { + ApiController controller; + + private static readonly JsonSerializerOptions _options = new JsonSerializerOptions + { + Converters = { new EnumMemberConverterFactory() } + }; + + public ApiBridge(ApiController controller) + { + this.controller = controller; + } + + public async Task CreateLayer(ApiSdk.Models.CreateLayerCommand clientCmd) + { + var serverCmd = JsonSerializer.Deserialize(JsonSerializer.Serialize(clientCmd)); + await this.controller.LayersCreateLayer(serverCmd); + } + + public async Task DeleteLayer(Guid layerId) + { + await this.controller.LayerRoutesDeleteLayer(layerId); + } + + public async Task> GetLayer(Guid layerId) + { + var result = await this.controller.LayerRoutesGetLayer(layerId); + if (result == null) + { + return Option.None(); + } + var ok = (OkObjectResult)result; + return Option.Some(JsonSerializer.Deserialize(JsonSerializer.Serialize(ok.Value))); + } + + public async Task> ListLayers() + { + var result = await this.controller.LayersLayers(); + var ok = (OkObjectResult)result; + return JsonSerializer.Deserialize>(JsonSerializer.Serialize(ok.Value)); + } + + public async Task GetLayerVersion(Guid layerId, Guid versionId) + { + var result = await this.controller.LayerVersionRoutesGetLayerVersion(layerId, versionId); + var ok = (OkObjectResult)result; + return JsonSerializer.Deserialize(JsonSerializer.Serialize(ok.Value)); + } + + public async Task Upload(Guid blobId, Stream body) + { + await this.controller.Upload(blobId, body); + } + + public async Task Download(Guid blobId) + { + var result = await this.controller.Download(blobId); + var fileResult = (FileStreamResult)result; + return fileResult.FileStream; + } + + public async Task CreateLayerVersion(Guid layerId, ApiSdk.Models.CreateLayerVersionCommand clientCmd) + { + var serverCmd = JsonSerializer.Deserialize(JsonSerializer.Serialize(clientCmd)); + var result = await this.controller.VersionsRoutesCreateLayerVersion(layerId, serverCmd); + var ok = (OkObjectResult)result; + var temp = JsonSerializer.Serialize(ok.Value, _options); + return JsonSerializer.Deserialize(temp, _options); + } + } +} diff --git a/sdk/server/cs/Test/ApiBridgeTest.cs b/sdk/server/cs/Test/ApiBridgeTest.cs new file mode 100644 index 00000000..44e12c06 --- /dev/null +++ b/sdk/server/cs/Test/ApiBridgeTest.cs @@ -0,0 +1,128 @@ +using ApiSdk.Models; +using Application; +using Optional.Unsafe; +using System; +using System.IO; +using System.Threading.Tasks; + +namespace Test +{ + public class ApiBridgeTest + { + [Fact] + public async Task TestClientServerBridgeCreateLayer() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "my layer" }); + + var layer = await ApiController.layerService.GetLayerAsync(layerId); + + Assert.NotNull(layer); + } + + [Fact] + public async Task TestClientServerBridgeDeleteLayer() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "my layer" }); + await bridge.DeleteLayer(layerId); + + var layerOpt = await ApiController.layerService.GetLayerAsync(layerId); + Assert.False(layerOpt.HasValue); + } + + [Fact] + public async Task TestClientServerBridgeGetLayer() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "my layer" }); + + var layerOpt = await bridge.GetLayer(layerId); + + Assert.True(layerOpt.HasValue); + var layer = layerOpt.ValueOrDefault(); + Assert.Equal(layerId, layer.Id); + Assert.Equal("my layer", layer.Name); + } + + [Fact] + public async Task TestClientServerBridgeListLayers() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "listed layer" }); + + var layers = await bridge.ListLayers(); + + Assert.NotNull(layers); + Assert.Contains(layers, l => l.Id == layerId && l.Name == "listed layer"); + } + + [Fact] + public async Task TestClientServerBridgeGetLayerVersion() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + var versionId = Guid.NewGuid(); + var blobId = Guid.NewGuid(); + + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "versioned layer" }); + + await using var stream = File.OpenRead("../../../data/example.ifcx"); + await bridge.Upload(blobId, stream); + + await bridge.CreateLayerVersion(layerId, new CreateLayerVersionCommand { Id = versionId, PreviousLayerVersionId = Guid.Empty, BlobId = blobId }); + + var version = await bridge.GetLayerVersion(layerId, versionId); + + Assert.NotNull(version); + Assert.Equal(versionId, version.VersionId); + Assert.Equal(layerId, version.LayerId); + } + + [Fact] + public async Task TestClientServerBridgeUploadAndDownload() + { + var bridge = new ApiBridge(new ApiController()); + + var blobId = Guid.NewGuid(); + var originalBytes = await File.ReadAllBytesAsync("../../../data/example.ifcx"); + + await bridge.Upload(blobId, new MemoryStream(originalBytes)); + + var downloadedStream = await bridge.Download(blobId); + using var ms = new MemoryStream(); + await downloadedStream.CopyToAsync(ms); + + Assert.Equal(originalBytes, ms.ToArray()); + } + + [Fact] + public async Task TestClientServerBridgeCreateLayerVersion() + { + var bridge = new ApiBridge(new ApiController()); + + var layerId = Guid.NewGuid(); + var versionId = Guid.NewGuid(); + var blobId = Guid.NewGuid(); + + await bridge.CreateLayer(new CreateLayerCommand { Id = layerId, Name = "versioned layer" }); + + await using var stream = File.OpenRead("../../../data/example.ifcx"); + await bridge.Upload(blobId, stream); + + var response = await bridge.CreateLayerVersion(layerId, new CreateLayerVersionCommand { Id = versionId, PreviousLayerVersionId = Guid.Empty, BlobId = blobId }); + + Assert.NotNull(response); + Assert.Equal(CreateLayerVersionResponseState.OK, response.State); + } + } +} diff --git a/sdk/server/cs/Test/ApiControllerTests.cs b/sdk/server/cs/Test/ApiControllerTests.cs new file mode 100644 index 00000000..cfb0efe4 --- /dev/null +++ b/sdk/server/cs/Test/ApiControllerTests.cs @@ -0,0 +1,142 @@ +using Application; +using IfcxApi.Server.Models; +using Microsoft.AspNetCore.Mvc; + +namespace Test; + +public class ApiControllerTests +{ + // NOTE: ApiController.layerService is static, so all instances share the same + // in-memory store. Tests use unique GUIDs to avoid cross-test interference. + + [Fact] + public async Task CreateLayer_ReturnsOk() + { + var controller = new ApiController(); + var cmd = new CreateLayerCommand { Id = Guid.NewGuid(), Name = "Test Layer" }; + + var result = await controller.LayersCreateLayer(cmd); + + Assert.IsType(result); + } + + [Fact] + public async Task ListLayers_ReturnsOkWithList() + { + var controller = new ApiController(); + var cmd = new CreateLayerCommand { Id = Guid.NewGuid(), Name = "Listed Layer" }; + await controller.LayersCreateLayer(cmd); + + var result = await controller.LayersLayers(); + + var ok = Assert.IsType(result); + Assert.NotNull(ok.Value); + } + + [Fact] + public async Task GetLayer_AfterCreate_ReturnsCorrectDetails() + { + var controller = new ApiController(); + var layerId = Guid.NewGuid(); + var cmd = new CreateLayerCommand { Id = layerId, Name = "My Layer" }; + await controller.LayersCreateLayer(cmd); + + var result = await controller.LayerRoutesGetLayer(layerId); + + var ok = Assert.IsType(result); + var details = Assert.IsType(ok.Value); + Assert.Equal(layerId, details.Id); + Assert.Equal("My Layer", details.Name); + Assert.Empty(details.History); + } + + [Fact] + public async Task DeleteLayer_RemovesLayer() + { + var controller = new ApiController(); + var layerId = Guid.NewGuid(); + await controller.LayersCreateLayer(new CreateLayerCommand { Id = layerId, Name = "To Delete" }); + + var result = await controller.LayerRoutesDeleteLayer(layerId); + + Assert.IsType(result); + } + + [Fact] + public async Task CreateLayerVersion_WithValidBlob_ReturnsOk() + { + var controller = new ApiController(); + var layerId = Guid.NewGuid(); + var blobId = Guid.NewGuid(); + var versionId = Guid.NewGuid(); + + await controller.LayersCreateLayer(new CreateLayerCommand { Id = layerId, Name = "Versioned Layer" }); + + await using var stream = File.OpenRead("../../../data/example.ifcx"); + await controller.Upload(blobId, stream); + + var cmd = new CreateLayerVersionCommand + { + Id = versionId, + PreviousLayerVersionId = Guid.Empty, + BlobId = blobId + }; + var result = await controller.VersionsRoutesCreateLayerVersion(layerId, cmd); + + var ok = Assert.IsType(result); + var response = Assert.IsType(ok.Value); + Assert.Equal(CreateLayerVersionResponseState.OK, response.State); + } + + [Fact] + public async Task CreateLayerVersion_OutOfDate_ReturnsOutOfDateState() + { + var controller = new ApiController(); + var layerId = Guid.NewGuid(); + var blobId = Guid.NewGuid(); + var version1Id = Guid.NewGuid(); + var version2Id = Guid.NewGuid(); + var staleVersionId = Guid.NewGuid(); + + await controller.LayersCreateLayer(new CreateLayerCommand { Id = layerId, Name = "OOD Layer" }); + + await using var stream1 = File.OpenRead("../../../data/example.ifcx"); + await controller.Upload(blobId, stream1); + + // Create first version + await controller.VersionsRoutesCreateLayerVersion(layerId, new CreateLayerVersionCommand + { + Id = version1Id, + PreviousLayerVersionId = Guid.Empty, + BlobId = blobId + }); + + // Create second version (advancing the head) + await using var stream2 = File.OpenRead("../../../data/example.ifcx"); + var blobId2 = Guid.NewGuid(); + await controller.Upload(blobId2, stream2); + + await controller.VersionsRoutesCreateLayerVersion(layerId, new CreateLayerVersionCommand + { + Id = version2Id, + PreviousLayerVersionId = version1Id, + BlobId = blobId2 + }); + + // Attempt to create a version based on stale previous (version1, not version2) + await using var stream3 = File.OpenRead("../../../data/example.ifcx"); + var blobId3 = Guid.NewGuid(); + await controller.Upload(blobId3, stream3); + + var result = await controller.VersionsRoutesCreateLayerVersion(layerId, new CreateLayerVersionCommand + { + Id = Guid.NewGuid(), + PreviousLayerVersionId = version1Id, + BlobId = blobId3 + }); + + var ok = Assert.IsType(result); + var response = Assert.IsType(ok.Value); + Assert.Equal(CreateLayerVersionResponseState.OUTOFDATE, response.State); + } +} diff --git a/sdk/server/cs/Test/EnumMemberConverter.cs b/sdk/server/cs/Test/EnumMemberConverter.cs new file mode 100644 index 00000000..5cc671db --- /dev/null +++ b/sdk/server/cs/Test/EnumMemberConverter.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Test +{ + /// + /// A JsonConverterFactory that creates EnumMemberConverter<T> instances for any enum type. + /// Reads [EnumMember(Value = "...")] attributes to determine the wire string for each member. + /// + public class EnumMemberConverterFactory : JsonConverterFactory + { + public override bool CanConvert(Type typeToConvert) => typeToConvert.IsEnum; + + public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) => + (JsonConverter)Activator.CreateInstance( + typeof(EnumMemberConverter<>).MakeGenericType(typeToConvert))!; + } + + /// + /// Serializes and deserializes an enum using [EnumMember(Value = "...")] wire names. + /// Falls back to the C# member name when no [EnumMember] attribute is present. + /// + public class EnumMemberConverter : JsonConverter where T : struct, Enum + { + private readonly Dictionary _toWire = new(); + private readonly Dictionary _fromWire = new(StringComparer.OrdinalIgnoreCase); + + public EnumMemberConverter() + { + foreach (var field in typeof(T).GetFields(BindingFlags.Public | BindingFlags.Static)) + { + var value = (T)field.GetValue(null)!; + var attr = field.GetCustomAttribute(); + var wire = attr?.Value ?? field.Name; + _toWire[value] = wire; + _fromWire[wire] = value; + } + } + + public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var str = reader.GetString(); + if (str != null && _fromWire.TryGetValue(str, out var value)) + return value; + throw new JsonException($"Unable to convert \"{str}\" to {typeof(T).Name}."); + } + + public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) => + writer.WriteStringValue(_toWire.TryGetValue(value, out var wire) ? wire : value.ToString()); + } +} diff --git a/sdk/server/cs/Test/Roundtrip.cs b/sdk/server/cs/Test/Roundtrip.cs new file mode 100644 index 00000000..56def998 --- /dev/null +++ b/sdk/server/cs/Test/Roundtrip.cs @@ -0,0 +1,100 @@ +using Application; +using ifcx_sdk; +using Optional.Unsafe; +using System.IO; + +namespace Test +{ + public class Roundtrip + { + [Fact] + public async Task CreateLayer() + { + var fs = new InMemoryFileSystem(); + var svc = new LayerService(fs, "::in_mem"); + + Guid layer_guid = Guid.NewGuid(); + await svc.CreateLayerAsync("My Layer", layer_guid); + var layerOpt = await svc.GetLayerAsync(layer_guid); + + Assert.True(layerOpt.HasValue); + var layer = layerOpt.ValueOrDefault(); + Assert.Equal(layer_guid, layer.id); + Assert.Equal("My Layer", layer.name); + Assert.Empty(layer.versions); + } + + [Fact] + public async Task CreateLayerVersion() + { + var fs = new InMemoryFileSystem(); + var svc = new LayerService(fs, "::in_mem"); + await using var stream = File.OpenRead("../../../data/example.ifcx"); + var blobId = Guid.NewGuid(); + await svc.UploadFileAsync(blobId, stream); + + Guid layer_guid = Guid.NewGuid(); + Guid version_guid = Guid.NewGuid(); + await svc.CreateLayerAsync("My Layer", layer_guid); + await svc.CreateLayerVersionAsync(layer_guid, version_guid, Guid.Empty, blobId); + + var version = (await svc.GetLayerAsync(layer_guid)).ValueOrDefault().versions[0]; + + Assert.Equal(blobId, version.uploadedBlobId); + } + + [Fact] + public async Task CommitAndQuery() + { + var fs = new InMemoryFileSystem(); + var svc = new LayerService(fs, "::in_mem"); + + var ifcxFile1 = new IfcxFileBuilder() + .AddSection("v1", + new NodeElementBuilder("my_object"). + AddChild(QuickType.Opinion.Value, "child", "c1"). + Build() + ). + Build(); + + var ifcxFile2 = new IfcxFileBuilder() + .AddSection("v2", + new NodeElementBuilder("my_object"). + AddChild(QuickType.Opinion.Value, "child", "c2"). + Build() + ). + Build(); + + var blobId1 = Guid.NewGuid(); + await svc.UploadFileAsync(blobId1, new MemoryStream(IfcxFile.WriteIfcxFile(ifcxFile1))); + + var blobId2 = Guid.NewGuid(); + await svc.UploadFileAsync(blobId2, new MemoryStream(IfcxFile.WriteIfcxFile(ifcxFile2))); + + Guid layer_guid = Guid.NewGuid(); + await svc.CreateLayerAsync("My Layer", layer_guid); + + Guid version_guid_1 = Guid.NewGuid(); + Guid version_guid_2 = Guid.NewGuid(); + + await svc.CreateLayerVersionAsync(layer_guid, version_guid_1, Guid.Empty, blobId1); + + var result1 = await svc.Query(layer_guid, Guid.Empty, "my_object"); + + await svc.CreateLayerVersionAsync(layer_guid, version_guid_2, version_guid_1, blobId2); + + var result2 = await svc.Query(layer_guid, Guid.Empty, "my_object"); + + Assert.True(result1.HasValue); + Assert.Equal("my_object", result1.ValueOrDefault().Path); + Assert.NotEmpty(result1.ValueOrDefault().Children); + Assert.Equal("c1", result1.ValueOrDefault().Children[0].Value); + + Assert.True(result2.HasValue); + Assert.Equal("my_object", result2.ValueOrDefault().Path); + Assert.NotEmpty(result2.ValueOrDefault().Children); + Assert.Equal("c2", result2.ValueOrDefault().Children[0].Value); + + } + } +} diff --git a/sdk/server/cs/Test/Test.csproj b/sdk/server/cs/Test/Test.csproj new file mode 100644 index 00000000..19e1964c --- /dev/null +++ b/sdk/server/cs/Test/Test.csproj @@ -0,0 +1,32 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/server/cs/Test/data/example.ifcx b/sdk/server/cs/Test/data/example.ifcx new file mode 100644 index 00000000..c52a4831 Binary files /dev/null and b/sdk/server/cs/Test/data/example.ifcx differ diff --git a/sdk/server/cs/api/.openapi-generator-ignore b/sdk/server/cs/api/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/sdk/server/cs/api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/sdk/server/cs/api/.openapi-generator/FILES b/sdk/server/cs/api/.openapi-generator/FILES new file mode 100644 index 00000000..53562c85 --- /dev/null +++ b/sdk/server/cs/api/.openapi-generator/FILES @@ -0,0 +1,34 @@ +IfcxApi.Server.sln +README.md +build.bat +build.sh +src/IfcxApi.Server/.gitignore +src/IfcxApi.Server/Attributes/ValidateModelStateAttribute.cs +src/IfcxApi.Server/Authentication/ApiAuthentication.cs +src/IfcxApi.Server/Controllers/DefaultApi.cs +src/IfcxApi.Server/Converters/CustomEnumConverter.cs +src/IfcxApi.Server/Dockerfile +src/IfcxApi.Server/Filters/BasePathFilter.cs +src/IfcxApi.Server/Filters/GeneratePathParamsValidationFilter.cs +src/IfcxApi.Server/Formatters/InputFormatterStream.cs +src/IfcxApi.Server/IfcxApi.Server.csproj +src/IfcxApi.Server/Models/BlobResponse.cs +src/IfcxApi.Server/Models/CreateLayerCommand.cs +src/IfcxApi.Server/Models/CreateLayerVersionCommand.cs +src/IfcxApi.Server/Models/CreateLayerVersionResponse.cs +src/IfcxApi.Server/Models/CreateLayerVersionResponseState.cs +src/IfcxApi.Server/Models/IfcxFileDownloadType.cs +src/IfcxApi.Server/Models/IfcxProvenanceData.cs +src/IfcxApi.Server/Models/LayerDetails.cs +src/IfcxApi.Server/Models/LayerStatus.cs +src/IfcxApi.Server/Models/LayerVersion.cs +src/IfcxApi.Server/Models/LayerVersionIfcxFile.cs +src/IfcxApi.Server/OpenApi/TypeExtensions.cs +src/IfcxApi.Server/Program.cs +src/IfcxApi.Server/Properties/launchSettings.json +src/IfcxApi.Server/Startup.cs +src/IfcxApi.Server/appsettings.Development.json +src/IfcxApi.Server/appsettings.json +src/IfcxApi.Server/wwwroot/README.md +src/IfcxApi.Server/wwwroot/index.html +src/IfcxApi.Server/wwwroot/openapi-original.json diff --git a/sdk/server/cs/api/.openapi-generator/VERSION b/sdk/server/cs/api/.openapi-generator/VERSION new file mode 100644 index 00000000..2540a3a5 --- /dev/null +++ b/sdk/server/cs/api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.20.0 diff --git a/sdk/server/cs/api/README.md b/sdk/server/cs/api/README.md new file mode 100644 index 00000000..54ba5dcb --- /dev/null +++ b/sdk/server/cs/api/README.md @@ -0,0 +1,50 @@ +# IfcxApi.Server - ASP.NET Core 8.0 Server + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +## Upgrade NuGet Packages + +NuGet packages get frequently updated. + +To upgrade this solution to the latest version of all NuGet packages, use the dotnet-outdated tool. + + +Install dotnet-outdated tool: + +``` +dotnet tool install --global dotnet-outdated-tool +``` + +Upgrade only to new minor versions of packages + +``` +dotnet outdated --upgrade --version-lock Major +``` + +Upgrade to all new versions of packages (more likely to include breaking API changes) + +``` +dotnet outdated --upgrade +``` + + +## Run + +Linux/OS X: + +``` +sh build.sh +``` + +Windows: + +``` +build.bat +``` +## Run in Docker + +``` +cd src/IfcxApi.Server +docker build -t ifcxapi.server . +docker run -p 5000:8080 ifcxapi.server +``` diff --git a/sdk/server/cs/api/build.bat b/sdk/server/cs/api/build.bat new file mode 100644 index 00000000..c2e6192b --- /dev/null +++ b/sdk/server/cs/api/build.bat @@ -0,0 +1,9 @@ +:: Generated by: https://openapi-generator.tech +:: + +@echo off + +dotnet restore src\IfcxApi.Server +dotnet build src\IfcxApi.Server +echo Now, run the following to start the project: dotnet run -p src\IfcxApi.Server\IfcxApi.Server.csproj --launch-profile web. +echo. diff --git a/sdk/server/cs/api/build.sh b/sdk/server/cs/api/build.sh new file mode 100644 index 00000000..e4406177 --- /dev/null +++ b/sdk/server/cs/api/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# +# Generated by: https://openapi-generator.tech +# + +dotnet restore src/IfcxApi.Server/ && \ + dotnet build src/IfcxApi.Server/ && \ + echo "Now, run the following to start the project: dotnet run -p src/IfcxApi.Server/IfcxApi.Server.csproj --launch-profile web" diff --git a/sdk/server/cs/api/src/IfcxApi.Server/.gitignore b/sdk/server/cs/api/src/IfcxApi.Server/.gitignore new file mode 100644 index 00000000..1ee53850 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/.gitignore @@ -0,0 +1,362 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Attributes/ValidateModelStateAttribute.cs b/sdk/server/cs/api/src/IfcxApi.Server/Attributes/ValidateModelStateAttribute.cs new file mode 100644 index 00000000..a7e0bfda --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Attributes/ValidateModelStateAttribute.cs @@ -0,0 +1,69 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System.ComponentModel.DataAnnotations; +using System.Reflection; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc.ModelBinding; + +namespace IfcxApi.Server.Attributes +{ + /// + /// Model state validation attribute + /// + public class ValidateModelStateAttribute : ActionFilterAttribute + { + /// + /// Called before the action method is invoked + /// + /// + public override void OnActionExecuting(ActionExecutingContext context) + { + // Per https://blog.markvincze.com/how-to-validate-action-parameters-with-dataannotation-attributes/ + if (context.ActionDescriptor is ControllerActionDescriptor descriptor) + { + foreach (var parameter in descriptor.MethodInfo.GetParameters()) + { + object args = null; + if (context.ActionArguments.ContainsKey(parameter.Name)) + { + args = context.ActionArguments[parameter.Name]; + } + + ValidateAttributes(parameter, args, context.ModelState); + } + } + + if (!context.ModelState.IsValid) + { + context.Result = new BadRequestObjectResult(context.ModelState); + } + } + + private void ValidateAttributes(ParameterInfo parameter, object args, ModelStateDictionary modelState) + { + foreach (var attributeData in parameter.CustomAttributes) + { + var attributeInstance = parameter.GetCustomAttribute(attributeData.AttributeType); + + if (attributeInstance is ValidationAttribute validationAttribute) + { + var isValid = validationAttribute.IsValid(args); + if (!isValid) + { + modelState.AddModelError(parameter.Name, validationAttribute.FormatErrorMessage(parameter.Name)); + } + } + } + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Authentication/ApiAuthentication.cs b/sdk/server/cs/api/src/IfcxApi.Server/Authentication/ApiAuthentication.cs new file mode 100644 index 00000000..cd05ce21 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Authentication/ApiAuthentication.cs @@ -0,0 +1,63 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.Filters; + +namespace IfcxApi.Server.Authentication +{ + /// + /// A requirement that an ApiKey must be present. + /// + public class ApiKeyRequirement : IAuthorizationRequirement + { + /// + /// Get the list of api keys + /// + public IReadOnlyList ApiKeys { get; } + + /// + /// Get the policy name, + /// + public string PolicyName { get; } + + /// + /// Create a new instance of the class. + /// + /// + /// + public ApiKeyRequirement(IEnumerable apiKeys, string policyName) + { + ApiKeys = apiKeys?.ToList() ?? new List(); + PolicyName = policyName; + } + } + + /// + /// Enforce that an api key is present. + /// + public class ApiKeyRequirementHandler : AuthorizationHandler + { + /// + protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { + SucceedRequirementIfApiKeyPresentAndValid(context, requirement); + return Task.CompletedTask; + } + + private void SucceedRequirementIfApiKeyPresentAndValid(AuthorizationHandlerContext context, ApiKeyRequirement requirement) + { + + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Controllers/DefaultApi.cs b/sdk/server/cs/api/src/IfcxApi.Server/Controllers/DefaultApi.cs new file mode 100644 index 00000000..c8e03c4f --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Controllers/DefaultApi.cs @@ -0,0 +1,172 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Http; +using Swashbuckle.AspNetCore.Annotations; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Text.Json; +using IfcxApi.Server.Attributes; +using IfcxApi.Server.Models; + +namespace IfcxApi.Server.Controllers +{ + /// + /// + /// + [ApiController] + public abstract class DefaultApiController : ControllerBase + { + /// + /// + /// + /// + /// The request has succeeded. + [HttpPut] + [Route("/ifcx-api/download/{blobId}")] + [ValidateModelState] + [SwaggerOperation("Download")] + [SwaggerResponse(statusCode: 200, type: typeof(System.IO.Stream), description: "The request has succeeded.")] + public abstract Task Download([FromRoute (Name = "blobId")][Required]Guid blobId); + + /// + /// + /// + /// + /// The request has succeeded. + [HttpDelete] + [Route("/ifcx-api/layers/{layerId}")] + [ValidateModelState] + [SwaggerOperation("LayerRoutesDeleteLayer")] + public abstract Task LayerRoutesDeleteLayer([FromRoute (Name = "layerId")][Required]Guid layerId); + + /// + /// + /// + /// + /// The request has succeeded. + [HttpGet] + [Route("/ifcx-api/layers/{layerId}")] + [ValidateModelState] + [SwaggerOperation("LayerRoutesGetLayer")] + [SwaggerResponse(statusCode: 200, type: typeof(LayerDetails), description: "The request has succeeded.")] + public abstract Task LayerRoutesGetLayer([FromRoute (Name = "layerId")][Required]Guid layerId); + + /// + /// + /// + /// + /// The request has succeeded. + [HttpPost] + [Route("/ifcx-api/layers/{layerId}/upload-ifcx-blob-url")] + [ValidateModelState] + [SwaggerOperation("LayerRoutesUploadIfcxBlobUrl")] + [SwaggerResponse(statusCode: 200, type: typeof(BlobResponse), description: "The request has succeeded.")] + public abstract Task LayerRoutesUploadIfcxBlobUrl([FromRoute (Name = "layerId")][Required]Guid layerId); + + /// + /// + /// + /// + /// + /// The request has succeeded. + [HttpGet] + [Route("/ifcx-api/layers/{layerId}/versions/{versionId}")] + [ValidateModelState] + [SwaggerOperation("LayerVersionRoutesGetLayerVersion")] + [SwaggerResponse(statusCode: 200, type: typeof(LayerVersion), description: "The request has succeeded.")] + public abstract Task LayerVersionRoutesGetLayerVersion([FromRoute (Name = "layerId")][Required]Guid layerId, [FromRoute (Name = "versionId")][Required]Guid versionId); + + /// + /// + /// + /// + /// + /// + /// The request has succeeded. + [HttpPut] + [Route("/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx")] + [ValidateModelState] + [SwaggerOperation("LayerVersionRoutesLayerIfcx")] + [SwaggerResponse(statusCode: 200, type: typeof(LayerVersionIfcxFile), description: "The request has succeeded.")] + public abstract Task LayerVersionRoutesLayerIfcx([FromRoute (Name = "layerId")][Required]Guid layerId, [FromRoute (Name = "versionId")][Required]Guid versionId, [FromQuery (Name = "downloadType")][Required()]IfcxFileDownloadType downloadType); + + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The request has succeeded. + [HttpGet] + [Route("/ifcx-api/layers/{layerId}/versions/{versionId}/query")] + [ValidateModelState] + [SwaggerOperation("LayerVersionRoutesQuery")] + public abstract Task LayerVersionRoutesQuery([FromRoute (Name = "layerId")][Required]Guid layerId, [FromRoute (Name = "versionId")][Required]Guid versionId, [FromQuery (Name = "path")][Required()]string path, [FromQuery (Name = "provenance")][Required()]bool provenance, [FromQuery (Name = "expandChildren")][Required()]bool expandChildren, [FromQuery (Name = "expandChildrenRecursive")][Required()]bool expandChildrenRecursive); + + /// + /// + /// + /// + /// The request has succeeded. + [HttpPost] + [Route("/ifcx-api/layers")] + [Consumes("application/json")] + [ValidateModelState] + [SwaggerOperation("LayersCreateLayer")] + public abstract Task LayersCreateLayer([FromBody]CreateLayerCommand createLayerCommand); + + /// + /// + /// + /// The request has succeeded. + [HttpGet] + [Route("/ifcx-api/layers")] + [ValidateModelState] + [SwaggerOperation("LayersLayers")] + [SwaggerResponse(statusCode: 200, type: typeof(List), description: "The request has succeeded.")] + public abstract Task LayersLayers(); + + /// + /// + /// + /// + /// + /// The request has succeeded. + [HttpPut] + [Route("/ifcx-api/upload/{blobId}")] + [ValidateModelState] + [SwaggerOperation("Upload")] + public abstract Task Upload([FromRoute (Name = "blobId")][Required]Guid blobId, [FromBody]System.IO.Stream body); + + /// + /// + /// + /// + /// + /// The request has succeeded. + [HttpPost] + [Route("/ifcx-api/layers/{layerId}/versions")] + [Consumes("application/json")] + [ValidateModelState] + [SwaggerOperation("VersionsRoutesCreateLayerVersion")] + [SwaggerResponse(statusCode: 200, type: typeof(CreateLayerVersionResponse), description: "The request has succeeded.")] + public abstract Task VersionsRoutesCreateLayerVersion([FromRoute (Name = "layerId")][Required]Guid layerId, [FromBody]CreateLayerVersionCommand createLayerVersionCommand); + } +} + diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Converters/CustomEnumConverter.cs b/sdk/server/cs/api/src/IfcxApi.Server/Converters/CustomEnumConverter.cs new file mode 100644 index 00000000..2ec6fbdc --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Converters/CustomEnumConverter.cs @@ -0,0 +1,52 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.ComponentModel; +using System.Globalization; +using System.Text.Json; + +namespace IfcxApi.Server.Converters +{ + /// + /// Custom string to enum converter + /// + public class CustomEnumConverter : TypeConverter + { + /// + /// Determine if we can convert a type to an enum + /// + /// + /// + /// + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + + /// + /// Convert from a type value to an enum + /// + /// + /// + /// + /// + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + var s = value as string; + if (string.IsNullOrEmpty(s)) + { + return null; + } + + return JsonSerializer.Deserialize(@"""" + value + @""""); + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Dockerfile b/sdk/server/cs/api/src/IfcxApi.Server/Dockerfile new file mode 100644 index 00000000..32b1fa7e --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Dockerfile @@ -0,0 +1,32 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +# Container we use for final publish +FROM mcr.microsoft.com/dotnet/core/aspnet:8.0-buster-slim AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +# Build container +FROM mcr.microsoft.com/dotnet/core/sdk:8.0-buster AS build + +# Copy the code into the container +WORKDIR /src +COPY ["src/IfcxApi.Server/IfcxApi.Server.csproj", "IfcxApi.Server/"] + +# NuGet restore +RUN dotnet restore "IfcxApi.Server/IfcxApi.Server.csproj" +COPY ["src/IfcxApi.Server/", "IfcxApi.Server/"] + +# Build the API +WORKDIR "IfcxApi.Server" +RUN dotnet build "IfcxApi.Server.csproj" -c Release -o /app/build + +# Publish it +FROM build AS publish +RUN dotnet publish "IfcxApi.Server.csproj" -c Release -o /app/publish + +# Make the final image for publishing +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "IfcxApi.Server.dll"] diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Filters/BasePathFilter.cs b/sdk/server/cs/api/src/IfcxApi.Server/Filters/BasePathFilter.cs new file mode 100644 index 00000000..fcf36ca8 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Filters/BasePathFilter.cs @@ -0,0 +1,60 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace IfcxApi.Server.Filters +{ + /// + /// BasePath Document Filter sets BasePath property of OpenAPI and removes it from the individual URL paths + /// + public class BasePathFilter : IDocumentFilter + { + /// + /// Constructor + /// + /// BasePath to remove from Operations + public BasePathFilter(string basePath) + { + BasePath = basePath; + } + + /// + /// Gets the BasePath of the OpenAPI Doc + /// + /// The BasePath of the OpenAPI Doc + public string BasePath { get; } + + /// + /// Apply the filter + /// + /// OpenApiDocument + /// FilterContext + public void Apply(OpenApiDocument openapiDoc, DocumentFilterContext context) + { + //openapiDoc.BasePath = BasePath; + + var pathsToModify = openapiDoc.Paths.Where(p => p.Key.StartsWith(BasePath)).ToList(); + + foreach (var (key, value) in pathsToModify) + { + if (key.StartsWith(BasePath)) + { + var newKey = Regex.Replace(key, $"^{BasePath}", string.Empty); + openapiDoc.Paths.Remove(key); + openapiDoc.Paths.Add(newKey, value); + } + } + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Filters/GeneratePathParamsValidationFilter.cs b/sdk/server/cs/api/src/IfcxApi.Server/Filters/GeneratePathParamsValidationFilter.cs new file mode 100644 index 00000000..5e87a4f9 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Filters/GeneratePathParamsValidationFilter.cs @@ -0,0 +1,107 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System.ComponentModel.DataAnnotations; +using System.Linq; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace IfcxApi.Server.Filters +{ + /// + /// Path Parameter Validation Rules Filter + /// + public class GeneratePathParamsValidationFilter : IOperationFilter + { + /// + /// Constructor + /// + /// Operation + /// OperationFilterContext + public void Apply(OpenApiOperation operation, OperationFilterContext context) + { + var pars = context.ApiDescription.ParameterDescriptions; + + foreach (var par in pars) + { + var openapiParam = operation.Parameters.SingleOrDefault(p => p.Name == par.Name); + + var attributes = ((ControllerParameterDescriptor)par.ParameterDescriptor).ParameterInfo.CustomAttributes.ToList(); + + // See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1147 + // and https://mikeralphson.github.io/openapi/2017/03/15/openapi3.0.0-rc0 + // Basically OpenAPI v3 body parameters are split out into RequestBody and the properties have moved to schema + if (attributes.Any() && openapiParam != null) + { + // Required - [Required] + var requiredAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RequiredAttribute)); + if (requiredAttr != null) + { + openapiParam.Required = true; + } + + // Regex Pattern [RegularExpression] + var regexAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RegularExpressionAttribute)); + if (regexAttr != null) + { + var regex = (string)regexAttr.ConstructorArguments[0].Value; + openapiParam.Schema.Pattern = regex; + } + + // String Length [StringLength] + int? minLength = null, maxLength = null; + var stringLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(StringLengthAttribute)); + if (stringLengthAttr != null) + { + if (stringLengthAttr.NamedArguments.Count == 1) + { + minLength = (int)stringLengthAttr.NamedArguments.Single(p => p.MemberName == "MinimumLength").TypedValue.Value; + } + maxLength = (int)stringLengthAttr.ConstructorArguments[0].Value; + } + + var minLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MinLengthAttribute)); + if (minLengthAttr != null) + { + minLength = (int)minLengthAttr.ConstructorArguments[0].Value; + } + + var maxLengthAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(MaxLengthAttribute)); + if (maxLengthAttr != null) + { + maxLength = (int)maxLengthAttr.ConstructorArguments[0].Value; + } + + if (minLength != null) + { + openapiParam.Schema.MinLength = minLength; + } + + if (maxLength != null) + { + openapiParam.Schema.MaxLength = maxLength; + } + + // Range [Range] + var rangeAttr = attributes.FirstOrDefault(p => p.AttributeType == typeof(RangeAttribute)); + if (rangeAttr != null) + { + var rangeMin = (int)rangeAttr.ConstructorArguments[0].Value; + var rangeMax = (int)rangeAttr.ConstructorArguments[1].Value; + + openapiParam.Schema.MinLength = rangeMin; + openapiParam.Schema.MaxLength = rangeMax; + } + } + } + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Formatters/InputFormatterStream.cs b/sdk/server/cs/api/src/IfcxApi.Server/Formatters/InputFormatterStream.cs new file mode 100644 index 00000000..aa3acfaa --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Formatters/InputFormatterStream.cs @@ -0,0 +1,45 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.IO; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Formatters; + +namespace IfcxApi.Server.Formatters +{ + /// + public class InputFormatterStream : InputFormatter + { + /// + public InputFormatterStream() + { + SupportedMediaTypes.Add("application/octet-stream"); + SupportedMediaTypes.Add("image/jpeg"); + } + + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// + protected override bool CanReadType(Type type) + { + if (type == typeof(Stream)) + { + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/sdk/server/cs/api/src/IfcxApi.Server/IfcxApi.Server.csproj b/sdk/server/cs/api/src/IfcxApi.Server/IfcxApi.Server.csproj new file mode 100644 index 00000000..7556be15 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/IfcxApi.Server.csproj @@ -0,0 +1,29 @@ + + + A library generated from a OpenAPI doc + No Copyright + OpenAPI + net8.0 + true + true + 1.0.0 + IfcxApi.Server + IfcxApi.Server + 218f1a7f-06c3-4543-a86c-45b089cc5a97 + Linux + ..\.. + + + + + + + + + + + + + + + diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/BlobResponse.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/BlobResponse.cs new file mode 100644 index 00000000..43c504dc --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/BlobResponse.cs @@ -0,0 +1,140 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class BlobResponse : IEquatable + { + /// + /// Gets or Sets BlobId + /// + [Required] + [DataMember(Name="blobId", EmitDefaultValue=true)] + public Guid BlobId { get; set; } + + /// + /// Gets or Sets PutURL + /// + [Required] + [DataMember(Name="putURL", EmitDefaultValue=false)] + public string PutURL { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BlobResponse {\n"); + sb.Append(" BlobId: ").Append(BlobId).Append("\n"); + sb.Append(" PutURL: ").Append(PutURL).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((BlobResponse)obj); + } + + /// + /// Returns true if BlobResponse instances are equal + /// + /// Instance of BlobResponse to be compared + /// Boolean + public bool Equals(BlobResponse other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + BlobId == other.BlobId || + + BlobId.Equals(other.BlobId) + ) && + ( + PutURL == other.PutURL || + PutURL != null && + PutURL.Equals(other.PutURL) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + BlobId.GetHashCode(); + if (PutURL != null) + hashCode = hashCode * 59 + PutURL.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(BlobResponse left, BlobResponse right) + { + return Equals(left, right); + } + + public static bool operator !=(BlobResponse left, BlobResponse right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerCommand.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerCommand.cs new file mode 100644 index 00000000..a0e4af48 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerCommand.cs @@ -0,0 +1,140 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class CreateLayerCommand : IEquatable + { + /// + /// Gets or Sets Id + /// + [Required] + [DataMember(Name="id", EmitDefaultValue=true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLayerCommand {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((CreateLayerCommand)obj); + } + + /// + /// Returns true if CreateLayerCommand instances are equal + /// + /// Instance of CreateLayerCommand to be compared + /// Boolean + public bool Equals(CreateLayerCommand other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(CreateLayerCommand left, CreateLayerCommand right) + { + return Equals(left, right); + } + + public static bool operator !=(CreateLayerCommand left, CreateLayerCommand right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionCommand.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionCommand.cs new file mode 100644 index 00000000..ca04c5b8 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionCommand.cs @@ -0,0 +1,155 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class CreateLayerVersionCommand : IEquatable + { + /// + /// Gets or Sets Id + /// + [Required] + [DataMember(Name="id", EmitDefaultValue=true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets PreviousLayerVersionId + /// + [Required] + [DataMember(Name="previousLayerVersionId", EmitDefaultValue=true)] + public Guid PreviousLayerVersionId { get; set; } + + /// + /// Gets or Sets BlobId + /// + [Required] + [DataMember(Name="blobId", EmitDefaultValue=true)] + public Guid BlobId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLayerVersionCommand {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PreviousLayerVersionId: ").Append(PreviousLayerVersionId).Append("\n"); + sb.Append(" BlobId: ").Append(BlobId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((CreateLayerVersionCommand)obj); + } + + /// + /// Returns true if CreateLayerVersionCommand instances are equal + /// + /// Instance of CreateLayerVersionCommand to be compared + /// Boolean + public bool Equals(CreateLayerVersionCommand other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + PreviousLayerVersionId == other.PreviousLayerVersionId || + + PreviousLayerVersionId.Equals(other.PreviousLayerVersionId) + ) && + ( + BlobId == other.BlobId || + + BlobId.Equals(other.BlobId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + + hashCode = hashCode * 59 + PreviousLayerVersionId.GetHashCode(); + + hashCode = hashCode * 59 + BlobId.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(CreateLayerVersionCommand left, CreateLayerVersionCommand right) + { + return Equals(left, right); + } + + public static bool operator !=(CreateLayerVersionCommand left, CreateLayerVersionCommand right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponse.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponse.cs new file mode 100644 index 00000000..b5a82444 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponse.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class CreateLayerVersionResponse : IEquatable + { + /// + /// Gets or Sets State + /// + [Required] + [DataMember(Name="state", EmitDefaultValue=true)] + public CreateLayerVersionResponseState State { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLayerVersionResponse {\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((CreateLayerVersionResponse)obj); + } + + /// + /// Returns true if CreateLayerVersionResponse instances are equal + /// + /// Instance of CreateLayerVersionResponse to be compared + /// Boolean + public bool Equals(CreateLayerVersionResponse other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + State == other.State || + + State.Equals(other.State) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + State.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(CreateLayerVersionResponse left, CreateLayerVersionResponse right) + { + return Equals(left, right); + } + + public static bool operator !=(CreateLayerVersionResponse left, CreateLayerVersionResponse right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponseState.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponseState.cs new file mode 100644 index 00000000..72846b84 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/CreateLayerVersionResponseState.cs @@ -0,0 +1,42 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// Gets or Sets CreateLayerVersionResponseState + /// + + public enum CreateLayerVersionResponseState + { + + /// + /// Enum OK for OK + /// + [EnumMember(Value = "OK")] + OK = 1, + + /// + /// Enum OUTOFDATE for OUT_OF_DATE + /// + [EnumMember(Value = "OUT_OF_DATE")] + OUTOFDATE = 2 + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxFileDownloadType.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxFileDownloadType.cs new file mode 100644 index 00000000..9649a480 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxFileDownloadType.cs @@ -0,0 +1,54 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// Gets or Sets IfcxFileDownloadType + /// + + public enum IfcxFileDownloadType + { + + /// + /// Enum JustThisVersion for just_this_version + /// + [EnumMember(Value = "just_this_version")] + JustThisVersion = 1, + + /// + /// Enum WholeLayerHistoryIntact for whole_layer_history_intact + /// + [EnumMember(Value = "whole_layer_history_intact")] + WholeLayerHistoryIntact = 2, + + /// + /// Enum WholeLayerHistoryCondensed for whole_layer_history_condensed + /// + [EnumMember(Value = "whole_layer_history_condensed")] + WholeLayerHistoryCondensed = 3, + + /// + /// Enum WholeLayerAndImportsHistoryCondensed for whole_layer_and_imports_history_condensed + /// + [EnumMember(Value = "whole_layer_and_imports_history_condensed")] + WholeLayerAndImportsHistoryCondensed = 4 + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxProvenanceData.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxProvenanceData.cs new file mode 100644 index 00000000..39e68f61 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/IfcxProvenanceData.cs @@ -0,0 +1,155 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class IfcxProvenanceData : IEquatable + { + /// + /// Gets or Sets Author + /// + [Required] + [DataMember(Name="author", EmitDefaultValue=false)] + public string Author { get; set; } + + /// + /// Gets or Sets Timestamp + /// + [Required] + [DataMember(Name="timestamp", EmitDefaultValue=false)] + public string Timestamp { get; set; } + + /// + /// Gets or Sets Application + /// + [Required] + [DataMember(Name="application", EmitDefaultValue=false)] + public string Application { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class IfcxProvenanceData {\n"); + sb.Append(" Author: ").Append(Author).Append("\n"); + sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); + sb.Append(" Application: ").Append(Application).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((IfcxProvenanceData)obj); + } + + /// + /// Returns true if IfcxProvenanceData instances are equal + /// + /// Instance of IfcxProvenanceData to be compared + /// Boolean + public bool Equals(IfcxProvenanceData other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Author == other.Author || + Author != null && + Author.Equals(other.Author) + ) && + ( + Timestamp == other.Timestamp || + Timestamp != null && + Timestamp.Equals(other.Timestamp) + ) && + ( + Application == other.Application || + Application != null && + Application.Equals(other.Application) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (Author != null) + hashCode = hashCode * 59 + Author.GetHashCode(); + if (Timestamp != null) + hashCode = hashCode * 59 + Timestamp.GetHashCode(); + if (Application != null) + hashCode = hashCode * 59 + Application.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(IfcxProvenanceData left, IfcxProvenanceData right) + { + return Equals(left, right); + } + + public static bool operator !=(IfcxProvenanceData left, IfcxProvenanceData right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerDetails.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerDetails.cs new file mode 100644 index 00000000..ae5cecae --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerDetails.cs @@ -0,0 +1,156 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerDetails : IEquatable + { + /// + /// Gets or Sets Id + /// + [Required] + [DataMember(Name="id", EmitDefaultValue=true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Gets or Sets History + /// + [Required] + [DataMember(Name="history", EmitDefaultValue=false)] + public List History { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerDetails {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" History: ").Append(History).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerDetails)obj); + } + + /// + /// Returns true if LayerDetails instances are equal + /// + /// Instance of LayerDetails to be compared + /// Boolean + public bool Equals(LayerDetails other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ) && + ( + History == other.History || + History != null && + other.History != null && + History.SequenceEqual(other.History) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (History != null) + hashCode = hashCode * 59 + History.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerDetails left, LayerDetails right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerDetails left, LayerDetails right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerHistory.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerHistory.cs new file mode 100644 index 00000000..e546e101 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerHistory.cs @@ -0,0 +1,156 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerHistory : IEquatable + { + /// + /// Gets or Sets Id + /// + [Required] + [DataMember(Name="id", EmitDefaultValue=true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Gets or Sets Versions + /// + [Required] + [DataMember(Name="versions", EmitDefaultValue=false)] + public List Versions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerHistory {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Versions: ").Append(Versions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerHistory)obj); + } + + /// + /// Returns true if LayerHistory instances are equal + /// + /// Instance of LayerHistory to be compared + /// Boolean + public bool Equals(LayerHistory other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ) && + ( + Versions == other.Versions || + Versions != null && + other.Versions != null && + Versions.SequenceEqual(other.Versions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (Versions != null) + hashCode = hashCode * 59 + Versions.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerHistory left, LayerHistory right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerHistory left, LayerHistory right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerRoutesUpdateLayerRequest.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerRoutesUpdateLayerRequest.cs new file mode 100644 index 00000000..f04a765b --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerRoutesUpdateLayerRequest.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerRoutesUpdateLayerRequest : IEquatable + { + /// + /// Gets or Sets VarVersion + /// + [Required] + [DataMember(Name="version", EmitDefaultValue=false)] + public UpdateLayerCommand VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerRoutesUpdateLayerRequest {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerRoutesUpdateLayerRequest)obj); + } + + /// + /// Returns true if LayerRoutesUpdateLayerRequest instances are equal + /// + /// Instance of LayerRoutesUpdateLayerRequest to be compared + /// Boolean + public bool Equals(LayerRoutesUpdateLayerRequest other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + VarVersion == other.VarVersion || + VarVersion != null && + VarVersion.Equals(other.VarVersion) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (VarVersion != null) + hashCode = hashCode * 59 + VarVersion.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerRoutesUpdateLayerRequest left, LayerRoutesUpdateLayerRequest right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerRoutesUpdateLayerRequest left, LayerRoutesUpdateLayerRequest right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerStatus.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerStatus.cs new file mode 100644 index 00000000..244cdcf2 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerStatus.cs @@ -0,0 +1,155 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerStatus : IEquatable + { + /// + /// Gets or Sets Id + /// + [Required] + [DataMember(Name="id", EmitDefaultValue=true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Gets or Sets LatestVersion + /// + [Required] + [DataMember(Name="latestVersion", EmitDefaultValue=true)] + public Guid LatestVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerStatus {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" LatestVersion: ").Append(LatestVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerStatus)obj); + } + + /// + /// Returns true if LayerStatus instances are equal + /// + /// Instance of LayerStatus to be compared + /// Boolean + public bool Equals(LayerStatus other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ) && + ( + LatestVersion == other.LatestVersion || + + LatestVersion.Equals(other.LatestVersion) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + + hashCode = hashCode * 59 + LatestVersion.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerStatus left, LayerStatus right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerStatus left, LayerStatus right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersion.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersion.cs new file mode 100644 index 00000000..1fe37600 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersion.cs @@ -0,0 +1,170 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerVersion : IEquatable + { + /// + /// Gets or Sets LayerId + /// + [Required] + [DataMember(Name="layerId", EmitDefaultValue=true)] + public Guid LayerId { get; set; } + + /// + /// Gets or Sets VersionId + /// + [Required] + [DataMember(Name="versionId", EmitDefaultValue=true)] + public Guid VersionId { get; set; } + + /// + /// Gets or Sets PreviousVersionId + /// + [Required] + [DataMember(Name="previousVersionId", EmitDefaultValue=true)] + public Guid PreviousVersionId { get; set; } + + /// + /// Gets or Sets Provenance + /// + [Required] + [DataMember(Name="provenance", EmitDefaultValue=false)] + public IfcxProvenanceData Provenance { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerVersion {\n"); + sb.Append(" LayerId: ").Append(LayerId).Append("\n"); + sb.Append(" VersionId: ").Append(VersionId).Append("\n"); + sb.Append(" PreviousVersionId: ").Append(PreviousVersionId).Append("\n"); + sb.Append(" Provenance: ").Append(Provenance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerVersion)obj); + } + + /// + /// Returns true if LayerVersion instances are equal + /// + /// Instance of LayerVersion to be compared + /// Boolean + public bool Equals(LayerVersion other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + LayerId == other.LayerId || + + LayerId.Equals(other.LayerId) + ) && + ( + VersionId == other.VersionId || + + VersionId.Equals(other.VersionId) + ) && + ( + PreviousVersionId == other.PreviousVersionId || + + PreviousVersionId.Equals(other.PreviousVersionId) + ) && + ( + Provenance == other.Provenance || + Provenance != null && + Provenance.Equals(other.Provenance) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + LayerId.GetHashCode(); + + hashCode = hashCode * 59 + VersionId.GetHashCode(); + + hashCode = hashCode * 59 + PreviousVersionId.GetHashCode(); + if (Provenance != null) + hashCode = hashCode * 59 + Provenance.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerVersion left, LayerVersion right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerVersion left, LayerVersion right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersionIfcxFile.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersionIfcxFile.cs new file mode 100644 index 00000000..41e411a7 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayerVersionIfcxFile.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayerVersionIfcxFile : IEquatable + { + /// + /// Gets or Sets BlobUrl + /// + [Required] + [DataMember(Name="blobUrl", EmitDefaultValue=false)] + public string BlobUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayerVersionIfcxFile {\n"); + sb.Append(" BlobUrl: ").Append(BlobUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayerVersionIfcxFile)obj); + } + + /// + /// Returns true if LayerVersionIfcxFile instances are equal + /// + /// Instance of LayerVersionIfcxFile to be compared + /// Boolean + public bool Equals(LayerVersionIfcxFile other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + BlobUrl == other.BlobUrl || + BlobUrl != null && + BlobUrl.Equals(other.BlobUrl) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (BlobUrl != null) + hashCode = hashCode * 59 + BlobUrl.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayerVersionIfcxFile left, LayerVersionIfcxFile right) + { + return Equals(left, right); + } + + public static bool operator !=(LayerVersionIfcxFile left, LayerVersionIfcxFile right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/LayersCreateLayerRequest.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayersCreateLayerRequest.cs new file mode 100644 index 00000000..ed35f21c --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/LayersCreateLayerRequest.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class LayersCreateLayerRequest : IEquatable + { + /// + /// Gets or Sets VarVersion + /// + [Required] + [DataMember(Name="version", EmitDefaultValue=false)] + public CreateLayerCommand VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LayersCreateLayerRequest {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((LayersCreateLayerRequest)obj); + } + + /// + /// Returns true if LayersCreateLayerRequest instances are equal + /// + /// Instance of LayersCreateLayerRequest to be compared + /// Boolean + public bool Equals(LayersCreateLayerRequest other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + VarVersion == other.VarVersion || + VarVersion != null && + VarVersion.Equals(other.VarVersion) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (VarVersion != null) + hashCode = hashCode * 59 + VarVersion.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(LayersCreateLayerRequest left, LayersCreateLayerRequest right) + { + return Equals(left, right); + } + + public static bool operator !=(LayersCreateLayerRequest left, LayersCreateLayerRequest right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/UpdateLayerCommand.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/UpdateLayerCommand.cs new file mode 100644 index 00000000..f90bf01b --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/UpdateLayerCommand.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class UpdateLayerCommand : IEquatable + { + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateLayerCommand {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((UpdateLayerCommand)obj); + } + + /// + /// Returns true if UpdateLayerCommand instances are equal + /// + /// Instance of UpdateLayerCommand to be compared + /// Boolean + public bool Equals(UpdateLayerCommand other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(UpdateLayerCommand left, UpdateLayerCommand right) + { + return Equals(left, right); + } + + public static bool operator !=(UpdateLayerCommand left, UpdateLayerCommand right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Models/VersionsRoutesCreateLayerVersionRequest.cs b/sdk/server/cs/api/src/IfcxApi.Server/Models/VersionsRoutesCreateLayerVersionRequest.cs new file mode 100644 index 00000000..ff097ef5 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Models/VersionsRoutesCreateLayerVersionRequest.cs @@ -0,0 +1,125 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text.Json; +using IfcxApi.Server.Converters; + +namespace IfcxApi.Server.Models +{ + /// + /// + /// + [DataContract] + public partial class VersionsRoutesCreateLayerVersionRequest : IEquatable + { + /// + /// Gets or Sets VarVersion + /// + [Required] + [DataMember(Name="version", EmitDefaultValue=false)] + public CreateLayerVersionCommand VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class VersionsRoutesCreateLayerVersionRequest {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + var options = new JsonSerializerOptions + { + WriteIndented = true + }; + + return JsonSerializer.Serialize(this, options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((VersionsRoutesCreateLayerVersionRequest)obj); + } + + /// + /// Returns true if VersionsRoutesCreateLayerVersionRequest instances are equal + /// + /// Instance of VersionsRoutesCreateLayerVersionRequest to be compared + /// Boolean + public bool Equals(VersionsRoutesCreateLayerVersionRequest other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + VarVersion == other.VarVersion || + VarVersion != null && + VarVersion.Equals(other.VarVersion) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (VarVersion != null) + hashCode = hashCode * 59 + VarVersion.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(VersionsRoutesCreateLayerVersionRequest left, VersionsRoutesCreateLayerVersionRequest right) + { + return Equals(left, right); + } + + public static bool operator !=(VersionsRoutesCreateLayerVersionRequest left, VersionsRoutesCreateLayerVersionRequest right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/OpenApi/TypeExtensions.cs b/sdk/server/cs/api/src/IfcxApi.Server/OpenApi/TypeExtensions.cs new file mode 100644 index 00000000..6e67102a --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/OpenApi/TypeExtensions.cs @@ -0,0 +1,61 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; + +namespace IfcxApi.Server.OpenApi +{ + /// + /// Replacement utilities from Swashbuckle.AspNetCore.SwaggerGen which are not in 5.x + /// + public static class TypeExtensions + { + /// + /// Produce a friendly name for the type which is unique. + /// + /// + /// + public static string FriendlyId(this Type type, bool fullyQualified = false) + { + var typeName = fullyQualified + ? type.FullNameSansTypeParameters().Replace("+", ".") + : type.Name; + + if (type.IsGenericType) + { + var genericArgumentIds = type.GetGenericArguments() + .Select(t => t.FriendlyId(fullyQualified)) + .ToArray(); + + return new StringBuilder(typeName) + .Replace($"`{genericArgumentIds.Count()}", string.Empty) + .Append($"[{string.Join(",", genericArgumentIds).TrimEnd(',')}]") + .ToString(); + } + + return typeName; + } + + /// + /// Determine the fully qualified type name without type parameters. + /// + /// + public static string FullNameSansTypeParameters(this Type type) + { + var fullName = type.FullName; + if (string.IsNullOrEmpty(fullName)) + fullName = type.Name; + var chopIndex = fullName.IndexOf("[[", StringComparison.Ordinal); + return (chopIndex == -1) ? fullName : fullName.Substring(0, chopIndex); + } + } +} \ No newline at end of file diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Program.cs b/sdk/server/cs/api/src/IfcxApi.Server/Program.cs new file mode 100644 index 00000000..cceed5d2 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace IfcxApi.Server +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Properties/launchSettings.json b/sdk/server/cs/api/src/IfcxApi.Server/Properties/launchSettings.json new file mode 100644 index 00000000..99cfeea4 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Properties/launchSettings.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:61788", + "sslPort": 44301 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "openapi", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "OpenAPI": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "openapi", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Docker": { + "commandName": "Docker", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", + "publishAllPorts": true, + "useSSL": true + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/Startup.cs b/sdk/server/cs/api/src/IfcxApi.Server/Startup.cs new file mode 100644 index 00000000..fce9b0d1 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/Startup.cs @@ -0,0 +1,139 @@ +/* + * (title) + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.IO; +using System.Reflection; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.OpenApi.Models; +using System.Text.Json; +using System.Text.Json.Serialization; +using IfcxApi.Server.Authentication; +using IfcxApi.Server.Filters; +using IfcxApi.Server.OpenApi; +using IfcxApi.Server.Formatters; + +namespace IfcxApi.Server +{ + /// + /// Startup + /// + public class Startup + { + /// + /// Constructor + /// + /// + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + /// + /// The application configuration. + /// + public IConfiguration Configuration { get; } + + /// + /// This method gets called by the runtime. Use this method to add services to the container. + /// + /// + public void ConfigureServices(IServiceCollection services) + { + + // Add framework services. + services + // Don't need the full MVC stack for an API, see https://andrewlock.net/comparing-startup-between-the-asp-net-core-3-templates/ + .AddControllers(options => { + options.InputFormatters.Insert(0, new InputFormatterStream()); + }) + .AddJsonOptions(options => + { + options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); + }); + services + .AddSwaggerGen(c => + { + c.EnableAnnotations(enableAnnotationsForInheritance: true, enableAnnotationsForPolymorphism: true); + + c.SwaggerDoc("0.0.0", new OpenApiInfo + { + Title = "(title)", + Description = "(title) (ASP.NET Core 8.0)", + TermsOfService = new Uri("https://github.com/openapitools/openapi-generator"), + Contact = new OpenApiContact + { + Name = "OpenAPI-Generator Contributors", + Url = new Uri("https://github.com/openapitools/openapi-generator"), + Email = "" + }, + License = new OpenApiLicense + { + Name = "NoLicense", + Url = new Uri("http://localhost") + }, + Version = "0.0.0", + }); + c.CustomSchemaIds(type => type.FriendlyId(true)); + c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetExecutingAssembly().GetName().Name}.xml"); + + // Include DataAnnotation attributes on Controller Action parameters as OpenAPI validation rules (e.g required, pattern, ..) + // Use [ValidateModelState] on Actions to actually validate it in C# as well! + c.OperationFilter(); + }); + } + + /// + /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + /// + /// + /// + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseHsts(); + } + + // app.UseHttpsRedirection(); + app.UseDefaultFiles(); + app.UseStaticFiles(); + app.UseSwagger(c => + { + c.RouteTemplate = "openapi/{documentName}/openapi.json"; + }) + .UseSwaggerUI(c => + { + // set route prefix to openapi, e.g. http://localhost:8080/openapi/index.html + c.RoutePrefix = "openapi"; + //TODO: Either use the SwaggerGen generated OpenAPI contract (generated from C# classes) + c.SwaggerEndpoint("/openapi/0.0.0/openapi.json", "(title)"); + + //TODO: Or alternatively use the original OpenAPI contract that's included in the static files + // c.SwaggerEndpoint("/openapi-original.json", "(title) Original"); + }); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/appsettings.Development.json b/sdk/server/cs/api/src/IfcxApi.Server/appsettings.Development.json new file mode 100644 index 00000000..e203e940 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/appsettings.json b/sdk/server/cs/api/src/IfcxApi.Server/appsettings.json new file mode 100644 index 00000000..def9159a --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/README.md b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/README.md new file mode 100644 index 00000000..6a0b7847 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/README.md @@ -0,0 +1,42 @@ +# Welcome to ASP.NET 5 Preview + +We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. + +ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854). +Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks). + +We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015. +The ASP.NET Team + +### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016) + +### This application consists of: +* Sample pages using ASP.NET MVC 6 +* [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources +* Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939) + +#### NEW CONCEPTS +* [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008) +* [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012) +* [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013) +* [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014) +* [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849) +* [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850) + +#### CUSTOMIZE APP +* [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600) +* [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602) +* [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603) +* [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606) +* [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604) +* [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009) +* [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848) + +#### DEPLOY +* [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851) +* [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852) +* [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853) +* [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609) +* [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019) + +We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/index.html b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/index.html new file mode 100644 index 00000000..f3318bc9 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/index.html @@ -0,0 +1 @@ + diff --git a/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/openapi-original.json b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/openapi-original.json new file mode 100644 index 00000000..959d3c69 --- /dev/null +++ b/sdk/server/cs/api/src/IfcxApi.Server/wwwroot/openapi-original.json @@ -0,0 +1,581 @@ +{ + "openapi" : "3.0.0", + "info" : { + "title" : "(title)", + "version" : "0.0.0" + }, + "servers" : [ { + "url" : "/" + } ], + "paths" : { + "/ifcx-api/download/{blobId}" : { + "put" : { + "operationId" : "download", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "blobId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "*/*" : { + "schema" : { + "format" : "binary", + "type" : "string" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers" : { + "get" : { + "operationId" : "Layers_layers", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/LayerStatus" + }, + "type" : "array" + } + } + }, + "description" : "The request has succeeded." + } + } + }, + "post" : { + "operationId" : "Layers_createLayer", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateLayerCommand" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}" : { + "delete" : { + "operationId" : "LayerRoutes_delete_layer", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "description" : "The request has succeeded." + } + } + }, + "get" : { + "operationId" : "LayerRoutes_get_layer", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LayerDetails" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/upload-ifcx-blob-url" : { + "post" : { + "operationId" : "LayerRoutes_uploadIfcxBlobUrl", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BlobResponse" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions" : { + "post" : { + "operationId" : "VersionsRoutes_createLayerVersion", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateLayerVersionCommand" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateLayerVersionResponse" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}" : { + "get" : { + "operationId" : "LayerVersionRoutes_get_layer_version", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + }, { + "explode" : false, + "in" : "path", + "name" : "versionId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LayerVersion" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx" : { + "put" : { + "operationId" : "LayerVersionRoutes_layer_ifcx", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + }, { + "explode" : false, + "in" : "path", + "name" : "versionId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + }, { + "explode" : false, + "in" : "query", + "name" : "downloadType", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/IfcxFileDownloadType" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LayerVersionIfcxFile" + } + } + }, + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}/query" : { + "get" : { + "operationId" : "LayerVersionRoutes_query", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "layerId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + }, { + "explode" : false, + "in" : "path", + "name" : "versionId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + }, { + "explode" : false, + "in" : "query", + "name" : "path", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "explode" : false, + "in" : "query", + "name" : "provenance", + "required" : true, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, { + "explode" : false, + "in" : "query", + "name" : "expandChildren", + "required" : true, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, { + "explode" : false, + "in" : "query", + "name" : "expandChildrenRecursive", + "required" : true, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "description" : "The request has succeeded." + } + } + } + }, + "/ifcx-api/upload/{blobId}" : { + "put" : { + "operationId" : "upload", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "blobId", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/uuid" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "format" : "binary", + "type" : "string" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "The request has succeeded." + } + } + } + } + }, + "components" : { + "schemas" : { + "BlobResponse" : { + "example" : { + "putURL" : "putURL", + "blobId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91" + }, + "properties" : { + "blobId" : { + "format" : "uuid", + "type" : "string" + }, + "putURL" : { + "type" : "string" + } + }, + "required" : [ "blobId", "putURL" ], + "type" : "object" + }, + "CreateLayerCommand" : { + "additionalProperties" : { + "not" : { } + }, + "example" : { + "name" : "name", + "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91" + }, + "properties" : { + "id" : { + "format" : "uuid", + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ], + "type" : "object" + }, + "CreateLayerVersionCommand" : { + "example" : { + "blobId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "previousLayerVersionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91" + }, + "properties" : { + "id" : { + "format" : "uuid", + "type" : "string" + }, + "previousLayerVersionId" : { + "format" : "uuid", + "type" : "string" + }, + "blobId" : { + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "blobId", "id", "previousLayerVersionId" ], + "type" : "object" + }, + "CreateLayerVersionResponse" : { + "example" : { + "state" : "OK" + }, + "properties" : { + "state" : { + "$ref" : "#/components/schemas/CreateLayerVersionResponseState" + } + }, + "required" : [ "state" ], + "type" : "object" + }, + "CreateLayerVersionResponseState" : { + "enum" : [ "OK", "OUT_OF_DATE" ], + "type" : "string" + }, + "IfcxFileDownloadType" : { + "enum" : [ "just_this_version", "whole_layer_history_intact", "whole_layer_history_condensed", "whole_layer_and_imports_history_condensed" ], + "type" : "string" + }, + "IfcxProvenanceData" : { + "example" : { + "application" : "application", + "author" : "author", + "timestamp" : "timestamp" + }, + "properties" : { + "author" : { + "type" : "string" + }, + "timestamp" : { + "type" : "string" + }, + "application" : { + "type" : "string" + } + }, + "required" : [ "application", "author", "timestamp" ], + "type" : "object" + }, + "LayerDetails" : { + "example" : { + "name" : "name", + "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "history" : [ { + "previousVersionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "versionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "layerId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "provenance" : { + "application" : "application", + "author" : "author", + "timestamp" : "timestamp" + } + }, { + "previousVersionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "versionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "layerId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "provenance" : { + "application" : "application", + "author" : "author", + "timestamp" : "timestamp" + } + } ] + }, + "properties" : { + "id" : { + "format" : "uuid", + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "history" : { + "items" : { + "$ref" : "#/components/schemas/LayerVersion" + }, + "type" : "array" + } + }, + "required" : [ "history", "id", "name" ], + "type" : "object" + }, + "LayerStatus" : { + "example" : { + "latestVersion" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "name" : "name", + "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91" + }, + "properties" : { + "id" : { + "format" : "uuid", + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "latestVersion" : { + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "id", "latestVersion", "name" ], + "type" : "object" + }, + "LayerVersion" : { + "example" : { + "previousVersionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "versionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "layerId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91", + "provenance" : { + "application" : "application", + "author" : "author", + "timestamp" : "timestamp" + } + }, + "properties" : { + "layerId" : { + "format" : "uuid", + "type" : "string" + }, + "versionId" : { + "format" : "uuid", + "type" : "string" + }, + "previousVersionId" : { + "format" : "uuid", + "type" : "string" + }, + "provenance" : { + "$ref" : "#/components/schemas/IfcxProvenanceData" + } + }, + "required" : [ "layerId", "previousVersionId", "provenance", "versionId" ], + "type" : "object" + }, + "LayerVersionIfcxFile" : { + "example" : { + "blobUrl" : "blobUrl" + }, + "properties" : { + "blobUrl" : { + "type" : "string" + } + }, + "required" : [ "blobUrl" ], + "type" : "object" + }, + "uuid" : { + "format" : "uuid", + "type" : "string" + } + } + } +} diff --git a/sdk/ts/.gitignore b/sdk/ts/.gitignore new file mode 100644 index 00000000..691a8a9c --- /dev/null +++ b/sdk/ts/.gitignore @@ -0,0 +1,3 @@ +/node_modules +*.js +*.ifcx \ No newline at end of file diff --git a/sdk/ts/IfcxIndexFile.ts b/sdk/ts/IfcxIndexFile.ts new file mode 100644 index 00000000..284d8f5c --- /dev/null +++ b/sdk/ts/IfcxIndexFile.ts @@ -0,0 +1,313 @@ +// To parse this data: +// +// import { Convert, IfcxIndexFile } from "./file"; +// +// const ifcxIndexFile = Convert.toIfcxIndexFile(json); +// +// These functions will throw an error if the JSON doesn't +// match the expected interface, even if the JSON is valid. + +export interface IfcxIndexFile { + attributeTables: AttributeTableElement[]; + header: IfcxIndexFileHeader; + imports: ImportElement[]; + sections: SectionElement[]; + [property: string]: any; +} + +export interface AttributeTableElement { + filename: string; + schema: any; + type: Type; + [property: string]: any; +} + +export enum Type { + Ndjson = "NDJSON", + Parquet = "PARQUET", +} + +export interface IfcxIndexFileHeader { + ifcxVersion: string; + [property: string]: any; +} + +export interface ImportElement { + integrity?: string; + uri: string; + [property: string]: any; +} + +export interface SectionElement { + header: SectionHeader; + nodes: NodeElement[]; + [property: string]: any; +} + +export interface SectionHeader { + application: string; + author: string; + dataVersion: string; + id: string; + timestamp: string; + [property: string]: any; +} + +export interface NodeElement { + attributes?: AttributeElement[]; + children?: ChildElement[]; + inherits?: ChildElement[]; + path: string; + [property: string]: any; +} + +export interface AttributeElement { + name: string; + opinion: Opinion; + value?: Value; + [property: string]: any; +} + +export enum Opinion { + Delete = "DELETE", + PassThrough = "PASS_THROUGH", + Value = "VALUE", +} + +export interface Value { + componentIndex: number; + typeID: string; + [property: string]: any; +} + +export interface ChildElement { + name: string; + opinion: Opinion; + value?: string; + [property: string]: any; +} + +// Converts JSON strings to/from your types +// and asserts the results of JSON.parse at runtime +export class Convert { + public static toIfcxIndexFile(json: string): IfcxIndexFile { + return cast(JSON.parse(json), r("IfcxIndexFile")); + } + + public static ifcxIndexFileToJson(value: IfcxIndexFile): string { + return JSON.stringify(uncast(value, r("IfcxIndexFile")), null, 2); + } +} + +function invalidValue(typ: any, val: any, key: any, parent: any = ''): never { + const prettyTyp = prettyTypeName(typ); + const parentText = parent ? ` on ${parent}` : ''; + const keyText = key ? ` for key "${key}"` : ''; + throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`); +} + +function prettyTypeName(typ: any): string { + if (Array.isArray(typ)) { + if (typ.length === 2 && typ[0] === undefined) { + return `an optional ${prettyTypeName(typ[1])}`; + } else { + return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`; + } + } else if (typeof typ === "object" && typ.literal !== undefined) { + return typ.literal; + } else { + return typeof typ; + } +} + +function jsonToJSProps(typ: any): any { + if (typ.jsonToJS === undefined) { + const map: any = {}; + typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ }); + typ.jsonToJS = map; + } + return typ.jsonToJS; +} + +function jsToJSONProps(typ: any): any { + if (typ.jsToJSON === undefined) { + const map: any = {}; + typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ }); + typ.jsToJSON = map; + } + return typ.jsToJSON; +} + +function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any { + function transformPrimitive(typ: string, val: any): any { + if (typeof typ === typeof val) return val; + return invalidValue(typ, val, key, parent); + } + + function transformUnion(typs: any[], val: any): any { + // val must validate against one typ in typs + const l = typs.length; + for (let i = 0; i < l; i++) { + const typ = typs[i]; + try { + return transform(val, typ, getProps); + } catch (_) {} + } + return invalidValue(typs, val, key, parent); + } + + function transformEnum(cases: string[], val: any): any { + if (cases.indexOf(val) !== -1) return val; + return invalidValue(cases.map(a => { return l(a); }), val, key, parent); + } + + function transformArray(typ: any, val: any): any { + // val must be an array with no invalid elements + if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent); + return val.map(el => transform(el, typ, getProps)); + } + + function transformDate(val: any): any { + if (val === null) { + return null; + } + const d = new Date(val); + if (isNaN(d.valueOf())) { + return invalidValue(l("Date"), val, key, parent); + } + return d; + } + + function transformObject(props: { [k: string]: any }, additional: any, val: any): any { + if (val === null || typeof val !== "object" || Array.isArray(val)) { + return invalidValue(l(ref || "object"), val, key, parent); + } + const result: any = {}; + Object.getOwnPropertyNames(props).forEach(key => { + const prop = props[key]; + const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined; + result[prop.key] = transform(v, prop.typ, getProps, key, ref); + }); + Object.getOwnPropertyNames(val).forEach(key => { + if (!Object.prototype.hasOwnProperty.call(props, key)) { + result[key] = transform(val[key], additional, getProps, key, ref); + } + }); + return result; + } + + if (typ === "any") return val; + if (typ === null) { + if (val === null) return val; + return invalidValue(typ, val, key, parent); + } + if (typ === false) return invalidValue(typ, val, key, parent); + let ref: any = undefined; + while (typeof typ === "object" && typ.ref !== undefined) { + ref = typ.ref; + typ = typeMap[typ.ref]; + } + if (Array.isArray(typ)) return transformEnum(typ, val); + if (typeof typ === "object") { + return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val) + : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val) + : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val) + : invalidValue(typ, val, key, parent); + } + // Numbers can be parsed by Date but shouldn't be. + if (typ === Date && typeof val !== "number") return transformDate(val); + return transformPrimitive(typ, val); +} + +function cast(val: any, typ: any): T { + return transform(val, typ, jsonToJSProps); +} + +function uncast(val: T, typ: any): any { + return transform(val, typ, jsToJSONProps); +} + +function l(typ: any) { + return { literal: typ }; +} + +function a(typ: any) { + return { arrayItems: typ }; +} + +function u(...typs: any[]) { + return { unionMembers: typs }; +} + +function o(props: any[], additional: any) { + return { props, additional }; +} + +function m(additional: any) { + return { props: [], additional }; +} + +function r(name: string) { + return { ref: name }; +} + +const typeMap: any = { + "IfcxIndexFile": o([ + { json: "attributeTables", js: "attributeTables", typ: a(r("AttributeTableElement")) }, + { json: "header", js: "header", typ: r("IfcxIndexFileHeader") }, + { json: "imports", js: "imports", typ: a(r("ImportElement")) }, + { json: "sections", js: "sections", typ: a(r("SectionElement")) }, + ], "any"), + "AttributeTableElement": o([ + { json: "filename", js: "filename", typ: "" }, + { json: "schema", js: "schema", typ: "any" }, + { json: "type", js: "type", typ: r("Type") }, + ], "any"), + "IfcxIndexFileHeader": o([ + { json: "ifcxVersion", js: "ifcxVersion", typ: "" }, + ], "any"), + "ImportElement": o([ + { json: "integrity", js: "integrity", typ: u(undefined, "") }, + { json: "uri", js: "uri", typ: "" }, + ], "any"), + "SectionElement": o([ + { json: "header", js: "header", typ: r("SectionHeader") }, + { json: "nodes", js: "nodes", typ: a(r("NodeElement")) }, + ], "any"), + "SectionHeader": o([ + { json: "application", js: "application", typ: "" }, + { json: "author", js: "author", typ: "" }, + { json: "dataVersion", js: "dataVersion", typ: "" }, + { json: "id", js: "id", typ: "" }, + { json: "timestamp", js: "timestamp", typ: "" }, + ], "any"), + "NodeElement": o([ + { json: "attributes", js: "attributes", typ: u(undefined, a(r("AttributeElement"))) }, + { json: "children", js: "children", typ: u(undefined, a(r("ChildElement"))) }, + { json: "inherits", js: "inherits", typ: u(undefined, a(r("ChildElement"))) }, + { json: "path", js: "path", typ: "" }, + ], "any"), + "AttributeElement": o([ + { json: "name", js: "name", typ: "" }, + { json: "opinion", js: "opinion", typ: r("Opinion") }, + { json: "value", js: "value", typ: u(undefined, r("Value")) }, + ], "any"), + "Value": o([ + { json: "componentIndex", js: "componentIndex", typ: 0 }, + { json: "typeID", js: "typeID", typ: "" }, + ], "any"), + "ChildElement": o([ + { json: "name", js: "name", typ: "" }, + { json: "opinion", js: "opinion", typ: r("Opinion") }, + { json: "value", js: "value", typ: u(undefined, "") }, + ], "any"), + "Type": [ + "NDJSON", + "PARQUET", + ], + "Opinion": [ + "DELETE", + "PASS_THROUGH", + "VALUE", + ], +}; diff --git a/sdk/ts/IfxcFile.ts b/sdk/ts/IfxcFile.ts new file mode 100644 index 00000000..6dfb675e --- /dev/null +++ b/sdk/ts/IfxcFile.ts @@ -0,0 +1,124 @@ +import JSZip from "jszip"; +import { IfcxIndexFile, Convert, SectionElement, ImportElement, Type } from "./IfcxIndexFile"; + +interface TypeIdentity { + typeID: string; + originSchemaSrc: string; + fromJSONString: (str: string) => T; + toJSONString: (component: T) => string; +} + +export async function LoadIfcxFile(bytes: Uint8Array) +{ + const zip = new JSZip(); + let output = await zip.loadAsync(bytes); + + let files: Map = new Map(); + for (let key in output.files) { + let file = output.files[key]; + let arr = await file.async("uint8array"); + let name = key; + files.set(name, arr); + } + + let ifcxFile = new IfcxFile(); + + let arr = files.get("index.json"); + if (!arr) throw new Error(`No index file`); + + const decoder = new TextDecoder("utf-8"); + const str = decoder.decode(arr); + + ifcxFile.index = Convert.toIfcxIndexFile(str); + + for (let [filename, bytes] of files) + { + if (filename.endsWith(".ndjson")) + { + let type = filename.replace(".ndjson", ""); + + const decoder = new TextDecoder("utf-8"); + const str = decoder.decode(bytes); + ifcxFile.serializedComponents.set(type, str.split("\n")); + } + } + + return ifcxFile; +} + +export async function WriteIfcxFile(file: IfcxFile) +{ + const zip = new JSZip(); + + await zip.file("index.json", JSON.stringify(file.index, null, 4)); + for (let [typeID, components] of file.serializedComponents) + { + await zip.file(`${typeID}.ndjson`, components.join("\n")); + } + + return await zip.generateAsync({type: "uint8array"}); +} + +export class IfcxFile +{ + public index: IfcxIndexFile; + public serializedComponents: Map; + + constructor() + { + this.serializedComponents = new Map(); + this.index = { + header: { + ifcxVersion: "post-alpha" + }, + sections: [], + imports: [], + attributeTables: [] + }; + } + + public AddImport(imp: ImportElement) + { + this.index.imports.push(imp); + } + + public AddSection(section: SectionElement) + { + this.index.sections.push(section); + } + + private GetSerializedComponentsArray(identity: TypeIdentity): string[] + { + if (!this.serializedComponents.has(identity.typeID)) + { + this.serializedComponents.set(identity.typeID, []); + + // init attr table entry + this.index.attributeTables.push({ + type: Type.Ndjson, + filename: `${identity.typeID}.ndjson`, + schema: JSON.parse(identity.originSchemaSrc), + }); + } + return this.serializedComponents.get(identity.typeID)!; + } + + AddComponent(id: TypeIdentity, component: T): number + { + let arr = this.GetSerializedComponentsArray(id); + let index = arr.length; + let indentedStr = id.toJSONString(component); + arr.push(JSON.stringify(JSON.parse(indentedStr))); // this dance is due to quicktype pretty printing... + return index; + } + + ReadComponent(id: TypeIdentity, index: number) + { + let arr = this.GetSerializedComponentsArray(id); + if (arr.length <= index) + { + throw new Error(`No component with index ${index}`); + } + return id.fromJSONString(arr[index]); + } +} \ No newline at end of file diff --git a/sdk/ts/api-client/.kiota.log b/sdk/ts/api-client/.kiota.log new file mode 100644 index 00000000..9b3570d0 --- /dev/null +++ b/sdk/ts/api-client/.kiota.log @@ -0,0 +1,2 @@ +Warning: KiotaBuilder OpenAPI warning: #/ - A servers entry (v3) or host + basePath + schemes properties (v2) was not present in the OpenAPI description. The root URL will need to be set manually with the request adapter. +Warning: KiotaBuilder No server url found in the OpenAPI document. The base url will need to be set when using the client. diff --git a/sdk/ts/api-client/apiClient.ts b/sdk/ts/api-client/apiClient.ts new file mode 100644 index 00000000..ca46e11b --- /dev/null +++ b/sdk/ts/api-client/apiClient.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { IfcxApiRequestBuilderNavigationMetadata, type IfcxApiRequestBuilder } from './ifcxApi/index.js'; +// @ts-ignore +import { apiClientProxifier, ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions'; +// @ts-ignore +import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form'; +// @ts-ignore +import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json'; +// @ts-ignore +import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart'; +// @ts-ignore +import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text'; + +/** + * The main entry point of the SDK, exposes the configuration and the fluent API. + */ +export interface ApiClient extends BaseRequestBuilder { + /** + * The ifcxApi property + */ + get ifcxApi(): IfcxApiRequestBuilder; +} +/** + * Instantiates a new {@link ApiClient} and sets the default values. + * @param requestAdapter The request adapter to use to execute the requests. + */ +// @ts-ignore +export function createApiClient(requestAdapter: RequestAdapter) { + if (requestAdapter === undefined) { + throw new Error("requestAdapter cannot be undefined"); + } + const serializationWriterFactory = requestAdapter.getSerializationWriterFactory() as SerializationWriterFactoryRegistry; + const parseNodeFactoryRegistry = requestAdapter.getParseNodeFactory() as ParseNodeFactoryRegistry; + const backingStoreFactory = requestAdapter.getBackingStoreFactory(); + + if (parseNodeFactoryRegistry.registerDefaultDeserializer) { + parseNodeFactoryRegistry.registerDefaultDeserializer(JsonParseNodeFactory, backingStoreFactory); + parseNodeFactoryRegistry.registerDefaultDeserializer(TextParseNodeFactory, backingStoreFactory); + parseNodeFactoryRegistry.registerDefaultDeserializer(FormParseNodeFactory, backingStoreFactory); + } + + if (serializationWriterFactory.registerDefaultSerializer) { + serializationWriterFactory.registerDefaultSerializer(JsonSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(TextSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(FormSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(MultipartSerializationWriterFactory); + } + + const pathParameters: Record = { + "baseurl": requestAdapter.baseUrl, + }; + return apiClientProxifier(requestAdapter, pathParameters, ApiClientNavigationMetadata, undefined); +} +/** + * Uri template for the request builder. + */ +export const ApiClientUriTemplate = "{+baseurl}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ApiClientNavigationMetadata: Record, NavigationMetadata> = { + ifcxApi: { + navigationMetadata: IfcxApiRequestBuilderNavigationMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/download/index.ts b/sdk/ts/api-client/ifcxApi/download/index.ts new file mode 100644 index 00000000..3684315b --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/download/index.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type WithBlobItemRequestBuilder, WithBlobItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Guid, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/download + */ +export interface DownloadRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.ifcxApi.download.item collection + * @param blobId Unique identifier of the item + * @returns {WithBlobItemRequestBuilder} + */ + byBlobId(blobId: Guid) : WithBlobItemRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const DownloadRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/download"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const DownloadRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byBlobId: { + requestsMetadata: WithBlobItemRequestBuilderRequestsMetadata, + pathParametersMappings: ["blobId"], + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/download/item/index.ts b/sdk/ts/api-client/ifcxApi/download/item/index.ts new file mode 100644 index 00000000..a8fb93c8 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/download/item/index.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/download/{blobId} + */ +export interface WithBlobItemRequestBuilder extends BaseRequestBuilder { + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + put(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPutRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithBlobItemRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/download/{blobId}"; +/** + * Metadata for all the requests in the request builder. + */ +export const WithBlobItemRequestBuilderRequestsMetadata: RequestsMetadata = { + put: { + uriTemplate: WithBlobItemRequestBuilderUriTemplate, + responseBodyContentType: "*/*", + adapterMethodName: "sendPrimitive", + responseBodyFactory: "ArrayBuffer", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/index.ts b/sdk/ts/api-client/ifcxApi/index.ts new file mode 100644 index 00000000..0cb5424b --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/index.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { DownloadRequestBuilderNavigationMetadata, type DownloadRequestBuilder } from './download/index.js'; +// @ts-ignore +import { LayersRequestBuilderNavigationMetadata, LayersRequestBuilderRequestsMetadata, type LayersRequestBuilder } from './layers/index.js'; +// @ts-ignore +import { type UploadRequestBuilder, UploadRequestBuilderNavigationMetadata } from './upload/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api + */ +export interface IfcxApiRequestBuilder extends BaseRequestBuilder { + /** + * The download property + */ + get download(): DownloadRequestBuilder; + /** + * The layers property + */ + get layers(): LayersRequestBuilder; + /** + * The upload property + */ + get upload(): UploadRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const IfcxApiRequestBuilderUriTemplate = "{+baseurl}/ifcx-api"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const IfcxApiRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + download: { + navigationMetadata: DownloadRequestBuilderNavigationMetadata, + }, + layers: { + requestsMetadata: LayersRequestBuilderRequestsMetadata, + navigationMetadata: LayersRequestBuilderNavigationMetadata, + }, + upload: { + navigationMetadata: UploadRequestBuilderNavigationMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/index.ts b/sdk/ts/api-client/ifcxApi/layers/index.ts new file mode 100644 index 00000000..caa3ab73 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/index.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createLayerStatusFromDiscriminatorValue, serializeCreateLayerCommand, type CreateLayerCommand, type LayerStatus } from '../../models/index.js'; +// @ts-ignore +import { type WithLayerItemRequestBuilder, WithLayerItemRequestBuilderNavigationMetadata, WithLayerItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Guid, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers + */ +export interface LayersRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.ifcxApi.layers.item collection + * @param layerId Unique identifier of the item + * @returns {WithLayerItemRequestBuilder} + */ + byLayerId(layerId: Guid) : WithLayerItemRequestBuilder; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + post(body: CreateLayerCommand, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: CreateLayerCommand, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const LayersRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const LayersRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byLayerId: { + requestsMetadata: WithLayerItemRequestBuilderRequestsMetadata, + navigationMetadata: WithLayerItemRequestBuilderNavigationMetadata, + pathParametersMappings: ["layerId"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const LayersRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: LayersRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "sendCollection", + responseBodyFactory: createLayerStatusFromDiscriminatorValue, + }, + post: { + uriTemplate: LayersRequestBuilderUriTemplate, + adapterMethodName: "sendPrimitive", + responseBodyFactory: "ArrayBuffer", + requestBodyContentType: "application/json", + requestBodySerializer: serializeCreateLayerCommand, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/history/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/history/index.ts new file mode 100644 index 00000000..bb4dabbf --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/history/index.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createLayerHistoryFromDiscriminatorValue, type LayerHistory } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/history + */ +export interface HistoryRequestBuilder extends BaseRequestBuilder { + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const HistoryRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/history"; +/** + * Metadata for all the requests in the request builder. + */ +export const HistoryRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: HistoryRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createLayerHistoryFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/index.ts new file mode 100644 index 00000000..8a0dc505 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/index.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createLayerDetailsFromDiscriminatorValue, type LayerDetails } from '../../../models/index.js'; +// @ts-ignore +import { type UploadIfcxBlobUrlRequestBuilder, UploadIfcxBlobUrlRequestBuilderRequestsMetadata } from './uploadIfcxBlobUrl/index.js'; +// @ts-ignore +import { type VersionsRequestBuilder, VersionsRequestBuilderNavigationMetadata, VersionsRequestBuilderRequestsMetadata } from './versions/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId} + */ +export interface WithLayerItemRequestBuilder extends BaseRequestBuilder { + /** + * The uploadIfcxBlobUrl property + */ + get uploadIfcxBlobUrl(): UploadIfcxBlobUrlRequestBuilder; + /** + * The versions property + */ + get versions(): VersionsRequestBuilder; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + delete(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithLayerItemRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const WithLayerItemRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + uploadIfcxBlobUrl: { + requestsMetadata: UploadIfcxBlobUrlRequestBuilderRequestsMetadata, + }, + versions: { + requestsMetadata: VersionsRequestBuilderRequestsMetadata, + navigationMetadata: VersionsRequestBuilderNavigationMetadata, + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const WithLayerItemRequestBuilderRequestsMetadata: RequestsMetadata = { + delete: { + uriTemplate: WithLayerItemRequestBuilderUriTemplate, + adapterMethodName: "sendPrimitive", + responseBodyFactory: "ArrayBuffer", + }, + get: { + uriTemplate: WithLayerItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createLayerDetailsFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/uploadIfcxBlobUrl/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/uploadIfcxBlobUrl/index.ts new file mode 100644 index 00000000..59d08d08 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/uploadIfcxBlobUrl/index.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createBlobResponseFromDiscriminatorValue, type BlobResponse } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/upload-ifcx-blob-url + */ +export interface UploadIfcxBlobUrlRequestBuilder extends BaseRequestBuilder { + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + post(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const UploadIfcxBlobUrlRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/upload-ifcx-blob-url"; +/** + * Metadata for all the requests in the request builder. + */ +export const UploadIfcxBlobUrlRequestBuilderRequestsMetadata: RequestsMetadata = { + post: { + uriTemplate: UploadIfcxBlobUrlRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createBlobResponseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/versions/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/versions/index.ts new file mode 100644 index 00000000..c3a24018 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/versions/index.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createCreateLayerVersionResponseFromDiscriminatorValue, serializeCreateLayerVersionCommand, serializeCreateLayerVersionResponse, type CreateLayerVersionCommand, type CreateLayerVersionResponse } from '../../../../models/index.js'; +// @ts-ignore +import { type WithVersionItemRequestBuilder, WithVersionItemRequestBuilderNavigationMetadata, WithVersionItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Guid, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/versions + */ +export interface VersionsRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.ifcxApi.layers.item.versions.item collection + * @param versionId Unique identifier of the item + * @returns {WithVersionItemRequestBuilder} + */ + byVersionId(versionId: Guid) : WithVersionItemRequestBuilder; + /** + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + post(body: CreateLayerVersionCommand, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: CreateLayerVersionCommand, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const VersionsRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/versions"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const VersionsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byVersionId: { + requestsMetadata: WithVersionItemRequestBuilderRequestsMetadata, + navigationMetadata: WithVersionItemRequestBuilderNavigationMetadata, + pathParametersMappings: ["versionId"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const VersionsRequestBuilderRequestsMetadata: RequestsMetadata = { + post: { + uriTemplate: VersionsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createCreateLayerVersionResponseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeCreateLayerVersionCommand, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/versions/item/downloadIfcx/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/downloadIfcx/index.ts new file mode 100644 index 00000000..5578318f --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/downloadIfcx/index.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createLayerVersionIfcxFileFromDiscriminatorValue, IfcxFileDownloadType, type LayerVersionIfcxFile } from '../../../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx + */ +export interface DownloadIfcxRequestBuilder extends BaseRequestBuilder { + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + put(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPutRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +export interface DownloadIfcxRequestBuilderPutQueryParameters { + downloadType?: IfcxFileDownloadType; +} +/** + * Uri template for the request builder. + */ +export const DownloadIfcxRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx?downloadType={downloadType}"; +/** + * Metadata for all the requests in the request builder. + */ +export const DownloadIfcxRequestBuilderRequestsMetadata: RequestsMetadata = { + put: { + uriTemplate: DownloadIfcxRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createLayerVersionIfcxFileFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/versions/item/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/index.ts new file mode 100644 index 00000000..1ca02ebb --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/index.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createLayerVersionFromDiscriminatorValue, type LayerVersion } from '../../../../../models/index.js'; +// @ts-ignore +import { DownloadIfcxRequestBuilderRequestsMetadata, type DownloadIfcxRequestBuilder } from './downloadIfcx/index.js'; +// @ts-ignore +import { QueryRequestBuilderRequestsMetadata, type QueryRequestBuilder } from './query/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/versions/{versionId} + */ +export interface WithVersionItemRequestBuilder extends BaseRequestBuilder { + /** + * The downloadIfcx property + */ + get downloadIfcx(): DownloadIfcxRequestBuilder; + /** + * The query property + */ + get query(): QueryRequestBuilder; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithVersionItemRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const WithVersionItemRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + downloadIfcx: { + requestsMetadata: DownloadIfcxRequestBuilderRequestsMetadata, + }, + query: { + requestsMetadata: QueryRequestBuilderRequestsMetadata, + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const WithVersionItemRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: WithVersionItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "send", + responseBodyFactory: createLayerVersionFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/layers/item/versions/item/query/index.ts b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/query/index.ts new file mode 100644 index 00000000..54522819 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/layers/item/versions/item/query/index.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/layers/{layerId}/versions/{versionId}/query + */ +export interface QueryRequestBuilder extends BaseRequestBuilder { + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +export interface QueryRequestBuilderGetQueryParameters { + expandChildren?: boolean; + expandChildrenRecursive?: boolean; + path?: string; + provenance?: boolean; +} +/** + * Uri template for the request builder. + */ +export const QueryRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/layers/{layerId}/versions/{versionId}/query?expandChildren={expandChildren}&expandChildrenRecursive={expandChildrenRecursive}&path={path}&provenance={provenance}"; +/** + * Metadata for all the requests in the request builder. + */ +export const QueryRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: QueryRequestBuilderUriTemplate, + adapterMethodName: "sendPrimitive", + responseBodyFactory: "ArrayBuffer", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/upload/index.ts b/sdk/ts/api-client/ifcxApi/upload/index.ts new file mode 100644 index 00000000..3d2b69cc --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/upload/index.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type WithBlobItemRequestBuilder, WithBlobItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Guid, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/upload + */ +export interface UploadRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.ifcxApi.upload.item collection + * @param blobId Unique identifier of the item + * @returns {WithBlobItemRequestBuilder} + */ + byBlobId(blobId: Guid) : WithBlobItemRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const UploadRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/upload"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const UploadRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byBlobId: { + requestsMetadata: WithBlobItemRequestBuilderRequestsMetadata, + pathParametersMappings: ["blobId"], + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/ifcxApi/upload/item/index.ts b/sdk/ts/api-client/ifcxApi/upload/item/index.ts new file mode 100644 index 00000000..2d5e9f39 --- /dev/null +++ b/sdk/ts/api-client/ifcxApi/upload/item/index.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /ifcx-api/upload/{blobId} + */ +export interface WithBlobItemRequestBuilder extends BaseRequestBuilder { + /** + * @param body Binary request body + * @param contentType The request body content type. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + put(body: ArrayBuffer | undefined, contentType: string | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * @param body Binary request body + * @param contentType The request body content type. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPutRequestInformation(body: ArrayBuffer | undefined, contentType: string | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithBlobItemRequestBuilderUriTemplate = "{+baseurl}/ifcx-api/upload/{blobId}"; +/** + * Metadata for all the requests in the request builder. + */ +export const WithBlobItemRequestBuilderRequestsMetadata: RequestsMetadata = { + put: { + uriTemplate: WithBlobItemRequestBuilderUriTemplate, + adapterMethodName: "sendPrimitive", + responseBodyFactory: "ArrayBuffer", + requestInformationContentSetMethod: "setStreamContent", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/api-client/kiota-lock.json b/sdk/ts/api-client/kiota-lock.json new file mode 100644 index 00000000..1d090f14 --- /dev/null +++ b/sdk/ts/api-client/kiota-lock.json @@ -0,0 +1,34 @@ +{ + "descriptionHash": "7D76D26E014CCB63502D64EF36EBFFC31FB5F70CF07B8CEB714EACE1C0FBEA2074D9183C35DF984CBFDACE96BDA48ABD785DDF7F5BB23C79A389612D5782051E", + "descriptionLocation": "../../../standard/api/openapi.json", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.30.0", + "clientClassName": "ApiClient", + "typeAccessModifier": "Public", + "clientNamespaceName": "ApiSdk", + "language": "TypeScript", + "usesBackingStore": false, + "excludeBackwardCompatible": false, + "includeAdditionalData": true, + "disableSSLValidation": false, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/sdk/ts/api-client/models/index.ts b/sdk/ts/api-client/models/index.ts new file mode 100644 index 00000000..f8649e53 --- /dev/null +++ b/sdk/ts/api-client/models/index.ts @@ -0,0 +1,440 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { type AdditionalDataHolder, type Guid, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; + +export interface BlobResponse extends AdditionalDataHolder, Parsable { + /** + * The blobId property + */ + blobId?: Guid | null; + /** + * The putURL property + */ + putURL?: string | null; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {BlobResponse} + */ +// @ts-ignore +export function createBlobResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoBlobResponse; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {CreateLayerCommand} + */ +// @ts-ignore +export function createCreateLayerCommandFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreateLayerCommand; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {CreateLayerVersionCommand} + */ +// @ts-ignore +export function createCreateLayerVersionCommandFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreateLayerVersionCommand; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {CreateLayerVersionResponse} + */ +// @ts-ignore +export function createCreateLayerVersionResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreateLayerVersionResponse; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {IfcxProvenanceData} + */ +// @ts-ignore +export function createIfcxProvenanceDataFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoIfcxProvenanceData; +} +export interface CreateLayerCommand extends AdditionalDataHolder, Parsable { + /** + * The id property + */ + id?: Guid | null; + /** + * The name property + */ + name?: string | null; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {LayerDetails} + */ +// @ts-ignore +export function createLayerDetailsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoLayerDetails; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {LayerStatus} + */ +// @ts-ignore +export function createLayerStatusFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoLayerStatus; +} +export interface CreateLayerVersionCommand extends AdditionalDataHolder, Parsable { + /** + * The blobId property + */ + blobId?: Guid | null; + /** + * The id property + */ + id?: Guid | null; + /** + * The previousLayerVersionId property + */ + previousLayerVersionId?: Guid | null; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {LayerVersion} + */ +// @ts-ignore +export function createLayerVersionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoLayerVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {LayerVersionIfcxFile} + */ +// @ts-ignore +export function createLayerVersionIfcxFileFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoLayerVersionIfcxFile; +} +export interface CreateLayerVersionResponse extends AdditionalDataHolder, Parsable { + /** + * The state property + */ + state?: CreateLayerVersionResponseState | null; +} +export type CreateLayerVersionResponseState = (typeof CreateLayerVersionResponseStateObject)[keyof typeof CreateLayerVersionResponseStateObject]; +/** + * The deserialization information for the current model + * @param BlobResponse The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBlobResponse(blobResponse: Partial | undefined = {}) : Record void> { + return { + "blobId": n => { blobResponse.blobId = n.getGuidValue(); }, + "putURL": n => { blobResponse.putURL = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param CreateLayerCommand The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreateLayerCommand(createLayerCommand: Partial | undefined = {}) : Record void> { + return { + "id": n => { createLayerCommand.id = n.getGuidValue(); }, + "name": n => { createLayerCommand.name = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param CreateLayerVersionCommand The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreateLayerVersionCommand(createLayerVersionCommand: Partial | undefined = {}) : Record void> { + return { + "blobId": n => { createLayerVersionCommand.blobId = n.getGuidValue(); }, + "id": n => { createLayerVersionCommand.id = n.getGuidValue(); }, + "previousLayerVersionId": n => { createLayerVersionCommand.previousLayerVersionId = n.getGuidValue(); }, + } +} +/** + * The deserialization information for the current model + * @param CreateLayerVersionResponse The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreateLayerVersionResponse(createLayerVersionResponse: Partial | undefined = {}) : Record void> { + return { + "state": n => { createLayerVersionResponse.state = n.getEnumValue(CreateLayerVersionResponseStateObject); }, + } +} +/** + * The deserialization information for the current model + * @param IfcxProvenanceData The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoIfcxProvenanceData(ifcxProvenanceData: Partial | undefined = {}) : Record void> { + return { + "application": n => { ifcxProvenanceData.application = n.getStringValue(); }, + "author": n => { ifcxProvenanceData.author = n.getStringValue(); }, + "timestamp": n => { ifcxProvenanceData.timestamp = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param LayerDetails The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLayerDetails(layerDetails: Partial | undefined = {}) : Record void> { + return { + "history": n => { layerDetails.history = n.getCollectionOfObjectValues(createLayerVersionFromDiscriminatorValue); }, + "id": n => { layerDetails.id = n.getGuidValue(); }, + "name": n => { layerDetails.name = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param LayerStatus The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLayerStatus(layerStatus: Partial | undefined = {}) : Record void> { + return { + "id": n => { layerStatus.id = n.getGuidValue(); }, + "latestVersion": n => { layerStatus.latestVersion = n.getGuidValue(); }, + "name": n => { layerStatus.name = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param LayerVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLayerVersion(layerVersion: Partial | undefined = {}) : Record void> { + return { + "layerId": n => { layerVersion.layerId = n.getGuidValue(); }, + "previousVersionId": n => { layerVersion.previousVersionId = n.getGuidValue(); }, + "provenance": n => { layerVersion.provenance = n.getObjectValue(createIfcxProvenanceDataFromDiscriminatorValue); }, + "versionId": n => { layerVersion.versionId = n.getGuidValue(); }, + } +} +/** + * The deserialization information for the current model + * @param LayerVersionIfcxFile The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLayerVersionIfcxFile(layerVersionIfcxFile: Partial | undefined = {}) : Record void> { + return { + "blobUrl": n => { layerVersionIfcxFile.blobUrl = n.getStringValue(); }, + } +} +export type IfcxFileDownloadType = (typeof IfcxFileDownloadTypeObject)[keyof typeof IfcxFileDownloadTypeObject]; +export interface IfcxProvenanceData extends AdditionalDataHolder, Parsable { + /** + * The application property + */ + application?: string | null; + /** + * The author property + */ + author?: string | null; + /** + * The timestamp property + */ + timestamp?: string | null; +} +export interface LayerDetails extends AdditionalDataHolder, Parsable { + /** + * The history property + */ + history?: LayerVersion[] | null; + /** + * The id property + */ + id?: Guid | null; + /** + * The name property + */ + name?: string | null; +} +export interface LayerStatus extends AdditionalDataHolder, Parsable { + /** + * The id property + */ + id?: Guid | null; + /** + * The latestVersion property + */ + latestVersion?: Guid | null; + /** + * The name property + */ + name?: string | null; +} +export interface LayerVersion extends AdditionalDataHolder, Parsable { + /** + * The layerId property + */ + layerId?: Guid | null; + /** + * The previousVersionId property + */ + previousVersionId?: Guid | null; + /** + * The provenance property + */ + provenance?: IfcxProvenanceData | null; + /** + * The versionId property + */ + versionId?: Guid | null; +} +export interface LayerVersionIfcxFile extends AdditionalDataHolder, Parsable { + /** + * The blobUrl property + */ + blobUrl?: string | null; +} +/** + * Serializes information the current object + * @param BlobResponse The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBlobResponse(writer: SerializationWriter, blobResponse: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!blobResponse || isSerializingDerivedType) { return; } + writer.writeGuidValue("blobId", blobResponse.blobId); + writer.writeStringValue("putURL", blobResponse.putURL); + writer.writeAdditionalData(blobResponse.additionalData); +} +/** + * Serializes information the current object + * @param CreateLayerCommand The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreateLayerCommand(writer: SerializationWriter, createLayerCommand: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!createLayerCommand || isSerializingDerivedType) { return; } + writer.writeGuidValue("id", createLayerCommand.id); + writer.writeStringValue("name", createLayerCommand.name); + writer.writeAdditionalData(createLayerCommand.additionalData); +} +/** + * Serializes information the current object + * @param CreateLayerVersionCommand The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreateLayerVersionCommand(writer: SerializationWriter, createLayerVersionCommand: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!createLayerVersionCommand || isSerializingDerivedType) { return; } + writer.writeGuidValue("blobId", createLayerVersionCommand.blobId); + writer.writeGuidValue("id", createLayerVersionCommand.id); + writer.writeGuidValue("previousLayerVersionId", createLayerVersionCommand.previousLayerVersionId); + writer.writeAdditionalData(createLayerVersionCommand.additionalData); +} +/** + * Serializes information the current object + * @param CreateLayerVersionResponse The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreateLayerVersionResponse(writer: SerializationWriter, createLayerVersionResponse: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!createLayerVersionResponse || isSerializingDerivedType) { return; } + writer.writeEnumValue("state", createLayerVersionResponse.state); + writer.writeAdditionalData(createLayerVersionResponse.additionalData); +} +/** + * Serializes information the current object + * @param IfcxProvenanceData The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeIfcxProvenanceData(writer: SerializationWriter, ifcxProvenanceData: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!ifcxProvenanceData || isSerializingDerivedType) { return; } + writer.writeStringValue("application", ifcxProvenanceData.application); + writer.writeStringValue("author", ifcxProvenanceData.author); + writer.writeStringValue("timestamp", ifcxProvenanceData.timestamp); + writer.writeAdditionalData(ifcxProvenanceData.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param LayerDetails The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLayerDetails(writer: SerializationWriter, layerDetails: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!layerDetails || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("history", layerDetails.history, serializeLayerVersion); + writer.writeGuidValue("id", layerDetails.id); + writer.writeStringValue("name", layerDetails.name); + writer.writeAdditionalData(layerDetails.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param LayerStatus The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLayerStatus(writer: SerializationWriter, layerStatus: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!layerStatus || isSerializingDerivedType) { return; } + writer.writeGuidValue("id", layerStatus.id); + writer.writeGuidValue("latestVersion", layerStatus.latestVersion); + writer.writeStringValue("name", layerStatus.name); + writer.writeAdditionalData(layerStatus.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param LayerVersion The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLayerVersion(writer: SerializationWriter, layerVersion: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!layerVersion || isSerializingDerivedType) { return; } + writer.writeGuidValue("layerId", layerVersion.layerId); + writer.writeGuidValue("previousVersionId", layerVersion.previousVersionId); + writer.writeObjectValue("provenance", layerVersion.provenance, serializeIfcxProvenanceData); + writer.writeGuidValue("versionId", layerVersion.versionId); + writer.writeAdditionalData(layerVersion.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param LayerVersionIfcxFile The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLayerVersionIfcxFile(writer: SerializationWriter, layerVersionIfcxFile: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!layerVersionIfcxFile || isSerializingDerivedType) { return; } + writer.writeStringValue("blobUrl", layerVersionIfcxFile.blobUrl); + writer.writeAdditionalData(layerVersionIfcxFile.additionalData); +} +export const CreateLayerVersionResponseStateObject = { + OK: "OK", + OUT_OF_DATE: "OUT_OF_DATE", +} as const; +export const IfcxFileDownloadTypeObject = { + Just_this_version: "just_this_version", + Whole_layer_history_intact: "whole_layer_history_intact", + Whole_layer_history_condensed: "whole_layer_history_condensed", + Whole_layer_and_imports_history_condensed: "whole_layer_and_imports_history_condensed", +} as const; +/* tslint:enable */ +/* eslint-enable */ diff --git a/sdk/ts/package-lock.json b/sdk/ts/package-lock.json new file mode 100644 index 00000000..4b0259e2 --- /dev/null +++ b/sdk/ts/package-lock.json @@ -0,0 +1,602 @@ +{ + "name": "sdk-ts", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "sdk-ts", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "jszip": "^3.10.1" + }, + "devDependencies": { + "esbuild": "^0.27.3" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + } + } +} diff --git a/sdk/ts/package.json b/sdk/ts/package.json new file mode 100644 index 00000000..f639240d --- /dev/null +++ b/sdk/ts/package.json @@ -0,0 +1,17 @@ +{ + "name": "sdk-ts", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "esbuild test/test.ts --bundle --outfile=test.js --platform=node && node test.js" + }, + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "jszip": "^3.10.1" + }, + "devDependencies": { + "esbuild": "^0.27.3" + } +} diff --git a/sdk/ts/test/mycomponent.schema.json b/sdk/ts/test/mycomponent.schema.json new file mode 100644 index 00000000..6b62cbf7 --- /dev/null +++ b/sdk/ts/test/mycomponent.schema.json @@ -0,0 +1,22 @@ +{ + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "x-ifc5-id": "examples::ifc5::mycomponent", + "title": "Person", + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + }, + "age": { + "description": "Age in years which must be equal to or greater than zero.", + "type": "integer", + "minimum": 0 + } + } +} \ No newline at end of file diff --git a/sdk/ts/test/mycomponent.ts b/sdk/ts/test/mycomponent.ts new file mode 100644 index 00000000..2305a790 --- /dev/null +++ b/sdk/ts/test/mycomponent.ts @@ -0,0 +1,205 @@ +// To parse this data: +// +// import { Convert, Mycomponent } from "./file"; +// +// const mycomponent = Convert.toMycomponent(json); +// +// These functions will throw an error if the JSON doesn't +// match the expected interface, even if the JSON is valid. + +export interface Mycomponent { + /** + * Age in years which must be equal to or greater than zero. + */ + age?: number; + /** + * The person's first name. + */ + firstName?: string; + /** + * The person's last name. + */ + lastName?: string; + [property: string]: any; +} + +// Converts JSON strings to/from your types +// and asserts the results of JSON.parse at runtime +export class Convert { + public static toMycomponent(json: string): Mycomponent { + return cast(JSON.parse(json), r("Mycomponent")); + } + + public static mycomponentToJson(value: Mycomponent): string { + return JSON.stringify(uncast(value, r("Mycomponent")), null, 2); + } +} + +function invalidValue(typ: any, val: any, key: any, parent: any = ''): never { + const prettyTyp = prettyTypeName(typ); + const parentText = parent ? ` on ${parent}` : ''; + const keyText = key ? ` for key "${key}"` : ''; + throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`); +} + +function prettyTypeName(typ: any): string { + if (Array.isArray(typ)) { + if (typ.length === 2 && typ[0] === undefined) { + return `an optional ${prettyTypeName(typ[1])}`; + } else { + return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`; + } + } else if (typeof typ === "object" && typ.literal !== undefined) { + return typ.literal; + } else { + return typeof typ; + } +} + +function jsonToJSProps(typ: any): any { + if (typ.jsonToJS === undefined) { + const map: any = {}; + typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ }); + typ.jsonToJS = map; + } + return typ.jsonToJS; +} + +function jsToJSONProps(typ: any): any { + if (typ.jsToJSON === undefined) { + const map: any = {}; + typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ }); + typ.jsToJSON = map; + } + return typ.jsToJSON; +} + +function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any { + function transformPrimitive(typ: string, val: any): any { + if (typeof typ === typeof val) return val; + return invalidValue(typ, val, key, parent); + } + + function transformUnion(typs: any[], val: any): any { + // val must validate against one typ in typs + const l = typs.length; + for (let i = 0; i < l; i++) { + const typ = typs[i]; + try { + return transform(val, typ, getProps); + } catch (_) {} + } + return invalidValue(typs, val, key, parent); + } + + function transformEnum(cases: string[], val: any): any { + if (cases.indexOf(val) !== -1) return val; + return invalidValue(cases.map(a => { return l(a); }), val, key, parent); + } + + function transformArray(typ: any, val: any): any { + // val must be an array with no invalid elements + if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent); + return val.map(el => transform(el, typ, getProps)); + } + + function transformDate(val: any): any { + if (val === null) { + return null; + } + const d = new Date(val); + if (isNaN(d.valueOf())) { + return invalidValue(l("Date"), val, key, parent); + } + return d; + } + + function transformObject(props: { [k: string]: any }, additional: any, val: any): any { + if (val === null || typeof val !== "object" || Array.isArray(val)) { + return invalidValue(l(ref || "object"), val, key, parent); + } + const result: any = {}; + Object.getOwnPropertyNames(props).forEach(key => { + const prop = props[key]; + const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined; + result[prop.key] = transform(v, prop.typ, getProps, key, ref); + }); + Object.getOwnPropertyNames(val).forEach(key => { + if (!Object.prototype.hasOwnProperty.call(props, key)) { + result[key] = transform(val[key], additional, getProps, key, ref); + } + }); + return result; + } + + if (typ === "any") return val; + if (typ === null) { + if (val === null) return val; + return invalidValue(typ, val, key, parent); + } + if (typ === false) return invalidValue(typ, val, key, parent); + let ref: any = undefined; + while (typeof typ === "object" && typ.ref !== undefined) { + ref = typ.ref; + typ = typeMap[typ.ref]; + } + if (Array.isArray(typ)) return transformEnum(typ, val); + if (typeof typ === "object") { + return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val) + : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val) + : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val) + : invalidValue(typ, val, key, parent); + } + // Numbers can be parsed by Date but shouldn't be. + if (typ === Date && typeof val !== "number") return transformDate(val); + return transformPrimitive(typ, val); +} + +function cast(val: any, typ: any): T { + return transform(val, typ, jsonToJSProps); +} + +function uncast(val: T, typ: any): any { + return transform(val, typ, jsToJSONProps); +} + +function l(typ: any) { + return { literal: typ }; +} + +function a(typ: any) { + return { arrayItems: typ }; +} + +function u(...typs: any[]) { + return { unionMembers: typs }; +} + +function o(props: any[], additional: any) { + return { props, additional }; +} + +function m(additional: any) { + return { props: [], additional }; +} + +function r(name: string) { + return { ref: name }; +} + +const typeMap: any = { + "Mycomponent": o([ + { json: "age", js: "age", typ: u(undefined, 0) }, + { json: "firstName", js: "firstName", typ: u(undefined, "") }, + { json: "lastName", js: "lastName", typ: u(undefined, "") }, + ], "any"), +}; + + // start insert + export let Identity = { + typeID: "examples::ifc5::mycomponent", + originSchemaSrc: "{\r\n \"$id\": \"https://example.com/person.schema.json\",\r\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\r\n \"x-ifc5-id\": \"examples::ifc5::mycomponent\",\r\n \"title\": \"Person\",\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"firstName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The person's first name.\"\r\n },\r\n \"lastName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The person's last name.\"\r\n },\r\n \"age\": {\r\n \"description\": \"Age in years which must be equal to or greater than zero.\",\r\n \"type\": \"integer\",\r\n \"minimum\": 0\r\n }\r\n }\r\n}", + fromJSONString: Convert.toMycomponent, + toJSONString: Convert.mycomponentToJson + } + // end insert \ No newline at end of file diff --git a/sdk/ts/test/test.ts b/sdk/ts/test/test.ts new file mode 100644 index 00000000..ffab39c7 --- /dev/null +++ b/sdk/ts/test/test.ts @@ -0,0 +1,65 @@ +import { Opinion } from "../IfcxIndexFile"; +import { IfcxFile, LoadIfcxFile, WriteIfcxFile } from "../IfxcFile"; +import * as MyComponent from "./mycomponent"; +import * as fs from "fs"; + + +async function Test() +{ + let file = new IfcxFile(); + + let comp1: MyComponent.Mycomponent = { + firstName: "Alice", + lastName: "Anderson", + age: 21 + }; + + let comp2: MyComponent.Mycomponent = { + firstName: "Bob", + lastName: "Bobson", + age: 22 + }; + + let comp1_id = file.AddComponent(MyComponent.Identity, comp1); + let comp2_id = file.AddComponent(MyComponent.Identity, comp2); + + file.AddSection({ + header: { + id: "v2", + author: "bob@example.com", + dataVersion: "v2", + timestamp: new Date().toString() + }, + nodes: [{ + path: "obj/a", + inherits: [], + children: [], + attributes: [{ + name: "user", + opinion: Opinion.Value, + value: { + typeID: MyComponent.Identity.typeID, + componentIndex: comp1_id + } + },{ + name: "user2", + opinion: Opinion.Value, + value: { + typeID: MyComponent.Identity.typeID, + componentIndex: comp2_id + } + }] + }] + }) + + let zipbytes = await WriteIfcxFile(file); + fs.writeFileSync("output.ifcx", zipbytes); + + let readBack = await LoadIfcxFile(zipbytes); + + let readBackComp = readBack.ReadComponent(MyComponent.Identity, 1); + + console.log(readBackComp); +} + +Test(); \ No newline at end of file diff --git a/standard/api/openapi.json b/standard/api/openapi.json new file mode 100644 index 00000000..ad05679e --- /dev/null +++ b/standard/api/openapi.json @@ -0,0 +1,542 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "(title)", + "version": "0.0.0" + }, + "tags": [], + "paths": { + "/ifcx-api/download/{blobId}": { + "put": { + "operationId": "download", + "parameters": [ + { + "name": "blobId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/ifcx-api/layers": { + "get": { + "operationId": "Layers_layers", + "parameters": [], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LayerStatus" + } + } + } + } + } + } + }, + "post": { + "operationId": "Layers_createLayer", + "parameters": [], + "responses": { + "200": { + "description": "The request has succeeded." + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLayerCommand" + } + } + } + } + } + }, + "/ifcx-api/layers/{layerId}": { + "get": { + "operationId": "LayerRoutes_get_layer", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LayerDetails" + } + } + } + } + } + }, + "delete": { + "operationId": "LayerRoutes_delete_layer", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded." + } + } + } + }, + "/ifcx-api/layers/{layerId}/upload-ifcx-blob-url": { + "post": { + "operationId": "LayerRoutes_uploadIfcxBlobUrl", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResponse" + } + } + } + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions": { + "post": { + "operationId": "VersionsRoutes_createLayerVersion", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLayerVersionResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLayerVersionCommand" + } + } + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}": { + "get": { + "operationId": "LayerVersionRoutes_get_layer_version", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + }, + { + "name": "versionId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LayerVersion" + } + } + } + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}/download-ifcx": { + "put": { + "operationId": "LayerVersionRoutes_layer_ifcx", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + }, + { + "name": "versionId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + }, + { + "name": "downloadType", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/IfcxFileDownloadType" + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LayerVersionIfcxFile" + } + } + } + } + } + } + }, + "/ifcx-api/layers/{layerId}/versions/{versionId}/query": { + "get": { + "operationId": "LayerVersionRoutes_query", + "parameters": [ + { + "name": "layerId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + }, + { + "name": "versionId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "provenance", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "name": "expandChildren", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "name": "expandChildrenRecursive", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The request has succeeded." + } + } + } + }, + "/ifcx-api/upload/{blobId}": { + "put": { + "operationId": "upload", + "parameters": [ + { + "name": "blobId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/uuid" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded." + } + }, + "requestBody": { + "required": true, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "components": { + "schemas": { + "BlobResponse": { + "type": "object", + "required": [ + "blobId", + "putURL" + ], + "properties": { + "blobId": { + "$ref": "#/components/schemas/uuid" + }, + "putURL": { + "type": "string" + } + } + }, + "CreateLayerCommand": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/uuid" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": { + "not": {} + } + }, + "CreateLayerVersionCommand": { + "type": "object", + "required": [ + "id", + "previousLayerVersionId", + "blobId" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/uuid" + }, + "previousLayerVersionId": { + "$ref": "#/components/schemas/uuid" + }, + "blobId": { + "$ref": "#/components/schemas/uuid" + } + } + }, + "CreateLayerVersionResponse": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "$ref": "#/components/schemas/CreateLayerVersionResponseState" + } + } + }, + "CreateLayerVersionResponseState": { + "type": "string", + "enum": [ + "OK", + "OUT_OF_DATE" + ] + }, + "IfcxFileDownloadType": { + "type": "string", + "enum": [ + "just_this_version", + "whole_layer_history_intact", + "whole_layer_history_condensed", + "whole_layer_and_imports_history_condensed" + ] + }, + "IfcxProvenanceData": { + "type": "object", + "required": [ + "author", + "timestamp", + "application" + ], + "properties": { + "author": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "application": { + "type": "string" + } + } + }, + "LayerDetails": { + "type": "object", + "required": [ + "id", + "name", + "history" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/uuid" + }, + "name": { + "type": "string" + }, + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LayerVersion" + } + } + } + }, + "LayerStatus": { + "type": "object", + "required": [ + "id", + "name", + "latestVersion" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/uuid" + }, + "name": { + "type": "string" + }, + "latestVersion": { + "$ref": "#/components/schemas/uuid" + } + } + }, + "LayerVersion": { + "type": "object", + "required": [ + "layerId", + "versionId", + "previousVersionId", + "provenance" + ], + "properties": { + "layerId": { + "$ref": "#/components/schemas/uuid" + }, + "versionId": { + "$ref": "#/components/schemas/uuid" + }, + "previousVersionId": { + "$ref": "#/components/schemas/uuid" + }, + "provenance": { + "$ref": "#/components/schemas/IfcxProvenanceData" + } + } + }, + "LayerVersionIfcxFile": { + "type": "object", + "required": [ + "blobUrl" + ], + "properties": { + "blobUrl": { + "type": "string" + } + } + }, + "uuid": { + "type": "string", + "format": "uuid" + } + } + } +} diff --git a/standard/ifcxfile/IfcxIndexFile.json b/standard/ifcxfile/IfcxIndexFile.json new file mode 100644 index 00000000..39879bd8 --- /dev/null +++ b/standard/ifcxfile/IfcxIndexFile.json @@ -0,0 +1,228 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "IfcxIndexFile.json", + "type": "object", + "properties": { + "header": { + "$ref": "#/$defs/IfcxFileHeader" + }, + "imports": { + "type": "array", + "items": { + "$ref": "#/$defs/ImportNode" + } + }, + "attributeTables": { + "type": "array", + "items": { + "$ref": "#/$defs/AttributeTableReference" + } + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/$defs/IfcxDataSection" + } + } + }, + "required": [ + "header", + "imports", + "attributeTables", + "sections" + ], + "$defs": { + "IfcxFileHeader": { + "type": "object", + "properties": { + "ifcxVersion": { + "type": "string" + } + }, + "required": [ + "ifcxVersion" + ] + }, + "ImportNode": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "integrity": { + "type": "string" + } + }, + "required": [ + "uri" + ] + }, + "AttributeTableReference": { + "type": "object", + "properties": { + "filename": { + "$ref": "#/$defs/attribute_file_name" + }, + "type": { + "$ref": "#/$defs/AttributeFileType" + }, + "schema": {} + }, + "required": [ + "filename", + "type", + "schema" + ] + }, + "IfcxDataSection": { + "type": "object", + "properties": { + "header": { + "$ref": "#/$defs/IfcxProvenanceHeader" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/$defs/IfcxNode" + } + } + }, + "required": [ + "header", + "nodes" + ] + }, + "attribute_file_name": { + "type": "string", + "pattern": "" + }, + "OpinionatedValuePath": { + "type": "object", + "properties": { + "opinion": { + "$ref": "#/$defs/OpinionType" + }, + "name": { + "type": "string" + }, + "value": { + "$ref": "#/$defs/path" + } + }, + "required": [ + "opinion", + "name" + ] + }, + "OpinionatedValueAttributeReference": { + "type": "object", + "properties": { + "opinion": { + "$ref": "#/$defs/OpinionType" + }, + "name": { + "type": "string" + }, + "value": { + "$ref": "#/$defs/AttributeReference" + } + }, + "required": [ + "opinion", + "name" + ] + }, + "OpinionType": { + "type": "string", + "enum": [ + "PASS_THROUGH", + "DELETE", + "VALUE" + ] + }, + "AttributeReference": { + "type": "object", + "properties": { + "typeID": { + "type": "string" + }, + "componentIndex": { + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + } + }, + "required": [ + "typeID", + "componentIndex" + ] + } + } +} \ No newline at end of file