@devrev/typescript-sdk 1.1.25 → 1.1.27
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/dist/auto-generated/beta/beta-devrev-sdk.d.ts +266 -4
- package/dist/auto-generated/beta/beta-devrev-sdk.js +59 -3
- package/dist/auto-generated/public-devrev-sdk.d.ts +87 -2
- package/dist/auto-generated/public-devrev-sdk.js +2 -0
- package/dist/snap-ins/index.d.ts +4 -0
- package/dist/snap-ins/index.js +20 -0
- package/dist/snap-ins/interfaces.d.ts +15 -0
- package/dist/snap-ins/interfaces.js +2 -0
- package/dist/snap-ins/schema.pb.d.ts +461 -0
- package/dist/snap-ins/schema.pb.js +678 -0
- package/dist/snap-ins/stock_objects.d.ts +16 -0
- package/dist/snap-ins/stock_objects.js +28 -0
- package/dist/snap-ins/struct.pb.d.ts +201 -0
- package/dist/snap-ins/struct.pb.js +491 -0
- package/dist/snap-ins/types.d.ts +166 -0
- package/dist/snap-ins/types.js +15 -0
- package/dist/snap-ins/types.test.d.ts +1 -0
- package/dist/snap-ins/types.test.js +81 -0
- package/package.json +2 -1
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.176.0
|
|
5
|
+
// protoc v4.25.2
|
|
6
|
+
// source: schema.proto
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
|
+
if (mod && mod.__esModule) return mod;
|
|
25
|
+
var result = {};
|
|
26
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
27
|
+
__setModuleDefault(result, mod);
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.OperationOutput = exports.PortOutput = exports.OutputValue = exports.ExecuteOperationResult = exports.ExecuteOperationInput = exports.OperationMetadata = exports.Error = exports.executeOperationResult_SerializationFormatToJSON = exports.executeOperationResult_SerializationFormatFromJSON = exports.ExecuteOperationResult_SerializationFormat = exports.operationMetadata_TypeToJSON = exports.operationMetadata_TypeFromJSON = exports.OperationMetadata_Type = exports.error_TypeToJSON = exports.error_TypeFromJSON = exports.Error_Type = exports.protobufPackage = void 0;
|
|
32
|
+
/* eslint-disable */
|
|
33
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
34
|
+
const struct_pb_1 = require("./struct.pb");
|
|
35
|
+
exports.protobufPackage = 'devrev.operation';
|
|
36
|
+
var Error_Type;
|
|
37
|
+
(function (Error_Type) {
|
|
38
|
+
Error_Type[Error_Type["Unknown"] = 0] = "Unknown";
|
|
39
|
+
/** InvalidRequest - Invalid request. */
|
|
40
|
+
Error_Type[Error_Type["InvalidRequest"] = 1] = "InvalidRequest";
|
|
41
|
+
/** RetryExecution - Client should retry operation execution. */
|
|
42
|
+
Error_Type[Error_Type["RetryExecution"] = 2] = "RetryExecution";
|
|
43
|
+
Error_Type[Error_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
44
|
+
})(Error_Type = exports.Error_Type || (exports.Error_Type = {}));
|
|
45
|
+
function error_TypeFromJSON(object) {
|
|
46
|
+
switch (object) {
|
|
47
|
+
case 0:
|
|
48
|
+
case 'Unknown':
|
|
49
|
+
return Error_Type.Unknown;
|
|
50
|
+
case 1:
|
|
51
|
+
case 'InvalidRequest':
|
|
52
|
+
return Error_Type.InvalidRequest;
|
|
53
|
+
case 2:
|
|
54
|
+
case 'RetryExecution':
|
|
55
|
+
return Error_Type.RetryExecution;
|
|
56
|
+
case -1:
|
|
57
|
+
case 'UNRECOGNIZED':
|
|
58
|
+
default:
|
|
59
|
+
return Error_Type.UNRECOGNIZED;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.error_TypeFromJSON = error_TypeFromJSON;
|
|
63
|
+
function error_TypeToJSON(object) {
|
|
64
|
+
switch (object) {
|
|
65
|
+
case Error_Type.Unknown:
|
|
66
|
+
return 'Unknown';
|
|
67
|
+
case Error_Type.InvalidRequest:
|
|
68
|
+
return 'InvalidRequest';
|
|
69
|
+
case Error_Type.RetryExecution:
|
|
70
|
+
return 'RetryExecution';
|
|
71
|
+
case Error_Type.UNRECOGNIZED:
|
|
72
|
+
default:
|
|
73
|
+
return 'UNRECOGNIZED';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.error_TypeToJSON = error_TypeToJSON;
|
|
77
|
+
var OperationMetadata_Type;
|
|
78
|
+
(function (OperationMetadata_Type) {
|
|
79
|
+
OperationMetadata_Type[OperationMetadata_Type["Unknown"] = 0] = "Unknown";
|
|
80
|
+
OperationMetadata_Type[OperationMetadata_Type["Action"] = 1] = "Action";
|
|
81
|
+
OperationMetadata_Type[OperationMetadata_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
82
|
+
})(OperationMetadata_Type = exports.OperationMetadata_Type || (exports.OperationMetadata_Type = {}));
|
|
83
|
+
function operationMetadata_TypeFromJSON(object) {
|
|
84
|
+
switch (object) {
|
|
85
|
+
case 0:
|
|
86
|
+
case 'Unknown':
|
|
87
|
+
return OperationMetadata_Type.Unknown;
|
|
88
|
+
case 1:
|
|
89
|
+
case 'Action':
|
|
90
|
+
return OperationMetadata_Type.Action;
|
|
91
|
+
case -1:
|
|
92
|
+
case 'UNRECOGNIZED':
|
|
93
|
+
default:
|
|
94
|
+
return OperationMetadata_Type.UNRECOGNIZED;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.operationMetadata_TypeFromJSON = operationMetadata_TypeFromJSON;
|
|
98
|
+
function operationMetadata_TypeToJSON(object) {
|
|
99
|
+
switch (object) {
|
|
100
|
+
case OperationMetadata_Type.Unknown:
|
|
101
|
+
return 'Unknown';
|
|
102
|
+
case OperationMetadata_Type.Action:
|
|
103
|
+
return 'Action';
|
|
104
|
+
case OperationMetadata_Type.UNRECOGNIZED:
|
|
105
|
+
default:
|
|
106
|
+
return 'UNRECOGNIZED';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.operationMetadata_TypeToJSON = operationMetadata_TypeToJSON;
|
|
110
|
+
var ExecuteOperationResult_SerializationFormat;
|
|
111
|
+
(function (ExecuteOperationResult_SerializationFormat) {
|
|
112
|
+
ExecuteOperationResult_SerializationFormat[ExecuteOperationResult_SerializationFormat["Unknown"] = 0] = "Unknown";
|
|
113
|
+
ExecuteOperationResult_SerializationFormat[ExecuteOperationResult_SerializationFormat["Proto"] = 1] = "Proto";
|
|
114
|
+
ExecuteOperationResult_SerializationFormat[ExecuteOperationResult_SerializationFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
115
|
+
})(ExecuteOperationResult_SerializationFormat = exports.ExecuteOperationResult_SerializationFormat || (exports.ExecuteOperationResult_SerializationFormat = {}));
|
|
116
|
+
function executeOperationResult_SerializationFormatFromJSON(object) {
|
|
117
|
+
switch (object) {
|
|
118
|
+
case 0:
|
|
119
|
+
case 'Unknown':
|
|
120
|
+
return ExecuteOperationResult_SerializationFormat.Unknown;
|
|
121
|
+
case 1:
|
|
122
|
+
case 'Proto':
|
|
123
|
+
return ExecuteOperationResult_SerializationFormat.Proto;
|
|
124
|
+
case -1:
|
|
125
|
+
case 'UNRECOGNIZED':
|
|
126
|
+
default:
|
|
127
|
+
return ExecuteOperationResult_SerializationFormat.UNRECOGNIZED;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.executeOperationResult_SerializationFormatFromJSON = executeOperationResult_SerializationFormatFromJSON;
|
|
131
|
+
function executeOperationResult_SerializationFormatToJSON(object) {
|
|
132
|
+
switch (object) {
|
|
133
|
+
case ExecuteOperationResult_SerializationFormat.Unknown:
|
|
134
|
+
return 'Unknown';
|
|
135
|
+
case ExecuteOperationResult_SerializationFormat.Proto:
|
|
136
|
+
return 'Proto';
|
|
137
|
+
case ExecuteOperationResult_SerializationFormat.UNRECOGNIZED:
|
|
138
|
+
default:
|
|
139
|
+
return 'UNRECOGNIZED';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
exports.executeOperationResult_SerializationFormatToJSON = executeOperationResult_SerializationFormatToJSON;
|
|
143
|
+
function createBaseError() {
|
|
144
|
+
return { message: '', type: 0 };
|
|
145
|
+
}
|
|
146
|
+
exports.Error = {
|
|
147
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
148
|
+
if (message.message !== '') {
|
|
149
|
+
writer.uint32(10).string(message.message);
|
|
150
|
+
}
|
|
151
|
+
if (message.type !== 0) {
|
|
152
|
+
writer.uint32(16).int32(message.type);
|
|
153
|
+
}
|
|
154
|
+
return writer;
|
|
155
|
+
},
|
|
156
|
+
decode(input, length) {
|
|
157
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
158
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
159
|
+
const message = createBaseError();
|
|
160
|
+
while (reader.pos < end) {
|
|
161
|
+
const tag = reader.uint32();
|
|
162
|
+
switch (tag >>> 3) {
|
|
163
|
+
case 1:
|
|
164
|
+
if (tag !== 10) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
message.message = reader.string();
|
|
168
|
+
continue;
|
|
169
|
+
case 2:
|
|
170
|
+
if (tag !== 16) {
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
message.type = reader.int32();
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
reader.skipType(tag & 7);
|
|
180
|
+
}
|
|
181
|
+
return message;
|
|
182
|
+
},
|
|
183
|
+
fromJSON(object) {
|
|
184
|
+
return {
|
|
185
|
+
message: isSet(object.message) ? globalThis.String(object.message) : '',
|
|
186
|
+
type: isSet(object.type) ? error_TypeFromJSON(object.type) : 0,
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
toJSON(message) {
|
|
190
|
+
const obj = {};
|
|
191
|
+
if (message.message !== '') {
|
|
192
|
+
obj.message = message.message;
|
|
193
|
+
}
|
|
194
|
+
if (message.type !== 0) {
|
|
195
|
+
obj.type = error_TypeToJSON(message.type);
|
|
196
|
+
}
|
|
197
|
+
return obj;
|
|
198
|
+
},
|
|
199
|
+
create(base) {
|
|
200
|
+
return exports.Error.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
201
|
+
},
|
|
202
|
+
fromPartial(object) {
|
|
203
|
+
var _a, _b;
|
|
204
|
+
const message = createBaseError();
|
|
205
|
+
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : '';
|
|
206
|
+
message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
|
|
207
|
+
return message;
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
function createBaseOperationMetadata() {
|
|
211
|
+
return { namespace: '', slug: '', type: 0 };
|
|
212
|
+
}
|
|
213
|
+
exports.OperationMetadata = {
|
|
214
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
215
|
+
if (message.namespace !== '') {
|
|
216
|
+
writer.uint32(10).string(message.namespace);
|
|
217
|
+
}
|
|
218
|
+
if (message.slug !== '') {
|
|
219
|
+
writer.uint32(18).string(message.slug);
|
|
220
|
+
}
|
|
221
|
+
if (message.type !== 0) {
|
|
222
|
+
writer.uint32(24).int32(message.type);
|
|
223
|
+
}
|
|
224
|
+
return writer;
|
|
225
|
+
},
|
|
226
|
+
decode(input, length) {
|
|
227
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
228
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
229
|
+
const message = createBaseOperationMetadata();
|
|
230
|
+
while (reader.pos < end) {
|
|
231
|
+
const tag = reader.uint32();
|
|
232
|
+
switch (tag >>> 3) {
|
|
233
|
+
case 1:
|
|
234
|
+
if (tag !== 10) {
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
message.namespace = reader.string();
|
|
238
|
+
continue;
|
|
239
|
+
case 2:
|
|
240
|
+
if (tag !== 18) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
message.slug = reader.string();
|
|
244
|
+
continue;
|
|
245
|
+
case 3:
|
|
246
|
+
if (tag !== 24) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
message.type = reader.int32();
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
reader.skipType(tag & 7);
|
|
256
|
+
}
|
|
257
|
+
return message;
|
|
258
|
+
},
|
|
259
|
+
fromJSON(object) {
|
|
260
|
+
return {
|
|
261
|
+
namespace: isSet(object.namespace)
|
|
262
|
+
? globalThis.String(object.namespace)
|
|
263
|
+
: '',
|
|
264
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : '',
|
|
265
|
+
type: isSet(object.type)
|
|
266
|
+
? operationMetadata_TypeFromJSON(object.type)
|
|
267
|
+
: 0,
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
toJSON(message) {
|
|
271
|
+
const obj = {};
|
|
272
|
+
if (message.namespace !== '') {
|
|
273
|
+
obj.namespace = message.namespace;
|
|
274
|
+
}
|
|
275
|
+
if (message.slug !== '') {
|
|
276
|
+
obj.slug = message.slug;
|
|
277
|
+
}
|
|
278
|
+
if (message.type !== 0) {
|
|
279
|
+
obj.type = operationMetadata_TypeToJSON(message.type);
|
|
280
|
+
}
|
|
281
|
+
return obj;
|
|
282
|
+
},
|
|
283
|
+
create(base) {
|
|
284
|
+
return exports.OperationMetadata.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
285
|
+
},
|
|
286
|
+
fromPartial(object) {
|
|
287
|
+
var _a, _b, _c;
|
|
288
|
+
const message = createBaseOperationMetadata();
|
|
289
|
+
message.namespace = (_a = object.namespace) !== null && _a !== void 0 ? _a : '';
|
|
290
|
+
message.slug = (_b = object.slug) !== null && _b !== void 0 ? _b : '';
|
|
291
|
+
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
|
292
|
+
return message;
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
function createBaseExecuteOperationInput() {
|
|
296
|
+
return { metadata: undefined, input_port_name: '', data: undefined };
|
|
297
|
+
}
|
|
298
|
+
exports.ExecuteOperationInput = {
|
|
299
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
300
|
+
if (message.metadata !== undefined) {
|
|
301
|
+
exports.OperationMetadata.encode(message.metadata, writer.uint32(10).fork()).ldelim();
|
|
302
|
+
}
|
|
303
|
+
if (message.input_port_name !== '') {
|
|
304
|
+
writer.uint32(18).string(message.input_port_name);
|
|
305
|
+
}
|
|
306
|
+
if (message.data !== undefined) {
|
|
307
|
+
struct_pb_1.Value.encode(struct_pb_1.Value.wrap(message.data), writer.uint32(26).fork()).ldelim();
|
|
308
|
+
}
|
|
309
|
+
return writer;
|
|
310
|
+
},
|
|
311
|
+
decode(input, length) {
|
|
312
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
313
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
314
|
+
const message = createBaseExecuteOperationInput();
|
|
315
|
+
while (reader.pos < end) {
|
|
316
|
+
const tag = reader.uint32();
|
|
317
|
+
switch (tag >>> 3) {
|
|
318
|
+
case 1:
|
|
319
|
+
if (tag !== 10) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
message.metadata = exports.OperationMetadata.decode(reader, reader.uint32());
|
|
323
|
+
continue;
|
|
324
|
+
case 2:
|
|
325
|
+
if (tag !== 18) {
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
message.input_port_name = reader.string();
|
|
329
|
+
continue;
|
|
330
|
+
case 3:
|
|
331
|
+
if (tag !== 26) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
message.data = struct_pb_1.Value.unwrap(struct_pb_1.Value.decode(reader, reader.uint32()));
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
reader.skipType(tag & 7);
|
|
341
|
+
}
|
|
342
|
+
return message;
|
|
343
|
+
},
|
|
344
|
+
fromJSON(object) {
|
|
345
|
+
return {
|
|
346
|
+
metadata: isSet(object.metadata)
|
|
347
|
+
? exports.OperationMetadata.fromJSON(object.metadata)
|
|
348
|
+
: undefined,
|
|
349
|
+
input_port_name: isSet(object.input_port_name)
|
|
350
|
+
? globalThis.String(object.input_port_name)
|
|
351
|
+
: '',
|
|
352
|
+
data: isSet(object === null || object === void 0 ? void 0 : object.data) ? object.data : undefined,
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
toJSON(message) {
|
|
356
|
+
const obj = {};
|
|
357
|
+
if (message.metadata !== undefined) {
|
|
358
|
+
obj.metadata = exports.OperationMetadata.toJSON(message.metadata);
|
|
359
|
+
}
|
|
360
|
+
if (message.input_port_name !== '') {
|
|
361
|
+
obj.input_port_name = message.input_port_name;
|
|
362
|
+
}
|
|
363
|
+
if (message.data !== undefined) {
|
|
364
|
+
obj.data = message.data;
|
|
365
|
+
}
|
|
366
|
+
return obj;
|
|
367
|
+
},
|
|
368
|
+
create(base) {
|
|
369
|
+
return exports.ExecuteOperationInput.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
370
|
+
},
|
|
371
|
+
fromPartial(object) {
|
|
372
|
+
var _a, _b;
|
|
373
|
+
const message = createBaseExecuteOperationInput();
|
|
374
|
+
message.metadata =
|
|
375
|
+
object.metadata !== undefined && object.metadata !== null
|
|
376
|
+
? exports.OperationMetadata.fromPartial(object.metadata)
|
|
377
|
+
: undefined;
|
|
378
|
+
message.input_port_name = (_a = object.input_port_name) !== null && _a !== void 0 ? _a : '';
|
|
379
|
+
message.data = (_b = object.data) !== null && _b !== void 0 ? _b : undefined;
|
|
380
|
+
return message;
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
function createBaseExecuteOperationResult() {
|
|
384
|
+
return { serialization_format: 0, data: '' };
|
|
385
|
+
}
|
|
386
|
+
exports.ExecuteOperationResult = {
|
|
387
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
388
|
+
if (message.serialization_format !== 0) {
|
|
389
|
+
writer.uint32(8).int32(message.serialization_format);
|
|
390
|
+
}
|
|
391
|
+
if (message.data !== '') {
|
|
392
|
+
writer.uint32(18).string(message.data);
|
|
393
|
+
}
|
|
394
|
+
return writer;
|
|
395
|
+
},
|
|
396
|
+
decode(input, length) {
|
|
397
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
398
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
399
|
+
const message = createBaseExecuteOperationResult();
|
|
400
|
+
while (reader.pos < end) {
|
|
401
|
+
const tag = reader.uint32();
|
|
402
|
+
switch (tag >>> 3) {
|
|
403
|
+
case 1:
|
|
404
|
+
if (tag !== 8) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
message.serialization_format = reader.int32();
|
|
408
|
+
continue;
|
|
409
|
+
case 2:
|
|
410
|
+
if (tag !== 18) {
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
message.data = reader.string();
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
reader.skipType(tag & 7);
|
|
420
|
+
}
|
|
421
|
+
return message;
|
|
422
|
+
},
|
|
423
|
+
fromJSON(object) {
|
|
424
|
+
return {
|
|
425
|
+
serialization_format: isSet(object.serialization_format)
|
|
426
|
+
? executeOperationResult_SerializationFormatFromJSON(object.serialization_format)
|
|
427
|
+
: 0,
|
|
428
|
+
data: isSet(object.data) ? globalThis.String(object.data) : '',
|
|
429
|
+
};
|
|
430
|
+
},
|
|
431
|
+
toJSON(message) {
|
|
432
|
+
const obj = {};
|
|
433
|
+
if (message.serialization_format !== 0) {
|
|
434
|
+
obj.serialization_format =
|
|
435
|
+
executeOperationResult_SerializationFormatToJSON(message.serialization_format);
|
|
436
|
+
}
|
|
437
|
+
if (message.data !== '') {
|
|
438
|
+
obj.data = message.data;
|
|
439
|
+
}
|
|
440
|
+
return obj;
|
|
441
|
+
},
|
|
442
|
+
create(base) {
|
|
443
|
+
return exports.ExecuteOperationResult.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
444
|
+
},
|
|
445
|
+
fromPartial(object) {
|
|
446
|
+
var _a, _b;
|
|
447
|
+
const message = createBaseExecuteOperationResult();
|
|
448
|
+
message.serialization_format = (_a = object.serialization_format) !== null && _a !== void 0 ? _a : 0;
|
|
449
|
+
message.data = (_b = object.data) !== null && _b !== void 0 ? _b : '';
|
|
450
|
+
return message;
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
function createBaseOutputValue() {
|
|
454
|
+
return { values: [] };
|
|
455
|
+
}
|
|
456
|
+
exports.OutputValue = {
|
|
457
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
458
|
+
for (const v of message.values) {
|
|
459
|
+
struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(v), writer.uint32(10).fork()).ldelim();
|
|
460
|
+
}
|
|
461
|
+
return writer;
|
|
462
|
+
},
|
|
463
|
+
decode(input, length) {
|
|
464
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
465
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
466
|
+
const message = createBaseOutputValue();
|
|
467
|
+
while (reader.pos < end) {
|
|
468
|
+
const tag = reader.uint32();
|
|
469
|
+
switch (tag >>> 3) {
|
|
470
|
+
case 1:
|
|
471
|
+
if (tag !== 10) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
message.values.push(struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32())));
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
reader.skipType(tag & 7);
|
|
481
|
+
}
|
|
482
|
+
return message;
|
|
483
|
+
},
|
|
484
|
+
fromJSON(object) {
|
|
485
|
+
return {
|
|
486
|
+
values: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.values)
|
|
487
|
+
? [...object.values]
|
|
488
|
+
: [],
|
|
489
|
+
};
|
|
490
|
+
},
|
|
491
|
+
toJSON(message) {
|
|
492
|
+
var _a;
|
|
493
|
+
const obj = {};
|
|
494
|
+
if ((_a = message.values) === null || _a === void 0 ? void 0 : _a.length) {
|
|
495
|
+
obj.values = message.values;
|
|
496
|
+
}
|
|
497
|
+
return obj;
|
|
498
|
+
},
|
|
499
|
+
create(base) {
|
|
500
|
+
return exports.OutputValue.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
501
|
+
},
|
|
502
|
+
fromPartial(object) {
|
|
503
|
+
var _a;
|
|
504
|
+
const message = createBaseOutputValue();
|
|
505
|
+
message.values = ((_a = object.values) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
function createBasePortOutput() {
|
|
510
|
+
return { port_name: '', output: undefined };
|
|
511
|
+
}
|
|
512
|
+
exports.PortOutput = {
|
|
513
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
514
|
+
if (message.port_name !== '') {
|
|
515
|
+
writer.uint32(10).string(message.port_name);
|
|
516
|
+
}
|
|
517
|
+
if (message.output !== undefined) {
|
|
518
|
+
exports.OutputValue.encode(message.output, writer.uint32(18).fork()).ldelim();
|
|
519
|
+
}
|
|
520
|
+
return writer;
|
|
521
|
+
},
|
|
522
|
+
decode(input, length) {
|
|
523
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
524
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
525
|
+
const message = createBasePortOutput();
|
|
526
|
+
while (reader.pos < end) {
|
|
527
|
+
const tag = reader.uint32();
|
|
528
|
+
switch (tag >>> 3) {
|
|
529
|
+
case 1:
|
|
530
|
+
if (tag !== 10) {
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
message.port_name = reader.string();
|
|
534
|
+
continue;
|
|
535
|
+
case 2:
|
|
536
|
+
if (tag !== 18) {
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
message.output = exports.OutputValue.decode(reader, reader.uint32());
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
543
|
+
break;
|
|
544
|
+
}
|
|
545
|
+
reader.skipType(tag & 7);
|
|
546
|
+
}
|
|
547
|
+
return message;
|
|
548
|
+
},
|
|
549
|
+
fromJSON(object) {
|
|
550
|
+
return {
|
|
551
|
+
port_name: isSet(object.port_name)
|
|
552
|
+
? globalThis.String(object.port_name)
|
|
553
|
+
: '',
|
|
554
|
+
output: isSet(object.output)
|
|
555
|
+
? exports.OutputValue.fromJSON(object.output)
|
|
556
|
+
: undefined,
|
|
557
|
+
};
|
|
558
|
+
},
|
|
559
|
+
toJSON(message) {
|
|
560
|
+
const obj = {};
|
|
561
|
+
if (message.port_name !== '') {
|
|
562
|
+
obj.port_name = message.port_name;
|
|
563
|
+
}
|
|
564
|
+
if (message.output !== undefined) {
|
|
565
|
+
obj.output = exports.OutputValue.toJSON(message.output);
|
|
566
|
+
}
|
|
567
|
+
return obj;
|
|
568
|
+
},
|
|
569
|
+
create(base) {
|
|
570
|
+
return exports.PortOutput.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
571
|
+
},
|
|
572
|
+
fromPartial(object) {
|
|
573
|
+
var _a;
|
|
574
|
+
const message = createBasePortOutput();
|
|
575
|
+
message.port_name = (_a = object.port_name) !== null && _a !== void 0 ? _a : '';
|
|
576
|
+
message.output =
|
|
577
|
+
object.output !== undefined && object.output !== null
|
|
578
|
+
? exports.OutputValue.fromPartial(object.output)
|
|
579
|
+
: undefined;
|
|
580
|
+
return message;
|
|
581
|
+
},
|
|
582
|
+
};
|
|
583
|
+
function createBaseOperationOutput() {
|
|
584
|
+
return { error: undefined, output: undefined, port_outputs: [] };
|
|
585
|
+
}
|
|
586
|
+
exports.OperationOutput = {
|
|
587
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
588
|
+
if (message.error !== undefined) {
|
|
589
|
+
exports.Error.encode(message.error, writer.uint32(10).fork()).ldelim();
|
|
590
|
+
}
|
|
591
|
+
if (message.output !== undefined) {
|
|
592
|
+
exports.OutputValue.encode(message.output, writer.uint32(18).fork()).ldelim();
|
|
593
|
+
}
|
|
594
|
+
for (const v of message.port_outputs) {
|
|
595
|
+
exports.PortOutput.encode(v, writer.uint32(26).fork()).ldelim();
|
|
596
|
+
}
|
|
597
|
+
return writer;
|
|
598
|
+
},
|
|
599
|
+
decode(input, length) {
|
|
600
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
601
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
602
|
+
const message = createBaseOperationOutput();
|
|
603
|
+
while (reader.pos < end) {
|
|
604
|
+
const tag = reader.uint32();
|
|
605
|
+
switch (tag >>> 3) {
|
|
606
|
+
case 1:
|
|
607
|
+
if (tag !== 10) {
|
|
608
|
+
break;
|
|
609
|
+
}
|
|
610
|
+
message.error = exports.Error.decode(reader, reader.uint32());
|
|
611
|
+
continue;
|
|
612
|
+
case 2:
|
|
613
|
+
if (tag !== 18) {
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
message.output = exports.OutputValue.decode(reader, reader.uint32());
|
|
617
|
+
continue;
|
|
618
|
+
case 3:
|
|
619
|
+
if (tag !== 26) {
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
message.port_outputs.push(exports.PortOutput.decode(reader, reader.uint32()));
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
reader.skipType(tag & 7);
|
|
629
|
+
}
|
|
630
|
+
return message;
|
|
631
|
+
},
|
|
632
|
+
fromJSON(object) {
|
|
633
|
+
return {
|
|
634
|
+
error: isSet(object.error) ? exports.Error.fromJSON(object.error) : undefined,
|
|
635
|
+
output: isSet(object.output)
|
|
636
|
+
? exports.OutputValue.fromJSON(object.output)
|
|
637
|
+
: undefined,
|
|
638
|
+
port_outputs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.port_outputs)
|
|
639
|
+
? object.port_outputs.map((e) => exports.PortOutput.fromJSON(e))
|
|
640
|
+
: [],
|
|
641
|
+
};
|
|
642
|
+
},
|
|
643
|
+
toJSON(message) {
|
|
644
|
+
var _a;
|
|
645
|
+
const obj = {};
|
|
646
|
+
if (message.error !== undefined) {
|
|
647
|
+
obj.error = exports.Error.toJSON(message.error);
|
|
648
|
+
}
|
|
649
|
+
if (message.output !== undefined) {
|
|
650
|
+
obj.output = exports.OutputValue.toJSON(message.output);
|
|
651
|
+
}
|
|
652
|
+
if ((_a = message.port_outputs) === null || _a === void 0 ? void 0 : _a.length) {
|
|
653
|
+
obj.port_outputs = message.port_outputs.map((e) => exports.PortOutput.toJSON(e));
|
|
654
|
+
}
|
|
655
|
+
return obj;
|
|
656
|
+
},
|
|
657
|
+
create(base) {
|
|
658
|
+
return exports.OperationOutput.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
659
|
+
},
|
|
660
|
+
fromPartial(object) {
|
|
661
|
+
var _a;
|
|
662
|
+
const message = createBaseOperationOutput();
|
|
663
|
+
message.error =
|
|
664
|
+
object.error !== undefined && object.error !== null
|
|
665
|
+
? exports.Error.fromPartial(object.error)
|
|
666
|
+
: undefined;
|
|
667
|
+
message.output =
|
|
668
|
+
object.output !== undefined && object.output !== null
|
|
669
|
+
? exports.OutputValue.fromPartial(object.output)
|
|
670
|
+
: undefined;
|
|
671
|
+
message.port_outputs =
|
|
672
|
+
((_a = object.port_outputs) === null || _a === void 0 ? void 0 : _a.map((e) => exports.PortOutput.fromPartial(e))) || [];
|
|
673
|
+
return message;
|
|
674
|
+
},
|
|
675
|
+
};
|
|
676
|
+
function isSet(value) {
|
|
677
|
+
return value !== null && value !== undefined;
|
|
678
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OperationBaseIfc } from './interfaces';
|
|
2
|
+
import { FunctionInput, OperationContext } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for all operations.
|
|
5
|
+
* GetContext() can be overridden by the developer
|
|
6
|
+
* to add custom metadata.
|
|
7
|
+
*/
|
|
8
|
+
export declare class OperationBase implements OperationBaseIfc {
|
|
9
|
+
private e;
|
|
10
|
+
private p;
|
|
11
|
+
constructor(event: FunctionInput);
|
|
12
|
+
/**
|
|
13
|
+
* Default implementation of GetContext to return the context object from the event.
|
|
14
|
+
*/
|
|
15
|
+
GetContext(): OperationContext;
|
|
16
|
+
}
|