@arbiwallet/contracts 1.0.108 → 1.0.110

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/card.ts CHANGED
@@ -170,6 +170,39 @@ export interface ExecuteTopupWithLedgerResponse {
170
170
  message: string;
171
171
  }
172
172
 
173
+ export interface ExecuteCreateWithLedgerRequest {
174
+ accountId: number;
175
+ currency: string;
176
+ cardType: string;
177
+ bin: string;
178
+ requiredAmount: string;
179
+ cardHolderName: string;
180
+ phone: string;
181
+ email: string;
182
+ firstName: string;
183
+ lastName: string;
184
+ kycRequired: boolean;
185
+ idempotencySeed: string;
186
+ skipBalanceCheck: boolean;
187
+ previewOnly: boolean;
188
+ }
189
+
190
+ export interface ExecuteCreateWithLedgerResponse {
191
+ status: string;
192
+ flow: string;
193
+ requiredDebitAmount: string;
194
+ currency: string;
195
+ cardType: string;
196
+ bin: string;
197
+ cardId: number;
198
+ card: CardResponse | undefined;
199
+ message: string;
200
+ availableAmount: string;
201
+ shortfallAmount: string;
202
+ ledgerConfigured: boolean;
203
+ sufficientBalance: boolean;
204
+ }
205
+
173
206
  export interface ListCardsRequest {
174
207
  accountId: number;
175
208
  }
@@ -393,6 +426,8 @@ export interface CardServiceClient {
393
426
 
394
427
  executeTopupWithLedger(request: ExecuteTopupWithLedgerRequest): Observable<ExecuteTopupWithLedgerResponse>;
395
428
 
429
+ executeCreateWithLedger(request: ExecuteCreateWithLedgerRequest): Observable<ExecuteCreateWithLedgerResponse>;
430
+
396
431
  listCards(request: ListCardsRequest): Observable<ListCardsResponse>;
397
432
 
398
433
  listCardsPaginated(request: ListCardsPaginatedRequest): Observable<ListCardsPaginatedResponse>;
@@ -454,6 +489,13 @@ export interface CardServiceController {
454
489
  | Observable<ExecuteTopupWithLedgerResponse>
455
490
  | ExecuteTopupWithLedgerResponse;
456
491
 
492
+ executeCreateWithLedger(
493
+ request: ExecuteCreateWithLedgerRequest,
494
+ ):
495
+ | Promise<ExecuteCreateWithLedgerResponse>
496
+ | Observable<ExecuteCreateWithLedgerResponse>
497
+ | ExecuteCreateWithLedgerResponse;
498
+
457
499
  listCards(request: ListCardsRequest): Promise<ListCardsResponse> | Observable<ListCardsResponse> | ListCardsResponse;
458
500
 
459
501
  listCardsPaginated(
@@ -518,6 +560,7 @@ export function CardServiceControllerMethods() {
518
560
  "getTopupFee",
519
561
  "quoteTopupByTarget",
520
562
  "executeTopupWithLedger",
563
+ "executeCreateWithLedger",
521
564
  "listCards",
522
565
  "listCardsPaginated",
523
566
  "getCard",
package/gen/content.ts CHANGED
@@ -25,6 +25,13 @@ export interface GetPublicFaqsResponse {
25
25
  faqs: FaqItem[];
26
26
  }
27
27
 
28
+ export interface GetPublicBlogsRequest {
29
+ }
30
+
31
+ export interface GetPublicBlogsResponse {
32
+ blogs: Blog[];
33
+ }
34
+
28
35
  export interface CreateBannerRequest {
29
36
  imageUrl: string;
30
37
  order: number;
@@ -207,6 +214,50 @@ export interface GetPublicPartnersResponse {
207
214
  partners: Partner[];
208
215
  }
209
216
 
217
+ /** --- BLOG --- */
218
+ export interface CreateBlogRequest {
219
+ title: string;
220
+ body?: string | undefined;
221
+ author: string;
222
+ slug: string;
223
+ publishedAt?: string | undefined;
224
+ imageUrl: string;
225
+ order?: number | undefined;
226
+ }
227
+
228
+ export interface CreateBlogResponse {
229
+ blog: Blog | undefined;
230
+ }
231
+
232
+ export interface GetBlogsRequest {
233
+ }
234
+
235
+ export interface GetBlogsResponse {
236
+ blogs: Blog[];
237
+ }
238
+
239
+ export interface UpdateBlogRequest {
240
+ blog: Blog | undefined;
241
+ }
242
+
243
+ export interface UpdateBlogResponse {
244
+ blog: Blog | undefined;
245
+ }
246
+
247
+ export interface DeleteBlogRequest {
248
+ id: number;
249
+ }
250
+
251
+ export interface DeleteBlogResponse {
252
+ }
253
+
254
+ export interface ReorderBlogsRequest {
255
+ ids: number[];
256
+ }
257
+
258
+ export interface ReorderBlogsResponse {
259
+ }
260
+
210
261
  export interface Banner {
211
262
  id: number;
212
263
  imageUrl: string;
@@ -246,6 +297,17 @@ export interface Partner {
246
297
  order: number;
247
298
  }
248
299
 
300
+ export interface Blog {
301
+ id: number;
302
+ title: string;
303
+ body?: string | undefined;
304
+ author: string;
305
+ slug: string;
306
+ publishedAt?: string | undefined;
307
+ imageUrl: string;
308
+ order: number;
309
+ }
310
+
249
311
  export const CONTENT_V1_PACKAGE_NAME = "content.v1";
250
312
 
251
313
  export interface BannerServiceClient {
@@ -350,6 +412,8 @@ export interface PublicContentServiceClient {
350
412
  getPublicFilials(request: GetPublicFilialsRequest): Observable<GetPublicFilialsResponse>;
351
413
 
352
414
  getPublicPartners(request: GetPublicPartnersRequest): Observable<GetPublicPartnersResponse>;
415
+
416
+ getPublicBlogs(request: GetPublicBlogsRequest): Observable<GetPublicBlogsResponse>;
353
417
  }
354
418
 
355
419
  export interface PublicContentServiceController {
@@ -368,11 +432,21 @@ export interface PublicContentServiceController {
368
432
  getPublicPartners(
369
433
  request: GetPublicPartnersRequest,
370
434
  ): Promise<GetPublicPartnersResponse> | Observable<GetPublicPartnersResponse> | GetPublicPartnersResponse;
435
+
436
+ getPublicBlogs(
437
+ request: GetPublicBlogsRequest,
438
+ ): Promise<GetPublicBlogsResponse> | Observable<GetPublicBlogsResponse> | GetPublicBlogsResponse;
371
439
  }
372
440
 
373
441
  export function PublicContentServiceControllerMethods() {
374
442
  return function (constructor: Function) {
375
- const grpcMethods: string[] = ["getPublicBanners", "getPublicFaqs", "getPublicFilials", "getPublicPartners"];
443
+ const grpcMethods: string[] = [
444
+ "getPublicBanners",
445
+ "getPublicFaqs",
446
+ "getPublicFilials",
447
+ "getPublicPartners",
448
+ "getPublicBlogs",
449
+ ];
376
450
  for (const method of grpcMethods) {
377
451
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
378
452
  GrpcMethod("PublicContentService", method)(constructor.prototype[method], method, descriptor);
@@ -519,3 +593,52 @@ export function PartnerServiceControllerMethods() {
519
593
  }
520
594
 
521
595
  export const PARTNER_SERVICE_NAME = "PartnerService";
596
+
597
+ export interface BlogServiceClient {
598
+ createBlog(request: CreateBlogRequest): Observable<CreateBlogResponse>;
599
+
600
+ getBlogs(request: GetBlogsRequest): Observable<GetBlogsResponse>;
601
+
602
+ updateBlog(request: UpdateBlogRequest): Observable<UpdateBlogResponse>;
603
+
604
+ deleteBlog(request: DeleteBlogRequest): Observable<DeleteBlogResponse>;
605
+
606
+ reorderBlogs(request: ReorderBlogsRequest): Observable<ReorderBlogsResponse>;
607
+ }
608
+
609
+ export interface BlogServiceController {
610
+ createBlog(
611
+ request: CreateBlogRequest,
612
+ ): Promise<CreateBlogResponse> | Observable<CreateBlogResponse> | CreateBlogResponse;
613
+
614
+ getBlogs(request: GetBlogsRequest): Promise<GetBlogsResponse> | Observable<GetBlogsResponse> | GetBlogsResponse;
615
+
616
+ updateBlog(
617
+ request: UpdateBlogRequest,
618
+ ): Promise<UpdateBlogResponse> | Observable<UpdateBlogResponse> | UpdateBlogResponse;
619
+
620
+ deleteBlog(
621
+ request: DeleteBlogRequest,
622
+ ): Promise<DeleteBlogResponse> | Observable<DeleteBlogResponse> | DeleteBlogResponse;
623
+
624
+ reorderBlogs(
625
+ request: ReorderBlogsRequest,
626
+ ): Promise<ReorderBlogsResponse> | Observable<ReorderBlogsResponse> | ReorderBlogsResponse;
627
+ }
628
+
629
+ export function BlogServiceControllerMethods() {
630
+ return function (constructor: Function) {
631
+ const grpcMethods: string[] = ["createBlog", "getBlogs", "updateBlog", "deleteBlog", "reorderBlogs"];
632
+ for (const method of grpcMethods) {
633
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
634
+ GrpcMethod("BlogService", method)(constructor.prototype[method], method, descriptor);
635
+ }
636
+ const grpcStreamMethods: string[] = [];
637
+ for (const method of grpcStreamMethods) {
638
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
639
+ GrpcStreamMethod("BlogService", method)(constructor.prototype[method], method, descriptor);
640
+ }
641
+ };
642
+ }
643
+
644
+ export const BLOG_SERVICE_NAME = "BlogService";
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.108",
4
+ "version": "1.0.110",
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/card.proto CHANGED
@@ -14,6 +14,7 @@ service CardService {
14
14
  rpc GetTopupFee(GetTopupFeeRequest) returns (GetTopupFeeResponse);
15
15
  rpc QuoteTopupByTarget(QuoteTopupByTargetRequest) returns (QuoteTopupByTargetResponse);
16
16
  rpc ExecuteTopupWithLedger(ExecuteTopupWithLedgerRequest) returns (ExecuteTopupWithLedgerResponse);
17
+ rpc ExecuteCreateWithLedger(ExecuteCreateWithLedgerRequest) returns (ExecuteCreateWithLedgerResponse);
17
18
 
18
19
  rpc ListCards(ListCardsRequest) returns (ListCardsResponse);
19
20
  rpc ListCardsPaginated(ListCardsPaginatedRequest) returns (ListCardsPaginatedResponse);
@@ -195,6 +196,39 @@ message ExecuteTopupWithLedgerResponse {
195
196
  string message = 12;
196
197
  }
197
198
 
199
+ message ExecuteCreateWithLedgerRequest {
200
+ int64 account_id = 1;
201
+ string currency = 2;
202
+ string card_type = 3;
203
+ string bin = 4;
204
+ string required_amount = 5;
205
+ string card_holder_name = 6;
206
+ string phone = 7;
207
+ string email = 8;
208
+ string first_name = 9;
209
+ string last_name = 10;
210
+ bool kyc_required = 11;
211
+ string idempotency_seed = 12;
212
+ bool skip_balance_check = 13;
213
+ bool preview_only = 14;
214
+ }
215
+
216
+ message ExecuteCreateWithLedgerResponse {
217
+ string status = 1;
218
+ string flow = 2;
219
+ string required_debit_amount = 3;
220
+ string currency = 4;
221
+ string card_type = 5;
222
+ string bin = 6;
223
+ int64 card_id = 7;
224
+ CardResponse card = 8;
225
+ string message = 9;
226
+ string available_amount = 10;
227
+ string shortfall_amount = 11;
228
+ bool ledger_configured = 12;
229
+ bool sufficient_balance = 13;
230
+ }
231
+
198
232
 
199
233
  message ListCardsRequest {
200
234
  int64 account_id = 1;
@@ -22,6 +22,7 @@ service PublicContentService {
22
22
  rpc GetPublicFaqs (GetPublicFaqsRequest) returns (GetPublicFaqsResponse);
23
23
  rpc GetPublicFilials (GetPublicFilialsRequest) returns (GetPublicFilialsResponse);
24
24
  rpc GetPublicPartners (GetPublicPartnersRequest) returns (GetPublicPartnersResponse);
25
+ rpc GetPublicBlogs (GetPublicBlogsRequest) returns (GetPublicBlogsResponse);
25
26
  }
26
27
 
27
28
  service AboutService {
@@ -45,6 +46,14 @@ service PartnerService {
45
46
  rpc ReorderPartners (ReorderPartnersRequest) returns (ReorderPartnersResponse);
46
47
  }
47
48
 
49
+ service BlogService {
50
+ rpc CreateBlog (CreateBlogRequest) returns (CreateBlogResponse);
51
+ rpc GetBlogs (GetBlogsRequest) returns (GetBlogsResponse);
52
+ rpc UpdateBlog (UpdateBlogRequest) returns (UpdateBlogResponse);
53
+ rpc DeleteBlog (DeleteBlogRequest) returns (DeleteBlogResponse);
54
+ rpc ReorderBlogs (ReorderBlogsRequest) returns (ReorderBlogsResponse);
55
+ }
56
+
48
57
  // --- PUBLIC CONTENT MESSAGES ---
49
58
  message GetPublicBannersRequest {}
50
59
 
@@ -58,6 +67,12 @@ message GetPublicFaqsResponse {
58
67
  repeated FaqItem faqs = 1;
59
68
  }
60
69
 
70
+ message GetPublicBlogsRequest {}
71
+
72
+ message GetPublicBlogsResponse {
73
+ repeated Blog blogs = 1;
74
+ }
75
+
61
76
  // --- BANNER MESSAGES ---
62
77
 
63
78
  message CreateBannerRequest {
@@ -234,6 +249,47 @@ message GetPublicPartnersResponse {
234
249
  repeated Partner partners = 1;
235
250
  }
236
251
 
252
+ // --- BLOG ---
253
+ message CreateBlogRequest {
254
+ string title = 1;
255
+ optional string body = 2;
256
+ string author = 3;
257
+ string slug = 4;
258
+ optional string published_at = 5;
259
+ string image_url = 6;
260
+ optional int32 order = 7;
261
+ }
262
+
263
+ message CreateBlogResponse {
264
+ Blog blog = 1;
265
+ }
266
+
267
+ message GetBlogsRequest {}
268
+
269
+ message GetBlogsResponse {
270
+ repeated Blog blogs = 1;
271
+ }
272
+
273
+ message UpdateBlogRequest {
274
+ Blog blog = 1;
275
+ }
276
+
277
+ message UpdateBlogResponse {
278
+ Blog blog = 1;
279
+ }
280
+
281
+ message DeleteBlogRequest {
282
+ int32 id = 1;
283
+ }
284
+
285
+ message DeleteBlogResponse {}
286
+
287
+ message ReorderBlogsRequest {
288
+ repeated int32 ids = 1;
289
+ }
290
+
291
+ message ReorderBlogsResponse {}
292
+
237
293
  // --- MODELS ---
238
294
 
239
295
  message Banner {
@@ -273,4 +329,15 @@ message Partner {
273
329
  string title = 3;
274
330
  string url = 4;
275
331
  int32 order = 5;
332
+ }
333
+
334
+ message Blog {
335
+ int32 id = 1;
336
+ string title = 2;
337
+ optional string body = 3;
338
+ string author = 4;
339
+ string slug = 5;
340
+ optional string published_at = 6;
341
+ string image_url = 7;
342
+ int32 order = 8;
276
343
  }