@stashfin/grpc 1.2.578 → 1.2.581

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.2.578",
3
+ "version": "1.2.581",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -3,8 +3,11 @@ export declare const protobufPackage = "banking.aa.getbanklist";
3
3
  export interface getBankListRequest {
4
4
  }
5
5
  export interface getBankListResponse {
6
- fip: BankData[];
7
- netbanking_url: string;
6
+ success?: boolean | undefined;
7
+ data: BankData[];
8
+ error_message?: string | undefined;
9
+ error_code?: string | undefined;
10
+ netbanking_url?: string | undefined;
8
11
  }
9
12
  export interface BankData {
10
13
  id: string;
@@ -50,15 +50,24 @@ exports.getBankListRequest = {
50
50
  },
51
51
  };
52
52
  function createBasegetBankListResponse() {
53
- return { fip: [], netbanking_url: "" };
53
+ return { success: undefined, data: [], error_message: undefined, error_code: undefined, netbanking_url: undefined };
54
54
  }
55
55
  exports.getBankListResponse = {
56
56
  encode(message, writer = minimal_1.default.Writer.create()) {
57
- for (const v of message.fip) {
58
- exports.BankData.encode(v, writer.uint32(10).fork()).ldelim();
57
+ if (message.success !== undefined) {
58
+ writer.uint32(8).bool(message.success);
59
59
  }
60
- if (message.netbanking_url !== "") {
61
- writer.uint32(18).string(message.netbanking_url);
60
+ for (const v of message.data) {
61
+ exports.BankData.encode(v, writer.uint32(18).fork()).ldelim();
62
+ }
63
+ if (message.error_message !== undefined) {
64
+ writer.uint32(26).string(message.error_message);
65
+ }
66
+ if (message.error_code !== undefined) {
67
+ writer.uint32(34).string(message.error_code);
68
+ }
69
+ if (message.netbanking_url !== undefined) {
70
+ writer.uint32(42).string(message.netbanking_url);
62
71
  }
63
72
  return writer;
64
73
  },
@@ -70,15 +79,33 @@ exports.getBankListResponse = {
70
79
  const tag = reader.uint32();
71
80
  switch (tag >>> 3) {
72
81
  case 1:
73
- if (tag !== 10) {
82
+ if (tag !== 8) {
74
83
  break;
75
84
  }
76
- message.fip.push(exports.BankData.decode(reader, reader.uint32()));
85
+ message.success = reader.bool();
77
86
  continue;
78
87
  case 2:
79
88
  if (tag !== 18) {
80
89
  break;
81
90
  }
91
+ message.data.push(exports.BankData.decode(reader, reader.uint32()));
92
+ continue;
93
+ case 3:
94
+ if (tag !== 26) {
95
+ break;
96
+ }
97
+ message.error_message = reader.string();
98
+ continue;
99
+ case 4:
100
+ if (tag !== 34) {
101
+ break;
102
+ }
103
+ message.error_code = reader.string();
104
+ continue;
105
+ case 5:
106
+ if (tag !== 42) {
107
+ break;
108
+ }
82
109
  message.netbanking_url = reader.string();
83
110
  continue;
84
111
  }
@@ -91,16 +118,28 @@ exports.getBankListResponse = {
91
118
  },
92
119
  fromJSON(object) {
93
120
  return {
94
- fip: globalThis.Array.isArray(object?.fip) ? object.fip.map((e) => exports.BankData.fromJSON(e)) : [],
95
- netbanking_url: isSet(object.netbanking_url) ? globalThis.String(object.netbanking_url) : "",
121
+ success: isSet(object.success) ? globalThis.Boolean(object.success) : undefined,
122
+ data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => exports.BankData.fromJSON(e)) : [],
123
+ error_message: isSet(object.error_message) ? globalThis.String(object.error_message) : undefined,
124
+ error_code: isSet(object.error_code) ? globalThis.String(object.error_code) : undefined,
125
+ netbanking_url: isSet(object.netbanking_url) ? globalThis.String(object.netbanking_url) : undefined,
96
126
  };
97
127
  },
98
128
  toJSON(message) {
99
129
  const obj = {};
100
- if (message.fip?.length) {
101
- obj.fip = message.fip.map((e) => exports.BankData.toJSON(e));
130
+ if (message.success !== undefined) {
131
+ obj.success = message.success;
132
+ }
133
+ if (message.data?.length) {
134
+ obj.data = message.data.map((e) => exports.BankData.toJSON(e));
135
+ }
136
+ if (message.error_message !== undefined) {
137
+ obj.error_message = message.error_message;
138
+ }
139
+ if (message.error_code !== undefined) {
140
+ obj.error_code = message.error_code;
102
141
  }
103
- if (message.netbanking_url !== "") {
142
+ if (message.netbanking_url !== undefined) {
104
143
  obj.netbanking_url = message.netbanking_url;
105
144
  }
106
145
  return obj;
@@ -110,8 +149,11 @@ exports.getBankListResponse = {
110
149
  },
111
150
  fromPartial(object) {
112
151
  const message = createBasegetBankListResponse();
113
- message.fip = object.fip?.map((e) => exports.BankData.fromPartial(e)) || [];
114
- message.netbanking_url = object.netbanking_url ?? "";
152
+ message.success = object.success ?? undefined;
153
+ message.data = object.data?.map((e) => exports.BankData.fromPartial(e)) || [];
154
+ message.error_message = object.error_message ?? undefined;
155
+ message.error_code = object.error_code ?? undefined;
156
+ message.netbanking_url = object.netbanking_url ?? undefined;
115
157
  return message;
116
158
  },
117
159
  };
@@ -6,10 +6,13 @@ export interface initiateRequest {
6
6
  fip_ids: string[];
7
7
  }
8
8
  export interface initiateResponse {
9
+ success?: boolean | undefined;
9
10
  journey_type: string;
10
11
  monitoring_reference_id: string;
11
12
  underwriting_reference_id: string;
12
13
  redirection_url: string;
14
+ error_message?: string | undefined;
15
+ error_code?: string | undefined;
13
16
  }
14
17
  export declare const initiateRequest: {
15
18
  encode(message: initiateRequest, writer?: _m0.Writer): _m0.Writer;
@@ -94,21 +94,38 @@ exports.initiateRequest = {
94
94
  },
95
95
  };
96
96
  function createBaseinitiateResponse() {
97
- return { journey_type: "", monitoring_reference_id: "", underwriting_reference_id: "", redirection_url: "" };
97
+ return {
98
+ success: undefined,
99
+ journey_type: "",
100
+ monitoring_reference_id: "",
101
+ underwriting_reference_id: "",
102
+ redirection_url: "",
103
+ error_message: undefined,
104
+ error_code: undefined,
105
+ };
98
106
  }
99
107
  exports.initiateResponse = {
100
108
  encode(message, writer = minimal_1.default.Writer.create()) {
109
+ if (message.success !== undefined) {
110
+ writer.uint32(8).bool(message.success);
111
+ }
101
112
  if (message.journey_type !== "") {
102
- writer.uint32(10).string(message.journey_type);
113
+ writer.uint32(18).string(message.journey_type);
103
114
  }
104
115
  if (message.monitoring_reference_id !== "") {
105
- writer.uint32(18).string(message.monitoring_reference_id);
116
+ writer.uint32(26).string(message.monitoring_reference_id);
106
117
  }
107
118
  if (message.underwriting_reference_id !== "") {
108
- writer.uint32(26).string(message.underwriting_reference_id);
119
+ writer.uint32(34).string(message.underwriting_reference_id);
109
120
  }
110
121
  if (message.redirection_url !== "") {
111
- writer.uint32(34).string(message.redirection_url);
122
+ writer.uint32(42).string(message.redirection_url);
123
+ }
124
+ if (message.error_message !== undefined) {
125
+ writer.uint32(50).string(message.error_message);
126
+ }
127
+ if (message.error_code !== undefined) {
128
+ writer.uint32(58).string(message.error_code);
112
129
  }
113
130
  return writer;
114
131
  },
@@ -120,29 +137,47 @@ exports.initiateResponse = {
120
137
  const tag = reader.uint32();
121
138
  switch (tag >>> 3) {
122
139
  case 1:
123
- if (tag !== 10) {
140
+ if (tag !== 8) {
124
141
  break;
125
142
  }
126
- message.journey_type = reader.string();
143
+ message.success = reader.bool();
127
144
  continue;
128
145
  case 2:
129
146
  if (tag !== 18) {
130
147
  break;
131
148
  }
132
- message.monitoring_reference_id = reader.string();
149
+ message.journey_type = reader.string();
133
150
  continue;
134
151
  case 3:
135
152
  if (tag !== 26) {
136
153
  break;
137
154
  }
138
- message.underwriting_reference_id = reader.string();
155
+ message.monitoring_reference_id = reader.string();
139
156
  continue;
140
157
  case 4:
141
158
  if (tag !== 34) {
142
159
  break;
143
160
  }
161
+ message.underwriting_reference_id = reader.string();
162
+ continue;
163
+ case 5:
164
+ if (tag !== 42) {
165
+ break;
166
+ }
144
167
  message.redirection_url = reader.string();
145
168
  continue;
169
+ case 6:
170
+ if (tag !== 50) {
171
+ break;
172
+ }
173
+ message.error_message = reader.string();
174
+ continue;
175
+ case 7:
176
+ if (tag !== 58) {
177
+ break;
178
+ }
179
+ message.error_code = reader.string();
180
+ continue;
146
181
  }
147
182
  if ((tag & 7) === 4 || tag === 0) {
148
183
  break;
@@ -153,6 +188,7 @@ exports.initiateResponse = {
153
188
  },
154
189
  fromJSON(object) {
155
190
  return {
191
+ success: isSet(object.success) ? globalThis.Boolean(object.success) : undefined,
156
192
  journey_type: isSet(object.journey_type) ? globalThis.String(object.journey_type) : "",
157
193
  monitoring_reference_id: isSet(object.monitoring_reference_id)
158
194
  ? globalThis.String(object.monitoring_reference_id)
@@ -161,10 +197,15 @@ exports.initiateResponse = {
161
197
  ? globalThis.String(object.underwriting_reference_id)
162
198
  : "",
163
199
  redirection_url: isSet(object.redirection_url) ? globalThis.String(object.redirection_url) : "",
200
+ error_message: isSet(object.error_message) ? globalThis.String(object.error_message) : undefined,
201
+ error_code: isSet(object.error_code) ? globalThis.String(object.error_code) : undefined,
164
202
  };
165
203
  },
166
204
  toJSON(message) {
167
205
  const obj = {};
206
+ if (message.success !== undefined) {
207
+ obj.success = message.success;
208
+ }
168
209
  if (message.journey_type !== "") {
169
210
  obj.journey_type = message.journey_type;
170
211
  }
@@ -177,6 +218,12 @@ exports.initiateResponse = {
177
218
  if (message.redirection_url !== "") {
178
219
  obj.redirection_url = message.redirection_url;
179
220
  }
221
+ if (message.error_message !== undefined) {
222
+ obj.error_message = message.error_message;
223
+ }
224
+ if (message.error_code !== undefined) {
225
+ obj.error_code = message.error_code;
226
+ }
180
227
  return obj;
181
228
  },
182
229
  create(base) {
@@ -184,10 +231,13 @@ exports.initiateResponse = {
184
231
  },
185
232
  fromPartial(object) {
186
233
  const message = createBaseinitiateResponse();
234
+ message.success = object.success ?? undefined;
187
235
  message.journey_type = object.journey_type ?? "";
188
236
  message.monitoring_reference_id = object.monitoring_reference_id ?? "";
189
237
  message.underwriting_reference_id = object.underwriting_reference_id ?? "";
190
238
  message.redirection_url = object.redirection_url ?? "";
239
+ message.error_message = object.error_message ?? undefined;
240
+ message.error_code = object.error_code ?? undefined;
191
241
  return message;
192
242
  },
193
243
  };
@@ -0,0 +1,43 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "kyc.facematch";
3
+ export interface faceMatchRequest {
4
+ selfie_image: string;
5
+ kyc_image: string;
6
+ customer_id: number;
7
+ txn_id: string;
8
+ }
9
+ export interface faceMatchResponse {
10
+ conf: string;
11
+ match: string;
12
+ match_score: number;
13
+ to_be_reviewed: string;
14
+ customer_id: number;
15
+ txn_id: string;
16
+ }
17
+ export declare const faceMatchRequest: {
18
+ encode(message: faceMatchRequest, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): faceMatchRequest;
20
+ fromJSON(object: any): faceMatchRequest;
21
+ toJSON(message: faceMatchRequest): unknown;
22
+ create<I extends Exact<DeepPartial<faceMatchRequest>, I>>(base?: I): faceMatchRequest;
23
+ fromPartial<I extends Exact<DeepPartial<faceMatchRequest>, I>>(object: I): faceMatchRequest;
24
+ };
25
+ export declare const faceMatchResponse: {
26
+ encode(message: faceMatchResponse, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): faceMatchResponse;
28
+ fromJSON(object: any): faceMatchResponse;
29
+ toJSON(message: faceMatchResponse): unknown;
30
+ create<I extends Exact<DeepPartial<faceMatchResponse>, I>>(base?: I): faceMatchResponse;
31
+ fromPartial<I extends Exact<DeepPartial<faceMatchResponse>, I>>(object: I): faceMatchResponse;
32
+ };
33
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
34
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
35
+ [K in keyof T]?: DeepPartial<T[K]>;
36
+ } : Partial<T>;
37
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
38
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
39
+ [K in keyof P]: Exact<P[K], I[K]>;
40
+ } & {
41
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
42
+ };
43
+ export {};
@@ -0,0 +1,233 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.0
5
+ // protoc v5.29.3
6
+ // source: kyc/facematch.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.faceMatchResponse = exports.faceMatchRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "kyc.facematch";
15
+ function createBasefaceMatchRequest() {
16
+ return { selfie_image: "", kyc_image: "", customer_id: 0, txn_id: "" };
17
+ }
18
+ exports.faceMatchRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.selfie_image !== "") {
21
+ writer.uint32(10).string(message.selfie_image);
22
+ }
23
+ if (message.kyc_image !== "") {
24
+ writer.uint32(18).string(message.kyc_image);
25
+ }
26
+ if (message.customer_id !== 0) {
27
+ writer.uint32(24).int32(message.customer_id);
28
+ }
29
+ if (message.txn_id !== "") {
30
+ writer.uint32(34).string(message.txn_id);
31
+ }
32
+ return writer;
33
+ },
34
+ decode(input, length) {
35
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
36
+ let end = length === undefined ? reader.len : reader.pos + length;
37
+ const message = createBasefaceMatchRequest();
38
+ while (reader.pos < end) {
39
+ const tag = reader.uint32();
40
+ switch (tag >>> 3) {
41
+ case 1:
42
+ if (tag !== 10) {
43
+ break;
44
+ }
45
+ message.selfie_image = reader.string();
46
+ continue;
47
+ case 2:
48
+ if (tag !== 18) {
49
+ break;
50
+ }
51
+ message.kyc_image = reader.string();
52
+ continue;
53
+ case 3:
54
+ if (tag !== 24) {
55
+ break;
56
+ }
57
+ message.customer_id = reader.int32();
58
+ continue;
59
+ case 4:
60
+ if (tag !== 34) {
61
+ break;
62
+ }
63
+ message.txn_id = reader.string();
64
+ continue;
65
+ }
66
+ if ((tag & 7) === 4 || tag === 0) {
67
+ break;
68
+ }
69
+ reader.skipType(tag & 7);
70
+ }
71
+ return message;
72
+ },
73
+ fromJSON(object) {
74
+ return {
75
+ selfie_image: isSet(object.selfie_image) ? globalThis.String(object.selfie_image) : "",
76
+ kyc_image: isSet(object.kyc_image) ? globalThis.String(object.kyc_image) : "",
77
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
78
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
79
+ };
80
+ },
81
+ toJSON(message) {
82
+ const obj = {};
83
+ if (message.selfie_image !== "") {
84
+ obj.selfie_image = message.selfie_image;
85
+ }
86
+ if (message.kyc_image !== "") {
87
+ obj.kyc_image = message.kyc_image;
88
+ }
89
+ if (message.customer_id !== 0) {
90
+ obj.customer_id = Math.round(message.customer_id);
91
+ }
92
+ if (message.txn_id !== "") {
93
+ obj.txn_id = message.txn_id;
94
+ }
95
+ return obj;
96
+ },
97
+ create(base) {
98
+ return exports.faceMatchRequest.fromPartial(base ?? {});
99
+ },
100
+ fromPartial(object) {
101
+ const message = createBasefaceMatchRequest();
102
+ message.selfie_image = object.selfie_image ?? "";
103
+ message.kyc_image = object.kyc_image ?? "";
104
+ message.customer_id = object.customer_id ?? 0;
105
+ message.txn_id = object.txn_id ?? "";
106
+ return message;
107
+ },
108
+ };
109
+ function createBasefaceMatchResponse() {
110
+ return { conf: "", match: "", match_score: 0, to_be_reviewed: "", customer_id: 0, txn_id: "" };
111
+ }
112
+ exports.faceMatchResponse = {
113
+ encode(message, writer = minimal_1.default.Writer.create()) {
114
+ if (message.conf !== "") {
115
+ writer.uint32(10).string(message.conf);
116
+ }
117
+ if (message.match !== "") {
118
+ writer.uint32(18).string(message.match);
119
+ }
120
+ if (message.match_score !== 0) {
121
+ writer.uint32(24).int32(message.match_score);
122
+ }
123
+ if (message.to_be_reviewed !== "") {
124
+ writer.uint32(34).string(message.to_be_reviewed);
125
+ }
126
+ if (message.customer_id !== 0) {
127
+ writer.uint32(40).int32(message.customer_id);
128
+ }
129
+ if (message.txn_id !== "") {
130
+ writer.uint32(50).string(message.txn_id);
131
+ }
132
+ return writer;
133
+ },
134
+ decode(input, length) {
135
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
136
+ let end = length === undefined ? reader.len : reader.pos + length;
137
+ const message = createBasefaceMatchResponse();
138
+ while (reader.pos < end) {
139
+ const tag = reader.uint32();
140
+ switch (tag >>> 3) {
141
+ case 1:
142
+ if (tag !== 10) {
143
+ break;
144
+ }
145
+ message.conf = reader.string();
146
+ continue;
147
+ case 2:
148
+ if (tag !== 18) {
149
+ break;
150
+ }
151
+ message.match = reader.string();
152
+ continue;
153
+ case 3:
154
+ if (tag !== 24) {
155
+ break;
156
+ }
157
+ message.match_score = reader.int32();
158
+ continue;
159
+ case 4:
160
+ if (tag !== 34) {
161
+ break;
162
+ }
163
+ message.to_be_reviewed = reader.string();
164
+ continue;
165
+ case 5:
166
+ if (tag !== 40) {
167
+ break;
168
+ }
169
+ message.customer_id = reader.int32();
170
+ continue;
171
+ case 6:
172
+ if (tag !== 50) {
173
+ break;
174
+ }
175
+ message.txn_id = reader.string();
176
+ continue;
177
+ }
178
+ if ((tag & 7) === 4 || tag === 0) {
179
+ break;
180
+ }
181
+ reader.skipType(tag & 7);
182
+ }
183
+ return message;
184
+ },
185
+ fromJSON(object) {
186
+ return {
187
+ conf: isSet(object.conf) ? globalThis.String(object.conf) : "",
188
+ match: isSet(object.match) ? globalThis.String(object.match) : "",
189
+ match_score: isSet(object.match_score) ? globalThis.Number(object.match_score) : 0,
190
+ to_be_reviewed: isSet(object.to_be_reviewed) ? globalThis.String(object.to_be_reviewed) : "",
191
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
192
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
193
+ };
194
+ },
195
+ toJSON(message) {
196
+ const obj = {};
197
+ if (message.conf !== "") {
198
+ obj.conf = message.conf;
199
+ }
200
+ if (message.match !== "") {
201
+ obj.match = message.match;
202
+ }
203
+ if (message.match_score !== 0) {
204
+ obj.match_score = Math.round(message.match_score);
205
+ }
206
+ if (message.to_be_reviewed !== "") {
207
+ obj.to_be_reviewed = message.to_be_reviewed;
208
+ }
209
+ if (message.customer_id !== 0) {
210
+ obj.customer_id = Math.round(message.customer_id);
211
+ }
212
+ if (message.txn_id !== "") {
213
+ obj.txn_id = message.txn_id;
214
+ }
215
+ return obj;
216
+ },
217
+ create(base) {
218
+ return exports.faceMatchResponse.fromPartial(base ?? {});
219
+ },
220
+ fromPartial(object) {
221
+ const message = createBasefaceMatchResponse();
222
+ message.conf = object.conf ?? "";
223
+ message.match = object.match ?? "";
224
+ message.match_score = object.match_score ?? 0;
225
+ message.to_be_reviewed = object.to_be_reviewed ?? "";
226
+ message.customer_id = object.customer_id ?? 0;
227
+ message.txn_id = object.txn_id ?? "";
228
+ return message;
229
+ },
230
+ };
231
+ function isSet(value) {
232
+ return value !== null && value !== undefined;
233
+ }
@@ -0,0 +1,36 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "kyc.getselfietxnid";
3
+ export interface selfieTxnIdRequest {
4
+ txn_id: string;
5
+ }
6
+ export interface selfieTxnIdResponse {
7
+ txn_id: string;
8
+ selfie_url: string;
9
+ }
10
+ export declare const selfieTxnIdRequest: {
11
+ encode(message: selfieTxnIdRequest, writer?: _m0.Writer): _m0.Writer;
12
+ decode(input: _m0.Reader | Uint8Array, length?: number): selfieTxnIdRequest;
13
+ fromJSON(object: any): selfieTxnIdRequest;
14
+ toJSON(message: selfieTxnIdRequest): unknown;
15
+ create<I extends Exact<DeepPartial<selfieTxnIdRequest>, I>>(base?: I): selfieTxnIdRequest;
16
+ fromPartial<I extends Exact<DeepPartial<selfieTxnIdRequest>, I>>(object: I): selfieTxnIdRequest;
17
+ };
18
+ export declare const selfieTxnIdResponse: {
19
+ encode(message: selfieTxnIdResponse, writer?: _m0.Writer): _m0.Writer;
20
+ decode(input: _m0.Reader | Uint8Array, length?: number): selfieTxnIdResponse;
21
+ fromJSON(object: any): selfieTxnIdResponse;
22
+ toJSON(message: selfieTxnIdResponse): unknown;
23
+ create<I extends Exact<DeepPartial<selfieTxnIdResponse>, I>>(base?: I): selfieTxnIdResponse;
24
+ fromPartial<I extends Exact<DeepPartial<selfieTxnIdResponse>, I>>(object: I): selfieTxnIdResponse;
25
+ };
26
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
27
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
28
+ [K in keyof T]?: DeepPartial<T[K]>;
29
+ } : Partial<T>;
30
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
31
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
32
+ [K in keyof P]: Exact<P[K], I[K]>;
33
+ } & {
34
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
35
+ };
36
+ export {};
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.0
5
+ // protoc v5.29.3
6
+ // source: kyc/getselfietxnid.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.selfieTxnIdResponse = exports.selfieTxnIdRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "kyc.getselfietxnid";
15
+ function createBaseselfieTxnIdRequest() {
16
+ return { txn_id: "" };
17
+ }
18
+ exports.selfieTxnIdRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.txn_id !== "") {
21
+ writer.uint32(10).string(message.txn_id);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseselfieTxnIdRequest();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1:
33
+ if (tag !== 10) {
34
+ break;
35
+ }
36
+ message.txn_id = reader.string();
37
+ continue;
38
+ }
39
+ if ((tag & 7) === 4 || tag === 0) {
40
+ break;
41
+ }
42
+ reader.skipType(tag & 7);
43
+ }
44
+ return message;
45
+ },
46
+ fromJSON(object) {
47
+ return { txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "" };
48
+ },
49
+ toJSON(message) {
50
+ const obj = {};
51
+ if (message.txn_id !== "") {
52
+ obj.txn_id = message.txn_id;
53
+ }
54
+ return obj;
55
+ },
56
+ create(base) {
57
+ return exports.selfieTxnIdRequest.fromPartial(base ?? {});
58
+ },
59
+ fromPartial(object) {
60
+ const message = createBaseselfieTxnIdRequest();
61
+ message.txn_id = object.txn_id ?? "";
62
+ return message;
63
+ },
64
+ };
65
+ function createBaseselfieTxnIdResponse() {
66
+ return { txn_id: "", selfie_url: "" };
67
+ }
68
+ exports.selfieTxnIdResponse = {
69
+ encode(message, writer = minimal_1.default.Writer.create()) {
70
+ if (message.txn_id !== "") {
71
+ writer.uint32(10).string(message.txn_id);
72
+ }
73
+ if (message.selfie_url !== "") {
74
+ writer.uint32(18).string(message.selfie_url);
75
+ }
76
+ return writer;
77
+ },
78
+ decode(input, length) {
79
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
80
+ let end = length === undefined ? reader.len : reader.pos + length;
81
+ const message = createBaseselfieTxnIdResponse();
82
+ while (reader.pos < end) {
83
+ const tag = reader.uint32();
84
+ switch (tag >>> 3) {
85
+ case 1:
86
+ if (tag !== 10) {
87
+ break;
88
+ }
89
+ message.txn_id = reader.string();
90
+ continue;
91
+ case 2:
92
+ if (tag !== 18) {
93
+ break;
94
+ }
95
+ message.selfie_url = reader.string();
96
+ continue;
97
+ }
98
+ if ((tag & 7) === 4 || tag === 0) {
99
+ break;
100
+ }
101
+ reader.skipType(tag & 7);
102
+ }
103
+ return message;
104
+ },
105
+ fromJSON(object) {
106
+ return {
107
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
108
+ selfie_url: isSet(object.selfie_url) ? globalThis.String(object.selfie_url) : "",
109
+ };
110
+ },
111
+ toJSON(message) {
112
+ const obj = {};
113
+ if (message.txn_id !== "") {
114
+ obj.txn_id = message.txn_id;
115
+ }
116
+ if (message.selfie_url !== "") {
117
+ obj.selfie_url = message.selfie_url;
118
+ }
119
+ return obj;
120
+ },
121
+ create(base) {
122
+ return exports.selfieTxnIdResponse.fromPartial(base ?? {});
123
+ },
124
+ fromPartial(object) {
125
+ const message = createBaseselfieTxnIdResponse();
126
+ message.txn_id = object.txn_id ?? "";
127
+ message.selfie_url = object.selfie_url ?? "";
128
+ return message;
129
+ },
130
+ };
131
+ function isSet(value) {
132
+ return value !== null && value !== undefined;
133
+ }
package/ts/kyc.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
2
+ import { faceMatchRequest, faceMatchResponse } from "./kyc/facematch";
2
3
  import { fetchEmploymentHistoryRequest, fetchEmploymentHistoryResponse } from "./kyc/fetchemploymenthistory";
3
4
  import { fetchUanListRequest, fetchUanListResponse } from "./kyc/fetchuanlist";
5
+ import { selfieTxnIdRequest, selfieTxnIdResponse } from "./kyc/getselfietxnid";
4
6
  export declare const protobufPackage = "service";
5
7
  export type kycService = typeof kycService;
6
8
  export declare const kycService: {
@@ -22,10 +24,30 @@ export declare const kycService: {
22
24
  readonly responseSerialize: (value: fetchEmploymentHistoryResponse) => Buffer;
23
25
  readonly responseDeserialize: (value: Buffer) => fetchEmploymentHistoryResponse;
24
26
  };
27
+ readonly getSelfieTxnId: {
28
+ readonly path: "/service.kyc/getSelfieTxnId";
29
+ readonly requestStream: false;
30
+ readonly responseStream: false;
31
+ readonly requestSerialize: (value: selfieTxnIdRequest) => Buffer;
32
+ readonly requestDeserialize: (value: Buffer) => selfieTxnIdRequest;
33
+ readonly responseSerialize: (value: selfieTxnIdResponse) => Buffer;
34
+ readonly responseDeserialize: (value: Buffer) => selfieTxnIdResponse;
35
+ };
36
+ readonly faceMatch: {
37
+ readonly path: "/service.kyc/faceMatch";
38
+ readonly requestStream: false;
39
+ readonly responseStream: false;
40
+ readonly requestSerialize: (value: faceMatchRequest) => Buffer;
41
+ readonly requestDeserialize: (value: Buffer) => faceMatchRequest;
42
+ readonly responseSerialize: (value: faceMatchResponse) => Buffer;
43
+ readonly responseDeserialize: (value: Buffer) => faceMatchResponse;
44
+ };
25
45
  };
26
46
  export interface kycServer extends UntypedServiceImplementation {
27
47
  fetchUanList: handleUnaryCall<fetchUanListRequest, fetchUanListResponse>;
28
48
  fetchEmploymentDetail: handleUnaryCall<fetchEmploymentHistoryRequest, fetchEmploymentHistoryResponse>;
49
+ getSelfieTxnId: handleUnaryCall<selfieTxnIdRequest, selfieTxnIdResponse>;
50
+ faceMatch: handleUnaryCall<faceMatchRequest, faceMatchResponse>;
29
51
  }
30
52
  export interface kycClient extends Client {
31
53
  fetchUanList(request: fetchUanListRequest, callback: (error: ServiceError | null, response: fetchUanListResponse) => void): ClientUnaryCall;
@@ -34,6 +56,12 @@ export interface kycClient extends Client {
34
56
  fetchEmploymentDetail(request: fetchEmploymentHistoryRequest, callback: (error: ServiceError | null, response: fetchEmploymentHistoryResponse) => void): ClientUnaryCall;
35
57
  fetchEmploymentDetail(request: fetchEmploymentHistoryRequest, metadata: Metadata, callback: (error: ServiceError | null, response: fetchEmploymentHistoryResponse) => void): ClientUnaryCall;
36
58
  fetchEmploymentDetail(request: fetchEmploymentHistoryRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: fetchEmploymentHistoryResponse) => void): ClientUnaryCall;
59
+ getSelfieTxnId(request: selfieTxnIdRequest, callback: (error: ServiceError | null, response: selfieTxnIdResponse) => void): ClientUnaryCall;
60
+ getSelfieTxnId(request: selfieTxnIdRequest, metadata: Metadata, callback: (error: ServiceError | null, response: selfieTxnIdResponse) => void): ClientUnaryCall;
61
+ getSelfieTxnId(request: selfieTxnIdRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: selfieTxnIdResponse) => void): ClientUnaryCall;
62
+ faceMatch(request: faceMatchRequest, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
63
+ faceMatch(request: faceMatchRequest, metadata: Metadata, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
64
+ faceMatch(request: faceMatchRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
37
65
  }
38
66
  export declare const kycClient: {
39
67
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): kycClient;
package/ts/kyc.js CHANGED
@@ -8,8 +8,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.kycClient = exports.kycService = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const grpc_js_1 = require("@grpc/grpc-js");
11
+ const facematch_1 = require("./kyc/facematch");
11
12
  const fetchemploymenthistory_1 = require("./kyc/fetchemploymenthistory");
12
13
  const fetchuanlist_1 = require("./kyc/fetchuanlist");
14
+ const getselfietxnid_1 = require("./kyc/getselfietxnid");
13
15
  exports.protobufPackage = "service";
14
16
  exports.kycService = {
15
17
  fetchUanList: {
@@ -30,5 +32,23 @@ exports.kycService = {
30
32
  responseSerialize: (value) => Buffer.from(fetchemploymenthistory_1.fetchEmploymentHistoryResponse.encode(value).finish()),
31
33
  responseDeserialize: (value) => fetchemploymenthistory_1.fetchEmploymentHistoryResponse.decode(value),
32
34
  },
35
+ getSelfieTxnId: {
36
+ path: "/service.kyc/getSelfieTxnId",
37
+ requestStream: false,
38
+ responseStream: false,
39
+ requestSerialize: (value) => Buffer.from(getselfietxnid_1.selfieTxnIdRequest.encode(value).finish()),
40
+ requestDeserialize: (value) => getselfietxnid_1.selfieTxnIdRequest.decode(value),
41
+ responseSerialize: (value) => Buffer.from(getselfietxnid_1.selfieTxnIdResponse.encode(value).finish()),
42
+ responseDeserialize: (value) => getselfietxnid_1.selfieTxnIdResponse.decode(value),
43
+ },
44
+ faceMatch: {
45
+ path: "/service.kyc/faceMatch",
46
+ requestStream: false,
47
+ responseStream: false,
48
+ requestSerialize: (value) => Buffer.from(facematch_1.faceMatchRequest.encode(value).finish()),
49
+ requestDeserialize: (value) => facematch_1.faceMatchRequest.decode(value),
50
+ responseSerialize: (value) => Buffer.from(facematch_1.faceMatchResponse.encode(value).finish()),
51
+ responseDeserialize: (value) => facematch_1.faceMatchResponse.decode(value),
52
+ },
33
53
  };
34
54
  exports.kycClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.kycService, "service.kyc");