@stashfin/grpc 1.2.324 → 1.2.325
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 @@ import _m0 from "protobufjs/minimal";
|
|
|
2
2
|
export declare const protobufPackage = "customers.uploaddocuments";
|
|
3
3
|
export interface uploadDocumentsRequest {
|
|
4
4
|
title: string;
|
|
5
|
-
file:
|
|
5
|
+
file: string;
|
|
6
6
|
fileType: string;
|
|
7
7
|
}
|
|
8
8
|
export interface uploadDocumentsResponse {
|
|
@@ -13,15 +13,15 @@ exports.uploadDocumentsResponse = exports.uploadDocumentsRequest = exports.proto
|
|
|
13
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
14
|
exports.protobufPackage = "customers.uploaddocuments";
|
|
15
15
|
function createBaseuploadDocumentsRequest() {
|
|
16
|
-
return { title: "", file:
|
|
16
|
+
return { title: "", file: "", fileType: "" };
|
|
17
17
|
}
|
|
18
18
|
exports.uploadDocumentsRequest = {
|
|
19
19
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
20
|
if (message.title !== "") {
|
|
21
21
|
writer.uint32(10).string(message.title);
|
|
22
22
|
}
|
|
23
|
-
if (message.file
|
|
24
|
-
writer.uint32(18).
|
|
23
|
+
if (message.file !== "") {
|
|
24
|
+
writer.uint32(18).string(message.file);
|
|
25
25
|
}
|
|
26
26
|
if (message.fileType !== "") {
|
|
27
27
|
writer.uint32(26).string(message.fileType);
|
|
@@ -45,7 +45,7 @@ exports.uploadDocumentsRequest = {
|
|
|
45
45
|
if (tag !== 18) {
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
|
-
message.file = reader.
|
|
48
|
+
message.file = reader.string();
|
|
49
49
|
continue;
|
|
50
50
|
case 3:
|
|
51
51
|
if (tag !== 26) {
|
|
@@ -64,7 +64,7 @@ exports.uploadDocumentsRequest = {
|
|
|
64
64
|
fromJSON(object) {
|
|
65
65
|
return {
|
|
66
66
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
67
|
-
file: isSet(object.file) ?
|
|
67
|
+
file: isSet(object.file) ? globalThis.String(object.file) : "",
|
|
68
68
|
fileType: isSet(object.fileType) ? globalThis.String(object.fileType) : "",
|
|
69
69
|
};
|
|
70
70
|
},
|
|
@@ -73,8 +73,8 @@ exports.uploadDocumentsRequest = {
|
|
|
73
73
|
if (message.title !== "") {
|
|
74
74
|
obj.title = message.title;
|
|
75
75
|
}
|
|
76
|
-
if (message.file
|
|
77
|
-
obj.file =
|
|
76
|
+
if (message.file !== "") {
|
|
77
|
+
obj.file = message.file;
|
|
78
78
|
}
|
|
79
79
|
if (message.fileType !== "") {
|
|
80
80
|
obj.fileType = message.fileType;
|
|
@@ -87,7 +87,7 @@ exports.uploadDocumentsRequest = {
|
|
|
87
87
|
fromPartial(object) {
|
|
88
88
|
const message = createBaseuploadDocumentsRequest();
|
|
89
89
|
message.title = object.title ?? "";
|
|
90
|
-
message.file = object.file ??
|
|
90
|
+
message.file = object.file ?? "";
|
|
91
91
|
message.fileType = object.fileType ?? "";
|
|
92
92
|
return message;
|
|
93
93
|
},
|
|
@@ -142,31 +142,6 @@ exports.uploadDocumentsResponse = {
|
|
|
142
142
|
return message;
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
|
-
function bytesFromBase64(b64) {
|
|
146
|
-
if (globalThis.Buffer) {
|
|
147
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
const bin = globalThis.atob(b64);
|
|
151
|
-
const arr = new Uint8Array(bin.length);
|
|
152
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
153
|
-
arr[i] = bin.charCodeAt(i);
|
|
154
|
-
}
|
|
155
|
-
return arr;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function base64FromBytes(arr) {
|
|
159
|
-
if (globalThis.Buffer) {
|
|
160
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
const bin = [];
|
|
164
|
-
arr.forEach((byte) => {
|
|
165
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
166
|
-
});
|
|
167
|
-
return globalThis.btoa(bin.join(""));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
145
|
function isSet(value) {
|
|
171
146
|
return value !== null && value !== undefined;
|
|
172
147
|
}
|