nextemos 4.8.5 → 4.9.2

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.
@@ -12,6 +12,7 @@ export * from './environment';
12
12
  export * from './keycloack';
13
13
  export * from './service';
14
14
  export * from './shoppingcart';
15
+ export * from './ordermanagement';
15
16
  export * from '../services/banner/banner.types';
16
17
  export * from '../services/blog/blog.types';
17
18
  export * from '../services/product/product.types';
@@ -22,3 +23,4 @@ export * from '../services/address/address.types';
22
23
  export * from '../services/prediction/prediction.types';
23
24
  export * from '../services/localization/localization.types';
24
25
  export * from '../services/shoppingcart/shoppingcart.types';
26
+ export * from '../services/ordermanagement/ordermanagement.types';
@@ -29,6 +29,7 @@ __exportStar(require("./environment"), exports);
29
29
  __exportStar(require("./keycloack"), exports);
30
30
  __exportStar(require("./service"), exports);
31
31
  __exportStar(require("./shoppingcart"), exports);
32
+ __exportStar(require("./ordermanagement"), exports);
32
33
  /// service types
33
34
  __exportStar(require("../services/banner/banner.types"), exports);
34
35
  __exportStar(require("../services/blog/blog.types"), exports);
@@ -40,3 +41,4 @@ __exportStar(require("../services/address/address.types"), exports);
40
41
  __exportStar(require("../services/prediction/prediction.types"), exports);
41
42
  __exportStar(require("../services/localization/localization.types"), exports);
42
43
  __exportStar(require("../services/shoppingcart/shoppingcart.types"), exports);
44
+ __exportStar(require("../services/ordermanagement/ordermanagement.types"), exports);
@@ -0,0 +1,88 @@
1
+ import { IResponse } from "./response";
2
+ export interface IGetOrderDetailsResponse extends IResponse {
3
+ order: IOrder;
4
+ }
5
+ export interface IOrderTotal {
6
+ type: string;
7
+ value: number;
8
+ }
9
+ export interface IOrderShipment {
10
+ waybillNo: string;
11
+ trackingUrl: string;
12
+ }
13
+ export interface IOrderInvoice {
14
+ invoiceId: number;
15
+ invoiceNo: string;
16
+ invoiceUrl: string;
17
+ }
18
+ export interface IOrderItem {
19
+ id: number;
20
+ unitPriceWithTax: number;
21
+ unitPriceWithoutTax: number;
22
+ salesPriceWithTax: number;
23
+ salesPriceWithoutTax: number;
24
+ quantity: number;
25
+ lineInfo: string;
26
+ parentId: number;
27
+ productHierarchyId: number;
28
+ productId: number;
29
+ stockBarcodeId: number;
30
+ customLineStatusId: number;
31
+ customLineStatus: string;
32
+ availBalance: number;
33
+ refOrderLineId: number;
34
+ isGiftBoxRequested: boolean;
35
+ giftBoxNote: string;
36
+ gainPoint: number;
37
+ flags: string;
38
+ shipments: IOrderShipment[];
39
+ invoices: IOrderInvoice[];
40
+ totals: IOrderTotal[];
41
+ }
42
+ export interface IOrderPayment {
43
+ paymentProvider: string;
44
+ bank: string;
45
+ amount: number;
46
+ currencyId: number;
47
+ currency: string;
48
+ paymentMethodTypeId: number;
49
+ }
50
+ export interface IOrderTransaction {
51
+ id: number;
52
+ installmentCount: number;
53
+ }
54
+ export interface IOrder {
55
+ id: number;
56
+ docNo: string;
57
+ docDate: string;
58
+ statusId: number;
59
+ status: string;
60
+ customStatusId: number;
61
+ customStatus: string;
62
+ itemCount: number;
63
+ deliveryTypeId: number;
64
+ referenceNo: string;
65
+ paymentTypeId: number;
66
+ currencyId: number;
67
+ currency: string;
68
+ currencyCode: string;
69
+ totals: IOrderTotal[];
70
+ isTaxIncluded: boolean;
71
+ currencyRate: number;
72
+ shipperId: number;
73
+ shipper: string;
74
+ deliveryDate: string;
75
+ wareHouseId: number;
76
+ isGiftBoxRequested: boolean;
77
+ giftboxNote: string;
78
+ shippingAddressId: number;
79
+ shippingAddress: string;
80
+ invoiceAddressId: number;
81
+ invoiceAddress: string;
82
+ orderNote: string;
83
+ preInfoForm: string;
84
+ salesAggreementForm: string;
85
+ items: IOrderItem[];
86
+ payments: IOrderPayment[];
87
+ orderTransactions: IOrderTransaction[];
88
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,4 +12,5 @@ export declare const Service: {
12
12
  Keycloak: import("./keycloak/keycloak.types").IKeycloakService;
13
13
  Notification: import("./notification/notification.types").INotificationService;
14
14
  ShoppingCart: import("..").IShoppingCartService;
15
+ OrderManagement: import("..").IOrderManagementService;
15
16
  };
@@ -10,6 +10,7 @@ const keycloak_1 = require("./keycloak");
10
10
  const localization_1 = require("./localization");
11
11
  const member_1 = require("./member");
12
12
  const notification_1 = require("./notification");
13
+ const ordermanagement_1 = require("./ordermanagement");
13
14
  const prediction_1 = require("./prediction");
14
15
  const product_1 = require("./product");
15
16
  const route_1 = require("./route");
@@ -28,5 +29,6 @@ exports.Service = {
28
29
  Environment: environment_1.EnvironmentService,
29
30
  Keycloak: keycloak_1.KeycloakService,
30
31
  Notification: notification_1.NotificationService,
31
- ShoppingCart: shoppingcart_1.ShoppingCartService
32
+ ShoppingCart: shoppingcart_1.ShoppingCartService,
33
+ OrderManagement: ordermanagement_1.OrderManagementService
32
34
  };
@@ -0,0 +1,2 @@
1
+ import { IOrderManagementService } from './ordermanagement.types';
2
+ export declare const OrderManagementService: IOrderManagementService;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.OrderManagementService = void 0;
36
+ const urls_1 = __importStar(require("../urls"));
37
+ const __1 = require("../..");
38
+ exports.OrderManagementService = {
39
+ Namespace: process.env.MS_NAMESPACE || 'emosv2service',
40
+ ServiceUrl: function () {
41
+ return `http://ordermanagementgateway.${this.Namespace}.svc.cluster.local`;
42
+ },
43
+ Prefix: '/api/ordermanagement',
44
+ GetOrderDetails: function (data, options) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
47
+ serviceUrl: this.ServiceUrl(),
48
+ prefix: this.Prefix,
49
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
50
+ language: data === null || data === void 0 ? void 0 : data.language,
51
+ methodName: urls_1.default.OrderManagement.GetOrderDetails,
52
+ }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
53
+ });
54
+ },
55
+ };
@@ -0,0 +1,11 @@
1
+ import { IApiResponse, IGetOrderDetailsResponse, IRequestBase, IRequestInit, IService } from '../..';
2
+ export interface IGetOrderDetailsRequest extends IRequestBase {
3
+ orderId?: number;
4
+ docNo?: string;
5
+ mobilePhone?: string;
6
+ email?: string;
7
+ memberId?: number;
8
+ }
9
+ export interface IOrderManagementService extends IService {
10
+ GetOrderDetails: (data: IGetOrderDetailsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetOrderDetailsResponse>>;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -103,6 +103,9 @@ declare const _default: {
103
103
  ChangeCartDetail: string;
104
104
  GetInstallmentOptions: string;
105
105
  };
106
+ OrderManagement: {
107
+ GetOrderDetails: string;
108
+ };
106
109
  };
107
110
  export default _default;
108
111
  export declare const getUrl: ({ isClient, language, methodName, serviceUrl, prefix, id }: {
@@ -109,6 +109,9 @@ exports.default = {
109
109
  ChangeCartDetail: '/{language}/ShoppingCartGateway/v1/ChangeCartDetail',
110
110
  GetInstallmentOptions: '/{language}/ShoppingCartGateway/v1/GetInstallmentOptions',
111
111
  },
112
+ OrderManagement: {
113
+ GetOrderDetails: '/{language}/OrderManagement/v1/GetOrderDetails',
114
+ }
112
115
  };
113
116
  const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
114
117
  let url = serviceUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.8.5",
3
+ "version": "4.9.2",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",