@osdk/maker 0.14.0-beta.11 → 0.14.0-beta.12

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.
@@ -785,14 +785,14 @@ function distributeTypeHelper(type) {
785
785
  // src/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.ts
786
786
  function propertyTypeTypeToOntologyIrType(type) {
787
787
  switch (true) {
788
- case (typeof type === "object" && "markingType" in type):
788
+ case (typeof type === "object" && type.type === "marking"):
789
789
  return {
790
790
  "type": "marking",
791
791
  marking: {
792
792
  markingType: type.markingType
793
793
  }
794
794
  };
795
- case (typeof type === "object" && "structDefinition" in type):
795
+ case (typeof type === "object" && type.type === "struct"):
796
796
  const structFields = new Array();
797
797
  for (const key in type.structDefinition) {
798
798
  const fieldTypeDefinition = type.structDefinition[key];
@@ -838,15 +838,24 @@ function propertyTypeTypeToOntologyIrType(type) {
838
838
  structFields
839
839
  }
840
840
  };
841
- case (typeof type === "object" && "isLongText" in type):
841
+ case (typeof type === "object" && type.type === "string"):
842
842
  return {
843
843
  "type": "string",
844
844
  "string": {
845
845
  analyzerOverride: void 0,
846
- enableAsciiFolding: void 0,
847
- isLongText: type.isLongText,
848
- supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard,
849
- supportsExactMatching: type.supportsExactMatching
846
+ enableAsciiFolding: type.enableAsciiFolding,
847
+ isLongText: type.isLongText ?? false,
848
+ supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard ?? false,
849
+ supportsExactMatching: type.supportsExactMatching ?? true,
850
+ supportsFullTextRegex: type.supportsFullTextRegex
851
+ }
852
+ };
853
+ case (typeof type === "object" && type.type === "decimal"):
854
+ return {
855
+ "type": "decimal",
856
+ "decimal": {
857
+ precision: type.precision,
858
+ scale: type.scale
850
859
  }
851
860
  };
852
861
  case type === "geopoint":
@@ -884,6 +893,9 @@ function propertyTypeTypeToOntologyIrType(type) {
884
893
  geotimeSeriesReference: {}
885
894
  };
886
895
  default:
896
+ if (typeof type === "object") {
897
+ throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);
898
+ }
887
899
  return distributeTypeHelper(type);
888
900
  }
889
901
  }
@@ -2025,7 +2037,7 @@ function addNamespaceIfNone(apiName) {
2025
2037
  var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
2026
2038
  var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
2027
2039
  async function main(args = process.argv) {
2028
- const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.14.0-beta.11").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
2040
+ const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.14.0-beta.12").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
2029
2041
  input: {
2030
2042
  alias: "i",
2031
2043
  describe: "Input file",