@api-client/core 0.12.5 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/amf/ApiSchemaValues.d.ts +6 -2
- package/build/src/amf/ApiSchemaValues.d.ts.map +1 -1
- package/build/src/amf/ApiSchemaValues.js +17 -12
- package/build/src/amf/ApiSchemaValues.js.map +1 -1
- package/build/src/amf/shape/ShapeBase.d.ts +1 -1
- package/build/src/amf/shape/ShapeBase.d.ts.map +1 -1
- package/build/src/amf/shape/ShapeBase.js +1 -1
- package/build/src/amf/shape/ShapeBase.js.map +1 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts.map +1 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +1 -2
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -1
- package/build/src/events/BaseEvents.d.ts +3 -3
- package/build/src/events/BaseEvents.d.ts.map +1 -1
- package/build/src/events/BaseEvents.js.map +1 -1
- package/build/src/mocking/LegacyInterfaces.d.ts +1 -1
- package/build/src/mocking/LegacyInterfaces.d.ts.map +1 -1
- package/build/src/mocking/LegacyInterfaces.js.map +1 -1
- package/build/src/mocking/LegacyMock.d.ts +1 -1
- package/build/src/mocking/LegacyMock.d.ts.map +1 -1
- package/build/src/mocking/LegacyMock.js +1 -1
- package/build/src/mocking/LegacyMock.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +2 -1
- package/build/src/mocking/ProjectMock.d.ts.map +1 -1
- package/build/src/mocking/ProjectMock.js +1 -1
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/legacy/Authorization.d.ts +2 -1
- package/build/src/mocking/legacy/Authorization.d.ts.map +1 -1
- package/build/src/mocking/legacy/Authorization.js +2 -1
- package/build/src/mocking/legacy/Authorization.js.map +1 -1
- package/build/src/mocking/legacy/Certificates.d.ts +3 -1
- package/build/src/mocking/legacy/Certificates.d.ts.map +1 -1
- package/build/src/mocking/legacy/Certificates.js +6 -3
- package/build/src/mocking/legacy/Certificates.js.map +1 -1
- package/build/src/mocking/legacy/Cookies.d.ts +3 -1
- package/build/src/mocking/legacy/Cookies.d.ts.map +1 -1
- package/build/src/mocking/legacy/Cookies.js +3 -1
- package/build/src/mocking/legacy/Cookies.js.map +1 -1
- package/build/src/mocking/legacy/HostRules.d.ts +3 -1
- package/build/src/mocking/legacy/HostRules.d.ts.map +1 -1
- package/build/src/mocking/legacy/HostRules.js +3 -1
- package/build/src/mocking/legacy/HostRules.js.map +1 -1
- package/build/src/mocking/legacy/Http.d.ts +6 -1
- package/build/src/mocking/legacy/Http.d.ts.map +1 -1
- package/build/src/mocking/legacy/Http.js +5 -1
- package/build/src/mocking/legacy/Http.js.map +1 -1
- package/build/src/mocking/legacy/HttpResponse.d.ts +3 -2
- package/build/src/mocking/legacy/HttpResponse.d.ts.map +1 -1
- package/build/src/mocking/legacy/HttpResponse.js +2 -2
- package/build/src/mocking/legacy/HttpResponse.js.map +1 -1
- package/build/src/mocking/legacy/RestApi.d.ts +3 -1
- package/build/src/mocking/legacy/RestApi.d.ts.map +1 -1
- package/build/src/mocking/legacy/RestApi.js +3 -1
- package/build/src/mocking/legacy/RestApi.js.map +1 -1
- package/build/src/mocking/legacy/Urls.d.ts +3 -1
- package/build/src/mocking/legacy/Urls.d.ts.map +1 -1
- package/build/src/mocking/legacy/Urls.js +3 -1
- package/build/src/mocking/legacy/Urls.js.map +1 -1
- package/build/src/mocking/legacy/Variables.d.ts +2 -1
- package/build/src/mocking/legacy/Variables.d.ts.map +1 -1
- package/build/src/mocking/legacy/Variables.js +2 -1
- package/build/src/mocking/legacy/Variables.js.map +1 -1
- package/build/src/mocking/lib/Certificates.d.ts +4 -1
- package/build/src/mocking/lib/Certificates.d.ts.map +1 -1
- package/build/src/mocking/lib/Certificates.js +5 -2
- package/build/src/mocking/lib/Certificates.js.map +1 -1
- package/build/src/mocking/lib/History.d.ts +5 -1
- package/build/src/mocking/lib/History.d.ts.map +1 -1
- package/build/src/mocking/lib/History.js +4 -1
- package/build/src/mocking/lib/History.js.map +1 -1
- package/build/src/mocking/lib/HostRules.d.ts +4 -1
- package/build/src/mocking/lib/HostRules.d.ts.map +1 -1
- package/build/src/mocking/lib/HostRules.js +3 -1
- package/build/src/mocking/lib/HostRules.js.map +1 -1
- package/build/src/mocking/lib/Request.d.ts +5 -1
- package/build/src/mocking/lib/Request.d.ts.map +1 -1
- package/build/src/mocking/lib/Request.js +4 -1
- package/build/src/mocking/lib/Request.js.map +1 -1
- package/build/src/mocking/lib/Response.d.ts +7 -1
- package/build/src/mocking/lib/Response.d.ts.map +1 -1
- package/build/src/mocking/lib/Response.js +6 -1
- package/build/src/mocking/lib/Response.js.map +1 -1
- package/build/src/mocking/lib/Url.d.ts +4 -1
- package/build/src/mocking/lib/Url.d.ts.map +1 -1
- package/build/src/mocking/lib/Url.js +3 -1
- package/build/src/mocking/lib/Url.js.map +1 -1
- package/build/src/mocking/lib/User.d.ts +5 -1
- package/build/src/mocking/lib/User.d.ts.map +1 -1
- package/build/src/mocking/lib/User.js +4 -1
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/modeling/DataDomain.d.ts +1 -1
- package/build/src/modeling/DataDomain.d.ts.map +1 -1
- package/build/src/modeling/DataDomain.js.map +1 -1
- package/build/src/modeling/DomainAssociation.d.ts.map +1 -1
- package/build/src/modeling/DomainAssociation.js +2 -3
- package/build/src/modeling/DomainAssociation.js.map +1 -1
- package/build/src/modeling/DomainSerialization.d.ts.map +1 -1
- package/build/src/modeling/DomainSerialization.js +1 -1
- package/build/src/modeling/DomainSerialization.js.map +1 -1
- package/build/src/modeling/DomainVersioning.js.map +1 -1
- package/build/src/modeling/GraphUtils.d.ts +1 -1
- package/build/src/modeling/GraphUtils.d.ts.map +1 -1
- package/build/src/modeling/GraphUtils.js.map +1 -1
- package/build/src/modeling/legacy/DataAssociation.d.ts.map +1 -1
- package/build/src/modeling/legacy/DataAssociation.js +4 -5
- package/build/src/modeling/legacy/DataAssociation.js.map +1 -1
- package/build/src/modeling/legacy/DataProperty.d.ts.map +1 -1
- package/build/src/modeling/legacy/DataProperty.js +4 -5
- package/build/src/modeling/legacy/DataProperty.js.map +1 -1
- package/build/src/modeling/types.d.ts +2 -1
- package/build/src/modeling/types.d.ts.map +1 -1
- package/build/src/modeling/types.js.map +1 -1
- package/build/src/models/ProjectExecution.d.ts.map +1 -1
- package/build/src/models/ProjectExecution.js +2 -3
- package/build/src/models/ProjectExecution.js.map +1 -1
- package/build/src/models/Request.d.ts.map +1 -1
- package/build/src/models/Request.js +4 -5
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/store/Revision.d.ts +1 -1
- package/build/src/models/store/Revision.d.ts.map +1 -1
- package/build/src/models/store/Revision.js.map +1 -1
- package/build/src/patch/PatchClient.d.ts +2 -1
- package/build/src/patch/PatchClient.d.ts.map +1 -1
- package/build/src/patch/PatchClient.js +1 -1
- package/build/src/patch/PatchClient.js.map +1 -1
- package/build/src/patch/types.d.ts +1 -1
- package/build/src/patch/types.d.ts.map +1 -1
- package/build/src/patch/types.js.map +1 -1
- package/data/models/example-generator-api.json +22 -22
- package/package.json +21 -20
- package/src/amf/ApiSchemaValues.ts +18 -13
- package/src/amf/shape/ShapeBase.ts +1 -1
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +1 -2
- package/src/events/BaseEvents.ts +3 -3
- package/src/mocking/LegacyInterfaces.ts +1 -1
- package/src/mocking/LegacyMock.ts +1 -1
- package/src/mocking/ProjectMock.ts +2 -1
- package/src/mocking/legacy/Authorization.ts +2 -1
- package/src/mocking/legacy/Certificates.ts +6 -3
- package/src/mocking/legacy/Cookies.ts +3 -1
- package/src/mocking/legacy/HostRules.ts +3 -1
- package/src/mocking/legacy/Http.ts +6 -1
- package/src/mocking/legacy/HttpResponse.ts +3 -7
- package/src/mocking/legacy/RestApi.ts +3 -1
- package/src/mocking/legacy/Urls.ts +3 -1
- package/src/mocking/legacy/Variables.ts +2 -1
- package/src/mocking/lib/Certificates.ts +6 -2
- package/src/mocking/lib/History.ts +5 -1
- package/src/mocking/lib/HostRules.ts +4 -1
- package/src/mocking/lib/Request.ts +5 -1
- package/src/mocking/lib/Response.ts +7 -12
- package/src/mocking/lib/Url.ts +4 -1
- package/src/mocking/lib/User.ts +5 -1
- package/src/modeling/DataDomain.ts +1 -1
- package/src/modeling/DomainAssociation.ts +2 -3
- package/src/modeling/DomainSerialization.ts +2 -1
- package/src/modeling/DomainVersioning.ts +1 -1
- package/src/modeling/GraphUtils.ts +1 -1
- package/src/modeling/legacy/DataAssociation.ts +4 -5
- package/src/modeling/legacy/DataProperty.ts +4 -5
- package/src/modeling/types.ts +2 -1
- package/src/models/ProjectExecution.ts +2 -3
- package/src/models/Request.ts +4 -5
- package/src/models/store/Revision.ts +1 -1
- package/src/patch/PatchClient.ts +2 -1
- package/src/patch/types.ts +1 -1
- package/tests/servers/express-routes/StreamApi.ts +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeXmlSchemaGenerator.js","sourceRoot":"","sources":["../../../../src/amf/shape/ShapeXmlSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AA0BnF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAA;AACjG,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,MAAM,UAAU,iBAAiB,CAAC,KAAmB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QAAQ,GAAG,EAAE,EAAE,GAAG,MAAM,CAAA;QAChC,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;YAC/D,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;YAC5C,MAAM,KAAK,GAAG,EAAE,CAAA;YAChB,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;gBACjC,MAAM,SAAS,GAAG,MAAM,CAAA;gBACxB,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;gBACxB,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,CAAC,CAAA;gBAClC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,GAAG,CAAC,CAAA;YAC3B,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACzB,CAAC;QACD,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC;CACF","sourcesContent":["import { Json } from '@api-client/json'\nimport { AmfNamespace as ns } from '../definitions/Namespace.js'\nimport { ShapeBase } from './ShapeBase.js'\nimport { XmlDataNodeGenerator } from '../data-node/XmlDataNodeGenerator.js'\nimport { collectNodeProperties, formatXmlValue, getUnionMember } from '../Utils.js'\nimport {\n IApiAnyShape,\n IApiArrayShape,\n IApiDataExample,\n IApiDataNodeUnion,\n IApiNodeShape,\n IApiPropertyShape,\n IApiScalarShape,\n IShapeUnion,\n IApiUnionShape,\n} from '../definitions/Shapes.js'\n\ninterface IProcessNodeOptions {\n forceName?: string\n indent?: number\n noWrap?: boolean\n}\n\ninterface ICollectExamplesOptions {\n nodeName?: string\n indent?: number\n isWrapped?: boolean\n tagFill?: string\n}\n\n/**\n * Normalizes given name to a value that can be accepted by `createElement`\n * function on a document object.\n * @param name A name to process\n * @returns The normalized name\n */\nexport const normalizeXmlTagName = (name: string): string => name.replace(/[^a-zA-Z0-9-_.]/g, '')\nconst UNKNOWN_TYPE = 'unknown-type'\n\nexport function shapeToXmlTagName(shape: IApiAnyShape): string {\n const { name, inherits = [], xmlSerialization } = shape\n let label: string | undefined =\n xmlSerialization && xmlSerialization.name ? xmlSerialization.name : name || UNKNOWN_TYPE\n if (label === 'schema' && inherits.length) {\n const n = inherits.find((i) => i.name && i.name !== 'schema')\n if (n) {\n label = n.name === 'type' ? n.displayName || n.name : n.name\n }\n }\n return normalizeXmlTagName(String(label))\n}\n\nexport class ShapeXmlSchemaGenerator extends ShapeBase {\n /**\n * Generates a XML example from the structured value.\n *\n * @param schema The Shape definition\n */\n generate(schema: IShapeUnion): string | undefined {\n const value = this.processNode(schema, {}, true)\n return value\n }\n\n /**\n * Processes the Shape definition and returns a JavaScript object or array.\n */\n processNode(schema: IShapeUnion, options: IProcessNodeOptions = {}, isRoot = false): string | undefined {\n const { types } = schema\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n return this._scalarShapeObject(schema as IApiScalarShape, options)\n }\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this._nodeShapeObject(schema as IApiNodeShape, options)\n }\n if (types.includes(ns.aml.vocabularies.shapes.UnionShape)) {\n return this._unionShapeObject(schema as IApiUnionShape)\n }\n if (types.includes(ns.aml.vocabularies.shapes.FileShape)) {\n return this._fileShapeObject()\n }\n if (types.includes(ns.aml.vocabularies.shapes.SchemaShape)) {\n return this._schemaShapeObject()\n }\n if (types.includes(ns.aml.vocabularies.shapes.TupleShape)) {\n return this._tupleShapeObject()\n }\n if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n return this._arrayShapeObject(schema as IApiArrayShape, options, isRoot)\n }\n return this._anyShapeObject(schema as IApiAnyShape)\n }\n\n /**\n * Serializes generated JS value according to the mime type.\n */\n serialize(value: unknown): string | undefined {\n return value as string\n }\n\n /**\n * Picks the union member to render.\n */\n protected _readCurrentUnion(anyOf: IShapeUnion[]): IShapeUnion {\n const { selectedUnions } = this.opts\n return getUnionMember(anyOf, selectedUnions)\n }\n\n protected _collectProperties(schema: IApiNodeShape): IApiPropertyShape[] {\n const { selectedUnions } = this.opts\n return collectNodeProperties(schema, selectedUnions)\n }\n\n protected _nodeShapeObject(schema: IApiNodeShape, options: IProcessNodeOptions = {}): string {\n const label = options.forceName || shapeToXmlTagName(schema)\n const parts: string[] = []\n const currentIndent = options.indent || 0\n const exampleValue = this._collectExamples(schema, {\n tagFill: new Array(currentIndent * 2 + 0).fill(' ').join(''),\n indent: currentIndent + 1,\n nodeName: label,\n })\n if (exampleValue) {\n return exampleValue\n }\n const attributes: string[] = []\n const properties = this._collectProperties(schema)\n properties.forEach((property) => {\n const { range, minCount = 0 } = property\n if ((minCount === 0 && !this.opts.renderOptional) || !range) {\n return\n }\n const anyRange = range as IApiAnyShape\n if (anyRange.xmlSerialization) {\n // Adds to the parent attributes list.\n // When a non-scalar shape has `attribute` serialization this is an API spec error.\n // Ignore such situation.\n if (anyRange.xmlSerialization.attribute && anyRange.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n let aLabel = normalizeXmlTagName(\n anyRange.xmlSerialization.name\n ? anyRange.xmlSerialization.name\n : property.name || anyRange.name || UNKNOWN_TYPE\n )\n if (anyRange.xmlSerialization.prefix) {\n aLabel = `${anyRange.xmlSerialization.prefix}:${aLabel}`\n }\n const value = this._scalarValue(anyRange)\n attributes.push(`${aLabel}=\"${value}\"`)\n return\n }\n }\n const value = this._propertyShapeObject(property, { indent: currentIndent })\n if (typeof value !== 'undefined') {\n const offset = options.noWrap ? 0 : 2\n const fill = new Array(currentIndent * 2 + offset).fill(' ').join('')\n parts.push(formatXmlValue(fill, value))\n }\n })\n if (options.noWrap) {\n return parts.join('\\n')\n }\n\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n parts.unshift(`${opening}>`)\n const fill = new Array(currentIndent * 2).fill(' ').join('')\n parts.push(`${fill}</${label}>`)\n return parts.join('\\n')\n }\n\n protected _scalarShapeObject(schema: IApiScalarShape, options: IProcessNodeOptions = {}): string {\n const { xmlSerialization, defaultValue } = schema\n let content\n if (defaultValue) {\n const gen = new XmlDataNodeGenerator()\n content = gen.processNode(defaultValue)\n } else {\n content = this._scalarValue(schema)\n }\n let label = options.forceName || shapeToXmlTagName(schema)\n const attributes = []\n const parts = []\n if (xmlSerialization) {\n const { namespace, prefix } = xmlSerialization\n if (namespace) {\n const attrName = prefix ? `xmlns:${prefix}` : 'xmlns'\n attributes.push(`${attrName}=\"${namespace}\"`)\n }\n if (prefix) {\n label = `${prefix}:${label}`\n }\n }\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n opening += '>'\n parts.push(opening)\n parts.push(content)\n parts.push(`</${label}>`)\n\n return parts.join('')\n }\n\n protected _nilShapeObject(schema: IApiScalarShape, options: IProcessNodeOptions = {}): string | undefined {\n const { xmlSerialization } = schema\n const content = ''\n let label = options.forceName || shapeToXmlTagName(schema)\n const attributes = []\n const parts = []\n if (xmlSerialization) {\n const { namespace, prefix } = xmlSerialization\n if (namespace) {\n const attrName = prefix ? `xmlns:${prefix}` : 'xmlns'\n attributes.push(`${attrName}=\"${namespace}\"`)\n }\n if (prefix) {\n label = `${prefix}:${label}`\n }\n }\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n opening += '>'\n parts.push(opening)\n parts.push(content)\n parts.push(`</${label}>`)\n\n return parts.join('')\n }\n\n /**\n * @returns The value for the property or undefined when cannot generate the value.\n */\n protected _propertyShapeObject(schema: IApiPropertyShape, options: IProcessNodeOptions = {}): string | undefined {\n const { range, minCount = 0 } = schema\n if ((minCount === 0 && !this.opts.renderOptional) || !range) {\n return undefined\n }\n const { types } = range\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n return this._scalarShapeObject(range as IApiScalarShape, { ...options })\n }\n if (types.includes(ns.aml.vocabularies.shapes.NilShape)) {\n const name = shapeToXmlTagName(schema as IApiAnyShape)\n return this._nilShapeObject(range as IApiScalarShape, { ...options, forceName: name })\n }\n if (types.includes(ns.aml.vocabularies.shapes.RecursiveShape)) {\n return undefined\n }\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this._nodePropertyObject(schema as IApiPropertyShape<IApiNodeShape>, options)\n }\n if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n return this._nodePropertyArray(schema as IApiPropertyShape<IApiArrayShape>, options)\n }\n const name = shapeToXmlTagName(schema as IApiAnyShape)\n return this.processNode(range, { ...options, forceName: name })\n }\n\n protected _collectExamples(schema: IShapeUnion, opts: ICollectExamplesOptions = {}): string | undefined {\n if (!this.opts.renderExamples) {\n return undefined\n }\n const { isWrapped, nodeName, tagFill = '', indent = 0 } = opts\n let { examples = [] } = schema as IApiAnyShape\n const { inherits } = schema\n if (Array.isArray(inherits) && inherits.length) {\n inherits.forEach((parent) => {\n let node = parent\n if (node.types.includes(ns.aml.vocabularies.shapes.UnionShape)) {\n const union = node as IApiUnionShape\n const { anyOf = [] } = union\n node = this._readCurrentUnion(anyOf)\n }\n const anyShape = node as IApiAnyShape\n if (Array.isArray(anyShape.examples) && anyShape.examples.length) {\n examples = examples.concat(anyShape.examples)\n }\n })\n }\n\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (!validExamples.length) {\n return undefined\n }\n\n const parts: string[] = []\n if (isWrapped) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: indent + 1,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n })\n if (isWrapped) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n\n return parts.join('\\n')\n }\n\n protected _createTabs(indent = 0, offset = 0): string {\n return new Array(indent * 2 + offset).fill(' ').join('')\n }\n\n protected _nodePropertyObject(schema: IApiPropertyShape<IApiNodeShape>, options: IProcessNodeOptions = {}): string {\n const parts: string[] = []\n const name = normalizeXmlTagName(String(schema.name))\n const { indent = 0 } = options\n const baseTabs = this._createTabs(indent)\n let value: string\n const range = schema.range as IApiNodeShape\n const exampleValue = this._collectExamples(range, {\n tagFill: baseTabs,\n indent: indent + 1,\n nodeName: name,\n })\n const attributes: string[] = []\n if (exampleValue) {\n value = exampleValue\n } else {\n const propertyParts: string[] = []\n const properties = this._collectProperties(range)\n\n properties.forEach((property) => {\n const { range, minCount = 0 } = property\n if (minCount === 0 && !this.opts.renderOptional) {\n return\n }\n const anyRange = range as IApiAnyShape\n\n if (anyRange.xmlSerialization) {\n const { prefix, attribute } = anyRange.xmlSerialization\n if (attribute && anyRange.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n let aLabel = normalizeXmlTagName(\n anyRange.xmlSerialization.name\n ? anyRange.xmlSerialization.name\n : property.name || anyRange.name || UNKNOWN_TYPE\n )\n if (prefix) {\n aLabel = `${prefix}:${aLabel}`\n }\n const value = this._scalarValue(anyRange)\n attributes.push(`${aLabel}=\"${value}\"`)\n return\n }\n }\n const value = this._propertyShapeObject(property, { indent })\n if (value !== undefined) {\n const fill = this._createTabs(indent, 2)\n propertyParts.push(formatXmlValue(fill, value))\n }\n })\n\n value = propertyParts.join('\\n')\n }\n let opening = `${baseTabs}<${name}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n parts.unshift(`${opening}>`)\n parts.push(value)\n parts.push(`${baseTabs}</${name}>`)\n return parts.join('\\n')\n }\n\n protected _nodePropertyArray(schema: IApiPropertyShape<IApiArrayShape>, options: IProcessNodeOptions = {}): string {\n const range = schema.range as IApiArrayShape\n const parts: string[] = []\n let name: string\n if (range.xmlSerialization && range.xmlSerialization.name) {\n name = normalizeXmlTagName(range.xmlSerialization.name)\n } else {\n name = normalizeXmlTagName(String(schema.name))\n }\n const { indent = 0 } = options\n const isScalarItems = !!range.items && range.items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)\n\n const baseTabs = this._createTabs(indent)\n if (!isScalarItems) {\n parts.push(`${baseTabs}<${name}>`)\n }\n\n const result = this._arrayShapeObject(range, { ...options, indent })\n parts.push(result)\n if (!isScalarItems) {\n parts.push(`${baseTabs}</${name}>`)\n }\n return parts.join('\\n')\n }\n\n protected _arrayShapeObject(schema: IApiArrayShape, options: IProcessNodeOptions = {}, isRoot = false): string {\n const { items } = schema\n const isScalarItems = !!items && items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)\n // the name is either from the XML serialization info, or the parent property.\n // IT IS NOT THE `item`'s name unless its a scalar.\n let nodeName: string | undefined\n\n // if (isScalarItems && schema.name) {\n // nodeName = normalizeXmlTagName(schema.name);\n // } else if (!isScalarItems && items?.name) {\n // nodeName = normalizeXmlTagName(items.name);\n // }\n\n if (isRoot && schema.xmlSerialization && schema.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(schema.xmlSerialization.name)\n } else if (isRoot && schema.name) {\n nodeName = normalizeXmlTagName(schema.name)\n } else if (!isScalarItems && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n } else if (schema.name) {\n nodeName = normalizeXmlTagName(schema.name)\n }\n\n // wrapping can only be defined on the array shape and it \"wraps\" the generated\n // content into an element that has the same name as the items\n let hasWrapped = false\n if (schema.xmlSerialization && typeof schema.xmlSerialization.wrapped === 'boolean') {\n hasWrapped = true\n }\n const isWrapped = !!schema.xmlSerialization && !!schema.xmlSerialization.wrapped\n\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2 + 0).fill(' ').join('')\n const valueFill = new Array(currentIndent * 2 + (isWrapped ? 2 : 0)).fill(' ').join('')\n // let's start with examples\n if (this.opts.renderExamples) {\n const { examples = [] } = schema\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n\n // scalar items are always wrapped with it's own range\n if (isScalarItems && !isWrapped) {\n const [example] = validExamples\n if (!nodeName && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n }\n const value = generator.generate(example.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: currentIndent,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n } else if (isScalarItems && isWrapped) {\n const [example] = validExamples\n const value = generator.generate(example.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: currentIndent,\n })\n parts.push(`${tagFill}<${nodeName}>`)\n if (value !== undefined) {\n parts.push(value as string)\n }\n parts.push(`${tagFill}</${nodeName}>`)\n } else if (isWrapped) {\n // when wrapped we wrap each example into the \"name\", else we render all examples under the \"name\".\n validExamples.forEach((item) => {\n parts.push(`${tagFill}<${nodeName}>`)\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, /* nodeName */ undefined, {\n indent: currentIndent + 2,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n parts.push(`${tagFill}</${nodeName}>`)\n })\n } else {\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, /* nodeName */ undefined, {\n indent: currentIndent,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n })\n }\n return parts.join('\\n')\n }\n }\n\n if (isScalarItems && schema.defaultValue) {\n const gen = new XmlDataNodeGenerator()\n const value = gen.generate(schema.defaultValue) as string | undefined\n if (!nodeName && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n }\n return `<${nodeName}>${value?.trim()}</${nodeName}>`\n }\n\n if (items) {\n const parts: string[] = []\n if (isWrapped && isScalarItems) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n const init: IProcessNodeOptions = {\n indent: currentIndent + 1,\n }\n if (nodeName) {\n init.forceName = nodeName\n }\n if (!isRoot && (!hasWrapped || (hasWrapped && !isWrapped))) {\n init.noWrap = true\n }\n const value = this.processNode(items, init)\n if (value !== undefined) {\n parts.push(`${valueFill}${value}`)\n }\n if (isWrapped && isScalarItems) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n return parts.join('\\n')\n }\n\n return ''\n\n // const isScalarItems = !!items && items.types.includes(ns.aml.vocabularies.shapes.ScalarShape);\n // if (items) {\n // if (items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n // return this._scalarItems(schema as IArrayShape<IScalarShape>, options);\n // }\n // if (items.types.includes(ns.w3.shacl.NodeShape)) {\n // return this._nodeItems(schema as IArrayShape<INodeShape>, options);\n // }\n // }\n\n // let label = shapeToXmlTagName(schema);\n // if (label === UNKNOWN_TYPE && isScalarItems) {\n // // label = shapeToXmlTagName(items as IScalarShape);\n // }\n\n // const currentIndent = (options.indent || 0);\n // const rootFill = new Array(currentIndent*2).fill(' ').join('');\n // const parts = [\n // `${rootFill}<${label}>`\n // ];\n // let nodeName = label;\n // const anyItems = items as IAnyShape;\n // if (anyItems.xmlSerialization && anyItems.xmlSerialization.name) {\n // nodeName = normalizeXmlTagName(anyItems.xmlSerialization.name);\n // }\n // // Note about wrapping.\n // // XML array values are not wrapped by default. This means that by default\n // // it produces a value like this:\n // // <ParentArray>\n // // <arrayMemberProperty></arrayMemberProperty>\n // // </ParentArray>\n // //\n // // When the object is marked as wrapped then the object is rendered as follows\n // //\n // // <ParentArray>\n // // <MemberObject>\n // // <arrayMemberProperty></arrayMemberProperty>\n // // <MemberObject>\n // // </ParentArray>\n // const isWrapped = xmlSerialization && !!xmlSerialization.wrapped;\n // const defaultValue = schema.defaultValue || items && items.defaultValue;\n // let itemName;\n // if (isWrapped) {\n // try {\n // itemName = shapeToXmlTagName(items as IAnyShape);\n // } catch (e) {\n // itemName = 'UNKNOWN-NAME'\n // }\n // }\n // let { examples=[] } = schema;\n // if (Array.isArray(anyItems.examples)) {\n // examples = examples.concat(anyItems.examples);\n // }\n // if (this.opts.renderExamples && examples && examples.length) {\n // const example = examples.find((item) => !!item.structuredValue);\n // const value = this._exampleToObject(example);\n // if (typeof value !== 'undefined') {\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = new Array(currentIndent * 2 + 4).fill(' ').join('');\n // parts.push(`${tagFill}<${nodeName}>`);\n // parts.push(`${valueFill}${value}`);\n // parts.push(`${tagFill}</${nodeName}>`);\n // }\n // } else if (defaultValue) {\n // const gen = new XmlDataNodeGenerator();\n // const value = gen.generate(defaultValue);\n // if (value) {\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = new Array(currentIndent * 2 + 4).fill(' ').join('');\n // parts.push(`${tagFill}<${nodeName}>`);\n // parts.push(`${valueFill}${value.trim()}`);\n // parts.push(`${tagFill}</${nodeName}>`);\n // }\n // } else if (items && items.types.includes(ns.w3.shacl.NodeShape)) {\n // const typed = items as INodeShape;\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = isWrapped ? new Array(currentIndent * 2 + 4).fill(' ').join('') : tagFill;\n // if (isWrapped) {\n // parts.push(`${tagFill}<${itemName}>`);\n // }\n // const properties = this._collectProperties(typed);\n // properties.forEach((prop) => {\n // const value = this._propertyShapeObject(prop);\n // if (value) {\n // parts.push(`${valueFill}${value}`);\n // }\n // });\n // if (isWrapped) {\n // parts.push(`${tagFill}</${itemName}>`);\n // }\n // } else if (items) {\n // let name = shapeToXmlTagName(items as IAnyShape);\n // if (name === UNKNOWN_TYPE) {\n // name = label;\n // }\n // const opts = {\n // forceName: name,\n // indent: currentIndent + 1,\n // };\n // const value = items && this.processNode(items, opts);\n // if (typeof value !== 'undefined') {\n // const fill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // parts.push(`${fill}${value}`);\n // }\n // }\n\n // parts.push(`${rootFill}</${label}>`);\n // return parts.join('\\n');\n }\n\n /**\n * Creates an example from an array shape when the items is the scalar shape.\n * Note, it assumes the previous step tested whether the `items` is scalar.\n *\n * @param schema The array schema\n * @param options Processing options.\n */\n protected _scalarItems(schema: IApiArrayShape<IApiScalarShape>, options: IProcessNodeOptions = {}): string {\n const items = schema.items as IApiScalarShape\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2).fill(' ').join('')\n\n let nodeName = ''\n if (items.xmlSerialization && items.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(items.xmlSerialization.name)\n } else {\n nodeName = shapeToXmlTagName(schema.name ? schema : items)\n }\n\n // let's start with examples\n if (this.opts.renderExamples) {\n let { examples = [] } = schema\n if (Array.isArray(items.examples)) {\n examples = examples.concat(items.examples)\n }\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n }\n })\n return parts.join('\\n')\n }\n }\n\n // then the default value\n if (schema.defaultValue) {\n const generator = new XmlDataNodeGenerator()\n const value = generator.generate(schema.defaultValue, nodeName)\n if (value !== undefined) {\n return `${tagFill}${value}`\n }\n }\n\n // finally we generate stuff.\n const opts: IProcessNodeOptions = {\n indent: currentIndent + 1,\n forceName: nodeName,\n }\n const value = this.processNode(items, opts)\n return `${tagFill}${value}`\n }\n\n /**\n * Renders a NodeShape as an array item.\n *\n * @param schema The array shape with item that is NodeShape.\n * @param options Rendering options.\n */\n protected _nodeItems(schema: IApiArrayShape<IApiNodeShape>, options: IProcessNodeOptions = {}): string {\n const items = schema.items as IApiNodeShape\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2).fill(' ').join('')\n const isWrapped = schema.xmlSerialization && !!schema.xmlSerialization.wrapped\n const defaultValue = schema.defaultValue || items.defaultValue\n\n let nodeName = ''\n if (items.xmlSerialization && items.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(items.xmlSerialization.name)\n } else {\n nodeName = shapeToXmlTagName(schema.name ? schema : items)\n }\n\n const valueFill = isWrapped ? new Array(currentIndent * 2 + 2).fill(' ').join('') : tagFill\n const parts: string[] = []\n if (isWrapped) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n\n let rendered = false\n\n // let's start with examples\n if (this.opts.renderExamples) {\n let { examples = [] } = schema\n if (Array.isArray(items.examples)) {\n examples = examples.concat(items.examples)\n }\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n }\n })\n rendered = true\n }\n }\n\n if (!rendered && defaultValue) {\n const generator = new XmlDataNodeGenerator()\n const value = generator.generate(defaultValue, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n rendered = true\n }\n }\n if (!rendered) {\n const properties = this._collectProperties(items)\n properties.forEach((prop) => {\n const value = this._propertyShapeObject(prop)\n if (value) {\n parts.push(`${valueFill}${value}`)\n }\n })\n }\n if (isWrapped) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n return parts.join('\\n')\n }\n\n /**\n * @param example The example to turn into a JS object\n */\n protected _exampleToObject(example?: IApiDataExample): string | undefined {\n if (example && example.structuredValue) {\n const generator = new XmlDataNodeGenerator()\n return generator.generate(example.structuredValue) as string | undefined\n }\n return undefined\n }\n\n protected _unionShapeObject(schema: IApiUnionShape, options: IProcessNodeOptions = {}): string | undefined {\n let { anyOf = [], examples = [] } = schema\n if (Array.isArray(schema.inherits) && schema.inherits) {\n schema.inherits.forEach((parent) => {\n const anyParent = parent as IApiAnyShape\n if (Array.isArray(anyParent.examples) && anyParent.examples.length) {\n examples = examples.concat(anyParent.examples)\n }\n const typed = parent as IApiUnionShape\n if (Array.isArray(typed.anyOf) && typed.anyOf.length) {\n anyOf = anyOf.concat(typed.anyOf)\n }\n })\n }\n if (Array.isArray(anyOf) && anyOf.length) {\n if (this._isNotRequiredUnion(anyOf)) {\n // This generates schema for required values.\n // This implicitly mean that the property is not required therefore the value should\n // not be generated.\n return undefined\n }\n const example = examples.find((item) => !!item.structuredValue)\n const value = this._exampleToObject(example)\n if (value !== undefined) {\n const label = shapeToXmlTagName(schema)\n const currentIndent = options.indent || 0\n const rootFill = new Array(currentIndent * 2).fill(' ').join('')\n const valueFill = new Array(currentIndent * 2 + 2).fill(' ').join('')\n const parts = []\n parts.push(`${rootFill}<${label}>`)\n const formatted = String(value)\n .split('\\n')\n .filter((i) => !!i)\n .map((i) => `${valueFill}${i}`)\n .join('\\n')\n parts.push(`${formatted}`)\n parts.push(`${rootFill}</${label}>`)\n return parts.join('\\n')\n }\n if (schema.defaultValue) {\n return this._unionDefaultValue(schema, schema.defaultValue)\n }\n const member = this._readCurrentUnion(anyOf)\n if (member) {\n return this.processNode(member, { ...options, forceName: schema.name })\n }\n }\n return undefined\n }\n\n /**\n * @param schema The schema with unions\n * @param defaultValue The definition of a default value.\n */\n protected _unionDefaultValue(\n schema: IShapeUnion,\n defaultValue: IApiDataNodeUnion,\n options: IProcessNodeOptions = {}\n ): string | undefined {\n const gen = new XmlDataNodeGenerator()\n const value = gen.generate(defaultValue)\n const anySchema = schema as IApiAnyShape\n const label = shapeToXmlTagName(anySchema)\n const currentIndent = options.indent || 0\n const rootFill = new Array(currentIndent * 2).fill(' ').join('')\n const parts = [`${rootFill}<${label}>`]\n const valueFill = new Array(currentIndent * 2 + 2).fill(' ').join('')\n parts.push(`${valueFill}${String(value).trim()}`)\n parts.push(`${rootFill}</${label}>`)\n return parts.join('\\n')\n }\n\n protected _fileShapeObject(): string | undefined {\n return undefined\n }\n\n protected _schemaShapeObject(): string | undefined {\n return undefined\n }\n\n protected _tupleShapeObject(): string | undefined {\n return undefined\n }\n\n protected _anyShapeObject(schema: IApiAnyShape): string | undefined {\n const { and = [], xone = [], or = [] } = schema\n if (and.length) {\n // we combine all properties together under `schema` with changed properties\n const copy = Json.clone(schema) as IApiNodeShape\n copy.and = []\n copy.properties = []\n and.forEach((item) => {\n const { types } = item\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n const typed = item as IApiScalarShape\n copy.properties.push(typed)\n } else if (types.includes(ns.w3.shacl.NodeShape)) {\n const typed = item as IApiNodeShape\n typed.properties.forEach((i) => copy.properties.push(i))\n } else if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n const typed = item as IApiArrayShape\n if (typed.items) {\n copy.properties.push(typed.items)\n }\n }\n })\n return this._nodeShapeObject(copy)\n }\n if (xone.length) {\n const { selectedUnions = [] } = this.opts\n let selected = xone.find((i) => selectedUnions.includes(i.id))\n if (!selected) {\n // select firs available\n selected = xone[0]\n }\n return this.processNode(selected)\n }\n if (or.length) {\n const { selectedUnions = [] } = this.opts\n let selected = or.find((i) => selectedUnions.includes(i.id))\n if (!selected) {\n // select firs available\n selected = or[0]\n }\n return this.processNode(selected)\n }\n const { examples = [] } = schema\n const label = shapeToXmlTagName(schema)\n if (this.opts.renderExamples && examples && examples.length) {\n const example = examples.find((item) => !!item.structuredValue)\n const value = this._exampleToObject(example)\n const parts = []\n if (typeof value !== 'undefined') {\n const valueFill = ` `\n parts.push(`<${label}>`)\n parts.push(`${valueFill}${value}`)\n parts.push(`</${label}>`)\n }\n return parts.join('\\n')\n }\n return this._scalarShapeObject(schema)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ShapeXmlSchemaGenerator.js","sourceRoot":"","sources":["../../../../src/amf/shape/ShapeXmlSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAA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'./ShapeBase.js'\nimport { XmlDataNodeGenerator } from '../data-node/XmlDataNodeGenerator.js'\nimport { collectNodeProperties, formatXmlValue, getUnionMember } from '../Utils.js'\nimport {\n IApiAnyShape,\n IApiArrayShape,\n IApiDataExample,\n IApiDataNodeUnion,\n IApiNodeShape,\n IApiPropertyShape,\n IApiScalarShape,\n IShapeUnion,\n IApiUnionShape,\n} from '../definitions/Shapes.js'\n\ninterface IProcessNodeOptions {\n forceName?: string\n indent?: number\n noWrap?: boolean\n}\n\ninterface ICollectExamplesOptions {\n nodeName?: string\n indent?: number\n isWrapped?: boolean\n tagFill?: string\n}\n\n/**\n * Normalizes given name to a value that can be accepted by `createElement`\n * function on a document object.\n * @param name A name to process\n * @returns The normalized name\n */\nexport const normalizeXmlTagName = (name: string): string => name.replace(/[^a-zA-Z0-9-_.]/g, '')\nconst UNKNOWN_TYPE = 'unknown-type'\n\nexport function shapeToXmlTagName(shape: IApiAnyShape): string {\n const { name, inherits = [], xmlSerialization } = shape\n let label: string | undefined =\n xmlSerialization && xmlSerialization.name ? xmlSerialization.name : name || UNKNOWN_TYPE\n if (label === 'schema' && inherits.length) {\n const n = inherits.find((i) => i.name && i.name !== 'schema')\n if (n) {\n label = n.name === 'type' ? n.displayName || n.name : n.name\n }\n }\n return normalizeXmlTagName(String(label))\n}\n\nexport class ShapeXmlSchemaGenerator extends ShapeBase {\n /**\n * Generates a XML example from the structured value.\n *\n * @param schema The Shape definition\n */\n generate(schema: IShapeUnion): string | undefined {\n const value = this.processNode(schema, {}, true)\n return value\n }\n\n /**\n * Processes the Shape definition and returns a JavaScript object or array.\n */\n processNode(schema: IShapeUnion, options: IProcessNodeOptions = {}, isRoot = false): string | undefined {\n const { types } = schema\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n return this._scalarShapeObject(schema as IApiScalarShape, options)\n }\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this._nodeShapeObject(schema as IApiNodeShape, options)\n }\n if (types.includes(ns.aml.vocabularies.shapes.UnionShape)) {\n return this._unionShapeObject(schema as IApiUnionShape)\n }\n if (types.includes(ns.aml.vocabularies.shapes.FileShape)) {\n return this._fileShapeObject()\n }\n if (types.includes(ns.aml.vocabularies.shapes.SchemaShape)) {\n return this._schemaShapeObject()\n }\n if (types.includes(ns.aml.vocabularies.shapes.TupleShape)) {\n return this._tupleShapeObject()\n }\n if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n return this._arrayShapeObject(schema as IApiArrayShape, options, isRoot)\n }\n return this._anyShapeObject(schema as IApiAnyShape)\n }\n\n /**\n * Serializes generated JS value according to the mime type.\n */\n serialize(value: unknown): string | undefined {\n return value as string\n }\n\n /**\n * Picks the union member to render.\n */\n protected _readCurrentUnion(anyOf: IShapeUnion[]): IShapeUnion {\n const { selectedUnions } = this.opts\n return getUnionMember(anyOf, selectedUnions)\n }\n\n protected _collectProperties(schema: IApiNodeShape): IApiPropertyShape[] {\n const { selectedUnions } = this.opts\n return collectNodeProperties(schema, selectedUnions)\n }\n\n protected _nodeShapeObject(schema: IApiNodeShape, options: IProcessNodeOptions = {}): string {\n const label = options.forceName || shapeToXmlTagName(schema)\n const parts: string[] = []\n const currentIndent = options.indent || 0\n const exampleValue = this._collectExamples(schema, {\n tagFill: new Array(currentIndent * 2 + 0).fill(' ').join(''),\n indent: currentIndent + 1,\n nodeName: label,\n })\n if (exampleValue) {\n return exampleValue\n }\n const attributes: string[] = []\n const properties = this._collectProperties(schema)\n properties.forEach((property) => {\n const { range, minCount = 0 } = property\n if ((minCount === 0 && !this.opts.renderOptional) || !range) {\n return\n }\n const anyRange = range as IApiAnyShape\n if (anyRange.xmlSerialization) {\n // Adds to the parent attributes list.\n // When a non-scalar shape has `attribute` serialization this is an API spec error.\n // Ignore such situation.\n if (anyRange.xmlSerialization.attribute && anyRange.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n let aLabel = normalizeXmlTagName(\n anyRange.xmlSerialization.name\n ? anyRange.xmlSerialization.name\n : property.name || anyRange.name || UNKNOWN_TYPE\n )\n if (anyRange.xmlSerialization.prefix) {\n aLabel = `${anyRange.xmlSerialization.prefix}:${aLabel}`\n }\n const value = this._scalarValue(anyRange)\n attributes.push(`${aLabel}=\"${value}\"`)\n return\n }\n }\n const value = this._propertyShapeObject(property, { indent: currentIndent })\n if (typeof value !== 'undefined') {\n const offset = options.noWrap ? 0 : 2\n const fill = new Array(currentIndent * 2 + offset).fill(' ').join('')\n parts.push(formatXmlValue(fill, value))\n }\n })\n if (options.noWrap) {\n return parts.join('\\n')\n }\n\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n parts.unshift(`${opening}>`)\n const fill = new Array(currentIndent * 2).fill(' ').join('')\n parts.push(`${fill}</${label}>`)\n return parts.join('\\n')\n }\n\n protected _scalarShapeObject(schema: IApiScalarShape, options: IProcessNodeOptions = {}): string {\n const { xmlSerialization, defaultValue } = schema\n let content\n if (defaultValue) {\n const gen = new XmlDataNodeGenerator()\n content = gen.processNode(defaultValue)\n } else {\n content = this._scalarValue(schema)\n }\n let label = options.forceName || shapeToXmlTagName(schema)\n const attributes = []\n const parts = []\n if (xmlSerialization) {\n const { namespace, prefix } = xmlSerialization\n if (namespace) {\n const attrName = prefix ? `xmlns:${prefix}` : 'xmlns'\n attributes.push(`${attrName}=\"${namespace}\"`)\n }\n if (prefix) {\n label = `${prefix}:${label}`\n }\n }\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n opening += '>'\n parts.push(opening)\n parts.push(content)\n parts.push(`</${label}>`)\n\n return parts.join('')\n }\n\n protected _nilShapeObject(schema: IApiScalarShape, options: IProcessNodeOptions = {}): string | undefined {\n const { xmlSerialization } = schema\n const content = ''\n let label = options.forceName || shapeToXmlTagName(schema)\n const attributes = []\n const parts = []\n if (xmlSerialization) {\n const { namespace, prefix } = xmlSerialization\n if (namespace) {\n const attrName = prefix ? `xmlns:${prefix}` : 'xmlns'\n attributes.push(`${attrName}=\"${namespace}\"`)\n }\n if (prefix) {\n label = `${prefix}:${label}`\n }\n }\n let opening = `<${label}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n opening += '>'\n parts.push(opening)\n parts.push(content)\n parts.push(`</${label}>`)\n\n return parts.join('')\n }\n\n /**\n * @returns The value for the property or undefined when cannot generate the value.\n */\n protected _propertyShapeObject(schema: IApiPropertyShape, options: IProcessNodeOptions = {}): string | undefined {\n const { range, minCount = 0 } = schema\n if ((minCount === 0 && !this.opts.renderOptional) || !range) {\n return undefined\n }\n const { types } = range\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n return this._scalarShapeObject(range as IApiScalarShape, { ...options })\n }\n if (types.includes(ns.aml.vocabularies.shapes.NilShape)) {\n const name = shapeToXmlTagName(schema as IApiAnyShape)\n return this._nilShapeObject(range as IApiScalarShape, { ...options, forceName: name })\n }\n if (types.includes(ns.aml.vocabularies.shapes.RecursiveShape)) {\n return undefined\n }\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this._nodePropertyObject(schema as IApiPropertyShape<IApiNodeShape>, options)\n }\n if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n return this._nodePropertyArray(schema as IApiPropertyShape<IApiArrayShape>, options)\n }\n const name = shapeToXmlTagName(schema as IApiAnyShape)\n return this.processNode(range, { ...options, forceName: name })\n }\n\n protected _collectExamples(schema: IShapeUnion, opts: ICollectExamplesOptions = {}): string | undefined {\n if (!this.opts.renderExamples) {\n return undefined\n }\n const { isWrapped, nodeName, tagFill = '', indent = 0 } = opts\n let { examples = [] } = schema as IApiAnyShape\n const { inherits } = schema\n if (Array.isArray(inherits) && inherits.length) {\n inherits.forEach((parent) => {\n let node = parent\n if (node.types.includes(ns.aml.vocabularies.shapes.UnionShape)) {\n const union = node as IApiUnionShape\n const { anyOf = [] } = union\n node = this._readCurrentUnion(anyOf)\n }\n const anyShape = node as IApiAnyShape\n if (Array.isArray(anyShape.examples) && anyShape.examples.length) {\n examples = examples.concat(anyShape.examples)\n }\n })\n }\n\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (!validExamples.length) {\n return undefined\n }\n\n const parts: string[] = []\n if (isWrapped) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: indent + 1,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n })\n if (isWrapped) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n\n return parts.join('\\n')\n }\n\n protected _createTabs(indent = 0, offset = 0): string {\n return new Array(indent * 2 + offset).fill(' ').join('')\n }\n\n protected _nodePropertyObject(schema: IApiPropertyShape<IApiNodeShape>, options: IProcessNodeOptions = {}): string {\n const parts: string[] = []\n const name = normalizeXmlTagName(String(schema.name))\n const { indent = 0 } = options\n const baseTabs = this._createTabs(indent)\n let value: string\n const range = schema.range as IApiNodeShape\n const exampleValue = this._collectExamples(range, {\n tagFill: baseTabs,\n indent: indent + 1,\n nodeName: name,\n })\n const attributes: string[] = []\n if (exampleValue) {\n value = exampleValue\n } else {\n const propertyParts: string[] = []\n const properties = this._collectProperties(range)\n\n properties.forEach((property) => {\n const { range, minCount = 0 } = property\n if (minCount === 0 && !this.opts.renderOptional) {\n return\n }\n const anyRange = range as IApiAnyShape\n\n if (anyRange.xmlSerialization) {\n const { prefix, attribute } = anyRange.xmlSerialization\n if (attribute && anyRange.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n let aLabel = normalizeXmlTagName(\n anyRange.xmlSerialization.name\n ? anyRange.xmlSerialization.name\n : property.name || anyRange.name || UNKNOWN_TYPE\n )\n if (prefix) {\n aLabel = `${prefix}:${aLabel}`\n }\n const value = this._scalarValue(anyRange)\n attributes.push(`${aLabel}=\"${value}\"`)\n return\n }\n }\n const value = this._propertyShapeObject(property, { indent })\n if (value !== undefined) {\n const fill = this._createTabs(indent, 2)\n propertyParts.push(formatXmlValue(fill, value))\n }\n })\n\n value = propertyParts.join('\\n')\n }\n let opening = `${baseTabs}<${name}`\n if (attributes.length) {\n opening += ' '\n opening += attributes.join(' ')\n }\n parts.unshift(`${opening}>`)\n parts.push(value)\n parts.push(`${baseTabs}</${name}>`)\n return parts.join('\\n')\n }\n\n protected _nodePropertyArray(schema: IApiPropertyShape<IApiArrayShape>, options: IProcessNodeOptions = {}): string {\n const range = schema.range as IApiArrayShape\n const parts: string[] = []\n let name: string\n if (range.xmlSerialization && range.xmlSerialization.name) {\n name = normalizeXmlTagName(range.xmlSerialization.name)\n } else {\n name = normalizeXmlTagName(String(schema.name))\n }\n const { indent = 0 } = options\n const isScalarItems = !!range.items && range.items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)\n\n const baseTabs = this._createTabs(indent)\n if (!isScalarItems) {\n parts.push(`${baseTabs}<${name}>`)\n }\n\n const result = this._arrayShapeObject(range, { ...options, indent })\n parts.push(result)\n if (!isScalarItems) {\n parts.push(`${baseTabs}</${name}>`)\n }\n return parts.join('\\n')\n }\n\n protected _arrayShapeObject(schema: IApiArrayShape, options: IProcessNodeOptions = {}, isRoot = false): string {\n const { items } = schema\n const isScalarItems = !!items && items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)\n // the name is either from the XML serialization info, or the parent property.\n // IT IS NOT THE `item`'s name unless its a scalar.\n let nodeName: string | undefined\n\n // if (isScalarItems && schema.name) {\n // nodeName = normalizeXmlTagName(schema.name);\n // } else if (!isScalarItems && items?.name) {\n // nodeName = normalizeXmlTagName(items.name);\n // }\n\n if (isRoot && schema.xmlSerialization && schema.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(schema.xmlSerialization.name)\n } else if (isRoot && schema.name) {\n nodeName = normalizeXmlTagName(schema.name)\n } else if (!isScalarItems && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n } else if (schema.name) {\n nodeName = normalizeXmlTagName(schema.name)\n }\n\n // wrapping can only be defined on the array shape and it \"wraps\" the generated\n // content into an element that has the same name as the items\n let hasWrapped = false\n if (schema.xmlSerialization && typeof schema.xmlSerialization.wrapped === 'boolean') {\n hasWrapped = true\n }\n const isWrapped = !!schema.xmlSerialization && !!schema.xmlSerialization.wrapped\n\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2 + 0).fill(' ').join('')\n const valueFill = new Array(currentIndent * 2 + (isWrapped ? 2 : 0)).fill(' ').join('')\n // let's start with examples\n if (this.opts.renderExamples) {\n const { examples = [] } = schema\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n\n // scalar items are always wrapped with it's own range\n if (isScalarItems && !isWrapped) {\n const [example] = validExamples\n if (!nodeName && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n }\n const value = generator.generate(example.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: currentIndent,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n } else if (isScalarItems && isWrapped) {\n const [example] = validExamples\n const value = generator.generate(example.structuredValue as IApiDataNodeUnion, nodeName, {\n indent: currentIndent,\n })\n parts.push(`${tagFill}<${nodeName}>`)\n if (value !== undefined) {\n parts.push(value as string)\n }\n parts.push(`${tagFill}</${nodeName}>`)\n } else if (isWrapped) {\n // when wrapped we wrap each example into the \"name\", else we render all examples under the \"name\".\n validExamples.forEach((item) => {\n parts.push(`${tagFill}<${nodeName}>`)\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, /* nodeName */ undefined, {\n indent: currentIndent + 2,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n parts.push(`${tagFill}</${nodeName}>`)\n })\n } else {\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, /* nodeName */ undefined, {\n indent: currentIndent,\n })\n if (value !== undefined) {\n parts.push(value as string)\n }\n })\n }\n return parts.join('\\n')\n }\n }\n\n if (isScalarItems && schema.defaultValue) {\n const gen = new XmlDataNodeGenerator()\n const value = gen.generate(schema.defaultValue) as string | undefined\n if (!nodeName && items?.name) {\n nodeName = normalizeXmlTagName(items.name)\n }\n return `<${nodeName}>${value?.trim()}</${nodeName}>`\n }\n\n if (items) {\n const parts: string[] = []\n if (isWrapped && isScalarItems) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n const init: IProcessNodeOptions = {\n indent: currentIndent + 1,\n }\n if (nodeName) {\n init.forceName = nodeName\n }\n if (!isRoot && (!hasWrapped || (hasWrapped && !isWrapped))) {\n init.noWrap = true\n }\n const value = this.processNode(items, init)\n if (value !== undefined) {\n parts.push(`${valueFill}${value}`)\n }\n if (isWrapped && isScalarItems) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n return parts.join('\\n')\n }\n\n return ''\n\n // const isScalarItems = !!items && items.types.includes(ns.aml.vocabularies.shapes.ScalarShape);\n // if (items) {\n // if (items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n // return this._scalarItems(schema as IArrayShape<IScalarShape>, options);\n // }\n // if (items.types.includes(ns.w3.shacl.NodeShape)) {\n // return this._nodeItems(schema as IArrayShape<INodeShape>, options);\n // }\n // }\n\n // let label = shapeToXmlTagName(schema);\n // if (label === UNKNOWN_TYPE && isScalarItems) {\n // // label = shapeToXmlTagName(items as IScalarShape);\n // }\n\n // const currentIndent = (options.indent || 0);\n // const rootFill = new Array(currentIndent*2).fill(' ').join('');\n // const parts = [\n // `${rootFill}<${label}>`\n // ];\n // let nodeName = label;\n // const anyItems = items as IAnyShape;\n // if (anyItems.xmlSerialization && anyItems.xmlSerialization.name) {\n // nodeName = normalizeXmlTagName(anyItems.xmlSerialization.name);\n // }\n // // Note about wrapping.\n // // XML array values are not wrapped by default. This means that by default\n // // it produces a value like this:\n // // <ParentArray>\n // // <arrayMemberProperty></arrayMemberProperty>\n // // </ParentArray>\n // //\n // // When the object is marked as wrapped then the object is rendered as follows\n // //\n // // <ParentArray>\n // // <MemberObject>\n // // <arrayMemberProperty></arrayMemberProperty>\n // // <MemberObject>\n // // </ParentArray>\n // const isWrapped = xmlSerialization && !!xmlSerialization.wrapped;\n // const defaultValue = schema.defaultValue || items && items.defaultValue;\n // let itemName;\n // if (isWrapped) {\n // try {\n // itemName = shapeToXmlTagName(items as IAnyShape);\n // } catch (e) {\n // itemName = 'UNKNOWN-NAME'\n // }\n // }\n // let { examples=[] } = schema;\n // if (Array.isArray(anyItems.examples)) {\n // examples = examples.concat(anyItems.examples);\n // }\n // if (this.opts.renderExamples && examples && examples.length) {\n // const example = examples.find((item) => !!item.structuredValue);\n // const value = this._exampleToObject(example);\n // if (typeof value !== 'undefined') {\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = new Array(currentIndent * 2 + 4).fill(' ').join('');\n // parts.push(`${tagFill}<${nodeName}>`);\n // parts.push(`${valueFill}${value}`);\n // parts.push(`${tagFill}</${nodeName}>`);\n // }\n // } else if (defaultValue) {\n // const gen = new XmlDataNodeGenerator();\n // const value = gen.generate(defaultValue);\n // if (value) {\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = new Array(currentIndent * 2 + 4).fill(' ').join('');\n // parts.push(`${tagFill}<${nodeName}>`);\n // parts.push(`${valueFill}${value.trim()}`);\n // parts.push(`${tagFill}</${nodeName}>`);\n // }\n // } else if (items && items.types.includes(ns.w3.shacl.NodeShape)) {\n // const typed = items as INodeShape;\n // const tagFill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // const valueFill = isWrapped ? new Array(currentIndent * 2 + 4).fill(' ').join('') : tagFill;\n // if (isWrapped) {\n // parts.push(`${tagFill}<${itemName}>`);\n // }\n // const properties = this._collectProperties(typed);\n // properties.forEach((prop) => {\n // const value = this._propertyShapeObject(prop);\n // if (value) {\n // parts.push(`${valueFill}${value}`);\n // }\n // });\n // if (isWrapped) {\n // parts.push(`${tagFill}</${itemName}>`);\n // }\n // } else if (items) {\n // let name = shapeToXmlTagName(items as IAnyShape);\n // if (name === UNKNOWN_TYPE) {\n // name = label;\n // }\n // const opts = {\n // forceName: name,\n // indent: currentIndent + 1,\n // };\n // const value = items && this.processNode(items, opts);\n // if (typeof value !== 'undefined') {\n // const fill = new Array(currentIndent * 2 + 2).fill(' ').join('');\n // parts.push(`${fill}${value}`);\n // }\n // }\n\n // parts.push(`${rootFill}</${label}>`);\n // return parts.join('\\n');\n }\n\n /**\n * Creates an example from an array shape when the items is the scalar shape.\n * Note, it assumes the previous step tested whether the `items` is scalar.\n *\n * @param schema The array schema\n * @param options Processing options.\n */\n protected _scalarItems(schema: IApiArrayShape<IApiScalarShape>, options: IProcessNodeOptions = {}): string {\n const items = schema.items as IApiScalarShape\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2).fill(' ').join('')\n\n let nodeName = ''\n if (items.xmlSerialization && items.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(items.xmlSerialization.name)\n } else {\n nodeName = shapeToXmlTagName(schema.name ? schema : items)\n }\n\n // let's start with examples\n if (this.opts.renderExamples) {\n let { examples = [] } = schema\n if (Array.isArray(items.examples)) {\n examples = examples.concat(items.examples)\n }\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n }\n })\n return parts.join('\\n')\n }\n }\n\n // then the default value\n if (schema.defaultValue) {\n const generator = new XmlDataNodeGenerator()\n const value = generator.generate(schema.defaultValue, nodeName)\n if (value !== undefined) {\n return `${tagFill}${value}`\n }\n }\n\n // finally we generate stuff.\n const opts: IProcessNodeOptions = {\n indent: currentIndent + 1,\n forceName: nodeName,\n }\n const value = this.processNode(items, opts)\n return `${tagFill}${value}`\n }\n\n /**\n * Renders a NodeShape as an array item.\n *\n * @param schema The array shape with item that is NodeShape.\n * @param options Rendering options.\n */\n protected _nodeItems(schema: IApiArrayShape<IApiNodeShape>, options: IProcessNodeOptions = {}): string {\n const items = schema.items as IApiNodeShape\n const currentIndent = options.indent || 0\n const tagFill = new Array(currentIndent * 2).fill(' ').join('')\n const isWrapped = schema.xmlSerialization && !!schema.xmlSerialization.wrapped\n const defaultValue = schema.defaultValue || items.defaultValue\n\n let nodeName = ''\n if (items.xmlSerialization && items.xmlSerialization.name) {\n nodeName = normalizeXmlTagName(items.xmlSerialization.name)\n } else {\n nodeName = shapeToXmlTagName(schema.name ? schema : items)\n }\n\n const valueFill = isWrapped ? new Array(currentIndent * 2 + 2).fill(' ').join('') : tagFill\n const parts: string[] = []\n if (isWrapped) {\n parts.push(`${tagFill}<${nodeName}>`)\n }\n\n let rendered = false\n\n // let's start with examples\n if (this.opts.renderExamples) {\n let { examples = [] } = schema\n if (Array.isArray(items.examples)) {\n examples = examples.concat(items.examples)\n }\n const validExamples = examples.filter((item) => !!item.structuredValue)\n if (validExamples.length) {\n const parts: string[] = []\n const generator = new XmlDataNodeGenerator()\n validExamples.forEach((item) => {\n const value = generator.generate(item.structuredValue as IApiDataNodeUnion, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n }\n })\n rendered = true\n }\n }\n\n if (!rendered && defaultValue) {\n const generator = new XmlDataNodeGenerator()\n const value = generator.generate(defaultValue, nodeName)\n if (value !== undefined) {\n parts.push(`${tagFill}${value}`)\n rendered = true\n }\n }\n if (!rendered) {\n const properties = this._collectProperties(items)\n properties.forEach((prop) => {\n const value = this._propertyShapeObject(prop)\n if (value) {\n parts.push(`${valueFill}${value}`)\n }\n })\n }\n if (isWrapped) {\n parts.push(`${tagFill}</${nodeName}>`)\n }\n return parts.join('\\n')\n }\n\n /**\n * @param example The example to turn into a JS object\n */\n protected _exampleToObject(example?: IApiDataExample): string | undefined {\n if (example && example.structuredValue) {\n const generator = new XmlDataNodeGenerator()\n return generator.generate(example.structuredValue) as string | undefined\n }\n return undefined\n }\n\n protected _unionShapeObject(schema: IApiUnionShape, options: IProcessNodeOptions = {}): string | undefined {\n let { anyOf = [], examples = [] } = schema\n if (Array.isArray(schema.inherits) && schema.inherits) {\n schema.inherits.forEach((parent) => {\n const anyParent = parent as IApiAnyShape\n if (Array.isArray(anyParent.examples) && anyParent.examples.length) {\n examples = examples.concat(anyParent.examples)\n }\n const typed = parent as IApiUnionShape\n if (Array.isArray(typed.anyOf) && typed.anyOf.length) {\n anyOf = anyOf.concat(typed.anyOf)\n }\n })\n }\n if (Array.isArray(anyOf) && anyOf.length) {\n if (this._isNotRequiredUnion(anyOf)) {\n // This generates schema for required values.\n // This implicitly mean that the property is not required therefore the value should\n // not be generated.\n return undefined\n }\n const example = examples.find((item) => !!item.structuredValue)\n const value = this._exampleToObject(example)\n if (value !== undefined) {\n const label = shapeToXmlTagName(schema)\n const currentIndent = options.indent || 0\n const rootFill = new Array(currentIndent * 2).fill(' ').join('')\n const valueFill = new Array(currentIndent * 2 + 2).fill(' ').join('')\n const parts = []\n parts.push(`${rootFill}<${label}>`)\n const formatted = String(value)\n .split('\\n')\n .filter((i) => !!i)\n .map((i) => `${valueFill}${i}`)\n .join('\\n')\n parts.push(`${formatted}`)\n parts.push(`${rootFill}</${label}>`)\n return parts.join('\\n')\n }\n if (schema.defaultValue) {\n return this._unionDefaultValue(schema, schema.defaultValue)\n }\n const member = this._readCurrentUnion(anyOf)\n if (member) {\n return this.processNode(member, { ...options, forceName: schema.name })\n }\n }\n return undefined\n }\n\n /**\n * @param schema The schema with unions\n * @param defaultValue The definition of a default value.\n */\n protected _unionDefaultValue(\n schema: IShapeUnion,\n defaultValue: IApiDataNodeUnion,\n options: IProcessNodeOptions = {}\n ): string | undefined {\n const gen = new XmlDataNodeGenerator()\n const value = gen.generate(defaultValue)\n const anySchema = schema as IApiAnyShape\n const label = shapeToXmlTagName(anySchema)\n const currentIndent = options.indent || 0\n const rootFill = new Array(currentIndent * 2).fill(' ').join('')\n const parts = [`${rootFill}<${label}>`]\n const valueFill = new Array(currentIndent * 2 + 2).fill(' ').join('')\n parts.push(`${valueFill}${String(value).trim()}`)\n parts.push(`${rootFill}</${label}>`)\n return parts.join('\\n')\n }\n\n protected _fileShapeObject(): string | undefined {\n return undefined\n }\n\n protected _schemaShapeObject(): string | undefined {\n return undefined\n }\n\n protected _tupleShapeObject(): string | undefined {\n return undefined\n }\n\n protected _anyShapeObject(schema: IApiAnyShape): string | undefined {\n const { and = [], xone = [], or = [] } = schema\n if (and.length) {\n // we combine all properties together under `schema` with changed properties\n const copy = structuredClone(schema) as IApiNodeShape\n copy.and = []\n copy.properties = []\n and.forEach((item) => {\n const { types } = item\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n const typed = item as IApiScalarShape\n copy.properties.push(typed)\n } else if (types.includes(ns.w3.shacl.NodeShape)) {\n const typed = item as IApiNodeShape\n typed.properties.forEach((i) => copy.properties.push(i))\n } else if (\n types.includes(ns.aml.vocabularies.shapes.ArrayShape) ||\n types.includes(ns.aml.vocabularies.shapes.MatrixShape)\n ) {\n const typed = item as IApiArrayShape\n if (typed.items) {\n copy.properties.push(typed.items)\n }\n }\n })\n return this._nodeShapeObject(copy)\n }\n if (xone.length) {\n const { selectedUnions = [] } = this.opts\n let selected = xone.find((i) => selectedUnions.includes(i.id))\n if (!selected) {\n // select firs available\n selected = xone[0]\n }\n return this.processNode(selected)\n }\n if (or.length) {\n const { selectedUnions = [] } = this.opts\n let selected = or.find((i) => selectedUnions.includes(i.id))\n if (!selected) {\n // select firs available\n selected = or[0]\n }\n return this.processNode(selected)\n }\n const { examples = [] } = schema\n const label = shapeToXmlTagName(schema)\n if (this.opts.renderExamples && examples && examples.length) {\n const example = examples.find((item) => !!item.structuredValue)\n const value = this._exampleToObject(example)\n const parts = []\n if (typeof value !== 'undefined') {\n const valueFill = ` `\n parts.push(`<${label}>`)\n parts.push(`${valueFill}${value}`)\n parts.push(`</${label}>`)\n }\n return parts.join('\\n')\n }\n return this._scalarShapeObject(schema)\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Operation } from '@api-client/json/patch/types.js';
|
|
2
2
|
import CustomEvent from './CustomEvent.js';
|
|
3
3
|
/**
|
|
4
4
|
* Base event detail definition for the events that returns a `result`
|
|
@@ -464,7 +464,7 @@ export interface IPatchInfo extends IPatchBase {
|
|
|
464
464
|
/**
|
|
465
465
|
* The patch generated by the client.
|
|
466
466
|
*/
|
|
467
|
-
patch:
|
|
467
|
+
patch: Operation[];
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
470
470
|
* A schema sent by the store server in a response to the patch request.
|
|
@@ -476,6 +476,6 @@ export interface IPatchRevision extends IPatchInfo {
|
|
|
476
476
|
/**
|
|
477
477
|
* The patch to apply to the object to revert the changes.
|
|
478
478
|
*/
|
|
479
|
-
revert:
|
|
479
|
+
revert: Operation[];
|
|
480
480
|
}
|
|
481
481
|
//# sourceMappingURL=BaseEvents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseEvents.d.ts","sourceRoot":"","sources":["../../../src/events/BaseEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BaseEvents.d.ts","sourceRoot":"","sources":["../../../src/events/BaseEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C;;;GAGG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC;IAC7C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAA;CAC5C;AAED;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC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;;;;OAOG;IACH,YAAY,IAAY,EAAE,OAA8B;QACtD,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;IAC1B,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,uBAAwB,SAAQ,WAAgC;IAC3E;;;OAGG;IACH,YAAY,IAAY,EAAE,MAA2B;QACnD,KAAK,CAAC,IAAI,EAAE;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,uBAA2B,SAAQ,WAAmC;IACjF;;;OAGG;IACH,YAAY,IAAY,EAAE,MAA8B;QACtD,KAAK,CAAC,IAAI,EAAE;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAwBD;;;;;;GAMG;AACH,MAAM,OAAO,kBAA4C,SAAQ,YAGhE;CAWA;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,sBAAgD,SAAQ,YAGpE;CAWA;AA4ED,MAAM,OAAO,gBAAoB,SAAQ,YAAsD;IAC7F;;;OAGG;IACH,YAAY,IAAY,EAAE,OAA2B,EAAE;QACrD,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACnB,CAAC;CACF;AA6CD;;;;;;;;;GASG;AACH,MAAM,OAAO,iBAA+B,SAAQ,YAA6C;CAiBhG","sourcesContent":["import { JsonPatch } from '@api-client/json'\nimport CustomEvent from './CustomEvent.js'\n\n/**\n * Base event detail definition for the events that returns a `result`\n * property on the `detail` object\n */\nexport interface ContextEventDetailWithResult<T> {\n /**\n * This property is set by the context provider, a promise resolved when the operation finish\n * with the corresponding result.\n */\n result?: Promise<T | undefined> | undefined\n}\n\n/**\n * A base class to use with context providers.\n */\nexport class ContextEvent<S extends object, R> extends CustomEvent<S & ContextEventDetailWithResult<R>> {\n /**\n * @param type The event type\n * @param detail The optional detail object. It adds object's properties to the `detail` with the `result` property.\n */\n constructor(type: string, detail: S) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n result: undefined,\n ...detail,\n },\n })\n }\n}\n\nexport interface ContextReadEventDetail {\n /**\n * The key of the state object to read.\n */\n key: string\n /**\n * Optional parent, when needed.\n */\n parent?: string\n}\n\n/**\n * An event to be used to read a state from a context provider.\n */\nexport class ContextReadEvent<T> extends ContextEvent<ContextReadEventDetail, T | null | undefined> {\n /**\n * @param type The type of the event\n * @param key The domain key of the object to read\n * @param parent Optional parent, when needed.\n */\n constructor(type: string, key: string, parent?: string) {\n super(type, { key, parent })\n }\n}\n\nexport interface ContextReadBulkEventDetail {\n /**\n * The list of keys to read.\n */\n keys: string[]\n /**\n * Optional parent, when needed.\n */\n parent?: string\n}\n\n/**\n * An event to be used to read a list of object from the API store.\n */\nexport class ContextReadBulkEvent<T> extends ContextEvent<\n ContextReadBulkEventDetail,\n IBulkOperationResult<T | null | undefined>\n> {\n /**\n * @param type The type of the event\n * @param keys The list of domain keys to read. These must be of the same domain type.\n */\n constructor(type: string, keys: string[], parent?: string) {\n super(type, { keys, parent })\n }\n}\n\n/**\n * A general purpose change record.\n * Set on the `detail` object of the `CustomEvent` when a change occurs in the context store.\n */\nexport interface ContextChangeRecord<T> {\n /**\n * The data kind of the changed item.\n * May not be present when this is used with the old architecture.\n */\n kind?: string\n /**\n * The key of the changed context state object.\n */\n key: string\n /**\n * The updated context state object.\n */\n item?: T\n /**\n * Optionally, when relevant, the key of the parent of the changed object.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\nexport interface ContextDeleteEventDetail {\n /**\n * The key of the domain object to remove.\n */\n key: string\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\nexport interface ContextDeleteBulkEventDetail {\n /**\n * The list of keys of the domain object to remove.\n */\n keys: string[]\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\n/**\n * An event to be used to delete a state in the context provider.\n */\nexport class ContextDeleteEvent extends ContextEvent<ContextDeleteEventDetail, ContextDeleteRecord> {\n /**\n * An event to be used to delete a state in the context provider.\n * @param type The type of the event to dispatch.\n * @param key The key of the object to delete\n * @param parent The key of the parent object, if applicable.\n */\n constructor(type: string, key: string, parent?: string) {\n super(type, { key, parent })\n }\n}\n\n/**\n * Describes a result of the batch delete operation.\n */\nexport interface IBulkOperationResult<T> {\n /**\n * The ordered list of delete result for each item.\n *\n * The batch operation does not return specific errors. Use the direct delete operation\n * for the detailed error.\n */\n items: (T | undefined | null)[]\n}\n\n/**\n * An event to be used to delete a number of entities in the context provider.\n */\nexport class ContextDeleteBulkEvent extends ContextEvent<\n ContextDeleteBulkEventDetail,\n IBulkOperationResult<ContextDeleteRecord>\n> {\n /**\n * An event to be used to delete a number of entities in the context provider.\n * @param type The type of the event to dispatch.\n * @param keys The list of ids of the domain object to remove.\n * @param parent The key of the parent object, if applicable.\n */\n constructor(type: string, keys: string[], parent?: string) {\n super(type, { keys, parent })\n }\n}\n\nexport interface ContextDeleteRecord {\n /**\n * The data kind of the deleted item.\n * May not be present when this is used with the old architecture.\n */\n kind?: string\n /**\n * The key of the removed object.\n */\n key: string\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\n/**\n * An event dispatched to the context store to restore previously deleted items.\n */\nexport class ContextRestoreEvent<T> extends ContextEvent<\n { records: ContextDeleteRecord[] },\n IBulkOperationResult<ContextChangeRecord<T>>\n> {\n /**\n * An event dispatched to the context store to restore previously deleted items.\n *\n * The result of the event is the list of `ContextChangeRecord` for the restored items.\n *\n * @param type The type of the event.\n * @param records The records of previously deleted items.\n */\n constructor(type: string, records: ContextDeleteRecord[]) {\n super(type, { records })\n }\n}\n\n/**\n * An event dispatched when a context store object has been deleted.\n * In general a single context store uses the same event to dispatch the change record.\n * For example the `data-store` dispatches the `x` event and the change record has the\n * `kind` property that is used to recognize the type of the data object.\n */\nexport class ContextStateDeleteEvent extends CustomEvent<ContextDeleteRecord> {\n /**\n * @param type The type of the event to dispatch.\n * @param record The delete record.\n */\n constructor(type: string, record: ContextDeleteRecord) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: record,\n })\n }\n}\n\n/**\n * An event dispatched when a context store object has been updated.\n */\nexport class ContextStateUpdateEvent<T> extends CustomEvent<ContextChangeRecord<T>> {\n /**\n * @param type The type of the event to dispatch.\n * @param record The delete record.\n */\n constructor(type: string, record: ContextChangeRecord<T>) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: record,\n })\n }\n}\n\nexport interface ContextUpdateEventDetail<T> {\n /**\n * The context store object to be updated by the context provider.\n */\n item: T\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\nexport interface ContextUpdateBulkEventDetail<T = unknown> {\n /**\n * The list of context store objects to be updated by the context provider.\n */\n items: T[]\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\n/**\n * An event that is dispatched to update the entire object in the store.\n * This is equivalent to PUT operation in REST HTTP.\n *\n * @template T The object that is being updated.\n * @template U The object that is returned by the context store after updating. By default it is the `T`.\n */\nexport class ContextUpdateEvent<T extends object, U = T> extends ContextEvent<\n ContextUpdateEventDetail<T>,\n ContextChangeRecord<U>\n> {\n // /**\n // * An event that is dispatched to update the entire object in the store.\n // * This is equivalent to PUT operation in REST HTTP.\n // *\n // * @param type The type of the event to dispatch\n // * @param updateInfo The update information.\n // */\n // constructor(type: string, updateInfo: ContextUpdateEventDetail<T>) {\n // super(type, updateInfo)\n // }\n}\n\n/**\n * An event that is dispatched to update a list of objects in the store.\n * This is equivalent to PUT operation in REST HTTP.\n *\n * If there's a parent, this event only allows to update entities in bulk for the same parent.\n *\n * @template T The object that is being updated.\n * @template U The object that is returned by the context store after updating. By default it is the `T`.\n */\nexport class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<\n ContextUpdateBulkEventDetail<T>,\n IBulkOperationResult<ContextChangeRecord<U>>\n> {\n // /**\n // * An event that is dispatched to update the entire object in the store.\n // * This is equivalent to PUT operation in REST HTTP.\n // *\n // * @param type The type of the event to dispatch\n // * @param updateInfo The update information.\n // */\n // constructor(type: string, updateInfo: ContextUpdateBulkEventDetail<T>) {\n // super(type, updateInfo)\n // }\n}\n\n/**\n * Data store query result object.\n */\nexport interface ContextListResult<T> {\n /**\n * The cursor to use with the next query. It has the list state encoded in it.\n */\n cursor?: string\n /**\n * The list of items in the response.\n * May be empty array when there was no more results.\n */\n items: T[]\n}\n\n/**\n * Base query options for the data store.\n */\nexport interface ContextListOptions {\n /**\n * The number of results per the page.\n */\n limit?: number\n /**\n * Page cursor to use with the query. This is returned by the\n */\n cursor?: string\n /**\n * Optional general purpose parent for the query.\n */\n parent?: string\n /**\n * Supported by some endpoints. When set it performs a query on the data store.\n */\n query?: string\n /**\n * Only with the `query` property. Tells the system in which fields to search for the query term.\n */\n queryField?: string[]\n /**\n * Whether to use the `descending` order.\n */\n descending?: boolean\n /**\n * The name of the field to order then results.\n */\n sort?: string\n /**\n * The order of the results. This is used when the `sort` property is set.\n * It can be `asc` or `desc`.\n */\n order?: 'asc' | 'desc'\n /**\n * General purpose type property to filer the results.\n * This is used, for example, by the history store to list history for a specific type of requests,\n */\n type?: string\n /**\n * Used when synchronizing data in the local store with the data stored in the net-store.\n * The timestamp when the last synchronization was performed. The resulting array will contain only items that\n * have been updated since that date.\n */\n since?: number\n /**\n * The list of kinds to list. This is used when querying for files.\n */\n kinds?: unknown[]\n /**\n * Some endpoints require the `oid` property to be set as a query parameter\n * and not as a part of the URL. It is used when the org id is optional.\n */\n oid?: string\n}\n\nexport class ContextListEvent<T> extends ContextEvent<ContextListOptions, ContextListResult<T>> {\n /**\n * @param type The type of the event\n * @param opts Query options.\n */\n constructor(type: string, opts: ContextListOptions = {}) {\n super(type, opts)\n }\n}\n\nexport interface IQueryDetail {\n /**\n * The query term. All values are always passed as string. Context store must parse value if it requires other types.\n */\n term: string\n\n /**\n * If the context store supports it, the tags to use with the query function to limit the results.\n */\n tags?: string[]\n\n /**\n * General purpose type to be defined by the context store.\n * Allows to specify the type of the query to perform.\n */\n type?: string\n\n /**\n * General purpose keyword to be defined by the context store.\n * The purpose is to instruct the context store to perform detailed search.\n * Usually this means longer search time but more accurate results.\n */\n detailed?: boolean\n}\n\nexport interface IQueryResponse<T = unknown> {\n /**\n * An ordered list of results.\n */\n items: IQueryResult<T>[]\n}\n\nexport interface IQueryResult<T = unknown> {\n /**\n * The document.\n */\n doc: T\n /**\n * The list of indexes where this document was found.\n */\n index: string[]\n}\n\n/**\n * An event dispatched to the context store to perform a query operation.\n * If the context store supports the query operation, it should use the definition\n * of `IQueryDetail` to perform the query.\n * The result is the list of objects ordered by the store from the most relevant items to the least.\n *\n * The implementation should not assume pagination and return enough results\n * for the user to find what they were looking for\n * or to redefine the query. Suggested limit is `50` which in many cases is equivalent of 2 pages of results.\n */\nexport class ContextQueryEvent<T = unknown> extends ContextEvent<IQueryDetail, IQueryResponse<T>> {\n /**\n * An event dispatched to the context store to perform a query operation.\n * If the context store supports the query operation, it should use the definition\n * of `IQueryDetail` to perform the query.\n * The result is the list of objects ordered by the store from the most relevant items to the least.\n *\n * The implementation should not assume pagination and return enough results\n * the user to find what they were looking for\n * or to redefine the query. Suggested limit is `50` which in many cases is equivalent of 2 pages of results.\n *\n * @param type The type of the event.\n * @param opts The query options.\n */\n // constructor(type: string, opts: IQueryDetail) {\n // super(type, opts)\n // }\n}\n\n/**\n * Query options to list history for a request in a project.\n * The user has to have access to the parent user organization to read / create / delete the history.\n */\nexport interface IHistoryRequestListOptions extends ContextListOptions {\n type: 'request'\n /**\n * The key of the parent organization.\n */\n organization: string\n /**\n * The id of the project that contains the request.\n */\n project: string\n /**\n * The id of the request.\n */\n id: string\n /**\n * Whether to limit the list of results to the history that belongs to the current user.\n */\n user?: boolean\n}\n\n/**\n * Listing options for the HTTP history.\n */\nexport type HistoryListOptions = IHistoryRequestListOptions\n\nexport interface IProjectExecutionListOptions extends ContextListOptions {\n /**\n * The key of the parent organization.\n */\n organization: string\n\n /**\n * The id of the parent project\n */\n project: string\n\n /**\n * The key of the application that made the records.\n * This is optional and will returns results for the project made in all apps.\n */\n app?: string\n\n /**\n * The key of the parent folder, if any.\n * Note, when this is not provided the endpoint only returns list of logs\n * created for the project.\n */\n parent?: string\n\n /**\n * The user id that made that project run. Optional.\n */\n user?: string\n}\n\n/**\n * @deprecated Use `PatchInfo` instead\n */\nexport interface IPatchBase {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The application id that generated the patch.\n * This is a string that is assigned to each application in the suite.\n * External applications need to use a constant string for their apps.\n */\n app: string\n /**\n * The version of the application that generated the patch.\n * This can and will be used to handle potential differences between suite applications.\n */\n appVersion: string\n /**\n * The patch generated by the client.\n */\n patch: unknown\n /**\n * The current timestamp.\n */\n timestamp: number\n}\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch of a file.\n * @deprecated Use `MediaPatchInfo` instead\n */\nexport interface IPatchInfo extends IPatchBase {\n /**\n * The patch generated by the client.\n */\n patch: JsonPatch\n}\n\n/**\n * A schema sent by the store server in a response to the patch request.\n * It contains an information about the applied patch, the reverse operation associated with it,\n * application information, and the generated by the client patch id.\n * @deprecated Use `MediaPatchRevision` instead\n */\nexport interface IPatchRevision extends IPatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: JsonPatch\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BaseEvents.js","sourceRoot":"","sources":["../../../src/events/BaseEvents.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAc1C;;GAEG;AACH,MAAM,OAAO,YAAkC,SAAQ,WAAgD;IACrG;;;OAGG;IACH,YAAY,IAAY,EAAE,MAAS;QACjC,KAAK,CAAC,IAAI,E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AY,IAAY,EAAE,MAA2B;QACnD,KAAK,CAAC,IAAI,EAAE;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,uBAA2B,SAAQ,WAAmC;IACjF;;;OAGG;IACH,YAAY,IAAY,EAAE,MAA8B;QACtD,KAAK,CAAC,IAAI,EAAE;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAwBD;;;;;;GAMG;AACH,MAAM,OAAO,kBAA4C,SAAQ,YAGhE;CAWA;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,sBAAgD,SAAQ,YAGpE;CAWA;AA4ED,MAAM,OAAO,gBAAoB,SAAQ,YAAsD;IAC7F;;;OAGG;IACH,YAAY,IAAY,EAAE,OAA2B,EAAE;QACrD,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACnB,CAAC;CACF;AA6CD;;;;;;;;;GASG;AACH,MAAM,OAAO,iBAA+B,SAAQ,YAA6C;CAiBhG","sourcesContent":["import type { Operation } from '@api-client/json/patch/types.js'\nimport CustomEvent from './CustomEvent.js'\n\n/**\n * Base event detail definition for the events that returns a `result`\n * property on the `detail` object\n */\nexport interface ContextEventDetailWithResult<T> {\n /**\n * This property is set by the context provider, a promise resolved when the operation finish\n * with the corresponding result.\n */\n result?: Promise<T | undefined> | undefined\n}\n\n/**\n * A base class to use with context providers.\n */\nexport class ContextEvent<S extends object, R> extends CustomEvent<S & ContextEventDetailWithResult<R>> {\n /**\n * @param type The event type\n * @param detail The optional detail object. It adds object's properties to the `detail` with the `result` property.\n */\n constructor(type: string, detail: S) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n result: undefined,\n ...detail,\n },\n })\n }\n}\n\nexport interface ContextReadEventDetail {\n /**\n * The key of the state object to read.\n */\n key: string\n /**\n * Optional parent, when needed.\n */\n parent?: string\n}\n\n/**\n * An event to be used to read a state from a context provider.\n */\nexport class ContextReadEvent<T> extends ContextEvent<ContextReadEventDetail, T | null | undefined> {\n /**\n * @param type The type of the event\n * @param key The domain key of the object to read\n * @param parent Optional parent, when needed.\n */\n constructor(type: string, key: string, parent?: string) {\n super(type, { key, parent })\n }\n}\n\nexport interface ContextReadBulkEventDetail {\n /**\n * The list of keys to read.\n */\n keys: string[]\n /**\n * Optional parent, when needed.\n */\n parent?: string\n}\n\n/**\n * An event to be used to read a list of object from the API store.\n */\nexport class ContextReadBulkEvent<T> extends ContextEvent<\n ContextReadBulkEventDetail,\n IBulkOperationResult<T | null | undefined>\n> {\n /**\n * @param type The type of the event\n * @param keys The list of domain keys to read. These must be of the same domain type.\n */\n constructor(type: string, keys: string[], parent?: string) {\n super(type, { keys, parent })\n }\n}\n\n/**\n * A general purpose change record.\n * Set on the `detail` object of the `CustomEvent` when a change occurs in the context store.\n */\nexport interface ContextChangeRecord<T> {\n /**\n * The data kind of the changed item.\n * May not be present when this is used with the old architecture.\n */\n kind?: string\n /**\n * The key of the changed context state object.\n */\n key: string\n /**\n * The updated context state object.\n */\n item?: T\n /**\n * Optionally, when relevant, the key of the parent of the changed object.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\nexport interface ContextDeleteEventDetail {\n /**\n * The key of the domain object to remove.\n */\n key: string\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\nexport interface ContextDeleteBulkEventDetail {\n /**\n * The list of keys of the domain object to remove.\n */\n keys: string[]\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n /**\n * The parent organization.\n */\n organization?: string\n}\n\n/**\n * An event to be used to delete a state in the context provider.\n */\nexport class ContextDeleteEvent extends ContextEvent<ContextDeleteEventDetail, ContextDeleteRecord> {\n /**\n * An event to be used to delete a state in the context provider.\n * @param type The type of the event to dispatch.\n * @param key The key of the object to delete\n * @param parent The key of the parent object, if applicable.\n */\n constructor(type: string, key: string, parent?: string) {\n super(type, { key, parent })\n }\n}\n\n/**\n * Describes a result of the batch delete operation.\n */\nexport interface IBulkOperationResult<T> {\n /**\n * The ordered list of delete result for each item.\n *\n * The batch operation does not return specific errors. Use the direct delete operation\n * for the detailed error.\n */\n items: (T | undefined | null)[]\n}\n\n/**\n * An event to be used to delete a number of entities in the context provider.\n */\nexport class ContextDeleteBulkEvent extends ContextEvent<\n ContextDeleteBulkEventDetail,\n IBulkOperationResult<ContextDeleteRecord>\n> {\n /**\n * An event to be used to delete a number of entities in the context provider.\n * @param type The type of the event to dispatch.\n * @param keys The list of ids of the domain object to remove.\n * @param parent The key of the parent object, if applicable.\n */\n constructor(type: string, keys: string[], parent?: string) {\n super(type, { keys, parent })\n }\n}\n\nexport interface ContextDeleteRecord {\n /**\n * The data kind of the deleted item.\n * May not be present when this is used with the old architecture.\n */\n kind?: string\n /**\n * The key of the removed object.\n */\n key: string\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\n/**\n * An event dispatched to the context store to restore previously deleted items.\n */\nexport class ContextRestoreEvent<T> extends ContextEvent<\n { records: ContextDeleteRecord[] },\n IBulkOperationResult<ContextChangeRecord<T>>\n> {\n /**\n * An event dispatched to the context store to restore previously deleted items.\n *\n * The result of the event is the list of `ContextChangeRecord` for the restored items.\n *\n * @param type The type of the event.\n * @param records The records of previously deleted items.\n */\n constructor(type: string, records: ContextDeleteRecord[]) {\n super(type, { records })\n }\n}\n\n/**\n * An event dispatched when a context store object has been deleted.\n * In general a single context store uses the same event to dispatch the change record.\n * For example the `data-store` dispatches the `x` event and the change record has the\n * `kind` property that is used to recognize the type of the data object.\n */\nexport class ContextStateDeleteEvent extends CustomEvent<ContextDeleteRecord> {\n /**\n * @param type The type of the event to dispatch.\n * @param record The delete record.\n */\n constructor(type: string, record: ContextDeleteRecord) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: record,\n })\n }\n}\n\n/**\n * An event dispatched when a context store object has been updated.\n */\nexport class ContextStateUpdateEvent<T> extends CustomEvent<ContextChangeRecord<T>> {\n /**\n * @param type The type of the event to dispatch.\n * @param record The delete record.\n */\n constructor(type: string, record: ContextChangeRecord<T>) {\n super(type, {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: record,\n })\n }\n}\n\nexport interface ContextUpdateEventDetail<T> {\n /**\n * The context store object to be updated by the context provider.\n */\n item: T\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\nexport interface ContextUpdateBulkEventDetail<T = unknown> {\n /**\n * The list of context store objects to be updated by the context provider.\n */\n items: T[]\n /**\n * The key of the parent object, if applicable.\n */\n parent?: string\n}\n\n/**\n * An event that is dispatched to update the entire object in the store.\n * This is equivalent to PUT operation in REST HTTP.\n *\n * @template T The object that is being updated.\n * @template U The object that is returned by the context store after updating. By default it is the `T`.\n */\nexport class ContextUpdateEvent<T extends object, U = T> extends ContextEvent<\n ContextUpdateEventDetail<T>,\n ContextChangeRecord<U>\n> {\n // /**\n // * An event that is dispatched to update the entire object in the store.\n // * This is equivalent to PUT operation in REST HTTP.\n // *\n // * @param type The type of the event to dispatch\n // * @param updateInfo The update information.\n // */\n // constructor(type: string, updateInfo: ContextUpdateEventDetail<T>) {\n // super(type, updateInfo)\n // }\n}\n\n/**\n * An event that is dispatched to update a list of objects in the store.\n * This is equivalent to PUT operation in REST HTTP.\n *\n * If there's a parent, this event only allows to update entities in bulk for the same parent.\n *\n * @template T The object that is being updated.\n * @template U The object that is returned by the context store after updating. By default it is the `T`.\n */\nexport class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<\n ContextUpdateBulkEventDetail<T>,\n IBulkOperationResult<ContextChangeRecord<U>>\n> {\n // /**\n // * An event that is dispatched to update the entire object in the store.\n // * This is equivalent to PUT operation in REST HTTP.\n // *\n // * @param type The type of the event to dispatch\n // * @param updateInfo The update information.\n // */\n // constructor(type: string, updateInfo: ContextUpdateBulkEventDetail<T>) {\n // super(type, updateInfo)\n // }\n}\n\n/**\n * Data store query result object.\n */\nexport interface ContextListResult<T> {\n /**\n * The cursor to use with the next query. It has the list state encoded in it.\n */\n cursor?: string\n /**\n * The list of items in the response.\n * May be empty array when there was no more results.\n */\n items: T[]\n}\n\n/**\n * Base query options for the data store.\n */\nexport interface ContextListOptions {\n /**\n * The number of results per the page.\n */\n limit?: number\n /**\n * Page cursor to use with the query. This is returned by the\n */\n cursor?: string\n /**\n * Optional general purpose parent for the query.\n */\n parent?: string\n /**\n * Supported by some endpoints. When set it performs a query on the data store.\n */\n query?: string\n /**\n * Only with the `query` property. Tells the system in which fields to search for the query term.\n */\n queryField?: string[]\n /**\n * Whether to use the `descending` order.\n */\n descending?: boolean\n /**\n * The name of the field to order then results.\n */\n sort?: string\n /**\n * The order of the results. This is used when the `sort` property is set.\n * It can be `asc` or `desc`.\n */\n order?: 'asc' | 'desc'\n /**\n * General purpose type property to filer the results.\n * This is used, for example, by the history store to list history for a specific type of requests,\n */\n type?: string\n /**\n * Used when synchronizing data in the local store with the data stored in the net-store.\n * The timestamp when the last synchronization was performed. The resulting array will contain only items that\n * have been updated since that date.\n */\n since?: number\n /**\n * The list of kinds to list. This is used when querying for files.\n */\n kinds?: unknown[]\n /**\n * Some endpoints require the `oid` property to be set as a query parameter\n * and not as a part of the URL. It is used when the org id is optional.\n */\n oid?: string\n}\n\nexport class ContextListEvent<T> extends ContextEvent<ContextListOptions, ContextListResult<T>> {\n /**\n * @param type The type of the event\n * @param opts Query options.\n */\n constructor(type: string, opts: ContextListOptions = {}) {\n super(type, opts)\n }\n}\n\nexport interface IQueryDetail {\n /**\n * The query term. All values are always passed as string. Context store must parse value if it requires other types.\n */\n term: string\n\n /**\n * If the context store supports it, the tags to use with the query function to limit the results.\n */\n tags?: string[]\n\n /**\n * General purpose type to be defined by the context store.\n * Allows to specify the type of the query to perform.\n */\n type?: string\n\n /**\n * General purpose keyword to be defined by the context store.\n * The purpose is to instruct the context store to perform detailed search.\n * Usually this means longer search time but more accurate results.\n */\n detailed?: boolean\n}\n\nexport interface IQueryResponse<T = unknown> {\n /**\n * An ordered list of results.\n */\n items: IQueryResult<T>[]\n}\n\nexport interface IQueryResult<T = unknown> {\n /**\n * The document.\n */\n doc: T\n /**\n * The list of indexes where this document was found.\n */\n index: string[]\n}\n\n/**\n * An event dispatched to the context store to perform a query operation.\n * If the context store supports the query operation, it should use the definition\n * of `IQueryDetail` to perform the query.\n * The result is the list of objects ordered by the store from the most relevant items to the least.\n *\n * The implementation should not assume pagination and return enough results\n * for the user to find what they were looking for\n * or to redefine the query. Suggested limit is `50` which in many cases is equivalent of 2 pages of results.\n */\nexport class ContextQueryEvent<T = unknown> extends ContextEvent<IQueryDetail, IQueryResponse<T>> {\n /**\n * An event dispatched to the context store to perform a query operation.\n * If the context store supports the query operation, it should use the definition\n * of `IQueryDetail` to perform the query.\n * The result is the list of objects ordered by the store from the most relevant items to the least.\n *\n * The implementation should not assume pagination and return enough results\n * the user to find what they were looking for\n * or to redefine the query. Suggested limit is `50` which in many cases is equivalent of 2 pages of results.\n *\n * @param type The type of the event.\n * @param opts The query options.\n */\n // constructor(type: string, opts: IQueryDetail) {\n // super(type, opts)\n // }\n}\n\n/**\n * Query options to list history for a request in a project.\n * The user has to have access to the parent user organization to read / create / delete the history.\n */\nexport interface IHistoryRequestListOptions extends ContextListOptions {\n type: 'request'\n /**\n * The key of the parent organization.\n */\n organization: string\n /**\n * The id of the project that contains the request.\n */\n project: string\n /**\n * The id of the request.\n */\n id: string\n /**\n * Whether to limit the list of results to the history that belongs to the current user.\n */\n user?: boolean\n}\n\n/**\n * Listing options for the HTTP history.\n */\nexport type HistoryListOptions = IHistoryRequestListOptions\n\nexport interface IProjectExecutionListOptions extends ContextListOptions {\n /**\n * The key of the parent organization.\n */\n organization: string\n\n /**\n * The id of the parent project\n */\n project: string\n\n /**\n * The key of the application that made the records.\n * This is optional and will returns results for the project made in all apps.\n */\n app?: string\n\n /**\n * The key of the parent folder, if any.\n * Note, when this is not provided the endpoint only returns list of logs\n * created for the project.\n */\n parent?: string\n\n /**\n * The user id that made that project run. Optional.\n */\n user?: string\n}\n\n/**\n * @deprecated Use `PatchInfo` instead\n */\nexport interface IPatchBase {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The application id that generated the patch.\n * This is a string that is assigned to each application in the suite.\n * External applications need to use a constant string for their apps.\n */\n app: string\n /**\n * The version of the application that generated the patch.\n * This can and will be used to handle potential differences between suite applications.\n */\n appVersion: string\n /**\n * The patch generated by the client.\n */\n patch: unknown\n /**\n * The current timestamp.\n */\n timestamp: number\n}\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch of a file.\n * @deprecated Use `MediaPatchInfo` instead\n */\nexport interface IPatchInfo extends IPatchBase {\n /**\n * The patch generated by the client.\n */\n patch: Operation[]\n}\n\n/**\n * A schema sent by the store server in a response to the patch request.\n * It contains an information about the applied patch, the reverse operation associated with it,\n * application information, and the generated by the client patch id.\n * @deprecated Use `MediaPatchRevision` instead\n */\nexport interface IPatchRevision extends IPatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: Operation[]\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDataMockInit, IHarTimingInit, IHttpResponseRedirectStatusInit } from '@pawel-up/data-mock';
|
|
1
|
+
import type { IDataMockInit, IHarTimingInit, IHttpResponseRedirectStatusInit } from '@pawel-up/data-mock/types.js';
|
|
2
2
|
export type ArcDataMockInit = IDataMockInit;
|
|
3
3
|
export interface VariableInit {
|
|
4
4
|
defaultEnv?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyInterfaces.d.ts","sourceRoot":"","sources":["../../../src/mocking/LegacyInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,+BAA+B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LegacyInterfaces.d.ts","sourceRoot":"","sources":["../../../src/mocking/LegacyInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAElH,MAAM,MAAM,eAAe,GAAG,aAAa,CAAA;AAE3C,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,CAAC,OAAO,WAAW,mBAAoB,SAAQ,cAAc;IACjE;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,+BAA+B,EAAE,cAAc;IACvG;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyInterfaces.js","sourceRoot":"","sources":["../../../src/mocking/LegacyInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { IDataMockInit, IHarTimingInit, IHttpResponseRedirectStatusInit } from '@pawel-up/data-mock'\n\nexport type ArcDataMockInit = IDataMockInit\n\nexport interface VariableInit {\n defaultEnv?: boolean\n randomEnv?: boolean\n}\n\nexport declare interface RestApiIndexInit {\n versionSize?: number\n order?: number\n}\n\nexport declare interface HttpResponseArcInit extends IHarTimingInit {\n /**\n * When set it does not generate a response payload.\n */\n noBody?: boolean\n /**\n * The first number of the status group. Other 2 are auto generated\n */\n statusGroup?: number\n /**\n * Whether to generate timings object\n */\n timings?: boolean\n /**\n * When set it ignores size information\n */\n noSize?: boolean\n /**\n * Adds redirects to the request\n */\n redirects?: boolean\n}\n\nexport declare interface HttpResponseRedirectInit extends IHttpResponseRedirectStatusInit, IHarTimingInit {\n /**\n * When set it adds body to the response\n */\n body?: boolean\n /**\n * The redirection code. Otherwise a random pick is used\n */\n code?: number\n /**\n * Whether to generate timings object\n */\n timings?: boolean\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LegacyInterfaces.js","sourceRoot":"","sources":["../../../src/mocking/LegacyInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import type { IDataMockInit, IHarTimingInit, IHttpResponseRedirectStatusInit } from '@pawel-up/data-mock/types.js'\n\nexport type ArcDataMockInit = IDataMockInit\n\nexport interface VariableInit {\n defaultEnv?: boolean\n randomEnv?: boolean\n}\n\nexport declare interface RestApiIndexInit {\n versionSize?: number\n order?: number\n}\n\nexport declare interface HttpResponseArcInit extends IHarTimingInit {\n /**\n * When set it does not generate a response payload.\n */\n noBody?: boolean\n /**\n * The first number of the status group. Other 2 are auto generated\n */\n statusGroup?: number\n /**\n * Whether to generate timings object\n */\n timings?: boolean\n /**\n * When set it ignores size information\n */\n noSize?: boolean\n /**\n * Adds redirects to the request\n */\n redirects?: boolean\n}\n\nexport declare interface HttpResponseRedirectInit extends IHttpResponseRedirectStatusInit, IHarTimingInit {\n /**\n * When set it adds body to the response\n */\n body?: boolean\n /**\n * The redirection code. Otherwise a random pick is used\n */\n code?: number\n /**\n * Whether to generate timings object\n */\n timings?: boolean\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataMock } from '@pawel-up/data-mock';
|
|
1
|
+
import { DataMock } from '@pawel-up/data-mock/DataMock.js';
|
|
2
2
|
import { Authorization } from './legacy/Authorization.js';
|
|
3
3
|
import { Certificates } from './legacy/Certificates.js';
|
|
4
4
|
import { Cookies } from './legacy/Cookies.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyMock.d.ts","sourceRoot":"","sources":["../../../src/mocking/LegacyMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LegacyMock.d.ts","sourceRoot":"","sources":["../../../src/mocking/LegacyMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,qBAAa,UAAW,SAAQ,QAAQ;IAC7B,IAAI,EAAE,IAAI,CAAA;IACnB,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,IAAI,CAAA;IACV,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;IAEhB;;OAEG;gBACS,IAAI,CAAC,EAAE,eAAe;CAYnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataMock } from '@pawel-up/data-mock';
|
|
1
|
+
import { DataMock } from '@pawel-up/data-mock/DataMock.js';
|
|
2
2
|
import { Authorization } from './legacy/Authorization.js';
|
|
3
3
|
import { Certificates } from './legacy/Certificates.js';
|
|
4
4
|
import { Cookies } from './legacy/Cookies.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyMock.js","sourceRoot":"","sources":["../../../src/mocking/LegacyMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LegacyMock.js","sourceRoot":"","sources":["../../../src/mocking/LegacyMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,MAAM,OAAO,UAAW,SAAQ,QAAQ;IAC7B,IAAI,CAAM;IACnB,SAAS,CAAW;IACpB,OAAO,CAAS;IAChB,SAAS,CAAW;IACpB,YAAY,CAAc;IAC1B,IAAI,CAAM;IACV,aAAa,CAAe;IAC5B,OAAO,CAAS;IAEhB;;OAEG;IACH,YAAY,IAAsB;QAChC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEX,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAA;QACpC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAA;QAC5C,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,CAAC;CACF","sourcesContent":["import { DataMock } from '@pawel-up/data-mock/DataMock.js'\nimport { Authorization } from './legacy/Authorization.js'\nimport { Certificates } from './legacy/Certificates.js'\nimport { Cookies } from './legacy/Cookies.js'\nimport { HostRules } from './legacy/HostRules.js'\nimport { Http } from './legacy/Http.js'\nimport { RestApi } from './legacy/RestApi.js'\nimport { Urls } from './legacy/Urls.js'\nimport { Variables } from './legacy/Variables.js'\nimport { ArcDataMockInit } from './LegacyInterfaces.js'\n\nexport class LegacyMock extends DataMock {\n override http: Http\n variables: Variables\n cookies: Cookies\n hostRules: HostRules\n certificates: Certificates\n urls: Urls\n authorization: Authorization\n restApi: RestApi\n\n /**\n * @param init The library init options.\n */\n constructor(init?: ArcDataMockInit) {\n super(init)\n\n this.http = new Http(init)\n this.variables = new Variables(init)\n this.cookies = new Cookies(init)\n this.hostRules = new HostRules(init)\n this.certificates = new Certificates(init)\n this.urls = new Urls(init)\n this.authorization = new Authorization(init)\n this.restApi = new RestApi(init)\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DataMock
|
|
1
|
+
import { DataMock } from '@pawel-up/data-mock/DataMock.js';
|
|
2
|
+
import type { IDataMockInit } from '@pawel-up/data-mock/types.js';
|
|
2
3
|
import { Request } from './lib/Request.js';
|
|
3
4
|
import { Response } from './lib/Response.js';
|
|
4
5
|
import { User } from './lib/User.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMock.d.ts","sourceRoot":"","sources":["../../../src/mocking/ProjectMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProjectMock.d.ts","sourceRoot":"","sources":["../../../src/mocking/ProjectMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE9E,qBAAa,WAAY,SAAQ,QAAQ;IACvC,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;IACR,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IAEpB;;OAEG;gBACS,IAAI,CAAC,EAAE,aAAa;CAUjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMock.js","sourceRoot":"","sources":["../../../src/mocking/ProjectMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"ProjectMock.js","sourceRoot":"","sources":["../../../src/mocking/ProjectMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAO9C,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,cAAc,CAAS;IACvB,QAAQ,CAAU;IAClB,IAAI,CAAM;IACV,OAAO,CAAS;IAChB,GAAG,CAAK;IACR,YAAY,CAAc;IAC1B,SAAS,CAAW;IAEpB;;OAEG;IACH,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,cAAc,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAA;QAC1C,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAA;IACtC,CAAC;CACF","sourcesContent":["import { DataMock } from '@pawel-up/data-mock/DataMock.js'\nimport type { IDataMockInit } from '@pawel-up/data-mock/types.js'\nimport { Request } from './lib/Request.js'\nimport { Response } from './lib/Response.js'\nimport { User } from './lib/User.js'\nimport { History } from './lib/History.js'\nimport { Url } from './lib/Url.js'\nimport { Certificates } from './lib/Certificates.js'\nimport { HostRules } from './lib/HostRules.js'\n\nexport type { IRequestLogInit } from './lib/Request.js'\nexport type { IResponseInit } from './lib/Response.js'\nexport type { IUserInit } from './lib/User.js'\nexport type { IHttpHistoryInit, IHttpHistoryListInit } from './lib/History.js'\n\nexport class ProjectMock extends DataMock {\n projectRequest: Request\n response: Response\n user: User\n history: History\n url: Url\n certificates: Certificates\n hostRules: HostRules\n\n /**\n * @param init The library init options.\n */\n constructor(init?: IDataMockInit) {\n super(init)\n this.projectRequest = new Request(init)\n this.response = new Response(init)\n this.user = new User(init)\n this.history = new History(init)\n this.url = new Url(init)\n this.certificates = new Certificates(init)\n this.hostRules = new HostRules(init)\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Internet
|
|
1
|
+
import { Internet } from '@pawel-up/data-mock/Internet.js';
|
|
2
|
+
import { Types } from '@pawel-up/data-mock/Types.js';
|
|
2
3
|
import { ArcDataMockInit } from '../LegacyInterfaces.js';
|
|
3
4
|
import { ARCAuthData } from '../../models/legacy/models/AuthData.js';
|
|
4
5
|
export declare class Authorization {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorization.d.ts","sourceRoot":"","sources":["../../../../src/mocking/legacy/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Authorization.d.ts","sourceRoot":"","sources":["../../../../src/mocking/legacy/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEpE,qBAAa,aAAa;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;gBAEN,IAAI,GAAE,eAAoB;IAKtC;;OAEG;IACH,KAAK,IAAI,WAAW;IASpB;;;;;OAKG;IACH,SAAS,CAAC,IAAI,SAAK,GAAG,WAAW,EAAE;CAOpC"}
|