@barumetric/contracts 1.2.4 → 1.2.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.
- package/gen/ts/auth.ts +24 -0
- package/gen/ts/categories.ts +4 -41
- package/package.json +1 -1
- package/proto/auth.proto +24 -0
- package/proto/categories.proto +17 -29
package/gen/ts/auth.ts
CHANGED
|
@@ -24,11 +24,33 @@ export interface VerifyOtpRequest {
|
|
|
24
24
|
identifier: string;
|
|
25
25
|
type: string;
|
|
26
26
|
code: string;
|
|
27
|
+
sessionMetadata: SessionMetadata | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface SessionMetadata {
|
|
31
|
+
location: LocationInfo | undefined;
|
|
32
|
+
device: DeviceInfo | undefined;
|
|
33
|
+
ip: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface LocationInfo {
|
|
37
|
+
country: string;
|
|
38
|
+
city: string;
|
|
39
|
+
latidute: number;
|
|
40
|
+
longitude: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface DeviceInfo {
|
|
44
|
+
browser: string;
|
|
45
|
+
os: string;
|
|
46
|
+
type: string;
|
|
27
47
|
}
|
|
28
48
|
|
|
29
49
|
export interface VerifyOtpResponse {
|
|
30
50
|
accessToken: string;
|
|
31
51
|
refreshToken: string;
|
|
52
|
+
sessionToken: string;
|
|
53
|
+
userId: string;
|
|
32
54
|
}
|
|
33
55
|
|
|
34
56
|
export interface RefreshRequest {
|
|
@@ -38,6 +60,8 @@ export interface RefreshRequest {
|
|
|
38
60
|
export interface RefreshResponse {
|
|
39
61
|
accessToken: string;
|
|
40
62
|
refreshToken: string;
|
|
63
|
+
sessionToken: string;
|
|
64
|
+
userId: string;
|
|
41
65
|
}
|
|
42
66
|
|
|
43
67
|
export interface TelegramInitResponse {
|
package/gen/ts/categories.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { Empty } from "./google/protobuf/empty";
|
|
|
11
11
|
|
|
12
12
|
export const protobufPackage = "categories.v1";
|
|
13
13
|
|
|
14
|
-
/** Типы атрибутов */
|
|
15
14
|
export enum AttributeType {
|
|
16
15
|
ATTRIBUTE_TYPE_UNSPECIFIED = 0,
|
|
17
16
|
ATTRIBUTE_TYPE_STRING = 1,
|
|
@@ -28,16 +27,13 @@ export enum AttributeType {
|
|
|
28
27
|
|
|
29
28
|
export interface GetCategoryRequest {
|
|
30
29
|
id: string;
|
|
31
|
-
/** Включить атрибуты */
|
|
32
30
|
includeAttributes: boolean;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
export interface GetCategoryAttributesRequest {
|
|
36
|
-
|
|
37
|
-
categoryId: string;
|
|
34
|
+
id: string;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
/** Ответы */
|
|
41
37
|
export interface GetAllCategoriesResponse {
|
|
42
38
|
categories: Category[];
|
|
43
39
|
}
|
|
@@ -64,44 +60,23 @@ export interface Category {
|
|
|
64
60
|
path: string;
|
|
65
61
|
depth: number;
|
|
66
62
|
adsCount: number;
|
|
67
|
-
/** Для дерева */
|
|
68
63
|
children: Category[];
|
|
69
|
-
/** Если include_attributes = true */
|
|
70
64
|
attributes: CategoryAttribute[];
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
export interface CategoryAttribute {
|
|
74
|
-
/** ID CategoryAttribute (связи) */
|
|
75
68
|
id: string;
|
|
76
|
-
/** ID категории */
|
|
77
69
|
categoryId: string;
|
|
78
|
-
/** Название из глобального Attribute */
|
|
79
70
|
name: string;
|
|
80
|
-
/** Ключ из глобального Attribute */
|
|
81
71
|
key: string;
|
|
82
|
-
/** Тип из глобального Attribute */
|
|
83
72
|
type: AttributeType;
|
|
84
|
-
/** Финальное значение (override или default из Attribute) */
|
|
85
73
|
isRequired: boolean;
|
|
86
|
-
/** Финальное значение (override или default из Attribute) */
|
|
87
74
|
isFilterable: boolean;
|
|
88
|
-
/** Наследуется ли дочерним категориям */
|
|
89
75
|
inherited: boolean;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| undefined;
|
|
94
|
-
/** Минимальное значение из глобального Attribute */
|
|
95
|
-
minValue?:
|
|
96
|
-
| number
|
|
97
|
-
| undefined;
|
|
98
|
-
/** Максимальное значение из глобального Attribute */
|
|
99
|
-
maxValue?:
|
|
100
|
-
| number
|
|
101
|
-
| undefined;
|
|
102
|
-
/** Порядок сортировки в категории */
|
|
76
|
+
unit?: string | undefined;
|
|
77
|
+
minValue?: number | undefined;
|
|
78
|
+
maxValue?: number | undefined;
|
|
103
79
|
sortOrder: number;
|
|
104
|
-
/** Значения из глобального Attribute */
|
|
105
80
|
enumValues: EnumValue[];
|
|
106
81
|
}
|
|
107
82
|
|
|
@@ -121,34 +96,22 @@ export interface EnumValueInput {
|
|
|
121
96
|
export const CATEGORIES_V1_PACKAGE_NAME = "categories.v1";
|
|
122
97
|
|
|
123
98
|
export interface CategoriesServiceClient {
|
|
124
|
-
/** Получить все категории */
|
|
125
|
-
|
|
126
99
|
getAllCategories(request: Empty): Observable<GetAllCategoriesResponse>;
|
|
127
100
|
|
|
128
|
-
/** Получить категорию по ID */
|
|
129
|
-
|
|
130
101
|
getCategory(request: GetCategoryRequest): Observable<GetCategoryResponse>;
|
|
131
102
|
|
|
132
|
-
/** Получить атрибуты категории (для фильтрации) */
|
|
133
|
-
|
|
134
103
|
getCategoryAttributes(request: GetCategoryAttributesRequest): Observable<GetCategoryAttributesResponse>;
|
|
135
104
|
}
|
|
136
105
|
|
|
137
106
|
export interface CategoriesServiceController {
|
|
138
|
-
/** Получить все категории */
|
|
139
|
-
|
|
140
107
|
getAllCategories(
|
|
141
108
|
request: Empty,
|
|
142
109
|
): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
|
|
143
110
|
|
|
144
|
-
/** Получить категорию по ID */
|
|
145
|
-
|
|
146
111
|
getCategory(
|
|
147
112
|
request: GetCategoryRequest,
|
|
148
113
|
): Promise<GetCategoryResponse> | Observable<GetCategoryResponse> | GetCategoryResponse;
|
|
149
114
|
|
|
150
|
-
/** Получить атрибуты категории (для фильтрации) */
|
|
151
|
-
|
|
152
115
|
getCategoryAttributes(
|
|
153
116
|
request: GetCategoryAttributesRequest,
|
|
154
117
|
): Promise<GetCategoryAttributesResponse> | Observable<GetCategoryAttributesResponse> | GetCategoryAttributesResponse;
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -28,11 +28,33 @@ message VerifyOtpRequest {
|
|
|
28
28
|
string identifier = 1;
|
|
29
29
|
string type = 2;
|
|
30
30
|
string code = 3;
|
|
31
|
+
SessionMetadata session_metadata = 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message SessionMetadata {
|
|
35
|
+
LocationInfo location = 1;
|
|
36
|
+
DeviceInfo device = 2;
|
|
37
|
+
string ip = 3;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message LocationInfo {
|
|
41
|
+
string country = 1;
|
|
42
|
+
string city = 2;
|
|
43
|
+
int32 latidute = 3;
|
|
44
|
+
int32 longitude = 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message DeviceInfo {
|
|
48
|
+
string browser = 1;
|
|
49
|
+
string os = 2;
|
|
50
|
+
string type = 3;
|
|
31
51
|
}
|
|
32
52
|
|
|
33
53
|
message VerifyOtpResponse {
|
|
34
54
|
string access_token = 1;
|
|
35
55
|
string refresh_token = 2;
|
|
56
|
+
string session_token = 3;
|
|
57
|
+
string user_id = 4;
|
|
36
58
|
}
|
|
37
59
|
|
|
38
60
|
message RefreshRequest {
|
|
@@ -42,6 +64,8 @@ message RefreshRequest {
|
|
|
42
64
|
message RefreshResponse {
|
|
43
65
|
string access_token = 1;
|
|
44
66
|
string refresh_token = 2;
|
|
67
|
+
string session_token = 3;
|
|
68
|
+
string user_id = 4;
|
|
45
69
|
}
|
|
46
70
|
|
|
47
71
|
message TelegramInitResponse {
|
package/proto/categories.proto
CHANGED
|
@@ -5,26 +5,20 @@ package categories.v1;
|
|
|
5
5
|
import "google/protobuf/empty.proto";
|
|
6
6
|
|
|
7
7
|
service CategoriesService {
|
|
8
|
-
// Получить все категории
|
|
9
8
|
rpc GetAllCategories (google.protobuf.Empty) returns (GetAllCategoriesResponse);
|
|
10
|
-
|
|
11
|
-
// Получить категорию по ID
|
|
12
9
|
rpc GetCategory (GetCategoryRequest) returns (GetCategoryResponse);
|
|
13
|
-
|
|
14
|
-
// Получить атрибуты категории (для фильтрации)
|
|
15
10
|
rpc GetCategoryAttributes (GetCategoryAttributesRequest) returns (GetCategoryAttributesResponse);
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
message GetCategoryRequest {
|
|
19
14
|
string id = 1;
|
|
20
|
-
bool include_attributes = 2;
|
|
15
|
+
bool include_attributes = 2;
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
message GetCategoryAttributesRequest {
|
|
24
|
-
string
|
|
19
|
+
string id = 1;
|
|
25
20
|
}
|
|
26
21
|
|
|
27
|
-
// Ответы
|
|
28
22
|
message GetAllCategoriesResponse {
|
|
29
23
|
repeated Category categories = 1;
|
|
30
24
|
}
|
|
@@ -37,8 +31,6 @@ message GetCategoryAttributesResponse {
|
|
|
37
31
|
repeated CategoryAttribute attributes = 1;
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
// Модели
|
|
41
|
-
|
|
42
34
|
message Category {
|
|
43
35
|
string id = 1;
|
|
44
36
|
string name = 2;
|
|
@@ -53,24 +45,24 @@ message Category {
|
|
|
53
45
|
string path = 11;
|
|
54
46
|
int32 depth = 12;
|
|
55
47
|
int64 ads_count = 13;
|
|
56
|
-
repeated Category children = 14;
|
|
57
|
-
repeated CategoryAttribute attributes = 15;
|
|
48
|
+
repeated Category children = 14;
|
|
49
|
+
repeated CategoryAttribute attributes = 15;
|
|
58
50
|
}
|
|
59
51
|
|
|
60
52
|
message CategoryAttribute {
|
|
61
|
-
string id = 1;
|
|
62
|
-
string category_id = 2;
|
|
63
|
-
string name = 3;
|
|
64
|
-
string key = 4;
|
|
65
|
-
AttributeType type = 5;
|
|
66
|
-
bool is_required = 6;
|
|
67
|
-
bool is_filterable = 7;
|
|
68
|
-
bool inherited = 8;
|
|
69
|
-
optional string unit = 9;
|
|
70
|
-
optional float min_value = 10;
|
|
71
|
-
optional float max_value = 11;
|
|
72
|
-
int32 sort_order = 12;
|
|
73
|
-
repeated EnumValue enum_values = 13;
|
|
53
|
+
string id = 1;
|
|
54
|
+
string category_id = 2;
|
|
55
|
+
string name = 3;
|
|
56
|
+
string key = 4;
|
|
57
|
+
AttributeType type = 5;
|
|
58
|
+
bool is_required = 6;
|
|
59
|
+
bool is_filterable = 7;
|
|
60
|
+
bool inherited = 8;
|
|
61
|
+
optional string unit = 9;
|
|
62
|
+
optional float min_value = 10;
|
|
63
|
+
optional float max_value = 11;
|
|
64
|
+
int32 sort_order = 12;
|
|
65
|
+
repeated EnumValue enum_values = 13;
|
|
74
66
|
}
|
|
75
67
|
|
|
76
68
|
message EnumValue {
|
|
@@ -86,7 +78,6 @@ message EnumValueInput {
|
|
|
86
78
|
int32 sort_order = 3;
|
|
87
79
|
}
|
|
88
80
|
|
|
89
|
-
// Типы атрибутов
|
|
90
81
|
enum AttributeType {
|
|
91
82
|
ATTRIBUTE_TYPE_UNSPECIFIED = 0;
|
|
92
83
|
ATTRIBUTE_TYPE_STRING = 1;
|
|
@@ -99,6 +90,3 @@ enum AttributeType {
|
|
|
99
90
|
ATTRIBUTE_TYPE_RANGE = 8;
|
|
100
91
|
ATTRIBUTE_TYPE_DATE = 9;
|
|
101
92
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|