@mediusinc/mng-commons-data-api-class 6.2.1 → 7.0.0-rc.1
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/fesm2022/mediusinc-mng-commons-data-api-class-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-data-api-class-v1.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-data-api-class.mjs.map +1 -1
- package/index.d.ts +95 -5
- package/package.json +4 -4
- package/tableview/index.d.ts +42 -2
- package/v1/index.d.ts +353 -15
- package/version-info.json +6 -6
- package/lib/models/query-result.model.d.ts +0 -13
- package/lib/serder/object-serializer.d.ts +0 -26
- package/lib/services/api.abstract.service.d.ts +0 -21
- package/lib/services/crud-api.abstract.service.d.ts +0 -25
- package/lib/services/get-all-api.abstract.service.d.ts +0 -14
- package/tableview/tableview-crud-create.d.ts +0 -24
- package/tableview/tableview-crud.data-provider.d.ts +0 -16
- package/v1/helpers/query-param-convert.d.ts +0 -23
- package/v1/helpers/tableview-crud-create.d.ts +0 -23
- package/v1/models/builders/query-param.builder.d.ts +0 -36
- package/v1/models/filter-match-type.model.d.ts +0 -25
- package/v1/models/filter-param.model.d.ts +0 -23
- package/v1/models/query-mode.model.d.ts +0 -16
- package/v1/models/query-param.model.d.ts +0 -31
- package/v1/models/query-result.model.d.ts +0 -24
- package/v1/provide.d.ts +0 -11
- package/v1/services/api.abstract.service.d.ts +0 -36
- package/v1/services/crud-api.abstract.service.d.ts +0 -37
- package/v1/services/get-all-api.abstract.service.d.ts +0 -30
- package/v1/services/tokens/data-api-class.token.d.ts +0 -5
- package/v1/tableview/tableview-crud.data-provider.d.ts +0 -29
- package/v1/utils/query-param-map.util.d.ts +0 -22
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { ClassAttributeDef } from '@mediusinc/mng-commons/core';
|
|
13
|
-
import { MediusFilterMatchType } from './filter-match-type.model';
|
|
14
|
-
export declare class MediusFilterParam {
|
|
15
|
-
property?: string;
|
|
16
|
-
filterValue?: any;
|
|
17
|
-
filterValueTo?: any;
|
|
18
|
-
filterMatchType?: MediusFilterMatchType;
|
|
19
|
-
filterMatchCaseSensitive?: boolean;
|
|
20
|
-
static discriminator?: string;
|
|
21
|
-
static attributeTypeMap: Array<ClassAttributeDef>;
|
|
22
|
-
static getAttributeTypeMap(): ClassAttributeDef[];
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export declare enum MediusQueryMode {
|
|
13
|
-
Count = "COUNT",
|
|
14
|
-
Data = "DATA",
|
|
15
|
-
All = "ALL"
|
|
16
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { ClassAttributeDef } from '@mediusinc/mng-commons/core';
|
|
13
|
-
import { MediusFilterParam } from './filter-param.model';
|
|
14
|
-
import { MediusQueryMode } from './query-mode.model';
|
|
15
|
-
export declare class MediusQueryParam {
|
|
16
|
-
sortProperty?: Array<string>;
|
|
17
|
-
sortAsc?: Array<boolean>;
|
|
18
|
-
itemsOffset?: number;
|
|
19
|
-
itemsPerPage?: number;
|
|
20
|
-
filterParams?: Array<MediusFilterParam>;
|
|
21
|
-
filterAllParam?: string;
|
|
22
|
-
filterAllProperties?: Array<string>;
|
|
23
|
-
validateProperties?: Array<string>;
|
|
24
|
-
selectInTwoSteps?: boolean;
|
|
25
|
-
sortEnumByOrdinal?: boolean;
|
|
26
|
-
groupByProperties?: Array<string>;
|
|
27
|
-
queryMode?: MediusQueryMode;
|
|
28
|
-
static discriminator?: string;
|
|
29
|
-
static attributeTypeMap: Array<ClassAttributeDef>;
|
|
30
|
-
static getAttributeTypeMap(): ClassAttributeDef[];
|
|
31
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { ClassAttributeDef } from '@mediusinc/mng-commons/core';
|
|
13
|
-
export declare class MediusQueryResult<T> implements IMediusQueryResult<T> {
|
|
14
|
-
allDataCount?: number;
|
|
15
|
-
pageData?: Array<T>;
|
|
16
|
-
static discriminator?: string;
|
|
17
|
-
static fromArray<T>(pageData: T[], allDataCount?: number): MediusQueryResult<T>;
|
|
18
|
-
static attributeTypeMap: Array<ClassAttributeDef>;
|
|
19
|
-
static getAttributeTypeMap(): ClassAttributeDef[];
|
|
20
|
-
}
|
|
21
|
-
export interface IMediusQueryResult<T> {
|
|
22
|
-
allDataCount?: number;
|
|
23
|
-
pageData?: Array<T>;
|
|
24
|
-
}
|
package/v1/provide.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Provider } from '@angular/core';
|
|
2
|
-
import { CommonsFeature } from '@mediusinc/mng-commons/core';
|
|
3
|
-
/**
|
|
4
|
-
* Prepares providers for usage of the Obsolete Data API functionalities.
|
|
5
|
-
*
|
|
6
|
-
* @returns {CommonsFeature} The `CommonsFeature` object with the Data API Obsolete configuration.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated.
|
|
9
|
-
*/
|
|
10
|
-
export declare function withDataApiV1(): CommonsFeature;
|
|
11
|
-
export declare function provideDataApiV1Child(): Provider;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { ObjectSerializer } from '@mediusinc/mng-commons-data-api-class';
|
|
3
|
-
import { ClassType } from '@mediusinc/mng-commons/core';
|
|
4
|
-
import { MediusQueryParam } from '../models/query-param.model';
|
|
5
|
-
/**
|
|
6
|
-
* This is an abstract class that provides base functionality for API services.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class ACommonsBaseV1ApiService {
|
|
11
|
-
protected readonly objectSerializer: ObjectSerializer;
|
|
12
|
-
protected readonly http: HttpClient;
|
|
13
|
-
protected readonly obsoleteConfig: boolean;
|
|
14
|
-
protected abstract getBasePath(): string;
|
|
15
|
-
protected abstract getServiceBasePath(): string | null;
|
|
16
|
-
protected getUrl(...pathSegments: Array<string>): string;
|
|
17
|
-
protected serializeQueryParam(queryParam: MediusQueryParam, type?: string): any;
|
|
18
|
-
protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR;
|
|
19
|
-
protected deserializeClass<C>(item: any, type: ClassType<C>): C;
|
|
20
|
-
protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C>;
|
|
21
|
-
protected serializeClass<C>(item: C, type: ClassType<C>): any;
|
|
22
|
-
protected serializeClassArray<C>(item: Array<C>, type: ClassType<C>): any;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Represents an abstract base class for the ACommonsV1ApiService.
|
|
26
|
-
*
|
|
27
|
-
* @typeparam T The main type of data to be handled by the service.
|
|
28
|
-
*
|
|
29
|
-
* @deprecated
|
|
30
|
-
*/
|
|
31
|
-
export declare abstract class ACommonsV1ApiService<T> extends ACommonsBaseV1ApiService {
|
|
32
|
-
protected type: ClassType<T>;
|
|
33
|
-
protected constructor(type: ClassType<T>);
|
|
34
|
-
protected deserialize(item: any): T;
|
|
35
|
-
protected serialize(item: T): any;
|
|
36
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { HttpParams } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ClassType, IdType } from '@mediusinc/mng-commons/core';
|
|
4
|
-
import { MediusQueryResult } from '../models/query-result.model';
|
|
5
|
-
import { ACommonsGetAllV1ApiService } from './get-all-api.abstract.service';
|
|
6
|
-
/**
|
|
7
|
-
* A service interface for CRUD operation on a resource.
|
|
8
|
-
*
|
|
9
|
-
* @typeparam T The main type of data to be handled by the service.
|
|
10
|
-
*
|
|
11
|
-
* @deprecated
|
|
12
|
-
*/
|
|
13
|
-
export interface ICommonsCrudV1ApiService<T> {
|
|
14
|
-
createPost?(item: T, params?: HttpParams): Observable<T>;
|
|
15
|
-
getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
|
|
16
|
-
updatePut?(id: IdType, item: T, params?: HttpParams): Observable<T>;
|
|
17
|
-
removeDelete?(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Abstract class for creating CRUD API service implementation.
|
|
21
|
-
*
|
|
22
|
-
* @typeparam T The type of the entity.
|
|
23
|
-
* @typeparam QRT The type of the query result.
|
|
24
|
-
*
|
|
25
|
-
* @deprecated
|
|
26
|
-
*/
|
|
27
|
-
export declare abstract class ACommonsCrudV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsGetAllV1ApiService<T, QRT> implements ICommonsCrudV1ApiService<T> {
|
|
28
|
-
protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
|
|
29
|
-
createPost(item: T, params?: HttpParams): Observable<T>;
|
|
30
|
-
getByIdGet(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
|
|
31
|
-
updatePut(id: IdType, item: T, params?: HttpParams): Observable<T>;
|
|
32
|
-
removeDelete(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;
|
|
33
|
-
protected getCreatePostPath(item: T): string;
|
|
34
|
-
protected getUpdatePutPath(id: IdType, item: T): string;
|
|
35
|
-
protected getGetByIdGetPath(id: IdType): string;
|
|
36
|
-
protected getRemoveDeletePath(id: IdType, item?: T): string;
|
|
37
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { HttpParams } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ClassType } from '@mediusinc/mng-commons/core';
|
|
4
|
-
import { MediusQueryParam } from '../models/query-param.model';
|
|
5
|
-
import { MediusQueryResult } from '../models/query-result.model';
|
|
6
|
-
import { ACommonsV1ApiService } from './api.abstract.service';
|
|
7
|
-
/**
|
|
8
|
-
* A service interface for getting paginated data results using POST method.
|
|
9
|
-
*
|
|
10
|
-
* @typeparam QRT The type of the query result in get all operation.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated
|
|
13
|
-
*/
|
|
14
|
-
export interface ICommonsGetAllV1ApiService<QRT extends MediusQueryResult<any>> {
|
|
15
|
-
getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* An abstract class representing a service for retrieving all obsolete entities.
|
|
19
|
-
*
|
|
20
|
-
* @typeparam T The main type of data to be handled by the service.
|
|
21
|
-
* @typeparam QRT The type of the query result in get all operation.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated
|
|
24
|
-
*/
|
|
25
|
-
export declare abstract class ACommonsGetAllV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsV1ApiService<T> implements ICommonsGetAllV1ApiService<QRT> {
|
|
26
|
-
protected queryResultType: ClassType<QRT>;
|
|
27
|
-
protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
|
|
28
|
-
getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
|
|
29
|
-
protected getGetAllPostPath(): string;
|
|
30
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { ClassType, ServiceClassType } from '@mediusinc/mng-commons/core';
|
|
3
|
-
import { TableviewDataProviderInst } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
-
import { MediusQueryResult } from '../models/query-result.model';
|
|
5
|
-
import { ICommonsCrudV1ApiService } from '../services/crud-api.abstract.service';
|
|
6
|
-
import { ICommonsGetAllV1ApiService } from '../services/get-all-api.abstract.service';
|
|
7
|
-
/**
|
|
8
|
-
* A data provider for a CRUD table view that uses an obsolete version 1 API service.
|
|
9
|
-
*
|
|
10
|
-
* @typeparam Model - The type of the data model.
|
|
11
|
-
* @typeparam Service - The type of the API service.
|
|
12
|
-
* @typeparam Sorts - The type for available sort keys on get all operation.
|
|
13
|
-
* @typeparam Filters - The type for available sort keys on get all operation.
|
|
14
|
-
*
|
|
15
|
-
* @deprecated
|
|
16
|
-
*/
|
|
17
|
-
export declare class TableviewCrudV1DataProviderInst<Model, Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model> extends TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>> {
|
|
18
|
-
protected constructor(serviceType: Type<Service>, idPropertyName?: string, useGetAllForFetch?: boolean);
|
|
19
|
-
}
|
|
20
|
-
export declare class TableviewCrudV1DataProvider extends TableviewCrudV1DataProviderInst<any, any> {
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated
|
|
23
|
-
*/
|
|
24
|
-
static create<Model, Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: keyof Model, useGetAllForFetch?: boolean): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated
|
|
27
|
-
*/
|
|
28
|
-
static createUnsafe<Model, Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: string, useGetAllForFetch?: boolean): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>;
|
|
29
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DataListParams } from '@mediusinc/mng-commons/core';
|
|
2
|
-
/**
|
|
3
|
-
* A class representing a mapping of query parameters.
|
|
4
|
-
*
|
|
5
|
-
* @typeparam Sorts - The type for available sort keys on get all operation.
|
|
6
|
-
* @typeparam Filters - The type for available sort keys on get all operation.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
export declare class QueryParamMap<Sorts, Filters extends keyof any> {
|
|
11
|
-
private readonly _params?;
|
|
12
|
-
private readonly _sorts;
|
|
13
|
-
private readonly _filters;
|
|
14
|
-
protected constructor(_params?: DataListParams<Sorts, Filters> | undefined);
|
|
15
|
-
static create(): QueryParamMap<string, string>;
|
|
16
|
-
static forParams<Sorts, Filters extends keyof any>(params?: DataListParams<Sorts, Filters>): QueryParamMap<Sorts, Filters>;
|
|
17
|
-
withSortMap(sort: Sorts, mapTo: string): this;
|
|
18
|
-
withFilterMap(filter: Filters, mapTo: string): this;
|
|
19
|
-
mapSort(sort: string): string;
|
|
20
|
-
mapFilter(filter: string): string;
|
|
21
|
-
mapParams(): DataListParams<any, any> | undefined;
|
|
22
|
-
}
|