@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.
- 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 +108 -11
- package/dist/gen/product.js +5 -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 +0 -57
- 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 +144 -34
- 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 +17 -36
- 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 +148 -28
- package/gen/promotion.ts +3 -33
- package/gen/rbac.ts +1 -25
- package/gen/search.ts +0 -22
- package/gen/seo_filter.ts +3 -74
- 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 +144 -34
- package/proto/promotion.proto +9 -22
- package/proto/rbac.proto +7 -9
- package/proto/search.proto +10 -14
- package/proto/seo_filter.proto +17 -36
- package/proto/shop_filters.proto +1 -3
- package/proto/users.proto +5 -8
- package/proto/warehouse.proto +38 -0
package/gen/manager.ts
CHANGED
|
@@ -50,10 +50,7 @@ export interface GetManagerByAccountRequest {
|
|
|
50
50
|
export interface CreateManagerRequest {
|
|
51
51
|
accountId: string;
|
|
52
52
|
displayName?: string | undefined;
|
|
53
|
-
email?:
|
|
54
|
-
| string
|
|
55
|
-
| undefined;
|
|
56
|
-
/** URGENT_ONLY | ALL */
|
|
53
|
+
email?: string | undefined;
|
|
57
54
|
reassignmentStrategy?: string | undefined;
|
|
58
55
|
}
|
|
59
56
|
|
|
@@ -79,7 +76,6 @@ export interface ReorderManagersRequest {
|
|
|
79
76
|
|
|
80
77
|
export interface AddVacationRequest {
|
|
81
78
|
managerId: string;
|
|
82
|
-
/** ISO date */
|
|
83
79
|
startsAt: string;
|
|
84
80
|
endsAt: string;
|
|
85
81
|
reason?: string | undefined;
|
|
@@ -112,12 +108,6 @@ export interface ManagerServiceClient {
|
|
|
112
108
|
|
|
113
109
|
getManager(request: GetManagerRequest): Observable<ManagerProfileDto>;
|
|
114
110
|
|
|
115
|
-
/**
|
|
116
|
-
* Резолв account_id (з auth-service) → ManagerProfile. Використовується
|
|
117
|
-
* у gateway щоб з'ясувати ManagerProfile.id для логіну-під-менеджером —
|
|
118
|
-
* order.managerId зберігає ManagerProfile.id, а не Account.id.
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
111
|
getManagerByAccount(request: GetManagerByAccountRequest): Observable<ManagerProfileDto>;
|
|
122
112
|
|
|
123
113
|
createManager(request: CreateManagerRequest): Observable<ManagerProfileDto>;
|
|
@@ -146,12 +136,6 @@ export interface ManagerServiceController {
|
|
|
146
136
|
request: GetManagerRequest,
|
|
147
137
|
): Promise<ManagerProfileDto> | Observable<ManagerProfileDto> | ManagerProfileDto;
|
|
148
138
|
|
|
149
|
-
/**
|
|
150
|
-
* Резолв account_id (з auth-service) → ManagerProfile. Використовується
|
|
151
|
-
* у gateway щоб з'ясувати ManagerProfile.id для логіну-під-менеджером —
|
|
152
|
-
* order.managerId зберігає ManagerProfile.id, а не Account.id.
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
139
|
getManagerByAccount(
|
|
156
140
|
request: GetManagerByAccountRequest,
|
|
157
141
|
): Promise<ManagerProfileDto> | Observable<ManagerProfileDto> | ManagerProfileDto;
|
package/gen/notification.ts
CHANGED
|
@@ -80,40 +80,21 @@ export enum TelegramTopic {
|
|
|
80
80
|
UNRECOGNIZED = -1,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
/**
|
|
84
|
-
* SendToCustomer — викликається з gateway після того, як клієнтський контакт
|
|
85
|
-
* (email/phone) вже резолвнений і опційно згенерований персональний купон.
|
|
86
|
-
*/
|
|
87
83
|
export interface SendToCustomerRequest {
|
|
88
|
-
/** userId з auth-service — пишемо в NotificationLog.user_id для зведень. */
|
|
89
84
|
userId: string;
|
|
90
85
|
channel: NotificationChannel;
|
|
91
|
-
/** Recipient — email або phone, заздалегідь визначені gateway з акаунта. */
|
|
92
86
|
recipient: string;
|
|
93
|
-
|
|
94
|
-
templateId?:
|
|
95
|
-
| string
|
|
96
|
-
| undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Шлях 2: ad-hoc контент. Якщо template_id порожній — використовуємо ці поля.
|
|
99
|
-
* body_html — для EMAIL (буде обгорнутий брендингом).
|
|
100
|
-
* body_text — для SMS (plain text) або текстова версія email.
|
|
101
|
-
*/
|
|
87
|
+
templateId?: string | undefined;
|
|
102
88
|
customSubject?: string | undefined;
|
|
103
89
|
customBodyHtml?: string | undefined;
|
|
104
|
-
customBodyText?:
|
|
105
|
-
| string
|
|
106
|
-
| undefined;
|
|
107
|
-
/** JSON з placeholders для Handlebars: { "coupon_code": "...", ... } */
|
|
90
|
+
customBodyText?: string | undefined;
|
|
108
91
|
variablesJson: string;
|
|
109
|
-
/** Locale для пошуку версії шаблону + надсилання branding-обгортки. */
|
|
110
92
|
locale?: NotificationLocale | undefined;
|
|
111
93
|
}
|
|
112
94
|
|
|
113
95
|
export interface SendToCustomerResponse {
|
|
114
96
|
ok: boolean;
|
|
115
97
|
errorMessage: string;
|
|
116
|
-
/** id запису в NotificationLog (для трекінгу в /notifications/logs). */
|
|
117
98
|
logId: string;
|
|
118
99
|
}
|
|
119
100
|
|
|
@@ -124,17 +105,8 @@ export interface EnqueueRecipientsRequest {
|
|
|
124
105
|
|
|
125
106
|
export interface CampaignResolvedRecipient {
|
|
126
107
|
userId: string;
|
|
127
|
-
/** email або phone */
|
|
128
108
|
recipient: string;
|
|
129
|
-
/**
|
|
130
|
-
* true → у клієнта promotions=false. dispatcher позначить SKIPPED_OPT_OUT
|
|
131
|
-
* якщо respect_opt_out=true для кампанії.
|
|
132
|
-
*/
|
|
133
109
|
optOut: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Унікальний код, згенерований gateway через CouponsService.CreateCoupon.
|
|
136
|
-
* Підставляється у шаблон як {{coupon_code}}.
|
|
137
|
-
*/
|
|
138
110
|
couponCode?: string | undefined;
|
|
139
111
|
}
|
|
140
112
|
|
|
@@ -167,7 +139,6 @@ export interface DeleteCampaignResponse {
|
|
|
167
139
|
|
|
168
140
|
export interface StartCampaignRequest {
|
|
169
141
|
id: string;
|
|
170
|
-
/** ISO date; якщо порожньо → запустити одразу. */
|
|
171
142
|
scheduledAt?: string | undefined;
|
|
172
143
|
}
|
|
173
144
|
|
|
@@ -181,12 +152,8 @@ export interface CreateCampaignRequest {
|
|
|
181
152
|
templateId?: string | undefined;
|
|
182
153
|
customSubject?: string | undefined;
|
|
183
154
|
customBodyHtml?: string | undefined;
|
|
184
|
-
customBodyText?:
|
|
185
|
-
| string
|
|
186
|
-
| undefined;
|
|
187
|
-
/** JSON segment spec. */
|
|
155
|
+
customBodyText?: string | undefined;
|
|
188
156
|
segmentJson: string;
|
|
189
|
-
/** JSON coupon spec — null/empty для кампаній без купонів. */
|
|
190
157
|
couponSpecJson?: string | undefined;
|
|
191
158
|
respectOptOut: boolean;
|
|
192
159
|
locale?: NotificationLocale | undefined;
|
|
@@ -195,7 +162,6 @@ export interface CreateCampaignRequest {
|
|
|
195
162
|
|
|
196
163
|
export interface UpdateCampaignRequest {
|
|
197
164
|
id: string;
|
|
198
|
-
/** Можна оновлювати тільки DRAFT — гілки нижче опційні. */
|
|
199
165
|
name?: string | undefined;
|
|
200
166
|
channel?: NotificationChannel | undefined;
|
|
201
167
|
templateId?: string | undefined;
|
|
@@ -241,13 +207,11 @@ export interface Campaign {
|
|
|
241
207
|
|
|
242
208
|
export interface PreviewSegmentRequest {
|
|
243
209
|
segmentJson: string;
|
|
244
|
-
/** потрібно для перевірки наявності email/phone */
|
|
245
210
|
channel: NotificationChannel;
|
|
246
211
|
}
|
|
247
212
|
|
|
248
213
|
export interface PreviewSegmentResponse {
|
|
249
214
|
totalCount: number;
|
|
250
|
-
/** Перші 10 для UI; решта — за необхідності окремим запитом. */
|
|
251
215
|
sample: PreviewSegmentSample[];
|
|
252
216
|
}
|
|
253
217
|
|
|
@@ -287,10 +251,6 @@ export interface CampaignRecipient {
|
|
|
287
251
|
export interface BrandingEmpty {
|
|
288
252
|
}
|
|
289
253
|
|
|
290
|
-
/**
|
|
291
|
-
* Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
|
|
292
|
-
* "взяти fallback з env" при наступному GET.
|
|
293
|
-
*/
|
|
294
254
|
export interface BrandingProfile {
|
|
295
255
|
logoUrl: string;
|
|
296
256
|
brandName: string;
|
|
@@ -299,20 +259,14 @@ export interface BrandingProfile {
|
|
|
299
259
|
footerHtml: string;
|
|
300
260
|
updatedAt: number;
|
|
301
261
|
updatedBy: string;
|
|
302
|
-
/**
|
|
303
|
-
* resolved: остаточні значення, що використовуються wrapper'ом
|
|
304
|
-
* (DB override → env fallback). Для UI щоб показати "поточне значення".
|
|
305
|
-
*/
|
|
306
262
|
resolvedLogoUrl: string;
|
|
307
263
|
resolvedBrandName: string;
|
|
308
264
|
resolvedBrandUrl: string;
|
|
309
265
|
resolvedSupportEmail: string;
|
|
310
|
-
/** Кастомний HTML-хедер (замість дефолтного логотип-блоку). Порожньо → default. */
|
|
311
266
|
headerHtml: string;
|
|
312
267
|
}
|
|
313
268
|
|
|
314
269
|
export interface UpdateBrandingRequest {
|
|
315
|
-
/** optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД. */
|
|
316
270
|
logoUrl?: string | undefined;
|
|
317
271
|
brandName?: string | undefined;
|
|
318
272
|
brandUrl?: string | undefined;
|
|
@@ -330,14 +284,9 @@ export interface NotificationTemplate {
|
|
|
330
284
|
category: NotificationCategory;
|
|
331
285
|
title: string;
|
|
332
286
|
subject: string;
|
|
333
|
-
/**
|
|
334
|
-
* JSON-stringified Tiptap content (передаємо як string щоб не
|
|
335
|
-
* використовувати proto google.protobuf.Struct).
|
|
336
|
-
*/
|
|
337
287
|
contentJson: string;
|
|
338
288
|
bodyHtml: string;
|
|
339
289
|
bodyText: string;
|
|
340
|
-
/** JSON array of variable names (для autocomplete). */
|
|
341
290
|
variablesJson: string;
|
|
342
291
|
isActive: boolean;
|
|
343
292
|
version: number;
|
|
@@ -388,10 +337,7 @@ export interface UpdateTemplateRequest {
|
|
|
388
337
|
bodyHtml: string;
|
|
389
338
|
bodyText: string;
|
|
390
339
|
variablesJson?: string | undefined;
|
|
391
|
-
isActive?:
|
|
392
|
-
| boolean
|
|
393
|
-
| undefined;
|
|
394
|
-
/** Admin id для audit (хто змінив). */
|
|
340
|
+
isActive?: boolean | undefined;
|
|
395
341
|
actorId?: string | undefined;
|
|
396
342
|
}
|
|
397
343
|
|
|
@@ -429,15 +375,8 @@ export interface RestoreVersionRequest {
|
|
|
429
375
|
|
|
430
376
|
export interface RenderPreviewRequest {
|
|
431
377
|
bodyHtml: string;
|
|
432
|
-
/** JSON-stringified variables { "order.number": "MD-2026-0001", ... } */
|
|
433
378
|
variablesJson: string;
|
|
434
|
-
subject?:
|
|
435
|
-
| string
|
|
436
|
-
| undefined;
|
|
437
|
-
/**
|
|
438
|
-
* JSON-stringified branding override (header/footer/logo/brand…) для live-
|
|
439
|
-
* превʼю незбережених змін на сторінці брендингу. Порожньо → беремо з БД.
|
|
440
|
-
*/
|
|
379
|
+
subject?: string | undefined;
|
|
441
380
|
brandingJson?: string | undefined;
|
|
442
381
|
}
|
|
443
382
|
|
|
@@ -448,9 +387,7 @@ export interface RenderPreviewResponse {
|
|
|
448
387
|
|
|
449
388
|
export interface SendTestRequest {
|
|
450
389
|
templateId: string;
|
|
451
|
-
/** email або phone (залежно від channel). */
|
|
452
390
|
recipient: string;
|
|
453
|
-
/** JSON-stringified test variables. */
|
|
454
391
|
variablesJson: string;
|
|
455
392
|
}
|
|
456
393
|
|
|
@@ -566,8 +503,6 @@ export interface NotificationTemplateServiceClient {
|
|
|
566
503
|
|
|
567
504
|
sendTest(request: SendTestRequest): Observable<SendTestResponse>;
|
|
568
505
|
|
|
569
|
-
/** Реальна відправка клієнту з адмінки — або по шаблону, або ad-hoc body. */
|
|
570
|
-
|
|
571
506
|
sendToCustomer(request: SendToCustomerRequest): Observable<SendToCustomerResponse>;
|
|
572
507
|
}
|
|
573
508
|
|
|
@@ -604,8 +539,6 @@ export interface NotificationTemplateServiceController {
|
|
|
604
539
|
|
|
605
540
|
sendTest(request: SendTestRequest): Promise<SendTestResponse> | Observable<SendTestResponse> | SendTestResponse;
|
|
606
541
|
|
|
607
|
-
/** Реальна відправка клієнту з адмінки — або по шаблону, або ad-hoc body. */
|
|
608
|
-
|
|
609
542
|
sendToCustomer(
|
|
610
543
|
request: SendToCustomerRequest,
|
|
611
544
|
): Promise<SendToCustomerResponse> | Observable<SendToCustomerResponse> | SendToCustomerResponse;
|
|
@@ -707,8 +640,6 @@ export function TelegramChatsServiceControllerMethods() {
|
|
|
707
640
|
|
|
708
641
|
export const TELEGRAM_CHATS_SERVICE_NAME = "TelegramChatsService";
|
|
709
642
|
|
|
710
|
-
/** Маркетингові кампанії: створення, запуск, статистика. */
|
|
711
|
-
|
|
712
643
|
export interface CampaignsServiceClient {
|
|
713
644
|
listCampaigns(request: ListCampaignsRequest): Observable<ListCampaignsResponse>;
|
|
714
645
|
|
|
@@ -724,24 +655,13 @@ export interface CampaignsServiceClient {
|
|
|
724
655
|
|
|
725
656
|
cancelCampaign(request: CancelCampaignRequest): Observable<CampaignResponse>;
|
|
726
657
|
|
|
727
|
-
/** Превью сегменту — повертає кількість + перші N клієнтів, БЕЗ створення кампанії. */
|
|
728
|
-
|
|
729
658
|
previewSegment(request: PreviewSegmentRequest): Observable<PreviewSegmentResponse>;
|
|
730
659
|
|
|
731
|
-
/** Список отримувачів конкретної кампанії з їхніми статусами. */
|
|
732
|
-
|
|
733
660
|
listRecipients(request: ListRecipientsRequest): Observable<ListRecipientsResponse>;
|
|
734
661
|
|
|
735
|
-
/**
|
|
736
|
-
* Викликається з gateway після того, як сегмент резолвнено клієнтами —
|
|
737
|
-
* передається список {userId, recipient}, нотифікація розкладає у чергу.
|
|
738
|
-
*/
|
|
739
|
-
|
|
740
662
|
enqueueRecipients(request: EnqueueRecipientsRequest): Observable<EnqueueRecipientsResponse>;
|
|
741
663
|
}
|
|
742
664
|
|
|
743
|
-
/** Маркетингові кампанії: створення, запуск, статистика. */
|
|
744
|
-
|
|
745
665
|
export interface CampaignsServiceController {
|
|
746
666
|
listCampaigns(
|
|
747
667
|
request: ListCampaignsRequest,
|
|
@@ -769,23 +689,14 @@ export interface CampaignsServiceController {
|
|
|
769
689
|
request: CancelCampaignRequest,
|
|
770
690
|
): Promise<CampaignResponse> | Observable<CampaignResponse> | CampaignResponse;
|
|
771
691
|
|
|
772
|
-
/** Превью сегменту — повертає кількість + перші N клієнтів, БЕЗ створення кампанії. */
|
|
773
|
-
|
|
774
692
|
previewSegment(
|
|
775
693
|
request: PreviewSegmentRequest,
|
|
776
694
|
): Promise<PreviewSegmentResponse> | Observable<PreviewSegmentResponse> | PreviewSegmentResponse;
|
|
777
695
|
|
|
778
|
-
/** Список отримувачів конкретної кампанії з їхніми статусами. */
|
|
779
|
-
|
|
780
696
|
listRecipients(
|
|
781
697
|
request: ListRecipientsRequest,
|
|
782
698
|
): Promise<ListRecipientsResponse> | Observable<ListRecipientsResponse> | ListRecipientsResponse;
|
|
783
699
|
|
|
784
|
-
/**
|
|
785
|
-
* Викликається з gateway після того, як сегмент резолвнено клієнтами —
|
|
786
|
-
* передається список {userId, recipient}, нотифікація розкладає у чергу.
|
|
787
|
-
*/
|
|
788
|
-
|
|
789
700
|
enqueueRecipients(
|
|
790
701
|
request: EnqueueRecipientsRequest,
|
|
791
702
|
): Promise<EnqueueRecipientsResponse> | Observable<EnqueueRecipientsResponse> | EnqueueRecipientsResponse;
|
|
@@ -819,16 +730,12 @@ export function CampaignsServiceControllerMethods() {
|
|
|
819
730
|
|
|
820
731
|
export const CAMPAIGNS_SERVICE_NAME = "CampaignsService";
|
|
821
732
|
|
|
822
|
-
/** Брендинг email-шаблонів — singleton редагується адміном. */
|
|
823
|
-
|
|
824
733
|
export interface BrandingServiceClient {
|
|
825
734
|
getBranding(request: BrandingEmpty): Observable<BrandingProfile>;
|
|
826
735
|
|
|
827
736
|
updateBranding(request: UpdateBrandingRequest): Observable<BrandingProfile>;
|
|
828
737
|
}
|
|
829
738
|
|
|
830
|
-
/** Брендинг email-шаблонів — singleton редагується адміном. */
|
|
831
|
-
|
|
832
739
|
export interface BrandingServiceController {
|
|
833
740
|
getBranding(request: BrandingEmpty): Promise<BrandingProfile> | Observable<BrandingProfile> | BrandingProfile;
|
|
834
741
|
|
package/gen/order.ts
CHANGED
|
@@ -17,9 +17,7 @@ export interface AggregateByCustomersRequest {
|
|
|
17
17
|
export interface CustomerOrderAggregate {
|
|
18
18
|
userId: string;
|
|
19
19
|
ordersCount: number;
|
|
20
|
-
/** Decimal у вигляді рядка ('1234.56') — щоб не втратити точність на gRPC border. */
|
|
21
20
|
totalSum: string;
|
|
22
|
-
/** ISO-рядок, відсутній якщо клієнт ще не робив замовлень. */
|
|
23
21
|
lastOrderAt?: string | undefined;
|
|
24
22
|
}
|
|
25
23
|
|
|
@@ -63,10 +61,6 @@ export interface OrderDelivery {
|
|
|
63
61
|
trackingUrl: string;
|
|
64
62
|
estimatedDate: string;
|
|
65
63
|
shipmentStatus: string;
|
|
66
|
-
/**
|
|
67
|
-
* Адмін-облік: область/регіон з City.region від delivery-service.
|
|
68
|
-
* Старі замовлення можуть мати порожнє значення.
|
|
69
|
-
*/
|
|
70
64
|
region: string;
|
|
71
65
|
}
|
|
72
66
|
|
|
@@ -81,10 +75,6 @@ export interface OrderPayment {
|
|
|
81
75
|
capturedAt: number;
|
|
82
76
|
cancelledAt: number;
|
|
83
77
|
refundedAt: number;
|
|
84
|
-
/**
|
|
85
|
-
* Денормалізовано з payment-service для відображення в адмінці
|
|
86
|
-
* без додаткового gRPC дзвінка. Оновлюється з payment-events listener.
|
|
87
|
-
*/
|
|
88
78
|
capturedAmount: number;
|
|
89
79
|
refundedAmount: number;
|
|
90
80
|
}
|
|
@@ -154,12 +144,7 @@ export interface Order {
|
|
|
154
144
|
tags: string[];
|
|
155
145
|
createdAt: number;
|
|
156
146
|
updatedAt: number;
|
|
157
|
-
/**
|
|
158
|
-
* Внутрішні нотатки менеджерів (видимі тільки в адмінці).
|
|
159
|
-
* Сортуються від новіших до старіших — server-side.
|
|
160
|
-
*/
|
|
161
147
|
notes: OrderNote[];
|
|
162
|
-
/** 0 = не в архіві; інакше timestamp коли архівовано. */
|
|
163
148
|
archivedAt: number;
|
|
164
149
|
}
|
|
165
150
|
|
|
@@ -215,10 +200,6 @@ export interface ListOrdersRequest {
|
|
|
215
200
|
totalTo: number;
|
|
216
201
|
sortBy: string;
|
|
217
202
|
sortDir: string;
|
|
218
|
-
/**
|
|
219
|
-
* 0 = тільки активні (default), 1 = тільки архівні, 2 = всі.
|
|
220
|
-
* Менеджер бачить тільки свої через manager_id (вище).
|
|
221
|
-
*/
|
|
222
203
|
archivedFilter: number;
|
|
223
204
|
}
|
|
224
205
|
|
|
@@ -347,11 +328,6 @@ export interface OrderServiceClient {
|
|
|
347
328
|
|
|
348
329
|
cancelOrder(request: CancelOrderRequest): Observable<OrderResponse>;
|
|
349
330
|
|
|
350
|
-
/**
|
|
351
|
-
* Archive (soft delete) — встановлює archived_at. Замовлення зникає
|
|
352
|
-
* з дефолтного списку, але доступне через ?archived=true.
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
331
|
archiveOrder(request: ArchiveOrderRequest): Observable<OrderResponse>;
|
|
356
332
|
|
|
357
333
|
unarchiveOrder(request: UnarchiveOrderRequest): Observable<OrderResponse>;
|
|
@@ -372,8 +348,6 @@ export interface OrderServiceClient {
|
|
|
372
348
|
|
|
373
349
|
listHistory(request: ListHistoryRequest): Observable<ListHistoryResponse>;
|
|
374
350
|
|
|
375
|
-
/** CRM-агрегація для експорту клієнтів — повертає count/sum/last для кожного userId. */
|
|
376
|
-
|
|
377
351
|
aggregateByCustomers(request: AggregateByCustomersRequest): Observable<AggregateByCustomersResponse>;
|
|
378
352
|
}
|
|
379
353
|
|
|
@@ -402,11 +376,6 @@ export interface OrderServiceController {
|
|
|
402
376
|
|
|
403
377
|
cancelOrder(request: CancelOrderRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
404
378
|
|
|
405
|
-
/**
|
|
406
|
-
* Archive (soft delete) — встановлює archived_at. Замовлення зникає
|
|
407
|
-
* з дефолтного списку, але доступне через ?archived=true.
|
|
408
|
-
*/
|
|
409
|
-
|
|
410
379
|
archiveOrder(request: ArchiveOrderRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
411
380
|
|
|
412
381
|
unarchiveOrder(request: UnarchiveOrderRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
@@ -431,8 +400,6 @@ export interface OrderServiceController {
|
|
|
431
400
|
request: ListHistoryRequest,
|
|
432
401
|
): Promise<ListHistoryResponse> | Observable<ListHistoryResponse> | ListHistoryResponse;
|
|
433
402
|
|
|
434
|
-
/** CRM-агрегація для експорту клієнтів — повертає count/sum/last для кожного userId. */
|
|
435
|
-
|
|
436
403
|
aggregateByCustomers(
|
|
437
404
|
request: AggregateByCustomersRequest,
|
|
438
405
|
): Promise<AggregateByCustomersResponse> | Observable<AggregateByCustomersResponse> | AggregateByCustomersResponse;
|
package/gen/page.ts
CHANGED
|
@@ -24,11 +24,6 @@ export interface PageResponse {
|
|
|
24
24
|
slug: string;
|
|
25
25
|
status: PageStatus;
|
|
26
26
|
title: { [key: string]: string };
|
|
27
|
-
/**
|
|
28
|
-
* PageBlock[] serialized as JSON-string. ts-proto without oneofs
|
|
29
|
-
* turns discriminated unions into a soup of optional fields; keep
|
|
30
|
-
* the typed union on the gateway side via zod instead.
|
|
31
|
-
*/
|
|
32
27
|
blocksJson: string;
|
|
33
28
|
coverImage?: string | undefined;
|
|
34
29
|
coverImageId?: string | undefined;
|
package/gen/payment.ts
CHANGED
|
@@ -86,7 +86,6 @@ export interface ListPaymentsResponse {
|
|
|
86
86
|
|
|
87
87
|
export interface CaptureRequest {
|
|
88
88
|
id: string;
|
|
89
|
-
/** 0 → captures full amount */
|
|
90
89
|
amount: number;
|
|
91
90
|
actorId: string;
|
|
92
91
|
}
|
|
@@ -99,7 +98,6 @@ export interface CancelRequest {
|
|
|
99
98
|
|
|
100
99
|
export interface RefundRequest {
|
|
101
100
|
id: string;
|
|
102
|
-
/** 0 → full refund of captured */
|
|
103
101
|
amount: number;
|
|
104
102
|
reason: string;
|
|
105
103
|
actorId: string;
|
|
@@ -142,8 +140,6 @@ export interface PaymentResponse {
|
|
|
142
140
|
export const PAYMENT_V1_PACKAGE_NAME = "payment.v1";
|
|
143
141
|
|
|
144
142
|
export interface PaymentServiceClient {
|
|
145
|
-
/** CreateInvoice — провайдер створює інвойс у режимі hold (2-stage). */
|
|
146
|
-
|
|
147
143
|
createInvoice(request: CreateInvoiceRequest): Observable<PaymentResponse>;
|
|
148
144
|
|
|
149
145
|
getPayment(request: GetPaymentRequest): Observable<PaymentResponse>;
|
|
@@ -152,28 +148,14 @@ export interface PaymentServiceClient {
|
|
|
152
148
|
|
|
153
149
|
listPayments(request: ListPaymentsRequest): Observable<ListPaymentsResponse>;
|
|
154
150
|
|
|
155
|
-
/** Capture — фіксація списання раніше зарезервованих коштів. */
|
|
156
|
-
|
|
157
151
|
capture(request: CaptureRequest): Observable<PaymentResponse>;
|
|
158
152
|
|
|
159
|
-
/** Cancel — повне скасування hold (без списання). */
|
|
160
|
-
|
|
161
153
|
cancel(request: CancelRequest): Observable<PaymentResponse>;
|
|
162
154
|
|
|
163
|
-
/** Refund — повернення вже captured коштів (повне або часткове). */
|
|
164
|
-
|
|
165
155
|
refund(request: RefundRequest): Observable<PaymentResponse>;
|
|
166
156
|
|
|
167
|
-
/** SyncStatus — підтягує актуальний статус від провайдера (manual reconciliation). */
|
|
168
|
-
|
|
169
157
|
syncStatus(request: SyncStatusRequest): Observable<PaymentResponse>;
|
|
170
158
|
|
|
171
|
-
/**
|
|
172
|
-
* RegenerateInvoice — створює новий invoice у провайдера для існуючого Payment.
|
|
173
|
-
* Використовується коли paymentUrl застарів (TTL у Mono ≈ 24г) або клієнт
|
|
174
|
-
* загубив SMS — менеджер ділиться новим лінком через адмін UI.
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
159
|
regenerateInvoice(request: RegenerateInvoiceRequest): Observable<PaymentResponse>;
|
|
178
160
|
|
|
179
161
|
listProviders(request: ListProvidersRequest): Observable<ListProvidersResponse>;
|
|
@@ -182,8 +164,6 @@ export interface PaymentServiceClient {
|
|
|
182
164
|
}
|
|
183
165
|
|
|
184
166
|
export interface PaymentServiceController {
|
|
185
|
-
/** CreateInvoice — провайдер створює інвойс у режимі hold (2-stage). */
|
|
186
|
-
|
|
187
167
|
createInvoice(
|
|
188
168
|
request: CreateInvoiceRequest,
|
|
189
169
|
): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
@@ -198,28 +178,14 @@ export interface PaymentServiceController {
|
|
|
198
178
|
request: ListPaymentsRequest,
|
|
199
179
|
): Promise<ListPaymentsResponse> | Observable<ListPaymentsResponse> | ListPaymentsResponse;
|
|
200
180
|
|
|
201
|
-
/** Capture — фіксація списання раніше зарезервованих коштів. */
|
|
202
|
-
|
|
203
181
|
capture(request: CaptureRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
204
182
|
|
|
205
|
-
/** Cancel — повне скасування hold (без списання). */
|
|
206
|
-
|
|
207
183
|
cancel(request: CancelRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
208
184
|
|
|
209
|
-
/** Refund — повернення вже captured коштів (повне або часткове). */
|
|
210
|
-
|
|
211
185
|
refund(request: RefundRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
212
186
|
|
|
213
|
-
/** SyncStatus — підтягує актуальний статус від провайдера (manual reconciliation). */
|
|
214
|
-
|
|
215
187
|
syncStatus(request: SyncStatusRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
216
188
|
|
|
217
|
-
/**
|
|
218
|
-
* RegenerateInvoice — створює новий invoice у провайдера для існуючого Payment.
|
|
219
|
-
* Використовується коли paymentUrl застарів (TTL у Mono ≈ 24г) або клієнт
|
|
220
|
-
* загубив SMS — менеджер ділиться новим лінком через адмін UI.
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
189
|
regenerateInvoice(
|
|
224
190
|
request: RegenerateInvoiceRequest,
|
|
225
191
|
): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
package/gen/pickup.ts
CHANGED
|
@@ -20,10 +20,7 @@ export interface PickupPointResponse {
|
|
|
20
20
|
lat?: number | undefined;
|
|
21
21
|
lng?: number | undefined;
|
|
22
22
|
isActive: boolean;
|
|
23
|
-
code1c?:
|
|
24
|
-
| string
|
|
25
|
-
| undefined;
|
|
26
|
-
/** JSON-encoded WeekSchedule */
|
|
23
|
+
code1c?: string | undefined;
|
|
27
24
|
schedule?: string | undefined;
|
|
28
25
|
}
|
|
29
26
|
|
|
@@ -74,7 +71,6 @@ export interface PickupStockItemResponse {
|
|
|
74
71
|
productId: string;
|
|
75
72
|
variantId?: string | undefined;
|
|
76
73
|
qty: number;
|
|
77
|
-
/** "MANUAL" | "SYNC_1C" */
|
|
78
74
|
source: string;
|
|
79
75
|
updatedAt: string;
|
|
80
76
|
pickupPointName?: string | undefined;
|
|
@@ -95,17 +91,13 @@ export interface SetPickupStockRequest {
|
|
|
95
91
|
productId: string;
|
|
96
92
|
variantId?: string | undefined;
|
|
97
93
|
qty: number;
|
|
98
|
-
/** default MANUAL */
|
|
99
94
|
source?: string | undefined;
|
|
100
95
|
}
|
|
101
96
|
|
|
102
97
|
export interface AdjustPickupStockRequest {
|
|
103
98
|
pickupPointId: string;
|
|
104
99
|
productId: string;
|
|
105
|
-
variantId?:
|
|
106
|
-
| string
|
|
107
|
-
| undefined;
|
|
108
|
-
/** positive = add, negative = subtract */
|
|
100
|
+
variantId?: string | undefined;
|
|
109
101
|
delta: number;
|
|
110
102
|
}
|
|
111
103
|
|
|
@@ -113,7 +105,6 @@ export interface BulkSetPickupStockRequest {
|
|
|
113
105
|
items: SetPickupStockRequest[];
|
|
114
106
|
}
|
|
115
107
|
|
|
116
|
-
/** Масова синхронізація з 1С: масив рядків вигляду "code1c:productGuid1c:variantGuid1c?:qty" */
|
|
117
108
|
export interface BulkSyncFromOnecRequest {
|
|
118
109
|
entries: OnecStockEntry[];
|
|
119
110
|
}
|
|
@@ -128,8 +119,6 @@ export interface OnecStockEntry {
|
|
|
128
119
|
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
129
120
|
|
|
130
121
|
export interface PickupPointServiceClient {
|
|
131
|
-
/** Pickup points CRUD */
|
|
132
|
-
|
|
133
122
|
getPickupPoints(request: GetPickupPointsRequest): Observable<GetPickupPointsResponse>;
|
|
134
123
|
|
|
135
124
|
getPickupPoint(request: GetPickupPointRequest): Observable<PickupPointResponse>;
|
|
@@ -140,8 +129,6 @@ export interface PickupPointServiceClient {
|
|
|
140
129
|
|
|
141
130
|
deletePickupPoint(request: DeletePickupPointRequest): Observable<DeleteResponse>;
|
|
142
131
|
|
|
143
|
-
/** Stock per pickup point */
|
|
144
|
-
|
|
145
132
|
getPickupStock(request: GetPickupStockRequest): Observable<GetPickupStockResponse>;
|
|
146
133
|
|
|
147
134
|
setPickupStock(request: SetPickupStockRequest): Observable<PickupStockItemResponse>;
|
|
@@ -154,8 +141,6 @@ export interface PickupPointServiceClient {
|
|
|
154
141
|
}
|
|
155
142
|
|
|
156
143
|
export interface PickupPointServiceController {
|
|
157
|
-
/** Pickup points CRUD */
|
|
158
|
-
|
|
159
144
|
getPickupPoints(
|
|
160
145
|
request: GetPickupPointsRequest,
|
|
161
146
|
): Promise<GetPickupPointsResponse> | Observable<GetPickupPointsResponse> | GetPickupPointsResponse;
|
|
@@ -176,8 +161,6 @@ export interface PickupPointServiceController {
|
|
|
176
161
|
request: DeletePickupPointRequest,
|
|
177
162
|
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
178
163
|
|
|
179
|
-
/** Stock per pickup point */
|
|
180
|
-
|
|
181
164
|
getPickupStock(
|
|
182
165
|
request: GetPickupStockRequest,
|
|
183
166
|
): Promise<GetPickupStockResponse> | Observable<GetPickupStockResponse> | GetPickupStockResponse;
|