otomato-sdk 2.0.83 → 2.0.84

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.
@@ -207,6 +207,7 @@ export const TRIGGERS = {
207
207
  {
208
208
  "name": "Mode balance check",
209
209
  "description": "Gets triggered when the MODE balance of vitalik.eth falls below 10,000",
210
+ "externalVariableDescription": "Fetches the MODE balance of vitalik.eth on Mode",
210
211
  "parameters": [
211
212
  {
212
213
  "key": "chainId",
@@ -233,6 +234,7 @@ export const TRIGGERS = {
233
234
  {
234
235
  "name": "Binance balance check",
235
236
  "description": "Gets triggered when the Binance hot wallet balance falls below 7B USDT",
237
+ "externalVariableDescription": "Fetches the USDT balance of Binance hot wallet on Ethereum",
236
238
  "parameters": [
237
239
  {
238
240
  "key": "chainId",
@@ -419,6 +421,7 @@ export const TRIGGERS = {
419
421
  {
420
422
  "name": "ETH > 2850$",
421
423
  "description": "Gets triggered when ETH rises above 2850$ on Base",
424
+ "externalVariableDescription": "Fetches the current ETH price in USD on Base",
422
425
  "parameters": [
423
426
  {
424
427
  "key": "chainId",
@@ -471,6 +474,7 @@ export const TRIGGERS = {
471
474
  {
472
475
  "name": "MODE < 0.01$",
473
476
  "description": "Gets triggered when MODE falls below 0.01$ on Mode Network",
477
+ "externalVariableDescription": "Fetches the current MODE price in USD on Mode",
474
478
  "parameters": [
475
479
  {
476
480
  "key": "chainId",
@@ -532,6 +536,7 @@ export const TRIGGERS = {
532
536
  {
533
537
  "name": "Yield decreasing below 8%",
534
538
  "description": "Gets triggered when the yield is below 8%",
539
+ "externalVariableDescription": "Fetches the current sUSDE staking yield",
535
540
  "parameters": [
536
541
  {
537
542
  "key": "condition",
@@ -592,6 +597,7 @@ export const TRIGGERS = {
592
597
  {
593
598
  "name": "Supply above 3B$",
594
599
  "description": "Gets triggered when the USDE supply is above 3B$",
600
+ "externalVariableDescription": "Fetches the USDE total supply",
595
601
  "parameters": [
596
602
  {
597
603
  "key": "comparisonValue",
@@ -659,6 +665,7 @@ export const TRIGGERS = {
659
665
  {
660
666
  "name": "PT Implied Yield for USUALx Market",
661
667
  "description": "Retrieves the PT implied yield for the USUALx market on Ethereum.",
668
+ "externalVariableDescription": "Fetches the current PT implied yield for USUALx market on Ethereum",
662
669
  "parameters": [
663
670
  {
664
671
  "key": "chainId",
@@ -725,6 +732,7 @@ export const TRIGGERS = {
725
732
  {
726
733
  "name": "USDT Yield is above 5%",
727
734
  "description": "Gets triggered when USDT yield rises above 5% on Ionic",
735
+ "externalVariableDescription": "Fetches the current USDT lending rate on Mode",
728
736
  "parameters": [
729
737
  {
730
738
  "key": "chainId",
@@ -792,6 +800,7 @@ export const TRIGGERS = {
792
800
  {
793
801
  "name": "USDT Borrowing Rate is below 3%",
794
802
  "description": "Gets triggered when the USDT borrowing rate falls below 3% on Ionic",
803
+ "externalVariableDescription": "Fetches the current USDT borrowing rate on Mode",
795
804
  "parameters": [
796
805
  {
797
806
  "key": "chainId",
@@ -957,6 +966,7 @@ export const TRIGGERS = {
957
966
  {
958
967
  "name": "USDC Lending Rate is above 5%",
959
968
  "description": "USDC Lending Rate is above 5% on Base",
969
+ "externalVariableDescription": "Fetches the current USDC lending rate on Base",
960
970
  "parameters": [
961
971
  {
962
972
  "key": "chainId",
@@ -1024,6 +1034,7 @@ export const TRIGGERS = {
1024
1034
  {
1025
1035
  "name": "USDC Borrowing Rate is above 3%",
1026
1036
  "description": "USDC Borrowing Rate is above 3% on Base",
1037
+ "externalVariableDescription": "Fetches the current USDC borrowing rate on Base",
1027
1038
  "parameters": [
1028
1039
  {
1029
1040
  "key": "chainId",
@@ -1103,6 +1114,7 @@ export const TRIGGERS = {
1103
1114
  {
1104
1115
  "name": "USDC Lending Rate is above 5%",
1105
1116
  "description": "USDC Lending Rate is above 5%",
1117
+ "externalVariableDescription": "Fetches the current USDC lending rate on Base",
1106
1118
  "parameters": [
1107
1119
  {
1108
1120
  "key": "chainId",
@@ -1175,6 +1187,7 @@ export const TRIGGERS = {
1175
1187
  {
1176
1188
  "name": "USDC Borrowing Rate is above 3%",
1177
1189
  "description": "USDC Borrowing Rate is above 3%",
1190
+ "externalVariableDescription": "Fetches the current USDC borrowing rate on Base",
1178
1191
  "parameters": [
1179
1192
  {
1180
1193
  "key": "chainId",
@@ -1253,6 +1266,7 @@ export const TRIGGERS = {
1253
1266
  {
1254
1267
  "name": "USDC Yield is above 5%",
1255
1268
  "description": "Gets triggered when USDC yield rises above 5% on Compound",
1269
+ "externalVariableDescription": "Fetches the current USDC lending rate on Base",
1256
1270
  "parameters": [
1257
1271
  {
1258
1272
  "key": "chainId",
@@ -1328,6 +1342,7 @@ export const TRIGGERS = {
1328
1342
  {
1329
1343
  "name": "USDC Borrowing Rate is below 10%",
1330
1344
  "description": "Gets triggered when the USDC borrowing rate falls below 10% on Compound",
1345
+ "externalVariableDescription": "Fetches the current USDC borrowing rate on Base",
1331
1346
  "parameters": [
1332
1347
  {
1333
1348
  "key": "chainId",
@@ -1407,6 +1422,7 @@ export const TRIGGERS = {
1407
1422
  {
1408
1423
  "name": "USDT Lending Rate is above 5%",
1409
1424
  "description": "USDT Lending Rate is above 5%",
1425
+ "externalVariableDescription": "Fetches the current USDT lending rate on Mode",
1410
1426
  "parameters": [
1411
1427
  {
1412
1428
  "key": "chainId",
@@ -1474,6 +1490,7 @@ export const TRIGGERS = {
1474
1490
  {
1475
1491
  "name": "USDT Borrowing Rate is above 3%",
1476
1492
  "description": "USDT Borrowing Rate is above 3%",
1493
+ "externalVariableDescription": "Fetches the current USDT borrowing rate on Mode",
1477
1494
  "parameters": [
1478
1495
  {
1479
1496
  "key": "chainId",
@@ -1550,6 +1567,7 @@ export const TRIGGERS = {
1550
1567
  {
1551
1568
  "name": "USDC Lending Rate is above 5%",
1552
1569
  "description": "USDC Lending Rate is above 5% on Base",
1570
+ "externalVariableDescription": "Fetches the current USDC lending rate on Base",
1553
1571
  "parameters": [
1554
1572
  {
1555
1573
  "key": "chainId",
@@ -1625,6 +1643,7 @@ export const TRIGGERS = {
1625
1643
  {
1626
1644
  "name": "USDC Lending Rate is above 5%",
1627
1645
  "description": "USDC Lending Rate is above 5% on Mainnet",
1646
+ "externalVariableDescription": "Fetches the current WETH lending rate on Ethereum",
1628
1647
  "parameters": [
1629
1648
  {
1630
1649
  "key": "chainId",
@@ -2347,7 +2366,7 @@ export const TRIGGERS = {
2347
2366
  }
2348
2367
  },
2349
2368
  "HYPERLIQUID": {
2350
- "description": "The blockchain to house all finance. Trade, build apps, and launch tokens on the same hyper-performant chain",
2369
+ "description": "Monitor funding rates of any token",
2351
2370
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/hyperliquid.webp",
2352
2371
  "FUNDING_RATE": {
2353
2372
  "name": "Funding rate",
@@ -2572,7 +2591,8 @@ export const TRIGGERS = {
2572
2591
  "examples": [
2573
2592
  {
2574
2593
  "name": "Aave hourly rate above 0.01%",
2575
- "description": "Gets triggered when Aave hourly rate above 0.01%",
2594
+ "description": "Gets triggered when Aave hourly funding rate above 0.01%",
2595
+ "externalVariableDescription": "Gets the AAVE hourly funding rate",
2576
2596
  "parameters": [
2577
2597
  {
2578
2598
  "key": "asset",
@@ -2627,6 +2647,7 @@ export const TRIGGERS = {
2627
2647
  {
2628
2648
  "name": "Market in extreme fear",
2629
2649
  "description": "Gets triggered when the index is below 20",
2650
+ "externalVariableDescription": "Fetches the Bitcoin Fear and Greed Index value",
2630
2651
  "parameters": [
2631
2652
  {
2632
2653
  "key": "condition",
@@ -2741,6 +2762,7 @@ export const TRIGGERS = {
2741
2762
  {
2742
2763
  "name": "AUM above 30B$",
2743
2764
  "description": "Gets triggered when the assets under management are above 30B$",
2765
+ "externalVariableDescription": "Fetches IBIT's current assets under management in USD",
2744
2766
  "parameters": [
2745
2767
  {
2746
2768
  "key": "condition",
@@ -2879,6 +2901,7 @@ export const TRIGGERS = {
2879
2901
  {
2880
2902
  "name": "Gas Price Below 6 Gwei",
2881
2903
  "description": "Triggers when the gas price is below 6 Gwei.",
2904
+ "externalVariableDescription": "Fetches the current Ethereum gas price in Gwei",
2882
2905
  "parameters": [
2883
2906
  {
2884
2907
  "key": "condition",
@@ -3209,6 +3232,70 @@ export const ACTIONS = {
3209
3232
  "blockId": 100015,
3210
3233
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/split.png"
3211
3234
  }
3235
+ },
3236
+ "MATHEMATICS": {
3237
+ "description": "Perform basic mathematical operations between two numbers",
3238
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/mathematics.png",
3239
+ "SPLIT": {
3240
+ "name": "Mathematics",
3241
+ "type": 6,
3242
+ "description": "Perform mathematical operations between two numbers",
3243
+ "output": {
3244
+ "resultAsFloat": "float",
3245
+ "resultAsInteger": "integer"
3246
+ },
3247
+ "parameters": [
3248
+ {
3249
+ "key": "number1",
3250
+ "type": "integer",
3251
+ "description": "First number for the operation",
3252
+ "mandatory": true,
3253
+ "category": 0
3254
+ },
3255
+ {
3256
+ "key": "operator",
3257
+ "type": "math_operators",
3258
+ "description": "Mathematical operator to use",
3259
+ "mandatory": true,
3260
+ "enum": [
3261
+ "Multiply",
3262
+ "Subtract",
3263
+ "Add",
3264
+ "Divide"
3265
+ ],
3266
+ "category": 0
3267
+ },
3268
+ {
3269
+ "key": "number2",
3270
+ "type": "integer",
3271
+ "description": "Second number for the operation",
3272
+ "mandatory": true,
3273
+ "category": 0
3274
+ },
3275
+ ],
3276
+ "examples": [
3277
+ {
3278
+ "name": "Multiply two numbers",
3279
+ "description": "Multiply by 1.1 the AAVE USDC lending rate on Base",
3280
+ "parameters": [
3281
+ {
3282
+ "key": "number1",
3283
+ "value": "{{external.functions.aaveLendingRate(8453,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,,)}}"
3284
+ },
3285
+ {
3286
+ "key": "operator",
3287
+ "value": "Multiply"
3288
+ },
3289
+ {
3290
+ "key": "number2",
3291
+ "value": 1.1
3292
+ }
3293
+ ]
3294
+ }
3295
+ ],
3296
+ "blockId": 100019,
3297
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/mathematics.png"
3298
+ }
3212
3299
  }
3213
3300
  },
3214
3301
  "NOTIFICATIONS": {
@@ -100,6 +100,18 @@ const createSusdeYieldNotification = async () => {
100
100
  const edge = new Edge({ source: trigger, target: notificationAction });
101
101
  return new Workflow('sUSDE yield notification', [trigger, notificationAction], [edge]);
102
102
  };
103
+ const createAAVEBorrowingRateNotificationWorkflow = async () => {
104
+ const trigger = new Trigger(TRIGGERS.LENDING.AAVE.BORROWING_RATES);
105
+ trigger.setCondition('gte');
106
+ trigger.setComparisonValue(5);
107
+ trigger.setChainId(CHAINS.BASE);
108
+ trigger.setParams('asset', getTokenFromSymbol(CHAINS.BASE, 'USDC').contractAddress);
109
+ const notificationAction = new Action(ACTIONS.NOTIFICATIONS.EMAIL.SEND_EMAIL);
110
+ notificationAction.setParams("body", "The USDC borrowing rate on AAVE is above 5%");
111
+ notificationAction.setParams("subject", "AAVE rates increased!");
112
+ const edge = new Edge({ source: trigger, target: notificationAction });
113
+ return new Workflow('AAVE borrowing rate notification', [trigger, notificationAction], [edge]);
114
+ };
103
115
  const copyTradeVitalikOdos = async () => {
104
116
  const trigger = new Trigger(TRIGGERS.DEXES.ODOS.SWAP);
105
117
  trigger.setChainId(CHAINS.MODE);
@@ -250,6 +262,17 @@ export const WORKFLOW_TEMPLATES = [
250
262
  ],
251
263
  createWorkflow: createModeTransferNotificationWorkflow
252
264
  },
265
+ {
266
+ 'name': 'AAVE borrowing rate notification',
267
+ 'description': 'Notify me when the USDC borrowing rate on Base is above 5%',
268
+ 'tags': [WORKFLOW_TEMPLATES_TAGS.ON_CHAIN_MONITORING, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS, WORKFLOW_TEMPLATES_TAGS.YIELD],
269
+ 'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/shortEna.jpg',
270
+ 'image': [
271
+ TRIGGERS.TOKENS.TRANSFER.TRANSFER.image,
272
+ ACTIONS.NOTIFICATIONS.EMAIL.SEND_EMAIL.image
273
+ ],
274
+ createWorkflow: createAAVEBorrowingRateNotificationWorkflow
275
+ },
253
276
  /*{
254
277
  'name': 'Buy ETH when the market sentiment is extremely fearful',
255
278
  'description': 'Buy ETH when the Bitcoin Fear and Greed Index is below 30',
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.82';
1
+ export const SDK_VERSION = '2.0.84';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -81,9 +81,7 @@ export class Workflow {
81
81
  }
82
82
  // CASE A: If no nodeAfter => we create a single edge from nodeBefore to nodeToInsert
83
83
  if (!nodeAfter) {
84
- // Add the new node to the workflow
85
84
  this.addNode(nodeToInsert);
86
- // Create the edge nodeBefore->nodeToInsert
87
85
  const newEdge = new Edge({
88
86
  source: nodeBefore,
89
87
  target: nodeToInsert,
@@ -91,32 +89,29 @@ export class Workflow {
91
89
  value: edgeValueBefore ?? undefined
92
90
  });
93
91
  this.addEdge(newEdge);
94
- // Recalculate positions
95
92
  positionWorkflowNodes(this);
96
93
  return;
97
94
  }
98
- // CASE B: nodeAfter is provided => we expect an edge nodeBefore->nodeAfter to exist
95
+ // CASE B: nodeAfter is provided => we expect edge(s) nodeBefore->nodeAfter to exist
99
96
  if (!this.nodes.includes(nodeAfter)) {
100
97
  throw new Error('The nodeAfter must exist in the workflow.');
101
98
  }
102
- // Find the existing edge nodeBefore->nodeAfter
103
- const edgeBetween = this.edges.find((edge) => edge.source === nodeBefore && edge.target === nodeAfter);
104
- if (!edgeBetween) {
99
+ // Find all existing edges between nodeBefore and nodeAfter
100
+ const edgesBetween = this.edges.filter((edge) => edge.source === nodeBefore && edge.target === nodeAfter);
101
+ if (edgesBetween.length === 0) {
105
102
  throw new Error('No edge exists between nodeBefore and nodeAfter.');
106
103
  }
107
104
  // Add the new node to the workflow
108
105
  this.addNode(nodeToInsert);
109
- // Remove the existing edge between nodeBefore and nodeAfter
110
- this.edges = this.edges.filter((edge) => edge !== edgeBetween);
106
+ // Remove all existing edges between nodeBefore and nodeAfter
107
+ this.edges = this.edges.filter((edge) => !edgesBetween.includes(edge));
111
108
  // Create the two new edges:
112
- // 1) nodeBefore->nodeToInsert
113
109
  const newEdge1 = new Edge({
114
110
  source: nodeBefore,
115
111
  target: nodeToInsert,
116
112
  label: edgeLabelBefore ?? undefined,
117
113
  value: edgeValueBefore ?? undefined
118
114
  });
119
- // 2) nodeToInsert->nodeAfter
120
115
  const newEdge2 = new Edge({
121
116
  source: nodeToInsert,
122
117
  target: nodeAfter,
@@ -124,7 +119,6 @@ export class Workflow {
124
119
  value: edgeValueAfter ?? undefined
125
120
  });
126
121
  this.addEdges([newEdge1, newEdge2]);
127
- // Recalculate positions
128
122
  positionWorkflowNodes(this);
129
123
  }
130
124
  insertCondition(nodeToInsert, nodeBefore, nodeAfter, addElseCase, addEmptyNodes = true) {
@@ -163,7 +157,7 @@ export class Workflow {
163
157
  *
164
158
  * @param nodeToInsert The split node to insert (e.g. type="Split").
165
159
  * @param nodeBefore The node after which the split is inserted.
166
- * @param nodeAfter (Optional) If were splitting in the middle of a flow, the node that was originally after `nodeBefore`.
160
+ * @param nodeAfter (Optional) If we're splitting in the middle of a flow, the node that was originally after `nodeBefore`.
167
161
  * @param numberOfBranches The total number of branches to create from `nodeToInsert`.
168
162
  */
169
163
  insertSplit(nodeToInsert, nodeBefore, nodeAfter, numberOfBranches) {
@@ -92,6 +92,7 @@ export declare const TRIGGERS: {
92
92
  examples: {
93
93
  name: string;
94
94
  description: string;
95
+ externalVariableDescription: string;
95
96
  parameters: ({
96
97
  key: string;
97
98
  value: number;
@@ -158,9 +159,10 @@ export declare const TRIGGERS: {
158
159
  price: string;
159
160
  };
160
161
  parameters: Parameter[];
161
- examples: {
162
+ examples: ({
162
163
  name: string;
163
164
  description: string;
165
+ externalVariableDescription: string;
164
166
  parameters: ({
165
167
  key: string;
166
168
  value: number;
@@ -168,7 +170,18 @@ export declare const TRIGGERS: {
168
170
  key: string;
169
171
  value: string;
170
172
  })[];
171
- }[];
173
+ } | {
174
+ name: string;
175
+ description: string;
176
+ parameters: ({
177
+ key: string;
178
+ value: number;
179
+ } | {
180
+ key: string;
181
+ value: string;
182
+ })[];
183
+ externalVariableDescription?: undefined;
184
+ })[];
172
185
  blockId: number;
173
186
  image: string;
174
187
  };
@@ -187,9 +200,10 @@ export declare const TRIGGERS: {
187
200
  yield: string;
188
201
  };
189
202
  parameters: Parameter[];
190
- examples: {
203
+ examples: ({
191
204
  name: string;
192
205
  description: string;
206
+ externalVariableDescription: string;
193
207
  parameters: ({
194
208
  key: string;
195
209
  value: string;
@@ -197,7 +211,18 @@ export declare const TRIGGERS: {
197
211
  key: string;
198
212
  value: number;
199
213
  })[];
200
- }[];
214
+ } | {
215
+ name: string;
216
+ description: string;
217
+ parameters: ({
218
+ key: string;
219
+ value: string;
220
+ } | {
221
+ key: string;
222
+ value: number;
223
+ })[];
224
+ externalVariableDescription?: undefined;
225
+ })[];
201
226
  blockId: number;
202
227
  image: string;
203
228
  };
@@ -216,6 +241,7 @@ export declare const TRIGGERS: {
216
241
  examples: {
217
242
  name: string;
218
243
  description: string;
244
+ externalVariableDescription: string;
219
245
  parameters: ({
220
246
  key: string;
221
247
  value: number;
@@ -245,6 +271,7 @@ export declare const TRIGGERS: {
245
271
  examples: {
246
272
  name: string;
247
273
  description: string;
274
+ externalVariableDescription: string;
248
275
  parameters: ({
249
276
  key: string;
250
277
  value: number;
@@ -273,6 +300,7 @@ export declare const TRIGGERS: {
273
300
  examples: {
274
301
  name: string;
275
302
  description: string;
303
+ externalVariableDescription: string;
276
304
  parameters: ({
277
305
  key: string;
278
306
  value: number;
@@ -297,6 +325,7 @@ export declare const TRIGGERS: {
297
325
  examples: {
298
326
  name: string;
299
327
  description: string;
328
+ externalVariableDescription: string;
300
329
  parameters: ({
301
330
  key: string;
302
331
  value: number;
@@ -360,6 +389,7 @@ export declare const TRIGGERS: {
360
389
  examples: {
361
390
  name: string;
362
391
  description: string;
392
+ externalVariableDescription: string;
363
393
  parameters: ({
364
394
  key: string;
365
395
  value: number;
@@ -384,6 +414,7 @@ export declare const TRIGGERS: {
384
414
  examples: {
385
415
  name: string;
386
416
  description: string;
417
+ externalVariableDescription: string;
387
418
  parameters: ({
388
419
  key: string;
389
420
  value: number;
@@ -418,6 +449,7 @@ export declare const TRIGGERS: {
418
449
  examples: {
419
450
  name: string;
420
451
  description: string;
452
+ externalVariableDescription: string;
421
453
  parameters: ({
422
454
  key: string;
423
455
  value: number;
@@ -447,6 +479,7 @@ export declare const TRIGGERS: {
447
479
  examples: {
448
480
  name: string;
449
481
  description: string;
482
+ externalVariableDescription: string;
450
483
  parameters: ({
451
484
  key: string;
452
485
  value: number;
@@ -473,6 +506,7 @@ export declare const TRIGGERS: {
473
506
  examples: {
474
507
  name: string;
475
508
  description: string;
509
+ externalVariableDescription: string;
476
510
  parameters: ({
477
511
  key: string;
478
512
  value: number;
@@ -498,6 +532,7 @@ export declare const TRIGGERS: {
498
532
  examples: {
499
533
  name: string;
500
534
  description: string;
535
+ externalVariableDescription: string;
501
536
  parameters: ({
502
537
  key: string;
503
538
  value: number;
@@ -531,6 +566,7 @@ export declare const TRIGGERS: {
531
566
  examples: {
532
567
  name: string;
533
568
  description: string;
569
+ externalVariableDescription: string;
534
570
  parameters: ({
535
571
  key: string;
536
572
  value: number;
@@ -555,6 +591,7 @@ export declare const TRIGGERS: {
555
591
  examples: {
556
592
  name: string;
557
593
  description: string;
594
+ externalVariableDescription: string;
558
595
  parameters: ({
559
596
  key: string;
560
597
  value: number;
@@ -584,6 +621,7 @@ export declare const TRIGGERS: {
584
621
  examples: {
585
622
  name: string;
586
623
  description: string;
624
+ externalVariableDescription: string;
587
625
  parameters: ({
588
626
  key: string;
589
627
  value: number;
@@ -613,6 +651,7 @@ export declare const TRIGGERS: {
613
651
  examples: {
614
652
  name: string;
615
653
  description: string;
654
+ externalVariableDescription: string;
616
655
  parameters: ({
617
656
  key: string;
618
657
  value: number;
@@ -1000,6 +1039,7 @@ export declare const TRIGGERS: {
1000
1039
  examples: {
1001
1040
  name: string;
1002
1041
  description: string;
1042
+ externalVariableDescription: string;
1003
1043
  parameters: ({
1004
1044
  key: string;
1005
1045
  value: string;
@@ -1027,9 +1067,10 @@ export declare const TRIGGERS: {
1027
1067
  value: string;
1028
1068
  };
1029
1069
  parameters: Parameter[];
1030
- examples: {
1070
+ examples: ({
1031
1071
  name: string;
1032
1072
  description: string;
1073
+ externalVariableDescription: string;
1033
1074
  parameters: ({
1034
1075
  key: string;
1035
1076
  value: string;
@@ -1037,7 +1078,18 @@ export declare const TRIGGERS: {
1037
1078
  key: string;
1038
1079
  value: number;
1039
1080
  })[];
1040
- }[];
1081
+ } | {
1082
+ name: string;
1083
+ description: string;
1084
+ parameters: ({
1085
+ key: string;
1086
+ value: string;
1087
+ } | {
1088
+ key: string;
1089
+ value: number;
1090
+ })[];
1091
+ externalVariableDescription?: undefined;
1092
+ })[];
1041
1093
  blockId: number;
1042
1094
  image: string;
1043
1095
  };
@@ -1086,9 +1138,10 @@ export declare const TRIGGERS: {
1086
1138
  asset_under_management: string;
1087
1139
  };
1088
1140
  parameters: Parameter[];
1089
- examples: {
1141
+ examples: ({
1090
1142
  name: string;
1091
1143
  description: string;
1144
+ externalVariableDescription: string;
1092
1145
  parameters: ({
1093
1146
  key: string;
1094
1147
  value: string;
@@ -1096,7 +1149,18 @@ export declare const TRIGGERS: {
1096
1149
  key: string;
1097
1150
  value: number;
1098
1151
  })[];
1099
- }[];
1152
+ } | {
1153
+ name: string;
1154
+ description: string;
1155
+ parameters: ({
1156
+ key: string;
1157
+ value: string;
1158
+ } | {
1159
+ key: string;
1160
+ value: number;
1161
+ })[];
1162
+ externalVariableDescription?: undefined;
1163
+ })[];
1100
1164
  blockId: number;
1101
1165
  image: string;
1102
1166
  };
@@ -1156,14 +1220,23 @@ export declare const TRIGGERS: {
1156
1220
  gasPrice: string;
1157
1221
  };
1158
1222
  parameters: Parameter[];
1159
- examples: {
1223
+ examples: ({
1160
1224
  name: string;
1161
1225
  description: string;
1226
+ externalVariableDescription: string;
1162
1227
  parameters: {
1163
1228
  key: string;
1164
1229
  value: string;
1165
1230
  }[];
1166
- }[];
1231
+ } | {
1232
+ name: string;
1233
+ description: string;
1234
+ parameters: {
1235
+ key: string;
1236
+ value: string;
1237
+ }[];
1238
+ externalVariableDescription?: undefined;
1239
+ })[];
1167
1240
  blockId: number;
1168
1241
  image: string;
1169
1242
  };
@@ -1331,6 +1404,33 @@ export declare const ACTIONS: {
1331
1404
  image: string;
1332
1405
  };
1333
1406
  };
1407
+ MATHEMATICS: {
1408
+ description: string;
1409
+ image: string;
1410
+ SPLIT: {
1411
+ name: string;
1412
+ type: number;
1413
+ description: string;
1414
+ output: {
1415
+ resultAsFloat: string;
1416
+ resultAsInteger: string;
1417
+ };
1418
+ parameters: Parameter[];
1419
+ examples: {
1420
+ name: string;
1421
+ description: string;
1422
+ parameters: ({
1423
+ key: string;
1424
+ value: string;
1425
+ } | {
1426
+ key: string;
1427
+ value: number;
1428
+ })[];
1429
+ }[];
1430
+ blockId: number;
1431
+ image: string;
1432
+ };
1433
+ };
1334
1434
  };
1335
1435
  NOTIFICATIONS: {
1336
1436
  EMAIL: {
@@ -21,14 +21,23 @@ export declare const WORKFLOW_TEMPLATES: ({
21
21
  gasPrice: string;
22
22
  };
23
23
  parameters: import("../index.js").Parameter[];
24
- examples: {
24
+ examples: ({
25
25
  name: string;
26
26
  description: string;
27
+ externalVariableDescription: string;
27
28
  parameters: {
28
29
  key: string;
29
30
  value: string;
30
31
  }[];
31
- }[];
32
+ } | {
33
+ name: string;
34
+ description: string;
35
+ parameters: {
36
+ key: string;
37
+ value: string;
38
+ }[];
39
+ externalVariableDescription?: undefined;
40
+ })[];
32
41
  blockId: number;
33
42
  image: string;
34
43
  })[];
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.82";
1
+ export declare const SDK_VERSION = "2.0.84";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
@@ -55,7 +55,7 @@ export declare class Workflow {
55
55
  *
56
56
  * @param nodeToInsert The split node to insert (e.g. type="Split").
57
57
  * @param nodeBefore The node after which the split is inserted.
58
- * @param nodeAfter (Optional) If were splitting in the middle of a flow, the node that was originally after `nodeBefore`.
58
+ * @param nodeAfter (Optional) If we're splitting in the middle of a flow, the node that was originally after `nodeBefore`.
59
59
  * @param numberOfBranches The total number of branches to create from `nodeToInsert`.
60
60
  */
61
61
  insertSplit(nodeToInsert: Node, nodeBefore: Node, nodeAfter: Node | undefined, numberOfBranches: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.83",
3
+ "version": "2.0.84",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/types/src/index.d.ts",