@mamindom/contracts 1.0.142 → 1.0.144

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.
@@ -114,6 +114,21 @@ export interface SuggestSeoFilterCandidate {
114
114
  export interface SuggestSeoFiltersResponse {
115
115
  items: SuggestSeoFilterCandidate[];
116
116
  }
117
+ export interface ListIndexedForSitemapRequest {
118
+ /** Опційний фільтр — для cursor-pagination якщо записів стане багато. */
119
+ limit?: number | undefined;
120
+ afterId?: string | undefined;
121
+ }
122
+ export interface SitemapEntry {
123
+ id: string;
124
+ categorySlug: string;
125
+ urlSegments: LocaleStrings | undefined;
126
+ updatedAt: number;
127
+ }
128
+ export interface ListIndexedForSitemapResponse {
129
+ items: SitemapEntry[];
130
+ nextAfterId?: string | undefined;
131
+ }
117
132
  export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
118
133
  /** ─── Public ────────────────────────────────────────────────────────────── */
119
134
  export interface SeoFilterServiceClient {
@@ -133,6 +148,11 @@ export interface SeoFilterServiceClient {
133
148
  * швидкого створення SeoFilter з адмін-форми "Автопідказки".
134
149
  */
135
150
  suggestSeoFilters(request: SuggestSeoFiltersRequest): Observable<SuggestSeoFiltersResponse>;
151
+ /**
152
+ * Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
153
+ * Повертає одночасно uk+ru сегменти (denormalized) + category slug.
154
+ */
155
+ listIndexedForSitemap(request: ListIndexedForSitemapRequest): Observable<ListIndexedForSitemapResponse>;
136
156
  }
137
157
  /** ─── Public ────────────────────────────────────────────────────────────── */
138
158
  export interface SeoFilterServiceController {
@@ -152,6 +172,11 @@ export interface SeoFilterServiceController {
152
172
  * швидкого створення SeoFilter з адмін-форми "Автопідказки".
153
173
  */
154
174
  suggestSeoFilters(request: SuggestSeoFiltersRequest): Promise<SuggestSeoFiltersResponse> | Observable<SuggestSeoFiltersResponse> | SuggestSeoFiltersResponse;
175
+ /**
176
+ * Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
177
+ * Повертає одночасно uk+ru сегменти (denormalized) + category slug.
178
+ */
179
+ listIndexedForSitemap(request: ListIndexedForSitemapRequest): Promise<ListIndexedForSitemapResponse> | Observable<ListIndexedForSitemapResponse> | ListIndexedForSitemapResponse;
155
180
  }
156
181
  export declare function SeoFilterServiceControllerMethods(): (constructor: Function) => void;
157
182
  export declare const SEO_FILTER_SERVICE_NAME = "SeoFilterService";
@@ -21,6 +21,7 @@ function SeoFilterServiceControllerMethods() {
21
21
  "updateSeoFilter",
22
22
  "deleteSeoFilter",
23
23
  "suggestSeoFilters",
24
+ "listIndexedForSitemap",
24
25
  ];
25
26
  for (const method of grpcMethods) {
26
27
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -34,12 +34,19 @@ export interface ShopFilterOption {
34
34
  value: string;
35
35
  label: string;
36
36
  count: number;
37
+ /**
38
+ * slug ОПЦІЙНИЙ — потрібен для побудови ЧПУ-URL фільтрами
39
+ * (brend-<slug>, kolir-<slug>, rozmir-<slug>). Якщо slug ще не
40
+ * згенеровано через backfill — пусто, frontend fallback на id.
41
+ */
42
+ slug?: string | undefined;
37
43
  }
38
44
  export interface ShopFilterColorOption {
39
45
  value: string;
40
46
  label: string;
41
47
  hex: string;
42
48
  count: number;
49
+ slug?: string | undefined;
43
50
  }
44
51
  export interface ShopFilterAttribute {
45
52
  slug: string;
@@ -24,6 +24,10 @@ service SeoFilterService {
24
24
  // Топ-N непокритих combinations (за impressions/popularity) — для
25
25
  // швидкого створення SeoFilter з адмін-форми "Автопідказки".
26
26
  rpc SuggestSeoFilters (SuggestSeoFiltersRequest) returns (SuggestSeoFiltersResponse);
27
+
28
+ // Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
29
+ // Повертає одночасно uk+ru сегменти (denormalized) + category slug.
30
+ rpc ListIndexedForSitemap (ListIndexedForSitemapRequest) returns (ListIndexedForSitemapResponse);
27
31
  }
28
32
 
29
33
  // ─────────────────────────── Domain types ────────────────────────────────
@@ -152,3 +156,23 @@ message SuggestSeoFilterCandidate {
152
156
  message SuggestSeoFiltersResponse {
153
157
  repeated SuggestSeoFilterCandidate items = 1;
154
158
  }
159
+
160
+ // ─────────────────────────── Sitemap (public) ────────────────────────────
161
+
162
+ message ListIndexedForSitemapRequest {
163
+ // Опційний фільтр — для cursor-pagination якщо записів стане багато.
164
+ optional int32 limit = 1;
165
+ optional string after_id = 2;
166
+ }
167
+
168
+ message SitemapEntry {
169
+ string id = 1;
170
+ string category_slug = 2;
171
+ LocaleStrings url_segments = 3;
172
+ int64 updated_at = 4;
173
+ }
174
+
175
+ message ListIndexedForSitemapResponse {
176
+ repeated SitemapEntry items = 1;
177
+ optional string next_after_id = 2;
178
+ }
@@ -60,6 +60,10 @@ message ShopFilterOption {
60
60
  string value = 1;
61
61
  string label = 2;
62
62
  int32 count = 3;
63
+ // slug ОПЦІЙНИЙ — потрібен для побудови ЧПУ-URL фільтрами
64
+ // (brend-<slug>, kolir-<slug>, rozmir-<slug>). Якщо slug ще не
65
+ // згенеровано через backfill — пусто, frontend fallback на id.
66
+ optional string slug = 4;
63
67
  }
64
68
 
65
69
  message ShopFilterColorOption {
@@ -67,6 +71,7 @@ message ShopFilterColorOption {
67
71
  string label = 2;
68
72
  string hex = 3;
69
73
  int32 count = 4;
74
+ optional string slug = 5;
70
75
  }
71
76
 
72
77
  message ShopFilterAttribute {
package/gen/seo_filter.ts CHANGED
@@ -144,6 +144,24 @@ export interface SuggestSeoFiltersResponse {
144
144
  items: SuggestSeoFilterCandidate[];
145
145
  }
146
146
 
147
+ export interface ListIndexedForSitemapRequest {
148
+ /** Опційний фільтр — для cursor-pagination якщо записів стане багато. */
149
+ limit?: number | undefined;
150
+ afterId?: string | undefined;
151
+ }
152
+
153
+ export interface SitemapEntry {
154
+ id: string;
155
+ categorySlug: string;
156
+ urlSegments: LocaleStrings | undefined;
157
+ updatedAt: number;
158
+ }
159
+
160
+ export interface ListIndexedForSitemapResponse {
161
+ items: SitemapEntry[];
162
+ nextAfterId?: string | undefined;
163
+ }
164
+
147
165
  export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
148
166
 
149
167
  /** ─── Public ────────────────────────────────────────────────────────────── */
@@ -173,6 +191,13 @@ export interface SeoFilterServiceClient {
173
191
  */
174
192
 
175
193
  suggestSeoFilters(request: SuggestSeoFiltersRequest): Observable<SuggestSeoFiltersResponse>;
194
+
195
+ /**
196
+ * Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
197
+ * Повертає одночасно uk+ru сегменти (denormalized) + category slug.
198
+ */
199
+
200
+ listIndexedForSitemap(request: ListIndexedForSitemapRequest): Observable<ListIndexedForSitemapResponse>;
176
201
  }
177
202
 
178
203
  /** ─── Public ────────────────────────────────────────────────────────────── */
@@ -216,6 +241,15 @@ export interface SeoFilterServiceController {
216
241
  suggestSeoFilters(
217
242
  request: SuggestSeoFiltersRequest,
218
243
  ): Promise<SuggestSeoFiltersResponse> | Observable<SuggestSeoFiltersResponse> | SuggestSeoFiltersResponse;
244
+
245
+ /**
246
+ * Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
247
+ * Повертає одночасно uk+ru сегменти (denormalized) + category slug.
248
+ */
249
+
250
+ listIndexedForSitemap(
251
+ request: ListIndexedForSitemapRequest,
252
+ ): Promise<ListIndexedForSitemapResponse> | Observable<ListIndexedForSitemapResponse> | ListIndexedForSitemapResponse;
219
253
  }
220
254
 
221
255
  export function SeoFilterServiceControllerMethods() {
@@ -228,6 +262,7 @@ export function SeoFilterServiceControllerMethods() {
228
262
  "updateSeoFilter",
229
263
  "deleteSeoFilter",
230
264
  "suggestSeoFilters",
265
+ "listIndexedForSitemap",
231
266
  ];
232
267
  for (const method of grpcMethods) {
233
268
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -47,6 +47,12 @@ export interface ShopFilterOption {
47
47
  value: string;
48
48
  label: string;
49
49
  count: number;
50
+ /**
51
+ * slug ОПЦІЙНИЙ — потрібен для побудови ЧПУ-URL фільтрами
52
+ * (brend-<slug>, kolir-<slug>, rozmir-<slug>). Якщо slug ще не
53
+ * згенеровано через backfill — пусто, frontend fallback на id.
54
+ */
55
+ slug?: string | undefined;
50
56
  }
51
57
 
52
58
  export interface ShopFilterColorOption {
@@ -54,6 +60,7 @@ export interface ShopFilterColorOption {
54
60
  label: string;
55
61
  hex: string;
56
62
  count: number;
63
+ slug?: string | undefined;
57
64
  }
58
65
 
59
66
  export interface ShopFilterAttribute {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.142",
4
+ "version": "1.0.144",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -24,6 +24,10 @@ service SeoFilterService {
24
24
  // Топ-N непокритих combinations (за impressions/popularity) — для
25
25
  // швидкого створення SeoFilter з адмін-форми "Автопідказки".
26
26
  rpc SuggestSeoFilters (SuggestSeoFiltersRequest) returns (SuggestSeoFiltersResponse);
27
+
28
+ // Список усіх індексованих SeoFilter URL — для побудови sitemap.xml.
29
+ // Повертає одночасно uk+ru сегменти (denormalized) + category slug.
30
+ rpc ListIndexedForSitemap (ListIndexedForSitemapRequest) returns (ListIndexedForSitemapResponse);
27
31
  }
28
32
 
29
33
  // ─────────────────────────── Domain types ────────────────────────────────
@@ -152,3 +156,23 @@ message SuggestSeoFilterCandidate {
152
156
  message SuggestSeoFiltersResponse {
153
157
  repeated SuggestSeoFilterCandidate items = 1;
154
158
  }
159
+
160
+ // ─────────────────────────── Sitemap (public) ────────────────────────────
161
+
162
+ message ListIndexedForSitemapRequest {
163
+ // Опційний фільтр — для cursor-pagination якщо записів стане багато.
164
+ optional int32 limit = 1;
165
+ optional string after_id = 2;
166
+ }
167
+
168
+ message SitemapEntry {
169
+ string id = 1;
170
+ string category_slug = 2;
171
+ LocaleStrings url_segments = 3;
172
+ int64 updated_at = 4;
173
+ }
174
+
175
+ message ListIndexedForSitemapResponse {
176
+ repeated SitemapEntry items = 1;
177
+ optional string next_after_id = 2;
178
+ }
@@ -60,6 +60,10 @@ message ShopFilterOption {
60
60
  string value = 1;
61
61
  string label = 2;
62
62
  int32 count = 3;
63
+ // slug ОПЦІЙНИЙ — потрібен для побудови ЧПУ-URL фільтрами
64
+ // (brend-<slug>, kolir-<slug>, rozmir-<slug>). Якщо slug ще не
65
+ // згенеровано через backfill — пусто, frontend fallback на id.
66
+ optional string slug = 4;
63
67
  }
64
68
 
65
69
  message ShopFilterColorOption {
@@ -67,6 +71,7 @@ message ShopFilterColorOption {
67
71
  string label = 2;
68
72
  string hex = 3;
69
73
  int32 count = 4;
74
+ optional string slug = 5;
70
75
  }
71
76
 
72
77
  message ShopFilterAttribute {