@infrab4a/connect 1.0.0-beta.37 → 1.0.0-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,8 +5,8 @@ declare type FindByAttributeResult<MBase extends ModelBaseStructure<MBase>, Attr
5
5
  };
6
6
  export declare class AttributeOptionHelper {
7
7
  static FindByAttribute: <MBase extends ModelBaseStructure<any, any>, Attribute extends NonFunctionAndIdentifierPropertyNames<MBase>>(attributeName: Attribute, fields: HasuraGraphQLFields<MBase>) => FindByAttributeResult<MBase, Attribute>;
8
- static CheckIsColumnOption: <Model extends ModelBaseStructure<any, any>, ParentModel extends ModelBaseStructure<any, any>>(fieldValue: ColumnOptions<Model, ParentModel, string | number | boolean | Record<string, any>>) => fieldValue is ColumnOptions<Model, ParentModel, string | number | boolean | Record<string, any>>;
9
- static FindColumnOptionFromList: <Model extends ModelBaseStructure<any, any>, ParentModel extends ModelBaseStructure<any, any>>(columnName: string, fields: HasuraGraphQLFields<ParentModel>) => ColumnOptions<Model, ParentModel, string | number | boolean | Record<string, any>> & {
8
+ static CheckIsColumnOption: <Model extends ModelBaseStructure<any, any>, ParentModel extends ModelBaseStructure<any, any>>(fieldValue: ColumnOptions<Model, ParentModel, any>) => fieldValue is ColumnOptions<Model, ParentModel, any>;
9
+ static FindColumnOptionFromList: <Model extends ModelBaseStructure<any, any>, ParentModel extends ModelBaseStructure<any, any>>(columnName: string, fields: HasuraGraphQLFields<ParentModel>) => ColumnOptions<Model, ParentModel, any> & {
10
10
  attributeName: NonFunctionAndIdentifierPropertyNames<ParentModel>;
11
11
  };
12
12
  }
@@ -1,8 +1,8 @@
1
1
  import { ModelBaseStructure, NonFunctionAndIdentifierPropertyNames, RepositoryFindField } from '../../../domain';
2
2
  import { PropType } from '../../../utils';
3
3
  import { HasuraGraphQLColumnType } from '../enums';
4
- export declare type ColumnOptions<FieldType, Model, ValueFrom = string | number | boolean | Record<string, any>> = {
5
- type?: HasuraGraphQLColumnType | string;
4
+ export declare type ColumnOptions<FieldType, Model, ValueFrom = any> = {
5
+ type?: HasuraGraphQLColumnType;
6
6
  columnName?: string;
7
7
  fields?: HasuraGraphQLFields<FieldType extends any[] ? FieldType[number] : FieldType>;
8
8
  foreignKeyColumn?: Partial<Record<NonFunctionAndIdentifierPropertyNames<FieldType extends any[] ? FieldType[number] : FieldType>, NonFunctionAndIdentifierPropertyNames<Model> | string>>;
@@ -14,7 +14,7 @@ export declare type ColumnOptions<FieldType, Model, ValueFrom = string | number
14
14
  export declare type AggregateOptionNames = 'avg' | 'count' | 'max' | 'min' | 'stddev' | 'stddev_pop' | 'stddev_samp' | 'sum' | 'var_pop' | 'var_samp' | 'variance';
15
15
  export declare type AggregateOptionFields<Model, Type, Properties extends keyof Model = keyof Model> = {
16
16
  [K in Properties]: PropType<Model, K> extends Type ? K : never;
17
- }[Properties];
17
+ }[Properties] | string;
18
18
  export declare type AggregateOptions<Model> = {
19
19
  avg?: Array<AggregateOptionFields<Model, number>>;
20
20
  max?: Array<AggregateOptionFields<Model, number | Date>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "1.0.0-beta.37",
3
+ "version": "1.0.0-beta.39",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },