nextemos 4.4.6 → 4.4.7

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.
@@ -14,6 +14,12 @@ export interface IProductCategoryHierarchyResponse extends IResponse {
14
14
  export interface ICategoryTreeResponse extends IResponse {
15
15
  category: ICategoryWithChilds;
16
16
  }
17
+ export interface IProductTypeResponse extends IResponse {
18
+ productType: IProductType;
19
+ }
20
+ export interface IProductTypeListResponse extends IResponsePaging {
21
+ productType: IProductType[];
22
+ }
17
23
  export interface ISearchProductsResponse extends IResponsePaging {
18
24
  products: IProduct[];
19
25
  facets: IFacet[];
@@ -283,3 +289,16 @@ export interface IConstraint {
283
289
  order: number;
284
290
  keyAsString: string;
285
291
  }
292
+ export interface IProductType {
293
+ id: number;
294
+ name: string;
295
+ key: string;
296
+ integrationCode: string;
297
+ isShowedOnPage: boolean;
298
+ parameterName: string;
299
+ routePath: string;
300
+ routeTitle: string;
301
+ routeDescription: string;
302
+ isAggregated: boolean;
303
+ extensionData: any;
304
+ }
@@ -82,13 +82,13 @@ exports.MemberService = {
82
82
  }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
83
83
  });
84
84
  },
85
- ApproveTokenRequest: function (data, options) {
85
+ ApproveValidationTokenRequest: function (data, options) {
86
86
  return __awaiter(this, void 0, void 0, function* () {
87
87
  return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
88
88
  serviceUrl: this.ServiceUrl(),
89
89
  prefix: this.Prefix,
90
90
  isClient: options === null || options === void 0 ? void 0 : options.useClient,
91
- methodName: urls_1.default.Member.Members.ApproveTokenRequest,
91
+ methodName: urls_1.default.Member.Members.ApproveValidationTokenRequest,
92
92
  }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
93
93
  });
94
94
  },
@@ -65,7 +65,7 @@ export interface IContactApprovalMessageRequest {
65
65
  memberValidationType: 'Email' | 'Mobile';
66
66
  tags?: string[];
67
67
  }
68
- export interface IApproveTokenRequestRequest {
68
+ export interface IApproveValidationTokenRequest {
69
69
  token: string;
70
70
  tags?: string[];
71
71
  }
@@ -76,5 +76,5 @@ export interface IMemberService extends IService {
76
76
  Login: (data: ILoginRequest, options?: IRequestInit) => Promise<IApiResponse<ILoginRequestResponse>>;
77
77
  ActiveMember: (options?: IRequestInit) => Promise<IApiResponse<IActiveMemberResponse>>;
78
78
  ContactApprovalMessage: (data: IContactApprovalMessageRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
79
- ApproveTokenRequest: (data: IApproveTokenRequestRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
79
+ ApproveValidationTokenRequest: (data: IApproveValidationTokenRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
80
80
  }
@@ -121,4 +121,27 @@ exports.ProductService = {
121
121
  }), Object.assign(Object.assign({}, options), { params: data }));
122
122
  });
123
123
  },
124
+ ProductType: function (data, options) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
127
+ serviceUrl: this.ServiceUrl(),
128
+ prefix: this.Prefix,
129
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
130
+ language: data === null || data === void 0 ? void 0 : data.language,
131
+ methodName: urls_1.default.ProductType.ProductType,
132
+ id: data === null || data === void 0 ? void 0 : data.id, // replace request id with product id
133
+ }), Object.assign(Object.assign({}, options), { params: data }));
134
+ });
135
+ },
136
+ ProductTypeList: function (data, options) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
139
+ serviceUrl: this.ServiceUrl(),
140
+ prefix: this.Prefix,
141
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
142
+ language: data === null || data === void 0 ? void 0 : data.language,
143
+ methodName: urls_1.default.ProductType.All,
144
+ }), Object.assign(Object.assign({}, options), { params: data }));
145
+ });
146
+ },
124
147
  };
@@ -1,4 +1,4 @@
1
- import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse, IProductCategoryHierarchyResponse, IService } from '../..';
1
+ import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse, IProductCategoryHierarchyResponse, IService, IProductTypeResponse, IProductTypeListResponse } from '../..';
2
2
  export interface IProductRequest {
3
3
  id: number;
4
4
  flags?: number;
@@ -94,6 +94,20 @@ export interface IHierarchyCategoriesRequest {
94
94
  tags?: string[];
95
95
  language?: string;
96
96
  }
97
+ export interface IProductTypeRequest {
98
+ id: number;
99
+ includes?: string[];
100
+ tags?: string[];
101
+ language?: string;
102
+ }
103
+ export interface IProductTypeListRequest {
104
+ productTypeIds?: number[];
105
+ keys?: string | string[];
106
+ searchTerm?: string;
107
+ includes?: string[];
108
+ tags?: string[];
109
+ language?: string;
110
+ }
97
111
  export interface IProductService extends IService {
98
112
  Product: (data: IProductRequest, options?: IRequestInit) => Promise<IApiResponse<IProductResponse>>;
99
113
  SearchProductsRequest: (data: ISearchProductsRequest, options?: IRequestInit) => Promise<IApiResponse<ISearchProductsResponse>>;
@@ -102,5 +116,7 @@ export interface IProductService extends IService {
102
116
  CategoryTree: (data: ICategoryTreeRequest, options?: IRequestInit) => Promise<IApiResponse<ICategoryTreeResponse>>;
103
117
  AllCategories: (data: IAllCategoriesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryAllResponse>>;
104
118
  Hierarchy: (data: IHierarchyCategoriesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryHierarchyResponse>>;
119
+ ProductType: (data: IProductTypeRequest, options?: IRequestInit) => Promise<IApiResponse<IProductTypeResponse>>;
120
+ ProductTypeList: (data: IProductTypeListRequest, options?: IRequestInit) => Promise<IApiResponse<IProductTypeListResponse>>;
105
121
  }
106
122
  export {};
@@ -36,6 +36,10 @@ declare const _default: {
36
36
  ProductCategory: string;
37
37
  CategoryTree: string;
38
38
  };
39
+ ProductType: {
40
+ All: string;
41
+ ProductType: string;
42
+ };
39
43
  Warehouse: {
40
44
  All: string;
41
45
  Warehouse: string;
@@ -46,7 +50,7 @@ declare const _default: {
46
50
  LoginRequest: string;
47
51
  ActiveMember: string;
48
52
  ContactApprovalMessage: string;
49
- ApproveTokenRequest: string;
53
+ ApproveValidationTokenRequest: string;
50
54
  };
51
55
  MemberMessages: {
52
56
  SubjectsAll: string;
@@ -42,6 +42,10 @@ exports.default = {
42
42
  ProductCategory: '/live/{language}/ProductCategory/v1/{id}',
43
43
  CategoryTree: '/live/{language}/ProductCategory/v1/CategoryTree',
44
44
  },
45
+ ProductType: {
46
+ All: '/live/{language}/ProductType/v1/All',
47
+ ProductType: '/live/{language}/ProductType/v1/{id}',
48
+ },
45
49
  Warehouse: {
46
50
  All: '/{language}/Warehouses/v1/All',
47
51
  Warehouse: '/{language}/Warehouses/v1/GetById',
@@ -52,7 +56,7 @@ exports.default = {
52
56
  LoginRequest: "/{language}/Members/v1/LoginRequest",
53
57
  ActiveMember: "/{language}/Members/v1/ActiveMember",
54
58
  ContactApprovalMessage: "/{language}/Members/v1/ContactApprovalMessage",
55
- ApproveTokenRequest: "/{language}/Members/v1/ApproveTokenRequest",
59
+ ApproveValidationTokenRequest: "/{language}/Members/v1/ApproveValidationTokenRequest",
56
60
  },
57
61
  MemberMessages: {
58
62
  SubjectsAll: '/{language}/MemberMessages/v1/Subjects/All',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.4.6",
3
+ "version": "4.4.7",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",