@fraym/proto 0.26.0 → 0.27.0
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.
|
@@ -12,11 +12,19 @@ export interface CloneEntryResponse {
|
|
|
12
12
|
newData: {
|
|
13
13
|
[key: string]: string;
|
|
14
14
|
};
|
|
15
|
+
validationErrors: string[];
|
|
16
|
+
fieldValidationErrors: {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
};
|
|
15
19
|
}
|
|
16
20
|
export interface CloneEntryResponse_NewDataEntry {
|
|
17
21
|
key: string;
|
|
18
22
|
value: string;
|
|
19
23
|
}
|
|
24
|
+
export interface CloneEntryResponse_FieldValidationErrorsEntry {
|
|
25
|
+
key: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}
|
|
20
28
|
export declare const CloneEntryRequest: {
|
|
21
29
|
encode(message: CloneEntryRequest, writer?: _m0.Writer): _m0.Writer;
|
|
22
30
|
decode(input: _m0.Reader | Uint8Array, length?: number): CloneEntryRequest;
|
|
@@ -41,6 +49,14 @@ export declare const CloneEntryResponse_NewDataEntry: {
|
|
|
41
49
|
create(base?: DeepPartial<CloneEntryResponse_NewDataEntry>): CloneEntryResponse_NewDataEntry;
|
|
42
50
|
fromPartial(object: DeepPartial<CloneEntryResponse_NewDataEntry>): CloneEntryResponse_NewDataEntry;
|
|
43
51
|
};
|
|
52
|
+
export declare const CloneEntryResponse_FieldValidationErrorsEntry: {
|
|
53
|
+
encode(message: CloneEntryResponse_FieldValidationErrorsEntry, writer?: _m0.Writer): _m0.Writer;
|
|
54
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CloneEntryResponse_FieldValidationErrorsEntry;
|
|
55
|
+
fromJSON(object: any): CloneEntryResponse_FieldValidationErrorsEntry;
|
|
56
|
+
toJSON(message: CloneEntryResponse_FieldValidationErrorsEntry): unknown;
|
|
57
|
+
create(base?: DeepPartial<CloneEntryResponse_FieldValidationErrorsEntry>): CloneEntryResponse_FieldValidationErrorsEntry;
|
|
58
|
+
fromPartial(object: DeepPartial<CloneEntryResponse_FieldValidationErrorsEntry>): CloneEntryResponse_FieldValidationErrorsEntry;
|
|
59
|
+
};
|
|
44
60
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
45
61
|
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 {
|
|
46
62
|
$case: string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CloneEntryResponse_NewDataEntry = exports.CloneEntryResponse = exports.CloneEntryRequest = exports.protobufPackage = void 0;
|
|
6
|
+
exports.CloneEntryResponse_FieldValidationErrorsEntry = exports.CloneEntryResponse_NewDataEntry = exports.CloneEntryResponse = exports.CloneEntryRequest = exports.protobufPackage = void 0;
|
|
7
7
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
8
|
const shared_1 = require("./shared");
|
|
9
9
|
exports.protobufPackage = "freym.crud.delivery";
|
|
@@ -119,13 +119,20 @@ exports.CloneEntryRequest = {
|
|
|
119
119
|
},
|
|
120
120
|
};
|
|
121
121
|
function createBaseCloneEntryResponse() {
|
|
122
|
-
return { newData: {} };
|
|
122
|
+
return { newData: {}, validationErrors: [], fieldValidationErrors: {} };
|
|
123
123
|
}
|
|
124
124
|
exports.CloneEntryResponse = {
|
|
125
125
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
126
126
|
Object.entries(message.newData).forEach(([key, value]) => {
|
|
127
127
|
exports.CloneEntryResponse_NewDataEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
|
128
128
|
});
|
|
129
|
+
for (const v of message.validationErrors) {
|
|
130
|
+
writer.uint32(18).string(v);
|
|
131
|
+
}
|
|
132
|
+
Object.entries(message.fieldValidationErrors).forEach(([key, value]) => {
|
|
133
|
+
exports.CloneEntryResponse_FieldValidationErrorsEntry.encode({ key: key, value }, writer.uint32(26).fork())
|
|
134
|
+
.ldelim();
|
|
135
|
+
});
|
|
129
136
|
return writer;
|
|
130
137
|
},
|
|
131
138
|
decode(input, length) {
|
|
@@ -144,6 +151,21 @@ exports.CloneEntryResponse = {
|
|
|
144
151
|
message.newData[entry1.key] = entry1.value;
|
|
145
152
|
}
|
|
146
153
|
continue;
|
|
154
|
+
case 2:
|
|
155
|
+
if (tag !== 18) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
message.validationErrors.push(reader.string());
|
|
159
|
+
continue;
|
|
160
|
+
case 3:
|
|
161
|
+
if (tag !== 26) {
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
const entry3 = exports.CloneEntryResponse_FieldValidationErrorsEntry.decode(reader, reader.uint32());
|
|
165
|
+
if (entry3.value !== undefined) {
|
|
166
|
+
message.fieldValidationErrors[entry3.key] = entry3.value;
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
147
169
|
}
|
|
148
170
|
if ((tag & 7) === 4 || tag === 0) {
|
|
149
171
|
break;
|
|
@@ -160,9 +182,19 @@ exports.CloneEntryResponse = {
|
|
|
160
182
|
return acc;
|
|
161
183
|
}, {})
|
|
162
184
|
: {},
|
|
185
|
+
validationErrors: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.validationErrors)
|
|
186
|
+
? object.validationErrors.map((e) => globalThis.String(e))
|
|
187
|
+
: [],
|
|
188
|
+
fieldValidationErrors: isObject(object.fieldValidationErrors)
|
|
189
|
+
? Object.entries(object.fieldValidationErrors).reduce((acc, [key, value]) => {
|
|
190
|
+
acc[key] = String(value);
|
|
191
|
+
return acc;
|
|
192
|
+
}, {})
|
|
193
|
+
: {},
|
|
163
194
|
};
|
|
164
195
|
},
|
|
165
196
|
toJSON(message) {
|
|
197
|
+
var _a;
|
|
166
198
|
const obj = {};
|
|
167
199
|
if (message.newData) {
|
|
168
200
|
const entries = Object.entries(message.newData);
|
|
@@ -173,13 +205,25 @@ exports.CloneEntryResponse = {
|
|
|
173
205
|
});
|
|
174
206
|
}
|
|
175
207
|
}
|
|
208
|
+
if ((_a = message.validationErrors) === null || _a === void 0 ? void 0 : _a.length) {
|
|
209
|
+
obj.validationErrors = message.validationErrors;
|
|
210
|
+
}
|
|
211
|
+
if (message.fieldValidationErrors) {
|
|
212
|
+
const entries = Object.entries(message.fieldValidationErrors);
|
|
213
|
+
if (entries.length > 0) {
|
|
214
|
+
obj.fieldValidationErrors = {};
|
|
215
|
+
entries.forEach(([k, v]) => {
|
|
216
|
+
obj.fieldValidationErrors[k] = v;
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
176
220
|
return obj;
|
|
177
221
|
},
|
|
178
222
|
create(base) {
|
|
179
223
|
return exports.CloneEntryResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
180
224
|
},
|
|
181
225
|
fromPartial(object) {
|
|
182
|
-
var _a;
|
|
226
|
+
var _a, _b, _c;
|
|
183
227
|
const message = createBaseCloneEntryResponse();
|
|
184
228
|
message.newData = Object.entries((_a = object.newData) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
185
229
|
if (value !== undefined) {
|
|
@@ -187,6 +231,13 @@ exports.CloneEntryResponse = {
|
|
|
187
231
|
}
|
|
188
232
|
return acc;
|
|
189
233
|
}, {});
|
|
234
|
+
message.validationErrors = ((_b = object.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
235
|
+
message.fieldValidationErrors = Object.entries((_c = object.fieldValidationErrors) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
236
|
+
if (value !== undefined) {
|
|
237
|
+
acc[key] = globalThis.String(value);
|
|
238
|
+
}
|
|
239
|
+
return acc;
|
|
240
|
+
}, {});
|
|
190
241
|
return message;
|
|
191
242
|
},
|
|
192
243
|
};
|
|
@@ -257,6 +308,73 @@ exports.CloneEntryResponse_NewDataEntry = {
|
|
|
257
308
|
return message;
|
|
258
309
|
},
|
|
259
310
|
};
|
|
311
|
+
function createBaseCloneEntryResponse_FieldValidationErrorsEntry() {
|
|
312
|
+
return { key: "", value: "" };
|
|
313
|
+
}
|
|
314
|
+
exports.CloneEntryResponse_FieldValidationErrorsEntry = {
|
|
315
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
316
|
+
if (message.key !== "") {
|
|
317
|
+
writer.uint32(10).string(message.key);
|
|
318
|
+
}
|
|
319
|
+
if (message.value !== "") {
|
|
320
|
+
writer.uint32(18).string(message.value);
|
|
321
|
+
}
|
|
322
|
+
return writer;
|
|
323
|
+
},
|
|
324
|
+
decode(input, length) {
|
|
325
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
326
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
327
|
+
const message = createBaseCloneEntryResponse_FieldValidationErrorsEntry();
|
|
328
|
+
while (reader.pos < end) {
|
|
329
|
+
const tag = reader.uint32();
|
|
330
|
+
switch (tag >>> 3) {
|
|
331
|
+
case 1:
|
|
332
|
+
if (tag !== 10) {
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
message.key = reader.string();
|
|
336
|
+
continue;
|
|
337
|
+
case 2:
|
|
338
|
+
if (tag !== 18) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
message.value = reader.string();
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
reader.skipType(tag & 7);
|
|
348
|
+
}
|
|
349
|
+
return message;
|
|
350
|
+
},
|
|
351
|
+
fromJSON(object) {
|
|
352
|
+
return {
|
|
353
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
354
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
355
|
+
};
|
|
356
|
+
},
|
|
357
|
+
toJSON(message) {
|
|
358
|
+
const obj = {};
|
|
359
|
+
if (message.key !== "") {
|
|
360
|
+
obj.key = message.key;
|
|
361
|
+
}
|
|
362
|
+
if (message.value !== "") {
|
|
363
|
+
obj.value = message.value;
|
|
364
|
+
}
|
|
365
|
+
return obj;
|
|
366
|
+
},
|
|
367
|
+
create(base) {
|
|
368
|
+
return exports.CloneEntryResponse_FieldValidationErrorsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
369
|
+
},
|
|
370
|
+
fromPartial(object) {
|
|
371
|
+
var _a, _b;
|
|
372
|
+
const message = createBaseCloneEntryResponse_FieldValidationErrorsEntry();
|
|
373
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
374
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
375
|
+
return message;
|
|
376
|
+
},
|
|
377
|
+
};
|
|
260
378
|
function isObject(value) {
|
|
261
379
|
return typeof value === "object" && value !== null;
|
|
262
380
|
}
|
|
@@ -8,6 +8,7 @@ export interface GetEntryRequest {
|
|
|
8
8
|
filter: DataFilter | undefined;
|
|
9
9
|
returnEmptyDataIfNotFound: boolean;
|
|
10
10
|
wait: DataWait | undefined;
|
|
11
|
+
useStrongConsistency: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface GetEntryListRequest {
|
|
13
14
|
type: string;
|
|
@@ -16,6 +17,7 @@ export interface GetEntryListRequest {
|
|
|
16
17
|
page: string;
|
|
17
18
|
filter: DataFilter | undefined;
|
|
18
19
|
order: DataOrder[];
|
|
20
|
+
useStrongConsistency: boolean;
|
|
19
21
|
}
|
|
20
22
|
export interface DataWait {
|
|
21
23
|
conditionFilter: DataFilter | undefined;
|
|
@@ -9,7 +9,15 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const shared_1 = require("./shared");
|
|
10
10
|
exports.protobufPackage = "freym.crud.delivery";
|
|
11
11
|
function createBaseGetEntryRequest() {
|
|
12
|
-
return {
|
|
12
|
+
return {
|
|
13
|
+
type: "",
|
|
14
|
+
auth: undefined,
|
|
15
|
+
id: "",
|
|
16
|
+
filter: undefined,
|
|
17
|
+
returnEmptyDataIfNotFound: false,
|
|
18
|
+
wait: undefined,
|
|
19
|
+
useStrongConsistency: false,
|
|
20
|
+
};
|
|
13
21
|
}
|
|
14
22
|
exports.GetEntryRequest = {
|
|
15
23
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -31,6 +39,9 @@ exports.GetEntryRequest = {
|
|
|
31
39
|
if (message.wait !== undefined) {
|
|
32
40
|
exports.DataWait.encode(message.wait, writer.uint32(50).fork()).ldelim();
|
|
33
41
|
}
|
|
42
|
+
if (message.useStrongConsistency === true) {
|
|
43
|
+
writer.uint32(56).bool(message.useStrongConsistency);
|
|
44
|
+
}
|
|
34
45
|
return writer;
|
|
35
46
|
},
|
|
36
47
|
decode(input, length) {
|
|
@@ -76,6 +87,12 @@ exports.GetEntryRequest = {
|
|
|
76
87
|
}
|
|
77
88
|
message.wait = exports.DataWait.decode(reader, reader.uint32());
|
|
78
89
|
continue;
|
|
90
|
+
case 7:
|
|
91
|
+
if (tag !== 56) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
message.useStrongConsistency = reader.bool();
|
|
95
|
+
continue;
|
|
79
96
|
}
|
|
80
97
|
if ((tag & 7) === 4 || tag === 0) {
|
|
81
98
|
break;
|
|
@@ -94,6 +111,9 @@ exports.GetEntryRequest = {
|
|
|
94
111
|
? globalThis.Boolean(object.returnEmptyDataIfNotFound)
|
|
95
112
|
: false,
|
|
96
113
|
wait: isSet(object.wait) ? exports.DataWait.fromJSON(object.wait) : undefined,
|
|
114
|
+
useStrongConsistency: isSet(object.useStrongConsistency)
|
|
115
|
+
? globalThis.Boolean(object.useStrongConsistency)
|
|
116
|
+
: false,
|
|
97
117
|
};
|
|
98
118
|
},
|
|
99
119
|
toJSON(message) {
|
|
@@ -116,13 +136,16 @@ exports.GetEntryRequest = {
|
|
|
116
136
|
if (message.wait !== undefined) {
|
|
117
137
|
obj.wait = exports.DataWait.toJSON(message.wait);
|
|
118
138
|
}
|
|
139
|
+
if (message.useStrongConsistency === true) {
|
|
140
|
+
obj.useStrongConsistency = message.useStrongConsistency;
|
|
141
|
+
}
|
|
119
142
|
return obj;
|
|
120
143
|
},
|
|
121
144
|
create(base) {
|
|
122
145
|
return exports.GetEntryRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
123
146
|
},
|
|
124
147
|
fromPartial(object) {
|
|
125
|
-
var _a, _b, _c;
|
|
148
|
+
var _a, _b, _c, _d;
|
|
126
149
|
const message = createBaseGetEntryRequest();
|
|
127
150
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
|
|
128
151
|
message.auth = (object.auth !== undefined && object.auth !== null) ? shared_1.AuthData.fromPartial(object.auth) : undefined;
|
|
@@ -132,11 +155,20 @@ exports.GetEntryRequest = {
|
|
|
132
155
|
: undefined;
|
|
133
156
|
message.returnEmptyDataIfNotFound = (_c = object.returnEmptyDataIfNotFound) !== null && _c !== void 0 ? _c : false;
|
|
134
157
|
message.wait = (object.wait !== undefined && object.wait !== null) ? exports.DataWait.fromPartial(object.wait) : undefined;
|
|
158
|
+
message.useStrongConsistency = (_d = object.useStrongConsistency) !== null && _d !== void 0 ? _d : false;
|
|
135
159
|
return message;
|
|
136
160
|
},
|
|
137
161
|
};
|
|
138
162
|
function createBaseGetEntryListRequest() {
|
|
139
|
-
return {
|
|
163
|
+
return {
|
|
164
|
+
type: "",
|
|
165
|
+
auth: undefined,
|
|
166
|
+
limit: "0",
|
|
167
|
+
page: "0",
|
|
168
|
+
filter: undefined,
|
|
169
|
+
order: [],
|
|
170
|
+
useStrongConsistency: false,
|
|
171
|
+
};
|
|
140
172
|
}
|
|
141
173
|
exports.GetEntryListRequest = {
|
|
142
174
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -158,6 +190,9 @@ exports.GetEntryListRequest = {
|
|
|
158
190
|
for (const v of message.order) {
|
|
159
191
|
exports.DataOrder.encode(v, writer.uint32(66).fork()).ldelim();
|
|
160
192
|
}
|
|
193
|
+
if (message.useStrongConsistency === true) {
|
|
194
|
+
writer.uint32(72).bool(message.useStrongConsistency);
|
|
195
|
+
}
|
|
161
196
|
return writer;
|
|
162
197
|
},
|
|
163
198
|
decode(input, length) {
|
|
@@ -203,6 +238,12 @@ exports.GetEntryListRequest = {
|
|
|
203
238
|
}
|
|
204
239
|
message.order.push(exports.DataOrder.decode(reader, reader.uint32()));
|
|
205
240
|
continue;
|
|
241
|
+
case 9:
|
|
242
|
+
if (tag !== 72) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
message.useStrongConsistency = reader.bool();
|
|
246
|
+
continue;
|
|
206
247
|
}
|
|
207
248
|
if ((tag & 7) === 4 || tag === 0) {
|
|
208
249
|
break;
|
|
@@ -219,6 +260,9 @@ exports.GetEntryListRequest = {
|
|
|
219
260
|
page: isSet(object.page) ? globalThis.String(object.page) : "0",
|
|
220
261
|
filter: isSet(object.filter) ? shared_1.DataFilter.fromJSON(object.filter) : undefined,
|
|
221
262
|
order: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.order) ? object.order.map((e) => exports.DataOrder.fromJSON(e)) : [],
|
|
263
|
+
useStrongConsistency: isSet(object.useStrongConsistency)
|
|
264
|
+
? globalThis.Boolean(object.useStrongConsistency)
|
|
265
|
+
: false,
|
|
222
266
|
};
|
|
223
267
|
},
|
|
224
268
|
toJSON(message) {
|
|
@@ -242,13 +286,16 @@ exports.GetEntryListRequest = {
|
|
|
242
286
|
if ((_a = message.order) === null || _a === void 0 ? void 0 : _a.length) {
|
|
243
287
|
obj.order = message.order.map((e) => exports.DataOrder.toJSON(e));
|
|
244
288
|
}
|
|
289
|
+
if (message.useStrongConsistency === true) {
|
|
290
|
+
obj.useStrongConsistency = message.useStrongConsistency;
|
|
291
|
+
}
|
|
245
292
|
return obj;
|
|
246
293
|
},
|
|
247
294
|
create(base) {
|
|
248
295
|
return exports.GetEntryListRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
249
296
|
},
|
|
250
297
|
fromPartial(object) {
|
|
251
|
-
var _a, _b, _c, _d;
|
|
298
|
+
var _a, _b, _c, _d, _e;
|
|
252
299
|
const message = createBaseGetEntryListRequest();
|
|
253
300
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
|
|
254
301
|
message.auth = (object.auth !== undefined && object.auth !== null) ? shared_1.AuthData.fromPartial(object.auth) : undefined;
|
|
@@ -258,6 +305,7 @@ exports.GetEntryListRequest = {
|
|
|
258
305
|
? shared_1.DataFilter.fromPartial(object.filter)
|
|
259
306
|
: undefined;
|
|
260
307
|
message.order = ((_d = object.order) === null || _d === void 0 ? void 0 : _d.map((e) => exports.DataOrder.fromPartial(e))) || [];
|
|
308
|
+
message.useStrongConsistency = (_e = object.useStrongConsistency) !== null && _e !== void 0 ? _e : false;
|
|
261
309
|
return message;
|
|
262
310
|
},
|
|
263
311
|
};
|