Skip to content

Commit

Permalink
Interface inherited properties are now generated (#441)
Browse files Browse the repository at this point in the history
Fix mrl
  • Loading branch information
ericanderson authored Jul 15, 2024
1 parent 577cbd6 commit 116d848
Show file tree
Hide file tree
Showing 27 changed files with 682 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-dots-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@osdk/generator": patch
---

Interface inherited properties are now generated
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ export interface FooInterface
VersionBound<$ExpectedClientVersion> {
osdkMetadata: typeof $osdkMetadata;
description: 'Its a Foo.';
displayName: 'Foo interface';
links: {};
properties: {
/**
* display name: 'Description',
* description: Description of Description
*/
description: PropertyDef<'string', 'nullable', 'single'>;
/**
* display name: 'Name',
* description: Name of Foo
*/
name: PropertyDef<'string', 'nullable', 'single'>;
};
}
Expand All @@ -18,15 +27,18 @@ export const FooInterface: FooInterface = {
osdkMetadata: $osdkMetadata,
apiName: 'FooInterface',
description: 'Its a Foo.',
displayName: 'Foo interface',
links: {},
properties: {
name: {
displayName: 'Name',
multiplicity: false,
description: 'Name of Foo',
type: 'string',
nullable: true,
},
description: {
displayName: 'Description',
multiplicity: false,
description: 'Description of Description',
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,22 @@ export interface BoundariesUsState
primaryKeyApiName: 'usState';
primaryKeyType: 'string';
properties: {
/**
* display name: 'Geometry10M',
* description: geoshape
*/
geometry10M: PropertyDef<'geoshape', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
latitude: PropertyDef<'double', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
longitude: PropertyDef<'double', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
usState: PropertyDef<'string', 'non-nullable', 'single'>;
};
}
Expand Down Expand Up @@ -42,6 +55,7 @@ export const BoundariesUsState: BoundariesUsState = {
nullable: true,
},
geometry10M: {
displayName: 'Geometry10M',
multiplicity: false,
description: 'geoshape',
type: 'geoshape',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ export interface BuilderDeploymentState
primaryKeyApiName: 'skuId';
primaryKeyType: 'string';
properties: {
/**
* (no ontology metadata)
*/
currentTimestamp: PropertyDef<'timestamp', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
date: PropertyDef<'datetime', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
skuId: PropertyDef<'string', 'non-nullable', 'single'>;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,53 @@ export interface Employee extends ObjectTypeDefinition<'Employee', Employee>, Ve
primaryKeyApiName: 'id';
primaryKeyType: 'string';
properties: {
/**
* (no ontology metadata)
*/
adUsername: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
businessTitle: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
email: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
employeeNumber: PropertyDef<'double', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
favPlace: PropertyDef<'geopoint', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
firstFullTimeStartDate: PropertyDef<'datetime', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
firstName: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
id: PropertyDef<'string', 'non-nullable', 'single'>;
/**
* (no ontology metadata)
*/
jobProfile: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
locationCity: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
locationName: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
locationType: PropertyDef<'string', 'nullable', 'single'>;
};
spts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,129 @@ export interface ObjectTypeWithAllPropertyTypes
primaryKeyApiName: 'id';
primaryKeyType: 'integer';
properties: {
/**
* (no ontology metadata)
*/
attachment: PropertyDef<'attachment', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
attachmentArray: PropertyDef<'attachment', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
boolean: PropertyDef<'boolean', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
booleanArray: PropertyDef<'boolean', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
byte: PropertyDef<'byte', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
byteArray: PropertyDef<'byte', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
date: PropertyDef<'datetime', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
dateArray: PropertyDef<'datetime', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
dateTime: PropertyDef<'timestamp', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
dateTimeArray: PropertyDef<'timestamp', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
decimal: PropertyDef<'decimal', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
decimalArray: PropertyDef<'decimal', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
double: PropertyDef<'double', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
doubleArray: PropertyDef<'double', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
float: PropertyDef<'float', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
floatArray: PropertyDef<'float', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
geoPoint: PropertyDef<'geopoint', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
geoPointArray: PropertyDef<'geopoint', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
geoShape: PropertyDef<'geoshape', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
geoShapeArray: PropertyDef<'geoshape', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
id: PropertyDef<'integer', 'non-nullable', 'single'>;
/**
* (no ontology metadata)
*/
integer: PropertyDef<'integer', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
integerArray: PropertyDef<'integer', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
long: PropertyDef<'long', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
longArray: PropertyDef<'long', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
numericTimeseries: PropertyDef<'numericTimeseries', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
short: PropertyDef<'short', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
shortArray: PropertyDef<'short', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
string: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
stringArray: PropertyDef<'string', 'nullable', 'array'>;
/**
* (no ontology metadata)
*/
stringTimeseries: PropertyDef<'stringTimeseries', 'nullable', 'single'>;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export interface Person extends ObjectTypeDefinition<'Person', Person>, VersionB
primaryKeyApiName: 'email';
primaryKeyType: 'string';
properties: {
/**
* (no ontology metadata)
*/
email: PropertyDef<'string', 'non-nullable', 'single'>;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,26 @@ export interface Todo extends ObjectTypeDefinition<'Todo', Todo>, VersionBound<$
primaryKeyApiName: 'id';
primaryKeyType: 'integer';
properties: {
/**
* display name: 'Body',
* description: The text of the todo
*/
body: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
complete: PropertyDef<'boolean', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
id: PropertyDef<'integer', 'non-nullable', 'single'>;
/**
* (no ontology metadata)
*/
priority: PropertyDef<'integer', 'nullable', 'single'>;
/**
* display name: 'Text'
*/
text: PropertyDef<'string', 'nullable', 'single'>;
};
}
Expand All @@ -40,12 +56,14 @@ export const Todo: Todo = {
nullable: false,
},
body: {
displayName: 'Body',
multiplicity: false,
description: 'The text of the todo',
type: 'string',
nullable: true,
},
text: {
displayName: 'Text',
multiplicity: false,
type: 'string',
nullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ export interface Venture extends ObjectTypeDefinition<'Venture', Venture>, Versi
primaryKeyApiName: 'ventureId';
primaryKeyType: 'string';
properties: {
/**
* (no ontology metadata)
*/
ventureId: PropertyDef<'string', 'non-nullable', 'single'>;
/**
* (no ontology metadata)
*/
ventureName: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
ventureStart: PropertyDef<'datetime', 'nullable', 'single'>;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ export interface WeatherStation
primaryKeyApiName: 'stationId';
primaryKeyType: 'string';
properties: {
/**
* display name: 'Geohash',
* description: geopoint
*/
geohash: PropertyDef<'geopoint', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
stationId: PropertyDef<'string', 'non-nullable', 'single'>;
};
}
Expand All @@ -30,6 +37,7 @@ export const WeatherStation: WeatherStation = {
nullable: false,
},
geohash: {
displayName: 'Geohash',
multiplicity: false,
description: 'geopoint',
type: 'geopoint',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,29 @@ export interface Employee extends ObjectTypeDefinition<'Employee', Employee>, Ve
primaryKeyApiName: 'employeeId';
primaryKeyType: 'integer';
properties: {
/**
* (no ontology metadata)
*/
class: PropertyDef<'string', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
employeeId: PropertyDef<'integer', 'non-nullable', 'single'>;
/**
* description: TimeSeries of the status of the employee
*/
employeeStatus: PropertyDef<'numericTimeseries', 'nullable', 'single'>;
/**
* (no ontology metadata)
*/
fullName: PropertyDef<'string', 'nullable', 'single'>;
/**
* description: The unique of the employee's assigned office. This is some more text.
*/
office: PropertyDef<'integer', 'nullable', 'single'>;
/**
* description: The date the employee was hired (most recently, if they were re-hired)
*/
startDate: PropertyDef<'datetime', 'nullable', 'single'>;
};
}
Expand Down
Loading

0 comments on commit 116d848

Please sign in to comment.