@mamindom/contracts 1.0.144 → 1.0.146

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.
Files changed (96) hide show
  1. package/dist/gen/attribute.d.ts +40 -0
  2. package/dist/gen/attribute.js +1 -0
  3. package/dist/gen/brand.d.ts +19 -0
  4. package/dist/gen/brand.js +8 -1
  5. package/dist/gen/bundle.d.ts +0 -2
  6. package/dist/gen/cart.d.ts +0 -28
  7. package/dist/gen/category.d.ts +26 -0
  8. package/dist/gen/category.js +1 -0
  9. package/dist/gen/delivery.d.ts +0 -1
  10. package/dist/gen/delivery_settings.d.ts +0 -4
  11. package/dist/gen/faq.d.ts +0 -6
  12. package/dist/gen/manager.d.ts +0 -12
  13. package/dist/gen/notification.d.ts +0 -71
  14. package/dist/gen/order.d.ts +0 -29
  15. package/dist/gen/page.d.ts +0 -5
  16. package/dist/gen/payment.d.ts +0 -22
  17. package/dist/gen/pickup.d.ts +0 -9
  18. package/dist/gen/product.d.ts +108 -11
  19. package/dist/gen/product.js +5 -0
  20. package/dist/gen/promotion.d.ts +0 -16
  21. package/dist/gen/rbac.d.ts +0 -16
  22. package/dist/gen/search.d.ts +0 -14
  23. package/dist/gen/seo_filter.d.ts +0 -57
  24. package/dist/gen/shop_filters.d.ts +0 -5
  25. package/dist/gen/users.d.ts +0 -9
  26. package/dist/gen/warehouse.d.ts +34 -0
  27. package/dist/gen/warehouse.js +28 -0
  28. package/dist/proto/attribute.proto +35 -0
  29. package/dist/proto/brand.proto +25 -0
  30. package/dist/proto/bundle.proto +2 -2
  31. package/dist/proto/cart.proto +5 -14
  32. package/dist/proto/category.proto +26 -0
  33. package/dist/proto/delivery.proto +1 -6
  34. package/dist/proto/delivery_settings.proto +4 -4
  35. package/dist/proto/faq.proto +3 -10
  36. package/dist/proto/manager.proto +3 -5
  37. package/dist/proto/notification.proto +33 -56
  38. package/dist/proto/order.proto +9 -21
  39. package/dist/proto/page.proto +1 -3
  40. package/dist/proto/payment.proto +8 -14
  41. package/dist/proto/pickup.proto +7 -9
  42. package/dist/proto/product.proto +144 -34
  43. package/dist/proto/promotion.proto +9 -22
  44. package/dist/proto/rbac.proto +7 -9
  45. package/dist/proto/search.proto +10 -14
  46. package/dist/proto/seo_filter.proto +17 -36
  47. package/dist/proto/shop_filters.proto +1 -3
  48. package/dist/proto/users.proto +5 -8
  49. package/dist/proto/warehouse.proto +38 -0
  50. package/dist/src/proto/paths.d.ts +1 -0
  51. package/dist/src/proto/paths.js +1 -0
  52. package/gen/attribute.ts +48 -0
  53. package/gen/brand.ts +35 -1
  54. package/gen/bundle.ts +1 -5
  55. package/gen/cart.ts +1 -35
  56. package/gen/category.ts +34 -0
  57. package/gen/delivery.ts +0 -1
  58. package/gen/delivery_settings.ts +0 -4
  59. package/gen/faq.ts +0 -12
  60. package/gen/manager.ts +1 -17
  61. package/gen/notification.ts +5 -98
  62. package/gen/order.ts +0 -33
  63. package/gen/page.ts +0 -5
  64. package/gen/payment.ts +0 -34
  65. package/gen/pickup.ts +2 -19
  66. package/gen/product.ts +148 -28
  67. package/gen/promotion.ts +3 -33
  68. package/gen/rbac.ts +1 -25
  69. package/gen/search.ts +0 -22
  70. package/gen/seo_filter.ts +3 -74
  71. package/gen/shop_filters.ts +0 -5
  72. package/gen/users.ts +1 -20
  73. package/gen/warehouse.ts +67 -0
  74. package/package.json +1 -1
  75. package/proto/attribute.proto +35 -0
  76. package/proto/brand.proto +25 -0
  77. package/proto/bundle.proto +2 -2
  78. package/proto/cart.proto +5 -14
  79. package/proto/category.proto +26 -0
  80. package/proto/delivery.proto +1 -6
  81. package/proto/delivery_settings.proto +4 -4
  82. package/proto/faq.proto +3 -10
  83. package/proto/manager.proto +3 -5
  84. package/proto/notification.proto +33 -56
  85. package/proto/order.proto +9 -21
  86. package/proto/page.proto +1 -3
  87. package/proto/payment.proto +8 -14
  88. package/proto/pickup.proto +7 -9
  89. package/proto/product.proto +144 -34
  90. package/proto/promotion.proto +9 -22
  91. package/proto/rbac.proto +7 -9
  92. package/proto/search.proto +10 -14
  93. package/proto/seo_filter.proto +17 -36
  94. package/proto/shop_filters.proto +1 -3
  95. package/proto/users.proto +5 -8
  96. package/proto/warehouse.proto +38 -0
@@ -3,8 +3,6 @@ syntax = "proto3";
3
3
  package notification.v1;
4
4
 
5
5
 
6
- // Admin API для керування шаблонами нотифікацій, Telegram-чатами,
7
- // надсилання test-пакета, перегляду логів.
8
6
 
9
7
  service NotificationTemplateService {
10
8
  rpc ListTemplates (ListTemplatesRequest) returns (ListTemplatesResponse);
@@ -16,41 +14,38 @@ service NotificationTemplateService {
16
14
  rpc RestoreVersion (RestoreVersionRequest) returns (TemplateResponse);
17
15
  rpc RenderPreview (RenderPreviewRequest) returns (RenderPreviewResponse);
18
16
  rpc SendTest (SendTestRequest) returns (SendTestResponse);
19
- // Реальна відправка клієнту з адмінки — або по шаблону, або ad-hoc body.
17
+
20
18
  rpc SendToCustomer (SendToCustomerRequest) returns (SendToCustomerResponse);
21
19
  }
22
20
 
23
- // SendToCustomer — викликається з gateway після того, як клієнтський контакт
24
- // (email/phone) вже резолвнений і опційно згенерований персональний купон.
21
+
25
22
  message SendToCustomerRequest {
26
- // userId з auth-service — пишемо в NotificationLog.user_id для зведень.
23
+
27
24
  string user_id = 1;
28
25
  NotificationChannel channel = 2;
29
26
 
30
- // Recipient — email або phone, заздалегідь визначені gateway з акаунта.
27
+
31
28
  string recipient = 3;
32
29
 
33
- // Шлях 1: templateId — рендеримо існуючий шаблон з variables.
30
+
34
31
  optional string template_id = 4;
35
32
 
36
- // Шлях 2: ad-hoc контент. Якщо template_id порожній — використовуємо ці поля.
37
- // body_html — для EMAIL (буде обгорнутий брендингом).
38
- // body_text — для SMS (plain text) або текстова версія email.
33
+
39
34
  optional string custom_subject = 5;
40
35
  optional string custom_body_html = 6;
41
36
  optional string custom_body_text = 7;
42
37
 
43
- // JSON з placeholders для Handlebars: { "coupon_code": "...", ... }
38
+
44
39
  string variables_json = 8;
45
40
 
46
- // Locale для пошуку версії шаблону + надсилання branding-обгортки.
41
+
47
42
  optional NotificationLocale locale = 9;
48
43
  }
49
44
 
50
45
  message SendToCustomerResponse {
51
46
  bool ok = 1;
52
47
  string error_message = 2;
53
- // id запису в NotificationLog (для трекінгу в /notifications/logs).
48
+
54
49
  string log_id = 3;
55
50
  }
56
51
 
@@ -65,7 +60,7 @@ service TelegramChatsService {
65
60
  rpc TestSendTelegram (TestSendTelegramRequest) returns (TestSendTelegramResponse);
66
61
  }
67
62
 
68
- // Маркетингові кампанії: створення, запуск, статистика.
63
+
69
64
  service CampaignsService {
70
65
  rpc ListCampaigns (ListCampaignsRequest) returns (ListCampaignsResponse);
71
66
  rpc GetCampaign (GetCampaignRequest) returns (CampaignResponse);
@@ -74,12 +69,11 @@ service CampaignsService {
74
69
  rpc DeleteCampaign (DeleteCampaignRequest) returns (DeleteCampaignResponse);
75
70
  rpc StartCampaign (StartCampaignRequest) returns (CampaignResponse);
76
71
  rpc CancelCampaign (CancelCampaignRequest) returns (CampaignResponse);
77
- // Превью сегменту — повертає кількість + перші N клієнтів, БЕЗ створення кампанії.
72
+
78
73
  rpc PreviewSegment (PreviewSegmentRequest) returns (PreviewSegmentResponse);
79
- // Список отримувачів конкретної кампанії з їхніми статусами.
74
+
80
75
  rpc ListRecipients (ListRecipientsRequest) returns (ListRecipientsResponse);
81
- // Викликається з gateway після того, як сегмент резолвнено клієнтами —
82
- // передається список {userId, recipient}, нотифікація розкладає у чергу.
76
+
83
77
  rpc EnqueueRecipients(EnqueueRecipientsRequest) returns (EnqueueRecipientsResponse);
84
78
  }
85
79
 
@@ -90,12 +84,9 @@ message EnqueueRecipientsRequest {
90
84
 
91
85
  message CampaignResolvedRecipient {
92
86
  string user_id = 1;
93
- string recipient = 2; // email або phone
94
- // true → у клієнта promotions=false. dispatcher позначить SKIPPED_OPT_OUT
95
- // якщо respect_opt_out=true для кампанії.
87
+ string recipient = 2;
96
88
  bool opt_out = 3;
97
- // Унікальний код, згенерований gateway через CouponsService.CreateCoupon.
98
- // Підставляється у шаблон як {{coupon_code}}.
89
+
99
90
  optional string coupon_code = 4;
100
91
  }
101
92
 
@@ -128,7 +119,7 @@ message DeleteCampaignResponse {
128
119
 
129
120
  message StartCampaignRequest {
130
121
  string id = 1;
131
- // ISO date; якщо порожньо → запустити одразу.
122
+
132
123
  optional string scheduled_at = 2;
133
124
  }
134
125
 
@@ -143,9 +134,9 @@ message CreateCampaignRequest {
143
134
  optional string custom_subject = 4;
144
135
  optional string custom_body_html = 5;
145
136
  optional string custom_body_text = 6;
146
- // JSON segment spec.
137
+
147
138
  string segment_json = 7;
148
- // JSON coupon spec — null/empty для кампаній без купонів.
139
+
149
140
  optional string coupon_spec_json = 8;
150
141
  bool respect_opt_out = 9;
151
142
  optional NotificationLocale locale = 10;
@@ -154,7 +145,7 @@ message CreateCampaignRequest {
154
145
 
155
146
  message UpdateCampaignRequest {
156
147
  string id = 1;
157
- // Можна оновлювати тільки DRAFT — гілки нижче опційні.
148
+
158
149
  optional string name = 2;
159
150
  optional NotificationChannel channel = 3;
160
151
  optional string template_id = 4;
@@ -210,12 +201,12 @@ enum CampaignStatusEnum {
210
201
 
211
202
  message PreviewSegmentRequest {
212
203
  string segment_json = 1;
213
- NotificationChannel channel = 2; // потрібно для перевірки наявності email/phone
204
+ NotificationChannel channel = 2;
214
205
  }
215
206
 
216
207
  message PreviewSegmentResponse {
217
208
  int32 total_count = 1;
218
- // Перші 10 для UI; решта — за необхідності окремим запитом.
209
+
219
210
  repeated PreviewSegmentSample sample = 2;
220
211
  }
221
212
 
@@ -261,7 +252,7 @@ enum CampaignRecipientStatusEnum {
261
252
  RECIPIENT_SKIPPED_NO_CONTACT = 5;
262
253
  }
263
254
 
264
- // Брендинг email-шаблонів — singleton редагується адміном.
255
+
265
256
  service BrandingService {
266
257
  rpc GetBranding (BrandingEmpty) returns (BrandingProfile);
267
258
  rpc UpdateBranding (UpdateBrandingRequest) returns (BrandingProfile);
@@ -269,8 +260,7 @@ service BrandingService {
269
260
 
270
261
  message BrandingEmpty {}
271
262
 
272
- // Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
273
- // "взяти fallback з env" при наступному GET.
263
+
274
264
  message BrandingProfile {
275
265
  string logo_url = 1;
276
266
  string brand_name = 2;
@@ -279,18 +269,17 @@ message BrandingProfile {
279
269
  string footer_html = 5;
280
270
  int64 updated_at = 6;
281
271
  string updated_by = 7;
282
- // resolved: остаточні значення, що використовуються wrapper'ом
283
- // (DB override → env fallback). Для UI щоб показати "поточне значення".
272
+
284
273
  string resolved_logo_url = 8;
285
274
  string resolved_brand_name = 9;
286
275
  string resolved_brand_url = 10;
287
276
  string resolved_support_email = 11;
288
- // Кастомний HTML-хедер (замість дефолтного логотип-блоку). Порожньо → default.
277
+
289
278
  string header_html = 12;
290
279
  }
291
280
 
292
281
  message UpdateBrandingRequest {
293
- // optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД.
282
+
294
283
  optional string logo_url = 1;
295
284
  optional string brand_name = 2;
296
285
  optional string brand_url = 3;
@@ -354,12 +343,11 @@ message NotificationTemplate {
354
343
  NotificationCategory category = 5;
355
344
  string title = 6;
356
345
  string subject = 7;
357
- // JSON-stringified Tiptap content (передаємо як string щоб не
358
- // використовувати proto google.protobuf.Struct).
346
+
359
347
  string content_json = 8;
360
348
  string body_html = 9;
361
349
  string body_text = 10;
362
- // JSON array of variable names (для autocomplete).
350
+
363
351
  string variables_json = 11;
364
352
  bool is_active = 12;
365
353
  int32 version = 13;
@@ -374,7 +362,6 @@ message TemplateResponse {
374
362
  }
375
363
 
376
364
 
377
- // ─── List ────────────────────────────────────────────────────────────
378
365
 
379
366
  message ListTemplatesRequest {
380
367
  optional NotificationChannel channel = 1;
@@ -388,14 +375,12 @@ message ListTemplatesResponse {
388
375
  }
389
376
 
390
377
 
391
- // ─── Get ─────────────────────────────────────────────────────────────
392
378
 
393
379
  message GetTemplateRequest {
394
380
  string id = 1;
395
381
  }
396
382
 
397
383
 
398
- // ─── Upsert (create new) ─────────────────────────────────────────────
399
384
 
400
385
  message UpsertTemplateRequest {
401
386
  string key = 1;
@@ -412,7 +397,6 @@ message UpsertTemplateRequest {
412
397
  }
413
398
 
414
399
 
415
- // ─── Update by id (з versioning) ─────────────────────────────────────
416
400
 
417
401
  message UpdateTemplateRequest {
418
402
  string id = 1;
@@ -423,12 +407,11 @@ message UpdateTemplateRequest {
423
407
  string body_text = 6;
424
408
  optional string variables_json = 7;
425
409
  optional bool is_active = 8;
426
- // Admin id для audit (хто змінив).
410
+
427
411
  optional string actor_id = 9;
428
412
  }
429
413
 
430
414
 
431
- // ─── Toggle (вмикання/вимикання) ────────────────────────────────────
432
415
 
433
416
  message ToggleTemplateRequest {
434
417
  string id = 1;
@@ -436,7 +419,6 @@ message ToggleTemplateRequest {
436
419
  }
437
420
 
438
421
 
439
- // ─── Versions ────────────────────────────────────────────────────────
440
422
 
441
423
  message NotificationTemplateVersion {
442
424
  string id = 1;
@@ -466,15 +448,13 @@ message RestoreVersionRequest {
466
448
  }
467
449
 
468
450
 
469
- // ─── Preview ────────────────────────────────────────────────────────
470
451
 
471
452
  message RenderPreviewRequest {
472
453
  string body_html = 1;
473
- // JSON-stringified variables { "order.number": "MD-2026-0001", ... }
454
+
474
455
  string variables_json = 2;
475
456
  optional string subject = 3;
476
- // JSON-stringified branding override (header/footer/logo/brand…) для live-
477
- // превʼю незбережених змін на сторінці брендингу. Порожньо → беремо з БД.
457
+
478
458
  optional string branding_json = 4;
479
459
  }
480
460
 
@@ -484,13 +464,12 @@ message RenderPreviewResponse {
484
464
  }
485
465
 
486
466
 
487
- // ─── Test send ───────────────────────────────────────────────────────
488
467
 
489
468
  message SendTestRequest {
490
469
  string template_id = 1;
491
- // email або phone (залежно від channel).
470
+
492
471
  string recipient = 2;
493
- // JSON-stringified test variables.
472
+
494
473
  string variables_json = 3;
495
474
  }
496
475
 
@@ -500,7 +479,6 @@ message SendTestResponse {
500
479
  }
501
480
 
502
481
 
503
- // ─── Logs ────────────────────────────────────────────────────────────
504
482
 
505
483
  message NotificationLog {
506
484
  string id = 1;
@@ -539,7 +517,6 @@ message ListLogsResponse {
539
517
  }
540
518
 
541
519
 
542
- // ─── Telegram chats ──────────────────────────────────────────────────
543
520
 
544
521
  message TelegramChat {
545
522
  string id = 1;
package/proto/order.proto CHANGED
@@ -14,8 +14,7 @@ service OrderService {
14
14
  rpc UpdateStatus(UpdateStatusRequest) returns (OrderResponse);
15
15
  rpc CancelOrder(CancelOrderRequest) returns (OrderResponse);
16
16
 
17
- // Archive (soft delete) — встановлює archived_at. Замовлення зникає
18
- // з дефолтного списку, але доступне через ?archived=true.
17
+
19
18
  rpc ArchiveOrder(ArchiveOrderRequest) returns (OrderResponse);
20
19
  rpc UnarchiveOrder(UnarchiveOrderRequest) returns (OrderResponse);
21
20
 
@@ -31,7 +30,7 @@ service OrderService {
31
30
 
32
31
  rpc ListHistory(ListHistoryRequest) returns (ListHistoryResponse);
33
32
 
34
- // CRM-агрегація для експорту клієнтів — повертає count/sum/last для кожного userId.
33
+
35
34
  rpc AggregateByCustomers(AggregateByCustomersRequest) returns (AggregateByCustomersResponse);
36
35
  }
37
36
 
@@ -42,9 +41,9 @@ message AggregateByCustomersRequest {
42
41
  message CustomerOrderAggregate {
43
42
  string user_id = 1;
44
43
  int32 orders_count = 2;
45
- // Decimal у вигляді рядка ('1234.56') — щоб не втратити точність на gRPC border.
44
+
46
45
  string total_sum = 3;
47
- // ISO-рядок, відсутній якщо клієнт ще не робив замовлень.
46
+
48
47
  optional string last_order_at = 4;
49
48
  }
50
49
 
@@ -52,12 +51,6 @@ message AggregateByCustomersResponse {
52
51
  repeated CustomerOrderAggregate items = 1;
53
52
  }
54
53
 
55
- // ─── Enums (string у proto3, для зворотної сумісності) ─────────
56
-
57
- // Статуси: new, processing, confirmed, no_answer, packing,
58
- // shipped, delivered, completed, cancelled, returned
59
-
60
- // ─── Domain types ──────────────────────────────────────────────
61
54
 
62
55
  message OrderItem {
63
56
  string id = 1;
@@ -95,8 +88,7 @@ message OrderDelivery {
95
88
  string tracking_url = 10;
96
89
  string estimated_date = 11;
97
90
  string shipment_status = 12;
98
- // Адмін-облік: область/регіон з City.region від delivery-service.
99
- // Старі замовлення можуть мати порожнє значення.
91
+
100
92
  string region = 13;
101
93
  }
102
94
 
@@ -111,8 +103,7 @@ message OrderPayment {
111
103
  int64 captured_at = 8;
112
104
  int64 cancelled_at = 9;
113
105
  int64 refunded_at = 10;
114
- // Денормалізовано з payment-service для відображення в адмінці
115
- // без додаткового gRPC дзвінка. Оновлюється з payment-events listener.
106
+
116
107
  double captured_amount = 11;
117
108
  double refunded_amount = 12;
118
109
  }
@@ -187,15 +178,13 @@ message Order {
187
178
  int64 created_at = 20;
188
179
  int64 updated_at = 21;
189
180
 
190
- // Внутрішні нотатки менеджерів (видимі тільки в адмінці).
191
- // Сортуються від новіших до старіших — server-side.
181
+
192
182
  repeated OrderNote notes = 22;
193
183
 
194
- // 0 = не в архіві; інакше timestamp коли архівовано.
184
+
195
185
  int64 archived_at = 23;
196
186
  }
197
187
 
198
- // ─── Requests ──────────────────────────────────────────────────
199
188
 
200
189
  message CreateOrderRequest {
201
190
  string idempotency_key = 1;
@@ -251,8 +240,7 @@ message ListOrdersRequest {
251
240
  double total_to = 13;
252
241
  string sort_by = 14;
253
242
  string sort_dir = 15;
254
- // 0 = тільки активні (default), 1 = тільки архівні, 2 = всі.
255
- // Менеджер бачить тільки свої через manager_id (вище).
243
+
256
244
  int32 archived_filter = 16;
257
245
  }
258
246
 
package/proto/page.proto CHANGED
@@ -31,9 +31,7 @@ message PageResponse {
31
31
 
32
32
  map<string, string> title = 4;
33
33
 
34
- // PageBlock[] serialized as JSON-string. ts-proto without oneofs
35
- // turns discriminated unions into a soup of optional fields; keep
36
- // the typed union on the gateway side via zod instead.
34
+
37
35
  string blocks_json = 5;
38
36
 
39
37
  optional string cover_image = 6;
@@ -3,35 +3,30 @@ syntax = "proto3";
3
3
  package payment.v1;
4
4
 
5
5
  service PaymentService {
6
- // CreateInvoice — провайдер створює інвойс у режимі hold (2-stage).
6
+
7
7
  rpc CreateInvoice(CreateInvoiceRequest) returns (PaymentResponse);
8
8
 
9
9
  rpc GetPayment(GetPaymentRequest) returns (PaymentResponse);
10
10
  rpc GetPaymentByOrder(GetPaymentByOrderRequest) returns (PaymentResponse);
11
11
  rpc ListPayments(ListPaymentsRequest) returns (ListPaymentsResponse);
12
12
 
13
- // Capture — фіксація списання раніше зарезервованих коштів.
13
+
14
14
  rpc Capture(CaptureRequest) returns (PaymentResponse);
15
- // Cancel — повне скасування hold (без списання).
15
+
16
16
  rpc Cancel(CancelRequest) returns (PaymentResponse);
17
- // Refund — повернення вже captured коштів (повне або часткове).
17
+
18
18
  rpc Refund(RefundRequest) returns (PaymentResponse);
19
19
 
20
- // SyncStatus — підтягує актуальний статус від провайдера (manual reconciliation).
20
+
21
21
  rpc SyncStatus(SyncStatusRequest) returns (PaymentResponse);
22
22
 
23
- // RegenerateInvoice — створює новий invoice у провайдера для існуючого Payment.
24
- // Використовується коли paymentUrl застарів (TTL у Mono ≈ 24г) або клієнт
25
- // загубив SMS — менеджер ділиться новим лінком через адмін UI.
23
+
26
24
  rpc RegenerateInvoice(RegenerateInvoiceRequest) returns (PaymentResponse);
27
25
 
28
26
  rpc ListProviders(ListProvidersRequest) returns (ListProvidersResponse);
29
27
  rpc ToggleProvider(ToggleProviderRequest) returns (ToggleProviderResponse);
30
28
  }
31
29
 
32
- // ─── Domain ────────────────────────────────────────────────────
33
-
34
- // status: pending | hold | captured | cancelled | refunded | partially_refunded | failed
35
30
 
36
31
  message Payment {
37
32
  string id = 1;
@@ -62,7 +57,6 @@ message PaymentProviderInfo {
62
57
  string description = 5;
63
58
  }
64
59
 
65
- // ─── Requests ──────────────────────────────────────────────────
66
60
 
67
61
  message CreateInvoiceRequest {
68
62
  string order_id = 1;
@@ -111,7 +105,7 @@ message ListPaymentsResponse {
111
105
 
112
106
  message CaptureRequest {
113
107
  string id = 1;
114
- double amount = 2; // 0 → captures full amount
108
+ double amount = 2;
115
109
  string actor_id = 3;
116
110
  }
117
111
 
@@ -123,7 +117,7 @@ message CancelRequest {
123
117
 
124
118
  message RefundRequest {
125
119
  string id = 1;
126
- double amount = 2; // 0 → full refund of captured
120
+ double amount = 2;
127
121
  string reason = 3;
128
122
  string actor_id = 4;
129
123
  }
@@ -5,14 +5,14 @@ package catalog.v1;
5
5
  import "common.proto";
6
6
 
7
7
  service PickupPointService {
8
- // Pickup points CRUD
8
+
9
9
  rpc GetPickupPoints (GetPickupPointsRequest) returns (GetPickupPointsResponse);
10
10
  rpc GetPickupPoint (GetPickupPointRequest) returns (PickupPointResponse);
11
11
  rpc CreatePickupPoint (CreatePickupPointRequest) returns (PickupPointResponse);
12
12
  rpc UpdatePickupPoint (UpdatePickupPointRequest) returns (PickupPointResponse);
13
13
  rpc DeletePickupPoint (DeletePickupPointRequest) returns (DeleteResponse);
14
14
 
15
- // Stock per pickup point
15
+
16
16
  rpc GetPickupStock (GetPickupStockRequest) returns (GetPickupStockResponse);
17
17
  rpc SetPickupStock (SetPickupStockRequest) returns (PickupStockItemResponse);
18
18
  rpc AdjustPickupStock (AdjustPickupStockRequest) returns (PickupStockItemResponse);
@@ -20,7 +20,6 @@ service PickupPointService {
20
20
  rpc BulkSyncFromOnec (BulkSyncFromOnecRequest) returns (SuccessResponse);
21
21
  }
22
22
 
23
- // ── Pickup Point ──────────────────────────────────────────────
24
23
 
25
24
  message PickupPointResponse {
26
25
  string id = 1;
@@ -32,7 +31,7 @@ message PickupPointResponse {
32
31
  optional double lng = 7;
33
32
  bool is_active = 8;
34
33
  optional string code_1c = 9;
35
- optional string schedule = 10; // JSON-encoded WeekSchedule
34
+ optional string schedule = 10;
36
35
  }
37
36
 
38
37
  message GetPickupPointsRequest {
@@ -77,14 +76,13 @@ message DeletePickupPointRequest {
77
76
  string id = 1;
78
77
  }
79
78
 
80
- // ── Pickup Stock ──────────────────────────────────────────────
81
79
 
82
80
  message PickupStockItemResponse {
83
81
  string pickup_point_id = 1;
84
82
  string product_id = 2;
85
83
  optional string variant_id = 3;
86
84
  int32 qty = 4;
87
- string source = 5; // "MANUAL" | "SYNC_1C"
85
+ string source = 5;
88
86
  string updated_at = 6;
89
87
  optional string pickup_point_name = 7;
90
88
  }
@@ -104,21 +102,21 @@ message SetPickupStockRequest {
104
102
  string product_id = 2;
105
103
  optional string variant_id = 3;
106
104
  int32 qty = 4;
107
- optional string source = 5; // default MANUAL
105
+ optional string source = 5;
108
106
  }
109
107
 
110
108
  message AdjustPickupStockRequest {
111
109
  string pickup_point_id = 1;
112
110
  string product_id = 2;
113
111
  optional string variant_id = 3;
114
- int32 delta = 4; // positive = add, negative = subtract
112
+ int32 delta = 4;
115
113
  }
116
114
 
117
115
  message BulkSetPickupStockRequest {
118
116
  repeated SetPickupStockRequest items = 1;
119
117
  }
120
118
 
121
- // Масова синхронізація з 1С: масив рядків вигляду "code1c:productGuid1c:variantGuid1c?:qty"
119
+
122
120
  message BulkSyncFromOnecRequest {
123
121
  repeated OnecStockEntry entries = 1;
124
122
  }