@mamindom/contracts 1.0.35 → 1.0.37
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/gen/brand.d.ts +3 -0
- package/dist/gen/category.d.ts +3 -0
- package/dist/gen/product.d.ts +11 -0
- package/dist/gen/users.d.ts +144 -0
- package/dist/gen/users.js +27 -2
- package/dist/proto/brand.proto +3 -0
- package/dist/proto/category.proto +4 -0
- package/dist/proto/product.proto +14 -0
- package/dist/proto/users.proto +168 -0
- package/gen/brand.ts +3 -0
- package/gen/category.ts +3 -0
- package/gen/product.ts +12 -0
- package/gen/users.ts +244 -1
- package/package.json +1 -1
- package/proto/brand.proto +3 -0
- package/proto/category.proto +4 -0
- package/proto/product.proto +14 -0
- package/proto/users.proto +168 -0
package/dist/gen/brand.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface BrandResponse {
|
|
|
16
16
|
[key: string]: string;
|
|
17
17
|
};
|
|
18
18
|
guid1c?: string | undefined;
|
|
19
|
+
imageId?: string | undefined;
|
|
19
20
|
}
|
|
20
21
|
export interface BrandResponse_DescriptionEntry {
|
|
21
22
|
key: string;
|
|
@@ -54,6 +55,7 @@ export interface CreateBrandRequest {
|
|
|
54
55
|
[key: string]: string;
|
|
55
56
|
};
|
|
56
57
|
guid1c?: string | undefined;
|
|
58
|
+
imageId?: string | undefined;
|
|
57
59
|
}
|
|
58
60
|
export interface CreateBrandRequest_DescriptionEntry {
|
|
59
61
|
key: string;
|
|
@@ -81,6 +83,7 @@ export interface UpdateBrandRequest {
|
|
|
81
83
|
metaDescription: {
|
|
82
84
|
[key: string]: string;
|
|
83
85
|
};
|
|
86
|
+
imageId?: string | undefined;
|
|
84
87
|
}
|
|
85
88
|
export interface UpdateBrandRequest_DescriptionEntry {
|
|
86
89
|
key: string;
|
package/dist/gen/category.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface CategoryResponse {
|
|
|
41
41
|
[key: string]: string;
|
|
42
42
|
};
|
|
43
43
|
guid1c?: string | undefined;
|
|
44
|
+
imageId?: string | undefined;
|
|
44
45
|
}
|
|
45
46
|
export interface CategoryResponse_NameEntry {
|
|
46
47
|
key: string;
|
|
@@ -95,6 +96,7 @@ export interface CreateCategoryRequest {
|
|
|
95
96
|
[key: string]: string;
|
|
96
97
|
};
|
|
97
98
|
guid1c?: string | undefined;
|
|
99
|
+
imageId?: string | undefined;
|
|
98
100
|
}
|
|
99
101
|
export interface CreateCategoryRequest_NameEntry {
|
|
100
102
|
key: string;
|
|
@@ -145,6 +147,7 @@ export interface UpdateCategoryRequest {
|
|
|
145
147
|
metaH1: {
|
|
146
148
|
[key: string]: string;
|
|
147
149
|
};
|
|
150
|
+
imageId?: string | undefined;
|
|
148
151
|
}
|
|
149
152
|
export interface UpdateCategoryRequest_NameEntry {
|
|
150
153
|
key: string;
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export interface ProductDetailResponse {
|
|
|
70
70
|
variants: ProductVariantResponse[];
|
|
71
71
|
attributes: ProductAttributeResponse[];
|
|
72
72
|
files: ProductFileResponse[];
|
|
73
|
+
mainImageId?: string | undefined;
|
|
73
74
|
}
|
|
74
75
|
export interface ProductDetailResponse_NameEntry {
|
|
75
76
|
key: string;
|
|
@@ -110,6 +111,7 @@ export interface ProductImageResponse {
|
|
|
110
111
|
[key: string]: string;
|
|
111
112
|
};
|
|
112
113
|
sortOrder: number;
|
|
114
|
+
mediaId: string;
|
|
113
115
|
}
|
|
114
116
|
export interface ProductImageResponse_AltEntry {
|
|
115
117
|
key: string;
|
|
@@ -193,6 +195,8 @@ export interface CreateProductRequest {
|
|
|
193
195
|
guid1c?: string | undefined;
|
|
194
196
|
categoryIds: string[];
|
|
195
197
|
createdById: string;
|
|
198
|
+
mainImageId?: string | undefined;
|
|
199
|
+
images: ProductImagePayload[];
|
|
196
200
|
}
|
|
197
201
|
export interface CreateProductRequest_NameEntry {
|
|
198
202
|
key: string;
|
|
@@ -239,6 +243,8 @@ export interface UpdateProductRequest {
|
|
|
239
243
|
};
|
|
240
244
|
mainImage?: string | undefined;
|
|
241
245
|
categoryIds: string[];
|
|
246
|
+
mainImageId?: string | undefined;
|
|
247
|
+
images: ProductImagePayload[];
|
|
242
248
|
}
|
|
243
249
|
export interface UpdateProductRequest_NameEntry {
|
|
244
250
|
key: string;
|
|
@@ -276,6 +282,11 @@ export interface BulkUpdateDiscountRequest {
|
|
|
276
282
|
productIds: string[];
|
|
277
283
|
discountPercentage: number;
|
|
278
284
|
}
|
|
285
|
+
export interface ProductImagePayload {
|
|
286
|
+
url: string;
|
|
287
|
+
mediaId: string;
|
|
288
|
+
sortOrder: number;
|
|
289
|
+
}
|
|
279
290
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
280
291
|
export interface ProductServiceClient {
|
|
281
292
|
getProducts(request: GetProductsRequest): Observable<GetProductsResponse>;
|
package/dist/gen/users.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
export declare const protobufPackage = "users.v1";
|
|
3
|
+
export declare enum DeliveryType {
|
|
4
|
+
NOVA_POSHTA = 0,
|
|
5
|
+
UKRPOSHTA = 1,
|
|
6
|
+
COURIER = 2,
|
|
7
|
+
PICKUP = 3,
|
|
8
|
+
UNRECOGNIZED = -1
|
|
9
|
+
}
|
|
3
10
|
export interface GetMeRequest {
|
|
4
11
|
id: string;
|
|
5
12
|
}
|
|
6
13
|
export interface GetMeResponse {
|
|
7
14
|
user: User | undefined;
|
|
15
|
+
notificationSettings: NotificationSettings | undefined;
|
|
8
16
|
}
|
|
9
17
|
export interface CreateUserRequest {
|
|
10
18
|
id: string;
|
|
@@ -32,16 +40,152 @@ export interface User {
|
|
|
32
40
|
email?: string | undefined;
|
|
33
41
|
phone?: string | undefined;
|
|
34
42
|
}
|
|
43
|
+
export interface NotificationSettings {
|
|
44
|
+
orderStatuses: boolean;
|
|
45
|
+
promotions: boolean;
|
|
46
|
+
newInCategory: boolean;
|
|
47
|
+
restockReminders: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface UpdateNotificationSettingsRequest {
|
|
50
|
+
userId: string;
|
|
51
|
+
orderStatuses?: boolean | undefined;
|
|
52
|
+
promotions?: boolean | undefined;
|
|
53
|
+
newInCategory?: boolean | undefined;
|
|
54
|
+
restockReminders?: boolean | undefined;
|
|
55
|
+
}
|
|
56
|
+
export interface UpdateNotificationSettingsResponse {
|
|
57
|
+
settings: NotificationSettings | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface Address {
|
|
60
|
+
id: string;
|
|
61
|
+
type: DeliveryType;
|
|
62
|
+
city?: string | undefined;
|
|
63
|
+
street?: string | undefined;
|
|
64
|
+
building?: string | undefined;
|
|
65
|
+
apartment?: string | undefined;
|
|
66
|
+
deliveryRef?: string | undefined;
|
|
67
|
+
isDefault: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface GetAddressesRequest {
|
|
70
|
+
userId: string;
|
|
71
|
+
}
|
|
72
|
+
export interface GetAddressesResponse {
|
|
73
|
+
addresses: Address[];
|
|
74
|
+
}
|
|
75
|
+
export interface AddAddressRequest {
|
|
76
|
+
userId: string;
|
|
77
|
+
type: DeliveryType;
|
|
78
|
+
city?: string | undefined;
|
|
79
|
+
street?: string | undefined;
|
|
80
|
+
building?: string | undefined;
|
|
81
|
+
apartment?: string | undefined;
|
|
82
|
+
deliveryRef?: string | undefined;
|
|
83
|
+
isDefault: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface UpdateAddressRequest {
|
|
86
|
+
id: string;
|
|
87
|
+
userId: string;
|
|
88
|
+
type?: DeliveryType | undefined;
|
|
89
|
+
city?: string | undefined;
|
|
90
|
+
street?: string | undefined;
|
|
91
|
+
building?: string | undefined;
|
|
92
|
+
apartment?: string | undefined;
|
|
93
|
+
deliveryRef?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface AddressResponse {
|
|
96
|
+
address: Address | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface DeleteAddressRequest {
|
|
99
|
+
id: string;
|
|
100
|
+
userId: string;
|
|
101
|
+
}
|
|
102
|
+
export interface DeleteAddressResponse {
|
|
103
|
+
ok: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface SetDefaultAddressRequest {
|
|
106
|
+
id: string;
|
|
107
|
+
userId: string;
|
|
108
|
+
}
|
|
109
|
+
export interface GetWishlistRequest {
|
|
110
|
+
userId: string;
|
|
111
|
+
}
|
|
112
|
+
export interface GetWishlistResponse {
|
|
113
|
+
productIds: string[];
|
|
114
|
+
}
|
|
115
|
+
export interface ToggleWishlistItemRequest {
|
|
116
|
+
userId: string;
|
|
117
|
+
productId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface ToggleWishlistItemResponse {
|
|
120
|
+
isAdded: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface RecordProductViewRequest {
|
|
123
|
+
userId: string;
|
|
124
|
+
productId: string;
|
|
125
|
+
}
|
|
126
|
+
export interface RecordProductViewResponse {
|
|
127
|
+
ok: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface GetViewedProductsRequest {
|
|
130
|
+
userId: string;
|
|
131
|
+
}
|
|
132
|
+
export interface GetViewedProductsResponse {
|
|
133
|
+
productIds: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface ClearViewedHistoryRequest {
|
|
136
|
+
userId: string;
|
|
137
|
+
}
|
|
138
|
+
export interface ClearViewedHistoryResponse {
|
|
139
|
+
ok: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface ExportUserDataRequest {
|
|
142
|
+
userId: string;
|
|
143
|
+
}
|
|
144
|
+
export interface ExportUserDataResponse {
|
|
145
|
+
jsonData: string;
|
|
146
|
+
}
|
|
147
|
+
export interface DeleteAccountRequest {
|
|
148
|
+
userId: string;
|
|
149
|
+
}
|
|
150
|
+
export interface DeleteAccountResponse {
|
|
151
|
+
ok: boolean;
|
|
152
|
+
}
|
|
35
153
|
export declare const USERS_V1_PACKAGE_NAME = "users.v1";
|
|
36
154
|
export interface UsersServiceClient {
|
|
37
155
|
getMe(request: GetMeRequest): Observable<GetMeResponse>;
|
|
38
156
|
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
39
157
|
updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
|
|
158
|
+
updateNotificationSettings(request: UpdateNotificationSettingsRequest): Observable<UpdateNotificationSettingsResponse>;
|
|
159
|
+
getAddresses(request: GetAddressesRequest): Observable<GetAddressesResponse>;
|
|
160
|
+
addAddress(request: AddAddressRequest): Observable<AddressResponse>;
|
|
161
|
+
updateAddress(request: UpdateAddressRequest): Observable<AddressResponse>;
|
|
162
|
+
deleteAddress(request: DeleteAddressRequest): Observable<DeleteAddressResponse>;
|
|
163
|
+
setDefaultAddress(request: SetDefaultAddressRequest): Observable<AddressResponse>;
|
|
164
|
+
getWishlist(request: GetWishlistRequest): Observable<GetWishlistResponse>;
|
|
165
|
+
toggleWishlistItem(request: ToggleWishlistItemRequest): Observable<ToggleWishlistItemResponse>;
|
|
166
|
+
recordProductView(request: RecordProductViewRequest): Observable<RecordProductViewResponse>;
|
|
167
|
+
getViewedProducts(request: GetViewedProductsRequest): Observable<GetViewedProductsResponse>;
|
|
168
|
+
clearViewedHistory(request: ClearViewedHistoryRequest): Observable<ClearViewedHistoryResponse>;
|
|
169
|
+
exportUserData(request: ExportUserDataRequest): Observable<ExportUserDataResponse>;
|
|
170
|
+
deleteAccount(request: DeleteAccountRequest): Observable<DeleteAccountResponse>;
|
|
40
171
|
}
|
|
41
172
|
export interface UsersServiceController {
|
|
42
173
|
getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
43
174
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
44
175
|
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
|
|
176
|
+
updateNotificationSettings(request: UpdateNotificationSettingsRequest): Promise<UpdateNotificationSettingsResponse> | Observable<UpdateNotificationSettingsResponse> | UpdateNotificationSettingsResponse;
|
|
177
|
+
getAddresses(request: GetAddressesRequest): Promise<GetAddressesResponse> | Observable<GetAddressesResponse> | GetAddressesResponse;
|
|
178
|
+
addAddress(request: AddAddressRequest): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
179
|
+
updateAddress(request: UpdateAddressRequest): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
180
|
+
deleteAddress(request: DeleteAddressRequest): Promise<DeleteAddressResponse> | Observable<DeleteAddressResponse> | DeleteAddressResponse;
|
|
181
|
+
setDefaultAddress(request: SetDefaultAddressRequest): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
182
|
+
getWishlist(request: GetWishlistRequest): Promise<GetWishlistResponse> | Observable<GetWishlistResponse> | GetWishlistResponse;
|
|
183
|
+
toggleWishlistItem(request: ToggleWishlistItemRequest): Promise<ToggleWishlistItemResponse> | Observable<ToggleWishlistItemResponse> | ToggleWishlistItemResponse;
|
|
184
|
+
recordProductView(request: RecordProductViewRequest): Promise<RecordProductViewResponse> | Observable<RecordProductViewResponse> | RecordProductViewResponse;
|
|
185
|
+
getViewedProducts(request: GetViewedProductsRequest): Promise<GetViewedProductsResponse> | Observable<GetViewedProductsResponse> | GetViewedProductsResponse;
|
|
186
|
+
clearViewedHistory(request: ClearViewedHistoryRequest): Promise<ClearViewedHistoryResponse> | Observable<ClearViewedHistoryResponse> | ClearViewedHistoryResponse;
|
|
187
|
+
exportUserData(request: ExportUserDataRequest): Promise<ExportUserDataResponse> | Observable<ExportUserDataResponse> | ExportUserDataResponse;
|
|
188
|
+
deleteAccount(request: DeleteAccountRequest): Promise<DeleteAccountResponse> | Observable<DeleteAccountResponse> | DeleteAccountResponse;
|
|
45
189
|
}
|
|
46
190
|
export declare function UsersServiceControllerMethods(): (constructor: Function) => void;
|
|
47
191
|
export declare const USERS_SERVICE_NAME = "UsersService";
|
package/dist/gen/users.js
CHANGED
|
@@ -5,15 +5,40 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: users.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.DeliveryType = exports.protobufPackage = void 0;
|
|
9
9
|
exports.UsersServiceControllerMethods = UsersServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
12
|
exports.protobufPackage = "users.v1";
|
|
13
|
+
var DeliveryType;
|
|
14
|
+
(function (DeliveryType) {
|
|
15
|
+
DeliveryType[DeliveryType["NOVA_POSHTA"] = 0] = "NOVA_POSHTA";
|
|
16
|
+
DeliveryType[DeliveryType["UKRPOSHTA"] = 1] = "UKRPOSHTA";
|
|
17
|
+
DeliveryType[DeliveryType["COURIER"] = 2] = "COURIER";
|
|
18
|
+
DeliveryType[DeliveryType["PICKUP"] = 3] = "PICKUP";
|
|
19
|
+
DeliveryType[DeliveryType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(DeliveryType || (exports.DeliveryType = DeliveryType = {}));
|
|
13
21
|
exports.USERS_V1_PACKAGE_NAME = "users.v1";
|
|
14
22
|
function UsersServiceControllerMethods() {
|
|
15
23
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = [
|
|
24
|
+
const grpcMethods = [
|
|
25
|
+
"getMe",
|
|
26
|
+
"createUser",
|
|
27
|
+
"updateUser",
|
|
28
|
+
"updateNotificationSettings",
|
|
29
|
+
"getAddresses",
|
|
30
|
+
"addAddress",
|
|
31
|
+
"updateAddress",
|
|
32
|
+
"deleteAddress",
|
|
33
|
+
"setDefaultAddress",
|
|
34
|
+
"getWishlist",
|
|
35
|
+
"toggleWishlistItem",
|
|
36
|
+
"recordProductView",
|
|
37
|
+
"getViewedProducts",
|
|
38
|
+
"clearViewedHistory",
|
|
39
|
+
"exportUserData",
|
|
40
|
+
"deleteAccount",
|
|
41
|
+
];
|
|
17
42
|
for (const method of grpcMethods) {
|
|
18
43
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
44
|
(0, microservices_1.GrpcMethod)("UsersService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/proto/brand.proto
CHANGED
|
@@ -28,6 +28,7 @@ message BrandResponse {
|
|
|
28
28
|
map<string, string> meta_description = 7;
|
|
29
29
|
|
|
30
30
|
optional string guid_1c = 8;
|
|
31
|
+
optional string image_id = 9;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
|
|
@@ -56,6 +57,7 @@ message CreateBrandRequest {
|
|
|
56
57
|
map<string, string> meta_description = 6;
|
|
57
58
|
|
|
58
59
|
optional string guid_1c = 7;
|
|
60
|
+
optional string image_id = 8;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
message UpdateBrandRequest {
|
|
@@ -67,6 +69,7 @@ message UpdateBrandRequest {
|
|
|
67
69
|
map<string, string> description = 5;
|
|
68
70
|
map<string, string> meta_title = 6;
|
|
69
71
|
map<string, string> meta_description = 7;
|
|
72
|
+
optional string image_id = 8;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
message DeleteBrandRequest {
|
|
@@ -55,6 +55,7 @@ message CategoryResponse {
|
|
|
55
55
|
map<string, string> meta_h1 = 12;
|
|
56
56
|
|
|
57
57
|
optional string guid_1c = 13;
|
|
58
|
+
optional string image_id = 14;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
message GetCategoryRequest {
|
|
@@ -78,6 +79,7 @@ message CreateCategoryRequest {
|
|
|
78
79
|
map<string, string> meta_h1 = 11;
|
|
79
80
|
|
|
80
81
|
optional string guid_1c = 12;
|
|
82
|
+
optional string image_id = 13;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
message UpdateCategoryRequest {
|
|
@@ -95,6 +97,8 @@ message UpdateCategoryRequest {
|
|
|
95
97
|
map<string, string> meta_description = 10;
|
|
96
98
|
map<string, string> meta_keywords = 11;
|
|
97
99
|
map<string, string> meta_h1 = 12;
|
|
100
|
+
|
|
101
|
+
optional string image_id = 13;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
message DeleteCategoryRequest {
|
package/dist/proto/product.proto
CHANGED
|
@@ -74,6 +74,7 @@ message ProductDetailResponse {
|
|
|
74
74
|
repeated ProductVariantResponse variants = 23;
|
|
75
75
|
repeated ProductAttributeResponse attributes = 24;
|
|
76
76
|
repeated ProductFileResponse files = 25;
|
|
77
|
+
optional string main_image_id = 26;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
|
|
@@ -82,6 +83,7 @@ message ProductImageResponse {
|
|
|
82
83
|
string url = 2;
|
|
83
84
|
map<string, string> alt = 3;
|
|
84
85
|
int32 sort_order = 4;
|
|
86
|
+
string media_id = 5;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
message ProductWarehouseResponse {
|
|
@@ -161,6 +163,9 @@ message CreateProductRequest {
|
|
|
161
163
|
repeated string category_ids = 14;
|
|
162
164
|
|
|
163
165
|
string created_by_id = 15;
|
|
166
|
+
|
|
167
|
+
optional string main_image_id = 16;
|
|
168
|
+
repeated ProductImagePayload images = 17;
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
message UpdateProductRequest {
|
|
@@ -182,6 +187,9 @@ message UpdateProductRequest {
|
|
|
182
187
|
|
|
183
188
|
optional string main_image = 13;
|
|
184
189
|
repeated string category_ids = 14;
|
|
190
|
+
|
|
191
|
+
optional string main_image_id = 15;
|
|
192
|
+
repeated ProductImagePayload images = 16;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
message DeleteProductRequest {
|
|
@@ -205,6 +213,12 @@ message BulkUpdateDiscountRequest {
|
|
|
205
213
|
double discount_percentage = 2;
|
|
206
214
|
}
|
|
207
215
|
|
|
216
|
+
message ProductImagePayload {
|
|
217
|
+
string url = 1;
|
|
218
|
+
string media_id = 2;
|
|
219
|
+
int32 sort_order = 3;
|
|
220
|
+
}
|
|
221
|
+
|
|
208
222
|
enum ProductStatus {
|
|
209
223
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
210
224
|
PRODUCT_STATUS_DRAFT = 1;
|
package/dist/proto/users.proto
CHANGED
|
@@ -3,9 +3,33 @@ syntax = "proto3";
|
|
|
3
3
|
package users.v1;
|
|
4
4
|
|
|
5
5
|
service UsersService {
|
|
6
|
+
|
|
6
7
|
rpc GetMe(GetMeRequest) returns (GetMeResponse);
|
|
7
8
|
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
|
|
8
9
|
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
rpc UpdateNotificationSettings(UpdateNotificationSettingsRequest) returns (UpdateNotificationSettingsResponse);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
rpc GetAddresses(GetAddressesRequest) returns (GetAddressesResponse);
|
|
16
|
+
rpc AddAddress(AddAddressRequest) returns (AddressResponse);
|
|
17
|
+
rpc UpdateAddress(UpdateAddressRequest) returns (AddressResponse);
|
|
18
|
+
rpc DeleteAddress(DeleteAddressRequest) returns (DeleteAddressResponse);
|
|
19
|
+
rpc SetDefaultAddress(SetDefaultAddressRequest) returns (AddressResponse);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
rpc GetWishlist(GetWishlistRequest) returns (GetWishlistResponse);
|
|
23
|
+
rpc ToggleWishlistItem(ToggleWishlistItemRequest) returns (ToggleWishlistItemResponse);
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
rpc RecordProductView(RecordProductViewRequest) returns (RecordProductViewResponse);
|
|
27
|
+
rpc GetViewedProducts(GetViewedProductsRequest) returns (GetViewedProductsResponse);
|
|
28
|
+
rpc ClearViewedHistory(ClearViewedHistoryRequest) returns (ClearViewedHistoryResponse);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
rpc ExportUserData(ExportUserDataRequest) returns (ExportUserDataResponse);
|
|
32
|
+
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
|
|
9
33
|
}
|
|
10
34
|
|
|
11
35
|
message GetMeRequest {
|
|
@@ -14,6 +38,7 @@ message GetMeRequest {
|
|
|
14
38
|
|
|
15
39
|
message GetMeResponse {
|
|
16
40
|
User user = 1;
|
|
41
|
+
NotificationSettings notification_settings = 2;
|
|
17
42
|
}
|
|
18
43
|
|
|
19
44
|
message CreateUserRequest {
|
|
@@ -45,4 +70,147 @@ message User {
|
|
|
45
70
|
int32 bonuses = 4;
|
|
46
71
|
optional string email = 5;
|
|
47
72
|
optional string phone = 6;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message NotificationSettings {
|
|
76
|
+
bool order_statuses = 1;
|
|
77
|
+
bool promotions = 2;
|
|
78
|
+
bool new_in_category = 3;
|
|
79
|
+
bool restock_reminders = 4;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message UpdateNotificationSettingsRequest {
|
|
83
|
+
string user_id = 1;
|
|
84
|
+
optional bool order_statuses = 2;
|
|
85
|
+
optional bool promotions = 3;
|
|
86
|
+
optional bool new_in_category = 4;
|
|
87
|
+
optional bool restock_reminders = 5;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message UpdateNotificationSettingsResponse {
|
|
91
|
+
NotificationSettings settings = 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
enum DeliveryType {
|
|
95
|
+
NOVA_POSHTA = 0;
|
|
96
|
+
UKRPOSHTA = 1;
|
|
97
|
+
COURIER = 2;
|
|
98
|
+
PICKUP = 3;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message Address {
|
|
102
|
+
string id = 1;
|
|
103
|
+
DeliveryType type = 2;
|
|
104
|
+
optional string city = 3;
|
|
105
|
+
optional string street = 4;
|
|
106
|
+
optional string building = 5;
|
|
107
|
+
optional string apartment = 6;
|
|
108
|
+
optional string delivery_ref = 7;
|
|
109
|
+
bool is_default = 8;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message GetAddressesRequest {
|
|
113
|
+
string user_id = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message GetAddressesResponse {
|
|
117
|
+
repeated Address addresses = 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
message AddAddressRequest {
|
|
121
|
+
string user_id = 1;
|
|
122
|
+
DeliveryType type = 2;
|
|
123
|
+
optional string city = 3;
|
|
124
|
+
optional string street = 4;
|
|
125
|
+
optional string building = 5;
|
|
126
|
+
optional string apartment = 6;
|
|
127
|
+
optional string delivery_ref = 7;
|
|
128
|
+
bool is_default = 8;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message UpdateAddressRequest {
|
|
132
|
+
string id = 1;
|
|
133
|
+
string user_id = 2;
|
|
134
|
+
optional DeliveryType type = 3;
|
|
135
|
+
optional string city = 4;
|
|
136
|
+
optional string street = 5;
|
|
137
|
+
optional string building = 6;
|
|
138
|
+
optional string apartment = 7;
|
|
139
|
+
optional string delivery_ref = 8;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message AddressResponse {
|
|
143
|
+
Address address = 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message DeleteAddressRequest {
|
|
147
|
+
string id = 1;
|
|
148
|
+
string user_id = 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message DeleteAddressResponse {
|
|
152
|
+
bool ok = 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
message SetDefaultAddressRequest {
|
|
156
|
+
string id = 1;
|
|
157
|
+
string user_id = 2;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message GetWishlistRequest {
|
|
161
|
+
string user_id = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
message GetWishlistResponse {
|
|
165
|
+
repeated string product_ids = 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
message ToggleWishlistItemRequest {
|
|
169
|
+
string user_id = 1;
|
|
170
|
+
string product_id = 2;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message ToggleWishlistItemResponse {
|
|
174
|
+
bool is_added = 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message RecordProductViewRequest {
|
|
178
|
+
string user_id = 1;
|
|
179
|
+
string product_id = 2;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message RecordProductViewResponse {
|
|
183
|
+
bool ok = 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
message GetViewedProductsRequest {
|
|
187
|
+
string user_id = 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message GetViewedProductsResponse {
|
|
191
|
+
repeated string product_ids = 1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
message ClearViewedHistoryRequest {
|
|
195
|
+
string user_id = 1;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
message ClearViewedHistoryResponse {
|
|
199
|
+
bool ok = 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
message ExportUserDataRequest {
|
|
203
|
+
string user_id = 1;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
message ExportUserDataResponse {
|
|
207
|
+
string json_data = 1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
message DeleteAccountRequest {
|
|
211
|
+
string user_id = 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
message DeleteAccountResponse {
|
|
215
|
+
bool ok = 1;
|
|
48
216
|
}
|
package/gen/brand.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface BrandResponse {
|
|
|
20
20
|
metaTitle: { [key: string]: string };
|
|
21
21
|
metaDescription: { [key: string]: string };
|
|
22
22
|
guid1c?: string | undefined;
|
|
23
|
+
imageId?: string | undefined;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface BrandResponse_DescriptionEntry {
|
|
@@ -59,6 +60,7 @@ export interface CreateBrandRequest {
|
|
|
59
60
|
metaTitle: { [key: string]: string };
|
|
60
61
|
metaDescription: { [key: string]: string };
|
|
61
62
|
guid1c?: string | undefined;
|
|
63
|
+
imageId?: string | undefined;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export interface CreateBrandRequest_DescriptionEntry {
|
|
@@ -84,6 +86,7 @@ export interface UpdateBrandRequest {
|
|
|
84
86
|
description: { [key: string]: string };
|
|
85
87
|
metaTitle: { [key: string]: string };
|
|
86
88
|
metaDescription: { [key: string]: string };
|
|
89
|
+
imageId?: string | undefined;
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
export interface UpdateBrandRequest_DescriptionEntry {
|
package/gen/category.ts
CHANGED
|
@@ -42,6 +42,7 @@ export interface CategoryResponse {
|
|
|
42
42
|
metaKeywords: { [key: string]: string };
|
|
43
43
|
metaH1: { [key: string]: string };
|
|
44
44
|
guid1c?: string | undefined;
|
|
45
|
+
imageId?: string | undefined;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export interface CategoryResponse_NameEntry {
|
|
@@ -92,6 +93,7 @@ export interface CreateCategoryRequest {
|
|
|
92
93
|
metaKeywords: { [key: string]: string };
|
|
93
94
|
metaH1: { [key: string]: string };
|
|
94
95
|
guid1c?: string | undefined;
|
|
96
|
+
imageId?: string | undefined;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
export interface CreateCategoryRequest_NameEntry {
|
|
@@ -137,6 +139,7 @@ export interface UpdateCategoryRequest {
|
|
|
137
139
|
metaDescription: { [key: string]: string };
|
|
138
140
|
metaKeywords: { [key: string]: string };
|
|
139
141
|
metaH1: { [key: string]: string };
|
|
142
|
+
imageId?: string | undefined;
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
export interface UpdateCategoryRequest_NameEntry {
|
package/gen/product.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface ProductDetailResponse {
|
|
|
65
65
|
variants: ProductVariantResponse[];
|
|
66
66
|
attributes: ProductAttributeResponse[];
|
|
67
67
|
files: ProductFileResponse[];
|
|
68
|
+
mainImageId?: string | undefined;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export interface ProductDetailResponse_NameEntry {
|
|
@@ -112,6 +113,7 @@ export interface ProductImageResponse {
|
|
|
112
113
|
url: string;
|
|
113
114
|
alt: { [key: string]: string };
|
|
114
115
|
sortOrder: number;
|
|
116
|
+
mediaId: string;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
export interface ProductImageResponse_AltEntry {
|
|
@@ -192,6 +194,8 @@ export interface CreateProductRequest {
|
|
|
192
194
|
guid1c?: string | undefined;
|
|
193
195
|
categoryIds: string[];
|
|
194
196
|
createdById: string;
|
|
197
|
+
mainImageId?: string | undefined;
|
|
198
|
+
images: ProductImagePayload[];
|
|
195
199
|
}
|
|
196
200
|
|
|
197
201
|
export interface CreateProductRequest_NameEntry {
|
|
@@ -234,6 +238,8 @@ export interface UpdateProductRequest {
|
|
|
234
238
|
metaDescription: { [key: string]: string };
|
|
235
239
|
mainImage?: string | undefined;
|
|
236
240
|
categoryIds: string[];
|
|
241
|
+
mainImageId?: string | undefined;
|
|
242
|
+
images: ProductImagePayload[];
|
|
237
243
|
}
|
|
238
244
|
|
|
239
245
|
export interface UpdateProductRequest_NameEntry {
|
|
@@ -281,6 +287,12 @@ export interface BulkUpdateDiscountRequest {
|
|
|
281
287
|
discountPercentage: number;
|
|
282
288
|
}
|
|
283
289
|
|
|
290
|
+
export interface ProductImagePayload {
|
|
291
|
+
url: string;
|
|
292
|
+
mediaId: string;
|
|
293
|
+
sortOrder: number;
|
|
294
|
+
}
|
|
295
|
+
|
|
284
296
|
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
285
297
|
|
|
286
298
|
export interface ProductServiceClient {
|
package/gen/users.ts
CHANGED
|
@@ -10,12 +10,21 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "users.v1";
|
|
12
12
|
|
|
13
|
+
export enum DeliveryType {
|
|
14
|
+
NOVA_POSHTA = 0,
|
|
15
|
+
UKRPOSHTA = 1,
|
|
16
|
+
COURIER = 2,
|
|
17
|
+
PICKUP = 3,
|
|
18
|
+
UNRECOGNIZED = -1,
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
export interface GetMeRequest {
|
|
14
22
|
id: string;
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export interface GetMeResponse {
|
|
18
26
|
user: User | undefined;
|
|
27
|
+
notificationSettings: NotificationSettings | undefined;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
export interface CreateUserRequest {
|
|
@@ -49,6 +58,142 @@ export interface User {
|
|
|
49
58
|
phone?: string | undefined;
|
|
50
59
|
}
|
|
51
60
|
|
|
61
|
+
export interface NotificationSettings {
|
|
62
|
+
orderStatuses: boolean;
|
|
63
|
+
promotions: boolean;
|
|
64
|
+
newInCategory: boolean;
|
|
65
|
+
restockReminders: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface UpdateNotificationSettingsRequest {
|
|
69
|
+
userId: string;
|
|
70
|
+
orderStatuses?: boolean | undefined;
|
|
71
|
+
promotions?: boolean | undefined;
|
|
72
|
+
newInCategory?: boolean | undefined;
|
|
73
|
+
restockReminders?: boolean | undefined;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface UpdateNotificationSettingsResponse {
|
|
77
|
+
settings: NotificationSettings | undefined;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface Address {
|
|
81
|
+
id: string;
|
|
82
|
+
type: DeliveryType;
|
|
83
|
+
city?: string | undefined;
|
|
84
|
+
street?: string | undefined;
|
|
85
|
+
building?: string | undefined;
|
|
86
|
+
apartment?: string | undefined;
|
|
87
|
+
deliveryRef?: string | undefined;
|
|
88
|
+
isDefault: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface GetAddressesRequest {
|
|
92
|
+
userId: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface GetAddressesResponse {
|
|
96
|
+
addresses: Address[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface AddAddressRequest {
|
|
100
|
+
userId: string;
|
|
101
|
+
type: DeliveryType;
|
|
102
|
+
city?: string | undefined;
|
|
103
|
+
street?: string | undefined;
|
|
104
|
+
building?: string | undefined;
|
|
105
|
+
apartment?: string | undefined;
|
|
106
|
+
deliveryRef?: string | undefined;
|
|
107
|
+
isDefault: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface UpdateAddressRequest {
|
|
111
|
+
id: string;
|
|
112
|
+
userId: string;
|
|
113
|
+
type?: DeliveryType | undefined;
|
|
114
|
+
city?: string | undefined;
|
|
115
|
+
street?: string | undefined;
|
|
116
|
+
building?: string | undefined;
|
|
117
|
+
apartment?: string | undefined;
|
|
118
|
+
deliveryRef?: string | undefined;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface AddressResponse {
|
|
122
|
+
address: Address | undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface DeleteAddressRequest {
|
|
126
|
+
id: string;
|
|
127
|
+
userId: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface DeleteAddressResponse {
|
|
131
|
+
ok: boolean;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface SetDefaultAddressRequest {
|
|
135
|
+
id: string;
|
|
136
|
+
userId: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface GetWishlistRequest {
|
|
140
|
+
userId: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface GetWishlistResponse {
|
|
144
|
+
productIds: string[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ToggleWishlistItemRequest {
|
|
148
|
+
userId: string;
|
|
149
|
+
productId: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface ToggleWishlistItemResponse {
|
|
153
|
+
isAdded: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface RecordProductViewRequest {
|
|
157
|
+
userId: string;
|
|
158
|
+
productId: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface RecordProductViewResponse {
|
|
162
|
+
ok: boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface GetViewedProductsRequest {
|
|
166
|
+
userId: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface GetViewedProductsResponse {
|
|
170
|
+
productIds: string[];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface ClearViewedHistoryRequest {
|
|
174
|
+
userId: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface ClearViewedHistoryResponse {
|
|
178
|
+
ok: boolean;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface ExportUserDataRequest {
|
|
182
|
+
userId: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface ExportUserDataResponse {
|
|
186
|
+
jsonData: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface DeleteAccountRequest {
|
|
190
|
+
userId: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface DeleteAccountResponse {
|
|
194
|
+
ok: boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
52
197
|
export const USERS_V1_PACKAGE_NAME = "users.v1";
|
|
53
198
|
|
|
54
199
|
export interface UsersServiceClient {
|
|
@@ -57,6 +202,34 @@ export interface UsersServiceClient {
|
|
|
57
202
|
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
58
203
|
|
|
59
204
|
updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
|
|
205
|
+
|
|
206
|
+
updateNotificationSettings(
|
|
207
|
+
request: UpdateNotificationSettingsRequest,
|
|
208
|
+
): Observable<UpdateNotificationSettingsResponse>;
|
|
209
|
+
|
|
210
|
+
getAddresses(request: GetAddressesRequest): Observable<GetAddressesResponse>;
|
|
211
|
+
|
|
212
|
+
addAddress(request: AddAddressRequest): Observable<AddressResponse>;
|
|
213
|
+
|
|
214
|
+
updateAddress(request: UpdateAddressRequest): Observable<AddressResponse>;
|
|
215
|
+
|
|
216
|
+
deleteAddress(request: DeleteAddressRequest): Observable<DeleteAddressResponse>;
|
|
217
|
+
|
|
218
|
+
setDefaultAddress(request: SetDefaultAddressRequest): Observable<AddressResponse>;
|
|
219
|
+
|
|
220
|
+
getWishlist(request: GetWishlistRequest): Observable<GetWishlistResponse>;
|
|
221
|
+
|
|
222
|
+
toggleWishlistItem(request: ToggleWishlistItemRequest): Observable<ToggleWishlistItemResponse>;
|
|
223
|
+
|
|
224
|
+
recordProductView(request: RecordProductViewRequest): Observable<RecordProductViewResponse>;
|
|
225
|
+
|
|
226
|
+
getViewedProducts(request: GetViewedProductsRequest): Observable<GetViewedProductsResponse>;
|
|
227
|
+
|
|
228
|
+
clearViewedHistory(request: ClearViewedHistoryRequest): Observable<ClearViewedHistoryResponse>;
|
|
229
|
+
|
|
230
|
+
exportUserData(request: ExportUserDataRequest): Observable<ExportUserDataResponse>;
|
|
231
|
+
|
|
232
|
+
deleteAccount(request: DeleteAccountRequest): Observable<DeleteAccountResponse>;
|
|
60
233
|
}
|
|
61
234
|
|
|
62
235
|
export interface UsersServiceController {
|
|
@@ -69,11 +242,81 @@ export interface UsersServiceController {
|
|
|
69
242
|
updateUser(
|
|
70
243
|
request: UpdateUserRequest,
|
|
71
244
|
): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
|
|
245
|
+
|
|
246
|
+
updateNotificationSettings(
|
|
247
|
+
request: UpdateNotificationSettingsRequest,
|
|
248
|
+
):
|
|
249
|
+
| Promise<UpdateNotificationSettingsResponse>
|
|
250
|
+
| Observable<UpdateNotificationSettingsResponse>
|
|
251
|
+
| UpdateNotificationSettingsResponse;
|
|
252
|
+
|
|
253
|
+
getAddresses(
|
|
254
|
+
request: GetAddressesRequest,
|
|
255
|
+
): Promise<GetAddressesResponse> | Observable<GetAddressesResponse> | GetAddressesResponse;
|
|
256
|
+
|
|
257
|
+
addAddress(request: AddAddressRequest): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
258
|
+
|
|
259
|
+
updateAddress(
|
|
260
|
+
request: UpdateAddressRequest,
|
|
261
|
+
): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
262
|
+
|
|
263
|
+
deleteAddress(
|
|
264
|
+
request: DeleteAddressRequest,
|
|
265
|
+
): Promise<DeleteAddressResponse> | Observable<DeleteAddressResponse> | DeleteAddressResponse;
|
|
266
|
+
|
|
267
|
+
setDefaultAddress(
|
|
268
|
+
request: SetDefaultAddressRequest,
|
|
269
|
+
): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
|
|
270
|
+
|
|
271
|
+
getWishlist(
|
|
272
|
+
request: GetWishlistRequest,
|
|
273
|
+
): Promise<GetWishlistResponse> | Observable<GetWishlistResponse> | GetWishlistResponse;
|
|
274
|
+
|
|
275
|
+
toggleWishlistItem(
|
|
276
|
+
request: ToggleWishlistItemRequest,
|
|
277
|
+
): Promise<ToggleWishlistItemResponse> | Observable<ToggleWishlistItemResponse> | ToggleWishlistItemResponse;
|
|
278
|
+
|
|
279
|
+
recordProductView(
|
|
280
|
+
request: RecordProductViewRequest,
|
|
281
|
+
): Promise<RecordProductViewResponse> | Observable<RecordProductViewResponse> | RecordProductViewResponse;
|
|
282
|
+
|
|
283
|
+
getViewedProducts(
|
|
284
|
+
request: GetViewedProductsRequest,
|
|
285
|
+
): Promise<GetViewedProductsResponse> | Observable<GetViewedProductsResponse> | GetViewedProductsResponse;
|
|
286
|
+
|
|
287
|
+
clearViewedHistory(
|
|
288
|
+
request: ClearViewedHistoryRequest,
|
|
289
|
+
): Promise<ClearViewedHistoryResponse> | Observable<ClearViewedHistoryResponse> | ClearViewedHistoryResponse;
|
|
290
|
+
|
|
291
|
+
exportUserData(
|
|
292
|
+
request: ExportUserDataRequest,
|
|
293
|
+
): Promise<ExportUserDataResponse> | Observable<ExportUserDataResponse> | ExportUserDataResponse;
|
|
294
|
+
|
|
295
|
+
deleteAccount(
|
|
296
|
+
request: DeleteAccountRequest,
|
|
297
|
+
): Promise<DeleteAccountResponse> | Observable<DeleteAccountResponse> | DeleteAccountResponse;
|
|
72
298
|
}
|
|
73
299
|
|
|
74
300
|
export function UsersServiceControllerMethods() {
|
|
75
301
|
return function (constructor: Function) {
|
|
76
|
-
const grpcMethods: string[] = [
|
|
302
|
+
const grpcMethods: string[] = [
|
|
303
|
+
"getMe",
|
|
304
|
+
"createUser",
|
|
305
|
+
"updateUser",
|
|
306
|
+
"updateNotificationSettings",
|
|
307
|
+
"getAddresses",
|
|
308
|
+
"addAddress",
|
|
309
|
+
"updateAddress",
|
|
310
|
+
"deleteAddress",
|
|
311
|
+
"setDefaultAddress",
|
|
312
|
+
"getWishlist",
|
|
313
|
+
"toggleWishlistItem",
|
|
314
|
+
"recordProductView",
|
|
315
|
+
"getViewedProducts",
|
|
316
|
+
"clearViewedHistory",
|
|
317
|
+
"exportUserData",
|
|
318
|
+
"deleteAccount",
|
|
319
|
+
];
|
|
77
320
|
for (const method of grpcMethods) {
|
|
78
321
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
79
322
|
GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/brand.proto
CHANGED
|
@@ -28,6 +28,7 @@ message BrandResponse {
|
|
|
28
28
|
map<string, string> meta_description = 7;
|
|
29
29
|
|
|
30
30
|
optional string guid_1c = 8;
|
|
31
|
+
optional string image_id = 9;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
|
|
@@ -56,6 +57,7 @@ message CreateBrandRequest {
|
|
|
56
57
|
map<string, string> meta_description = 6;
|
|
57
58
|
|
|
58
59
|
optional string guid_1c = 7;
|
|
60
|
+
optional string image_id = 8;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
message UpdateBrandRequest {
|
|
@@ -67,6 +69,7 @@ message UpdateBrandRequest {
|
|
|
67
69
|
map<string, string> description = 5;
|
|
68
70
|
map<string, string> meta_title = 6;
|
|
69
71
|
map<string, string> meta_description = 7;
|
|
72
|
+
optional string image_id = 8;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
message DeleteBrandRequest {
|
package/proto/category.proto
CHANGED
|
@@ -55,6 +55,7 @@ message CategoryResponse {
|
|
|
55
55
|
map<string, string> meta_h1 = 12;
|
|
56
56
|
|
|
57
57
|
optional string guid_1c = 13;
|
|
58
|
+
optional string image_id = 14;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
message GetCategoryRequest {
|
|
@@ -78,6 +79,7 @@ message CreateCategoryRequest {
|
|
|
78
79
|
map<string, string> meta_h1 = 11;
|
|
79
80
|
|
|
80
81
|
optional string guid_1c = 12;
|
|
82
|
+
optional string image_id = 13;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
message UpdateCategoryRequest {
|
|
@@ -95,6 +97,8 @@ message UpdateCategoryRequest {
|
|
|
95
97
|
map<string, string> meta_description = 10;
|
|
96
98
|
map<string, string> meta_keywords = 11;
|
|
97
99
|
map<string, string> meta_h1 = 12;
|
|
100
|
+
|
|
101
|
+
optional string image_id = 13;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
message DeleteCategoryRequest {
|
package/proto/product.proto
CHANGED
|
@@ -74,6 +74,7 @@ message ProductDetailResponse {
|
|
|
74
74
|
repeated ProductVariantResponse variants = 23;
|
|
75
75
|
repeated ProductAttributeResponse attributes = 24;
|
|
76
76
|
repeated ProductFileResponse files = 25;
|
|
77
|
+
optional string main_image_id = 26;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
|
|
@@ -82,6 +83,7 @@ message ProductImageResponse {
|
|
|
82
83
|
string url = 2;
|
|
83
84
|
map<string, string> alt = 3;
|
|
84
85
|
int32 sort_order = 4;
|
|
86
|
+
string media_id = 5;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
message ProductWarehouseResponse {
|
|
@@ -161,6 +163,9 @@ message CreateProductRequest {
|
|
|
161
163
|
repeated string category_ids = 14;
|
|
162
164
|
|
|
163
165
|
string created_by_id = 15;
|
|
166
|
+
|
|
167
|
+
optional string main_image_id = 16;
|
|
168
|
+
repeated ProductImagePayload images = 17;
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
message UpdateProductRequest {
|
|
@@ -182,6 +187,9 @@ message UpdateProductRequest {
|
|
|
182
187
|
|
|
183
188
|
optional string main_image = 13;
|
|
184
189
|
repeated string category_ids = 14;
|
|
190
|
+
|
|
191
|
+
optional string main_image_id = 15;
|
|
192
|
+
repeated ProductImagePayload images = 16;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
message DeleteProductRequest {
|
|
@@ -205,6 +213,12 @@ message BulkUpdateDiscountRequest {
|
|
|
205
213
|
double discount_percentage = 2;
|
|
206
214
|
}
|
|
207
215
|
|
|
216
|
+
message ProductImagePayload {
|
|
217
|
+
string url = 1;
|
|
218
|
+
string media_id = 2;
|
|
219
|
+
int32 sort_order = 3;
|
|
220
|
+
}
|
|
221
|
+
|
|
208
222
|
enum ProductStatus {
|
|
209
223
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
210
224
|
PRODUCT_STATUS_DRAFT = 1;
|
package/proto/users.proto
CHANGED
|
@@ -3,9 +3,33 @@ syntax = "proto3";
|
|
|
3
3
|
package users.v1;
|
|
4
4
|
|
|
5
5
|
service UsersService {
|
|
6
|
+
|
|
6
7
|
rpc GetMe(GetMeRequest) returns (GetMeResponse);
|
|
7
8
|
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
|
|
8
9
|
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
rpc UpdateNotificationSettings(UpdateNotificationSettingsRequest) returns (UpdateNotificationSettingsResponse);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
rpc GetAddresses(GetAddressesRequest) returns (GetAddressesResponse);
|
|
16
|
+
rpc AddAddress(AddAddressRequest) returns (AddressResponse);
|
|
17
|
+
rpc UpdateAddress(UpdateAddressRequest) returns (AddressResponse);
|
|
18
|
+
rpc DeleteAddress(DeleteAddressRequest) returns (DeleteAddressResponse);
|
|
19
|
+
rpc SetDefaultAddress(SetDefaultAddressRequest) returns (AddressResponse);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
rpc GetWishlist(GetWishlistRequest) returns (GetWishlistResponse);
|
|
23
|
+
rpc ToggleWishlistItem(ToggleWishlistItemRequest) returns (ToggleWishlistItemResponse);
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
rpc RecordProductView(RecordProductViewRequest) returns (RecordProductViewResponse);
|
|
27
|
+
rpc GetViewedProducts(GetViewedProductsRequest) returns (GetViewedProductsResponse);
|
|
28
|
+
rpc ClearViewedHistory(ClearViewedHistoryRequest) returns (ClearViewedHistoryResponse);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
rpc ExportUserData(ExportUserDataRequest) returns (ExportUserDataResponse);
|
|
32
|
+
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
|
|
9
33
|
}
|
|
10
34
|
|
|
11
35
|
message GetMeRequest {
|
|
@@ -14,6 +38,7 @@ message GetMeRequest {
|
|
|
14
38
|
|
|
15
39
|
message GetMeResponse {
|
|
16
40
|
User user = 1;
|
|
41
|
+
NotificationSettings notification_settings = 2;
|
|
17
42
|
}
|
|
18
43
|
|
|
19
44
|
message CreateUserRequest {
|
|
@@ -45,4 +70,147 @@ message User {
|
|
|
45
70
|
int32 bonuses = 4;
|
|
46
71
|
optional string email = 5;
|
|
47
72
|
optional string phone = 6;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message NotificationSettings {
|
|
76
|
+
bool order_statuses = 1;
|
|
77
|
+
bool promotions = 2;
|
|
78
|
+
bool new_in_category = 3;
|
|
79
|
+
bool restock_reminders = 4;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message UpdateNotificationSettingsRequest {
|
|
83
|
+
string user_id = 1;
|
|
84
|
+
optional bool order_statuses = 2;
|
|
85
|
+
optional bool promotions = 3;
|
|
86
|
+
optional bool new_in_category = 4;
|
|
87
|
+
optional bool restock_reminders = 5;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message UpdateNotificationSettingsResponse {
|
|
91
|
+
NotificationSettings settings = 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
enum DeliveryType {
|
|
95
|
+
NOVA_POSHTA = 0;
|
|
96
|
+
UKRPOSHTA = 1;
|
|
97
|
+
COURIER = 2;
|
|
98
|
+
PICKUP = 3;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message Address {
|
|
102
|
+
string id = 1;
|
|
103
|
+
DeliveryType type = 2;
|
|
104
|
+
optional string city = 3;
|
|
105
|
+
optional string street = 4;
|
|
106
|
+
optional string building = 5;
|
|
107
|
+
optional string apartment = 6;
|
|
108
|
+
optional string delivery_ref = 7;
|
|
109
|
+
bool is_default = 8;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message GetAddressesRequest {
|
|
113
|
+
string user_id = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message GetAddressesResponse {
|
|
117
|
+
repeated Address addresses = 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
message AddAddressRequest {
|
|
121
|
+
string user_id = 1;
|
|
122
|
+
DeliveryType type = 2;
|
|
123
|
+
optional string city = 3;
|
|
124
|
+
optional string street = 4;
|
|
125
|
+
optional string building = 5;
|
|
126
|
+
optional string apartment = 6;
|
|
127
|
+
optional string delivery_ref = 7;
|
|
128
|
+
bool is_default = 8;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message UpdateAddressRequest {
|
|
132
|
+
string id = 1;
|
|
133
|
+
string user_id = 2;
|
|
134
|
+
optional DeliveryType type = 3;
|
|
135
|
+
optional string city = 4;
|
|
136
|
+
optional string street = 5;
|
|
137
|
+
optional string building = 6;
|
|
138
|
+
optional string apartment = 7;
|
|
139
|
+
optional string delivery_ref = 8;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message AddressResponse {
|
|
143
|
+
Address address = 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message DeleteAddressRequest {
|
|
147
|
+
string id = 1;
|
|
148
|
+
string user_id = 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message DeleteAddressResponse {
|
|
152
|
+
bool ok = 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
message SetDefaultAddressRequest {
|
|
156
|
+
string id = 1;
|
|
157
|
+
string user_id = 2;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message GetWishlistRequest {
|
|
161
|
+
string user_id = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
message GetWishlistResponse {
|
|
165
|
+
repeated string product_ids = 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
message ToggleWishlistItemRequest {
|
|
169
|
+
string user_id = 1;
|
|
170
|
+
string product_id = 2;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message ToggleWishlistItemResponse {
|
|
174
|
+
bool is_added = 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message RecordProductViewRequest {
|
|
178
|
+
string user_id = 1;
|
|
179
|
+
string product_id = 2;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message RecordProductViewResponse {
|
|
183
|
+
bool ok = 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
message GetViewedProductsRequest {
|
|
187
|
+
string user_id = 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message GetViewedProductsResponse {
|
|
191
|
+
repeated string product_ids = 1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
message ClearViewedHistoryRequest {
|
|
195
|
+
string user_id = 1;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
message ClearViewedHistoryResponse {
|
|
199
|
+
bool ok = 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
message ExportUserDataRequest {
|
|
203
|
+
string user_id = 1;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
message ExportUserDataResponse {
|
|
207
|
+
string json_data = 1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
message DeleteAccountRequest {
|
|
211
|
+
string user_id = 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
message DeleteAccountResponse {
|
|
215
|
+
bool ok = 1;
|
|
48
216
|
}
|