@infrab4a/connect 4.0.2-beta.10 → 4.0.2-beta.11
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.
- package/index.cjs.js +8264 -0
- package/package.json +3 -4
- package/src/domain/catalog/models/category-collection-children.d.ts +1 -1
- package/src/domain/catalog/models/category-filter.d.ts +1 -1
- package/src/domain/catalog/models/kit-product.d.ts +1 -1
- package/src/domain/catalog/models/types/category-condition.type.d.ts +1 -1
- package/src/domain/catalog/models/types/category-metadata.type.d.ts +1 -1
- package/src/domain/catalog/models/types/category-product.d.ts +1 -1
- package/src/domain/catalog/models/types/product-evaluation.type.d.ts +1 -1
- package/src/domain/catalog/models/types/product-gender.type.d.ts +1 -1
- package/src/domain/catalog/models/types/product-metadata.type.d.ts +1 -1
- package/src/domain/catalog/models/types/product-review.type.d.ts +1 -1
- package/src/domain/catalog/models/types/shop-description.type.d.ts +1 -1
- package/src/domain/catalog/models/types/shop-price.type.d.ts +1 -1
- package/src/domain/catalog/models/types/stock.type.d.ts +1 -1
- package/src/domain/catalog/models/types/variant-grade.type.d.ts +1 -1
- package/src/domain/catalog/models/variant.d.ts +1 -1
- package/src/domain/catalog/repositories/product.repository.d.ts +2 -2
- package/src/domain/generic/model/base.model.d.ts +1 -1
- package/src/domain/generic/model/types/identifier-model.type.d.ts +3 -3
- package/src/domain/generic/model/types/model-base-structure.type.d.ts +2 -2
- package/src/domain/generic/model/types/non-function-properties.type.d.ts +6 -6
- package/src/domain/generic/model/types/non-function-property-name.type.d.ts +5 -5
- package/src/domain/generic/repository/create.repository.d.ts +1 -1
- package/src/domain/generic/repository/crud.repository.d.ts +2 -2
- package/src/domain/generic/repository/delete.repository.d.ts +1 -1
- package/src/domain/generic/repository/find.repository.d.ts +1 -1
- package/src/domain/generic/repository/get.repository.d.ts +1 -1
- package/src/domain/generic/repository/read.repository.d.ts +2 -2
- package/src/domain/generic/repository/types/repository-find-filters.type.d.ts +4 -4
- package/src/domain/generic/repository/types/repository-find-result.type.d.ts +2 -2
- package/src/domain/generic/repository/types/repository-limit-options.type.d.ts +1 -1
- package/src/domain/generic/repository/types/repository-order-by-list.type.d.ts +2 -2
- package/src/domain/generic/repository/types/repository-update-params.type.d.ts +3 -3
- package/src/domain/generic/repository/types/where-options.type.d.ts +1 -1
- package/src/domain/generic/repository/update.repository.d.ts +1 -1
- package/src/domain/location/models/types/location-bound.type.d.ts +1 -1
- package/src/domain/location/models/types/location-geometry.type.d.ts +1 -1
- package/src/domain/location/models/types/location-lat-lng.type.d.ts +1 -1
- package/src/domain/shop-settings/helpers/beauty-questions.helper.d.ts +1 -1
- package/src/domain/shop-settings/models/types/banner.type.d.ts +1 -1
- package/src/domain/shop-settings/models/types/benefit.type.d.ts +1 -1
- package/src/domain/shop-settings/models/types/home-data.type.d.ts +3 -3
- package/src/domain/shop-settings/models/types/menu-nav.type.d.ts +1 -1
- package/src/domain/shop-settings/models/types/shop-section.type.d.ts +1 -1
- package/src/domain/shop-settings/models/types/sub-menu.type.d.ts +2 -2
- package/src/domain/shopping/models/types/payment-address.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-billing.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-card.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-customer.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-document.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-item.type.d.ts +1 -1
- package/src/domain/shopping/models/types/payment-shipping.type.d.ts +1 -1
- package/src/domain/users/models/beauty-profile.d.ts +1 -1
- package/src/domain/users/models/subscription/edition.d.ts +1 -1
- package/src/domain/users/models/subscription/payment.d.ts +1 -1
- package/src/domain/users/models/user-address.d.ts +1 -1
- package/src/domain/users/models/user-payment-method.d.ts +1 -1
- package/src/domain/users/services/authentication.service.d.ts +1 -1
- package/src/domain/users/services/register.service.d.ts +1 -1
- package/src/domain/users/services/types/basic-user-data.type.d.ts +1 -1
- package/src/domain/users/use-cases/authentication.d.ts +2 -2
- package/src/domain/users/use-cases/register.d.ts +1 -1
- package/src/infra/elasticsearch/adapters/axios.adapter.d.ts +1 -1
- package/src/infra/elasticsearch/types/elastic-search-result.d.ts +1 -1
- package/src/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +1 -1
- package/src/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +1 -1
- package/src/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +1 -1
- package/src/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +1 -1
- package/src/infra/firebase/firestore/types/firestore-interceptors.type.d.ts +1 -1
- package/src/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +1 -1
- package/src/infra/firebase/firestore/types/firestore.repository.type.d.ts +1 -1
- package/src/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +1 -1
- package/src/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +1 -1
- package/src/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +1 -1
- package/src/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +1 -1
- package/src/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +3 -3
- package/src/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +2 -2
- package/src/infra/hasura-graphql/types/fields.type.d.ts +1 -1
- package/src/infra/hasura-graphql/types/graphql.repository.type.d.ts +2 -2
- package/src/infra/hasura-graphql/types/hasura-graphql-auth-options.type.d.ts +1 -1
- package/src/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +6 -6
- package/src/infra/hasura-graphql/types/hasura-graphql-headers.type.d.ts +1 -1
- package/src/infra/hasura-graphql/types/nested-field.type.d.ts +1 -1
- package/src/infra/hasura-graphql/types/variable-options.type.d.ts +1 -1
- package/src/utils/decorators/trace.method.decorator.d.ts +3 -3
- package/src/utils/helpers/debug-decorator.helper.d.ts +1 -1
- package/src/utils/helpers/debug.helper.d.ts +3 -3
- package/src/utils/helpers/reflect.helper.d.ts +7 -7
- package/src/utils/index.d.ts +1 -1
- package/src/utils/mixins/merge-constructor-params.type.d.ts +2 -2
- package/src/utils/mixins/mixin-ctor.type.d.ts +1 -1
- package/src/utils/types/array-element.type.d.ts +1 -1
- package/src/utils/types/prop.type.d.ts +1 -1
- package/index.esm.js +0 -6127
- /package/{index.esm.d.ts → index.cjs.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelBaseStructure } from '../../../domain';
|
|
2
2
|
import { ElasticSearchResult } from '../types/elastic-search-result';
|
|
3
3
|
import { ElasticSearchAdapter } from './elastic-search.adapter';
|
|
4
|
-
export
|
|
4
|
+
export type AxiosElasticSearchConfig = {
|
|
5
5
|
url: string;
|
|
6
6
|
credential: string;
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ import { BaseModelBuilder, ModelBaseStructure, NonFunctionAndIdentifierPropertyN
|
|
|
3
3
|
import { MergeConstructorParams, MixinCtor } from '../../../../utils';
|
|
4
4
|
import { FirestoreFieldType } from '../enums';
|
|
5
5
|
import { FirestoreInterceptors, FirestoreRepository } from '../types';
|
|
6
|
-
export
|
|
6
|
+
export type FirestoreConstructorParams<Model extends ModelBaseStructure<Model>> = {
|
|
7
7
|
firestore: Firestore;
|
|
8
8
|
collectionName: string;
|
|
9
9
|
model: BaseModelBuilder<Model>;
|
|
@@ -2,7 +2,7 @@ import { IdentifiersModel, ModelBaseStructure } from '../../../../domain';
|
|
|
2
2
|
import { MergeConstructorParams, MixinCtor } from '../../../../utils';
|
|
3
3
|
import { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types';
|
|
4
4
|
import { FirestoreConstructorParams } from './with-firestore.mixin';
|
|
5
|
-
export
|
|
5
|
+
export type FirestoreSubCollectionConstructorParams<TBase extends ModelBaseStructure> = {
|
|
6
6
|
parentIdField: keyof IdentifiersModel<TBase>;
|
|
7
7
|
};
|
|
8
8
|
export declare const withSubCollection: <TBase extends ModelBaseStructure<TBase, TBase["identifiersFields"][number]>, TBaseParent extends ModelBaseStructure<TBaseParent, TBaseParent["identifiersFields"][number]>, TMixinBase extends MixinCtor<FirestoreRepository<TBase>, any[]>>(MixinBase: MixinCtor<FirestoreRepository<TBase>, any[]> & TMixinBase, ParentModel: new () => TBaseParent) => MixinCtor<FirestoreRepository<TBase> & InstanceType<TMixinBase> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelBaseStructure, RepositoryUpdateParams, UpdateRepository } from '../../../../domain';
|
|
2
2
|
import { MixinCtor } from '../../../../utils';
|
|
3
3
|
import { FirestoreHelpers, FirestoreRepository } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type UpdateFirestoreRepositoryType<MBase extends ModelBaseStructure<MBase>> = UpdateRepository<MBase> & {
|
|
5
5
|
paramsToPlain(params: RepositoryUpdateParams<MBase>): Partial<MBase>;
|
|
6
6
|
};
|
|
7
7
|
export declare const withUpdateFirestore: <TBase extends ModelBaseStructure<TBase, TBase["identifiersFields"][number]>, TMixinBase extends MixinCtor<FirestoreRepository<TBase>, any[]>>(MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers, any[]> & TMixinBase) => MixinCtor<FirestoreRepository<TBase> & UpdateRepository<TBase, RepositoryUpdateParams<TBase>> & InstanceType<TMixinBase> & FirestoreHelpers, []>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelBaseStructure, RepositoryFindFielters, RepositoryLimitOptions, RepositoryOrderBy } from '../../../../domain';
|
|
2
|
-
export
|
|
2
|
+
export type FirestoreIntertceptorRequestParams<TBase extends ModelBaseStructure, T = any> = {
|
|
3
3
|
instance?: TBase;
|
|
4
4
|
find?: {
|
|
5
5
|
filters?: RepositoryFindFielters<TBase>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IdentifierModel, ModelBaseStructure } from '../../../../domain';
|
|
2
2
|
import { FirestoreRepository } from './firestore.repository.type';
|
|
3
|
-
export
|
|
3
|
+
export type FirestoreSubRepository<Model extends ModelBaseStructure<Model>, ParentModel extends ModelBaseStructure<ParentModel>> = {
|
|
4
4
|
readonly parentRepository: FirestoreRepository<ParentModel>;
|
|
5
5
|
parentIdField: IdentifierModel<Model>;
|
|
6
6
|
} & FirestoreRepository<Model>;
|
|
@@ -2,7 +2,7 @@ import { CollectionReference, DocumentData, Firestore, QueryDocumentSnapshot } f
|
|
|
2
2
|
import { BaseModelBuilder, ModelBaseStructure, NonFunctionAndIdentifierPropertyNames } from '../../../../domain';
|
|
3
3
|
import { FirestoreFieldType } from '../enums';
|
|
4
4
|
import { FirestoreInterceptors } from './firestore-interceptors.type';
|
|
5
|
-
export
|
|
5
|
+
export type FirestoreRepository<Model extends ModelBaseStructure<Model>> = {
|
|
6
6
|
readonly firestore?: Firestore;
|
|
7
7
|
collectionName: string;
|
|
8
8
|
model: BaseModelBuilder<Model>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelBaseStructure, NonFunctionAndIdentifierPropertyNames } from '../../../../domain';
|
|
2
2
|
import { ColumnOptions, HasuraGraphQLFields } from '../../types';
|
|
3
|
-
|
|
3
|
+
type FindByAttributeResult<MBase extends ModelBaseStructure<MBase>, Attribute extends NonFunctionAndIdentifierPropertyNames<MBase>> = ColumnOptions<MBase[Attribute], MBase> & {
|
|
4
4
|
attributeName: Attribute;
|
|
5
5
|
};
|
|
6
6
|
export declare class AttributeOptionHelper {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateRepository, CreateRepositoryParams, ModelBaseStructure } from '../../../domain';
|
|
2
2
|
import { MergeConstructorParams, MixinCtor } from '../../../utils';
|
|
3
3
|
import { GraphQLRepository } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type CreateConstructorParams = {
|
|
5
5
|
insertGraphQLOperation?: string;
|
|
6
6
|
insertAllGraphQLOperation?: string;
|
|
7
7
|
insertGraphQLObjectType?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeleteRepository, DeleteRepositoryParams, ModelBaseStructure } from '../../../domain';
|
|
2
2
|
import { MergeConstructorParams, MixinCtor } from '../../../utils';
|
|
3
3
|
import { GraphQLRepository } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type DeleteConstructorParams = {
|
|
5
5
|
deleteGraphQLOperation?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const withDeleteHasuraGraphQL: <MBase extends ModelBaseStructure<MBase, MBase["identifiersFields"][number]>, TMixinBase extends MixinCtor<GraphQLRepository<MBase>, any[]>>(MixinBase: MixinCtor<GraphQLRepository<MBase>, any[]> & TMixinBase) => MixinCtor<GraphQLRepository<MBase> & DeleteRepository<MBase, DeleteRepositoryParams<MBase>> & InstanceType<TMixinBase>, MergeConstructorParams<[DeleteConstructorParams, ...any[]], ConstructorParameters<TMixinBase>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetRepositoryParams, ModelBaseStructure } from '../../../domain';
|
|
2
2
|
import { DebugHelper, MixinCtor } from '../../../utils';
|
|
3
3
|
import { GraphQLRepository } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type GetConstructorParams = {
|
|
5
5
|
getGraphQLOperation?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const withGetHasuraGraphQL: <MBase extends ModelBaseStructure<MBase, MBase["identifiersFields"][number]>, TMixinBase extends MixinCtor<GraphQLRepository<MBase>, any[]>>(MixinBase: MixinCtor<GraphQLRepository<MBase>, any[]> & TMixinBase) => {
|
|
@@ -2,16 +2,16 @@ import { IOperation } from 'gql-query-builder/build/IQueryBuilderOptions';
|
|
|
2
2
|
import { BaseModelBuilder, ModelBaseStructure } from '../../../domain';
|
|
3
3
|
import { MergeConstructorParams, MixinCtor } from '../../../utils';
|
|
4
4
|
import { Fields, GraphQLRepository, HasuraGraphQLAuthOptions, HasuraGraphQLFields, VariableOptions } from '../types';
|
|
5
|
-
|
|
5
|
+
type QueryBuilderOptions = {
|
|
6
6
|
operation: string | IOperation;
|
|
7
7
|
fields: Fields;
|
|
8
8
|
variables?: VariableOptions;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type HasuraGraphQLInterceptors<P = QueryBuilderOptions | QueryBuilderOptions[]> = {
|
|
11
11
|
request?: <R>(request: P) => Promise<P & R>;
|
|
12
12
|
response?: <R>(response: R, request: P) => Promise<R>;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type HasuraConstructorParams<Model extends ModelBaseStructure<Model, Model['identifiersFields'][number]>> = {
|
|
15
15
|
tableName: string;
|
|
16
16
|
model: BaseModelBuilder<Model>;
|
|
17
17
|
fields: HasuraGraphQLFields<Model>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ModelBaseStructure, RepositoryUpdateParams, UpdateRepository } from '../../../domain';
|
|
2
2
|
import { MergeConstructorParams, MixinCtor } from '../../../utils';
|
|
3
3
|
import { GraphQLRepository } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type UpdateHasuraGraphQLRepositoryType<MBase extends ModelBaseStructure<MBase, MBase['identifiersFields'][number]>> = UpdateRepository<MBase> & {
|
|
5
5
|
paramsToPlain(params: RepositoryUpdateParams<MBase>): Partial<MBase>;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type UpdateConstructorParams = {
|
|
8
8
|
updateGraphQLOperation?: string;
|
|
9
9
|
updateGraphQLObjectType?: string;
|
|
10
10
|
updateGraphQLPKType?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NestedField } from './nested-field.type';
|
|
2
|
-
export
|
|
2
|
+
export type Fields = Array<string | object | NestedField | 'aggregate' | 'nodes'>;
|
|
@@ -4,12 +4,12 @@ import { DebugHelper } from '../../../utils';
|
|
|
4
4
|
import { HasuraGraphQLAuthOptions } from './hasura-graphql-auth-options.type';
|
|
5
5
|
import { HasuraGraphQLFields } from './hasura-graphql-fields.type';
|
|
6
6
|
import { VariableOptions } from './variable-options.type';
|
|
7
|
-
export
|
|
7
|
+
export type GraphQLParams<Model extends ModelBaseStructure<Model>> = {
|
|
8
8
|
operation: string | IOperation;
|
|
9
9
|
fields?: HasuraGraphQLFields<Model>;
|
|
10
10
|
variables?: VariableOptions;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type GraphQLRepository<Model extends ModelBaseStructure<Model>> = {
|
|
13
13
|
tableName: string;
|
|
14
14
|
model: BaseModelBuilder<Model>;
|
|
15
15
|
fields: HasuraGraphQLFields<Model>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelBaseStructure, NestedRepositoryFindFieltersOptions, NonFunctionAndIdentifierPropertyNames, RepositoryFindField } from '../../../domain';
|
|
2
2
|
import { PropType } from '../../../utils';
|
|
3
3
|
import { HasuraGraphQLColumnType } from '../enums';
|
|
4
|
-
export
|
|
4
|
+
export type ColumnOptions<FieldType, Model, ValueFrom = any> = {
|
|
5
5
|
type?: HasuraGraphQLColumnType;
|
|
6
6
|
columnName?: string;
|
|
7
7
|
filters?: {
|
|
@@ -15,11 +15,11 @@ export declare type ColumnOptions<FieldType, Model, ValueFrom = any> = {
|
|
|
15
15
|
bindFindFilter?: (sentence: RepositoryFindField<Model, keyof Model>) => Record<string, RepositoryFindField<any, any> | ValueFrom> | RepositoryFindField<any, any> | ValueFrom;
|
|
16
16
|
bindPersistData?: (value: FieldType, instance?: Model) => Record<string, ValueFrom>;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
18
|
+
export type AggregateOptionNames = 'avg' | 'count' | 'max' | 'min' | 'stddev' | 'stddev_pop' | 'stddev_samp' | 'sum' | 'var_pop' | 'var_samp' | 'variance';
|
|
19
|
+
export type AggregateOptionFields<Model, Type, Properties extends keyof Model = keyof Model> = {
|
|
20
20
|
[K in Properties]: PropType<Model, K> extends Type ? K : never;
|
|
21
21
|
}[Properties] | string;
|
|
22
|
-
export
|
|
22
|
+
export type AggregateOptions<Model> = {
|
|
23
23
|
avg?: Array<AggregateOptionFields<Model, number>>;
|
|
24
24
|
max?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
25
25
|
min?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
@@ -31,12 +31,12 @@ export declare type AggregateOptions<Model> = {
|
|
|
31
31
|
var_samp?: Array<AggregateOptionFields<Model, number>>;
|
|
32
32
|
variance?: Array<AggregateOptionFields<Model, number>>;
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
type ModelBaseHasuraGraphQLFields<Model> = Model extends ModelBaseStructure ? NonFunctionAndIdentifierPropertyNames<Model> | {
|
|
35
35
|
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? HasuraGraphQLFields<PropType<Model, key>> : PropType<Model, key> extends any[] ? PropType<Model, key>[] extends ModelBaseStructure[] ? HasuraGraphQLFields<PropType<Model, key>[]> : never : never;
|
|
36
36
|
} | {
|
|
37
37
|
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: key extends 'aggregate' ? never : PropType<Model, key> extends ModelBaseStructure ? ColumnOptions<PropType<Model, key>, Model> : ColumnOptions<PropType<Model, key>, Model>;
|
|
38
38
|
} | Record<string, ColumnOptions<PropType<Model, any>, Model>> : string;
|
|
39
|
-
export
|
|
39
|
+
export type HasuraGraphQLFields<Model> = (ModelBaseHasuraGraphQLFields<Model> | {
|
|
40
40
|
aggregate: Array<AggregateOptions<Model> | 'count'>;
|
|
41
41
|
} | {
|
|
42
42
|
returning: NonFunctionAndIdentifierPropertyNames<Model>[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CallbackFnArgs<T, Result> = {
|
|
2
2
|
target: T;
|
|
3
3
|
result: Result;
|
|
4
4
|
args: Array<any>;
|
|
5
5
|
namespace?: Array<string>;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type CallbackFn<T, Result> = (opts: CallbackFnArgs<T, Result>) => void;
|
|
8
|
+
type TraceOptions<T, Result> = {
|
|
9
9
|
callbackFn?: CallbackFn<T, Result>;
|
|
10
10
|
level?: 'trace' | 'log';
|
|
11
11
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Debugger } from 'debug';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
export
|
|
3
|
+
export type Debuggable = {
|
|
4
4
|
debug: DebugHelper;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type DebugLog = {
|
|
7
7
|
namespace: string;
|
|
8
8
|
message: string;
|
|
9
9
|
args: Array<any>;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type DebugError = {
|
|
12
12
|
namespace: string;
|
|
13
13
|
error: any;
|
|
14
14
|
args: Array<any>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
|
|
2
|
+
type Dictionary<T> = {
|
|
3
3
|
[key: string]: T;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type MetaArgs = {
|
|
6
6
|
key: keyof MetaStorage | string;
|
|
7
7
|
target: any;
|
|
8
8
|
property?: string | symbol;
|
|
9
9
|
own?: boolean;
|
|
10
10
|
propertyDescriptor?: PropertyDescriptor;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type MetaValueArgs<T = any> = MetaArgs & {
|
|
13
13
|
value: T;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
type MetaProperties<T = any> = Dictionary<T>;
|
|
16
|
+
type MetaTargets = Dictionary<MetaProperties>;
|
|
17
|
+
type MetaKeys = Dictionary<MetaTargets>;
|
|
18
|
+
type MetaStorage = {
|
|
19
19
|
value?: any;
|
|
20
20
|
object?: any;
|
|
21
21
|
values?: MetaKeys;
|
package/src/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { add, addBusinessDays, addDays, addMonths, addYears, Duration, endOfDay, format, formatISO9075, parseISO, startOfDay, sub } from 'date-fns';
|
|
2
2
|
import { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, unset } from 'lodash';
|
|
3
|
-
export
|
|
3
|
+
export type DateDuration = Duration;
|
|
4
4
|
export * from './decorators';
|
|
5
5
|
export * from './get';
|
|
6
6
|
export * from './helpers';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
type Tail<T extends any[]> = T extends [any, ...infer U] ? U : [];
|
|
2
|
+
export type MergeConstructorParams<NewParams extends any[], CurrentParams extends any[]> = CurrentParams extends [] ? [...NewParams, ...any] : CurrentParams[0] extends never ? [...NewParams, ...any] : [...NewParams, ...Tail<CurrentParams>];
|
|
3
3
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type MixinCtor<T = any, A extends any[] = any[]> = new (...args: A) => T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
|