@avaprotocol/sdk-js 2.4.4 → 2.5.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.
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +502 -88
- package/dist/index.mjs +508 -90
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +22 -3
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +14 -18
- package/dist/models/step.d.ts.map +1 -1
- package/dist/models/step.js +239 -21
- package/dist/models/trigger/manual.d.ts +6 -10
- package/dist/models/trigger/manual.d.ts.map +1 -1
- package/dist/models/trigger/manual.js +108 -25
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +0 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2947,7 +2947,11 @@ var require_avs_pb = __commonJS({
|
|
|
2947
2947
|
return proto.aggregator.ManualTrigger.Config.toObject(opt_includeInstance, this);
|
|
2948
2948
|
};
|
|
2949
2949
|
proto.aggregator.ManualTrigger.Config.toObject = function(includeInstance, msg) {
|
|
2950
|
-
var f, obj = {
|
|
2950
|
+
var f, obj = {
|
|
2951
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb2.Value.toObject(includeInstance, f),
|
|
2952
|
+
headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [],
|
|
2953
|
+
pathparamsMap: (f = msg.getPathparamsMap()) ? f.toObject(includeInstance, void 0) : []
|
|
2954
|
+
};
|
|
2951
2955
|
if (includeInstance) {
|
|
2952
2956
|
obj.$jspbMessageInstance = msg;
|
|
2953
2957
|
}
|
|
@@ -2966,6 +2970,23 @@ var require_avs_pb = __commonJS({
|
|
|
2966
2970
|
}
|
|
2967
2971
|
var field = reader.getFieldNumber();
|
|
2968
2972
|
switch (field) {
|
|
2973
|
+
case 1:
|
|
2974
|
+
var value = new google_protobuf_struct_pb2.Value();
|
|
2975
|
+
reader.readMessage(value, google_protobuf_struct_pb2.Value.deserializeBinaryFromReader);
|
|
2976
|
+
msg.setData(value);
|
|
2977
|
+
break;
|
|
2978
|
+
case 2:
|
|
2979
|
+
var value = msg.getHeadersMap();
|
|
2980
|
+
reader.readMessage(value, function(message, reader2) {
|
|
2981
|
+
jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
|
2982
|
+
});
|
|
2983
|
+
break;
|
|
2984
|
+
case 3:
|
|
2985
|
+
var value = msg.getPathparamsMap();
|
|
2986
|
+
reader.readMessage(value, function(message, reader2) {
|
|
2987
|
+
jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
|
2988
|
+
});
|
|
2989
|
+
break;
|
|
2969
2990
|
default:
|
|
2970
2991
|
reader.skipField();
|
|
2971
2992
|
break;
|
|
@@ -2980,6 +3001,67 @@ var require_avs_pb = __commonJS({
|
|
|
2980
3001
|
};
|
|
2981
3002
|
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter = function(message, writer) {
|
|
2982
3003
|
var f = void 0;
|
|
3004
|
+
f = message.getData();
|
|
3005
|
+
if (f != null) {
|
|
3006
|
+
writer.writeMessage(
|
|
3007
|
+
1,
|
|
3008
|
+
f,
|
|
3009
|
+
google_protobuf_struct_pb2.Value.serializeBinaryToWriter
|
|
3010
|
+
);
|
|
3011
|
+
}
|
|
3012
|
+
f = message.getHeadersMap(true);
|
|
3013
|
+
if (f && f.getLength() > 0) {
|
|
3014
|
+
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
|
3015
|
+
}
|
|
3016
|
+
f = message.getPathparamsMap(true);
|
|
3017
|
+
if (f && f.getLength() > 0) {
|
|
3018
|
+
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
|
3019
|
+
}
|
|
3020
|
+
};
|
|
3021
|
+
proto.aggregator.ManualTrigger.Config.prototype.getData = function() {
|
|
3022
|
+
return (
|
|
3023
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
3024
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb2.Value, 1)
|
|
3025
|
+
);
|
|
3026
|
+
};
|
|
3027
|
+
proto.aggregator.ManualTrigger.Config.prototype.setData = function(value) {
|
|
3028
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
3029
|
+
};
|
|
3030
|
+
proto.aggregator.ManualTrigger.Config.prototype.clearData = function() {
|
|
3031
|
+
return this.setData(void 0);
|
|
3032
|
+
};
|
|
3033
|
+
proto.aggregator.ManualTrigger.Config.prototype.hasData = function() {
|
|
3034
|
+
return jspb.Message.getField(this, 1) != null;
|
|
3035
|
+
};
|
|
3036
|
+
proto.aggregator.ManualTrigger.Config.prototype.getHeadersMap = function(opt_noLazyCreate) {
|
|
3037
|
+
return (
|
|
3038
|
+
/** @type {!jspb.Map<string,string>} */
|
|
3039
|
+
jspb.Message.getMapField(
|
|
3040
|
+
this,
|
|
3041
|
+
2,
|
|
3042
|
+
opt_noLazyCreate,
|
|
3043
|
+
null
|
|
3044
|
+
)
|
|
3045
|
+
);
|
|
3046
|
+
};
|
|
3047
|
+
proto.aggregator.ManualTrigger.Config.prototype.clearHeadersMap = function() {
|
|
3048
|
+
this.getHeadersMap().clear();
|
|
3049
|
+
return this;
|
|
3050
|
+
};
|
|
3051
|
+
proto.aggregator.ManualTrigger.Config.prototype.getPathparamsMap = function(opt_noLazyCreate) {
|
|
3052
|
+
return (
|
|
3053
|
+
/** @type {!jspb.Map<string,string>} */
|
|
3054
|
+
jspb.Message.getMapField(
|
|
3055
|
+
this,
|
|
3056
|
+
3,
|
|
3057
|
+
opt_noLazyCreate,
|
|
3058
|
+
null
|
|
3059
|
+
)
|
|
3060
|
+
);
|
|
3061
|
+
};
|
|
3062
|
+
proto.aggregator.ManualTrigger.Config.prototype.clearPathparamsMap = function() {
|
|
3063
|
+
this.getPathparamsMap().clear();
|
|
3064
|
+
return this;
|
|
2983
3065
|
};
|
|
2984
3066
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2985
3067
|
proto.aggregator.ManualTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -2987,7 +3069,9 @@ var require_avs_pb = __commonJS({
|
|
|
2987
3069
|
};
|
|
2988
3070
|
proto.aggregator.ManualTrigger.Output.toObject = function(includeInstance, msg) {
|
|
2989
3071
|
var f, obj = {
|
|
2990
|
-
|
|
3072
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb2.Value.toObject(includeInstance, f),
|
|
3073
|
+
headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [],
|
|
3074
|
+
pathparamsMap: (f = msg.getPathparamsMap()) ? f.toObject(includeInstance, void 0) : []
|
|
2991
3075
|
};
|
|
2992
3076
|
if (includeInstance) {
|
|
2993
3077
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3008,11 +3092,21 @@ var require_avs_pb = __commonJS({
|
|
|
3008
3092
|
var field = reader.getFieldNumber();
|
|
3009
3093
|
switch (field) {
|
|
3010
3094
|
case 1:
|
|
3011
|
-
var value = (
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3095
|
+
var value = new google_protobuf_struct_pb2.Value();
|
|
3096
|
+
reader.readMessage(value, google_protobuf_struct_pb2.Value.deserializeBinaryFromReader);
|
|
3097
|
+
msg.setData(value);
|
|
3098
|
+
break;
|
|
3099
|
+
case 2:
|
|
3100
|
+
var value = msg.getHeadersMap();
|
|
3101
|
+
reader.readMessage(value, function(message, reader2) {
|
|
3102
|
+
jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
|
3103
|
+
});
|
|
3104
|
+
break;
|
|
3105
|
+
case 3:
|
|
3106
|
+
var value = msg.getPathparamsMap();
|
|
3107
|
+
reader.readMessage(value, function(message, reader2) {
|
|
3108
|
+
jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
|
3109
|
+
});
|
|
3016
3110
|
break;
|
|
3017
3111
|
default:
|
|
3018
3112
|
reader.skipField();
|
|
@@ -3028,22 +3122,67 @@ var require_avs_pb = __commonJS({
|
|
|
3028
3122
|
};
|
|
3029
3123
|
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter = function(message, writer) {
|
|
3030
3124
|
var f = void 0;
|
|
3031
|
-
f = message.
|
|
3032
|
-
if (f
|
|
3033
|
-
writer.
|
|
3125
|
+
f = message.getData();
|
|
3126
|
+
if (f != null) {
|
|
3127
|
+
writer.writeMessage(
|
|
3034
3128
|
1,
|
|
3035
|
-
f
|
|
3129
|
+
f,
|
|
3130
|
+
google_protobuf_struct_pb2.Value.serializeBinaryToWriter
|
|
3036
3131
|
);
|
|
3037
3132
|
}
|
|
3133
|
+
f = message.getHeadersMap(true);
|
|
3134
|
+
if (f && f.getLength() > 0) {
|
|
3135
|
+
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
|
3136
|
+
}
|
|
3137
|
+
f = message.getPathparamsMap(true);
|
|
3138
|
+
if (f && f.getLength() > 0) {
|
|
3139
|
+
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
|
3140
|
+
}
|
|
3038
3141
|
};
|
|
3039
|
-
proto.aggregator.ManualTrigger.Output.prototype.
|
|
3142
|
+
proto.aggregator.ManualTrigger.Output.prototype.getData = function() {
|
|
3040
3143
|
return (
|
|
3041
|
-
/** @type
|
|
3042
|
-
jspb.Message.
|
|
3144
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
3145
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb2.Value, 1)
|
|
3043
3146
|
);
|
|
3044
3147
|
};
|
|
3045
|
-
proto.aggregator.ManualTrigger.Output.prototype.
|
|
3046
|
-
return jspb.Message.
|
|
3148
|
+
proto.aggregator.ManualTrigger.Output.prototype.setData = function(value) {
|
|
3149
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
3150
|
+
};
|
|
3151
|
+
proto.aggregator.ManualTrigger.Output.prototype.clearData = function() {
|
|
3152
|
+
return this.setData(void 0);
|
|
3153
|
+
};
|
|
3154
|
+
proto.aggregator.ManualTrigger.Output.prototype.hasData = function() {
|
|
3155
|
+
return jspb.Message.getField(this, 1) != null;
|
|
3156
|
+
};
|
|
3157
|
+
proto.aggregator.ManualTrigger.Output.prototype.getHeadersMap = function(opt_noLazyCreate) {
|
|
3158
|
+
return (
|
|
3159
|
+
/** @type {!jspb.Map<string,string>} */
|
|
3160
|
+
jspb.Message.getMapField(
|
|
3161
|
+
this,
|
|
3162
|
+
2,
|
|
3163
|
+
opt_noLazyCreate,
|
|
3164
|
+
null
|
|
3165
|
+
)
|
|
3166
|
+
);
|
|
3167
|
+
};
|
|
3168
|
+
proto.aggregator.ManualTrigger.Output.prototype.clearHeadersMap = function() {
|
|
3169
|
+
this.getHeadersMap().clear();
|
|
3170
|
+
return this;
|
|
3171
|
+
};
|
|
3172
|
+
proto.aggregator.ManualTrigger.Output.prototype.getPathparamsMap = function(opt_noLazyCreate) {
|
|
3173
|
+
return (
|
|
3174
|
+
/** @type {!jspb.Map<string,string>} */
|
|
3175
|
+
jspb.Message.getMapField(
|
|
3176
|
+
this,
|
|
3177
|
+
3,
|
|
3178
|
+
opt_noLazyCreate,
|
|
3179
|
+
null
|
|
3180
|
+
)
|
|
3181
|
+
);
|
|
3182
|
+
};
|
|
3183
|
+
proto.aggregator.ManualTrigger.Output.prototype.clearPathparamsMap = function() {
|
|
3184
|
+
this.getPathparamsMap().clear();
|
|
3185
|
+
return this;
|
|
3047
3186
|
};
|
|
3048
3187
|
proto.aggregator.ManualTrigger.prototype.getConfig = function() {
|
|
3049
3188
|
return (
|
|
@@ -3098,7 +3237,7 @@ var require_avs_pb = __commonJS({
|
|
|
3098
3237
|
var f, obj = {
|
|
3099
3238
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3100
3239
|
type: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
3101
|
-
manual:
|
|
3240
|
+
manual: (f = msg.getManual()) && proto.aggregator.ManualTrigger.toObject(includeInstance, f),
|
|
3102
3241
|
fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedTimeTrigger.toObject(includeInstance, f),
|
|
3103
3242
|
cron: (f = msg.getCron()) && proto.aggregator.CronTrigger.toObject(includeInstance, f),
|
|
3104
3243
|
block: (f = msg.getBlock()) && proto.aggregator.BlockTrigger.toObject(includeInstance, f),
|
|
@@ -3139,10 +3278,8 @@ var require_avs_pb = __commonJS({
|
|
|
3139
3278
|
msg.setType(value);
|
|
3140
3279
|
break;
|
|
3141
3280
|
case 2:
|
|
3142
|
-
var value = (
|
|
3143
|
-
|
|
3144
|
-
reader.readBool()
|
|
3145
|
-
);
|
|
3281
|
+
var value = new proto.aggregator.ManualTrigger();
|
|
3282
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.deserializeBinaryFromReader);
|
|
3146
3283
|
msg.setManual(value);
|
|
3147
3284
|
break;
|
|
3148
3285
|
case 3:
|
|
@@ -3205,12 +3342,12 @@ var require_avs_pb = __commonJS({
|
|
|
3205
3342
|
f
|
|
3206
3343
|
);
|
|
3207
3344
|
}
|
|
3208
|
-
f =
|
|
3209
|
-
jspb.Message.getField(message, 2);
|
|
3345
|
+
f = message.getManual();
|
|
3210
3346
|
if (f != null) {
|
|
3211
|
-
writer.
|
|
3347
|
+
writer.writeMessage(
|
|
3212
3348
|
2,
|
|
3213
|
-
f
|
|
3349
|
+
f,
|
|
3350
|
+
proto.aggregator.ManualTrigger.serializeBinaryToWriter
|
|
3214
3351
|
);
|
|
3215
3352
|
}
|
|
3216
3353
|
f = message.getFixedTime();
|
|
@@ -3281,15 +3418,15 @@ var require_avs_pb = __commonJS({
|
|
|
3281
3418
|
};
|
|
3282
3419
|
proto.aggregator.TaskTrigger.prototype.getManual = function() {
|
|
3283
3420
|
return (
|
|
3284
|
-
/** @type
|
|
3285
|
-
jspb.Message.
|
|
3421
|
+
/** @type{?proto.aggregator.ManualTrigger} */
|
|
3422
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger, 2)
|
|
3286
3423
|
);
|
|
3287
3424
|
};
|
|
3288
3425
|
proto.aggregator.TaskTrigger.prototype.setManual = function(value) {
|
|
3289
|
-
return jspb.Message.
|
|
3426
|
+
return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value);
|
|
3290
3427
|
};
|
|
3291
3428
|
proto.aggregator.TaskTrigger.prototype.clearManual = function() {
|
|
3292
|
-
return
|
|
3429
|
+
return this.setManual(void 0);
|
|
3293
3430
|
};
|
|
3294
3431
|
proto.aggregator.TaskTrigger.prototype.hasManual = function() {
|
|
3295
3432
|
return jspb.Message.getField(this, 2) != null;
|
|
@@ -17313,58 +17450,133 @@ var fixedTime_default = FixedTimeTrigger2;
|
|
|
17313
17450
|
// src/models/trigger/manual.ts
|
|
17314
17451
|
var avs_pb6 = __toESM(require_avs_pb());
|
|
17315
17452
|
var import_types6 = require("@avaprotocol/types");
|
|
17316
|
-
var
|
|
17453
|
+
var ManualTrigger2 = class _ManualTrigger extends Trigger {
|
|
17317
17454
|
constructor(props) {
|
|
17318
|
-
super({
|
|
17455
|
+
super({
|
|
17456
|
+
...props,
|
|
17457
|
+
type: import_types6.TriggerType.Manual,
|
|
17458
|
+
data: props.data,
|
|
17459
|
+
input: props.input
|
|
17460
|
+
});
|
|
17461
|
+
this.headersMap = props.headersMap;
|
|
17462
|
+
this.pathParamsMap = props.pathParamsMap;
|
|
17319
17463
|
}
|
|
17320
17464
|
toRequest() {
|
|
17321
17465
|
const trigger = new avs_pb6.TaskTrigger();
|
|
17322
17466
|
trigger.setId(this.id);
|
|
17323
17467
|
trigger.setName(this.name);
|
|
17324
17468
|
trigger.setType(avs_pb6.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
17325
|
-
|
|
17326
|
-
const
|
|
17327
|
-
|
|
17328
|
-
|
|
17469
|
+
const manualTrigger = new avs_pb6.ManualTrigger();
|
|
17470
|
+
const config = new avs_pb6.ManualTrigger.Config();
|
|
17471
|
+
const dataToSend = this.data ?? this.input;
|
|
17472
|
+
if (dataToSend !== null && dataToSend !== void 0) {
|
|
17473
|
+
const inputValue = convertInputToProtobuf(dataToSend);
|
|
17474
|
+
if (inputValue) {
|
|
17475
|
+
config.setData(inputValue);
|
|
17476
|
+
}
|
|
17477
|
+
}
|
|
17478
|
+
if (this.headersMap && this.headersMap.length > 0) {
|
|
17479
|
+
const headersMap = config.getHeadersMap();
|
|
17480
|
+
this.headersMap.forEach(([key, value]) => {
|
|
17481
|
+
headersMap.set(key, value);
|
|
17482
|
+
});
|
|
17329
17483
|
}
|
|
17484
|
+
if (this.pathParamsMap && this.pathParamsMap.length > 0) {
|
|
17485
|
+
const pathParamsMap = config.getPathparamsMap();
|
|
17486
|
+
this.pathParamsMap.forEach(([key, value]) => {
|
|
17487
|
+
pathParamsMap.set(key, value);
|
|
17488
|
+
});
|
|
17489
|
+
}
|
|
17490
|
+
manualTrigger.setConfig(config);
|
|
17491
|
+
trigger.setManual(manualTrigger);
|
|
17330
17492
|
return trigger;
|
|
17331
17493
|
}
|
|
17332
17494
|
static fromResponse(raw) {
|
|
17333
17495
|
const obj = raw.toObject();
|
|
17334
|
-
let
|
|
17335
|
-
|
|
17336
|
-
|
|
17496
|
+
let data = null;
|
|
17497
|
+
const input = void 0;
|
|
17498
|
+
let headersMap = void 0;
|
|
17499
|
+
let pathParamsMap = void 0;
|
|
17500
|
+
const manualTrigger = raw.getManual();
|
|
17501
|
+
if (manualTrigger) {
|
|
17502
|
+
const config = manualTrigger.getConfig();
|
|
17503
|
+
if (config) {
|
|
17504
|
+
if (config.hasData()) {
|
|
17505
|
+
data = extractInputFromProtobuf(config.getData());
|
|
17506
|
+
}
|
|
17507
|
+
const headersMapProto = config.getHeadersMap();
|
|
17508
|
+
if (headersMapProto && headersMapProto.getLength() > 0) {
|
|
17509
|
+
headersMap = [];
|
|
17510
|
+
headersMapProto.forEach((value, key) => {
|
|
17511
|
+
headersMap.push([key, value]);
|
|
17512
|
+
});
|
|
17513
|
+
}
|
|
17514
|
+
const pathParamsMapProto = config.getPathparamsMap();
|
|
17515
|
+
if (pathParamsMapProto && pathParamsMapProto.getLength() > 0) {
|
|
17516
|
+
pathParamsMap = [];
|
|
17517
|
+
pathParamsMapProto.forEach((value, key) => {
|
|
17518
|
+
pathParamsMap.push([key, value]);
|
|
17519
|
+
});
|
|
17520
|
+
}
|
|
17521
|
+
}
|
|
17337
17522
|
}
|
|
17338
17523
|
return new _ManualTrigger({
|
|
17339
17524
|
...obj,
|
|
17340
17525
|
type: import_types6.TriggerType.Manual,
|
|
17341
|
-
data
|
|
17342
|
-
|
|
17343
|
-
|
|
17526
|
+
data,
|
|
17527
|
+
input,
|
|
17528
|
+
headersMap,
|
|
17529
|
+
pathParamsMap
|
|
17344
17530
|
});
|
|
17345
17531
|
}
|
|
17346
17532
|
getInputVariables() {
|
|
17347
|
-
return this.
|
|
17348
|
-
}
|
|
17349
|
-
/**
|
|
17350
|
-
* Convert raw data from runTrigger response to ManualOutput format
|
|
17351
|
-
* @param rawData - The raw data from the gRPC response
|
|
17352
|
-
* @returns {ManualTriggerOutput | undefined} - The converted data
|
|
17353
|
-
*/
|
|
17354
|
-
getOutput() {
|
|
17355
|
-
return this.output;
|
|
17533
|
+
return this.input;
|
|
17356
17534
|
}
|
|
17357
17535
|
/**
|
|
17358
17536
|
* Extract output data from RunTriggerResp for manual triggers
|
|
17359
17537
|
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
17360
|
-
* @returns Plain JavaScript object with manual trigger data
|
|
17538
|
+
* @returns Plain JavaScript object with manual trigger data in standard structure
|
|
17361
17539
|
*/
|
|
17362
17540
|
static fromOutputData(outputData) {
|
|
17363
17541
|
const manualOutput = outputData.getManualTrigger();
|
|
17364
|
-
|
|
17542
|
+
if (!manualOutput) {
|
|
17543
|
+
return null;
|
|
17544
|
+
}
|
|
17545
|
+
const result = {};
|
|
17546
|
+
const dataValue = manualOutput.getData();
|
|
17547
|
+
if (dataValue) {
|
|
17548
|
+
try {
|
|
17549
|
+
result.data = convertProtobufValueToJs(dataValue);
|
|
17550
|
+
} catch (error) {
|
|
17551
|
+
console.warn(
|
|
17552
|
+
"Failed to convert manual trigger data from protobuf Value:",
|
|
17553
|
+
error
|
|
17554
|
+
);
|
|
17555
|
+
result.data = dataValue;
|
|
17556
|
+
}
|
|
17557
|
+
} else {
|
|
17558
|
+
result.data = null;
|
|
17559
|
+
}
|
|
17560
|
+
const headersMapProto = manualOutput.getHeadersMap();
|
|
17561
|
+
if (headersMapProto && headersMapProto.getLength() > 0) {
|
|
17562
|
+
const headersArray = [];
|
|
17563
|
+
headersMapProto.forEach((value, key) => {
|
|
17564
|
+
headersArray.push([key, value]);
|
|
17565
|
+
});
|
|
17566
|
+
result.headers = headersArray;
|
|
17567
|
+
}
|
|
17568
|
+
const pathParamsMapProto = manualOutput.getPathparamsMap();
|
|
17569
|
+
if (pathParamsMapProto && pathParamsMapProto.getLength() > 0) {
|
|
17570
|
+
const pathParamsArray = [];
|
|
17571
|
+
pathParamsMapProto.forEach((value, key) => {
|
|
17572
|
+
pathParamsArray.push([key, value]);
|
|
17573
|
+
});
|
|
17574
|
+
result.pathParams = pathParamsArray;
|
|
17575
|
+
}
|
|
17576
|
+
return result;
|
|
17365
17577
|
}
|
|
17366
17578
|
};
|
|
17367
|
-
var manual_default =
|
|
17579
|
+
var manual_default = ManualTrigger2;
|
|
17368
17580
|
|
|
17369
17581
|
// src/models/trigger/factory.ts
|
|
17370
17582
|
var import_types7 = require("@avaprotocol/types");
|
|
@@ -17949,6 +18161,7 @@ var branch_default = BranchNode2;
|
|
|
17949
18161
|
// src/models/node/filter.ts
|
|
17950
18162
|
var avs_pb16 = __toESM(require_avs_pb());
|
|
17951
18163
|
var import_types16 = require("@avaprotocol/types");
|
|
18164
|
+
var import_struct_pb2 = require("google-protobuf/google/protobuf/struct_pb");
|
|
17952
18165
|
var FilterNode2 = class _FilterNode extends Node {
|
|
17953
18166
|
constructor(props) {
|
|
17954
18167
|
super({ ...props, type: import_types16.NodeType.Filter, data: props.data });
|
|
@@ -17981,7 +18194,21 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
17981
18194
|
}
|
|
17982
18195
|
static fromOutputData(outputData) {
|
|
17983
18196
|
const filterOutput = outputData.getFilter();
|
|
17984
|
-
|
|
18197
|
+
if (!filterOutput) {
|
|
18198
|
+
throw new Error("FilterNode output data is missing");
|
|
18199
|
+
}
|
|
18200
|
+
const anyData = filterOutput.getData();
|
|
18201
|
+
if (!anyData) {
|
|
18202
|
+
throw new Error("FilterNode output data.getData() is missing");
|
|
18203
|
+
}
|
|
18204
|
+
const value = import_struct_pb2.Value.deserializeBinary(anyData.getValue_asU8());
|
|
18205
|
+
const result = value.toJavaScript();
|
|
18206
|
+
if (result && typeof result === "object" && !Array.isArray(result) && result.data) {
|
|
18207
|
+
return result.data;
|
|
18208
|
+
}
|
|
18209
|
+
throw new Error(
|
|
18210
|
+
"FilterNode output data does not contain expected data structure"
|
|
18211
|
+
);
|
|
17985
18212
|
}
|
|
17986
18213
|
};
|
|
17987
18214
|
var filter_default = FilterNode2;
|
|
@@ -18022,18 +18249,18 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
18022
18249
|
});
|
|
18023
18250
|
}
|
|
18024
18251
|
static extractRunnerFromProtobuf(loopNodeData) {
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18252
|
+
const runnerMapping = {
|
|
18253
|
+
restApi: "restApi",
|
|
18254
|
+
customCode: "customCode",
|
|
18255
|
+
ethTransfer: "ethTransfer",
|
|
18256
|
+
contractRead: "contractRead",
|
|
18257
|
+
contractWrite: "contractWrite",
|
|
18258
|
+
graphqlDataQuery: "graphqlDataQuery"
|
|
18259
|
+
};
|
|
18260
|
+
for (const [type, key] of Object.entries(runnerMapping)) {
|
|
18261
|
+
if (loopNodeData[key]) {
|
|
18262
|
+
return { type, data: loopNodeData[key] };
|
|
18263
|
+
}
|
|
18037
18264
|
}
|
|
18038
18265
|
return null;
|
|
18039
18266
|
}
|
|
@@ -18422,7 +18649,6 @@ var Workflow = class _Workflow {
|
|
|
18422
18649
|
if (this.name) {
|
|
18423
18650
|
request.setName(this.name);
|
|
18424
18651
|
}
|
|
18425
|
-
console.log(`\u{1F4E4} Workflow serialization: ${this.nodes.length} nodes, ${this.edges.length} edges -> protobuf: ${request.getNodesList().length} nodes, ${request.getEdgesList().length} edges`);
|
|
18426
18652
|
return request;
|
|
18427
18653
|
}
|
|
18428
18654
|
/**
|
|
@@ -18521,44 +18747,210 @@ var Step = class _Step {
|
|
|
18521
18747
|
return void 0;
|
|
18522
18748
|
// Trigger outputs
|
|
18523
18749
|
case avs_pb20.Execution.Step.OutputDataCase.BLOCK_TRIGGER:
|
|
18524
|
-
|
|
18750
|
+
const blockTrigger = typeof step.getBlockTrigger === "function" ? step.getBlockTrigger()?.toObject() : step.blockTrigger;
|
|
18751
|
+
return { data: blockTrigger };
|
|
18752
|
+
// ✅ Use standard structure
|
|
18525
18753
|
case avs_pb20.Execution.Step.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
18526
|
-
|
|
18754
|
+
const fixedTimeTrigger = typeof step.getFixedTimeTrigger === "function" ? step.getFixedTimeTrigger()?.toObject() : step.fixedTimeTrigger;
|
|
18755
|
+
return { data: fixedTimeTrigger };
|
|
18756
|
+
// ✅ Use standard structure
|
|
18527
18757
|
case avs_pb20.Execution.Step.OutputDataCase.CRON_TRIGGER:
|
|
18528
|
-
|
|
18758
|
+
const cronTrigger = typeof step.getCronTrigger === "function" ? step.getCronTrigger()?.toObject() : step.cronTrigger;
|
|
18759
|
+
return { data: cronTrigger };
|
|
18760
|
+
// ✅ Use standard structure
|
|
18529
18761
|
case avs_pb20.Execution.Step.OutputDataCase.EVENT_TRIGGER:
|
|
18530
18762
|
const eventTrigger = typeof step.getEventTrigger === "function" ? step.getEventTrigger() : step.eventTrigger;
|
|
18531
18763
|
if (eventTrigger) {
|
|
18532
18764
|
if (typeof eventTrigger.hasData === "function" && eventTrigger.hasData()) {
|
|
18533
18765
|
try {
|
|
18534
|
-
|
|
18766
|
+
const eventData = convertProtobufValueToJs(
|
|
18767
|
+
eventTrigger.getData()
|
|
18768
|
+
);
|
|
18769
|
+
return { data: eventData };
|
|
18535
18770
|
} catch (error) {
|
|
18536
18771
|
console.warn(
|
|
18537
18772
|
"Failed to convert event trigger data from protobuf Value:",
|
|
18538
18773
|
error
|
|
18539
18774
|
);
|
|
18540
|
-
return eventTrigger.getData();
|
|
18775
|
+
return { data: eventTrigger.getData() };
|
|
18541
18776
|
}
|
|
18542
18777
|
} else if (eventTrigger.data) {
|
|
18543
|
-
|
|
18778
|
+
const eventData = typeof eventTrigger.data.getKindCase === "function" ? convertProtobufValueToJs(eventTrigger.data) : eventTrigger.data;
|
|
18779
|
+
return { data: eventData };
|
|
18544
18780
|
}
|
|
18545
18781
|
if (typeof eventTrigger.hasEvmLog === "function" && eventTrigger.hasEvmLog()) {
|
|
18546
|
-
return eventTrigger.getEvmLog()?.toObject();
|
|
18782
|
+
return { data: eventTrigger.getEvmLog()?.toObject() };
|
|
18547
18783
|
} else if (typeof eventTrigger.hasTransferLog === "function" && eventTrigger.hasTransferLog()) {
|
|
18548
|
-
return eventTrigger.getTransferLog()?.toObject();
|
|
18784
|
+
return { data: eventTrigger.getTransferLog()?.toObject() };
|
|
18549
18785
|
} else if (eventTrigger.evmLog) {
|
|
18550
|
-
return eventTrigger.evmLog;
|
|
18786
|
+
return { data: eventTrigger.evmLog };
|
|
18551
18787
|
} else if (eventTrigger.transferLog) {
|
|
18552
|
-
return eventTrigger.transferLog;
|
|
18788
|
+
return { data: eventTrigger.transferLog };
|
|
18553
18789
|
}
|
|
18554
18790
|
}
|
|
18555
|
-
return
|
|
18556
|
-
|
|
18557
|
-
|
|
18791
|
+
return { data: null };
|
|
18792
|
+
// ✅ Use standard structure
|
|
18793
|
+
case avs_pb20.Execution.Step.OutputDataCase.MANUAL_TRIGGER: {
|
|
18794
|
+
const manualTrigger = typeof step.getManualTrigger === "function" ? step.getManualTrigger() : step.manualTrigger;
|
|
18795
|
+
if (manualTrigger) {
|
|
18796
|
+
const result = {};
|
|
18797
|
+
if (typeof manualTrigger.hasData === "function" && manualTrigger.hasData()) {
|
|
18798
|
+
try {
|
|
18799
|
+
const userData = convertProtobufValueToJs(
|
|
18800
|
+
manualTrigger.getData()
|
|
18801
|
+
);
|
|
18802
|
+
if (userData && typeof userData === "object" && userData.data !== void 0 && (userData.headers !== void 0 || userData.pathParams !== void 0)) {
|
|
18803
|
+
result.data = userData.data;
|
|
18804
|
+
if (userData.headers) {
|
|
18805
|
+
if (Array.isArray(userData.headers)) {
|
|
18806
|
+
if (userData.headers.length > 0 && Array.isArray(userData.headers[0])) {
|
|
18807
|
+
result.headers = userData.headers;
|
|
18808
|
+
} else {
|
|
18809
|
+
const headersArray = [];
|
|
18810
|
+
for (const header of userData.headers) {
|
|
18811
|
+
for (const [key, value] of Object.entries(header)) {
|
|
18812
|
+
headersArray.push([key, value]);
|
|
18813
|
+
}
|
|
18814
|
+
}
|
|
18815
|
+
result.headers = headersArray;
|
|
18816
|
+
}
|
|
18817
|
+
} else {
|
|
18818
|
+
const headersArray = [];
|
|
18819
|
+
for (const [key, value] of Object.entries(userData.headers)) {
|
|
18820
|
+
headersArray.push([key, value]);
|
|
18821
|
+
}
|
|
18822
|
+
result.headers = headersArray;
|
|
18823
|
+
}
|
|
18824
|
+
}
|
|
18825
|
+
if (userData.pathParams) {
|
|
18826
|
+
if (Array.isArray(userData.pathParams)) {
|
|
18827
|
+
if (userData.pathParams.length > 0 && Array.isArray(userData.pathParams[0])) {
|
|
18828
|
+
result.pathParams = userData.pathParams;
|
|
18829
|
+
} else {
|
|
18830
|
+
const pathParamsArray = [];
|
|
18831
|
+
for (const pathParam of userData.pathParams) {
|
|
18832
|
+
for (const [key, value] of Object.entries(pathParam)) {
|
|
18833
|
+
pathParamsArray.push([key, value]);
|
|
18834
|
+
}
|
|
18835
|
+
}
|
|
18836
|
+
result.pathParams = pathParamsArray;
|
|
18837
|
+
}
|
|
18838
|
+
} else {
|
|
18839
|
+
const pathParamsArray = [];
|
|
18840
|
+
for (const [key, value] of Object.entries(userData.pathParams)) {
|
|
18841
|
+
pathParamsArray.push([key, value]);
|
|
18842
|
+
}
|
|
18843
|
+
result.pathParams = pathParamsArray;
|
|
18844
|
+
}
|
|
18845
|
+
}
|
|
18846
|
+
} else {
|
|
18847
|
+
result.data = userData;
|
|
18848
|
+
}
|
|
18849
|
+
} catch (error) {
|
|
18850
|
+
console.warn(
|
|
18851
|
+
"Failed to convert manual trigger data from protobuf Value:",
|
|
18852
|
+
error
|
|
18853
|
+
);
|
|
18854
|
+
result.data = manualTrigger.getData();
|
|
18855
|
+
}
|
|
18856
|
+
} else if (manualTrigger.data) {
|
|
18857
|
+
const userData = typeof manualTrigger.data.getKindCase === "function" ? convertProtobufValueToJs(manualTrigger.data) : manualTrigger.data;
|
|
18858
|
+
if (userData && typeof userData === "object" && userData.data !== void 0 && (userData.headers !== void 0 || userData.pathParams !== void 0)) {
|
|
18859
|
+
result.data = userData.data;
|
|
18860
|
+
if (userData.headers) {
|
|
18861
|
+
if (Array.isArray(userData.headers)) {
|
|
18862
|
+
if (userData.headers.length > 0 && Array.isArray(userData.headers[0])) {
|
|
18863
|
+
result.headers = userData.headers;
|
|
18864
|
+
} else {
|
|
18865
|
+
const headersArray = [];
|
|
18866
|
+
for (const header of userData.headers) {
|
|
18867
|
+
for (const [key, value] of Object.entries(header)) {
|
|
18868
|
+
headersArray.push([key, value]);
|
|
18869
|
+
}
|
|
18870
|
+
}
|
|
18871
|
+
result.headers = headersArray;
|
|
18872
|
+
}
|
|
18873
|
+
} else {
|
|
18874
|
+
const headersArray = [];
|
|
18875
|
+
for (const [key, value] of Object.entries(userData.headers)) {
|
|
18876
|
+
headersArray.push([key, value]);
|
|
18877
|
+
}
|
|
18878
|
+
result.headers = headersArray;
|
|
18879
|
+
}
|
|
18880
|
+
}
|
|
18881
|
+
if (userData.pathParams) {
|
|
18882
|
+
if (Array.isArray(userData.pathParams)) {
|
|
18883
|
+
if (userData.pathParams.length > 0 && Array.isArray(userData.pathParams[0])) {
|
|
18884
|
+
result.pathParams = userData.pathParams;
|
|
18885
|
+
} else {
|
|
18886
|
+
const pathParamsArray = [];
|
|
18887
|
+
for (const pathParam of userData.pathParams) {
|
|
18888
|
+
for (const [key, value] of Object.entries(pathParam)) {
|
|
18889
|
+
pathParamsArray.push([key, value]);
|
|
18890
|
+
}
|
|
18891
|
+
}
|
|
18892
|
+
result.pathParams = pathParamsArray;
|
|
18893
|
+
}
|
|
18894
|
+
} else {
|
|
18895
|
+
const pathParamsArray = [];
|
|
18896
|
+
for (const [key, value] of Object.entries(userData.pathParams)) {
|
|
18897
|
+
pathParamsArray.push([key, value]);
|
|
18898
|
+
}
|
|
18899
|
+
result.pathParams = pathParamsArray;
|
|
18900
|
+
}
|
|
18901
|
+
}
|
|
18902
|
+
} else {
|
|
18903
|
+
result.data = userData;
|
|
18904
|
+
}
|
|
18905
|
+
}
|
|
18906
|
+
if (typeof manualTrigger.getHeadersMap === "function") {
|
|
18907
|
+
const headersMap = manualTrigger.getHeadersMap();
|
|
18908
|
+
if (headersMap && headersMap.getLength() > 0) {
|
|
18909
|
+
const headersArray = [];
|
|
18910
|
+
headersMap.forEach((value, key) => {
|
|
18911
|
+
headersArray.push([key, value]);
|
|
18912
|
+
});
|
|
18913
|
+
result.headers = headersArray;
|
|
18914
|
+
}
|
|
18915
|
+
} else if (manualTrigger.headers) {
|
|
18916
|
+
const headersArray = [];
|
|
18917
|
+
for (const [key, value] of Object.entries(manualTrigger.headers)) {
|
|
18918
|
+
headersArray.push([key, value]);
|
|
18919
|
+
}
|
|
18920
|
+
result.headers = headersArray;
|
|
18921
|
+
}
|
|
18922
|
+
if (typeof manualTrigger.getPathparamsMap === "function") {
|
|
18923
|
+
const pathParamsMap = manualTrigger.getPathparamsMap();
|
|
18924
|
+
if (pathParamsMap && pathParamsMap.getLength() > 0) {
|
|
18925
|
+
const pathParamsArray = [];
|
|
18926
|
+
pathParamsMap.forEach((value, key) => {
|
|
18927
|
+
pathParamsArray.push([key, value]);
|
|
18928
|
+
});
|
|
18929
|
+
result.pathParams = pathParamsArray;
|
|
18930
|
+
}
|
|
18931
|
+
} else if (manualTrigger.pathparams) {
|
|
18932
|
+
const pathParamsArray = [];
|
|
18933
|
+
for (const [key, value] of Object.entries(manualTrigger.pathparams)) {
|
|
18934
|
+
pathParamsArray.push([key, value]);
|
|
18935
|
+
}
|
|
18936
|
+
result.pathParams = pathParamsArray;
|
|
18937
|
+
}
|
|
18938
|
+
if (Object.keys(result).length === 0) {
|
|
18939
|
+
const objData = manualTrigger.toObject?.() || manualTrigger;
|
|
18940
|
+
if (objData && objData.data === void 0) {
|
|
18941
|
+
result.data = null;
|
|
18942
|
+
} else {
|
|
18943
|
+
return { data: objData };
|
|
18944
|
+
}
|
|
18945
|
+
}
|
|
18946
|
+
return result;
|
|
18947
|
+
}
|
|
18948
|
+
return { data: null };
|
|
18949
|
+
}
|
|
18558
18950
|
// Node outputs - RESTORE MISSING CASES
|
|
18559
18951
|
case avs_pb20.Execution.Step.OutputDataCase.ETH_TRANSFER:
|
|
18560
18952
|
return typeof step.getEthTransfer === "function" ? step.getEthTransfer()?.toObject() : step.ethTransfer;
|
|
18561
|
-
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
18953
|
+
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE: {
|
|
18562
18954
|
const customCodeOutput = typeof step.getCustomCode === "function" ? step.getCustomCode() : step.customCode;
|
|
18563
18955
|
if (customCodeOutput) {
|
|
18564
18956
|
if (typeof customCodeOutput.hasData === "function" && customCodeOutput.hasData()) {
|
|
@@ -18572,7 +18964,8 @@ var Step = class _Step {
|
|
|
18572
18964
|
}
|
|
18573
18965
|
}
|
|
18574
18966
|
return void 0;
|
|
18575
|
-
|
|
18967
|
+
}
|
|
18968
|
+
case avs_pb20.Execution.Step.OutputDataCase.REST_API: {
|
|
18576
18969
|
const restApiOutput = typeof step.getRestApi === "function" ? step.getRestApi() : step.restApi;
|
|
18577
18970
|
if (restApiOutput) {
|
|
18578
18971
|
if (typeof restApiOutput.hasData === "function" && restApiOutput.hasData()) {
|
|
@@ -18586,9 +18979,10 @@ var Step = class _Step {
|
|
|
18586
18979
|
}
|
|
18587
18980
|
}
|
|
18588
18981
|
return void 0;
|
|
18982
|
+
}
|
|
18589
18983
|
case avs_pb20.Execution.Step.OutputDataCase.BRANCH:
|
|
18590
18984
|
return typeof step.getBranch === "function" ? step.getBranch()?.toObject() : step.branch;
|
|
18591
|
-
case avs_pb20.Execution.Step.OutputDataCase.LOOP:
|
|
18985
|
+
case avs_pb20.Execution.Step.OutputDataCase.LOOP: {
|
|
18592
18986
|
const loopOutput = typeof step.getLoop === "function" ? step.getLoop() : step.loop;
|
|
18593
18987
|
if (loopOutput) {
|
|
18594
18988
|
if (typeof loopOutput.getData === "function" && loopOutput.getData()) {
|
|
@@ -18606,7 +19000,8 @@ var Step = class _Step {
|
|
|
18606
19000
|
}
|
|
18607
19001
|
}
|
|
18608
19002
|
return void 0;
|
|
18609
|
-
|
|
19003
|
+
}
|
|
19004
|
+
case avs_pb20.Execution.Step.OutputDataCase.GRAPHQL: {
|
|
18610
19005
|
const graphqlOutput = typeof step.getGraphql === "function" ? step.getGraphql() : step.graphql;
|
|
18611
19006
|
if (graphqlOutput) {
|
|
18612
19007
|
try {
|
|
@@ -18616,7 +19011,8 @@ var Step = class _Step {
|
|
|
18616
19011
|
}
|
|
18617
19012
|
}
|
|
18618
19013
|
return void 0;
|
|
18619
|
-
|
|
19014
|
+
}
|
|
19015
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_READ: {
|
|
18620
19016
|
const contractReadOutput = typeof step.getContractRead === "function" ? step.getContractRead() : step.contractRead;
|
|
18621
19017
|
if (contractReadOutput) {
|
|
18622
19018
|
if (typeof contractReadOutput.hasData === "function" && contractReadOutput.hasData()) {
|
|
@@ -18656,7 +19052,8 @@ var Step = class _Step {
|
|
|
18656
19052
|
return outputObj;
|
|
18657
19053
|
}
|
|
18658
19054
|
return void 0;
|
|
18659
|
-
|
|
19055
|
+
}
|
|
19056
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_WRITE: {
|
|
18660
19057
|
const contractWriteOutput = typeof step.getContractWrite === "function" ? step.getContractWrite() : step.contractWrite;
|
|
18661
19058
|
if (contractWriteOutput) {
|
|
18662
19059
|
if (typeof contractWriteOutput.hasData === "function" && contractWriteOutput.hasData()) {
|
|
@@ -18699,7 +19096,8 @@ var Step = class _Step {
|
|
|
18699
19096
|
return outputObj;
|
|
18700
19097
|
}
|
|
18701
19098
|
return void 0;
|
|
18702
|
-
|
|
19099
|
+
}
|
|
19100
|
+
case avs_pb20.Execution.Step.OutputDataCase.FILTER: {
|
|
18703
19101
|
const filterOutput = typeof step.getFilter === "function" ? step.getFilter() : step.filter;
|
|
18704
19102
|
if (filterOutput) {
|
|
18705
19103
|
try {
|
|
@@ -18709,6 +19107,7 @@ var Step = class _Step {
|
|
|
18709
19107
|
}
|
|
18710
19108
|
}
|
|
18711
19109
|
return void 0;
|
|
19110
|
+
}
|
|
18712
19111
|
default:
|
|
18713
19112
|
console.warn(
|
|
18714
19113
|
`Unhandled output data type in Step.getOutput: ${step.getOutputDataCase()}`
|
|
@@ -19407,7 +19806,22 @@ var Client = class extends BaseClient {
|
|
|
19407
19806
|
case import_types20.TriggerType.Manual: {
|
|
19408
19807
|
const manualData = triggerData;
|
|
19409
19808
|
const manualOutput = new avs_pb22.ManualTrigger.Output();
|
|
19410
|
-
if (manualData.
|
|
19809
|
+
if (manualData.data) {
|
|
19810
|
+
const protobufValue = convertJSValueToProtobuf(manualData.data);
|
|
19811
|
+
manualOutput.setData(protobufValue);
|
|
19812
|
+
}
|
|
19813
|
+
if (manualData.headersMap) {
|
|
19814
|
+
const headersMap = manualOutput.getHeadersMap();
|
|
19815
|
+
manualData.headersMap.forEach(([key, value]) => {
|
|
19816
|
+
headersMap.set(key, value);
|
|
19817
|
+
});
|
|
19818
|
+
}
|
|
19819
|
+
if (manualData.pathParamsMap) {
|
|
19820
|
+
const pathParamsMap = manualOutput.getPathparamsMap();
|
|
19821
|
+
manualData.pathParamsMap.forEach(([key, value]) => {
|
|
19822
|
+
pathParamsMap.set(key, value);
|
|
19823
|
+
});
|
|
19824
|
+
}
|
|
19411
19825
|
request.setManualTrigger(manualOutput);
|
|
19412
19826
|
break;
|
|
19413
19827
|
}
|