type WithTags = T & { comment?: string; description?: string; tags: Record; }; export type PgNamespace = WithTags<{ id: string; name: string; }>; export type PgClass = WithTags<{ id: string; name: string; namespaceId: string; namespaceName: string; typeId?: string; isExtensionConfigurationTable?: boolean; namespace?: PgNamespace; type?: PgType; attributes?: PgAttribute[]; canUseAsterisk?: boolean; constraints?: PgConstraint[]; foreignConstraints?: PgConstraint[]; primaryKeyConstraint?: PgConstraint; }>; export type PgAttribute = WithTags<{ id: string; classId: string; name: string; num: number; typeId: string; class?: PgClass; type?: PgType; isIndexed?: boolean; isUnique?: boolean; columnLevelSelectGrant?: boolean; }>; export type PgType = WithTags<{ id: string; name: string; namespaceId: string; type: string; classId?: string; domainBaseTypeId?: string; arrayItemTypeId?: string; namespace?: PgNamespace; class?: PgClass; domainBaseType?: PgType; arrayItemType?: PgType; arrayType?: PgType; }>; export type PgConstraint = WithTags<{ id: string; name: string; classId: string; foreignClassId: string | null; type: 'p' | 'f' | 'u'; keyAttributeNums: number[]; foreignKeyAttributeNums: number[] | null; isFake?: boolean; isIndexed?: boolean; class?: PgClass; foreignClass?: PgClass; keyAttributes?: PgAttribute[]; foreignKeyAttributes?: PgAttribute[]; }>; export type PgProcedure = WithTags<{ id: string; name: string; namespaceId: string; namespace?: PgNamespace; }>; export type PgExtension = WithTags<{ id: string; name: string; namespaceId: string; configurationClassIds: string[]; namespace?: PgNamespace; configurationClasses?: PgClass[]; }>; export type PgIndex = WithTags<{ id: string; name: string; classId: string; attributeNums: number[]; isUnique: boolean; class: PgClass; }>; export interface PgIntrospectionResultByKind { __pgVersion: number; namespace: PgNamespace[]; class: PgClass[]; attribute: PgAttribute[]; type: PgType[]; constraint: PgConstraint[]; procedure: PgProcedure[]; extension: PgExtension[]; index: PgIndex[]; namespaceById?: Record; classById?: Record; typeById?: Record; attributeByClassIdAndNum?: Record>; extensionById?: Record; } export {};