@funpay-pilot/contracts 0.1.8 → 0.1.9

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/auth.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.6
4
- // protoc v7.34.0
4
+ // protoc v6.33.6
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/funpay.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.6
4
- // protoc v7.34.0
4
+ // protoc v6.33.6
5
5
  // source: funpay.proto
6
6
 
7
7
  /* eslint-disable */
@@ -24,7 +24,30 @@ export interface CreateAccountRequest {
24
24
  goldenKey: string;
25
25
  }
26
26
 
27
- export interface CreateAccountResponse {
27
+ export interface GetAccountsListRequest {
28
+ userId: string;
29
+ }
30
+
31
+ export interface GetAccountsListResponse {
32
+ userId: string;
33
+ accounts: Account[];
34
+ }
35
+
36
+ export interface GetAccountRequest {
37
+ userId: string;
38
+ id: string;
39
+ }
40
+
41
+ export interface DeleteAccountRequest {
42
+ userId: string;
43
+ id: string;
44
+ }
45
+
46
+ export interface DeleteAccountResponse {
47
+ ok: boolean;
48
+ }
49
+
50
+ export interface Account {
28
51
  id: string;
29
52
  userId: string;
30
53
  funpayId: number;
@@ -42,18 +65,32 @@ export interface CreateAccountResponse {
42
65
  export const FUNPAY_V1_PACKAGE_NAME = "funpay.v1";
43
66
 
44
67
  export interface FunpayServiceClient {
45
- createAccount(request: CreateAccountRequest): Observable<CreateAccountResponse>;
68
+ createAccount(request: CreateAccountRequest): Observable<Account>;
69
+
70
+ getAccountsList(request: GetAccountsListRequest): Observable<GetAccountsListResponse>;
71
+
72
+ getAccount(request: GetAccountRequest): Observable<Account>;
73
+
74
+ deleteAccount(request: DeleteAccountRequest): Observable<DeleteAccountResponse>;
46
75
  }
47
76
 
48
77
  export interface FunpayServiceController {
49
- createAccount(
50
- request: CreateAccountRequest,
51
- ): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
78
+ createAccount(request: CreateAccountRequest): Promise<Account> | Observable<Account> | Account;
79
+
80
+ getAccountsList(
81
+ request: GetAccountsListRequest,
82
+ ): Promise<GetAccountsListResponse> | Observable<GetAccountsListResponse> | GetAccountsListResponse;
83
+
84
+ getAccount(request: GetAccountRequest): Promise<Account> | Observable<Account> | Account;
85
+
86
+ deleteAccount(
87
+ request: DeleteAccountRequest,
88
+ ): Promise<DeleteAccountResponse> | Observable<DeleteAccountResponse> | DeleteAccountResponse;
52
89
  }
53
90
 
54
91
  export function FunpayServiceControllerMethods() {
55
92
  return function (constructor: Function) {
56
- const grpcMethods: string[] = ["createAccount"];
93
+ const grpcMethods: string[] = ["createAccount", "getAccountsList", "getAccount", "deleteAccount"];
57
94
  for (const method of grpcMethods) {
58
95
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
59
96
  GrpcMethod("FunpayService", method)(constructor.prototype[method], method, descriptor);
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.6
4
- // protoc v7.34.0
4
+ // protoc v6.33.6
5
5
  // source: google/protobuf/timestamp.proto
6
6
 
7
7
  /* eslint-disable */
@@ -81,8 +81,8 @@ export const protobufPackage = "google.protobuf";
81
81
  * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
82
82
  * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
83
83
  * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
84
- * is required. A ProtoJSON serializer should always use UTC (as indicated by
85
- * "Z") when printing the Timestamp type and a ProtoJSON parser should be
84
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
85
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
86
86
  * able to accept both UTC and other timezones (as indicated by an offset).
87
87
  *
88
88
  * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
@@ -102,7 +102,7 @@ export const protobufPackage = "google.protobuf";
102
102
  export interface Timestamp {
103
103
  /**
104
104
  * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
105
- * be between -62135596800 and 253402300799 inclusive (which corresponds to
105
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
106
106
  * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
107
107
  */
108
108
  seconds: number;
package/gen/users.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.6
4
- // protoc v7.34.0
4
+ // protoc v6.33.6
5
5
  // source: users.proto
6
6
 
7
7
  /* eslint-disable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funpay-pilot/contracts",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -5,7 +5,10 @@ package funpay.v1;
5
5
  import "google/protobuf/timestamp.proto";
6
6
 
7
7
  service FunpayService {
8
- rpc CreateAccount(CreateAccountRequest) returns (CreateAccountResponse);
8
+ rpc CreateAccount(CreateAccountRequest) returns (Account);
9
+ rpc GetAccountsList(GetAccountsListRequest) returns (GetAccountsListResponse);
10
+ rpc GetAccount(GetAccountRequest) returns (Account);
11
+ rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
9
12
  }
10
13
 
11
14
  message CreateAccountRequest {
@@ -13,7 +16,30 @@ message CreateAccountRequest {
13
16
  string golden_key = 2;
14
17
  }
15
18
 
16
- message CreateAccountResponse {
19
+ message GetAccountsListRequest {
20
+ string user_id = 1;
21
+ }
22
+
23
+ message GetAccountsListResponse {
24
+ string user_id = 1;
25
+ repeated Account accounts = 2;
26
+ }
27
+
28
+ message GetAccountRequest {
29
+ string user_id = 1;
30
+ string id = 2;
31
+ }
32
+
33
+ message DeleteAccountRequest {
34
+ string user_id = 1;
35
+ string id = 2;
36
+ }
37
+
38
+ message DeleteAccountResponse {
39
+ bool ok = 1;
40
+ }
41
+
42
+ message Account {
17
43
  string id = 1;
18
44
  string user_id = 2;
19
45
  int32 funpay_id = 3;