@barumetric/contracts 1.3.19 → 1.3.21

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.
@@ -0,0 +1,16 @@
1
+ export interface CreateListingEvent {
2
+ title: string;
3
+ description?: string;
4
+ price?: number;
5
+ categoryId: string;
6
+ userId: string;
7
+ latitude?: number;
8
+ longitude?: number;
9
+ videoUrl?: string;
10
+ status?: string;
11
+ images?: Array<{
12
+ url: string;
13
+ order?: number;
14
+ }>;
15
+ attributes?: Record<string, any>;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface DeleteListingEvent {
2
+ id: string;
3
+ userId?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from './create-listing.interface';
2
+ export * from './update-listing.interface';
3
+ export * from './delete-listing.interface';
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create-listing.interface"), exports);
18
+ __exportStar(require("./update-listing.interface"), exports);
19
+ __exportStar(require("./delete-listing.interface"), exports);
@@ -0,0 +1,17 @@
1
+ export interface UpdateListingEvent {
2
+ id: string;
3
+ title?: string;
4
+ description?: string;
5
+ price?: number;
6
+ categoryId?: string;
7
+ userId: string;
8
+ latitude?: number;
9
+ longitude?: number;
10
+ videoUrl?: string;
11
+ status?: string;
12
+ images?: Array<{
13
+ url: string;
14
+ order?: number;
15
+ }>;
16
+ attributes?: Record<string, any>;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,7 +6,7 @@ export declare const PROTO_PATHS: {
6
6
  readonly CATEGORIES: string;
7
7
  readonly SESSION: string;
8
8
  readonly PRESENCE: string;
9
- readonly AD: string;
10
9
  readonly PAYMENT: string;
11
10
  readonly BALANCE: string;
11
+ readonly LISTINGS: string;
12
12
  };
@@ -10,7 +10,7 @@ exports.PROTO_PATHS = {
10
10
  CATEGORIES: (0, path_1.join)(__dirname, "../../proto/categories.proto"),
11
11
  SESSION: (0, path_1.join)(__dirname, "../../proto/session.proto"),
12
12
  PRESENCE: (0, path_1.join)(__dirname, "../../proto/presence.proto"),
13
- AD: (0, path_1.join)(__dirname, "../../proto/ad.proto"),
14
13
  PAYMENT: (0, path_1.join)(__dirname, "../../proto/payment.proto"),
15
14
  BALANCE: (0, path_1.join)(__dirname, "../../proto/balance.proto"),
15
+ LISTINGS: (0, path_1.join)(__dirname, "../../proto/listings.proto"),
16
16
  };
@@ -0,0 +1,131 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.0
4
+ // protoc v3.21.12
5
+ // source: listings.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "listings.v1";
12
+
13
+ /** Статусы объявлений */
14
+ export enum ListingStatus {
15
+ UNSPECIFIED = 0,
16
+ /** DRAFT - Черновик */
17
+ DRAFT = 1,
18
+ /** ACTIVE - Активные */
19
+ ACTIVE = 2,
20
+ /** UNPUBLISHED - Неопубликованные */
21
+ UNPUBLISHED = 3,
22
+ /** WITH_ERRORS - С ошибками */
23
+ WITH_ERRORS = 4,
24
+ /** ARCHIVED - Архив */
25
+ ARCHIVED = 5,
26
+ /** DELETED - Удаленные */
27
+ DELETED = 6,
28
+ /** PENDING_REVIEW - На модерации (внутренний) */
29
+ PENDING_REVIEW = 7,
30
+ /** REJECTED - Отклонено (внутренний) */
31
+ REJECTED = 8,
32
+ /** SUSPENDED - Приостановлено (внутренний) */
33
+ SUSPENDED = 9,
34
+ UNRECOGNIZED = -1,
35
+ }
36
+
37
+ /** Запросы для получения данных */
38
+ export interface GetListingRequest {
39
+ id: string;
40
+ }
41
+
42
+ export interface GetListingsByUserRequest {
43
+ userId: string;
44
+ status?: ListingStatus | undefined;
45
+ }
46
+
47
+ export interface GetListingsByCategoryRequest {
48
+ categoryId: string;
49
+ status?: ListingStatus | undefined;
50
+ }
51
+
52
+ /** Ответы */
53
+ export interface GetListingResponse {
54
+ listing: Listing | undefined;
55
+ }
56
+
57
+ export interface GetListingsByUserResponse {
58
+ listings: Listing[];
59
+ }
60
+
61
+ export interface GetListingsByCategoryResponse {
62
+ listings: Listing[];
63
+ }
64
+
65
+ /** Модели */
66
+ export interface Listing {
67
+ id: string;
68
+ title: string;
69
+ description?: string | undefined;
70
+ price?: number | undefined;
71
+ categoryId: string;
72
+ userId: string;
73
+ latitude?: number | undefined;
74
+ longitude?: number | undefined;
75
+ videoUrl?: string | undefined;
76
+ status: ListingStatus;
77
+ viewsCount: number;
78
+ favoritesCount: number;
79
+ imagesCount: number;
80
+ /** JSON строка */
81
+ attributes: string;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ publishedAt?: string | undefined;
85
+ deletedAt?: string | undefined;
86
+ }
87
+
88
+ export const LISTINGS_V1_PACKAGE_NAME = "listings.v1";
89
+
90
+ export interface ListingsServiceClient {
91
+ /** Получение данных через gRPC */
92
+
93
+ getListing(request: GetListingRequest): Observable<GetListingResponse>;
94
+
95
+ getListingsByUser(request: GetListingsByUserRequest): Observable<GetListingsByUserResponse>;
96
+
97
+ getListingsByCategory(request: GetListingsByCategoryRequest): Observable<GetListingsByCategoryResponse>;
98
+ }
99
+
100
+ export interface ListingsServiceController {
101
+ /** Получение данных через gRPC */
102
+
103
+ getListing(
104
+ request: GetListingRequest,
105
+ ): Promise<GetListingResponse> | Observable<GetListingResponse> | GetListingResponse;
106
+
107
+ getListingsByUser(
108
+ request: GetListingsByUserRequest,
109
+ ): Promise<GetListingsByUserResponse> | Observable<GetListingsByUserResponse> | GetListingsByUserResponse;
110
+
111
+ getListingsByCategory(
112
+ request: GetListingsByCategoryRequest,
113
+ ): Promise<GetListingsByCategoryResponse> | Observable<GetListingsByCategoryResponse> | GetListingsByCategoryResponse;
114
+ }
115
+
116
+ export function ListingsServiceControllerMethods() {
117
+ return function (constructor: Function) {
118
+ const grpcMethods: string[] = ["getListing", "getListingsByUser", "getListingsByCategory"];
119
+ for (const method of grpcMethods) {
120
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
121
+ GrpcMethod("ListingsService", method)(constructor.prototype[method], method, descriptor);
122
+ }
123
+ const grpcStreamMethods: string[] = [];
124
+ for (const method of grpcStreamMethods) {
125
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
126
+ GrpcStreamMethod("ListingsService", method)(constructor.prototype[method], method, descriptor);
127
+ }
128
+ };
129
+ }
130
+
131
+ export const LISTINGS_SERVICE_NAME = "ListingsService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.3.19",
3
+ "version": "1.3.21",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,76 @@
1
+ syntax = "proto3";
2
+
3
+ package listings.v1;
4
+
5
+ import "google/protobuf/empty.proto";
6
+
7
+ service ListingsService {
8
+ // Получение данных через gRPC
9
+ rpc GetListing (GetListingRequest) returns (GetListingResponse);
10
+ rpc GetListingsByUser (GetListingsByUserRequest) returns (GetListingsByUserResponse);
11
+ rpc GetListingsByCategory (GetListingsByCategoryRequest) returns (GetListingsByCategoryResponse);
12
+ }
13
+
14
+ // Запросы для получения данных
15
+ message GetListingRequest {
16
+ string id = 1;
17
+ }
18
+
19
+ message GetListingsByUserRequest {
20
+ string user_id = 1;
21
+ optional ListingStatus status = 2;
22
+ }
23
+
24
+ message GetListingsByCategoryRequest {
25
+ string category_id = 1;
26
+ optional ListingStatus status = 2;
27
+ }
28
+
29
+ // Ответы
30
+ message GetListingResponse {
31
+ Listing listing = 1;
32
+ }
33
+
34
+ message GetListingsByUserResponse {
35
+ repeated Listing listings = 1;
36
+ }
37
+
38
+ message GetListingsByCategoryResponse {
39
+ repeated Listing listings = 1;
40
+ }
41
+
42
+ // Модели
43
+ message Listing {
44
+ string id = 1;
45
+ string title = 2;
46
+ optional string description = 3;
47
+ optional float price = 4;
48
+ string category_id = 5;
49
+ string user_id = 6;
50
+ optional float latitude = 7;
51
+ optional float longitude = 8;
52
+ optional string video_url = 9;
53
+ ListingStatus status = 10;
54
+ int64 views_count = 11;
55
+ int64 favorites_count = 12;
56
+ int32 images_count = 13;
57
+ string attributes = 14; // JSON строка
58
+ string created_at = 15;
59
+ string updated_at = 16;
60
+ optional string published_at = 17;
61
+ optional string deleted_at = 18;
62
+ }
63
+
64
+ // Статусы объявлений
65
+ enum ListingStatus {
66
+ UNSPECIFIED = 0;
67
+ DRAFT = 1; // Черновик
68
+ ACTIVE = 2; // Активные
69
+ UNPUBLISHED = 3; // Неопубликованные
70
+ WITH_ERRORS = 4; // С ошибками
71
+ ARCHIVED = 5; // Архив
72
+ DELETED = 6; // Удаленные
73
+ PENDING_REVIEW = 7; // На модерации (внутренний)
74
+ REJECTED = 8; // Отклонено (внутренний)
75
+ SUSPENDED = 9; // Приостановлено (внутренний)
76
+ }
package/gen/ts/ad.ts DELETED
@@ -1,234 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.0
4
- // protoc v3.21.12
5
- // source: ad.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
-
11
- export const protobufPackage = "ad.v1";
12
-
13
- export enum AdStatus {
14
- AD_STATUS_UNSPECIFIED = 0,
15
- AD_STATUS_DRAFT = 1,
16
- AD_STATUS_MODERATION = 2,
17
- AD_STATUS_ACTIVE = 3,
18
- AD_STATUS_SOLD = 4,
19
- AD_STATUS_ARCHIVED = 5,
20
- AD_STATUS_REJECTED = 6,
21
- UNRECOGNIZED = -1,
22
- }
23
-
24
- export interface CreateAdRequest {
25
- userId: string;
26
- categoryId: string;
27
- title: string;
28
- description?: string | undefined;
29
- price: number;
30
- currency?: string | undefined;
31
- location?: Location | undefined;
32
- attributes?: Attributes | undefined;
33
- imageUrls: string[];
34
- }
35
-
36
- export interface UpdateAdRequest {
37
- id: string;
38
- userId: string;
39
- categoryId?: string | undefined;
40
- title?: string | undefined;
41
- description?: string | undefined;
42
- price?: number | undefined;
43
- currency?: string | undefined;
44
- location?: Location | undefined;
45
- attributes?: Attributes | undefined;
46
- imageUrls: string[];
47
- }
48
-
49
- export interface GetAdRequest {
50
- id: string;
51
- /** для проверки прав доступа */
52
- userId?: string | undefined;
53
- }
54
-
55
- export interface DeleteAdRequest {
56
- id: string;
57
- userId: string;
58
- }
59
-
60
- export interface ListAdsRequest {
61
- categoryId?: string | undefined;
62
- userId?: string | undefined;
63
- status?: AdStatus | undefined;
64
- page: number;
65
- pageSize: number;
66
- minPrice?: number | undefined;
67
- maxPrice?:
68
- | number
69
- | undefined;
70
- /** "created_at", "price", "views" */
71
- sortBy?:
72
- | string
73
- | undefined;
74
- /** "asc", "desc" */
75
- sortOrder?: string | undefined;
76
- }
77
-
78
- export interface GetMyAdsRequest {
79
- userId: string;
80
- status?: AdStatus | undefined;
81
- page: number;
82
- pageSize: number;
83
- }
84
-
85
- export interface PublishAdRequest {
86
- id: string;
87
- userId: string;
88
- }
89
-
90
- export interface ArchiveAdRequest {
91
- id: string;
92
- userId: string;
93
- }
94
-
95
- export interface CreateAdResponse {
96
- ad: Ad | undefined;
97
- }
98
-
99
- export interface GetAdResponse {
100
- ad: Ad | undefined;
101
- }
102
-
103
- export interface UpdateAdResponse {
104
- ad: Ad | undefined;
105
- }
106
-
107
- export interface DeleteAdResponse {
108
- ok: boolean;
109
- }
110
-
111
- export interface ListAdsResponse {
112
- ads: Ad[];
113
- total: number;
114
- page: number;
115
- pageSize: number;
116
- }
117
-
118
- export interface PublishAdResponse {
119
- ad: Ad | undefined;
120
- }
121
-
122
- export interface ArchiveAdResponse {
123
- ad: Ad | undefined;
124
- }
125
-
126
- export interface Ad {
127
- id: string;
128
- userId: string;
129
- categoryId: string;
130
- title: string;
131
- description?: string | undefined;
132
- price: number;
133
- currency: string;
134
- status: AdStatus;
135
- location?: Location | undefined;
136
- attributes?: Attributes | undefined;
137
- images: AdImage[];
138
- views: number;
139
- favorites: number;
140
- promoted: boolean;
141
- promotedUntil?: number | undefined;
142
- createdAt: number;
143
- updatedAt: number;
144
- publishedAt?: number | undefined;
145
- }
146
-
147
- export interface AdImage {
148
- id: string;
149
- url: string;
150
- order: number;
151
- isPrimary: boolean;
152
- }
153
-
154
- export interface Location {
155
- lat: number;
156
- lng: number;
157
- address?: string | undefined;
158
- city?: string | undefined;
159
- region?: string | undefined;
160
- }
161
-
162
- export interface Attributes {
163
- /** key-value пары атрибутов */
164
- values: { [key: string]: string };
165
- }
166
-
167
- export interface Attributes_ValuesEntry {
168
- key: string;
169
- value: string;
170
- }
171
-
172
- export const AD_V1_PACKAGE_NAME = "ad.v1";
173
-
174
- export interface AdServiceClient {
175
- createAd(request: CreateAdRequest): Observable<CreateAdResponse>;
176
-
177
- getAd(request: GetAdRequest): Observable<GetAdResponse>;
178
-
179
- updateAd(request: UpdateAdRequest): Observable<UpdateAdResponse>;
180
-
181
- deleteAd(request: DeleteAdRequest): Observable<DeleteAdResponse>;
182
-
183
- listAds(request: ListAdsRequest): Observable<ListAdsResponse>;
184
-
185
- getMyAds(request: GetMyAdsRequest): Observable<ListAdsResponse>;
186
-
187
- publishAd(request: PublishAdRequest): Observable<PublishAdResponse>;
188
-
189
- archiveAd(request: ArchiveAdRequest): Observable<ArchiveAdResponse>;
190
- }
191
-
192
- export interface AdServiceController {
193
- createAd(request: CreateAdRequest): Promise<CreateAdResponse> | Observable<CreateAdResponse> | CreateAdResponse;
194
-
195
- getAd(request: GetAdRequest): Promise<GetAdResponse> | Observable<GetAdResponse> | GetAdResponse;
196
-
197
- updateAd(request: UpdateAdRequest): Promise<UpdateAdResponse> | Observable<UpdateAdResponse> | UpdateAdResponse;
198
-
199
- deleteAd(request: DeleteAdRequest): Promise<DeleteAdResponse> | Observable<DeleteAdResponse> | DeleteAdResponse;
200
-
201
- listAds(request: ListAdsRequest): Promise<ListAdsResponse> | Observable<ListAdsResponse> | ListAdsResponse;
202
-
203
- getMyAds(request: GetMyAdsRequest): Promise<ListAdsResponse> | Observable<ListAdsResponse> | ListAdsResponse;
204
-
205
- publishAd(request: PublishAdRequest): Promise<PublishAdResponse> | Observable<PublishAdResponse> | PublishAdResponse;
206
-
207
- archiveAd(request: ArchiveAdRequest): Promise<ArchiveAdResponse> | Observable<ArchiveAdResponse> | ArchiveAdResponse;
208
- }
209
-
210
- export function AdServiceControllerMethods() {
211
- return function (constructor: Function) {
212
- const grpcMethods: string[] = [
213
- "createAd",
214
- "getAd",
215
- "updateAd",
216
- "deleteAd",
217
- "listAds",
218
- "getMyAds",
219
- "publishAd",
220
- "archiveAd",
221
- ];
222
- for (const method of grpcMethods) {
223
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
224
- GrpcMethod("AdService", method)(constructor.prototype[method], method, descriptor);
225
- }
226
- const grpcStreamMethods: string[] = [];
227
- for (const method of grpcStreamMethods) {
228
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
229
- GrpcStreamMethod("AdService", method)(constructor.prototype[method], method, descriptor);
230
- }
231
- };
232
- }
233
-
234
- export const AD_SERVICE_NAME = "AdService";
package/proto/ad.proto DELETED
@@ -1,162 +0,0 @@
1
- syntax = "proto3";
2
-
3
- package ad.v1;
4
-
5
- import "google/protobuf/empty.proto";
6
-
7
- service AdService {
8
- rpc CreateAd (CreateAdRequest) returns (CreateAdResponse);
9
- rpc GetAd (GetAdRequest) returns (GetAdResponse);
10
- rpc UpdateAd (UpdateAdRequest) returns (UpdateAdResponse);
11
- rpc DeleteAd (DeleteAdRequest) returns (DeleteAdResponse);
12
- rpc ListAds (ListAdsRequest) returns (ListAdsResponse);
13
- rpc GetMyAds (GetMyAdsRequest) returns (ListAdsResponse);
14
- rpc PublishAd (PublishAdRequest) returns (PublishAdResponse);
15
- rpc ArchiveAd (ArchiveAdRequest) returns (ArchiveAdResponse);
16
- }
17
-
18
- enum AdStatus {
19
- AD_STATUS_UNSPECIFIED = 0;
20
- AD_STATUS_DRAFT = 1;
21
- AD_STATUS_MODERATION = 2;
22
- AD_STATUS_ACTIVE = 3;
23
- AD_STATUS_SOLD = 4;
24
- AD_STATUS_ARCHIVED = 5;
25
- AD_STATUS_REJECTED = 6;
26
- }
27
-
28
- message CreateAdRequest {
29
- string user_id = 1;
30
- string category_id = 2;
31
- string title = 3;
32
- optional string description = 4;
33
- double price = 5;
34
- optional string currency = 6;
35
- optional Location location = 7;
36
- optional Attributes attributes = 8;
37
- repeated string image_urls = 9;
38
- }
39
-
40
- message UpdateAdRequest {
41
- string id = 1;
42
- string user_id = 2;
43
- optional string category_id = 3;
44
- optional string title = 4;
45
- optional string description = 5;
46
- optional double price = 6;
47
- optional string currency = 7;
48
- optional Location location = 8;
49
- optional Attributes attributes = 9;
50
- repeated string image_urls = 10;
51
- }
52
-
53
- message GetAdRequest {
54
- string id = 1;
55
- optional string user_id = 2; // для проверки прав доступа
56
- }
57
-
58
- message DeleteAdRequest {
59
- string id = 1;
60
- string user_id = 2;
61
- }
62
-
63
- message ListAdsRequest {
64
- optional string category_id = 1;
65
- optional string user_id = 2;
66
- optional AdStatus status = 3;
67
- int32 page = 4;
68
- int32 page_size = 5;
69
- optional double min_price = 6;
70
- optional double max_price = 7;
71
- optional string sort_by = 8; // "created_at", "price", "views"
72
- optional string sort_order = 9; // "asc", "desc"
73
- }
74
-
75
- message GetMyAdsRequest {
76
- string user_id = 1;
77
- optional AdStatus status = 2;
78
- int32 page = 3;
79
- int32 page_size = 4;
80
- }
81
-
82
- message PublishAdRequest {
83
- string id = 1;
84
- string user_id = 2;
85
- }
86
-
87
- message ArchiveAdRequest {
88
- string id = 1;
89
- string user_id = 2;
90
- }
91
-
92
- message CreateAdResponse {
93
- Ad ad = 1;
94
- }
95
-
96
- message GetAdResponse {
97
- Ad ad = 1;
98
- }
99
-
100
- message UpdateAdResponse {
101
- Ad ad = 1;
102
- }
103
-
104
- message DeleteAdResponse {
105
- bool ok = 1;
106
- }
107
-
108
- message ListAdsResponse {
109
- repeated Ad ads = 1;
110
- int32 total = 2;
111
- int32 page = 3;
112
- int32 page_size = 4;
113
- }
114
-
115
- message PublishAdResponse {
116
- Ad ad = 1;
117
- }
118
-
119
- message ArchiveAdResponse {
120
- Ad ad = 1;
121
- }
122
-
123
- message Ad {
124
- string id = 1;
125
- string user_id = 2;
126
- string category_id = 3;
127
- string title = 4;
128
- optional string description = 5;
129
- double price = 6;
130
- string currency = 7;
131
- AdStatus status = 8;
132
- optional Location location = 9;
133
- optional Attributes attributes = 10;
134
- repeated AdImage images = 11;
135
- int32 views = 12;
136
- int32 favorites = 13;
137
- bool promoted = 14;
138
- optional int64 promoted_until = 15;
139
- int64 created_at = 16;
140
- int64 updated_at = 17;
141
- optional int64 published_at = 18;
142
- }
143
-
144
- message AdImage {
145
- string id = 1;
146
- string url = 2;
147
- int32 order = 3;
148
- bool is_primary = 4;
149
- }
150
-
151
- message Location {
152
- double lat = 1;
153
- double lng = 2;
154
- optional string address = 3;
155
- optional string city = 4;
156
- optional string region = 5;
157
- }
158
-
159
- message Attributes {
160
- map<string, string> values = 1; // key-value пары атрибутов
161
- }
162
-