@mamindom/contracts 1.0.143 → 1.0.145
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/attribute.d.ts +40 -0
- package/dist/gen/attribute.js +1 -0
- package/dist/gen/brand.d.ts +19 -0
- package/dist/gen/brand.js +8 -1
- package/dist/gen/bundle.d.ts +0 -2
- package/dist/gen/cart.d.ts +0 -28
- package/dist/gen/category.d.ts +26 -0
- package/dist/gen/category.js +1 -0
- package/dist/gen/delivery.d.ts +0 -1
- package/dist/gen/delivery_settings.d.ts +0 -4
- package/dist/gen/faq.d.ts +0 -6
- package/dist/gen/manager.d.ts +0 -12
- package/dist/gen/notification.d.ts +0 -71
- package/dist/gen/order.d.ts +0 -29
- package/dist/gen/page.d.ts +0 -5
- package/dist/gen/payment.d.ts +0 -22
- package/dist/gen/pickup.d.ts +0 -9
- package/dist/gen/product.d.ts +107 -11
- package/dist/gen/product.js +4 -0
- package/dist/gen/promotion.d.ts +0 -16
- package/dist/gen/rbac.d.ts +0 -16
- package/dist/gen/search.d.ts +0 -14
- package/dist/gen/seo_filter.d.ts +16 -48
- package/dist/gen/seo_filter.js +1 -0
- package/dist/gen/shop_filters.d.ts +0 -5
- package/dist/gen/users.d.ts +0 -9
- package/dist/gen/warehouse.d.ts +34 -0
- package/dist/gen/warehouse.js +28 -0
- package/dist/proto/attribute.proto +35 -0
- package/dist/proto/brand.proto +25 -0
- package/dist/proto/bundle.proto +2 -2
- package/dist/proto/cart.proto +5 -14
- package/dist/proto/category.proto +26 -0
- package/dist/proto/delivery.proto +1 -6
- package/dist/proto/delivery_settings.proto +4 -4
- package/dist/proto/faq.proto +3 -10
- package/dist/proto/manager.proto +3 -5
- package/dist/proto/notification.proto +33 -56
- package/dist/proto/order.proto +9 -21
- package/dist/proto/page.proto +1 -3
- package/dist/proto/payment.proto +8 -14
- package/dist/proto/pickup.proto +7 -9
- package/dist/proto/product.proto +129 -18
- package/dist/proto/promotion.proto +9 -22
- package/dist/proto/rbac.proto +7 -9
- package/dist/proto/search.proto +10 -14
- package/dist/proto/seo_filter.proto +37 -32
- package/dist/proto/shop_filters.proto +1 -3
- package/dist/proto/users.proto +5 -8
- package/dist/proto/warehouse.proto +38 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +1 -0
- package/gen/attribute.ts +48 -0
- package/gen/brand.ts +35 -1
- package/gen/bundle.ts +1 -5
- package/gen/cart.ts +1 -35
- package/gen/category.ts +34 -0
- package/gen/delivery.ts +0 -1
- package/gen/delivery_settings.ts +0 -4
- package/gen/faq.ts +0 -12
- package/gen/manager.ts +1 -17
- package/gen/notification.ts +5 -98
- package/gen/order.ts +0 -33
- package/gen/page.ts +0 -5
- package/gen/payment.ts +0 -34
- package/gen/pickup.ts +2 -19
- package/gen/product.ts +147 -28
- package/gen/promotion.ts +3 -33
- package/gen/rbac.ts +1 -25
- package/gen/search.ts +0 -22
- package/gen/seo_filter.ts +27 -63
- package/gen/shop_filters.ts +0 -5
- package/gen/users.ts +1 -20
- package/gen/warehouse.ts +67 -0
- package/package.json +1 -1
- package/proto/attribute.proto +35 -0
- package/proto/brand.proto +25 -0
- package/proto/bundle.proto +2 -2
- package/proto/cart.proto +5 -14
- package/proto/category.proto +26 -0
- package/proto/delivery.proto +1 -6
- package/proto/delivery_settings.proto +4 -4
- package/proto/faq.proto +3 -10
- package/proto/manager.proto +3 -5
- package/proto/notification.proto +33 -56
- package/proto/order.proto +9 -21
- package/proto/page.proto +1 -3
- package/proto/payment.proto +8 -14
- package/proto/pickup.proto +7 -9
- package/proto/product.proto +129 -18
- package/proto/promotion.proto +9 -22
- package/proto/rbac.proto +7 -9
- package/proto/search.proto +10 -14
- package/proto/seo_filter.proto +37 -32
- package/proto/shop_filters.proto +1 -3
- package/proto/users.proto +5 -8
- package/proto/warehouse.proto +38 -0
package/proto/notification.proto
CHANGED
|
@@ -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
|
-
|
|
17
|
+
|
|
20
18
|
rpc SendToCustomer (SendToCustomerRequest) returns (SendToCustomerResponse);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
// (email/phone) вже резолвнений і опційно згенерований персональний купон.
|
|
21
|
+
|
|
25
22
|
message SendToCustomerRequest {
|
|
26
|
-
|
|
23
|
+
|
|
27
24
|
string user_id = 1;
|
|
28
25
|
NotificationChannel channel = 2;
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
|
|
31
28
|
string recipient = 3;
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
|
|
34
31
|
optional string template_id = 4;
|
|
35
32
|
|
|
36
|
-
|
|
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
|
-
|
|
38
|
+
|
|
44
39
|
string variables_json = 8;
|
|
45
40
|
|
|
46
|
-
|
|
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
|
-
|
|
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
|
-
|
|
72
|
+
|
|
78
73
|
rpc PreviewSegment (PreviewSegmentRequest) returns (PreviewSegmentResponse);
|
|
79
|
-
|
|
74
|
+
|
|
80
75
|
rpc ListRecipients (ListRecipientsRequest) returns (ListRecipientsResponse);
|
|
81
|
-
|
|
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;
|
|
94
|
-
// true → у клієнта promotions=false. dispatcher позначить SKIPPED_OPT_OUT
|
|
95
|
-
// якщо respect_opt_out=true для кампанії.
|
|
87
|
+
string recipient = 2;
|
|
96
88
|
bool opt_out = 3;
|
|
97
|
-
|
|
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
|
-
|
|
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
|
-
|
|
137
|
+
|
|
147
138
|
string segment_json = 7;
|
|
148
|
-
|
|
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
|
-
|
|
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;
|
|
204
|
+
NotificationChannel channel = 2;
|
|
214
205
|
}
|
|
215
206
|
|
|
216
207
|
message PreviewSegmentResponse {
|
|
217
208
|
int32 total_count = 1;
|
|
218
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
277
|
+
|
|
289
278
|
string header_html = 12;
|
|
290
279
|
}
|
|
291
280
|
|
|
292
281
|
message UpdateBrandingRequest {
|
|
293
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
454
|
+
|
|
474
455
|
string variables_json = 2;
|
|
475
456
|
optional string subject = 3;
|
|
476
|
-
|
|
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
|
-
|
|
470
|
+
|
|
492
471
|
string recipient = 2;
|
|
493
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
44
|
+
|
|
46
45
|
string total_sum = 3;
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/proto/payment.proto
CHANGED
|
@@ -3,35 +3,30 @@ syntax = "proto3";
|
|
|
3
3
|
package payment.v1;
|
|
4
4
|
|
|
5
5
|
service PaymentService {
|
|
6
|
-
|
|
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
|
-
|
|
13
|
+
|
|
14
14
|
rpc Capture(CaptureRequest) returns (PaymentResponse);
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
rpc Cancel(CancelRequest) returns (PaymentResponse);
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
rpc Refund(RefundRequest) returns (PaymentResponse);
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
rpc SyncStatus(SyncStatusRequest) returns (PaymentResponse);
|
|
22
22
|
|
|
23
|
-
|
|
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;
|
|
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;
|
|
120
|
+
double amount = 2;
|
|
127
121
|
string reason = 3;
|
|
128
122
|
string actor_id = 4;
|
|
129
123
|
}
|
package/proto/pickup.proto
CHANGED
|
@@ -5,14 +5,14 @@ package catalog.v1;
|
|
|
5
5
|
import "common.proto";
|
|
6
6
|
|
|
7
7
|
service PickupPointService {
|
|
8
|
-
|
|
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
|
-
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
112
|
+
int32 delta = 4;
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
message BulkSetPickupStockRequest {
|
|
118
116
|
repeated SetPickupStockRequest items = 1;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
|
|
122
120
|
message BulkSyncFromOnecRequest {
|
|
123
121
|
repeated OnecStockEntry entries = 1;
|
|
124
122
|
}
|