@arbiwallet/contracts 1.0.112 → 1.0.113
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 +138 -0
- package/package.json +1 -1
- package/proto/content.proto +73 -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 GetPublicDocumentBySlugRequest {
|
|
43
|
+
slug: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface GetPublicDocumentBySlugResponse {
|
|
47
|
+
document: Document | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
35
50
|
export interface GetPublicStoriesRequest {
|
|
36
51
|
}
|
|
37
52
|
|
|
@@ -265,6 +280,46 @@ export interface ReorderBlogsRequest {
|
|
|
265
280
|
export interface ReorderBlogsResponse {
|
|
266
281
|
}
|
|
267
282
|
|
|
283
|
+
export interface CreateDocumentRequest {
|
|
284
|
+
title: string;
|
|
285
|
+
slug: string;
|
|
286
|
+
body: string;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface CreateDocumentResponse {
|
|
290
|
+
document: Document | undefined;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface GetDocumentsRequest {
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface GetDocumentsResponse {
|
|
297
|
+
documents: Document[];
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface GetDocumentBySlugRequest {
|
|
301
|
+
slug: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface GetDocumentBySlugResponse {
|
|
305
|
+
document: Document | undefined;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface UpdateDocumentRequest {
|
|
309
|
+
document: Document | undefined;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface UpdateDocumentResponse {
|
|
313
|
+
document: Document | undefined;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface DeleteDocumentRequest {
|
|
317
|
+
id: number;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface DeleteDocumentResponse {
|
|
321
|
+
}
|
|
322
|
+
|
|
268
323
|
export interface CreateStoryRequest {
|
|
269
324
|
iconUrl: string;
|
|
270
325
|
title: string;
|
|
@@ -354,6 +409,15 @@ export interface Blog {
|
|
|
354
409
|
order: number;
|
|
355
410
|
}
|
|
356
411
|
|
|
412
|
+
export interface Document {
|
|
413
|
+
id: number;
|
|
414
|
+
title: string;
|
|
415
|
+
slug: string;
|
|
416
|
+
body: string;
|
|
417
|
+
createdAt: string;
|
|
418
|
+
updatedAt: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
357
421
|
export interface Story {
|
|
358
422
|
id: number;
|
|
359
423
|
iconUrl: string;
|
|
@@ -476,6 +540,10 @@ export interface PublicContentServiceClient {
|
|
|
476
540
|
|
|
477
541
|
getPublicBlogs(request: GetPublicBlogsRequest): Observable<GetPublicBlogsResponse>;
|
|
478
542
|
|
|
543
|
+
getPublicDocuments(request: GetPublicDocumentsRequest): Observable<GetPublicDocumentsResponse>;
|
|
544
|
+
|
|
545
|
+
getPublicDocumentBySlug(request: GetPublicDocumentBySlugRequest): Observable<GetPublicDocumentBySlugResponse>;
|
|
546
|
+
|
|
479
547
|
getPublicStories(request: GetPublicStoriesRequest): Observable<GetPublicStoriesResponse>;
|
|
480
548
|
}
|
|
481
549
|
|
|
@@ -500,6 +568,17 @@ export interface PublicContentServiceController {
|
|
|
500
568
|
request: GetPublicBlogsRequest,
|
|
501
569
|
): Promise<GetPublicBlogsResponse> | Observable<GetPublicBlogsResponse> | GetPublicBlogsResponse;
|
|
502
570
|
|
|
571
|
+
getPublicDocuments(
|
|
572
|
+
request: GetPublicDocumentsRequest,
|
|
573
|
+
): Promise<GetPublicDocumentsResponse> | Observable<GetPublicDocumentsResponse> | GetPublicDocumentsResponse;
|
|
574
|
+
|
|
575
|
+
getPublicDocumentBySlug(
|
|
576
|
+
request: GetPublicDocumentBySlugRequest,
|
|
577
|
+
):
|
|
578
|
+
| Promise<GetPublicDocumentBySlugResponse>
|
|
579
|
+
| Observable<GetPublicDocumentBySlugResponse>
|
|
580
|
+
| GetPublicDocumentBySlugResponse;
|
|
581
|
+
|
|
503
582
|
getPublicStories(
|
|
504
583
|
request: GetPublicStoriesRequest,
|
|
505
584
|
): Promise<GetPublicStoriesResponse> | Observable<GetPublicStoriesResponse> | GetPublicStoriesResponse;
|
|
@@ -513,6 +592,8 @@ export function PublicContentServiceControllerMethods() {
|
|
|
513
592
|
"getPublicFilials",
|
|
514
593
|
"getPublicPartners",
|
|
515
594
|
"getPublicBlogs",
|
|
595
|
+
"getPublicDocuments",
|
|
596
|
+
"getPublicDocumentBySlug",
|
|
516
597
|
"getPublicStories",
|
|
517
598
|
];
|
|
518
599
|
for (const method of grpcMethods) {
|
|
@@ -711,6 +792,63 @@ export function BlogServiceControllerMethods() {
|
|
|
711
792
|
|
|
712
793
|
export const BLOG_SERVICE_NAME = "BlogService";
|
|
713
794
|
|
|
795
|
+
export interface DocumentServiceClient {
|
|
796
|
+
createDocument(request: CreateDocumentRequest): Observable<CreateDocumentResponse>;
|
|
797
|
+
|
|
798
|
+
getDocuments(request: GetDocumentsRequest): Observable<GetDocumentsResponse>;
|
|
799
|
+
|
|
800
|
+
getDocumentBySlug(request: GetDocumentBySlugRequest): Observable<GetDocumentBySlugResponse>;
|
|
801
|
+
|
|
802
|
+
updateDocument(request: UpdateDocumentRequest): Observable<UpdateDocumentResponse>;
|
|
803
|
+
|
|
804
|
+
deleteDocument(request: DeleteDocumentRequest): Observable<DeleteDocumentResponse>;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export interface DocumentServiceController {
|
|
808
|
+
createDocument(
|
|
809
|
+
request: CreateDocumentRequest,
|
|
810
|
+
): Promise<CreateDocumentResponse> | Observable<CreateDocumentResponse> | CreateDocumentResponse;
|
|
811
|
+
|
|
812
|
+
getDocuments(
|
|
813
|
+
request: GetDocumentsRequest,
|
|
814
|
+
): Promise<GetDocumentsResponse> | Observable<GetDocumentsResponse> | GetDocumentsResponse;
|
|
815
|
+
|
|
816
|
+
getDocumentBySlug(
|
|
817
|
+
request: GetDocumentBySlugRequest,
|
|
818
|
+
): Promise<GetDocumentBySlugResponse> | Observable<GetDocumentBySlugResponse> | GetDocumentBySlugResponse;
|
|
819
|
+
|
|
820
|
+
updateDocument(
|
|
821
|
+
request: UpdateDocumentRequest,
|
|
822
|
+
): Promise<UpdateDocumentResponse> | Observable<UpdateDocumentResponse> | UpdateDocumentResponse;
|
|
823
|
+
|
|
824
|
+
deleteDocument(
|
|
825
|
+
request: DeleteDocumentRequest,
|
|
826
|
+
): Promise<DeleteDocumentResponse> | Observable<DeleteDocumentResponse> | DeleteDocumentResponse;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export function DocumentServiceControllerMethods() {
|
|
830
|
+
return function (constructor: Function) {
|
|
831
|
+
const grpcMethods: string[] = [
|
|
832
|
+
"createDocument",
|
|
833
|
+
"getDocuments",
|
|
834
|
+
"getDocumentBySlug",
|
|
835
|
+
"updateDocument",
|
|
836
|
+
"deleteDocument",
|
|
837
|
+
];
|
|
838
|
+
for (const method of grpcMethods) {
|
|
839
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
840
|
+
GrpcMethod("DocumentService", method)(constructor.prototype[method], method, descriptor);
|
|
841
|
+
}
|
|
842
|
+
const grpcStreamMethods: string[] = [];
|
|
843
|
+
for (const method of grpcStreamMethods) {
|
|
844
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
845
|
+
GrpcStreamMethod("DocumentService", method)(constructor.prototype[method], method, descriptor);
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
export const DOCUMENT_SERVICE_NAME = "DocumentService";
|
|
851
|
+
|
|
714
852
|
export interface StoryServiceClient {
|
|
715
853
|
createStory(request: CreateStoryRequest): Observable<CreateStoryResponse>;
|
|
716
854
|
|
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.113",
|
|
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 GetPublicDocumentBySlug (GetPublicDocumentBySlugRequest) returns (GetPublicDocumentBySlugResponse);
|
|
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 GetDocumentBySlug (GetDocumentBySlugRequest) returns (GetDocumentBySlugResponse);
|
|
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 GetPublicDocumentBySlugRequest {
|
|
102
|
+
string slug = 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message GetPublicDocumentBySlugResponse {
|
|
106
|
+
Document document = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
85
109
|
message GetPublicStoriesRequest {}
|
|
86
110
|
|
|
87
111
|
message GetPublicStoriesResponse {
|
|
@@ -305,6 +329,46 @@ message ReorderBlogsRequest {
|
|
|
305
329
|
|
|
306
330
|
message ReorderBlogsResponse {}
|
|
307
331
|
|
|
332
|
+
// --- DOCUMENT ---
|
|
333
|
+
|
|
334
|
+
message CreateDocumentRequest {
|
|
335
|
+
string title = 1;
|
|
336
|
+
string slug = 2;
|
|
337
|
+
string body = 3;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
message CreateDocumentResponse {
|
|
341
|
+
Document document = 1;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
message GetDocumentsRequest {}
|
|
345
|
+
|
|
346
|
+
message GetDocumentsResponse {
|
|
347
|
+
repeated Document documents = 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
message GetDocumentBySlugRequest {
|
|
351
|
+
string slug = 1;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
message GetDocumentBySlugResponse {
|
|
355
|
+
Document document = 1;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message UpdateDocumentRequest {
|
|
359
|
+
Document document = 1;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
message UpdateDocumentResponse {
|
|
363
|
+
Document document = 1;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
message DeleteDocumentRequest {
|
|
367
|
+
int32 id = 1;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
message DeleteDocumentResponse {}
|
|
371
|
+
|
|
308
372
|
// --- STORY ---
|
|
309
373
|
|
|
310
374
|
message CreateStoryRequest {
|
|
@@ -395,6 +459,15 @@ message Blog {
|
|
|
395
459
|
int32 order = 8;
|
|
396
460
|
}
|
|
397
461
|
|
|
462
|
+
message Document {
|
|
463
|
+
int32 id = 1;
|
|
464
|
+
string title = 2;
|
|
465
|
+
string slug = 3;
|
|
466
|
+
string body = 4;
|
|
467
|
+
string created_at = 5;
|
|
468
|
+
string updated_at = 6;
|
|
469
|
+
}
|
|
470
|
+
|
|
398
471
|
message Story {
|
|
399
472
|
int32 id = 1;
|
|
400
473
|
string icon_url = 2;
|