@neo-tickets/contracts 1.10.1 → 1.11.1

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.
@@ -2,4 +2,5 @@ export declare const PROTO_PATHS: {
2
2
  readonly AUTH: string;
3
3
  readonly ACCOUNT: string;
4
4
  readonly USERS: string;
5
+ readonly MEDIA: string;
5
6
  };
@@ -6,4 +6,5 @@ exports.PROTO_PATHS = {
6
6
  AUTH: (0, path_1.join)(__dirname, "../../proto/auth.proto"),
7
7
  ACCOUNT: (0, path_1.join)(__dirname, "../../proto/account.proto"),
8
8
  USERS: (0, path_1.join)(__dirname, "../../proto/users.proto"),
9
+ MEDIA: (0, path_1.join)(__dirname, "../../proto/media.proto"),
9
10
  };
@@ -0,0 +1,527 @@
1
+ // Code generated by protoc-gen-go. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-go v1.34.1
4
+ // protoc v7.36.2
5
+ // source: media.proto
6
+
7
+ package media
8
+
9
+ import (
10
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12
+ reflect "reflect"
13
+ sync "sync"
14
+ )
15
+
16
+ const (
17
+ // Verify that this generated code is sufficiently up-to-date.
18
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
20
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21
+ )
22
+
23
+ type UploadRequest struct {
24
+ state protoimpl.MessageState
25
+ sizeCache protoimpl.SizeCache
26
+ unknownFields protoimpl.UnknownFields
27
+
28
+ FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
29
+ Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
30
+ ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
31
+ Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
32
+ ResizeWidth *int32 `protobuf:"varint,5,opt,name=resize_width,json=resizeWidth,proto3,oneof" json:"resize_width,omitempty"`
33
+ ResizeHeight *int32 `protobuf:"varint,6,opt,name=resize_height,json=resizeHeight,proto3,oneof" json:"resize_height,omitempty"`
34
+ }
35
+
36
+ func (x *UploadRequest) Reset() {
37
+ *x = UploadRequest{}
38
+ if protoimpl.UnsafeEnabled {
39
+ mi := &file_media_proto_msgTypes[0]
40
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
41
+ ms.StoreMessageInfo(mi)
42
+ }
43
+ }
44
+
45
+ func (x *UploadRequest) String() string {
46
+ return protoimpl.X.MessageStringOf(x)
47
+ }
48
+
49
+ func (*UploadRequest) ProtoMessage() {}
50
+
51
+ func (x *UploadRequest) ProtoReflect() protoreflect.Message {
52
+ mi := &file_media_proto_msgTypes[0]
53
+ if protoimpl.UnsafeEnabled && x != nil {
54
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
55
+ if ms.LoadMessageInfo() == nil {
56
+ ms.StoreMessageInfo(mi)
57
+ }
58
+ return ms
59
+ }
60
+ return mi.MessageOf(x)
61
+ }
62
+
63
+ // Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
64
+ func (*UploadRequest) Descriptor() ([]byte, []int) {
65
+ return file_media_proto_rawDescGZIP(), []int{0}
66
+ }
67
+
68
+ func (x *UploadRequest) GetFileName() string {
69
+ if x != nil {
70
+ return x.FileName
71
+ }
72
+ return ""
73
+ }
74
+
75
+ func (x *UploadRequest) GetFolder() string {
76
+ if x != nil {
77
+ return x.Folder
78
+ }
79
+ return ""
80
+ }
81
+
82
+ func (x *UploadRequest) GetContentType() string {
83
+ if x != nil {
84
+ return x.ContentType
85
+ }
86
+ return ""
87
+ }
88
+
89
+ func (x *UploadRequest) GetData() []byte {
90
+ if x != nil {
91
+ return x.Data
92
+ }
93
+ return nil
94
+ }
95
+
96
+ func (x *UploadRequest) GetResizeWidth() int32 {
97
+ if x != nil && x.ResizeWidth != nil {
98
+ return *x.ResizeWidth
99
+ }
100
+ return 0
101
+ }
102
+
103
+ func (x *UploadRequest) GetResizeHeight() int32 {
104
+ if x != nil && x.ResizeHeight != nil {
105
+ return *x.ResizeHeight
106
+ }
107
+ return 0
108
+ }
109
+
110
+ type UploadResponse struct {
111
+ state protoimpl.MessageState
112
+ sizeCache protoimpl.SizeCache
113
+ unknownFields protoimpl.UnknownFields
114
+
115
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
116
+ }
117
+
118
+ func (x *UploadResponse) Reset() {
119
+ *x = UploadResponse{}
120
+ if protoimpl.UnsafeEnabled {
121
+ mi := &file_media_proto_msgTypes[1]
122
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
123
+ ms.StoreMessageInfo(mi)
124
+ }
125
+ }
126
+
127
+ func (x *UploadResponse) String() string {
128
+ return protoimpl.X.MessageStringOf(x)
129
+ }
130
+
131
+ func (*UploadResponse) ProtoMessage() {}
132
+
133
+ func (x *UploadResponse) ProtoReflect() protoreflect.Message {
134
+ mi := &file_media_proto_msgTypes[1]
135
+ if protoimpl.UnsafeEnabled && x != nil {
136
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
137
+ if ms.LoadMessageInfo() == nil {
138
+ ms.StoreMessageInfo(mi)
139
+ }
140
+ return ms
141
+ }
142
+ return mi.MessageOf(x)
143
+ }
144
+
145
+ // Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.
146
+ func (*UploadResponse) Descriptor() ([]byte, []int) {
147
+ return file_media_proto_rawDescGZIP(), []int{1}
148
+ }
149
+
150
+ func (x *UploadResponse) GetKey() string {
151
+ if x != nil {
152
+ return x.Key
153
+ }
154
+ return ""
155
+ }
156
+
157
+ type GetRequest struct {
158
+ state protoimpl.MessageState
159
+ sizeCache protoimpl.SizeCache
160
+ unknownFields protoimpl.UnknownFields
161
+
162
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
163
+ }
164
+
165
+ func (x *GetRequest) Reset() {
166
+ *x = GetRequest{}
167
+ if protoimpl.UnsafeEnabled {
168
+ mi := &file_media_proto_msgTypes[2]
169
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
170
+ ms.StoreMessageInfo(mi)
171
+ }
172
+ }
173
+
174
+ func (x *GetRequest) String() string {
175
+ return protoimpl.X.MessageStringOf(x)
176
+ }
177
+
178
+ func (*GetRequest) ProtoMessage() {}
179
+
180
+ func (x *GetRequest) ProtoReflect() protoreflect.Message {
181
+ mi := &file_media_proto_msgTypes[2]
182
+ if protoimpl.UnsafeEnabled && x != nil {
183
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
184
+ if ms.LoadMessageInfo() == nil {
185
+ ms.StoreMessageInfo(mi)
186
+ }
187
+ return ms
188
+ }
189
+ return mi.MessageOf(x)
190
+ }
191
+
192
+ // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
193
+ func (*GetRequest) Descriptor() ([]byte, []int) {
194
+ return file_media_proto_rawDescGZIP(), []int{2}
195
+ }
196
+
197
+ func (x *GetRequest) GetKey() string {
198
+ if x != nil {
199
+ return x.Key
200
+ }
201
+ return ""
202
+ }
203
+
204
+ type GetResponse struct {
205
+ state protoimpl.MessageState
206
+ sizeCache protoimpl.SizeCache
207
+ unknownFields protoimpl.UnknownFields
208
+
209
+ Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
210
+ }
211
+
212
+ func (x *GetResponse) Reset() {
213
+ *x = GetResponse{}
214
+ if protoimpl.UnsafeEnabled {
215
+ mi := &file_media_proto_msgTypes[3]
216
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
217
+ ms.StoreMessageInfo(mi)
218
+ }
219
+ }
220
+
221
+ func (x *GetResponse) String() string {
222
+ return protoimpl.X.MessageStringOf(x)
223
+ }
224
+
225
+ func (*GetResponse) ProtoMessage() {}
226
+
227
+ func (x *GetResponse) ProtoReflect() protoreflect.Message {
228
+ mi := &file_media_proto_msgTypes[3]
229
+ if protoimpl.UnsafeEnabled && x != nil {
230
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
231
+ if ms.LoadMessageInfo() == nil {
232
+ ms.StoreMessageInfo(mi)
233
+ }
234
+ return ms
235
+ }
236
+ return mi.MessageOf(x)
237
+ }
238
+
239
+ // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
240
+ func (*GetResponse) Descriptor() ([]byte, []int) {
241
+ return file_media_proto_rawDescGZIP(), []int{3}
242
+ }
243
+
244
+ func (x *GetResponse) GetData() []byte {
245
+ if x != nil {
246
+ return x.Data
247
+ }
248
+ return nil
249
+ }
250
+
251
+ type DeleteRequest struct {
252
+ state protoimpl.MessageState
253
+ sizeCache protoimpl.SizeCache
254
+ unknownFields protoimpl.UnknownFields
255
+
256
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
257
+ }
258
+
259
+ func (x *DeleteRequest) Reset() {
260
+ *x = DeleteRequest{}
261
+ if protoimpl.UnsafeEnabled {
262
+ mi := &file_media_proto_msgTypes[4]
263
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
264
+ ms.StoreMessageInfo(mi)
265
+ }
266
+ }
267
+
268
+ func (x *DeleteRequest) String() string {
269
+ return protoimpl.X.MessageStringOf(x)
270
+ }
271
+
272
+ func (*DeleteRequest) ProtoMessage() {}
273
+
274
+ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
275
+ mi := &file_media_proto_msgTypes[4]
276
+ if protoimpl.UnsafeEnabled && x != nil {
277
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
278
+ if ms.LoadMessageInfo() == nil {
279
+ ms.StoreMessageInfo(mi)
280
+ }
281
+ return ms
282
+ }
283
+ return mi.MessageOf(x)
284
+ }
285
+
286
+ // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
287
+ func (*DeleteRequest) Descriptor() ([]byte, []int) {
288
+ return file_media_proto_rawDescGZIP(), []int{4}
289
+ }
290
+
291
+ func (x *DeleteRequest) GetKey() string {
292
+ if x != nil {
293
+ return x.Key
294
+ }
295
+ return ""
296
+ }
297
+
298
+ type DeleteResponse struct {
299
+ state protoimpl.MessageState
300
+ sizeCache protoimpl.SizeCache
301
+ unknownFields protoimpl.UnknownFields
302
+
303
+ Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
304
+ }
305
+
306
+ func (x *DeleteResponse) Reset() {
307
+ *x = DeleteResponse{}
308
+ if protoimpl.UnsafeEnabled {
309
+ mi := &file_media_proto_msgTypes[5]
310
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
311
+ ms.StoreMessageInfo(mi)
312
+ }
313
+ }
314
+
315
+ func (x *DeleteResponse) String() string {
316
+ return protoimpl.X.MessageStringOf(x)
317
+ }
318
+
319
+ func (*DeleteResponse) ProtoMessage() {}
320
+
321
+ func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
322
+ mi := &file_media_proto_msgTypes[5]
323
+ if protoimpl.UnsafeEnabled && x != nil {
324
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
325
+ if ms.LoadMessageInfo() == nil {
326
+ ms.StoreMessageInfo(mi)
327
+ }
328
+ return ms
329
+ }
330
+ return mi.MessageOf(x)
331
+ }
332
+
333
+ // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
334
+ func (*DeleteResponse) Descriptor() ([]byte, []int) {
335
+ return file_media_proto_rawDescGZIP(), []int{5}
336
+ }
337
+
338
+ func (x *DeleteResponse) GetOk() bool {
339
+ if x != nil {
340
+ return x.Ok
341
+ }
342
+ return false
343
+ }
344
+
345
+ var File_media_proto protoreflect.FileDescriptor
346
+
347
+ var file_media_proto_rawDesc = []byte{
348
+ 0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6d,
349
+ 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x6c, 0x6f,
350
+ 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c,
351
+ 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69,
352
+ 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72,
353
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x21,
354
+ 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
355
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
356
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
357
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f,
358
+ 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x72,
359
+ 0x65, 0x73, 0x69, 0x7a, 0x65, 0x57, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a,
360
+ 0x0d, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06,
361
+ 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x48, 0x65,
362
+ 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x69,
363
+ 0x7a, 0x65, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73,
364
+ 0x69, 0x7a, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x22, 0x0a, 0x0e, 0x55, 0x70,
365
+ 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03,
366
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1e,
367
+ 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
368
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x21,
369
+ 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
370
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
371
+ 0x61, 0x22, 0x21, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
372
+ 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
373
+ 0x03, 0x6b, 0x65, 0x79, 0x22, 0x20, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
374
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01,
375
+ 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x32, 0xbc, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x64, 0x69, 0x61,
376
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61,
377
+ 0x64, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c,
378
+ 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x64,
379
+ 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70,
380
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x6d, 0x65,
381
+ 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
382
+ 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
383
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65,
384
+ 0x74, 0x65, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
385
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6d, 0x65,
386
+ 0x64, 0x69, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
387
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x37, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75,
388
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x6f, 0x2d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74,
389
+ 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
390
+ 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x62, 0x06,
391
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
392
+ }
393
+
394
+ var (
395
+ file_media_proto_rawDescOnce sync.Once
396
+ file_media_proto_rawDescData = file_media_proto_rawDesc
397
+ )
398
+
399
+ func file_media_proto_rawDescGZIP() []byte {
400
+ file_media_proto_rawDescOnce.Do(func() {
401
+ file_media_proto_rawDescData = protoimpl.X.CompressGZIP(file_media_proto_rawDescData)
402
+ })
403
+ return file_media_proto_rawDescData
404
+ }
405
+
406
+ var file_media_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
407
+ var file_media_proto_goTypes = []interface{}{
408
+ (*UploadRequest)(nil), // 0: media.v1.UploadRequest
409
+ (*UploadResponse)(nil), // 1: media.v1.UploadResponse
410
+ (*GetRequest)(nil), // 2: media.v1.GetRequest
411
+ (*GetResponse)(nil), // 3: media.v1.GetResponse
412
+ (*DeleteRequest)(nil), // 4: media.v1.DeleteRequest
413
+ (*DeleteResponse)(nil), // 5: media.v1.DeleteResponse
414
+ }
415
+ var file_media_proto_depIdxs = []int32{
416
+ 0, // 0: media.v1.MediaService.Upload:input_type -> media.v1.UploadRequest
417
+ 2, // 1: media.v1.MediaService.Get:input_type -> media.v1.GetRequest
418
+ 4, // 2: media.v1.MediaService.Delete:input_type -> media.v1.DeleteRequest
419
+ 1, // 3: media.v1.MediaService.Upload:output_type -> media.v1.UploadResponse
420
+ 3, // 4: media.v1.MediaService.Get:output_type -> media.v1.GetResponse
421
+ 5, // 5: media.v1.MediaService.Delete:output_type -> media.v1.DeleteResponse
422
+ 3, // [3:6] is the sub-list for method output_type
423
+ 0, // [0:3] is the sub-list for method input_type
424
+ 0, // [0:0] is the sub-list for extension type_name
425
+ 0, // [0:0] is the sub-list for extension extendee
426
+ 0, // [0:0] is the sub-list for field type_name
427
+ }
428
+
429
+ func init() { file_media_proto_init() }
430
+ func file_media_proto_init() {
431
+ if File_media_proto != nil {
432
+ return
433
+ }
434
+ if !protoimpl.UnsafeEnabled {
435
+ file_media_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
436
+ switch v := v.(*UploadRequest); i {
437
+ case 0:
438
+ return &v.state
439
+ case 1:
440
+ return &v.sizeCache
441
+ case 2:
442
+ return &v.unknownFields
443
+ default:
444
+ return nil
445
+ }
446
+ }
447
+ file_media_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
448
+ switch v := v.(*UploadResponse); i {
449
+ case 0:
450
+ return &v.state
451
+ case 1:
452
+ return &v.sizeCache
453
+ case 2:
454
+ return &v.unknownFields
455
+ default:
456
+ return nil
457
+ }
458
+ }
459
+ file_media_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
460
+ switch v := v.(*GetRequest); i {
461
+ case 0:
462
+ return &v.state
463
+ case 1:
464
+ return &v.sizeCache
465
+ case 2:
466
+ return &v.unknownFields
467
+ default:
468
+ return nil
469
+ }
470
+ }
471
+ file_media_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
472
+ switch v := v.(*GetResponse); i {
473
+ case 0:
474
+ return &v.state
475
+ case 1:
476
+ return &v.sizeCache
477
+ case 2:
478
+ return &v.unknownFields
479
+ default:
480
+ return nil
481
+ }
482
+ }
483
+ file_media_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
484
+ switch v := v.(*DeleteRequest); i {
485
+ case 0:
486
+ return &v.state
487
+ case 1:
488
+ return &v.sizeCache
489
+ case 2:
490
+ return &v.unknownFields
491
+ default:
492
+ return nil
493
+ }
494
+ }
495
+ file_media_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
496
+ switch v := v.(*DeleteResponse); i {
497
+ case 0:
498
+ return &v.state
499
+ case 1:
500
+ return &v.sizeCache
501
+ case 2:
502
+ return &v.unknownFields
503
+ default:
504
+ return nil
505
+ }
506
+ }
507
+ }
508
+ file_media_proto_msgTypes[0].OneofWrappers = []interface{}{}
509
+ type x struct{}
510
+ out := protoimpl.TypeBuilder{
511
+ File: protoimpl.DescBuilder{
512
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
513
+ RawDescriptor: file_media_proto_rawDesc,
514
+ NumEnums: 0,
515
+ NumMessages: 6,
516
+ NumExtensions: 0,
517
+ NumServices: 1,
518
+ },
519
+ GoTypes: file_media_proto_goTypes,
520
+ DependencyIndexes: file_media_proto_depIdxs,
521
+ MessageInfos: file_media_proto_msgTypes,
522
+ }.Build()
523
+ File_media_proto = out.File
524
+ file_media_proto_rawDesc = nil
525
+ file_media_proto_goTypes = nil
526
+ file_media_proto_depIdxs = nil
527
+ }
@@ -0,0 +1,186 @@
1
+ // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
+ // versions:
3
+ // - protoc-gen-go-grpc v1.4.0
4
+ // - protoc v7.36.2
5
+ // source: media.proto
6
+
7
+ package media
8
+
9
+ import (
10
+ context "context"
11
+ grpc "google.golang.org/grpc"
12
+ codes "google.golang.org/grpc/codes"
13
+ status "google.golang.org/grpc/status"
14
+ )
15
+
16
+ // This is a compile-time assertion to ensure that this generated file
17
+ // is compatible with the grpc package it is being compiled against.
18
+ // Requires gRPC-Go v1.62.0 or later.
19
+ const _ = grpc.SupportPackageIsVersion8
20
+
21
+ const (
22
+ MediaService_Upload_FullMethodName = "/media.v1.MediaService/Upload"
23
+ MediaService_Get_FullMethodName = "/media.v1.MediaService/Get"
24
+ MediaService_Delete_FullMethodName = "/media.v1.MediaService/Delete"
25
+ )
26
+
27
+ // MediaServiceClient is the client API for MediaService service.
28
+ //
29
+ // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
30
+ type MediaServiceClient interface {
31
+ Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
32
+ Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
33
+ Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
34
+ }
35
+
36
+ type mediaServiceClient struct {
37
+ cc grpc.ClientConnInterface
38
+ }
39
+
40
+ func NewMediaServiceClient(cc grpc.ClientConnInterface) MediaServiceClient {
41
+ return &mediaServiceClient{cc}
42
+ }
43
+
44
+ func (c *mediaServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) {
45
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
46
+ out := new(UploadResponse)
47
+ err := c.cc.Invoke(ctx, MediaService_Upload_FullMethodName, in, out, cOpts...)
48
+ if err != nil {
49
+ return nil, err
50
+ }
51
+ return out, nil
52
+ }
53
+
54
+ func (c *mediaServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
55
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
56
+ out := new(GetResponse)
57
+ err := c.cc.Invoke(ctx, MediaService_Get_FullMethodName, in, out, cOpts...)
58
+ if err != nil {
59
+ return nil, err
60
+ }
61
+ return out, nil
62
+ }
63
+
64
+ func (c *mediaServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
65
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
66
+ out := new(DeleteResponse)
67
+ err := c.cc.Invoke(ctx, MediaService_Delete_FullMethodName, in, out, cOpts...)
68
+ if err != nil {
69
+ return nil, err
70
+ }
71
+ return out, nil
72
+ }
73
+
74
+ // MediaServiceServer is the server API for MediaService service.
75
+ // All implementations must embed UnimplementedMediaServiceServer
76
+ // for forward compatibility
77
+ type MediaServiceServer interface {
78
+ Upload(context.Context, *UploadRequest) (*UploadResponse, error)
79
+ Get(context.Context, *GetRequest) (*GetResponse, error)
80
+ Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
81
+ mustEmbedUnimplementedMediaServiceServer()
82
+ }
83
+
84
+ // UnimplementedMediaServiceServer must be embedded to have forward compatible implementations.
85
+ type UnimplementedMediaServiceServer struct {
86
+ }
87
+
88
+ func (UnimplementedMediaServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error) {
89
+ return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
90
+ }
91
+ func (UnimplementedMediaServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
92
+ return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
93
+ }
94
+ func (UnimplementedMediaServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
95
+ return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
96
+ }
97
+ func (UnimplementedMediaServiceServer) mustEmbedUnimplementedMediaServiceServer() {}
98
+
99
+ // UnsafeMediaServiceServer may be embedded to opt out of forward compatibility for this service.
100
+ // Use of this interface is not recommended, as added methods to MediaServiceServer will
101
+ // result in compilation errors.
102
+ type UnsafeMediaServiceServer interface {
103
+ mustEmbedUnimplementedMediaServiceServer()
104
+ }
105
+
106
+ func RegisterMediaServiceServer(s grpc.ServiceRegistrar, srv MediaServiceServer) {
107
+ s.RegisterService(&MediaService_ServiceDesc, srv)
108
+ }
109
+
110
+ func _MediaService_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
111
+ in := new(UploadRequest)
112
+ if err := dec(in); err != nil {
113
+ return nil, err
114
+ }
115
+ if interceptor == nil {
116
+ return srv.(MediaServiceServer).Upload(ctx, in)
117
+ }
118
+ info := &grpc.UnaryServerInfo{
119
+ Server: srv,
120
+ FullMethod: MediaService_Upload_FullMethodName,
121
+ }
122
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
123
+ return srv.(MediaServiceServer).Upload(ctx, req.(*UploadRequest))
124
+ }
125
+ return interceptor(ctx, in, info, handler)
126
+ }
127
+
128
+ func _MediaService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
129
+ in := new(GetRequest)
130
+ if err := dec(in); err != nil {
131
+ return nil, err
132
+ }
133
+ if interceptor == nil {
134
+ return srv.(MediaServiceServer).Get(ctx, in)
135
+ }
136
+ info := &grpc.UnaryServerInfo{
137
+ Server: srv,
138
+ FullMethod: MediaService_Get_FullMethodName,
139
+ }
140
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
141
+ return srv.(MediaServiceServer).Get(ctx, req.(*GetRequest))
142
+ }
143
+ return interceptor(ctx, in, info, handler)
144
+ }
145
+
146
+ func _MediaService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
147
+ in := new(DeleteRequest)
148
+ if err := dec(in); err != nil {
149
+ return nil, err
150
+ }
151
+ if interceptor == nil {
152
+ return srv.(MediaServiceServer).Delete(ctx, in)
153
+ }
154
+ info := &grpc.UnaryServerInfo{
155
+ Server: srv,
156
+ FullMethod: MediaService_Delete_FullMethodName,
157
+ }
158
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
159
+ return srv.(MediaServiceServer).Delete(ctx, req.(*DeleteRequest))
160
+ }
161
+ return interceptor(ctx, in, info, handler)
162
+ }
163
+
164
+ // MediaService_ServiceDesc is the grpc.ServiceDesc for MediaService service.
165
+ // It's only intended for direct use with grpc.RegisterService,
166
+ // and not to be introspected or modified (even as a copy)
167
+ var MediaService_ServiceDesc = grpc.ServiceDesc{
168
+ ServiceName: "media.v1.MediaService",
169
+ HandlerType: (*MediaServiceServer)(nil),
170
+ Methods: []grpc.MethodDesc{
171
+ {
172
+ MethodName: "Upload",
173
+ Handler: _MediaService_Upload_Handler,
174
+ },
175
+ {
176
+ MethodName: "Get",
177
+ Handler: _MediaService_Get_Handler,
178
+ },
179
+ {
180
+ MethodName: "Delete",
181
+ Handler: _MediaService_Delete_Handler,
182
+ },
183
+ },
184
+ Streams: []grpc.StreamDesc{},
185
+ Metadata: "media.proto",
186
+ }
package/gen/ts/users.ts CHANGED
@@ -27,6 +27,7 @@ export interface CreateUserResponse {
27
27
  export interface PatchUserRequest {
28
28
  userId: string;
29
29
  name?: string | undefined;
30
+ avatar?: string | undefined;
30
31
  }
31
32
 
32
33
  export interface PatchUserResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-tickets/contracts",
3
- "version": "1.10.1",
3
+ "version": "1.11.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
package/proto/media.proto CHANGED
@@ -2,7 +2,7 @@ syntax = "proto3";
2
2
 
3
3
  package media.v1;
4
4
 
5
- option go_package = "github.com/neo-tickets/contracts/media;media";
5
+ option go_package = "github.com/neo-tickets/contracts/gen/go/media;media";
6
6
  option java_multiple_files = true;
7
7
 
8
8
  service MediaService {
package/proto/users.proto CHANGED
@@ -29,6 +29,7 @@ message PatchUserRequest {
29
29
  string user_id = 1;
30
30
 
31
31
  optional string name = 2;
32
+ optional string avatar = 3;
32
33
  }
33
34
 
34
35
  message PatchUserResponse {