@osdk/generator-converters 2.1.0-beta.10 → 2.1.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.
- package/CHANGELOG.md +18 -0
- package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +6 -3
- package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
- package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js +1 -1
- package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
- package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +6 -3
- package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
- package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js +1 -1
- package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @osdk/generator-converters
|
|
2
2
|
|
|
3
|
+
## 2.1.0-beta.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @osdk/api@2.1.0-beta.12
|
|
8
|
+
|
|
9
|
+
## 2.1.0-beta.11
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- bc1761c: Update platform API dependencies.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [bc1761c]
|
|
18
|
+
- Updated dependencies [9298f75]
|
|
19
|
+
- @osdk/api@2.1.0-beta.11
|
|
20
|
+
|
|
3
21
|
## 2.1.0-beta.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -36,18 +36,21 @@ describe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {
|
|
|
36
36
|
primaryKey: {
|
|
37
37
|
dataType: {
|
|
38
38
|
type: "string"
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"rid": "rid"
|
|
40
41
|
},
|
|
41
42
|
otherKey: {
|
|
42
43
|
nullable: false,
|
|
43
44
|
dataType: {
|
|
44
45
|
type: "string"
|
|
45
|
-
}
|
|
46
|
+
},
|
|
47
|
+
rid: "rid"
|
|
46
48
|
},
|
|
47
49
|
defaulted: {
|
|
48
50
|
dataType: {
|
|
49
51
|
type: "string"
|
|
50
|
-
}
|
|
52
|
+
},
|
|
53
|
+
rid: "rid"
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
rid: "rid",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","
|
|
1
|
+
{"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","rid","defaulted","status","titleProperty","sharedPropertyTypeMapping","toBe"],"sources":["wireObjectTypeFullMetadataToSdkObjectMetadata.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expect, it } from \"vitest\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\ndescribe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {\n it(\"handles magic nullable properties\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n // PK is never nullable\n expect(result.properties[\"primaryKey\"].nullable).toBe(false);\n // was specified above\n expect(result.properties[\"otherKey\"].nullable).toBe(false);\n // was unspecified, so should be nullable\n expect(result.properties[\"defaulted\"].nullable).toBe(true);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,6CAA6C,QAAQ,oDAAoD;AAClHH,QAAQ,CAACG,6CAA6C,EAAE,MAAM;EAC1DD,EAAE,CAAC,mCAAmC,EAAE,MAAM;IAC1C,MAAME,MAAM,GAAGD,6CAA6C,CAAC;MACzDE,oBAAoB,EAAE,EAAE;MACxBC,qBAAqB,EAAE,CAAC,CAAC;MACzBC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE;QACRC,OAAO,EAAE,SAAS;QAClBC,WAAW,EAAE,aAAa;QAC1BC,WAAW,EAAE,aAAa;QAC1BC,iBAAiB,EAAE,cAAc;QACjCC,IAAI,EAAE;UAAEC,IAAI,EAAE,WAAW;UAAEC,IAAI,EAAE,WAAW;UAAEC,KAAK,EAAE;QAAO,CAAC;QAC7DC,UAAU,EAAE,YAAY;QACxBC,UAAU,EAAE;UACRD,UAAU,EAAE;YAAEE,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAE,KAAK,EAAE;UAAM,CAAC;UAC1DM,QAAQ,EAAE;YACNC,QAAQ,EAAE,KAAK;YACfF,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAC5BQ,GAAG,EAAE;UACT,CAAC;UACDC,SAAS,EAAE;YAAEJ,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAEQ,GAAG,EAAE;UAAM;QAC1D,CAAC;QACDA,GAAG,EAAE,KAAK;QACVE,MAAM,EAAE,QAAQ;QAChBC,aAAa,EAAE;MACnB,CAAC;MACDC,yBAAyB,EAAE,CAAC;IAChC,CAAC,EAAE,IAAI,CAAC;IACR;IACAzB,MAAM,CAACG,MAAM,CAACc,UAAU,CAAC,YAAY,CAAC,CAACG,QAAQ,CAAC,CAACM,IAAI,CAAC,KAAK,CAAC;IAC5D;IACA1B,MAAM,CAACG,MAAM,CAACc,UAAU,CAAC,UAAU,CAAC,CAACG,QAAQ,CAAC,CAACM,IAAI,CAAC,KAAK,CAAC;IAC1D;IACA1B,MAAM,CAACG,MAAM,CAACc,UAAU,CAAC,WAAW,CAAC,CAACG,QAAQ,CAAC,CAACM,IAAI,CAAC,IAAI,CAAC;EAC9D,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -81,7 +81,7 @@ function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
|
|
|
81
81
|
case "array":
|
|
82
82
|
return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);
|
|
83
83
|
case "timeseries":
|
|
84
|
-
if (propertyType.itemType
|
|
84
|
+
if (propertyType.itemType?.type === "string") {
|
|
85
85
|
return "stringTimeseries";
|
|
86
86
|
}
|
|
87
87
|
return "numericTimeseries";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","input","isNullable","dataType","type","displayName","multiplicity","description","objectPropertyTypeToSdkPropertyDefinition","nullable","Error","JSON","stringify","propertyType","subType","itemType"],"sources":["wirePropertyV2ToSdkPropertyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: input.nullable == null ? isNullable : input.nullable,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: true,\n };\n }\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = input.dataType;\n throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType
|
|
1
|
+
{"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","input","isNullable","dataType","type","displayName","multiplicity","description","objectPropertyTypeToSdkPropertyDefinition","nullable","Error","JSON","stringify","propertyType","subType","itemType"],"sources":["wirePropertyV2ToSdkPropertyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: input.nullable == null ? isNullable : input.nullable,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: true,\n };\n }\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = input.dataType;\n throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n }\n return \"numericTimeseries\";\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = propertyType;\n throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qCAAqCA,CAACC,KAAK,EAAEC,UAAU,GAAG,IAAI,EAAE;EAC5E,QAAQD,KAAK,CAACE,QAAQ,CAACC,IAAI;IACvB,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,MAAM;IACX,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,MAAM;IACX,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,YAAY;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,WAAW;IAChB,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,wBAAwB;MACzB,OAAO;QACHC,WAAW,EAAEJ,KAAK,CAACI,WAAW;QAC9BC,YAAY,EAA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,kBAAkB;MAC7B;MACA,OAAO,mBAAmB;IAC9B,KAAK,gBAAgB;MAAE;QACnB,MAAM,IAAIM,KAAK,CAAC,oCAAoC,CAAC;MACzD;IACA;MAEI,MAAM,IAAIA,KAAK,CAAC,wBAAwBC,IAAI,CAACC,SAAS,CAACC,YAAY,CAAC,EAAE,CAAC;EAC/E;AACJ","ignoreList":[]}
|
|
@@ -36,18 +36,21 @@ describe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {
|
|
|
36
36
|
primaryKey: {
|
|
37
37
|
dataType: {
|
|
38
38
|
type: "string"
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"rid": "rid"
|
|
40
41
|
},
|
|
41
42
|
otherKey: {
|
|
42
43
|
nullable: false,
|
|
43
44
|
dataType: {
|
|
44
45
|
type: "string"
|
|
45
|
-
}
|
|
46
|
+
},
|
|
47
|
+
rid: "rid"
|
|
46
48
|
},
|
|
47
49
|
defaulted: {
|
|
48
50
|
dataType: {
|
|
49
51
|
type: "string"
|
|
50
|
-
}
|
|
52
|
+
},
|
|
53
|
+
rid: "rid"
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
rid: "rid",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","
|
|
1
|
+
{"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","rid","defaulted","status","titleProperty","sharedPropertyTypeMapping","toBe"],"sources":["wireObjectTypeFullMetadataToSdkObjectMetadata.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expect, it } from \"vitest\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\ndescribe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {\n it(\"handles magic nullable properties\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n // PK is never nullable\n expect(result.properties[\"primaryKey\"].nullable).toBe(false);\n // was specified above\n expect(result.properties[\"otherKey\"].nullable).toBe(false);\n // was unspecified, so should be nullable\n expect(result.properties[\"defaulted\"].nullable).toBe(true);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ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AAM,CAACG,MAAM,CAACc,UAAU,CAAC,WAAW,CAAC,CAACG,QAAQ,CAAC,CAACM,IAAI,CAAC,IAAI,CAAC;EAC9D,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -81,7 +81,7 @@ function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
|
|
|
81
81
|
case "array":
|
|
82
82
|
return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);
|
|
83
83
|
case "timeseries":
|
|
84
|
-
if (propertyType.itemType
|
|
84
|
+
if (propertyType.itemType?.type === "string") {
|
|
85
85
|
return "stringTimeseries";
|
|
86
86
|
}
|
|
87
87
|
return "numericTimeseries";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","input","isNullable","dataType","type","displayName","multiplicity","description","objectPropertyTypeToSdkPropertyDefinition","nullable","Error","JSON","stringify","propertyType","subType","itemType"],"sources":["wirePropertyV2ToSdkPropertyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: input.nullable == null ? isNullable : input.nullable,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: true,\n };\n }\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = input.dataType;\n throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType
|
|
1
|
+
{"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","input","isNullable","dataType","type","displayName","multiplicity","description","objectPropertyTypeToSdkPropertyDefinition","nullable","Error","JSON","stringify","propertyType","subType","itemType"],"sources":["wirePropertyV2ToSdkPropertyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: input.nullable == null ? isNullable : input.nullable,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: true,\n };\n }\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = input.dataType;\n throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n }\n return \"numericTimeseries\";\n case \"mediaReference\": {\n throw new Error(`Media references not supported yet`);\n }\n default:\n const _ = propertyType;\n throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qCAAqCA,CAACC,KAAK,EAAEC,UAAU,GAAG,IAAI,EAAE;EAC5E,QAAQD,KAAK,CAACE,QA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,KAAK,MAAM;IACX,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,YAAY;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,WAAW;IAChB,KAAK,SAAS;IACd,KAAK,wBAAwB;MACzB,OAAOS,YAAY,CAACT,IAAI;IAC5B,KAAK,MAAM;MACP,OAAO,UAAU;IACrB,KAAK,OAAO;MACR,OAAOI,yCAAyC,CAACK,YAAY,CAACC,OAAO,CAAC;IAC1E,KAAK,YAAY;MACb,IAAID,YAAY,CAACE,QAAQ,EAAEX,IAAI,KAAK,QAAQ,EAAE;QAC1C,OAAO,kBAAkB;MAC7B;MACA,OAAO,mBAAmB;IAC9B,KAAK,gBAAgB;MAAE;QACnB,MAAM,IAAIM,KAAK,CAAC,oCAAoC,CAAC;MACzD;IACA;MAEI,MAAM,IAAIA,KAAK,CAAC,wBAAwBC,IAAI,CAACC,SAAS,CAACC,YAAY,CAAC,EAAE,CAAC;EAC/E;AACJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator-converters",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@osdk/internal.foundry.core": "2.
|
|
25
|
-
"@osdk/api": "~2.1.0-beta.
|
|
24
|
+
"@osdk/internal.foundry.core": "2.5.0",
|
|
25
|
+
"@osdk/api": "~2.1.0-beta.12"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"ts-expect": "^1.3.0",
|
|
29
29
|
"typescript": "~5.5.4",
|
|
30
30
|
"vitest": "^2.1.2",
|
|
31
|
-
"@osdk/monorepo.tsconfig": "~0.0.0",
|
|
32
31
|
"@osdk/monorepo.api-extractor": "~0.0.0",
|
|
32
|
+
"@osdk/monorepo.tsconfig": "~0.0.0",
|
|
33
33
|
"@osdk/monorepo.tsup": "~0.0.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|