@stashfin/grpc 1.2.622 → 1.2.623
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v1.181.0
|
|
5
|
-
// protoc v5.
|
|
5
|
+
// protoc v5.29.3
|
|
6
6
|
// source: google/protobuf/timestamp.proto
|
|
7
7
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -10,8 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.PanData = exports.Data = exports.fetchAadhaarByPanResponse = exports.fetchAadhaarByPanRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
|
-
const long_1 = __importDefault(require("long"));
|
|
14
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
15
15
|
exports.protobufPackage = "kyc.fetchaadhaarbypan";
|
|
16
16
|
function createBasefetchAadhaarByPanRequest() {
|
|
17
17
|
return { pan_number: "" };
|
|
@@ -64,7 +64,7 @@ exports.fetchAadhaarByPanRequest = {
|
|
|
64
64
|
},
|
|
65
65
|
};
|
|
66
66
|
function createBasefetchAadhaarByPanResponse() {
|
|
67
|
-
return { request_id: "", transaction_id: "", status: 0, data: undefined, timestamp:
|
|
67
|
+
return { request_id: "", transaction_id: "", status: 0, data: undefined, timestamp: undefined, path: "" };
|
|
68
68
|
}
|
|
69
69
|
exports.fetchAadhaarByPanResponse = {
|
|
70
70
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -80,8 +80,8 @@ exports.fetchAadhaarByPanResponse = {
|
|
|
80
80
|
if (message.data !== undefined) {
|
|
81
81
|
exports.Data.encode(message.data, writer.uint32(34).fork()).ldelim();
|
|
82
82
|
}
|
|
83
|
-
if (message.timestamp !==
|
|
84
|
-
writer.uint32(
|
|
83
|
+
if (message.timestamp !== undefined) {
|
|
84
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
|
|
85
85
|
}
|
|
86
86
|
if (message.path !== "") {
|
|
87
87
|
writer.uint32(50).string(message.path);
|
|
@@ -120,10 +120,10 @@ exports.fetchAadhaarByPanResponse = {
|
|
|
120
120
|
message.data = exports.Data.decode(reader, reader.uint32());
|
|
121
121
|
continue;
|
|
122
122
|
case 5:
|
|
123
|
-
if (tag !==
|
|
123
|
+
if (tag !== 42) {
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
|
-
message.timestamp =
|
|
126
|
+
message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
127
127
|
continue;
|
|
128
128
|
case 6:
|
|
129
129
|
if (tag !== 50) {
|
|
@@ -145,7 +145,7 @@ exports.fetchAadhaarByPanResponse = {
|
|
|
145
145
|
transaction_id: isSet(object.transaction_id) ? globalThis.String(object.transaction_id) : "",
|
|
146
146
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
147
147
|
data: isSet(object.data) ? exports.Data.fromJSON(object.data) : undefined,
|
|
148
|
-
timestamp: isSet(object.timestamp) ?
|
|
148
|
+
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
149
149
|
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
150
150
|
};
|
|
151
151
|
},
|
|
@@ -163,8 +163,8 @@ exports.fetchAadhaarByPanResponse = {
|
|
|
163
163
|
if (message.data !== undefined) {
|
|
164
164
|
obj.data = exports.Data.toJSON(message.data);
|
|
165
165
|
}
|
|
166
|
-
if (message.timestamp !==
|
|
167
|
-
obj.timestamp =
|
|
166
|
+
if (message.timestamp !== undefined) {
|
|
167
|
+
obj.timestamp = message.timestamp.toISOString();
|
|
168
168
|
}
|
|
169
169
|
if (message.path !== "") {
|
|
170
170
|
obj.path = message.path;
|
|
@@ -180,7 +180,7 @@ exports.fetchAadhaarByPanResponse = {
|
|
|
180
180
|
message.transaction_id = object.transaction_id ?? "";
|
|
181
181
|
message.status = object.status ?? 0;
|
|
182
182
|
message.data = (object.data !== undefined && object.data !== null) ? exports.Data.fromPartial(object.data) : undefined;
|
|
183
|
-
message.timestamp = object.timestamp ??
|
|
183
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
184
184
|
message.path = object.path ?? "";
|
|
185
185
|
return message;
|
|
186
186
|
},
|
|
@@ -347,18 +347,26 @@ exports.PanData = {
|
|
|
347
347
|
return message;
|
|
348
348
|
},
|
|
349
349
|
};
|
|
350
|
-
function
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
function toTimestamp(date) {
|
|
351
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
352
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
353
|
+
return { seconds, nanos };
|
|
354
|
+
}
|
|
355
|
+
function fromTimestamp(t) {
|
|
356
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
357
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
358
|
+
return new globalThis.Date(millis);
|
|
359
|
+
}
|
|
360
|
+
function fromJsonTimestamp(o) {
|
|
361
|
+
if (o instanceof globalThis.Date) {
|
|
362
|
+
return o;
|
|
353
363
|
}
|
|
354
|
-
if (
|
|
355
|
-
|
|
364
|
+
else if (typeof o === "string") {
|
|
365
|
+
return new globalThis.Date(o);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
356
369
|
}
|
|
357
|
-
return long.toNumber();
|
|
358
|
-
}
|
|
359
|
-
if (minimal_1.default.util.Long !== long_1.default) {
|
|
360
|
-
minimal_1.default.util.Long = long_1.default;
|
|
361
|
-
minimal_1.default.configure();
|
|
362
370
|
}
|
|
363
371
|
function isSet(value) {
|
|
364
372
|
return value !== null && value !== undefined;
|