@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.mjs
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;
|
|
@@ -17288,59 +17425,136 @@ var fixedTime_default = FixedTimeTrigger2;
|
|
|
17288
17425
|
|
|
17289
17426
|
// src/models/trigger/manual.ts
|
|
17290
17427
|
var avs_pb6 = __toESM(require_avs_pb());
|
|
17291
|
-
import {
|
|
17292
|
-
|
|
17428
|
+
import {
|
|
17429
|
+
TriggerType as TriggerType11
|
|
17430
|
+
} from "@avaprotocol/types";
|
|
17431
|
+
var ManualTrigger2 = class _ManualTrigger extends Trigger {
|
|
17293
17432
|
constructor(props) {
|
|
17294
|
-
super({
|
|
17433
|
+
super({
|
|
17434
|
+
...props,
|
|
17435
|
+
type: TriggerType11.Manual,
|
|
17436
|
+
data: props.data,
|
|
17437
|
+
input: props.input
|
|
17438
|
+
});
|
|
17439
|
+
this.headersMap = props.headersMap;
|
|
17440
|
+
this.pathParamsMap = props.pathParamsMap;
|
|
17295
17441
|
}
|
|
17296
17442
|
toRequest() {
|
|
17297
17443
|
const trigger = new avs_pb6.TaskTrigger();
|
|
17298
17444
|
trigger.setId(this.id);
|
|
17299
17445
|
trigger.setName(this.name);
|
|
17300
17446
|
trigger.setType(avs_pb6.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
17301
|
-
|
|
17302
|
-
const
|
|
17303
|
-
|
|
17304
|
-
|
|
17447
|
+
const manualTrigger = new avs_pb6.ManualTrigger();
|
|
17448
|
+
const config = new avs_pb6.ManualTrigger.Config();
|
|
17449
|
+
const dataToSend = this.data ?? this.input;
|
|
17450
|
+
if (dataToSend !== null && dataToSend !== void 0) {
|
|
17451
|
+
const inputValue = convertInputToProtobuf(dataToSend);
|
|
17452
|
+
if (inputValue) {
|
|
17453
|
+
config.setData(inputValue);
|
|
17454
|
+
}
|
|
17455
|
+
}
|
|
17456
|
+
if (this.headersMap && this.headersMap.length > 0) {
|
|
17457
|
+
const headersMap = config.getHeadersMap();
|
|
17458
|
+
this.headersMap.forEach(([key, value]) => {
|
|
17459
|
+
headersMap.set(key, value);
|
|
17460
|
+
});
|
|
17461
|
+
}
|
|
17462
|
+
if (this.pathParamsMap && this.pathParamsMap.length > 0) {
|
|
17463
|
+
const pathParamsMap = config.getPathparamsMap();
|
|
17464
|
+
this.pathParamsMap.forEach(([key, value]) => {
|
|
17465
|
+
pathParamsMap.set(key, value);
|
|
17466
|
+
});
|
|
17305
17467
|
}
|
|
17468
|
+
manualTrigger.setConfig(config);
|
|
17469
|
+
trigger.setManual(manualTrigger);
|
|
17306
17470
|
return trigger;
|
|
17307
17471
|
}
|
|
17308
17472
|
static fromResponse(raw) {
|
|
17309
17473
|
const obj = raw.toObject();
|
|
17310
|
-
let
|
|
17311
|
-
|
|
17312
|
-
|
|
17474
|
+
let data = null;
|
|
17475
|
+
const input = void 0;
|
|
17476
|
+
let headersMap = void 0;
|
|
17477
|
+
let pathParamsMap = void 0;
|
|
17478
|
+
const manualTrigger = raw.getManual();
|
|
17479
|
+
if (manualTrigger) {
|
|
17480
|
+
const config = manualTrigger.getConfig();
|
|
17481
|
+
if (config) {
|
|
17482
|
+
if (config.hasData()) {
|
|
17483
|
+
data = extractInputFromProtobuf(config.getData());
|
|
17484
|
+
}
|
|
17485
|
+
const headersMapProto = config.getHeadersMap();
|
|
17486
|
+
if (headersMapProto && headersMapProto.getLength() > 0) {
|
|
17487
|
+
headersMap = [];
|
|
17488
|
+
headersMapProto.forEach((value, key) => {
|
|
17489
|
+
headersMap.push([key, value]);
|
|
17490
|
+
});
|
|
17491
|
+
}
|
|
17492
|
+
const pathParamsMapProto = config.getPathparamsMap();
|
|
17493
|
+
if (pathParamsMapProto && pathParamsMapProto.getLength() > 0) {
|
|
17494
|
+
pathParamsMap = [];
|
|
17495
|
+
pathParamsMapProto.forEach((value, key) => {
|
|
17496
|
+
pathParamsMap.push([key, value]);
|
|
17497
|
+
});
|
|
17498
|
+
}
|
|
17499
|
+
}
|
|
17313
17500
|
}
|
|
17314
17501
|
return new _ManualTrigger({
|
|
17315
17502
|
...obj,
|
|
17316
17503
|
type: TriggerType11.Manual,
|
|
17317
|
-
data
|
|
17318
|
-
|
|
17319
|
-
|
|
17504
|
+
data,
|
|
17505
|
+
input,
|
|
17506
|
+
headersMap,
|
|
17507
|
+
pathParamsMap
|
|
17320
17508
|
});
|
|
17321
17509
|
}
|
|
17322
17510
|
getInputVariables() {
|
|
17323
|
-
return this.
|
|
17324
|
-
}
|
|
17325
|
-
/**
|
|
17326
|
-
* Convert raw data from runTrigger response to ManualOutput format
|
|
17327
|
-
* @param rawData - The raw data from the gRPC response
|
|
17328
|
-
* @returns {ManualTriggerOutput | undefined} - The converted data
|
|
17329
|
-
*/
|
|
17330
|
-
getOutput() {
|
|
17331
|
-
return this.output;
|
|
17511
|
+
return this.input;
|
|
17332
17512
|
}
|
|
17333
17513
|
/**
|
|
17334
17514
|
* Extract output data from RunTriggerResp for manual triggers
|
|
17335
17515
|
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
17336
|
-
* @returns Plain JavaScript object with manual trigger data
|
|
17516
|
+
* @returns Plain JavaScript object with manual trigger data in standard structure
|
|
17337
17517
|
*/
|
|
17338
17518
|
static fromOutputData(outputData) {
|
|
17339
17519
|
const manualOutput = outputData.getManualTrigger();
|
|
17340
|
-
|
|
17520
|
+
if (!manualOutput) {
|
|
17521
|
+
return null;
|
|
17522
|
+
}
|
|
17523
|
+
const result = {};
|
|
17524
|
+
const dataValue = manualOutput.getData();
|
|
17525
|
+
if (dataValue) {
|
|
17526
|
+
try {
|
|
17527
|
+
result.data = convertProtobufValueToJs(dataValue);
|
|
17528
|
+
} catch (error) {
|
|
17529
|
+
console.warn(
|
|
17530
|
+
"Failed to convert manual trigger data from protobuf Value:",
|
|
17531
|
+
error
|
|
17532
|
+
);
|
|
17533
|
+
result.data = dataValue;
|
|
17534
|
+
}
|
|
17535
|
+
} else {
|
|
17536
|
+
result.data = null;
|
|
17537
|
+
}
|
|
17538
|
+
const headersMapProto = manualOutput.getHeadersMap();
|
|
17539
|
+
if (headersMapProto && headersMapProto.getLength() > 0) {
|
|
17540
|
+
const headersArray = [];
|
|
17541
|
+
headersMapProto.forEach((value, key) => {
|
|
17542
|
+
headersArray.push([key, value]);
|
|
17543
|
+
});
|
|
17544
|
+
result.headers = headersArray;
|
|
17545
|
+
}
|
|
17546
|
+
const pathParamsMapProto = manualOutput.getPathparamsMap();
|
|
17547
|
+
if (pathParamsMapProto && pathParamsMapProto.getLength() > 0) {
|
|
17548
|
+
const pathParamsArray = [];
|
|
17549
|
+
pathParamsMapProto.forEach((value, key) => {
|
|
17550
|
+
pathParamsArray.push([key, value]);
|
|
17551
|
+
});
|
|
17552
|
+
result.pathParams = pathParamsArray;
|
|
17553
|
+
}
|
|
17554
|
+
return result;
|
|
17341
17555
|
}
|
|
17342
17556
|
};
|
|
17343
|
-
var manual_default =
|
|
17557
|
+
var manual_default = ManualTrigger2;
|
|
17344
17558
|
|
|
17345
17559
|
// src/models/trigger/factory.ts
|
|
17346
17560
|
import {
|
|
@@ -17934,7 +18148,10 @@ var branch_default = BranchNode2;
|
|
|
17934
18148
|
|
|
17935
18149
|
// src/models/node/filter.ts
|
|
17936
18150
|
var avs_pb16 = __toESM(require_avs_pb());
|
|
17937
|
-
import {
|
|
18151
|
+
import {
|
|
18152
|
+
NodeType as NodeType10
|
|
18153
|
+
} from "@avaprotocol/types";
|
|
18154
|
+
import { Value as Value2 } from "google-protobuf/google/protobuf/struct_pb";
|
|
17938
18155
|
var FilterNode2 = class _FilterNode extends Node {
|
|
17939
18156
|
constructor(props) {
|
|
17940
18157
|
super({ ...props, type: NodeType10.Filter, data: props.data });
|
|
@@ -17967,7 +18184,21 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
17967
18184
|
}
|
|
17968
18185
|
static fromOutputData(outputData) {
|
|
17969
18186
|
const filterOutput = outputData.getFilter();
|
|
17970
|
-
|
|
18187
|
+
if (!filterOutput) {
|
|
18188
|
+
throw new Error("FilterNode output data is missing");
|
|
18189
|
+
}
|
|
18190
|
+
const anyData = filterOutput.getData();
|
|
18191
|
+
if (!anyData) {
|
|
18192
|
+
throw new Error("FilterNode output data.getData() is missing");
|
|
18193
|
+
}
|
|
18194
|
+
const value = Value2.deserializeBinary(anyData.getValue_asU8());
|
|
18195
|
+
const result = value.toJavaScript();
|
|
18196
|
+
if (result && typeof result === "object" && !Array.isArray(result) && result.data) {
|
|
18197
|
+
return result.data;
|
|
18198
|
+
}
|
|
18199
|
+
throw new Error(
|
|
18200
|
+
"FilterNode output data does not contain expected data structure"
|
|
18201
|
+
);
|
|
17971
18202
|
}
|
|
17972
18203
|
};
|
|
17973
18204
|
var filter_default = FilterNode2;
|
|
@@ -18011,18 +18242,18 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
18011
18242
|
});
|
|
18012
18243
|
}
|
|
18013
18244
|
static extractRunnerFromProtobuf(loopNodeData) {
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18245
|
+
const runnerMapping = {
|
|
18246
|
+
restApi: "restApi",
|
|
18247
|
+
customCode: "customCode",
|
|
18248
|
+
ethTransfer: "ethTransfer",
|
|
18249
|
+
contractRead: "contractRead",
|
|
18250
|
+
contractWrite: "contractWrite",
|
|
18251
|
+
graphqlDataQuery: "graphqlDataQuery"
|
|
18252
|
+
};
|
|
18253
|
+
for (const [type, key] of Object.entries(runnerMapping)) {
|
|
18254
|
+
if (loopNodeData[key]) {
|
|
18255
|
+
return { type, data: loopNodeData[key] };
|
|
18256
|
+
}
|
|
18026
18257
|
}
|
|
18027
18258
|
return null;
|
|
18028
18259
|
}
|
|
@@ -18413,7 +18644,6 @@ var Workflow = class _Workflow {
|
|
|
18413
18644
|
if (this.name) {
|
|
18414
18645
|
request.setName(this.name);
|
|
18415
18646
|
}
|
|
18416
|
-
console.log(`\u{1F4E4} Workflow serialization: ${this.nodes.length} nodes, ${this.edges.length} edges -> protobuf: ${request.getNodesList().length} nodes, ${request.getEdgesList().length} edges`);
|
|
18417
18647
|
return request;
|
|
18418
18648
|
}
|
|
18419
18649
|
/**
|
|
@@ -18512,44 +18742,210 @@ var Step = class _Step {
|
|
|
18512
18742
|
return void 0;
|
|
18513
18743
|
// Trigger outputs
|
|
18514
18744
|
case avs_pb20.Execution.Step.OutputDataCase.BLOCK_TRIGGER:
|
|
18515
|
-
|
|
18745
|
+
const blockTrigger = typeof step.getBlockTrigger === "function" ? step.getBlockTrigger()?.toObject() : step.blockTrigger;
|
|
18746
|
+
return { data: blockTrigger };
|
|
18747
|
+
// ✅ Use standard structure
|
|
18516
18748
|
case avs_pb20.Execution.Step.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
18517
|
-
|
|
18749
|
+
const fixedTimeTrigger = typeof step.getFixedTimeTrigger === "function" ? step.getFixedTimeTrigger()?.toObject() : step.fixedTimeTrigger;
|
|
18750
|
+
return { data: fixedTimeTrigger };
|
|
18751
|
+
// ✅ Use standard structure
|
|
18518
18752
|
case avs_pb20.Execution.Step.OutputDataCase.CRON_TRIGGER:
|
|
18519
|
-
|
|
18753
|
+
const cronTrigger = typeof step.getCronTrigger === "function" ? step.getCronTrigger()?.toObject() : step.cronTrigger;
|
|
18754
|
+
return { data: cronTrigger };
|
|
18755
|
+
// ✅ Use standard structure
|
|
18520
18756
|
case avs_pb20.Execution.Step.OutputDataCase.EVENT_TRIGGER:
|
|
18521
18757
|
const eventTrigger = typeof step.getEventTrigger === "function" ? step.getEventTrigger() : step.eventTrigger;
|
|
18522
18758
|
if (eventTrigger) {
|
|
18523
18759
|
if (typeof eventTrigger.hasData === "function" && eventTrigger.hasData()) {
|
|
18524
18760
|
try {
|
|
18525
|
-
|
|
18761
|
+
const eventData = convertProtobufValueToJs(
|
|
18762
|
+
eventTrigger.getData()
|
|
18763
|
+
);
|
|
18764
|
+
return { data: eventData };
|
|
18526
18765
|
} catch (error) {
|
|
18527
18766
|
console.warn(
|
|
18528
18767
|
"Failed to convert event trigger data from protobuf Value:",
|
|
18529
18768
|
error
|
|
18530
18769
|
);
|
|
18531
|
-
return eventTrigger.getData();
|
|
18770
|
+
return { data: eventTrigger.getData() };
|
|
18532
18771
|
}
|
|
18533
18772
|
} else if (eventTrigger.data) {
|
|
18534
|
-
|
|
18773
|
+
const eventData = typeof eventTrigger.data.getKindCase === "function" ? convertProtobufValueToJs(eventTrigger.data) : eventTrigger.data;
|
|
18774
|
+
return { data: eventData };
|
|
18535
18775
|
}
|
|
18536
18776
|
if (typeof eventTrigger.hasEvmLog === "function" && eventTrigger.hasEvmLog()) {
|
|
18537
|
-
return eventTrigger.getEvmLog()?.toObject();
|
|
18777
|
+
return { data: eventTrigger.getEvmLog()?.toObject() };
|
|
18538
18778
|
} else if (typeof eventTrigger.hasTransferLog === "function" && eventTrigger.hasTransferLog()) {
|
|
18539
|
-
return eventTrigger.getTransferLog()?.toObject();
|
|
18779
|
+
return { data: eventTrigger.getTransferLog()?.toObject() };
|
|
18540
18780
|
} else if (eventTrigger.evmLog) {
|
|
18541
|
-
return eventTrigger.evmLog;
|
|
18781
|
+
return { data: eventTrigger.evmLog };
|
|
18542
18782
|
} else if (eventTrigger.transferLog) {
|
|
18543
|
-
return eventTrigger.transferLog;
|
|
18783
|
+
return { data: eventTrigger.transferLog };
|
|
18544
18784
|
}
|
|
18545
18785
|
}
|
|
18546
|
-
return
|
|
18547
|
-
|
|
18548
|
-
|
|
18786
|
+
return { data: null };
|
|
18787
|
+
// ✅ Use standard structure
|
|
18788
|
+
case avs_pb20.Execution.Step.OutputDataCase.MANUAL_TRIGGER: {
|
|
18789
|
+
const manualTrigger = typeof step.getManualTrigger === "function" ? step.getManualTrigger() : step.manualTrigger;
|
|
18790
|
+
if (manualTrigger) {
|
|
18791
|
+
const result = {};
|
|
18792
|
+
if (typeof manualTrigger.hasData === "function" && manualTrigger.hasData()) {
|
|
18793
|
+
try {
|
|
18794
|
+
const userData = convertProtobufValueToJs(
|
|
18795
|
+
manualTrigger.getData()
|
|
18796
|
+
);
|
|
18797
|
+
if (userData && typeof userData === "object" && userData.data !== void 0 && (userData.headers !== void 0 || userData.pathParams !== void 0)) {
|
|
18798
|
+
result.data = userData.data;
|
|
18799
|
+
if (userData.headers) {
|
|
18800
|
+
if (Array.isArray(userData.headers)) {
|
|
18801
|
+
if (userData.headers.length > 0 && Array.isArray(userData.headers[0])) {
|
|
18802
|
+
result.headers = userData.headers;
|
|
18803
|
+
} else {
|
|
18804
|
+
const headersArray = [];
|
|
18805
|
+
for (const header of userData.headers) {
|
|
18806
|
+
for (const [key, value] of Object.entries(header)) {
|
|
18807
|
+
headersArray.push([key, value]);
|
|
18808
|
+
}
|
|
18809
|
+
}
|
|
18810
|
+
result.headers = headersArray;
|
|
18811
|
+
}
|
|
18812
|
+
} else {
|
|
18813
|
+
const headersArray = [];
|
|
18814
|
+
for (const [key, value] of Object.entries(userData.headers)) {
|
|
18815
|
+
headersArray.push([key, value]);
|
|
18816
|
+
}
|
|
18817
|
+
result.headers = headersArray;
|
|
18818
|
+
}
|
|
18819
|
+
}
|
|
18820
|
+
if (userData.pathParams) {
|
|
18821
|
+
if (Array.isArray(userData.pathParams)) {
|
|
18822
|
+
if (userData.pathParams.length > 0 && Array.isArray(userData.pathParams[0])) {
|
|
18823
|
+
result.pathParams = userData.pathParams;
|
|
18824
|
+
} else {
|
|
18825
|
+
const pathParamsArray = [];
|
|
18826
|
+
for (const pathParam of userData.pathParams) {
|
|
18827
|
+
for (const [key, value] of Object.entries(pathParam)) {
|
|
18828
|
+
pathParamsArray.push([key, value]);
|
|
18829
|
+
}
|
|
18830
|
+
}
|
|
18831
|
+
result.pathParams = pathParamsArray;
|
|
18832
|
+
}
|
|
18833
|
+
} else {
|
|
18834
|
+
const pathParamsArray = [];
|
|
18835
|
+
for (const [key, value] of Object.entries(userData.pathParams)) {
|
|
18836
|
+
pathParamsArray.push([key, value]);
|
|
18837
|
+
}
|
|
18838
|
+
result.pathParams = pathParamsArray;
|
|
18839
|
+
}
|
|
18840
|
+
}
|
|
18841
|
+
} else {
|
|
18842
|
+
result.data = userData;
|
|
18843
|
+
}
|
|
18844
|
+
} catch (error) {
|
|
18845
|
+
console.warn(
|
|
18846
|
+
"Failed to convert manual trigger data from protobuf Value:",
|
|
18847
|
+
error
|
|
18848
|
+
);
|
|
18849
|
+
result.data = manualTrigger.getData();
|
|
18850
|
+
}
|
|
18851
|
+
} else if (manualTrigger.data) {
|
|
18852
|
+
const userData = typeof manualTrigger.data.getKindCase === "function" ? convertProtobufValueToJs(manualTrigger.data) : manualTrigger.data;
|
|
18853
|
+
if (userData && typeof userData === "object" && userData.data !== void 0 && (userData.headers !== void 0 || userData.pathParams !== void 0)) {
|
|
18854
|
+
result.data = userData.data;
|
|
18855
|
+
if (userData.headers) {
|
|
18856
|
+
if (Array.isArray(userData.headers)) {
|
|
18857
|
+
if (userData.headers.length > 0 && Array.isArray(userData.headers[0])) {
|
|
18858
|
+
result.headers = userData.headers;
|
|
18859
|
+
} else {
|
|
18860
|
+
const headersArray = [];
|
|
18861
|
+
for (const header of userData.headers) {
|
|
18862
|
+
for (const [key, value] of Object.entries(header)) {
|
|
18863
|
+
headersArray.push([key, value]);
|
|
18864
|
+
}
|
|
18865
|
+
}
|
|
18866
|
+
result.headers = headersArray;
|
|
18867
|
+
}
|
|
18868
|
+
} else {
|
|
18869
|
+
const headersArray = [];
|
|
18870
|
+
for (const [key, value] of Object.entries(userData.headers)) {
|
|
18871
|
+
headersArray.push([key, value]);
|
|
18872
|
+
}
|
|
18873
|
+
result.headers = headersArray;
|
|
18874
|
+
}
|
|
18875
|
+
}
|
|
18876
|
+
if (userData.pathParams) {
|
|
18877
|
+
if (Array.isArray(userData.pathParams)) {
|
|
18878
|
+
if (userData.pathParams.length > 0 && Array.isArray(userData.pathParams[0])) {
|
|
18879
|
+
result.pathParams = userData.pathParams;
|
|
18880
|
+
} else {
|
|
18881
|
+
const pathParamsArray = [];
|
|
18882
|
+
for (const pathParam of userData.pathParams) {
|
|
18883
|
+
for (const [key, value] of Object.entries(pathParam)) {
|
|
18884
|
+
pathParamsArray.push([key, value]);
|
|
18885
|
+
}
|
|
18886
|
+
}
|
|
18887
|
+
result.pathParams = pathParamsArray;
|
|
18888
|
+
}
|
|
18889
|
+
} else {
|
|
18890
|
+
const pathParamsArray = [];
|
|
18891
|
+
for (const [key, value] of Object.entries(userData.pathParams)) {
|
|
18892
|
+
pathParamsArray.push([key, value]);
|
|
18893
|
+
}
|
|
18894
|
+
result.pathParams = pathParamsArray;
|
|
18895
|
+
}
|
|
18896
|
+
}
|
|
18897
|
+
} else {
|
|
18898
|
+
result.data = userData;
|
|
18899
|
+
}
|
|
18900
|
+
}
|
|
18901
|
+
if (typeof manualTrigger.getHeadersMap === "function") {
|
|
18902
|
+
const headersMap = manualTrigger.getHeadersMap();
|
|
18903
|
+
if (headersMap && headersMap.getLength() > 0) {
|
|
18904
|
+
const headersArray = [];
|
|
18905
|
+
headersMap.forEach((value, key) => {
|
|
18906
|
+
headersArray.push([key, value]);
|
|
18907
|
+
});
|
|
18908
|
+
result.headers = headersArray;
|
|
18909
|
+
}
|
|
18910
|
+
} else if (manualTrigger.headers) {
|
|
18911
|
+
const headersArray = [];
|
|
18912
|
+
for (const [key, value] of Object.entries(manualTrigger.headers)) {
|
|
18913
|
+
headersArray.push([key, value]);
|
|
18914
|
+
}
|
|
18915
|
+
result.headers = headersArray;
|
|
18916
|
+
}
|
|
18917
|
+
if (typeof manualTrigger.getPathparamsMap === "function") {
|
|
18918
|
+
const pathParamsMap = manualTrigger.getPathparamsMap();
|
|
18919
|
+
if (pathParamsMap && pathParamsMap.getLength() > 0) {
|
|
18920
|
+
const pathParamsArray = [];
|
|
18921
|
+
pathParamsMap.forEach((value, key) => {
|
|
18922
|
+
pathParamsArray.push([key, value]);
|
|
18923
|
+
});
|
|
18924
|
+
result.pathParams = pathParamsArray;
|
|
18925
|
+
}
|
|
18926
|
+
} else if (manualTrigger.pathparams) {
|
|
18927
|
+
const pathParamsArray = [];
|
|
18928
|
+
for (const [key, value] of Object.entries(manualTrigger.pathparams)) {
|
|
18929
|
+
pathParamsArray.push([key, value]);
|
|
18930
|
+
}
|
|
18931
|
+
result.pathParams = pathParamsArray;
|
|
18932
|
+
}
|
|
18933
|
+
if (Object.keys(result).length === 0) {
|
|
18934
|
+
const objData = manualTrigger.toObject?.() || manualTrigger;
|
|
18935
|
+
if (objData && objData.data === void 0) {
|
|
18936
|
+
result.data = null;
|
|
18937
|
+
} else {
|
|
18938
|
+
return { data: objData };
|
|
18939
|
+
}
|
|
18940
|
+
}
|
|
18941
|
+
return result;
|
|
18942
|
+
}
|
|
18943
|
+
return { data: null };
|
|
18944
|
+
}
|
|
18549
18945
|
// Node outputs - RESTORE MISSING CASES
|
|
18550
18946
|
case avs_pb20.Execution.Step.OutputDataCase.ETH_TRANSFER:
|
|
18551
18947
|
return typeof step.getEthTransfer === "function" ? step.getEthTransfer()?.toObject() : step.ethTransfer;
|
|
18552
|
-
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
18948
|
+
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE: {
|
|
18553
18949
|
const customCodeOutput = typeof step.getCustomCode === "function" ? step.getCustomCode() : step.customCode;
|
|
18554
18950
|
if (customCodeOutput) {
|
|
18555
18951
|
if (typeof customCodeOutput.hasData === "function" && customCodeOutput.hasData()) {
|
|
@@ -18563,7 +18959,8 @@ var Step = class _Step {
|
|
|
18563
18959
|
}
|
|
18564
18960
|
}
|
|
18565
18961
|
return void 0;
|
|
18566
|
-
|
|
18962
|
+
}
|
|
18963
|
+
case avs_pb20.Execution.Step.OutputDataCase.REST_API: {
|
|
18567
18964
|
const restApiOutput = typeof step.getRestApi === "function" ? step.getRestApi() : step.restApi;
|
|
18568
18965
|
if (restApiOutput) {
|
|
18569
18966
|
if (typeof restApiOutput.hasData === "function" && restApiOutput.hasData()) {
|
|
@@ -18577,9 +18974,10 @@ var Step = class _Step {
|
|
|
18577
18974
|
}
|
|
18578
18975
|
}
|
|
18579
18976
|
return void 0;
|
|
18977
|
+
}
|
|
18580
18978
|
case avs_pb20.Execution.Step.OutputDataCase.BRANCH:
|
|
18581
18979
|
return typeof step.getBranch === "function" ? step.getBranch()?.toObject() : step.branch;
|
|
18582
|
-
case avs_pb20.Execution.Step.OutputDataCase.LOOP:
|
|
18980
|
+
case avs_pb20.Execution.Step.OutputDataCase.LOOP: {
|
|
18583
18981
|
const loopOutput = typeof step.getLoop === "function" ? step.getLoop() : step.loop;
|
|
18584
18982
|
if (loopOutput) {
|
|
18585
18983
|
if (typeof loopOutput.getData === "function" && loopOutput.getData()) {
|
|
@@ -18597,7 +18995,8 @@ var Step = class _Step {
|
|
|
18597
18995
|
}
|
|
18598
18996
|
}
|
|
18599
18997
|
return void 0;
|
|
18600
|
-
|
|
18998
|
+
}
|
|
18999
|
+
case avs_pb20.Execution.Step.OutputDataCase.GRAPHQL: {
|
|
18601
19000
|
const graphqlOutput = typeof step.getGraphql === "function" ? step.getGraphql() : step.graphql;
|
|
18602
19001
|
if (graphqlOutput) {
|
|
18603
19002
|
try {
|
|
@@ -18607,7 +19006,8 @@ var Step = class _Step {
|
|
|
18607
19006
|
}
|
|
18608
19007
|
}
|
|
18609
19008
|
return void 0;
|
|
18610
|
-
|
|
19009
|
+
}
|
|
19010
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_READ: {
|
|
18611
19011
|
const contractReadOutput = typeof step.getContractRead === "function" ? step.getContractRead() : step.contractRead;
|
|
18612
19012
|
if (contractReadOutput) {
|
|
18613
19013
|
if (typeof contractReadOutput.hasData === "function" && contractReadOutput.hasData()) {
|
|
@@ -18647,7 +19047,8 @@ var Step = class _Step {
|
|
|
18647
19047
|
return outputObj;
|
|
18648
19048
|
}
|
|
18649
19049
|
return void 0;
|
|
18650
|
-
|
|
19050
|
+
}
|
|
19051
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_WRITE: {
|
|
18651
19052
|
const contractWriteOutput = typeof step.getContractWrite === "function" ? step.getContractWrite() : step.contractWrite;
|
|
18652
19053
|
if (contractWriteOutput) {
|
|
18653
19054
|
if (typeof contractWriteOutput.hasData === "function" && contractWriteOutput.hasData()) {
|
|
@@ -18690,7 +19091,8 @@ var Step = class _Step {
|
|
|
18690
19091
|
return outputObj;
|
|
18691
19092
|
}
|
|
18692
19093
|
return void 0;
|
|
18693
|
-
|
|
19094
|
+
}
|
|
19095
|
+
case avs_pb20.Execution.Step.OutputDataCase.FILTER: {
|
|
18694
19096
|
const filterOutput = typeof step.getFilter === "function" ? step.getFilter() : step.filter;
|
|
18695
19097
|
if (filterOutput) {
|
|
18696
19098
|
try {
|
|
@@ -18700,6 +19102,7 @@ var Step = class _Step {
|
|
|
18700
19102
|
}
|
|
18701
19103
|
}
|
|
18702
19104
|
return void 0;
|
|
19105
|
+
}
|
|
18703
19106
|
default:
|
|
18704
19107
|
console.warn(
|
|
18705
19108
|
`Unhandled output data type in Step.getOutput: ${step.getOutputDataCase()}`
|
|
@@ -19408,7 +19811,22 @@ var Client = class extends BaseClient {
|
|
|
19408
19811
|
case TriggerType13.Manual: {
|
|
19409
19812
|
const manualData = triggerData;
|
|
19410
19813
|
const manualOutput = new avs_pb22.ManualTrigger.Output();
|
|
19411
|
-
if (manualData.
|
|
19814
|
+
if (manualData.data) {
|
|
19815
|
+
const protobufValue = convertJSValueToProtobuf(manualData.data);
|
|
19816
|
+
manualOutput.setData(protobufValue);
|
|
19817
|
+
}
|
|
19818
|
+
if (manualData.headersMap) {
|
|
19819
|
+
const headersMap = manualOutput.getHeadersMap();
|
|
19820
|
+
manualData.headersMap.forEach(([key, value]) => {
|
|
19821
|
+
headersMap.set(key, value);
|
|
19822
|
+
});
|
|
19823
|
+
}
|
|
19824
|
+
if (manualData.pathParamsMap) {
|
|
19825
|
+
const pathParamsMap = manualOutput.getPathparamsMap();
|
|
19826
|
+
manualData.pathParamsMap.forEach(([key, value]) => {
|
|
19827
|
+
pathParamsMap.set(key, value);
|
|
19828
|
+
});
|
|
19829
|
+
}
|
|
19412
19830
|
request.setManualTrigger(manualOutput);
|
|
19413
19831
|
break;
|
|
19414
19832
|
}
|