@toffeepay/sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/index.cjs +216 -0
- package/dist/index.d.cts +1632 -0
- package/dist/index.d.ts +1632 -0
- package/dist/index.js +184 -0
- package/package.json +42 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1632 @@
|
|
|
1
|
+
import { GenService, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
2
|
+
import { Message, MessageInitShape } from '@bufbuild/protobuf';
|
|
3
|
+
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
4
|
+
import { Client } from '@connectrpc/connect';
|
|
5
|
+
|
|
6
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
|
|
7
|
+
// @generated from file pay/v1/common.proto (package pay.v1, syntax proto3)
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Error handling
|
|
14
|
+
*
|
|
15
|
+
* @generated from message pay.v1.Error
|
|
16
|
+
*/
|
|
17
|
+
declare type Error = Message<"pay.v1.Error"> & {
|
|
18
|
+
/**
|
|
19
|
+
* @generated from field: string code = 1;
|
|
20
|
+
*/
|
|
21
|
+
code: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: string message = 2;
|
|
25
|
+
*/
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
|
|
30
|
+
// @generated from file pay/v1/payment.proto (package pay.v1, syntax proto3)
|
|
31
|
+
/* eslint-disable */
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @generated from message pay.v1.Item
|
|
37
|
+
*/
|
|
38
|
+
declare type Item = Message<"pay.v1.Item"> & {
|
|
39
|
+
/**
|
|
40
|
+
* @generated from field: string title = 1;
|
|
41
|
+
*/
|
|
42
|
+
title: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: int32 price = 2;
|
|
46
|
+
*/
|
|
47
|
+
price: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: string currency = 3;
|
|
51
|
+
*/
|
|
52
|
+
currency: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @generated from field: optional string image = 4;
|
|
56
|
+
*/
|
|
57
|
+
image?: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* ISO 3166-1 alpha-2: "US", "GB", "DE"
|
|
61
|
+
*
|
|
62
|
+
* @generated from field: optional string country = 5;
|
|
63
|
+
*/
|
|
64
|
+
country?: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @generated from message pay.v1.Tax
|
|
69
|
+
*/
|
|
70
|
+
declare type Tax = Message<"pay.v1.Tax"> & {
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: int32 amount = 1;
|
|
73
|
+
*/
|
|
74
|
+
amount: number;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @generated from message pay.v1.SessionMetadata
|
|
79
|
+
*/
|
|
80
|
+
declare type SessionMetadata = Message<"pay.v1.SessionMetadata"> & {
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: optional string offer_id = 1;
|
|
83
|
+
*/
|
|
84
|
+
offerId?: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @generated from message pay.v1.Session
|
|
89
|
+
*/
|
|
90
|
+
declare type Session = Message<"pay.v1.Session"> & {
|
|
91
|
+
/**
|
|
92
|
+
* @generated from field: string id = 1;
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @generated from field: string url = 2;
|
|
98
|
+
*/
|
|
99
|
+
url: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @generated from field: string status = 3;
|
|
103
|
+
*/
|
|
104
|
+
status: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @generated from field: string payment_id = 4 [deprecated = true];
|
|
108
|
+
* @deprecated
|
|
109
|
+
*/
|
|
110
|
+
paymentId: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @generated from field: string user_id = 5;
|
|
114
|
+
*/
|
|
115
|
+
userId: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @generated from field: string game_id = 6;
|
|
119
|
+
*/
|
|
120
|
+
gameId: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @generated from field: pay.v1.Item item = 7;
|
|
124
|
+
*/
|
|
125
|
+
item?: Item;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @generated from field: google.protobuf.Timestamp created_at = 8;
|
|
129
|
+
*/
|
|
130
|
+
createdAt?: Timestamp;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @generated from field: optional google.protobuf.Timestamp paid_at = 9;
|
|
134
|
+
*/
|
|
135
|
+
paidAt?: Timestamp;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @generated from field: optional google.protobuf.Timestamp failed_at = 10;
|
|
139
|
+
*/
|
|
140
|
+
failedAt?: Timestamp;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @generated from field: optional google.protobuf.Timestamp cancelled_at = 11;
|
|
144
|
+
*/
|
|
145
|
+
cancelledAt?: Timestamp;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: optional google.protobuf.Timestamp expired_at = 12;
|
|
149
|
+
*/
|
|
150
|
+
expiredAt?: Timestamp;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* sales tax for the session
|
|
154
|
+
*
|
|
155
|
+
* @generated from field: optional pay.v1.Tax tax = 13;
|
|
156
|
+
*/
|
|
157
|
+
tax?: Tax;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @generated from field: optional pay.v1.SessionMetadata metadata = 14;
|
|
161
|
+
*/
|
|
162
|
+
metadata?: SessionMetadata;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @generated from message pay.v1.PaymentExtraData
|
|
167
|
+
*/
|
|
168
|
+
declare type PaymentExtraData = Message<"pay.v1.PaymentExtraData"> & {
|
|
169
|
+
/**
|
|
170
|
+
* real money amount
|
|
171
|
+
*
|
|
172
|
+
* @generated from field: int32 real_amount = 1;
|
|
173
|
+
*/
|
|
174
|
+
realAmount: number;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* bonus money amount
|
|
178
|
+
*
|
|
179
|
+
* @generated from field: int32 bonus_amount = 2;
|
|
180
|
+
*/
|
|
181
|
+
bonusAmount: number;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @generated from message pay.v1.Payment
|
|
186
|
+
*/
|
|
187
|
+
declare type Payment = Message<"pay.v1.Payment"> & {
|
|
188
|
+
/**
|
|
189
|
+
* @generated from field: string id = 1;
|
|
190
|
+
*/
|
|
191
|
+
id: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @generated from field: string session_id = 2;
|
|
195
|
+
*/
|
|
196
|
+
sessionId: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @generated from field: string status = 3;
|
|
200
|
+
*/
|
|
201
|
+
status: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @generated from field: int32 amount = 4;
|
|
205
|
+
*/
|
|
206
|
+
amount: number;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @generated from field: string currency = 5;
|
|
210
|
+
*/
|
|
211
|
+
currency: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @generated from field: string method = 6;
|
|
215
|
+
*/
|
|
216
|
+
method: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @generated from field: string details = 7;
|
|
220
|
+
*/
|
|
221
|
+
details: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @generated from field: google.protobuf.Timestamp created_at = 8;
|
|
225
|
+
*/
|
|
226
|
+
createdAt?: Timestamp;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @generated from field: optional google.protobuf.Timestamp authorized_at = 9;
|
|
230
|
+
*/
|
|
231
|
+
authorizedAt?: Timestamp;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @generated from field: optional google.protobuf.Timestamp cancelled_at = 10;
|
|
235
|
+
*/
|
|
236
|
+
cancelledAt?: Timestamp;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @generated from field: optional google.protobuf.Timestamp succeeded_at = 11;
|
|
240
|
+
*/
|
|
241
|
+
succeededAt?: Timestamp;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @generated from field: optional google.protobuf.Timestamp failed_at = 12;
|
|
245
|
+
*/
|
|
246
|
+
failedAt?: Timestamp;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @generated from field: optional google.protobuf.Timestamp refunded_at = 13;
|
|
250
|
+
*/
|
|
251
|
+
refundedAt?: Timestamp;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @generated from field: optional pay.v1.Error error = 14;
|
|
255
|
+
*/
|
|
256
|
+
error?: Error;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @generated from field: optional pay.v1.PaymentExtraData extra_data = 15;
|
|
260
|
+
*/
|
|
261
|
+
extraData?: PaymentExtraData;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Session requests/responses
|
|
266
|
+
*
|
|
267
|
+
* @generated from message pay.v1.CreateSessionRequest
|
|
268
|
+
*/
|
|
269
|
+
declare type CreateSessionRequest = Message<"pay.v1.CreateSessionRequest"> & {
|
|
270
|
+
/**
|
|
271
|
+
* @generated from field: string game_id = 1;
|
|
272
|
+
*/
|
|
273
|
+
gameId: string;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @generated from field: string user_id = 2;
|
|
277
|
+
*/
|
|
278
|
+
userId: string;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @generated from field: pay.v1.Item item = 3;
|
|
282
|
+
*/
|
|
283
|
+
item?: Item;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @generated from field: string return_url = 4;
|
|
287
|
+
*/
|
|
288
|
+
returnUrl: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @generated from field: optional bool wallet_enabled = 5;
|
|
292
|
+
*/
|
|
293
|
+
walletEnabled?: boolean;
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Describes the message pay.v1.CreateSessionRequest.
|
|
298
|
+
* Use `create(CreateSessionRequestSchema)` to create a new message.
|
|
299
|
+
*/
|
|
300
|
+
declare const CreateSessionRequestSchema: GenMessage<CreateSessionRequest>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @generated from message pay.v1.CreateSessionResponse
|
|
304
|
+
*/
|
|
305
|
+
declare type CreateSessionResponse = Message<"pay.v1.CreateSessionResponse"> & {
|
|
306
|
+
/**
|
|
307
|
+
* @generated from field: string id = 1 [deprecated = true];
|
|
308
|
+
* @deprecated
|
|
309
|
+
*/
|
|
310
|
+
id: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @generated from field: string url = 2 [deprecated = true];
|
|
314
|
+
* @deprecated
|
|
315
|
+
*/
|
|
316
|
+
url: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @generated from field: pay.v1.Session session = 3;
|
|
320
|
+
*/
|
|
321
|
+
session?: Session;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Describes the message pay.v1.CreateSessionResponse.
|
|
326
|
+
* Use `create(CreateSessionResponseSchema)` to create a new message.
|
|
327
|
+
*/
|
|
328
|
+
declare const CreateSessionResponseSchema: GenMessage<CreateSessionResponse>;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* @generated from message pay.v1.CancelSessionRequest
|
|
332
|
+
*/
|
|
333
|
+
declare type CancelSessionRequest = Message<"pay.v1.CancelSessionRequest"> & {
|
|
334
|
+
/**
|
|
335
|
+
* @generated from field: string id = 1;
|
|
336
|
+
*/
|
|
337
|
+
id: string;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Describes the message pay.v1.CancelSessionRequest.
|
|
342
|
+
* Use `create(CancelSessionRequestSchema)` to create a new message.
|
|
343
|
+
*/
|
|
344
|
+
declare const CancelSessionRequestSchema: GenMessage<CancelSessionRequest>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @generated from message pay.v1.CancelSessionResponse
|
|
348
|
+
*/
|
|
349
|
+
declare type CancelSessionResponse = Message<"pay.v1.CancelSessionResponse"> & {
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Describes the message pay.v1.CancelSessionResponse.
|
|
354
|
+
* Use `create(CancelSessionResponseSchema)` to create a new message.
|
|
355
|
+
*/
|
|
356
|
+
declare const CancelSessionResponseSchema: GenMessage<CancelSessionResponse>;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @generated from message pay.v1.GetSessionRequest
|
|
360
|
+
*/
|
|
361
|
+
declare type GetSessionRequest = Message<"pay.v1.GetSessionRequest"> & {
|
|
362
|
+
/**
|
|
363
|
+
* @generated from field: string id = 1;
|
|
364
|
+
*/
|
|
365
|
+
id: string;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Describes the message pay.v1.GetSessionRequest.
|
|
370
|
+
* Use `create(GetSessionRequestSchema)` to create a new message.
|
|
371
|
+
*/
|
|
372
|
+
declare const GetSessionRequestSchema: GenMessage<GetSessionRequest>;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @generated from message pay.v1.GetSessionResponse
|
|
376
|
+
*/
|
|
377
|
+
declare type GetSessionResponse = Message<"pay.v1.GetSessionResponse"> & {
|
|
378
|
+
/**
|
|
379
|
+
* @generated from field: pay.v1.Session session = 1;
|
|
380
|
+
*/
|
|
381
|
+
session?: Session;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Describes the message pay.v1.GetSessionResponse.
|
|
386
|
+
* Use `create(GetSessionResponseSchema)` to create a new message.
|
|
387
|
+
*/
|
|
388
|
+
declare const GetSessionResponseSchema: GenMessage<GetSessionResponse>;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @generated from message pay.v1.GetSessionStatusRequest
|
|
392
|
+
*/
|
|
393
|
+
declare type GetSessionStatusRequest = Message<"pay.v1.GetSessionStatusRequest"> & {
|
|
394
|
+
/**
|
|
395
|
+
* @generated from field: string id = 1;
|
|
396
|
+
*/
|
|
397
|
+
id: string;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Describes the message pay.v1.GetSessionStatusRequest.
|
|
402
|
+
* Use `create(GetSessionStatusRequestSchema)` to create a new message.
|
|
403
|
+
*/
|
|
404
|
+
declare const GetSessionStatusRequestSchema: GenMessage<GetSessionStatusRequest>;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @generated from message pay.v1.GetSessionStatusResponse
|
|
408
|
+
*/
|
|
409
|
+
declare type GetSessionStatusResponse = Message<"pay.v1.GetSessionStatusResponse"> & {
|
|
410
|
+
/**
|
|
411
|
+
* @generated from field: string id = 1 [deprecated = true];
|
|
412
|
+
* @deprecated
|
|
413
|
+
*/
|
|
414
|
+
id: string;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* @generated from field: string status = 2;
|
|
418
|
+
*/
|
|
419
|
+
status: string;
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Describes the message pay.v1.GetSessionStatusResponse.
|
|
424
|
+
* Use `create(GetSessionStatusResponseSchema)` to create a new message.
|
|
425
|
+
*/
|
|
426
|
+
declare const GetSessionStatusResponseSchema: GenMessage<GetSessionStatusResponse>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @generated from message pay.v1.ListSessionsRequest
|
|
430
|
+
*/
|
|
431
|
+
declare type ListSessionsRequest = Message<"pay.v1.ListSessionsRequest"> & {
|
|
432
|
+
/**
|
|
433
|
+
* @generated from field: string game_id = 1;
|
|
434
|
+
*/
|
|
435
|
+
gameId: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* @generated from field: optional string user_id = 2;
|
|
439
|
+
*/
|
|
440
|
+
userId?: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @generated from field: optional string status = 3;
|
|
444
|
+
*/
|
|
445
|
+
status?: string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* default: 100
|
|
449
|
+
*
|
|
450
|
+
* @generated from field: optional int32 limit = 4;
|
|
451
|
+
*/
|
|
452
|
+
limit?: number;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @generated from field: optional int32 offset = 5;
|
|
456
|
+
*/
|
|
457
|
+
offset?: number;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Describes the message pay.v1.ListSessionsRequest.
|
|
462
|
+
* Use `create(ListSessionsRequestSchema)` to create a new message.
|
|
463
|
+
*/
|
|
464
|
+
declare const ListSessionsRequestSchema: GenMessage<ListSessionsRequest>;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @generated from message pay.v1.ListSessionsResponse
|
|
468
|
+
*/
|
|
469
|
+
declare type ListSessionsResponse = Message<"pay.v1.ListSessionsResponse"> & {
|
|
470
|
+
/**
|
|
471
|
+
* @generated from field: repeated pay.v1.Session sessions = 1;
|
|
472
|
+
*/
|
|
473
|
+
sessions: Session[];
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @generated from field: int32 total = 2;
|
|
477
|
+
*/
|
|
478
|
+
total: number;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @generated from field: bool has_more = 3;
|
|
482
|
+
*/
|
|
483
|
+
hasMore: boolean;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Describes the message pay.v1.ListSessionsResponse.
|
|
488
|
+
* Use `create(ListSessionsResponseSchema)` to create a new message.
|
|
489
|
+
*/
|
|
490
|
+
declare const ListSessionsResponseSchema: GenMessage<ListSessionsResponse>;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Payment requests/responses
|
|
494
|
+
*
|
|
495
|
+
* @generated from message pay.v1.GetPaymentRequest
|
|
496
|
+
*/
|
|
497
|
+
declare type GetPaymentRequest = Message<"pay.v1.GetPaymentRequest"> & {
|
|
498
|
+
/**
|
|
499
|
+
* @generated from field: string id = 1;
|
|
500
|
+
*/
|
|
501
|
+
id: string;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* @generated from field: optional bool with_extra_data = 2;
|
|
505
|
+
*/
|
|
506
|
+
withExtraData?: boolean;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Describes the message pay.v1.GetPaymentRequest.
|
|
511
|
+
* Use `create(GetPaymentRequestSchema)` to create a new message.
|
|
512
|
+
*/
|
|
513
|
+
declare const GetPaymentRequestSchema: GenMessage<GetPaymentRequest>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @generated from message pay.v1.GetPaymentResponse
|
|
517
|
+
*/
|
|
518
|
+
declare type GetPaymentResponse = Message<"pay.v1.GetPaymentResponse"> & {
|
|
519
|
+
/**
|
|
520
|
+
* @generated from field: pay.v1.Payment payment = 1;
|
|
521
|
+
*/
|
|
522
|
+
payment?: Payment;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Describes the message pay.v1.GetPaymentResponse.
|
|
527
|
+
* Use `create(GetPaymentResponseSchema)` to create a new message.
|
|
528
|
+
*/
|
|
529
|
+
declare const GetPaymentResponseSchema: GenMessage<GetPaymentResponse>;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @generated from message pay.v1.CompletePaymentRequest
|
|
533
|
+
*/
|
|
534
|
+
declare type CompletePaymentRequest = Message<"pay.v1.CompletePaymentRequest"> & {
|
|
535
|
+
/**
|
|
536
|
+
* @generated from field: string id = 1;
|
|
537
|
+
*/
|
|
538
|
+
id: string;
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Describes the message pay.v1.CompletePaymentRequest.
|
|
543
|
+
* Use `create(CompletePaymentRequestSchema)` to create a new message.
|
|
544
|
+
*/
|
|
545
|
+
declare const CompletePaymentRequestSchema: GenMessage<CompletePaymentRequest>;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @generated from message pay.v1.CompletePaymentResponse
|
|
549
|
+
*/
|
|
550
|
+
declare type CompletePaymentResponse = Message<"pay.v1.CompletePaymentResponse"> & {
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Describes the message pay.v1.CompletePaymentResponse.
|
|
555
|
+
* Use `create(CompletePaymentResponseSchema)` to create a new message.
|
|
556
|
+
*/
|
|
557
|
+
declare const CompletePaymentResponseSchema: GenMessage<CompletePaymentResponse>;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* @generated from message pay.v1.CancelPaymentRequest
|
|
561
|
+
*/
|
|
562
|
+
declare type CancelPaymentRequest = Message<"pay.v1.CancelPaymentRequest"> & {
|
|
563
|
+
/**
|
|
564
|
+
* @generated from field: string id = 1;
|
|
565
|
+
*/
|
|
566
|
+
id: string;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Describes the message pay.v1.CancelPaymentRequest.
|
|
571
|
+
* Use `create(CancelPaymentRequestSchema)` to create a new message.
|
|
572
|
+
*/
|
|
573
|
+
declare const CancelPaymentRequestSchema: GenMessage<CancelPaymentRequest>;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* @generated from message pay.v1.CancelPaymentResponse
|
|
577
|
+
*/
|
|
578
|
+
declare type CancelPaymentResponse = Message<"pay.v1.CancelPaymentResponse"> & {
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Describes the message pay.v1.CancelPaymentResponse.
|
|
583
|
+
* Use `create(CancelPaymentResponseSchema)` to create a new message.
|
|
584
|
+
*/
|
|
585
|
+
declare const CancelPaymentResponseSchema: GenMessage<CancelPaymentResponse>;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @generated from message pay.v1.ListPaymentsRequest
|
|
589
|
+
*/
|
|
590
|
+
declare type ListPaymentsRequest = Message<"pay.v1.ListPaymentsRequest"> & {
|
|
591
|
+
/**
|
|
592
|
+
* @generated from field: string game_id = 1;
|
|
593
|
+
*/
|
|
594
|
+
gameId: string;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* @generated from field: optional string user_id = 2;
|
|
598
|
+
*/
|
|
599
|
+
userId?: string;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* default: 100
|
|
603
|
+
*
|
|
604
|
+
* @generated from field: optional int32 limit = 3;
|
|
605
|
+
*/
|
|
606
|
+
limit?: number;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* @generated from field: optional int32 offset = 4;
|
|
610
|
+
*/
|
|
611
|
+
offset?: number;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* @generated from field: optional bool with_extra_data = 5;
|
|
615
|
+
*/
|
|
616
|
+
withExtraData?: boolean;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Describes the message pay.v1.ListPaymentsRequest.
|
|
621
|
+
* Use `create(ListPaymentsRequestSchema)` to create a new message.
|
|
622
|
+
*/
|
|
623
|
+
declare const ListPaymentsRequestSchema: GenMessage<ListPaymentsRequest>;
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* @generated from message pay.v1.ListPaymentsResponse
|
|
627
|
+
*/
|
|
628
|
+
declare type ListPaymentsResponse = Message<"pay.v1.ListPaymentsResponse"> & {
|
|
629
|
+
/**
|
|
630
|
+
* @generated from field: repeated pay.v1.Payment payments = 1;
|
|
631
|
+
*/
|
|
632
|
+
payments: Payment[];
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @generated from field: int32 total = 2;
|
|
636
|
+
*/
|
|
637
|
+
total: number;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* @generated from field: bool has_more = 3;
|
|
641
|
+
*/
|
|
642
|
+
hasMore: boolean;
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Describes the message pay.v1.ListPaymentsResponse.
|
|
647
|
+
* Use `create(ListPaymentsResponseSchema)` to create a new message.
|
|
648
|
+
*/
|
|
649
|
+
declare const ListPaymentsResponseSchema: GenMessage<ListPaymentsResponse>;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* @generated from message pay.v1.GameUser
|
|
653
|
+
* @deprecated
|
|
654
|
+
*/
|
|
655
|
+
declare type GameUser$1 = Message<"pay.v1.GameUser"> & {
|
|
656
|
+
/**
|
|
657
|
+
* @generated from field: string game_id = 1;
|
|
658
|
+
*/
|
|
659
|
+
gameId: string;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* @generated from field: string user_id = 2;
|
|
663
|
+
*/
|
|
664
|
+
userId: string;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* @generated from message pay.v1.Topup
|
|
669
|
+
* @deprecated
|
|
670
|
+
*/
|
|
671
|
+
declare type Topup = Message<"pay.v1.Topup"> & {
|
|
672
|
+
/**
|
|
673
|
+
* @generated from field: string id = 1;
|
|
674
|
+
*/
|
|
675
|
+
id: string;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* @generated from field: string wallet_user_id = 2;
|
|
679
|
+
*/
|
|
680
|
+
walletUserId: string;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* @generated from field: repeated pay.v1.GameUser game_users = 3;
|
|
684
|
+
*/
|
|
685
|
+
gameUsers: GameUser$1[];
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* @generated from field: string status = 4;
|
|
689
|
+
*/
|
|
690
|
+
status: string;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @generated from field: int32 amount = 5;
|
|
694
|
+
*/
|
|
695
|
+
amount: number;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* @generated from field: int32 reward = 6;
|
|
699
|
+
*/
|
|
700
|
+
reward: number;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* @generated from field: string currency = 7;
|
|
704
|
+
*/
|
|
705
|
+
currency: string;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* @generated from field: string method = 8;
|
|
709
|
+
*/
|
|
710
|
+
method: string;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* @generated from field: string details = 9;
|
|
714
|
+
*/
|
|
715
|
+
details: string;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @generated from field: google.protobuf.Timestamp created_at = 10;
|
|
719
|
+
*/
|
|
720
|
+
createdAt?: Timestamp;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* @generated from field: optional google.protobuf.Timestamp authorized_at = 11;
|
|
724
|
+
*/
|
|
725
|
+
authorizedAt?: Timestamp;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* @generated from field: optional google.protobuf.Timestamp cancelled_at = 12;
|
|
729
|
+
*/
|
|
730
|
+
cancelledAt?: Timestamp;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* @generated from field: optional google.protobuf.Timestamp succeeded_at = 13;
|
|
734
|
+
*/
|
|
735
|
+
succeededAt?: Timestamp;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @generated from field: optional google.protobuf.Timestamp failed_at = 14;
|
|
739
|
+
*/
|
|
740
|
+
failedAt?: Timestamp;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* @generated from field: optional google.protobuf.Timestamp refunded_at = 15;
|
|
744
|
+
*/
|
|
745
|
+
refundedAt?: Timestamp;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @generated from message pay.v1.GetTopupRequest
|
|
750
|
+
* @deprecated
|
|
751
|
+
*/
|
|
752
|
+
declare type GetTopupRequest = Message<"pay.v1.GetTopupRequest"> & {
|
|
753
|
+
/**
|
|
754
|
+
* @generated from field: string id = 1;
|
|
755
|
+
*/
|
|
756
|
+
id: string;
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Describes the message pay.v1.GetTopupRequest.
|
|
761
|
+
* Use `create(GetTopupRequestSchema)` to create a new message.
|
|
762
|
+
* @deprecated
|
|
763
|
+
*/
|
|
764
|
+
declare const GetTopupRequestSchema: GenMessage<GetTopupRequest>;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* @generated from message pay.v1.GetTopupResponse
|
|
768
|
+
* @deprecated
|
|
769
|
+
*/
|
|
770
|
+
declare type GetTopupResponse = Message<"pay.v1.GetTopupResponse"> & {
|
|
771
|
+
/**
|
|
772
|
+
* @generated from field: pay.v1.Topup topup = 1;
|
|
773
|
+
*/
|
|
774
|
+
topup?: Topup;
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Describes the message pay.v1.GetTopupResponse.
|
|
779
|
+
* Use `create(GetTopupResponseSchema)` to create a new message.
|
|
780
|
+
* @deprecated
|
|
781
|
+
*/
|
|
782
|
+
declare const GetTopupResponseSchema: GenMessage<GetTopupResponse>;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* @generated from message pay.v1.ListTopupsRequest
|
|
786
|
+
* @deprecated
|
|
787
|
+
*/
|
|
788
|
+
declare type ListTopupsRequest = Message<"pay.v1.ListTopupsRequest"> & {
|
|
789
|
+
/**
|
|
790
|
+
* @generated from field: string game_id = 1;
|
|
791
|
+
*/
|
|
792
|
+
gameId: string;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @generated from field: optional string game_user_id = 2;
|
|
796
|
+
*/
|
|
797
|
+
gameUserId?: string;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* @generated from field: optional string wallet_user_id = 3;
|
|
801
|
+
*/
|
|
802
|
+
walletUserId?: string;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* default: 100
|
|
806
|
+
*
|
|
807
|
+
* @generated from field: optional int32 limit = 4;
|
|
808
|
+
*/
|
|
809
|
+
limit?: number;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* @generated from field: optional int32 offset = 5;
|
|
813
|
+
*/
|
|
814
|
+
offset?: number;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Describes the message pay.v1.ListTopupsRequest.
|
|
819
|
+
* Use `create(ListTopupsRequestSchema)` to create a new message.
|
|
820
|
+
* @deprecated
|
|
821
|
+
*/
|
|
822
|
+
declare const ListTopupsRequestSchema: GenMessage<ListTopupsRequest>;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* @generated from message pay.v1.ListTopupsResponse
|
|
826
|
+
* @deprecated
|
|
827
|
+
*/
|
|
828
|
+
declare type ListTopupsResponse = Message<"pay.v1.ListTopupsResponse"> & {
|
|
829
|
+
/**
|
|
830
|
+
* @generated from field: repeated pay.v1.Topup topups = 1;
|
|
831
|
+
*/
|
|
832
|
+
topups: Topup[];
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* @generated from field: int32 total = 2;
|
|
836
|
+
*/
|
|
837
|
+
total: number;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* @generated from field: bool has_more = 3;
|
|
841
|
+
*/
|
|
842
|
+
hasMore: boolean;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Describes the message pay.v1.ListTopupsResponse.
|
|
847
|
+
* Use `create(ListTopupsResponseSchema)` to create a new message.
|
|
848
|
+
* @deprecated
|
|
849
|
+
*/
|
|
850
|
+
declare const ListTopupsResponseSchema: GenMessage<ListTopupsResponse>;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Payment sessions operations
|
|
854
|
+
*
|
|
855
|
+
* @generated from service pay.v1.PaymentService
|
|
856
|
+
*/
|
|
857
|
+
declare const PaymentService: GenService<{
|
|
858
|
+
/**
|
|
859
|
+
* Initiate a new payment session
|
|
860
|
+
*
|
|
861
|
+
* @generated from rpc pay.v1.PaymentService.CreateSession
|
|
862
|
+
*/
|
|
863
|
+
createSession: {
|
|
864
|
+
methodKind: "unary";
|
|
865
|
+
input: typeof CreateSessionRequestSchema;
|
|
866
|
+
output: typeof CreateSessionResponseSchema;
|
|
867
|
+
},
|
|
868
|
+
/**
|
|
869
|
+
* Cancel an existing payment session
|
|
870
|
+
*
|
|
871
|
+
* @generated from rpc pay.v1.PaymentService.CancelSession
|
|
872
|
+
*/
|
|
873
|
+
cancelSession: {
|
|
874
|
+
methodKind: "unary";
|
|
875
|
+
input: typeof CancelSessionRequestSchema;
|
|
876
|
+
output: typeof CancelSessionResponseSchema;
|
|
877
|
+
},
|
|
878
|
+
/**
|
|
879
|
+
* Returns session by its id
|
|
880
|
+
*
|
|
881
|
+
* @generated from rpc pay.v1.PaymentService.GetSession
|
|
882
|
+
*/
|
|
883
|
+
getSession: {
|
|
884
|
+
methodKind: "unary";
|
|
885
|
+
input: typeof GetSessionRequestSchema;
|
|
886
|
+
output: typeof GetSessionResponseSchema;
|
|
887
|
+
},
|
|
888
|
+
/**
|
|
889
|
+
* Returns session status by its id
|
|
890
|
+
*
|
|
891
|
+
* @generated from rpc pay.v1.PaymentService.GetSessionStatus
|
|
892
|
+
*/
|
|
893
|
+
getSessionStatus: {
|
|
894
|
+
methodKind: "unary";
|
|
895
|
+
input: typeof GetSessionStatusRequestSchema;
|
|
896
|
+
output: typeof GetSessionStatusResponseSchema;
|
|
897
|
+
},
|
|
898
|
+
/**
|
|
899
|
+
* List payments sessions
|
|
900
|
+
*
|
|
901
|
+
* @generated from rpc pay.v1.PaymentService.ListSessions
|
|
902
|
+
*/
|
|
903
|
+
listSessions: {
|
|
904
|
+
methodKind: "unary";
|
|
905
|
+
input: typeof ListSessionsRequestSchema;
|
|
906
|
+
output: typeof ListSessionsResponseSchema;
|
|
907
|
+
},
|
|
908
|
+
/**
|
|
909
|
+
* Returns payment details by its id
|
|
910
|
+
*
|
|
911
|
+
* @generated from rpc pay.v1.PaymentService.GetPayment
|
|
912
|
+
*/
|
|
913
|
+
getPayment: {
|
|
914
|
+
methodKind: "unary";
|
|
915
|
+
input: typeof GetPaymentRequestSchema;
|
|
916
|
+
output: typeof GetPaymentResponseSchema;
|
|
917
|
+
},
|
|
918
|
+
/**
|
|
919
|
+
* List completed payments
|
|
920
|
+
*
|
|
921
|
+
* @generated from rpc pay.v1.PaymentService.ListPayments
|
|
922
|
+
*/
|
|
923
|
+
listPayments: {
|
|
924
|
+
methodKind: "unary";
|
|
925
|
+
input: typeof ListPaymentsRequestSchema;
|
|
926
|
+
output: typeof ListPaymentsResponseSchema;
|
|
927
|
+
},
|
|
928
|
+
/**
|
|
929
|
+
* Captures a payment for the session after authorization
|
|
930
|
+
*
|
|
931
|
+
* @generated from rpc pay.v1.PaymentService.CompletePayment
|
|
932
|
+
*/
|
|
933
|
+
completePayment: {
|
|
934
|
+
methodKind: "unary";
|
|
935
|
+
input: typeof CompletePaymentRequestSchema;
|
|
936
|
+
output: typeof CompletePaymentResponseSchema;
|
|
937
|
+
},
|
|
938
|
+
/**
|
|
939
|
+
* Initiates a payment cancellation of the authorization
|
|
940
|
+
*
|
|
941
|
+
* @generated from rpc pay.v1.PaymentService.CancelPayment
|
|
942
|
+
*/
|
|
943
|
+
cancelPayment: {
|
|
944
|
+
methodKind: "unary";
|
|
945
|
+
input: typeof CancelPaymentRequestSchema;
|
|
946
|
+
output: typeof CancelPaymentResponseSchema;
|
|
947
|
+
},
|
|
948
|
+
/**
|
|
949
|
+
* Returns topup details by its identity
|
|
950
|
+
*
|
|
951
|
+
* @generated from rpc pay.v1.PaymentService.GetTopup
|
|
952
|
+
* @deprecated
|
|
953
|
+
*/
|
|
954
|
+
getTopup: {
|
|
955
|
+
methodKind: "unary";
|
|
956
|
+
input: typeof GetTopupRequestSchema;
|
|
957
|
+
output: typeof GetTopupResponseSchema;
|
|
958
|
+
},
|
|
959
|
+
/**
|
|
960
|
+
* List topups
|
|
961
|
+
*
|
|
962
|
+
* @generated from rpc pay.v1.PaymentService.ListTopups
|
|
963
|
+
* @deprecated
|
|
964
|
+
*/
|
|
965
|
+
listTopups: {
|
|
966
|
+
methodKind: "unary";
|
|
967
|
+
input: typeof ListTopupsRequestSchema;
|
|
968
|
+
output: typeof ListTopupsResponseSchema;
|
|
969
|
+
},
|
|
970
|
+
}>;
|
|
971
|
+
|
|
972
|
+
declare class Sessions {
|
|
973
|
+
private client;
|
|
974
|
+
constructor(client: Client<typeof PaymentService>);
|
|
975
|
+
create(input: MessageInitShape<typeof CreateSessionRequestSchema>): Promise<Session>;
|
|
976
|
+
get(id: string): Promise<Session>;
|
|
977
|
+
status(id: string): Promise<GetSessionStatusResponse>;
|
|
978
|
+
list(input: MessageInitShape<typeof ListSessionsRequestSchema>): Promise<ListSessionsResponse>;
|
|
979
|
+
cancel(id: string): Promise<void>;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
declare class Payments {
|
|
983
|
+
private client;
|
|
984
|
+
constructor(client: Client<typeof PaymentService>);
|
|
985
|
+
get(id: string, opts?: {
|
|
986
|
+
withExtraData?: boolean;
|
|
987
|
+
}): Promise<Payment>;
|
|
988
|
+
list(input: MessageInitShape<typeof ListPaymentsRequestSchema>): Promise<ListPaymentsResponse>;
|
|
989
|
+
complete(id: string): Promise<void>;
|
|
990
|
+
cancel(id: string): Promise<void>;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
|
|
994
|
+
// @generated from file pay/v1/refund.proto (package pay.v1, syntax proto3)
|
|
995
|
+
/* eslint-disable */
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* @generated from message pay.v1.Refund
|
|
1001
|
+
*/
|
|
1002
|
+
declare type Refund = Message<"pay.v1.Refund"> & {
|
|
1003
|
+
/**
|
|
1004
|
+
* @generated from field: string id = 1;
|
|
1005
|
+
*/
|
|
1006
|
+
id: string;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* @generated from field: string payment_id = 2;
|
|
1010
|
+
*/
|
|
1011
|
+
paymentId: string;
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* @generated from field: string status = 3;
|
|
1015
|
+
*/
|
|
1016
|
+
status: string;
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* @generated from field: optional string reason = 4;
|
|
1020
|
+
*/
|
|
1021
|
+
reason?: string;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @generated from field: google.protobuf.Timestamp created_at = 5;
|
|
1025
|
+
*/
|
|
1026
|
+
createdAt?: Timestamp;
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* @generated from field: optional google.protobuf.Timestamp succeeded_at = 6;
|
|
1030
|
+
*/
|
|
1031
|
+
succeededAt?: Timestamp;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @generated from field: optional google.protobuf.Timestamp failed_at = 7;
|
|
1035
|
+
*/
|
|
1036
|
+
failedAt?: Timestamp;
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* @generated from field: optional google.protobuf.Timestamp cancelled_at = 8;
|
|
1040
|
+
*/
|
|
1041
|
+
cancelledAt?: Timestamp;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* @generated from field: optional pay.v1.Error error = 9;
|
|
1045
|
+
*/
|
|
1046
|
+
error?: Error;
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* @generated from message pay.v1.CreateRefundRequest
|
|
1051
|
+
*/
|
|
1052
|
+
declare type CreateRefundRequest = Message<"pay.v1.CreateRefundRequest"> & {
|
|
1053
|
+
/**
|
|
1054
|
+
* @generated from field: string payment_id = 1;
|
|
1055
|
+
*/
|
|
1056
|
+
paymentId: string;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* @generated from field: optional string reason = 2;
|
|
1060
|
+
*/
|
|
1061
|
+
reason?: string;
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Describes the message pay.v1.CreateRefundRequest.
|
|
1066
|
+
* Use `create(CreateRefundRequestSchema)` to create a new message.
|
|
1067
|
+
*/
|
|
1068
|
+
declare const CreateRefundRequestSchema: GenMessage<CreateRefundRequest>;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* @generated from message pay.v1.CreateRefundResponse
|
|
1072
|
+
*/
|
|
1073
|
+
declare type CreateRefundResponse = Message<"pay.v1.CreateRefundResponse"> & {
|
|
1074
|
+
/**
|
|
1075
|
+
* @generated from field: string id = 1;
|
|
1076
|
+
*/
|
|
1077
|
+
id: string;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* @generated from field: pay.v1.Refund refund = 2;
|
|
1081
|
+
*/
|
|
1082
|
+
refund?: Refund;
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Describes the message pay.v1.CreateRefundResponse.
|
|
1087
|
+
* Use `create(CreateRefundResponseSchema)` to create a new message.
|
|
1088
|
+
*/
|
|
1089
|
+
declare const CreateRefundResponseSchema: GenMessage<CreateRefundResponse>;
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* @generated from message pay.v1.GetRefundRequest
|
|
1093
|
+
*/
|
|
1094
|
+
declare type GetRefundRequest = Message<"pay.v1.GetRefundRequest"> & {
|
|
1095
|
+
/**
|
|
1096
|
+
* @generated from field: string id = 1;
|
|
1097
|
+
*/
|
|
1098
|
+
id: string;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* Describes the message pay.v1.GetRefundRequest.
|
|
1103
|
+
* Use `create(GetRefundRequestSchema)` to create a new message.
|
|
1104
|
+
*/
|
|
1105
|
+
declare const GetRefundRequestSchema: GenMessage<GetRefundRequest>;
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* @generated from message pay.v1.GetRefundResponse
|
|
1109
|
+
*/
|
|
1110
|
+
declare type GetRefundResponse = Message<"pay.v1.GetRefundResponse"> & {
|
|
1111
|
+
/**
|
|
1112
|
+
* @generated from field: pay.v1.Refund refund = 1;
|
|
1113
|
+
*/
|
|
1114
|
+
refund?: Refund;
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* Describes the message pay.v1.GetRefundResponse.
|
|
1119
|
+
* Use `create(GetRefundResponseSchema)` to create a new message.
|
|
1120
|
+
*/
|
|
1121
|
+
declare const GetRefundResponseSchema: GenMessage<GetRefundResponse>;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* @generated from message pay.v1.ListRefundsRequest
|
|
1125
|
+
*/
|
|
1126
|
+
declare type ListRefundsRequest = Message<"pay.v1.ListRefundsRequest"> & {
|
|
1127
|
+
/**
|
|
1128
|
+
* @generated from field: optional string payment_id = 1;
|
|
1129
|
+
*/
|
|
1130
|
+
paymentId?: string;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* @generated from field: optional string status = 2;
|
|
1134
|
+
*/
|
|
1135
|
+
status?: string;
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* default: 100
|
|
1139
|
+
*
|
|
1140
|
+
* @generated from field: optional int32 limit = 3;
|
|
1141
|
+
*/
|
|
1142
|
+
limit?: number;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* @generated from field: optional int32 offset = 4;
|
|
1146
|
+
*/
|
|
1147
|
+
offset?: number;
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Describes the message pay.v1.ListRefundsRequest.
|
|
1152
|
+
* Use `create(ListRefundsRequestSchema)` to create a new message.
|
|
1153
|
+
*/
|
|
1154
|
+
declare const ListRefundsRequestSchema: GenMessage<ListRefundsRequest>;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* @generated from message pay.v1.ListRefundsResponse
|
|
1158
|
+
*/
|
|
1159
|
+
declare type ListRefundsResponse = Message<"pay.v1.ListRefundsResponse"> & {
|
|
1160
|
+
/**
|
|
1161
|
+
* @generated from field: repeated pay.v1.Refund refunds = 1;
|
|
1162
|
+
*/
|
|
1163
|
+
refunds: Refund[];
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* @generated from field: int32 total = 2;
|
|
1167
|
+
*/
|
|
1168
|
+
total: number;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* @generated from field: bool has_more = 3;
|
|
1172
|
+
*/
|
|
1173
|
+
hasMore: boolean;
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Describes the message pay.v1.ListRefundsResponse.
|
|
1178
|
+
* Use `create(ListRefundsResponseSchema)` to create a new message.
|
|
1179
|
+
*/
|
|
1180
|
+
declare const ListRefundsResponseSchema: GenMessage<ListRefundsResponse>;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* @generated from service pay.v1.RefundService
|
|
1184
|
+
*/
|
|
1185
|
+
declare const RefundService: GenService<{
|
|
1186
|
+
/**
|
|
1187
|
+
* @generated from rpc pay.v1.RefundService.GetRefund
|
|
1188
|
+
*/
|
|
1189
|
+
getRefund: {
|
|
1190
|
+
methodKind: "unary";
|
|
1191
|
+
input: typeof GetRefundRequestSchema;
|
|
1192
|
+
output: typeof GetRefundResponseSchema;
|
|
1193
|
+
},
|
|
1194
|
+
/**
|
|
1195
|
+
* @generated from rpc pay.v1.RefundService.ListRefunds
|
|
1196
|
+
*/
|
|
1197
|
+
listRefunds: {
|
|
1198
|
+
methodKind: "unary";
|
|
1199
|
+
input: typeof ListRefundsRequestSchema;
|
|
1200
|
+
output: typeof ListRefundsResponseSchema;
|
|
1201
|
+
},
|
|
1202
|
+
/**
|
|
1203
|
+
* @generated from rpc pay.v1.RefundService.CreateRefund
|
|
1204
|
+
*/
|
|
1205
|
+
createRefund: {
|
|
1206
|
+
methodKind: "unary";
|
|
1207
|
+
input: typeof CreateRefundRequestSchema;
|
|
1208
|
+
output: typeof CreateRefundResponseSchema;
|
|
1209
|
+
},
|
|
1210
|
+
}>;
|
|
1211
|
+
|
|
1212
|
+
declare class Refunds {
|
|
1213
|
+
private client;
|
|
1214
|
+
constructor(client: Client<typeof RefundService>);
|
|
1215
|
+
create(input: MessageInitShape<typeof CreateRefundRequestSchema>): Promise<Refund>;
|
|
1216
|
+
get(id: string): Promise<Refund>;
|
|
1217
|
+
list(input?: MessageInitShape<typeof ListRefundsRequestSchema>): Promise<ListRefundsResponse>;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
|
|
1221
|
+
// @generated from file wallet/v1/common.proto (package wallet.v1, syntax proto3)
|
|
1222
|
+
/* eslint-disable */
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* @generated from message wallet.v1.GameUser
|
|
1228
|
+
*/
|
|
1229
|
+
declare type GameUser = Message<"wallet.v1.GameUser"> & {
|
|
1230
|
+
/**
|
|
1231
|
+
* @generated from field: string game_id = 1;
|
|
1232
|
+
*/
|
|
1233
|
+
gameId: string;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* @generated from field: string user_id = 2;
|
|
1237
|
+
*/
|
|
1238
|
+
userId: string;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* @generated from message wallet.v1.Balance
|
|
1243
|
+
*/
|
|
1244
|
+
declare type Balance = Message<"wallet.v1.Balance"> & {
|
|
1245
|
+
/**
|
|
1246
|
+
* @generated from field: int32 real = 1;
|
|
1247
|
+
*/
|
|
1248
|
+
real: number;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* @generated from field: int32 bonus = 2;
|
|
1252
|
+
*/
|
|
1253
|
+
bonus: number;
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js"
|
|
1257
|
+
// @generated from file wallet/v1/account.proto (package wallet.v1, syntax proto3)
|
|
1258
|
+
/* eslint-disable */
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* @generated from message wallet.v1.Account
|
|
1264
|
+
*/
|
|
1265
|
+
declare type Account = Message<"wallet.v1.Account"> & {
|
|
1266
|
+
/**
|
|
1267
|
+
* @generated from field: string id = 1;
|
|
1268
|
+
*/
|
|
1269
|
+
id: string;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* All game users linked to this account
|
|
1273
|
+
*
|
|
1274
|
+
* @generated from field: repeated wallet.v1.GameUser users = 2;
|
|
1275
|
+
*/
|
|
1276
|
+
users: GameUser[];
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* @generated from field: string currency = 3;
|
|
1280
|
+
*/
|
|
1281
|
+
currency: string;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* @generated from field: wallet.v1.Balance balance = 4;
|
|
1285
|
+
*/
|
|
1286
|
+
balance?: Balance;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* @generated from message wallet.v1.GetAccountRequest
|
|
1291
|
+
*/
|
|
1292
|
+
declare type GetAccountRequest = Message<"wallet.v1.GetAccountRequest"> & {
|
|
1293
|
+
/**
|
|
1294
|
+
* @generated from field: string id = 1;
|
|
1295
|
+
*/
|
|
1296
|
+
id: string;
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Describes the message wallet.v1.GetAccountRequest.
|
|
1301
|
+
* Use `create(GetAccountRequestSchema)` to create a new message.
|
|
1302
|
+
*/
|
|
1303
|
+
declare const GetAccountRequestSchema: GenMessage<GetAccountRequest>;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* @generated from message wallet.v1.GetAccountResponse
|
|
1307
|
+
*/
|
|
1308
|
+
declare type GetAccountResponse = Message<"wallet.v1.GetAccountResponse"> & {
|
|
1309
|
+
/**
|
|
1310
|
+
* @generated from field: wallet.v1.Account account = 1;
|
|
1311
|
+
*/
|
|
1312
|
+
account?: Account;
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Describes the message wallet.v1.GetAccountResponse.
|
|
1317
|
+
* Use `create(GetAccountResponseSchema)` to create a new message.
|
|
1318
|
+
*/
|
|
1319
|
+
declare const GetAccountResponseSchema: GenMessage<GetAccountResponse>;
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @generated from message wallet.v1.ListAccountsRequest
|
|
1323
|
+
*/
|
|
1324
|
+
declare type ListAccountsRequest = Message<"wallet.v1.ListAccountsRequest"> & {
|
|
1325
|
+
/**
|
|
1326
|
+
* @generated from field: string game_id = 1;
|
|
1327
|
+
*/
|
|
1328
|
+
gameId: string;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* @generated from field: optional string user_id = 2;
|
|
1332
|
+
*/
|
|
1333
|
+
userId?: string;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* default: 100
|
|
1337
|
+
*
|
|
1338
|
+
* @generated from field: optional int32 limit = 3;
|
|
1339
|
+
*/
|
|
1340
|
+
limit?: number;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* @generated from field: optional int32 offset = 4;
|
|
1344
|
+
*/
|
|
1345
|
+
offset?: number;
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Describes the message wallet.v1.ListAccountsRequest.
|
|
1350
|
+
* Use `create(ListAccountsRequestSchema)` to create a new message.
|
|
1351
|
+
*/
|
|
1352
|
+
declare const ListAccountsRequestSchema: GenMessage<ListAccountsRequest>;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* @generated from message wallet.v1.ListAccountsResponse
|
|
1356
|
+
*/
|
|
1357
|
+
declare type ListAccountsResponse = Message<"wallet.v1.ListAccountsResponse"> & {
|
|
1358
|
+
/**
|
|
1359
|
+
* @generated from field: repeated wallet.v1.Account accounts = 1;
|
|
1360
|
+
*/
|
|
1361
|
+
accounts: Account[];
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* @generated from field: int32 total = 2;
|
|
1365
|
+
*/
|
|
1366
|
+
total: number;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* @generated from field: bool has_more = 3;
|
|
1370
|
+
*/
|
|
1371
|
+
hasMore: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Describes the message wallet.v1.ListAccountsResponse.
|
|
1376
|
+
* Use `create(ListAccountsResponseSchema)` to create a new message.
|
|
1377
|
+
*/
|
|
1378
|
+
declare const ListAccountsResponseSchema: GenMessage<ListAccountsResponse>;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* @generated from message wallet.v1.Deposit
|
|
1382
|
+
*/
|
|
1383
|
+
declare type Deposit = Message<"wallet.v1.Deposit"> & {
|
|
1384
|
+
/**
|
|
1385
|
+
* @generated from field: string id = 1;
|
|
1386
|
+
*/
|
|
1387
|
+
id: string;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* @generated from field: string account_id = 2;
|
|
1391
|
+
*/
|
|
1392
|
+
accountId: string;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* @generated from field: string status = 3;
|
|
1396
|
+
*/
|
|
1397
|
+
status: string;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* @generated from field: int32 amount = 4;
|
|
1401
|
+
*/
|
|
1402
|
+
amount: number;
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* @generated from field: string currency = 5;
|
|
1406
|
+
*/
|
|
1407
|
+
currency: string;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @generated from field: string method = 6;
|
|
1411
|
+
*/
|
|
1412
|
+
method: string;
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* @generated from field: string details = 7;
|
|
1416
|
+
*/
|
|
1417
|
+
details: string;
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* @generated from field: google.protobuf.Timestamp created_at = 8;
|
|
1421
|
+
*/
|
|
1422
|
+
createdAt?: Timestamp;
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* @generated from field: optional google.protobuf.Timestamp authorized_at = 9;
|
|
1426
|
+
*/
|
|
1427
|
+
authorizedAt?: Timestamp;
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* @generated from field: optional google.protobuf.Timestamp cancelled_at = 10;
|
|
1431
|
+
*/
|
|
1432
|
+
cancelledAt?: Timestamp;
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* @generated from field: optional google.protobuf.Timestamp succeeded_at = 11;
|
|
1436
|
+
*/
|
|
1437
|
+
succeededAt?: Timestamp;
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* @generated from field: optional google.protobuf.Timestamp failed_at = 12;
|
|
1441
|
+
*/
|
|
1442
|
+
failedAt?: Timestamp;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* @generated from field: optional google.protobuf.Timestamp refunded_at = 13;
|
|
1446
|
+
*/
|
|
1447
|
+
refundedAt?: Timestamp;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* @generated from message wallet.v1.GetDepositRequest
|
|
1452
|
+
*/
|
|
1453
|
+
declare type GetDepositRequest = Message<"wallet.v1.GetDepositRequest"> & {
|
|
1454
|
+
/**
|
|
1455
|
+
* @generated from field: string id = 1;
|
|
1456
|
+
*/
|
|
1457
|
+
id: string;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Describes the message wallet.v1.GetDepositRequest.
|
|
1462
|
+
* Use `create(GetDepositRequestSchema)` to create a new message.
|
|
1463
|
+
*/
|
|
1464
|
+
declare const GetDepositRequestSchema: GenMessage<GetDepositRequest>;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* @generated from message wallet.v1.GetDepositResponse
|
|
1468
|
+
*/
|
|
1469
|
+
declare type GetDepositResponse = Message<"wallet.v1.GetDepositResponse"> & {
|
|
1470
|
+
/**
|
|
1471
|
+
* @generated from field: wallet.v1.Deposit deposit = 1;
|
|
1472
|
+
*/
|
|
1473
|
+
deposit?: Deposit;
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* Describes the message wallet.v1.GetDepositResponse.
|
|
1478
|
+
* Use `create(GetDepositResponseSchema)` to create a new message.
|
|
1479
|
+
*/
|
|
1480
|
+
declare const GetDepositResponseSchema: GenMessage<GetDepositResponse>;
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* @generated from message wallet.v1.ListDepositsRequest
|
|
1484
|
+
*/
|
|
1485
|
+
declare type ListDepositsRequest = Message<"wallet.v1.ListDepositsRequest"> & {
|
|
1486
|
+
/**
|
|
1487
|
+
* @generated from field: string game_id = 1;
|
|
1488
|
+
*/
|
|
1489
|
+
gameId: string;
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* @generated from field: optional string user_id = 2;
|
|
1493
|
+
*/
|
|
1494
|
+
userId?: string;
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* @generated from field: optional string account_id = 3;
|
|
1498
|
+
*/
|
|
1499
|
+
accountId?: string;
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* @generated from field: optional string status = 4;
|
|
1503
|
+
*/
|
|
1504
|
+
status?: string;
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* default: 100
|
|
1508
|
+
*
|
|
1509
|
+
* @generated from field: optional int32 limit = 5;
|
|
1510
|
+
*/
|
|
1511
|
+
limit?: number;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* @generated from field: optional int32 offset = 6;
|
|
1515
|
+
*/
|
|
1516
|
+
offset?: number;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Describes the message wallet.v1.ListDepositsRequest.
|
|
1521
|
+
* Use `create(ListDepositsRequestSchema)` to create a new message.
|
|
1522
|
+
*/
|
|
1523
|
+
declare const ListDepositsRequestSchema: GenMessage<ListDepositsRequest>;
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* @generated from message wallet.v1.ListDepositsResponse
|
|
1527
|
+
*/
|
|
1528
|
+
declare type ListDepositsResponse = Message<"wallet.v1.ListDepositsResponse"> & {
|
|
1529
|
+
/**
|
|
1530
|
+
* @generated from field: repeated wallet.v1.Deposit deposits = 1;
|
|
1531
|
+
*/
|
|
1532
|
+
deposits: Deposit[];
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* @generated from field: int32 total = 2;
|
|
1536
|
+
*/
|
|
1537
|
+
total: number;
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* @generated from field: bool has_more = 3;
|
|
1541
|
+
*/
|
|
1542
|
+
hasMore: boolean;
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* Describes the message wallet.v1.ListDepositsResponse.
|
|
1547
|
+
* Use `create(ListDepositsResponseSchema)` to create a new message.
|
|
1548
|
+
*/
|
|
1549
|
+
declare const ListDepositsResponseSchema: GenMessage<ListDepositsResponse>;
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Account operations
|
|
1553
|
+
*
|
|
1554
|
+
* @generated from service wallet.v1.AccountService
|
|
1555
|
+
*/
|
|
1556
|
+
declare const AccountService: GenService<{
|
|
1557
|
+
/**
|
|
1558
|
+
* Returns account details by its id
|
|
1559
|
+
*
|
|
1560
|
+
* @generated from rpc wallet.v1.AccountService.GetAccount
|
|
1561
|
+
*/
|
|
1562
|
+
getAccount: {
|
|
1563
|
+
methodKind: "unary";
|
|
1564
|
+
input: typeof GetAccountRequestSchema;
|
|
1565
|
+
output: typeof GetAccountResponseSchema;
|
|
1566
|
+
},
|
|
1567
|
+
/**
|
|
1568
|
+
* List accounts
|
|
1569
|
+
*
|
|
1570
|
+
* @generated from rpc wallet.v1.AccountService.ListAccounts
|
|
1571
|
+
*/
|
|
1572
|
+
listAccounts: {
|
|
1573
|
+
methodKind: "unary";
|
|
1574
|
+
input: typeof ListAccountsRequestSchema;
|
|
1575
|
+
output: typeof ListAccountsResponseSchema;
|
|
1576
|
+
},
|
|
1577
|
+
/**
|
|
1578
|
+
* Returns deposit details by its id
|
|
1579
|
+
*
|
|
1580
|
+
* @generated from rpc wallet.v1.AccountService.GetDeposit
|
|
1581
|
+
*/
|
|
1582
|
+
getDeposit: {
|
|
1583
|
+
methodKind: "unary";
|
|
1584
|
+
input: typeof GetDepositRequestSchema;
|
|
1585
|
+
output: typeof GetDepositResponseSchema;
|
|
1586
|
+
},
|
|
1587
|
+
/**
|
|
1588
|
+
* List deposits
|
|
1589
|
+
*
|
|
1590
|
+
* @generated from rpc wallet.v1.AccountService.ListDeposits
|
|
1591
|
+
*/
|
|
1592
|
+
listDeposits: {
|
|
1593
|
+
methodKind: "unary";
|
|
1594
|
+
input: typeof ListDepositsRequestSchema;
|
|
1595
|
+
output: typeof ListDepositsResponseSchema;
|
|
1596
|
+
},
|
|
1597
|
+
}>;
|
|
1598
|
+
|
|
1599
|
+
declare class Accounts {
|
|
1600
|
+
private client;
|
|
1601
|
+
constructor(client: Client<typeof AccountService>);
|
|
1602
|
+
get(id: string): Promise<Account>;
|
|
1603
|
+
list(input: MessageInitShape<typeof ListAccountsRequestSchema>): Promise<ListAccountsResponse>;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
declare class Deposits {
|
|
1607
|
+
private client;
|
|
1608
|
+
constructor(client: Client<typeof AccountService>);
|
|
1609
|
+
get(id: string): Promise<Deposit>;
|
|
1610
|
+
list(input: MessageInitShape<typeof ListDepositsRequestSchema>): Promise<ListDepositsResponse>;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
declare const BASE_URLS: {
|
|
1614
|
+
readonly production: "https://api.toffeepay.com";
|
|
1615
|
+
readonly sandbox: "https://api.sandbox.toffeepay.com";
|
|
1616
|
+
};
|
|
1617
|
+
type Environment = keyof typeof BASE_URLS;
|
|
1618
|
+
interface ToffeeOptions {
|
|
1619
|
+
accessToken: string;
|
|
1620
|
+
environment?: Environment;
|
|
1621
|
+
}
|
|
1622
|
+
declare class Toffee {
|
|
1623
|
+
readonly sessions: Sessions;
|
|
1624
|
+
readonly payments: Payments;
|
|
1625
|
+
readonly refunds: Refunds;
|
|
1626
|
+
readonly accounts: Accounts;
|
|
1627
|
+
readonly deposits: Deposits;
|
|
1628
|
+
constructor(opts: ToffeeOptions);
|
|
1629
|
+
checkout(...args: Parameters<Sessions["create"]>): Promise<Session>;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export { type Account, Accounts, type Balance, type CreateRefundRequest, type CreateSessionRequest, type Deposit, Deposits, type Environment, type GameUser, type GetSessionStatusResponse, type Item, type ListAccountsRequest, type ListAccountsResponse, type ListDepositsRequest, type ListDepositsResponse, type ListPaymentsRequest, type ListPaymentsResponse, type ListRefundsRequest, type ListRefundsResponse, type ListSessionsRequest, type ListSessionsResponse, type Payment, type PaymentExtraData, Payments, type Refund, Refunds, type Session, type SessionMetadata, Sessions, type Tax, Toffee, type Error as ToffeeError, type ToffeeOptions };
|