nextemos 4.5.4 → 4.5.6

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.
@@ -93,3 +93,6 @@ export interface ILoginRequestResponse extends IResponse {
93
93
  export interface IMemberAddressesResponse extends IResponse {
94
94
  data?: IAddress[];
95
95
  }
96
+ export interface IMemberAddressResponse extends IResponse {
97
+ data?: IAddress;
98
+ }
@@ -11,4 +11,5 @@ export declare const Service: {
11
11
  Environment: import("./environment/environment.types").IEnvironmentService;
12
12
  Keycloak: import("./keycloak/keycloak.types").IKeycloakService;
13
13
  Notification: import("./notification/notification.types").INotificationService;
14
+ ShoppingCart: import("..").IShoppingCartService;
14
15
  };
@@ -13,6 +13,7 @@ const notification_1 = require("./notification");
13
13
  const prediction_1 = require("./prediction");
14
14
  const product_1 = require("./product");
15
15
  const route_1 = require("./route");
16
+ const shoppingcart_1 = require("./shoppingcart");
16
17
  const stock_1 = require("./stock");
17
18
  exports.Service = {
18
19
  Address: address_1.AddressService,
@@ -26,5 +27,6 @@ exports.Service = {
26
27
  Localization: localization_1.LocalizationService,
27
28
  Environment: environment_1.EnvironmentService,
28
29
  Keycloak: keycloak_1.KeycloakService,
29
- Notification: notification_1.NotificationService
30
+ Notification: notification_1.NotificationService,
31
+ ShoppingCart: shoppingcart_1.ShoppingCartService
30
32
  };
@@ -127,8 +127,18 @@ exports.MemberService = {
127
127
  serviceUrl: this.ServiceUrl(),
128
128
  prefix: this.Prefix,
129
129
  isClient: options === null || options === void 0 ? void 0 : options.useClient,
130
- methodName: urls_1.default.Member.Address.Addresses,
130
+ methodName: urls_1.default.Member.Address.AddressesByMemberId,
131
131
  }), Object.assign(Object.assign({}, options), { params: data }));
132
132
  });
133
133
  },
134
+ NewAddress: function () {
135
+ return __awaiter(this, arguments, void 0, function* (data = {}, options) {
136
+ return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
137
+ serviceUrl: this.ServiceUrl(),
138
+ prefix: this.Prefix,
139
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
140
+ methodName: urls_1.default.Member.Address.Addresses,
141
+ }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
142
+ });
143
+ },
134
144
  };
@@ -1,5 +1,6 @@
1
- import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse } from '../..';
1
+ import { IApiResponse, IRequestInit, IService, ICreateMemberResponse, IMessageSubjectResponse, ISendMessageResponse, ILoginRequestResponse, IResponse, IActiveMemberResponse, IMemberAddressesResponse, IMemberAddressResponse, AddressPart } from '../..';
2
2
  export interface IMessageSubjectRequest {
3
+ language?: string;
3
4
  tags?: string[];
4
5
  }
5
6
  export interface ISendMessageRequest {
@@ -26,6 +27,7 @@ export interface ISendMessageRequest {
26
27
  communicationPreference?: string;
27
28
  createdUserType?: string;
28
29
  files?: string;
30
+ language?: string;
29
31
  tags?: string[];
30
32
  }
31
33
  export interface ICreateMemberRequest {
@@ -54,26 +56,49 @@ export interface ICreateMemberRequest {
54
56
  isApproved?: boolean;
55
57
  createdBy?: number;
56
58
  };
59
+ language?: string;
57
60
  tags?: string[];
58
61
  }
59
62
  export interface ILoginRequest {
60
63
  mobilePhone?: string;
61
64
  email?: string;
62
65
  password: string;
66
+ language?: string;
63
67
  tags?: string[];
64
68
  }
65
69
  export interface IContactApprovalMessageRequest {
66
70
  memberValidationType: 'Email' | 'Mobile';
71
+ language?: string;
67
72
  tags?: string[];
68
73
  }
69
74
  export interface IApproveValidationTokenRequest {
70
75
  token: string;
76
+ language?: string;
71
77
  tags?: string[];
72
78
  }
73
79
  export interface IMemberAddressesRequest {
74
80
  memberId?: number;
75
81
  addressType?: 'Individual' | 'Corporate';
76
82
  includeParts?: boolean;
83
+ language?: string;
84
+ tags?: string[];
85
+ }
86
+ export interface IMemberAddressRequest {
87
+ memberId?: number;
88
+ addressTypeId?: string;
89
+ identificationNumber?: string;
90
+ isTurkishCitizen?: boolean;
91
+ isApproved?: boolean;
92
+ isUnsubscribedAddress?: boolean;
93
+ isUseForDelivery?: boolean;
94
+ isDefault?: boolean;
95
+ name?: string;
96
+ taxAdministration?: string;
97
+ taxNumber?: string;
98
+ integrationCode?: string;
99
+ parts?: AddressPart[];
100
+ createdBy?: number;
101
+ language?: string;
77
102
  tags?: string[];
78
103
  }
79
104
  export interface IMemberService extends IService {
@@ -85,4 +110,5 @@ export interface IMemberService extends IService {
85
110
  ContactApprovalMessage: (data: IContactApprovalMessageRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
86
111
  ApproveValidationTokenRequest: (data: IApproveValidationTokenRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
87
112
  Addresses: (data?: IMemberAddressesRequest, options?: IRequestInit) => Promise<IApiResponse<IMemberAddressesResponse>>;
113
+ NewAddress: (data?: IMemberAddressRequest, options?: IRequestInit) => Promise<IApiResponse<IMemberAddressResponse>>;
88
114
  }
@@ -57,6 +57,7 @@ declare const _default: {
57
57
  Messages: string;
58
58
  };
59
59
  Address: {
60
+ AddressesByMemberId: string;
60
61
  Addresses: string;
61
62
  };
62
63
  };
@@ -63,7 +63,8 @@ exports.default = {
63
63
  Messages: '/{language}/MemberMessages/v1/Messages'
64
64
  },
65
65
  Address: {
66
- Addresses: '/{language}/Members/v1/AddressesByMemberId',
66
+ AddressesByMemberId: '/{language}/Members/v1/AddressesByMemberId',
67
+ Addresses: '/{language}/Members/v1/Addresses',
67
68
  }
68
69
  },
69
70
  Address: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.5.4",
3
+ "version": "4.5.6",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",