@arbiwallet/contracts 1.0.93 → 1.0.95

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 CHANGED
@@ -10,11 +10,18 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "content.v1";
12
12
 
13
- export interface GetPublicContentRequest {
13
+ /** --- PUBLIC CONTENT MESSAGES --- */
14
+ export interface GetPublicBannersRequest {
14
15
  }
15
16
 
16
- export interface GetPublicContentResponse {
17
+ export interface GetPublicBannersResponse {
17
18
  banners: Banner[];
19
+ }
20
+
21
+ export interface GetPublicFaqsRequest {
22
+ }
23
+
24
+ export interface GetPublicFaqsResponse {
18
25
  faqs: FaqItem[];
19
26
  }
20
27
 
@@ -87,6 +94,22 @@ export interface DeleteFaqItemRequest {
87
94
  export interface DeleteFaqItemResponse {
88
95
  }
89
96
 
97
+ /** --- ABOUT --- */
98
+ export interface GetAboutRequest {
99
+ }
100
+
101
+ export interface GetAboutResponse {
102
+ about: About | undefined;
103
+ }
104
+
105
+ export interface UpsertAboutRequest {
106
+ about: About | undefined;
107
+ }
108
+
109
+ export interface UpsertAboutResponse {
110
+ about: About | undefined;
111
+ }
112
+
90
113
  export interface Banner {
91
114
  id: number;
92
115
  imageUrl: string;
@@ -99,6 +122,15 @@ export interface FaqItem {
99
122
  answer: string;
100
123
  }
101
124
 
125
+ export interface About {
126
+ id: number;
127
+ imageUrl: string;
128
+ body?: string | undefined;
129
+ address?: string | undefined;
130
+ latitude?: number | undefined;
131
+ longitude?: number | undefined;
132
+ }
133
+
102
134
  export const CONTENT_V1_PACKAGE_NAME = "content.v1";
103
135
 
104
136
  export interface BannerServiceClient {
@@ -196,18 +228,24 @@ export function FaqServiceControllerMethods() {
196
228
  export const FAQ_SERVICE_NAME = "FaqService";
197
229
 
198
230
  export interface PublicContentServiceClient {
199
- getPublicContent(request: GetPublicContentRequest): Observable<GetPublicContentResponse>;
231
+ getPublicBanners(request: GetPublicBannersRequest): Observable<GetPublicBannersResponse>;
232
+
233
+ getPublicFaqs(request: GetPublicFaqsRequest): Observable<GetPublicFaqsResponse>;
200
234
  }
201
235
 
202
236
  export interface PublicContentServiceController {
203
- getPublicContent(
204
- request: GetPublicContentRequest,
205
- ): Promise<GetPublicContentResponse> | Observable<GetPublicContentResponse> | GetPublicContentResponse;
237
+ getPublicBanners(
238
+ request: GetPublicBannersRequest,
239
+ ): Promise<GetPublicBannersResponse> | Observable<GetPublicBannersResponse> | GetPublicBannersResponse;
240
+
241
+ getPublicFaqs(
242
+ request: GetPublicFaqsRequest,
243
+ ): Promise<GetPublicFaqsResponse> | Observable<GetPublicFaqsResponse> | GetPublicFaqsResponse;
206
244
  }
207
245
 
208
246
  export function PublicContentServiceControllerMethods() {
209
247
  return function (constructor: Function) {
210
- const grpcMethods: string[] = ["getPublicContent"];
248
+ const grpcMethods: string[] = ["getPublicBanners", "getPublicFaqs"];
211
249
  for (const method of grpcMethods) {
212
250
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
213
251
  GrpcMethod("PublicContentService", method)(constructor.prototype[method], method, descriptor);
@@ -221,3 +259,34 @@ export function PublicContentServiceControllerMethods() {
221
259
  }
222
260
 
223
261
  export const PUBLIC_CONTENT_SERVICE_NAME = "PublicContentService";
262
+
263
+ export interface AboutServiceClient {
264
+ getAbout(request: GetAboutRequest): Observable<GetAboutResponse>;
265
+
266
+ upsertAbout(request: UpsertAboutRequest): Observable<UpsertAboutResponse>;
267
+ }
268
+
269
+ export interface AboutServiceController {
270
+ getAbout(request: GetAboutRequest): Promise<GetAboutResponse> | Observable<GetAboutResponse> | GetAboutResponse;
271
+
272
+ upsertAbout(
273
+ request: UpsertAboutRequest,
274
+ ): Promise<UpsertAboutResponse> | Observable<UpsertAboutResponse> | UpsertAboutResponse;
275
+ }
276
+
277
+ export function AboutServiceControllerMethods() {
278
+ return function (constructor: Function) {
279
+ const grpcMethods: string[] = ["getAbout", "upsertAbout"];
280
+ for (const method of grpcMethods) {
281
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
282
+ GrpcMethod("AboutService", method)(constructor.prototype[method], method, descriptor);
283
+ }
284
+ const grpcStreamMethods: string[] = [];
285
+ for (const method of grpcStreamMethods) {
286
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
287
+ GrpcStreamMethod("AboutService", method)(constructor.prototype[method], method, descriptor);
288
+ }
289
+ };
290
+ }
291
+
292
+ export const ABOUT_SERVICE_NAME = "AboutService";
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.93",
4
+ "version": "1.0.95",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -18,16 +18,26 @@ service FaqService {
18
18
  }
19
19
 
20
20
  service PublicContentService {
21
- rpc GetPublicContent (GetPublicContentRequest) returns (GetPublicContentResponse);
21
+ rpc GetPublicBanners (GetPublicBannersRequest) returns (GetPublicBannersResponse);
22
+ rpc GetPublicFaqs (GetPublicFaqsRequest) returns (GetPublicFaqsResponse);
22
23
  }
23
24
 
24
- // --- PUBLIC CONTENT MESSAGES ---
25
+ service AboutService {
26
+ rpc GetAbout (GetAboutRequest) returns (GetAboutResponse);
27
+ rpc UpsertAbout (UpsertAboutRequest) returns (UpsertAboutResponse);
28
+ }
25
29
 
26
- message GetPublicContentRequest {}
30
+ // --- PUBLIC CONTENT MESSAGES ---
31
+ message GetPublicBannersRequest {}
27
32
 
28
- message GetPublicContentResponse {
33
+ message GetPublicBannersResponse {
29
34
  repeated Banner banners = 1;
30
- repeated FaqItem faqs = 2;
35
+ }
36
+
37
+ message GetPublicFaqsRequest {}
38
+
39
+ message GetPublicFaqsResponse {
40
+ repeated FaqItem faqs = 1;
31
41
  }
32
42
 
33
43
  // --- BANNER MESSAGES ---
@@ -98,6 +108,21 @@ message DeleteFaqItemRequest {
98
108
 
99
109
  message DeleteFaqItemResponse {}
100
110
 
111
+ // --- ABOUT ---
112
+ message GetAboutRequest {}
113
+
114
+ message GetAboutResponse {
115
+ About about = 1;
116
+ }
117
+
118
+ message UpsertAboutRequest {
119
+ About about = 1;
120
+ }
121
+
122
+ message UpsertAboutResponse {
123
+ About about = 1;
124
+ }
125
+
101
126
  // --- MODELS ---
102
127
 
103
128
  message Banner {
@@ -110,4 +135,13 @@ message FaqItem {
110
135
  int32 id = 1;
111
136
  string question = 2;
112
137
  string answer = 3;
138
+ }
139
+
140
+ message About {
141
+ int32 id = 1;
142
+ string image_url = 2;
143
+ optional string body = 3;
144
+ optional string address = 4;
145
+ optional double latitude = 5;
146
+ optional double longitude = 6;
113
147
  }