@aepstore-dev/contracts 1.105.0 → 1.107.0
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/payments.d.ts +27 -0
- package/gen/payments.js +1 -0
- package/gen/payments.ts +37 -0
- package/gen/support.d.ts +154 -0
- package/gen/support.js +12 -0
- package/gen/support.ts +243 -0
- package/gen/users.d.ts +17 -0
- package/gen/users.js +1 -0
- package/gen/users.ts +26 -0
- package/package.json +1 -1
- package/proto/payments.proto +22 -0
- package/proto/support.proto +158 -0
- package/proto/users.proto +15 -0
package/gen/payments.d.ts
CHANGED
|
@@ -3,6 +3,23 @@ export declare const protobufPackage = "payments.v1";
|
|
|
3
3
|
export interface Ok {
|
|
4
4
|
ok: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface GetSupportPurchasesContextRequest {
|
|
7
|
+
userId: string;
|
|
8
|
+
/** clamped to 1..5 by payments-service */
|
|
9
|
+
limit: number;
|
|
10
|
+
}
|
|
11
|
+
export interface SupportPurchaseContext {
|
|
12
|
+
purchaseId: string;
|
|
13
|
+
status: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
completedAt: string;
|
|
16
|
+
productId: string;
|
|
17
|
+
productName: string;
|
|
18
|
+
accessStatus: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SupportPurchasesContext {
|
|
21
|
+
items: SupportPurchaseContext[];
|
|
22
|
+
}
|
|
6
23
|
/**
|
|
7
24
|
* ---------------------------------------------------------------------------
|
|
8
25
|
* Purchase / checkout / topup
|
|
@@ -638,6 +655,11 @@ export interface PaymentsServiceClient {
|
|
|
638
655
|
getMyPurchases(request: GetMyPurchasesRequest): Observable<PurchasesListResponse>;
|
|
639
656
|
getPurchase(request: GetPurchaseRequest): Observable<Purchase>;
|
|
640
657
|
refundPurchase(request: RefundPurchaseRequest): Observable<Purchase>;
|
|
658
|
+
/**
|
|
659
|
+
* Internal, read-only purchase summary for support AI. No money-provider,
|
|
660
|
+
* card, ledger, payout or withdrawal data is exposed.
|
|
661
|
+
*/
|
|
662
|
+
getSupportPurchasesContext(request: GetSupportPurchasesContextRequest): Observable<SupportPurchasesContext>;
|
|
641
663
|
/** ----- wallet ----- */
|
|
642
664
|
getWallet(request: GetWalletRequest): Observable<WalletResponse>;
|
|
643
665
|
listTransactions(request: ListTransactionsRequest): Observable<TransactionsListResponse>;
|
|
@@ -720,6 +742,11 @@ export interface PaymentsServiceController {
|
|
|
720
742
|
getMyPurchases(request: GetMyPurchasesRequest): Promise<PurchasesListResponse> | Observable<PurchasesListResponse> | PurchasesListResponse;
|
|
721
743
|
getPurchase(request: GetPurchaseRequest): Promise<Purchase> | Observable<Purchase> | Purchase;
|
|
722
744
|
refundPurchase(request: RefundPurchaseRequest): Promise<Purchase> | Observable<Purchase> | Purchase;
|
|
745
|
+
/**
|
|
746
|
+
* Internal, read-only purchase summary for support AI. No money-provider,
|
|
747
|
+
* card, ledger, payout or withdrawal data is exposed.
|
|
748
|
+
*/
|
|
749
|
+
getSupportPurchasesContext(request: GetSupportPurchasesContextRequest): Promise<SupportPurchasesContext> | Observable<SupportPurchasesContext> | SupportPurchasesContext;
|
|
723
750
|
/** ----- wallet ----- */
|
|
724
751
|
getWallet(request: GetWalletRequest): Promise<WalletResponse> | Observable<WalletResponse> | WalletResponse;
|
|
725
752
|
listTransactions(request: ListTransactionsRequest): Promise<TransactionsListResponse> | Observable<TransactionsListResponse> | TransactionsListResponse;
|
package/gen/payments.js
CHANGED
package/gen/payments.ts
CHANGED
|
@@ -14,6 +14,26 @@ export interface Ok {
|
|
|
14
14
|
ok: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export interface GetSupportPurchasesContextRequest {
|
|
18
|
+
userId: string;
|
|
19
|
+
/** clamped to 1..5 by payments-service */
|
|
20
|
+
limit: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SupportPurchaseContext {
|
|
24
|
+
purchaseId: string;
|
|
25
|
+
status: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
completedAt: string;
|
|
28
|
+
productId: string;
|
|
29
|
+
productName: string;
|
|
30
|
+
accessStatus: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface SupportPurchasesContext {
|
|
34
|
+
items: SupportPurchaseContext[];
|
|
35
|
+
}
|
|
36
|
+
|
|
17
37
|
/**
|
|
18
38
|
* ---------------------------------------------------------------------------
|
|
19
39
|
* Purchase / checkout / topup
|
|
@@ -730,6 +750,13 @@ export interface PaymentsServiceClient {
|
|
|
730
750
|
|
|
731
751
|
refundPurchase(request: RefundPurchaseRequest): Observable<Purchase>;
|
|
732
752
|
|
|
753
|
+
/**
|
|
754
|
+
* Internal, read-only purchase summary for support AI. No money-provider,
|
|
755
|
+
* card, ledger, payout or withdrawal data is exposed.
|
|
756
|
+
*/
|
|
757
|
+
|
|
758
|
+
getSupportPurchasesContext(request: GetSupportPurchasesContextRequest): Observable<SupportPurchasesContext>;
|
|
759
|
+
|
|
733
760
|
/** ----- wallet ----- */
|
|
734
761
|
|
|
735
762
|
getWallet(request: GetWalletRequest): Observable<WalletResponse>;
|
|
@@ -867,6 +894,15 @@ export interface PaymentsServiceController {
|
|
|
867
894
|
|
|
868
895
|
refundPurchase(request: RefundPurchaseRequest): Promise<Purchase> | Observable<Purchase> | Purchase;
|
|
869
896
|
|
|
897
|
+
/**
|
|
898
|
+
* Internal, read-only purchase summary for support AI. No money-provider,
|
|
899
|
+
* card, ledger, payout or withdrawal data is exposed.
|
|
900
|
+
*/
|
|
901
|
+
|
|
902
|
+
getSupportPurchasesContext(
|
|
903
|
+
request: GetSupportPurchasesContextRequest,
|
|
904
|
+
): Promise<SupportPurchasesContext> | Observable<SupportPurchasesContext> | SupportPurchasesContext;
|
|
905
|
+
|
|
870
906
|
/** ----- wallet ----- */
|
|
871
907
|
|
|
872
908
|
getWallet(request: GetWalletRequest): Promise<WalletResponse> | Observable<WalletResponse> | WalletResponse;
|
|
@@ -1027,6 +1063,7 @@ export function PaymentsServiceControllerMethods() {
|
|
|
1027
1063
|
"getMyPurchases",
|
|
1028
1064
|
"getPurchase",
|
|
1029
1065
|
"refundPurchase",
|
|
1066
|
+
"getSupportPurchasesContext",
|
|
1030
1067
|
"getWallet",
|
|
1031
1068
|
"listTransactions",
|
|
1032
1069
|
"getTransactionMonths",
|
package/gen/support.d.ts
CHANGED
|
@@ -46,6 +46,9 @@ export interface Ticket {
|
|
|
46
46
|
reportedAt: string;
|
|
47
47
|
/** SUPPORT|USER, empty when no one is expected (e.g. CLOSED) */
|
|
48
48
|
waitingFor: string;
|
|
49
|
+
/** WEB|TELEGRAM */
|
|
50
|
+
originChannel: string;
|
|
51
|
+
contactId: string;
|
|
49
52
|
}
|
|
50
53
|
export interface TicketAssignee {
|
|
51
54
|
id: string;
|
|
@@ -78,6 +81,14 @@ export interface TicketMessage {
|
|
|
78
81
|
isReadByStaff: boolean;
|
|
79
82
|
/** first known staff read timestamp for this message, '' if unread */
|
|
80
83
|
staffReadAt: string;
|
|
84
|
+
/** USER|GUEST|STAFF|AI|SYSTEM */
|
|
85
|
+
authorType: string;
|
|
86
|
+
aiCitations: AiCitation[];
|
|
87
|
+
}
|
|
88
|
+
export interface AiCitation {
|
|
89
|
+
sourceId: string;
|
|
90
|
+
title: string;
|
|
91
|
+
reference: string;
|
|
81
92
|
}
|
|
82
93
|
export interface TicketAttachment {
|
|
83
94
|
fileName: string;
|
|
@@ -327,6 +338,117 @@ export interface TicketsListResponse {
|
|
|
327
338
|
page: number;
|
|
328
339
|
limit: number;
|
|
329
340
|
}
|
|
341
|
+
export interface ChannelIdentity {
|
|
342
|
+
channel: string;
|
|
343
|
+
externalUserId: string;
|
|
344
|
+
externalChatId: string;
|
|
345
|
+
username: string;
|
|
346
|
+
displayName: string;
|
|
347
|
+
locale: string;
|
|
348
|
+
}
|
|
349
|
+
export interface GetChannelSessionRequest {
|
|
350
|
+
identity: ChannelIdentity | undefined;
|
|
351
|
+
correlationId: string;
|
|
352
|
+
}
|
|
353
|
+
export interface ChannelSession {
|
|
354
|
+
identityId: string;
|
|
355
|
+
contactId: string;
|
|
356
|
+
userId: string;
|
|
357
|
+
isLinked: boolean;
|
|
358
|
+
activeTicket: Ticket | undefined;
|
|
359
|
+
}
|
|
360
|
+
export interface CreateChannelTicketRequest {
|
|
361
|
+
identity: ChannelIdentity | undefined;
|
|
362
|
+
externalEventId: string;
|
|
363
|
+
idempotencyKey: string;
|
|
364
|
+
correlationId: string;
|
|
365
|
+
subject: string;
|
|
366
|
+
body: string;
|
|
367
|
+
category: string;
|
|
368
|
+
}
|
|
369
|
+
export interface AppendChannelMessageRequest {
|
|
370
|
+
identity: ChannelIdentity | undefined;
|
|
371
|
+
externalEventId: string;
|
|
372
|
+
idempotencyKey: string;
|
|
373
|
+
correlationId: string;
|
|
374
|
+
body: string;
|
|
375
|
+
}
|
|
376
|
+
export interface ChannelMutationResponse {
|
|
377
|
+
session: ChannelSession | undefined;
|
|
378
|
+
message: TicketMessage | undefined;
|
|
379
|
+
duplicate: boolean;
|
|
380
|
+
}
|
|
381
|
+
export interface RequestHumanHandoffRequest {
|
|
382
|
+
identity: ChannelIdentity | undefined;
|
|
383
|
+
externalEventId: string;
|
|
384
|
+
correlationId: string;
|
|
385
|
+
}
|
|
386
|
+
export interface CloseChannelTicketRequest {
|
|
387
|
+
identity: ChannelIdentity | undefined;
|
|
388
|
+
externalEventId: string;
|
|
389
|
+
correlationId: string;
|
|
390
|
+
}
|
|
391
|
+
export interface LinkChannelIdentityRequest {
|
|
392
|
+
identity: ChannelIdentity | undefined;
|
|
393
|
+
/** trusted gateway result, never accepted from the bot body */
|
|
394
|
+
userId: string;
|
|
395
|
+
correlationId: string;
|
|
396
|
+
}
|
|
397
|
+
export interface GetTelegramIntegrationRequest {
|
|
398
|
+
userId: string;
|
|
399
|
+
}
|
|
400
|
+
export interface UpdateTelegramIntegrationRequest {
|
|
401
|
+
userId: string;
|
|
402
|
+
notificationsEnabled: boolean;
|
|
403
|
+
notificationCategories: string[];
|
|
404
|
+
}
|
|
405
|
+
export interface DisconnectTelegramIntegrationRequest {
|
|
406
|
+
userId: string;
|
|
407
|
+
}
|
|
408
|
+
export interface TelegramIntegration {
|
|
409
|
+
connected: boolean;
|
|
410
|
+
identityId: string;
|
|
411
|
+
username: string;
|
|
412
|
+
linkedAt: string;
|
|
413
|
+
notificationsEnabled: boolean;
|
|
414
|
+
notificationCategories: string[];
|
|
415
|
+
}
|
|
416
|
+
export interface TelegramIntegrationMutationResponse {
|
|
417
|
+
disconnected: boolean;
|
|
418
|
+
}
|
|
419
|
+
export interface ChannelDelivery {
|
|
420
|
+
id: string;
|
|
421
|
+
channel: string;
|
|
422
|
+
recipientExternalChatId: string;
|
|
423
|
+
body: string;
|
|
424
|
+
status: string;
|
|
425
|
+
attempts: number;
|
|
426
|
+
correlationId: string;
|
|
427
|
+
createdAt: string;
|
|
428
|
+
}
|
|
429
|
+
export interface LeaseChannelDeliveriesRequest {
|
|
430
|
+
channel: string;
|
|
431
|
+
workerId: string;
|
|
432
|
+
limit: number;
|
|
433
|
+
leaseSeconds: number;
|
|
434
|
+
}
|
|
435
|
+
export interface ChannelDeliveriesResponse {
|
|
436
|
+
items: ChannelDelivery[];
|
|
437
|
+
}
|
|
438
|
+
export interface AcknowledgeChannelDeliveryRequest {
|
|
439
|
+
deliveryId: string;
|
|
440
|
+
workerId: string;
|
|
441
|
+
providerMessageId: string;
|
|
442
|
+
correlationId: string;
|
|
443
|
+
}
|
|
444
|
+
export interface FailChannelDeliveryRequest {
|
|
445
|
+
deliveryId: string;
|
|
446
|
+
workerId: string;
|
|
447
|
+
errorCode: string;
|
|
448
|
+
retryAfterMs: number;
|
|
449
|
+
permanent: boolean;
|
|
450
|
+
correlationId: string;
|
|
451
|
+
}
|
|
330
452
|
export declare const SUPPORT_V1_PACKAGE_NAME = "support.v1";
|
|
331
453
|
/**
|
|
332
454
|
* Support ticket system (G1). Enums as strings matching the DB:
|
|
@@ -356,6 +478,22 @@ export interface SupportServiceClient {
|
|
|
356
478
|
getTicketCreationBan(request: GetTicketCreationBanRequest): Observable<TicketCreationBanState>;
|
|
357
479
|
setTicketCreationBan(request: SetTicketCreationBanRequest): Observable<SupportTicketBan>;
|
|
358
480
|
clearTicketCreationBan(request: ClearTicketCreationBanRequest): Observable<TicketCreationBanState>;
|
|
481
|
+
/**
|
|
482
|
+
* Internal channel adapter API. Gateway authenticates the external channel
|
|
483
|
+
* and forwards only validated identifiers to these methods.
|
|
484
|
+
*/
|
|
485
|
+
getChannelSession(request: GetChannelSessionRequest): Observable<ChannelSession>;
|
|
486
|
+
createChannelTicket(request: CreateChannelTicketRequest): Observable<ChannelMutationResponse>;
|
|
487
|
+
appendChannelMessage(request: AppendChannelMessageRequest): Observable<ChannelMutationResponse>;
|
|
488
|
+
requestHumanHandoff(request: RequestHumanHandoffRequest): Observable<ChannelSession>;
|
|
489
|
+
closeChannelTicket(request: CloseChannelTicketRequest): Observable<ChannelSession>;
|
|
490
|
+
linkChannelIdentity(request: LinkChannelIdentityRequest): Observable<ChannelSession>;
|
|
491
|
+
getTelegramIntegration(request: GetTelegramIntegrationRequest): Observable<TelegramIntegration>;
|
|
492
|
+
updateTelegramIntegration(request: UpdateTelegramIntegrationRequest): Observable<TelegramIntegration>;
|
|
493
|
+
disconnectTelegramIntegration(request: DisconnectTelegramIntegrationRequest): Observable<TelegramIntegrationMutationResponse>;
|
|
494
|
+
leaseChannelDeliveries(request: LeaseChannelDeliveriesRequest): Observable<ChannelDeliveriesResponse>;
|
|
495
|
+
acknowledgeChannelDelivery(request: AcknowledgeChannelDeliveryRequest): Observable<ChannelDelivery>;
|
|
496
|
+
failChannelDelivery(request: FailChannelDeliveryRequest): Observable<ChannelDelivery>;
|
|
359
497
|
}
|
|
360
498
|
/**
|
|
361
499
|
* Support ticket system (G1). Enums as strings matching the DB:
|
|
@@ -385,6 +523,22 @@ export interface SupportServiceController {
|
|
|
385
523
|
getTicketCreationBan(request: GetTicketCreationBanRequest): Promise<TicketCreationBanState> | Observable<TicketCreationBanState> | TicketCreationBanState;
|
|
386
524
|
setTicketCreationBan(request: SetTicketCreationBanRequest): Promise<SupportTicketBan> | Observable<SupportTicketBan> | SupportTicketBan;
|
|
387
525
|
clearTicketCreationBan(request: ClearTicketCreationBanRequest): Promise<TicketCreationBanState> | Observable<TicketCreationBanState> | TicketCreationBanState;
|
|
526
|
+
/**
|
|
527
|
+
* Internal channel adapter API. Gateway authenticates the external channel
|
|
528
|
+
* and forwards only validated identifiers to these methods.
|
|
529
|
+
*/
|
|
530
|
+
getChannelSession(request: GetChannelSessionRequest): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
531
|
+
createChannelTicket(request: CreateChannelTicketRequest): Promise<ChannelMutationResponse> | Observable<ChannelMutationResponse> | ChannelMutationResponse;
|
|
532
|
+
appendChannelMessage(request: AppendChannelMessageRequest): Promise<ChannelMutationResponse> | Observable<ChannelMutationResponse> | ChannelMutationResponse;
|
|
533
|
+
requestHumanHandoff(request: RequestHumanHandoffRequest): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
534
|
+
closeChannelTicket(request: CloseChannelTicketRequest): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
535
|
+
linkChannelIdentity(request: LinkChannelIdentityRequest): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
536
|
+
getTelegramIntegration(request: GetTelegramIntegrationRequest): Promise<TelegramIntegration> | Observable<TelegramIntegration> | TelegramIntegration;
|
|
537
|
+
updateTelegramIntegration(request: UpdateTelegramIntegrationRequest): Promise<TelegramIntegration> | Observable<TelegramIntegration> | TelegramIntegration;
|
|
538
|
+
disconnectTelegramIntegration(request: DisconnectTelegramIntegrationRequest): Promise<TelegramIntegrationMutationResponse> | Observable<TelegramIntegrationMutationResponse> | TelegramIntegrationMutationResponse;
|
|
539
|
+
leaseChannelDeliveries(request: LeaseChannelDeliveriesRequest): Promise<ChannelDeliveriesResponse> | Observable<ChannelDeliveriesResponse> | ChannelDeliveriesResponse;
|
|
540
|
+
acknowledgeChannelDelivery(request: AcknowledgeChannelDeliveryRequest): Promise<ChannelDelivery> | Observable<ChannelDelivery> | ChannelDelivery;
|
|
541
|
+
failChannelDelivery(request: FailChannelDeliveryRequest): Promise<ChannelDelivery> | Observable<ChannelDelivery> | ChannelDelivery;
|
|
388
542
|
}
|
|
389
543
|
export declare function SupportServiceControllerMethods(): (constructor: Function) => void;
|
|
390
544
|
export declare const SUPPORT_SERVICE_NAME = "SupportService";
|
package/gen/support.js
CHANGED
|
@@ -34,6 +34,18 @@ function SupportServiceControllerMethods() {
|
|
|
34
34
|
"getTicketCreationBan",
|
|
35
35
|
"setTicketCreationBan",
|
|
36
36
|
"clearTicketCreationBan",
|
|
37
|
+
"getChannelSession",
|
|
38
|
+
"createChannelTicket",
|
|
39
|
+
"appendChannelMessage",
|
|
40
|
+
"requestHumanHandoff",
|
|
41
|
+
"closeChannelTicket",
|
|
42
|
+
"linkChannelIdentity",
|
|
43
|
+
"getTelegramIntegration",
|
|
44
|
+
"updateTelegramIntegration",
|
|
45
|
+
"disconnectTelegramIntegration",
|
|
46
|
+
"leaseChannelDeliveries",
|
|
47
|
+
"acknowledgeChannelDelivery",
|
|
48
|
+
"failChannelDelivery",
|
|
37
49
|
];
|
|
38
50
|
for (const method of grpcMethods) {
|
|
39
51
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/support.ts
CHANGED
|
@@ -58,6 +58,9 @@ export interface Ticket {
|
|
|
58
58
|
reportedAt: string;
|
|
59
59
|
/** SUPPORT|USER, empty when no one is expected (e.g. CLOSED) */
|
|
60
60
|
waitingFor: string;
|
|
61
|
+
/** WEB|TELEGRAM */
|
|
62
|
+
originChannel: string;
|
|
63
|
+
contactId: string;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
export interface TicketAssignee {
|
|
@@ -92,6 +95,15 @@ export interface TicketMessage {
|
|
|
92
95
|
isReadByStaff: boolean;
|
|
93
96
|
/** first known staff read timestamp for this message, '' if unread */
|
|
94
97
|
staffReadAt: string;
|
|
98
|
+
/** USER|GUEST|STAFF|AI|SYSTEM */
|
|
99
|
+
authorType: string;
|
|
100
|
+
aiCitations: AiCitation[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface AiCitation {
|
|
104
|
+
sourceId: string;
|
|
105
|
+
title: string;
|
|
106
|
+
reference: string;
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
export interface TicketAttachment {
|
|
@@ -371,6 +383,138 @@ export interface TicketsListResponse {
|
|
|
371
383
|
limit: number;
|
|
372
384
|
}
|
|
373
385
|
|
|
386
|
+
export interface ChannelIdentity {
|
|
387
|
+
channel: string;
|
|
388
|
+
externalUserId: string;
|
|
389
|
+
externalChatId: string;
|
|
390
|
+
username: string;
|
|
391
|
+
displayName: string;
|
|
392
|
+
locale: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface GetChannelSessionRequest {
|
|
396
|
+
identity: ChannelIdentity | undefined;
|
|
397
|
+
correlationId: string;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export interface ChannelSession {
|
|
401
|
+
identityId: string;
|
|
402
|
+
contactId: string;
|
|
403
|
+
userId: string;
|
|
404
|
+
isLinked: boolean;
|
|
405
|
+
activeTicket: Ticket | undefined;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export interface CreateChannelTicketRequest {
|
|
409
|
+
identity: ChannelIdentity | undefined;
|
|
410
|
+
externalEventId: string;
|
|
411
|
+
idempotencyKey: string;
|
|
412
|
+
correlationId: string;
|
|
413
|
+
subject: string;
|
|
414
|
+
body: string;
|
|
415
|
+
category: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export interface AppendChannelMessageRequest {
|
|
419
|
+
identity: ChannelIdentity | undefined;
|
|
420
|
+
externalEventId: string;
|
|
421
|
+
idempotencyKey: string;
|
|
422
|
+
correlationId: string;
|
|
423
|
+
body: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface ChannelMutationResponse {
|
|
427
|
+
session: ChannelSession | undefined;
|
|
428
|
+
message: TicketMessage | undefined;
|
|
429
|
+
duplicate: boolean;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface RequestHumanHandoffRequest {
|
|
433
|
+
identity: ChannelIdentity | undefined;
|
|
434
|
+
externalEventId: string;
|
|
435
|
+
correlationId: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface CloseChannelTicketRequest {
|
|
439
|
+
identity: ChannelIdentity | undefined;
|
|
440
|
+
externalEventId: string;
|
|
441
|
+
correlationId: string;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface LinkChannelIdentityRequest {
|
|
445
|
+
identity:
|
|
446
|
+
| ChannelIdentity
|
|
447
|
+
| undefined;
|
|
448
|
+
/** trusted gateway result, never accepted from the bot body */
|
|
449
|
+
userId: string;
|
|
450
|
+
correlationId: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface GetTelegramIntegrationRequest {
|
|
454
|
+
userId: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface UpdateTelegramIntegrationRequest {
|
|
458
|
+
userId: string;
|
|
459
|
+
notificationsEnabled: boolean;
|
|
460
|
+
notificationCategories: string[];
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface DisconnectTelegramIntegrationRequest {
|
|
464
|
+
userId: string;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface TelegramIntegration {
|
|
468
|
+
connected: boolean;
|
|
469
|
+
identityId: string;
|
|
470
|
+
username: string;
|
|
471
|
+
linkedAt: string;
|
|
472
|
+
notificationsEnabled: boolean;
|
|
473
|
+
notificationCategories: string[];
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface TelegramIntegrationMutationResponse {
|
|
477
|
+
disconnected: boolean;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export interface ChannelDelivery {
|
|
481
|
+
id: string;
|
|
482
|
+
channel: string;
|
|
483
|
+
recipientExternalChatId: string;
|
|
484
|
+
body: string;
|
|
485
|
+
status: string;
|
|
486
|
+
attempts: number;
|
|
487
|
+
correlationId: string;
|
|
488
|
+
createdAt: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export interface LeaseChannelDeliveriesRequest {
|
|
492
|
+
channel: string;
|
|
493
|
+
workerId: string;
|
|
494
|
+
limit: number;
|
|
495
|
+
leaseSeconds: number;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export interface ChannelDeliveriesResponse {
|
|
499
|
+
items: ChannelDelivery[];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface AcknowledgeChannelDeliveryRequest {
|
|
503
|
+
deliveryId: string;
|
|
504
|
+
workerId: string;
|
|
505
|
+
providerMessageId: string;
|
|
506
|
+
correlationId: string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface FailChannelDeliveryRequest {
|
|
510
|
+
deliveryId: string;
|
|
511
|
+
workerId: string;
|
|
512
|
+
errorCode: string;
|
|
513
|
+
retryAfterMs: number;
|
|
514
|
+
permanent: boolean;
|
|
515
|
+
correlationId: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
374
518
|
export const SUPPORT_V1_PACKAGE_NAME = "support.v1";
|
|
375
519
|
|
|
376
520
|
/**
|
|
@@ -424,6 +568,37 @@ export interface SupportServiceClient {
|
|
|
424
568
|
setTicketCreationBan(request: SetTicketCreationBanRequest): Observable<SupportTicketBan>;
|
|
425
569
|
|
|
426
570
|
clearTicketCreationBan(request: ClearTicketCreationBanRequest): Observable<TicketCreationBanState>;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Internal channel adapter API. Gateway authenticates the external channel
|
|
574
|
+
* and forwards only validated identifiers to these methods.
|
|
575
|
+
*/
|
|
576
|
+
|
|
577
|
+
getChannelSession(request: GetChannelSessionRequest): Observable<ChannelSession>;
|
|
578
|
+
|
|
579
|
+
createChannelTicket(request: CreateChannelTicketRequest): Observable<ChannelMutationResponse>;
|
|
580
|
+
|
|
581
|
+
appendChannelMessage(request: AppendChannelMessageRequest): Observable<ChannelMutationResponse>;
|
|
582
|
+
|
|
583
|
+
requestHumanHandoff(request: RequestHumanHandoffRequest): Observable<ChannelSession>;
|
|
584
|
+
|
|
585
|
+
closeChannelTicket(request: CloseChannelTicketRequest): Observable<ChannelSession>;
|
|
586
|
+
|
|
587
|
+
linkChannelIdentity(request: LinkChannelIdentityRequest): Observable<ChannelSession>;
|
|
588
|
+
|
|
589
|
+
getTelegramIntegration(request: GetTelegramIntegrationRequest): Observable<TelegramIntegration>;
|
|
590
|
+
|
|
591
|
+
updateTelegramIntegration(request: UpdateTelegramIntegrationRequest): Observable<TelegramIntegration>;
|
|
592
|
+
|
|
593
|
+
disconnectTelegramIntegration(
|
|
594
|
+
request: DisconnectTelegramIntegrationRequest,
|
|
595
|
+
): Observable<TelegramIntegrationMutationResponse>;
|
|
596
|
+
|
|
597
|
+
leaseChannelDeliveries(request: LeaseChannelDeliveriesRequest): Observable<ChannelDeliveriesResponse>;
|
|
598
|
+
|
|
599
|
+
acknowledgeChannelDelivery(request: AcknowledgeChannelDeliveryRequest): Observable<ChannelDelivery>;
|
|
600
|
+
|
|
601
|
+
failChannelDelivery(request: FailChannelDeliveryRequest): Observable<ChannelDelivery>;
|
|
427
602
|
}
|
|
428
603
|
|
|
429
604
|
/**
|
|
@@ -501,6 +676,62 @@ export interface SupportServiceController {
|
|
|
501
676
|
clearTicketCreationBan(
|
|
502
677
|
request: ClearTicketCreationBanRequest,
|
|
503
678
|
): Promise<TicketCreationBanState> | Observable<TicketCreationBanState> | TicketCreationBanState;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Internal channel adapter API. Gateway authenticates the external channel
|
|
682
|
+
* and forwards only validated identifiers to these methods.
|
|
683
|
+
*/
|
|
684
|
+
|
|
685
|
+
getChannelSession(
|
|
686
|
+
request: GetChannelSessionRequest,
|
|
687
|
+
): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
688
|
+
|
|
689
|
+
createChannelTicket(
|
|
690
|
+
request: CreateChannelTicketRequest,
|
|
691
|
+
): Promise<ChannelMutationResponse> | Observable<ChannelMutationResponse> | ChannelMutationResponse;
|
|
692
|
+
|
|
693
|
+
appendChannelMessage(
|
|
694
|
+
request: AppendChannelMessageRequest,
|
|
695
|
+
): Promise<ChannelMutationResponse> | Observable<ChannelMutationResponse> | ChannelMutationResponse;
|
|
696
|
+
|
|
697
|
+
requestHumanHandoff(
|
|
698
|
+
request: RequestHumanHandoffRequest,
|
|
699
|
+
): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
700
|
+
|
|
701
|
+
closeChannelTicket(
|
|
702
|
+
request: CloseChannelTicketRequest,
|
|
703
|
+
): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
704
|
+
|
|
705
|
+
linkChannelIdentity(
|
|
706
|
+
request: LinkChannelIdentityRequest,
|
|
707
|
+
): Promise<ChannelSession> | Observable<ChannelSession> | ChannelSession;
|
|
708
|
+
|
|
709
|
+
getTelegramIntegration(
|
|
710
|
+
request: GetTelegramIntegrationRequest,
|
|
711
|
+
): Promise<TelegramIntegration> | Observable<TelegramIntegration> | TelegramIntegration;
|
|
712
|
+
|
|
713
|
+
updateTelegramIntegration(
|
|
714
|
+
request: UpdateTelegramIntegrationRequest,
|
|
715
|
+
): Promise<TelegramIntegration> | Observable<TelegramIntegration> | TelegramIntegration;
|
|
716
|
+
|
|
717
|
+
disconnectTelegramIntegration(
|
|
718
|
+
request: DisconnectTelegramIntegrationRequest,
|
|
719
|
+
):
|
|
720
|
+
| Promise<TelegramIntegrationMutationResponse>
|
|
721
|
+
| Observable<TelegramIntegrationMutationResponse>
|
|
722
|
+
| TelegramIntegrationMutationResponse;
|
|
723
|
+
|
|
724
|
+
leaseChannelDeliveries(
|
|
725
|
+
request: LeaseChannelDeliveriesRequest,
|
|
726
|
+
): Promise<ChannelDeliveriesResponse> | Observable<ChannelDeliveriesResponse> | ChannelDeliveriesResponse;
|
|
727
|
+
|
|
728
|
+
acknowledgeChannelDelivery(
|
|
729
|
+
request: AcknowledgeChannelDeliveryRequest,
|
|
730
|
+
): Promise<ChannelDelivery> | Observable<ChannelDelivery> | ChannelDelivery;
|
|
731
|
+
|
|
732
|
+
failChannelDelivery(
|
|
733
|
+
request: FailChannelDeliveryRequest,
|
|
734
|
+
): Promise<ChannelDelivery> | Observable<ChannelDelivery> | ChannelDelivery;
|
|
504
735
|
}
|
|
505
736
|
|
|
506
737
|
export function SupportServiceControllerMethods() {
|
|
@@ -526,6 +757,18 @@ export function SupportServiceControllerMethods() {
|
|
|
526
757
|
"getTicketCreationBan",
|
|
527
758
|
"setTicketCreationBan",
|
|
528
759
|
"clearTicketCreationBan",
|
|
760
|
+
"getChannelSession",
|
|
761
|
+
"createChannelTicket",
|
|
762
|
+
"appendChannelMessage",
|
|
763
|
+
"requestHumanHandoff",
|
|
764
|
+
"closeChannelTicket",
|
|
765
|
+
"linkChannelIdentity",
|
|
766
|
+
"getTelegramIntegration",
|
|
767
|
+
"updateTelegramIntegration",
|
|
768
|
+
"disconnectTelegramIntegration",
|
|
769
|
+
"leaseChannelDeliveries",
|
|
770
|
+
"acknowledgeChannelDelivery",
|
|
771
|
+
"failChannelDelivery",
|
|
529
772
|
];
|
|
530
773
|
for (const method of grpcMethods) {
|
|
531
774
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/users.d.ts
CHANGED
|
@@ -26,6 +26,19 @@ export declare enum PremiumPeriod {
|
|
|
26
26
|
export interface Ok {
|
|
27
27
|
ok: boolean;
|
|
28
28
|
}
|
|
29
|
+
export interface GetSupportUserContextRequest {
|
|
30
|
+
userId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SupportUserContext {
|
|
33
|
+
userId: string;
|
|
34
|
+
username: string;
|
|
35
|
+
fullName: string;
|
|
36
|
+
accountStatus: string;
|
|
37
|
+
isVerified: boolean;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
locale: string;
|
|
40
|
+
roles: string[];
|
|
41
|
+
}
|
|
29
42
|
export interface User {
|
|
30
43
|
id: string;
|
|
31
44
|
email: string;
|
|
@@ -779,6 +792,8 @@ export interface UsersServiceClient {
|
|
|
779
792
|
collectUserExportData(request: CollectUserExportDataRequest): Observable<CollectUserExportDataResponse>;
|
|
780
793
|
/** Unified read for the settings page */
|
|
781
794
|
getAccountSettings(request: GetAccountSettingsRequest): Observable<AccountSettingsResponse>;
|
|
795
|
+
/** Internal, read-only and deliberately minimal context for support AI. */
|
|
796
|
+
getSupportUserContext(request: GetSupportUserContextRequest): Observable<SupportUserContext>;
|
|
782
797
|
/** Password — separate from generic createCode/verifyCode reset flow. */
|
|
783
798
|
changePassword(request: ChangePasswordRequest): Observable<Ok>;
|
|
784
799
|
}
|
|
@@ -847,6 +862,8 @@ export interface UsersServiceController {
|
|
|
847
862
|
collectUserExportData(request: CollectUserExportDataRequest): Promise<CollectUserExportDataResponse> | Observable<CollectUserExportDataResponse> | CollectUserExportDataResponse;
|
|
848
863
|
/** Unified read for the settings page */
|
|
849
864
|
getAccountSettings(request: GetAccountSettingsRequest): Promise<AccountSettingsResponse> | Observable<AccountSettingsResponse> | AccountSettingsResponse;
|
|
865
|
+
/** Internal, read-only and deliberately minimal context for support AI. */
|
|
866
|
+
getSupportUserContext(request: GetSupportUserContextRequest): Promise<SupportUserContext> | Observable<SupportUserContext> | SupportUserContext;
|
|
850
867
|
/** Password — separate from generic createCode/verifyCode reset flow. */
|
|
851
868
|
changePassword(request: ChangePasswordRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
852
869
|
}
|
package/gen/users.js
CHANGED
package/gen/users.ts
CHANGED
|
@@ -40,6 +40,21 @@ export interface Ok {
|
|
|
40
40
|
ok: boolean;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export interface GetSupportUserContextRequest {
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface SupportUserContext {
|
|
48
|
+
userId: string;
|
|
49
|
+
username: string;
|
|
50
|
+
fullName: string;
|
|
51
|
+
accountStatus: string;
|
|
52
|
+
isVerified: boolean;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
locale: string;
|
|
55
|
+
roles: string[];
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
export interface User {
|
|
44
59
|
id: string;
|
|
45
60
|
email: string;
|
|
@@ -941,6 +956,10 @@ export interface UsersServiceClient {
|
|
|
941
956
|
|
|
942
957
|
getAccountSettings(request: GetAccountSettingsRequest): Observable<AccountSettingsResponse>;
|
|
943
958
|
|
|
959
|
+
/** Internal, read-only and deliberately minimal context for support AI. */
|
|
960
|
+
|
|
961
|
+
getSupportUserContext(request: GetSupportUserContextRequest): Observable<SupportUserContext>;
|
|
962
|
+
|
|
944
963
|
/** Password — separate from generic createCode/verifyCode reset flow. */
|
|
945
964
|
|
|
946
965
|
changePassword(request: ChangePasswordRequest): Observable<Ok>;
|
|
@@ -1126,6 +1145,12 @@ export interface UsersServiceController {
|
|
|
1126
1145
|
request: GetAccountSettingsRequest,
|
|
1127
1146
|
): Promise<AccountSettingsResponse> | Observable<AccountSettingsResponse> | AccountSettingsResponse;
|
|
1128
1147
|
|
|
1148
|
+
/** Internal, read-only and deliberately minimal context for support AI. */
|
|
1149
|
+
|
|
1150
|
+
getSupportUserContext(
|
|
1151
|
+
request: GetSupportUserContextRequest,
|
|
1152
|
+
): Promise<SupportUserContext> | Observable<SupportUserContext> | SupportUserContext;
|
|
1153
|
+
|
|
1129
1154
|
/** Password — separate from generic createCode/verifyCode reset flow. */
|
|
1130
1155
|
|
|
1131
1156
|
changePassword(request: ChangePasswordRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
@@ -1172,6 +1197,7 @@ export function UsersServiceControllerMethods() {
|
|
|
1172
1197
|
"completeDataExport",
|
|
1173
1198
|
"collectUserExportData",
|
|
1174
1199
|
"getAccountSettings",
|
|
1200
|
+
"getSupportUserContext",
|
|
1175
1201
|
"changePassword",
|
|
1176
1202
|
];
|
|
1177
1203
|
for (const method of grpcMethods) {
|
package/package.json
CHANGED
package/proto/payments.proto
CHANGED
|
@@ -12,6 +12,9 @@ service PaymentsService {
|
|
|
12
12
|
rpc GetMyPurchases(GetMyPurchasesRequest) returns (PurchasesListResponse);
|
|
13
13
|
rpc GetPurchase(GetPurchaseRequest) returns (Purchase);
|
|
14
14
|
rpc RefundPurchase(RefundPurchaseRequest) returns (Purchase);
|
|
15
|
+
// Internal, read-only purchase summary for support AI. No money-provider,
|
|
16
|
+
// card, ledger, payout or withdrawal data is exposed.
|
|
17
|
+
rpc GetSupportPurchasesContext(GetSupportPurchasesContextRequest) returns (SupportPurchasesContext);
|
|
15
18
|
|
|
16
19
|
// ----- wallet -----
|
|
17
20
|
rpc GetWallet(GetWalletRequest) returns (WalletResponse);
|
|
@@ -79,6 +82,25 @@ service PaymentsService {
|
|
|
79
82
|
|
|
80
83
|
message Ok { bool ok = 1; }
|
|
81
84
|
|
|
85
|
+
message GetSupportPurchasesContextRequest {
|
|
86
|
+
string user_id = 1;
|
|
87
|
+
int32 limit = 2; // clamped to 1..5 by payments-service
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message SupportPurchaseContext {
|
|
91
|
+
string purchase_id = 1;
|
|
92
|
+
string status = 2;
|
|
93
|
+
string created_at = 3;
|
|
94
|
+
string completed_at = 4;
|
|
95
|
+
string product_id = 5;
|
|
96
|
+
string product_name = 6;
|
|
97
|
+
string access_status = 7;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message SupportPurchasesContext {
|
|
101
|
+
repeated SupportPurchaseContext items = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
82
104
|
// ---------------------------------------------------------------------------
|
|
83
105
|
// Purchase / checkout / topup
|
|
84
106
|
// ---------------------------------------------------------------------------
|
package/proto/support.proto
CHANGED
|
@@ -29,6 +29,21 @@ service SupportService {
|
|
|
29
29
|
rpc GetTicketCreationBan(GetTicketCreationBanRequest) returns (TicketCreationBanState);
|
|
30
30
|
rpc SetTicketCreationBan(SetTicketCreationBanRequest) returns (SupportTicketBan);
|
|
31
31
|
rpc ClearTicketCreationBan(ClearTicketCreationBanRequest) returns (TicketCreationBanState);
|
|
32
|
+
|
|
33
|
+
// Internal channel adapter API. Gateway authenticates the external channel
|
|
34
|
+
// and forwards only validated identifiers to these methods.
|
|
35
|
+
rpc GetChannelSession(GetChannelSessionRequest) returns (ChannelSession);
|
|
36
|
+
rpc CreateChannelTicket(CreateChannelTicketRequest) returns (ChannelMutationResponse);
|
|
37
|
+
rpc AppendChannelMessage(AppendChannelMessageRequest) returns (ChannelMutationResponse);
|
|
38
|
+
rpc RequestHumanHandoff(RequestHumanHandoffRequest) returns (ChannelSession);
|
|
39
|
+
rpc CloseChannelTicket(CloseChannelTicketRequest) returns (ChannelSession);
|
|
40
|
+
rpc LinkChannelIdentity(LinkChannelIdentityRequest) returns (ChannelSession);
|
|
41
|
+
rpc GetTelegramIntegration(GetTelegramIntegrationRequest) returns (TelegramIntegration);
|
|
42
|
+
rpc UpdateTelegramIntegration(UpdateTelegramIntegrationRequest) returns (TelegramIntegration);
|
|
43
|
+
rpc DisconnectTelegramIntegration(DisconnectTelegramIntegrationRequest) returns (TelegramIntegrationMutationResponse);
|
|
44
|
+
rpc LeaseChannelDeliveries(LeaseChannelDeliveriesRequest) returns (ChannelDeliveriesResponse);
|
|
45
|
+
rpc AcknowledgeChannelDelivery(AcknowledgeChannelDeliveryRequest) returns (ChannelDelivery);
|
|
46
|
+
rpc FailChannelDelivery(FailChannelDeliveryRequest) returns (ChannelDelivery);
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
message PingRequest { string message = 1; }
|
|
@@ -63,6 +78,8 @@ message Ticket {
|
|
|
63
78
|
TicketAssignee assignee = 26;
|
|
64
79
|
string reported_at = 27;
|
|
65
80
|
string waiting_for = 28; // SUPPORT|USER, empty when no one is expected (e.g. CLOSED)
|
|
81
|
+
string origin_channel = 29; // WEB|TELEGRAM
|
|
82
|
+
string contact_id = 30;
|
|
66
83
|
}
|
|
67
84
|
|
|
68
85
|
message TicketAssignee {
|
|
@@ -91,6 +108,14 @@ message TicketMessage {
|
|
|
91
108
|
string deleted_at = 12;
|
|
92
109
|
bool is_read_by_staff = 13; // true for user messages already read by support staff
|
|
93
110
|
string staff_read_at = 14; // first known staff read timestamp for this message, '' if unread
|
|
111
|
+
string author_type = 15; // USER|GUEST|STAFF|AI|SYSTEM
|
|
112
|
+
repeated AiCitation ai_citations = 16;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message AiCitation {
|
|
116
|
+
string source_id = 1;
|
|
117
|
+
string title = 2;
|
|
118
|
+
string reference = 3;
|
|
94
119
|
}
|
|
95
120
|
|
|
96
121
|
message TicketAttachment {
|
|
@@ -331,3 +356,136 @@ message TicketsListResponse {
|
|
|
331
356
|
int32 page = 3;
|
|
332
357
|
int32 limit = 4;
|
|
333
358
|
}
|
|
359
|
+
|
|
360
|
+
// ---------------------------------------------------------------------------
|
|
361
|
+
// Channel adapters (internal only)
|
|
362
|
+
// ---------------------------------------------------------------------------
|
|
363
|
+
|
|
364
|
+
message ChannelIdentity {
|
|
365
|
+
string channel = 1;
|
|
366
|
+
string external_user_id = 2;
|
|
367
|
+
string external_chat_id = 3;
|
|
368
|
+
string username = 4;
|
|
369
|
+
string display_name = 5;
|
|
370
|
+
string locale = 6;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
message GetChannelSessionRequest {
|
|
374
|
+
ChannelIdentity identity = 1;
|
|
375
|
+
string correlation_id = 2;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
message ChannelSession {
|
|
379
|
+
string identity_id = 1;
|
|
380
|
+
string contact_id = 2;
|
|
381
|
+
string user_id = 3;
|
|
382
|
+
bool is_linked = 4;
|
|
383
|
+
Ticket active_ticket = 5;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
message CreateChannelTicketRequest {
|
|
387
|
+
ChannelIdentity identity = 1;
|
|
388
|
+
string external_event_id = 2;
|
|
389
|
+
string idempotency_key = 3;
|
|
390
|
+
string correlation_id = 4;
|
|
391
|
+
string subject = 5;
|
|
392
|
+
string body = 6;
|
|
393
|
+
string category = 7;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
message AppendChannelMessageRequest {
|
|
397
|
+
ChannelIdentity identity = 1;
|
|
398
|
+
string external_event_id = 2;
|
|
399
|
+
string idempotency_key = 3;
|
|
400
|
+
string correlation_id = 4;
|
|
401
|
+
string body = 5;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
message ChannelMutationResponse {
|
|
405
|
+
ChannelSession session = 1;
|
|
406
|
+
TicketMessage message = 2;
|
|
407
|
+
bool duplicate = 3;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
message RequestHumanHandoffRequest {
|
|
411
|
+
ChannelIdentity identity = 1;
|
|
412
|
+
string external_event_id = 2;
|
|
413
|
+
string correlation_id = 3;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
message CloseChannelTicketRequest {
|
|
417
|
+
ChannelIdentity identity = 1;
|
|
418
|
+
string external_event_id = 2;
|
|
419
|
+
string correlation_id = 3;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
message LinkChannelIdentityRequest {
|
|
423
|
+
ChannelIdentity identity = 1;
|
|
424
|
+
string user_id = 2; // trusted gateway result, never accepted from the bot body
|
|
425
|
+
string correlation_id = 3;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
message GetTelegramIntegrationRequest {
|
|
429
|
+
string user_id = 1;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
message UpdateTelegramIntegrationRequest {
|
|
433
|
+
string user_id = 1;
|
|
434
|
+
bool notifications_enabled = 2;
|
|
435
|
+
repeated string notification_categories = 3;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
message DisconnectTelegramIntegrationRequest {
|
|
439
|
+
string user_id = 1;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
message TelegramIntegration {
|
|
443
|
+
bool connected = 1;
|
|
444
|
+
string identity_id = 2;
|
|
445
|
+
string username = 3;
|
|
446
|
+
string linked_at = 4;
|
|
447
|
+
bool notifications_enabled = 5;
|
|
448
|
+
repeated string notification_categories = 6;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
message TelegramIntegrationMutationResponse {
|
|
452
|
+
bool disconnected = 1;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
message ChannelDelivery {
|
|
456
|
+
string id = 1;
|
|
457
|
+
string channel = 2;
|
|
458
|
+
string recipient_external_chat_id = 3;
|
|
459
|
+
string body = 4;
|
|
460
|
+
string status = 5;
|
|
461
|
+
int32 attempts = 6;
|
|
462
|
+
string correlation_id = 7;
|
|
463
|
+
string created_at = 8;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message LeaseChannelDeliveriesRequest {
|
|
467
|
+
string channel = 1;
|
|
468
|
+
string worker_id = 2;
|
|
469
|
+
int32 limit = 3;
|
|
470
|
+
int32 lease_seconds = 4;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
message ChannelDeliveriesResponse {
|
|
474
|
+
repeated ChannelDelivery items = 1;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
message AcknowledgeChannelDeliveryRequest {
|
|
478
|
+
string delivery_id = 1;
|
|
479
|
+
string worker_id = 2;
|
|
480
|
+
string provider_message_id = 3;
|
|
481
|
+
string correlation_id = 4;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
message FailChannelDeliveryRequest {
|
|
485
|
+
string delivery_id = 1;
|
|
486
|
+
string worker_id = 2;
|
|
487
|
+
string error_code = 3;
|
|
488
|
+
int32 retry_after_ms = 4;
|
|
489
|
+
bool permanent = 5;
|
|
490
|
+
string correlation_id = 6;
|
|
491
|
+
}
|
package/proto/users.proto
CHANGED
|
@@ -64,12 +64,27 @@ service UsersService {
|
|
|
64
64
|
// Unified read for the settings page
|
|
65
65
|
rpc GetAccountSettings(GetAccountSettingsRequest) returns (AccountSettingsResponse);
|
|
66
66
|
|
|
67
|
+
// Internal, read-only and deliberately minimal context for support AI.
|
|
68
|
+
rpc GetSupportUserContext(GetSupportUserContextRequest) returns (SupportUserContext);
|
|
69
|
+
|
|
67
70
|
// Password — separate from generic createCode/verifyCode reset flow.
|
|
68
71
|
rpc ChangePassword(ChangePasswordRequest) returns (Ok);
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
message Ok { bool ok = 1; }
|
|
72
75
|
|
|
76
|
+
message GetSupportUserContextRequest { string user_id = 1; }
|
|
77
|
+
message SupportUserContext {
|
|
78
|
+
string user_id = 1;
|
|
79
|
+
string username = 2;
|
|
80
|
+
string full_name = 3;
|
|
81
|
+
string account_status = 4;
|
|
82
|
+
bool is_verified = 5;
|
|
83
|
+
string created_at = 6;
|
|
84
|
+
string locale = 7;
|
|
85
|
+
repeated string roles = 8;
|
|
86
|
+
}
|
|
87
|
+
|
|
73
88
|
// =================================================================
|
|
74
89
|
// Common types
|
|
75
90
|
// =================================================================
|