@arbiwallet/contracts 1.0.112 → 1.0.114
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/content.ts +127 -0
- package/package.json +1 -1
- package/proto/content.proto +71 -0
package/gen/content.ts
CHANGED
|
@@ -32,6 +32,21 @@ export interface GetPublicBlogsResponse {
|
|
|
32
32
|
blogs: Blog[];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export interface GetPublicDocumentsRequest {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GetPublicDocumentsResponse {
|
|
39
|
+
documents: Document[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface GetPublicDocumentRequest {
|
|
43
|
+
id: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface GetPublicDocumentResponse {
|
|
47
|
+
document: Document | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
35
50
|
export interface GetPublicStoriesRequest {
|
|
36
51
|
}
|
|
37
52
|
|
|
@@ -265,6 +280,45 @@ export interface ReorderBlogsRequest {
|
|
|
265
280
|
export interface ReorderBlogsResponse {
|
|
266
281
|
}
|
|
267
282
|
|
|
283
|
+
export interface CreateDocumentRequest {
|
|
284
|
+
title: string;
|
|
285
|
+
body: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface CreateDocumentResponse {
|
|
289
|
+
document: Document | undefined;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface GetDocumentsRequest {
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface GetDocumentsResponse {
|
|
296
|
+
documents: Document[];
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface GetDocumentRequest {
|
|
300
|
+
id: number;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface GetDocumentResponse {
|
|
304
|
+
document: Document | undefined;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface UpdateDocumentRequest {
|
|
308
|
+
document: Document | undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface UpdateDocumentResponse {
|
|
312
|
+
document: Document | undefined;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface DeleteDocumentRequest {
|
|
316
|
+
id: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface DeleteDocumentResponse {
|
|
320
|
+
}
|
|
321
|
+
|
|
268
322
|
export interface CreateStoryRequest {
|
|
269
323
|
iconUrl: string;
|
|
270
324
|
title: string;
|
|
@@ -354,6 +408,14 @@ export interface Blog {
|
|
|
354
408
|
order: number;
|
|
355
409
|
}
|
|
356
410
|
|
|
411
|
+
export interface Document {
|
|
412
|
+
id: number;
|
|
413
|
+
title: string;
|
|
414
|
+
body: string;
|
|
415
|
+
createdAt: string;
|
|
416
|
+
updatedAt: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
357
419
|
export interface Story {
|
|
358
420
|
id: number;
|
|
359
421
|
iconUrl: string;
|
|
@@ -476,6 +538,10 @@ export interface PublicContentServiceClient {
|
|
|
476
538
|
|
|
477
539
|
getPublicBlogs(request: GetPublicBlogsRequest): Observable<GetPublicBlogsResponse>;
|
|
478
540
|
|
|
541
|
+
getPublicDocuments(request: GetPublicDocumentsRequest): Observable<GetPublicDocumentsResponse>;
|
|
542
|
+
|
|
543
|
+
getPublicDocument(request: GetPublicDocumentRequest): Observable<GetPublicDocumentResponse>;
|
|
544
|
+
|
|
479
545
|
getPublicStories(request: GetPublicStoriesRequest): Observable<GetPublicStoriesResponse>;
|
|
480
546
|
}
|
|
481
547
|
|
|
@@ -500,6 +566,14 @@ export interface PublicContentServiceController {
|
|
|
500
566
|
request: GetPublicBlogsRequest,
|
|
501
567
|
): Promise<GetPublicBlogsResponse> | Observable<GetPublicBlogsResponse> | GetPublicBlogsResponse;
|
|
502
568
|
|
|
569
|
+
getPublicDocuments(
|
|
570
|
+
request: GetPublicDocumentsRequest,
|
|
571
|
+
): Promise<GetPublicDocumentsResponse> | Observable<GetPublicDocumentsResponse> | GetPublicDocumentsResponse;
|
|
572
|
+
|
|
573
|
+
getPublicDocument(
|
|
574
|
+
request: GetPublicDocumentRequest,
|
|
575
|
+
): Promise<GetPublicDocumentResponse> | Observable<GetPublicDocumentResponse> | GetPublicDocumentResponse;
|
|
576
|
+
|
|
503
577
|
getPublicStories(
|
|
504
578
|
request: GetPublicStoriesRequest,
|
|
505
579
|
): Promise<GetPublicStoriesResponse> | Observable<GetPublicStoriesResponse> | GetPublicStoriesResponse;
|
|
@@ -513,6 +587,8 @@ export function PublicContentServiceControllerMethods() {
|
|
|
513
587
|
"getPublicFilials",
|
|
514
588
|
"getPublicPartners",
|
|
515
589
|
"getPublicBlogs",
|
|
590
|
+
"getPublicDocuments",
|
|
591
|
+
"getPublicDocument",
|
|
516
592
|
"getPublicStories",
|
|
517
593
|
];
|
|
518
594
|
for (const method of grpcMethods) {
|
|
@@ -711,6 +787,57 @@ export function BlogServiceControllerMethods() {
|
|
|
711
787
|
|
|
712
788
|
export const BLOG_SERVICE_NAME = "BlogService";
|
|
713
789
|
|
|
790
|
+
export interface DocumentServiceClient {
|
|
791
|
+
createDocument(request: CreateDocumentRequest): Observable<CreateDocumentResponse>;
|
|
792
|
+
|
|
793
|
+
getDocuments(request: GetDocumentsRequest): Observable<GetDocumentsResponse>;
|
|
794
|
+
|
|
795
|
+
getDocument(request: GetDocumentRequest): Observable<GetDocumentResponse>;
|
|
796
|
+
|
|
797
|
+
updateDocument(request: UpdateDocumentRequest): Observable<UpdateDocumentResponse>;
|
|
798
|
+
|
|
799
|
+
deleteDocument(request: DeleteDocumentRequest): Observable<DeleteDocumentResponse>;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export interface DocumentServiceController {
|
|
803
|
+
createDocument(
|
|
804
|
+
request: CreateDocumentRequest,
|
|
805
|
+
): Promise<CreateDocumentResponse> | Observable<CreateDocumentResponse> | CreateDocumentResponse;
|
|
806
|
+
|
|
807
|
+
getDocuments(
|
|
808
|
+
request: GetDocumentsRequest,
|
|
809
|
+
): Promise<GetDocumentsResponse> | Observable<GetDocumentsResponse> | GetDocumentsResponse;
|
|
810
|
+
|
|
811
|
+
getDocument(
|
|
812
|
+
request: GetDocumentRequest,
|
|
813
|
+
): Promise<GetDocumentResponse> | Observable<GetDocumentResponse> | GetDocumentResponse;
|
|
814
|
+
|
|
815
|
+
updateDocument(
|
|
816
|
+
request: UpdateDocumentRequest,
|
|
817
|
+
): Promise<UpdateDocumentResponse> | Observable<UpdateDocumentResponse> | UpdateDocumentResponse;
|
|
818
|
+
|
|
819
|
+
deleteDocument(
|
|
820
|
+
request: DeleteDocumentRequest,
|
|
821
|
+
): Promise<DeleteDocumentResponse> | Observable<DeleteDocumentResponse> | DeleteDocumentResponse;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export function DocumentServiceControllerMethods() {
|
|
825
|
+
return function (constructor: Function) {
|
|
826
|
+
const grpcMethods: string[] = ["createDocument", "getDocuments", "getDocument", "updateDocument", "deleteDocument"];
|
|
827
|
+
for (const method of grpcMethods) {
|
|
828
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
829
|
+
GrpcMethod("DocumentService", method)(constructor.prototype[method], method, descriptor);
|
|
830
|
+
}
|
|
831
|
+
const grpcStreamMethods: string[] = [];
|
|
832
|
+
for (const method of grpcStreamMethods) {
|
|
833
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
834
|
+
GrpcStreamMethod("DocumentService", method)(constructor.prototype[method], method, descriptor);
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export const DOCUMENT_SERVICE_NAME = "DocumentService";
|
|
840
|
+
|
|
714
841
|
export interface StoryServiceClient {
|
|
715
842
|
createStory(request: CreateStoryRequest): Observable<CreateStoryResponse>;
|
|
716
843
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.114",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/content.proto
CHANGED
|
@@ -23,6 +23,8 @@ service PublicContentService {
|
|
|
23
23
|
rpc GetPublicFilials (GetPublicFilialsRequest) returns (GetPublicFilialsResponse);
|
|
24
24
|
rpc GetPublicPartners (GetPublicPartnersRequest) returns (GetPublicPartnersResponse);
|
|
25
25
|
rpc GetPublicBlogs (GetPublicBlogsRequest) returns (GetPublicBlogsResponse);
|
|
26
|
+
rpc GetPublicDocuments (GetPublicDocumentsRequest) returns (GetPublicDocumentsResponse);
|
|
27
|
+
rpc GetPublicDocument (GetPublicDocumentRequest) returns (GetPublicDocumentResponse);
|
|
26
28
|
rpc GetPublicStories (GetPublicStoriesRequest) returns (GetPublicStoriesResponse);
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -55,6 +57,14 @@ service BlogService {
|
|
|
55
57
|
rpc ReorderBlogs (ReorderBlogsRequest) returns (ReorderBlogsResponse);
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
service DocumentService {
|
|
61
|
+
rpc CreateDocument (CreateDocumentRequest) returns (CreateDocumentResponse);
|
|
62
|
+
rpc GetDocuments (GetDocumentsRequest) returns (GetDocumentsResponse);
|
|
63
|
+
rpc GetDocument (GetDocumentRequest) returns (GetDocumentResponse);
|
|
64
|
+
rpc UpdateDocument (UpdateDocumentRequest) returns (UpdateDocumentResponse);
|
|
65
|
+
rpc DeleteDocument (DeleteDocumentRequest) returns (DeleteDocumentResponse);
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
service StoryService {
|
|
59
69
|
rpc CreateStory (CreateStoryRequest) returns (CreateStoryResponse);
|
|
60
70
|
rpc GetStories (GetStoriesRequest) returns (GetStoriesResponse);
|
|
@@ -82,6 +92,20 @@ message GetPublicBlogsResponse {
|
|
|
82
92
|
repeated Blog blogs = 1;
|
|
83
93
|
}
|
|
84
94
|
|
|
95
|
+
message GetPublicDocumentsRequest {}
|
|
96
|
+
|
|
97
|
+
message GetPublicDocumentsResponse {
|
|
98
|
+
repeated Document documents = 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message GetPublicDocumentRequest {
|
|
102
|
+
int32 id = 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message GetPublicDocumentResponse {
|
|
106
|
+
Document document = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
85
109
|
message GetPublicStoriesRequest {}
|
|
86
110
|
|
|
87
111
|
message GetPublicStoriesResponse {
|
|
@@ -305,6 +329,45 @@ message ReorderBlogsRequest {
|
|
|
305
329
|
|
|
306
330
|
message ReorderBlogsResponse {}
|
|
307
331
|
|
|
332
|
+
// --- DOCUMENT ---
|
|
333
|
+
|
|
334
|
+
message CreateDocumentRequest {
|
|
335
|
+
string title = 1;
|
|
336
|
+
string body = 2;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
message CreateDocumentResponse {
|
|
340
|
+
Document document = 1;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
message GetDocumentsRequest {}
|
|
344
|
+
|
|
345
|
+
message GetDocumentsResponse {
|
|
346
|
+
repeated Document documents = 1;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
message GetDocumentRequest {
|
|
350
|
+
int32 id = 1;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
message GetDocumentResponse {
|
|
354
|
+
Document document = 1;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
message UpdateDocumentRequest {
|
|
358
|
+
Document document = 1;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
message UpdateDocumentResponse {
|
|
362
|
+
Document document = 1;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message DeleteDocumentRequest {
|
|
366
|
+
int32 id = 1;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
message DeleteDocumentResponse {}
|
|
370
|
+
|
|
308
371
|
// --- STORY ---
|
|
309
372
|
|
|
310
373
|
message CreateStoryRequest {
|
|
@@ -395,6 +458,14 @@ message Blog {
|
|
|
395
458
|
int32 order = 8;
|
|
396
459
|
}
|
|
397
460
|
|
|
461
|
+
message Document {
|
|
462
|
+
int32 id = 1;
|
|
463
|
+
string title = 2;
|
|
464
|
+
string body = 3;
|
|
465
|
+
string created_at = 4;
|
|
466
|
+
string updated_at = 5;
|
|
467
|
+
}
|
|
468
|
+
|
|
398
469
|
message Story {
|
|
399
470
|
int32 id = 1;
|
|
400
471
|
string icon_url = 2;
|