Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssanjay1 committed Dec 10, 2024
1 parent 5628328 commit bffa0af
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 16 deletions.
4 changes: 3 additions & 1 deletion etc/api.report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ export interface PropertyValueWireToClient {
stringTimeseries: TimeSeriesProperty<string>;
// (undocumented)
timestamp: string;
// (undocumented)
unknown: never;
}

// Warning: (ae-forgotten-export) The symbol "PrimitiveDataType" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -851,7 +853,7 @@ export interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends Prop
export type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;

// @public (undocumented)
export type SimpleWirePropertyTypes = "string" | "datetime" | "double" | "boolean" | "integer" | "timestamp" | "short" | "long" | "float" | "decimal" | "byte" | "marking" | "numericTimeseries" | "stringTimeseries" | "sensorTimeseries" | "attachment" | "geopoint" | "geoshape" | "geotimeSeriesReference";
export type SimpleWirePropertyTypes = "string" | "datetime" | "double" | "boolean" | "integer" | "timestamp" | "short" | "long" | "float" | "decimal" | "byte" | "marking" | "numericTimeseries" | "stringTimeseries" | "sensorTimeseries" | "attachment" | "geopoint" | "geoshape" | "geotimeSeriesReference" | "unknown";

// @public (undocumented)
export interface SingleLinkAccessor<T extends ObjectTypeDefinition> {
Expand Down
4 changes: 4 additions & 0 deletions packages/api/src/mapping/PropertyValueMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export interface PropertyValueWireToClient {
stringTimeseries: TimeSeriesProperty<string>;
sensorTimeseries: TimeSeriesProperty<string | number>;
geotimeSeriesReference: GeotimeSeriesProperty<GeoJSON.Point>;

unknown: never;
}

export type getClientPropertyValueFromWire<
Expand Down Expand Up @@ -77,6 +79,8 @@ export interface PropertyValueClientToWire {
stringTimeseries: TimeSeriesProperty<string>;
sensorTimeseries: TimeSeriesProperty<string | number>;
geotimeSeriesReference: GeotimeSeriesProperty<GeoJSON.Point>;

unknown: never;
}
export type getWirePropertyValueFromClient<
T extends
Expand Down
3 changes: 2 additions & 1 deletion packages/api/src/ontology/WirePropertyTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ export type SimpleWirePropertyTypes =
| "attachment"
| "geopoint"
| "geoshape"
| "geotimeSeriesReference";
| "geotimeSeriesReference"
| "unknown";
83 changes: 83 additions & 0 deletions packages/e2e.generated.catchall/ontology.json
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,89 @@
},
"linkTypes": []
},
"BgaoNflPlayer": {
"objectType": {
"apiName": "BgaoNflPlayer",
"primaryKey": "id",
"displayName": "BgaoNflPlayer",
"description": "BgaoNflPlayer",
"properties": {
"id": {
"dataType": {
"type": "string"
}
},
"gamesPlayed": {
"dataType": {
"type": "integer"
}
},
"name": {
"dataType": {
"type": "string"
}
},
"number": {
"dataType": {
"type": "integer"
}
},
"wikiUrl": {
"dataType": {
"type": "string"
}
},
"address": {
"dataType": {
"type": "struct",
"structFieldTypes": [
{
"apiName": "addressLine1",
"dataType": {
"type": "string"
}
},
{
"apiName": "addressLine2",
"dataType": {
"type": "string"
}
},
{
"apiName": "city",
"dataType": {
"type": "string"
}
},
{
"apiName": "state",
"dataType": {
"type": "string"
}
},
{
"apiName": "zipCode",
"dataType": {
"type": "integer"
}
}
]
}
}
},

"status": "ACTIVE",
"rid": "ri.a.b.c.d",
"icon": {
"type": "blueprint",
"name": "traffic",
"color": "color"
},
"titleProperty": "entityId",
"pluralDisplayName": "GtfsTripTrackObject"
},
"linkTypes": []
},
"SotSensor": {
"objectType": {
"apiName": "SotSensor",
Expand Down
1 change: 1 addition & 0 deletions packages/e2e.sandbox.catchall/src/runInterfacesTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import type { ConvertProps, Osdk } from "@osdk/api";
import {
BgaoNflPlayer,
Employee,
FooInterface,
OsdkTestObject,
Expand Down
3 changes: 2 additions & 1 deletion packages/generator-converters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
"dependencies": {
"@osdk/api": "workspace:~",
"@osdk/internal.foundry.core": "2.8.0"
"@osdk/internal.foundry.core": "2.8.0",
"consola": "^3.2.3"
},
"devDependencies": {
"@osdk/monorepo.api-extractor": "workspace:~",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(
case "float":
case "geotimeSeriesReference":
case "mediaReference":
case "struct":
case "cipherText":
case "struct":
throw new Error(
`Type not supported for primaryKey: ${input.dataType.type}`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
PropertyV2,
SharedPropertyType,
} from "@osdk/internal.foundry.core";
import { consola } from "consola";

export function wirePropertyV2ToSdkPropertyDefinition(
input: (PropertyV2 | SharedPropertyType) & { nullable?: boolean },
Expand Down Expand Up @@ -64,17 +65,33 @@ export function wirePropertyV2ToSdkPropertyDefinition(
nullable: true,
};
}
case "cipherText":
case "mediaReference": {
throw new Error(
`${input.dataType.type} not supported yet`,

case "mediaReference":
case "cipherText": {
consola.info(
`${
JSON.stringify(input.dataType.type)
} is not a supported property type`,
);
return {
displayName: input.displayName,
multiplicity: false,
description: input.description,
type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
nullable: true,
};
}
default:
const _: never = input.dataType;
throw new Error(
`Unexpected data type ${JSON.stringify(input.dataType)}`,
consola.info(
`${JSON.stringify(input.dataType)} is not a supported property type`,
);
return {
displayName: input.displayName,
multiplicity: false,
description: input.description,
type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
nullable: true,
};
}
}

Expand Down Expand Up @@ -123,12 +140,15 @@ function objectPropertyTypeToSdkPropertyDefinition(

case "mediaReference":
case "cipherText": {
throw new Error(
`${propertyType.type} not supported yet`,
consola.info(
`${JSON.stringify(propertyType)} is not a supported property type`,
);
return "unknown";
}
default:
const _: never = propertyType;
throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);
consola.info(
`${JSON.stringify(propertyType)} is not a supported property type`,
);
return "unknown";
}
}
2 changes: 1 addition & 1 deletion packages/maker/src/api/defineObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function convertType(
default:
return {
type: t.type,
};
} as PropertyV2["dataType"];
}

invariant(false);
Expand Down
1 change: 1 addition & 0 deletions packages/monorepo.cspell/dict.osdk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ paperplane
Pressable
Tamagui
unistyles
Bgao
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bffa0af

Please sign in to comment.