@barumetric/contracts 1.4.11 → 1.4.12

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/ts/account.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: account.proto
6
6
 
package/gen/ts/auth.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: auth.proto
6
6
 
package/gen/ts/balance.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: balance.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: categories.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/empty.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/struct.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/timestamp.proto
6
6
 
package/gen/ts/images.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: images.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: listings.proto
6
6
 
package/gen/ts/media.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: media.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: messages.proto
6
6
 
@@ -24,7 +24,9 @@ export enum MessageType {
24
24
 
25
25
  export interface Conversation {
26
26
  id: string;
27
+ /** optional */
27
28
  listingId: string;
29
+ /** participants */
28
30
  sellerId: string;
29
31
  buyerId: string;
30
32
  lastMessageAt: Timestamp | undefined;
@@ -56,9 +58,11 @@ export interface Message {
56
58
  updatedAt: Timestamp | undefined;
57
59
  }
58
60
 
61
+ /** Requests */
59
62
  export interface GetConversationsRequest {
60
63
  userId: string;
61
64
  limit: number;
65
+ /** opaque */
62
66
  cursor: string;
63
67
  }
64
68
 
@@ -69,6 +73,7 @@ export interface GetConversationsResponse {
69
73
 
70
74
  export interface GetConversationRequest {
71
75
  conversationId: string;
76
+ /** access check */
72
77
  userId: string;
73
78
  }
74
79
 
@@ -79,6 +84,7 @@ export interface GetConversationResponse {
79
84
  export interface CreateConversationRequest {
80
85
  sellerId: string;
81
86
  buyerId: string;
87
+ /** optional */
82
88
  listingId: string;
83
89
  }
84
90
 
@@ -88,8 +94,10 @@ export interface CreateConversationResponse {
88
94
 
89
95
  export interface GetMessagesRequest {
90
96
  conversationId: string;
97
+ /** access check */
91
98
  userId: string;
92
99
  limit: number;
100
+ /** opaque */
93
101
  cursor: string;
94
102
  }
95
103
 
@@ -109,6 +117,7 @@ export interface SendMessageRequest {
109
117
  fileSize: number;
110
118
  mimeType: string;
111
119
  replyToIds: string[];
120
+ /** for idempotency / client-side correlation (optional) */
112
121
  clientMessageId: string;
113
122
  }
114
123
 
@@ -119,6 +128,7 @@ export interface SendMessageResponse {
119
128
  export interface MarkAsReadRequest {
120
129
  conversationId: string;
121
130
  userId: string;
131
+ /** if empty -> all unread from other participant */
122
132
  messageIds: string[];
123
133
  }
124
134
 
@@ -128,9 +138,11 @@ export interface MarkAsReadResponse {
128
138
 
129
139
  export interface SearchMessagesRequest {
130
140
  userId: string;
141
+ /** optional */
131
142
  conversationId: string;
132
143
  query: string;
133
144
  limit: number;
145
+ /** opaque */
134
146
  cursor: string;
135
147
  }
136
148
 
package/gen/ts/payment.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: payment.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: presence.proto
6
6
 
package/gen/ts/session.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: session.proto
6
6
 
package/gen/ts/users.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: users.proto
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,8 +18,9 @@ service MessagesService {
18
18
 
19
19
  message Conversation {
20
20
  string id = 1;
21
- string listing_id = 2;
21
+ string listing_id = 2; // optional
22
22
 
23
+ // participants
23
24
  string seller_id = 3;
24
25
  string buyer_id = 4;
25
26
 
@@ -69,10 +70,11 @@ message Message {
69
70
  google.protobuf.Timestamp updated_at = 17;
70
71
  }
71
72
 
73
+ // Requests
72
74
  message GetConversationsRequest {
73
75
  string user_id = 1;
74
76
  int32 limit = 2;
75
- string cursor = 3;
77
+ string cursor = 3; // opaque
76
78
  }
77
79
 
78
80
  message GetConversationsResponse {
@@ -82,7 +84,7 @@ message GetConversationsResponse {
82
84
 
83
85
  message GetConversationRequest {
84
86
  string conversation_id = 1;
85
- string user_id = 2;
87
+ string user_id = 2; // access check
86
88
  }
87
89
 
88
90
  message GetConversationResponse {
@@ -92,7 +94,7 @@ message GetConversationResponse {
92
94
  message CreateConversationRequest {
93
95
  string seller_id = 1;
94
96
  string buyer_id = 2;
95
- string listing_id = 3;
97
+ string listing_id = 3; // optional
96
98
  }
97
99
 
98
100
  message CreateConversationResponse {
@@ -101,9 +103,9 @@ message CreateConversationResponse {
101
103
 
102
104
  message GetMessagesRequest {
103
105
  string conversation_id = 1;
104
- string user_id = 2;
106
+ string user_id = 2; // access check
105
107
  int32 limit = 3;
106
- string cursor = 4;
108
+ string cursor = 4; // opaque
107
109
  }
108
110
 
109
111
  message GetMessagesResponse {
@@ -126,6 +128,7 @@ message SendMessageRequest {
126
128
 
127
129
  repeated string reply_to_ids = 10;
128
130
 
131
+ // for idempotency / client-side correlation (optional)
129
132
  string client_message_id = 11;
130
133
  }
131
134
 
@@ -136,7 +139,7 @@ message SendMessageResponse {
136
139
  message MarkAsReadRequest {
137
140
  string conversation_id = 1;
138
141
  string user_id = 2;
139
- repeated string message_ids = 3;
142
+ repeated string message_ids = 3; // if empty -> all unread from other participant
140
143
  }
141
144
 
142
145
  message MarkAsReadResponse {
@@ -145,14 +148,13 @@ message MarkAsReadResponse {
145
148
 
146
149
  message SearchMessagesRequest {
147
150
  string user_id = 1;
148
- string conversation_id = 2;
151
+ string conversation_id = 2; // optional
149
152
  string query = 3;
150
153
  int32 limit = 4;
151
- string cursor = 5;
154
+ string cursor = 5; // opaque
152
155
  }
153
156
 
154
157
  message SearchMessagesResponse {
155
158
  repeated Message messages = 1;
156
159
  string next_cursor = 2;
157
160
  }
158
-