@maioradv/cms-basic-lib 1.2.8 → 1.3.0
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/dist/client.js +1 -1
- package/dist/collections/types.d.ts +1 -0
- package/dist/config.d.ts +2 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -32,7 +32,7 @@ class MaiorCmsApiClient {
|
|
|
32
32
|
axios_1.default.defaults.headers.common[types_1.ApiHeader.ApiVersion] = this.configApi.version;
|
|
33
33
|
axios_1.default.defaults.headers.common[types_1.ApiHeader.ApiCacheControl] = this.configApi.disableCache ? 'no-cache' : 'caching';
|
|
34
34
|
axios_1.default.defaults.headers.common['Content-Type'] = 'application/json';
|
|
35
|
-
return axios_1.default;
|
|
35
|
+
return this.configApi.axios ? this.configApi.axios(axios_1.default) : axios_1.default;
|
|
36
36
|
}
|
|
37
37
|
_initModules() {
|
|
38
38
|
this.authentication = new auth_1.default(this.client);
|
|
@@ -67,5 +67,6 @@ export type FindAllCollectionProductsDto = WithRelation<ProductCollection, 'Prod
|
|
|
67
67
|
export type QueryCollectionProductsDto = Omit<QueryParamsDto<SortingParamsDto<{}>, WhereClausesDto<{
|
|
68
68
|
includeAttributes?: NumberClause;
|
|
69
69
|
excludeAttributes?: NumberClause;
|
|
70
|
+
search?: StringClause;
|
|
70
71
|
published?: BooleanClause;
|
|
71
72
|
}>>, 'sorting'>;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AxiosStatic } from "axios";
|
|
1
2
|
import { ApiVersion, WithRequired } from "./types";
|
|
2
3
|
export type ApiConfigs = {
|
|
3
4
|
host: string;
|
|
@@ -8,6 +9,7 @@ export type ApiConfigs = {
|
|
|
8
9
|
version?: ApiVersion;
|
|
9
10
|
sandbox?: boolean;
|
|
10
11
|
disableCache?: boolean;
|
|
12
|
+
axios?: (axios: AxiosStatic) => AxiosStatic;
|
|
11
13
|
};
|
|
12
14
|
export type ValidatedApiConfigs = ApiConfigs & WithRequired<ApiConfigs, 'version' | 'sandbox'>;
|
|
13
15
|
export declare function validateConfigs(configs: ApiConfigs): ValidatedApiConfigs;
|