@barumetric/contracts 1.3.11 → 1.3.13
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/ts/payment.ts +7 -13
- package/package.json +1 -1
- package/proto/payment.proto +9 -9
package/gen/ts/payment.ts
CHANGED
|
@@ -7,15 +7,16 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
10
11
|
|
|
11
12
|
export const protobufPackage = "payment.v1";
|
|
12
13
|
|
|
13
14
|
export enum PaymentStatus {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
UNSPECIFIED = 0,
|
|
16
|
+
PENDING = 1,
|
|
17
|
+
SUCCESS = 2,
|
|
18
|
+
FAILED = 3,
|
|
19
|
+
REFUNDED = 4,
|
|
19
20
|
UNRECOGNIZED = -1,
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -128,14 +129,7 @@ export interface PaymentItem {
|
|
|
128
129
|
/** сумма в минимальных единицах (копейки) */
|
|
129
130
|
amount: number;
|
|
130
131
|
status: PaymentStatus;
|
|
131
|
-
|
|
132
|
-
providerId?:
|
|
133
|
-
| string
|
|
134
|
-
| undefined;
|
|
135
|
-
/** ISO 8601 timestamp */
|
|
136
|
-
createdAt: string;
|
|
137
|
-
/** ISO 8601 timestamp */
|
|
138
|
-
updatedAt: string;
|
|
132
|
+
createdAt: Timestamp | undefined;
|
|
139
133
|
}
|
|
140
134
|
|
|
141
135
|
export const PAYMENT_V1_PACKAGE_NAME = "payment.v1";
|
package/package.json
CHANGED
package/proto/payment.proto
CHANGED
|
@@ -2,6 +2,8 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package payment.v1;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
|
|
5
7
|
service PaymentService {
|
|
6
8
|
rpc TopUpBalance (TopUpBalanceRequest) returns (TopUpBalanceResponse);
|
|
7
9
|
rpc ProcessPaymentEvent (ProcessPaymentEventRequest) returns (ProcessPaymentEventResponse);
|
|
@@ -105,17 +107,15 @@ message GetUserPaymentsResponse {
|
|
|
105
107
|
|
|
106
108
|
message PaymentItem {
|
|
107
109
|
string id = 1;
|
|
108
|
-
|
|
110
|
+
int32 amount = 2; // сумма в минимальных единицах (копейки)
|
|
109
111
|
PaymentStatus status = 3;
|
|
110
|
-
|
|
111
|
-
string created_at = 5; // ISO 8601 timestamp
|
|
112
|
-
string updated_at = 6; // ISO 8601 timestamp
|
|
112
|
+
google.protobuf.Timestamp created_at = 4;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
enum PaymentStatus {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
UNSPECIFIED = 0;
|
|
117
|
+
PENDING = 1;
|
|
118
|
+
SUCCESS = 2;
|
|
119
|
+
FAILED = 3;
|
|
120
|
+
REFUNDED = 4;
|
|
121
121
|
}
|