-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherrypick interface generator fix (#935)
* Interfaces w no props fix * changeset
- Loading branch information
1 parent
c5ee0a1
commit 6bac6fb
Showing
6 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@osdk/generator": patch | ||
--- | ||
|
||
Fixes generation for interfaces with no properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/e2e.generated.catchall/src/generatedNoCheck/ontology/interfaces.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { FooInterface } from './interfaces/FooInterface.js'; | ||
export { InterfaceNoProps } from './interfaces/InterfaceNoProps.js'; |
56 changes: 56 additions & 0 deletions
56
packages/e2e.generated.catchall/src/generatedNoCheck/ontology/interfaces/InterfaceNoProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import type { PropertyDef as $PropertyDef } from '@osdk/api'; | ||
import { $osdkMetadata } from '../../OntologyMetadata.js'; | ||
|
||
import type { | ||
InterfaceDefinition as $InterfaceDefinition, | ||
ObjectSet as $ObjectSet, | ||
Osdk as $Osdk, | ||
PropertyValueWireToClient as $PropType, | ||
} from '@osdk/api'; | ||
|
||
export type OsdkObjectLinks$InterfaceNoProps = {}; | ||
|
||
export namespace InterfaceNoProps { | ||
export type PropertyKeys = never; | ||
|
||
export interface Props {} | ||
export type StrictProps = Props; | ||
|
||
export interface ObjectSet extends $ObjectSet<InterfaceNoProps, InterfaceNoProps.ObjectSet> {} | ||
|
||
export type OsdkInstance< | ||
OPTIONS extends never | '$rid' = never, | ||
K extends keyof InterfaceNoProps.Props = keyof InterfaceNoProps.Props, | ||
> = $Osdk.Instance<InterfaceNoProps, OPTIONS, K>; | ||
|
||
/** @deprecated use OsdkInstance */ | ||
export type OsdkObject< | ||
OPTIONS extends never | '$rid' = never, | ||
K extends keyof InterfaceNoProps.Props = keyof InterfaceNoProps.Props, | ||
> = OsdkInstance<OPTIONS, K>; | ||
} | ||
|
||
export interface InterfaceNoProps extends $InterfaceDefinition { | ||
osdkMetadata: typeof $osdkMetadata; | ||
type: 'interface'; | ||
apiName: 'InterfaceNoProps'; | ||
__DefinitionMetadata?: { | ||
objectSet: InterfaceNoProps.ObjectSet; | ||
props: InterfaceNoProps.Props; | ||
linksType: OsdkObjectLinks$InterfaceNoProps; | ||
strictProps: InterfaceNoProps.StrictProps; | ||
apiName: 'InterfaceNoProps'; | ||
description: 'Its a Foo.'; | ||
displayName: 'FInterfaceNoProps'; | ||
links: {}; | ||
properties: {}; | ||
rid: 'ri.ontology.main.interface-type.1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b'; | ||
type: 'interface'; | ||
}; | ||
} | ||
|
||
export const InterfaceNoProps: InterfaceNoProps = { | ||
type: 'interface', | ||
apiName: 'InterfaceNoProps', | ||
osdkMetadata: $osdkMetadata, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters