diff --git a/grafast/dataplan-pg/src/interfaces.ts b/grafast/dataplan-pg/src/interfaces.ts index 8c3eb281b7..9462a54fcb 100644 --- a/grafast/dataplan-pg/src/interfaces.ts +++ b/grafast/dataplan-pg/src/interfaces.ts @@ -652,28 +652,11 @@ export type Expand = T extends unknown : never; export interface PgRegistry< - TCodecs extends { - [name in string]: PgCodec< - name, - PgCodecAttributes | undefined, - any, - any, - any, - any, - any - >; - } = Record< + TCodecs = Record< string, PgCodec >, - TResourceOptions extends { - [name in string]: PgResourceOptions< - name, - PgCodec, // TCodecs[keyof TCodecs], - ReadonlyArray>, - readonly PgResourceParameter[] | undefined - >; - } = Record< + TResourceOptions = Record< string, PgResourceOptions< string, @@ -683,22 +666,7 @@ export interface PgRegistry< readonly PgResourceParameter[] | undefined > >, - TRelations extends { - [codecName in keyof TCodecs]?: { - [relationName in string]: PgCodecRelationConfig< - // TCodecs[keyof TCodecs] & - PgCodec, - // TResourceOptions[keyof TResourceOptions] & - PgResourceOptions< - any, - // TCodecs[keyof TCodecs] & - PgCodecWithAttributes, - any, - any - > - >; - }; - } = Record< + TRelations = Record< string, Record< string, @@ -762,15 +730,12 @@ export interface PgRegistry< export type GetPgRegistryCodecs> = TRegistry["pgCodecs"]; - export type GetPgRegistrySources> = TRegistry["pgResources"]; - export type GetPgRegistryCodecRelations< TRegistry extends PgRegistry, TCodec extends PgCodec, > = TRegistry["pgRelations"][TCodec["name"]]; - export type GetPgCodecAttributes< TCodec extends PgCodec, > = TCodec extends PgCodec @@ -778,23 +743,18 @@ export type GetPgCodecAttributes< ? never : UAttributes : PgCodecAttributes; - export type GetPgResourceRegistry< TResource extends PgResource, > = TResource["registry"]; - export type GetPgResourceCodec< TResource extends PgResource, > = TResource["codec"]; - export type GetPgResourceAttributes< TResource extends PgResource, > = GetPgCodecAttributes; - export type GetPgResourceRelations< TResource extends PgResource, > = TResource["registry"]["pgRelations"][TResource["codec"]["name"]]; - export type GetPgResourceUniques< TResource extends PgResource, > = TResource["uniques"];