@avaprotocol/sdk-js 2.3.0 → 2.3.4

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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 2.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 9c7c1e0: Updated CronTrigger’s scheduleList to schedules
8
+ - Updated dependencies [9c7c1e0]
9
+ - @avaprotocol/types@2.2.4
10
+
11
+ ## 2.3.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [38ade5e]
16
+ - @avaprotocol/types@2.2.3
17
+
18
+ ## 2.3.2
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [2baed44]
23
+ - @avaprotocol/types@2.2.2
24
+
25
+ ## 2.3.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [07c05b4]
30
+ - @avaprotocol/types@2.2.1
31
+
3
32
  ## 2.3.0
4
33
 
5
34
  ### Minor Changes
package/dist/index.js CHANGED
@@ -1607,7 +1607,7 @@ var require_avs_pb = __commonJS({
1607
1607
  };
1608
1608
  proto.aggregator.CronTrigger.Config.toObject = function(includeInstance, msg) {
1609
1609
  var f, obj = {
1610
- scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f
1610
+ schedulesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f
1611
1611
  };
1612
1612
  if (includeInstance) {
1613
1613
  obj.$jspbMessageInstance = msg;
@@ -1632,7 +1632,7 @@ var require_avs_pb = __commonJS({
1632
1632
  /** @type {string} */
1633
1633
  reader.readString()
1634
1634
  );
1635
- msg.addSchedule(value);
1635
+ msg.addSchedules(value);
1636
1636
  break;
1637
1637
  default:
1638
1638
  reader.skipField();
@@ -1648,7 +1648,7 @@ var require_avs_pb = __commonJS({
1648
1648
  };
1649
1649
  proto.aggregator.CronTrigger.Config.serializeBinaryToWriter = function(message, writer) {
1650
1650
  var f = void 0;
1651
- f = message.getScheduleList();
1651
+ f = message.getSchedulesList();
1652
1652
  if (f.length > 0) {
1653
1653
  writer.writeRepeatedString(
1654
1654
  1,
@@ -1656,20 +1656,20 @@ var require_avs_pb = __commonJS({
1656
1656
  );
1657
1657
  }
1658
1658
  };
1659
- proto.aggregator.CronTrigger.Config.prototype.getScheduleList = function() {
1659
+ proto.aggregator.CronTrigger.Config.prototype.getSchedulesList = function() {
1660
1660
  return (
1661
1661
  /** @type {!Array<string>} */
1662
1662
  jspb.Message.getRepeatedField(this, 1)
1663
1663
  );
1664
1664
  };
1665
- proto.aggregator.CronTrigger.Config.prototype.setScheduleList = function(value) {
1665
+ proto.aggregator.CronTrigger.Config.prototype.setSchedulesList = function(value) {
1666
1666
  return jspb.Message.setField(this, 1, value || []);
1667
1667
  };
1668
- proto.aggregator.CronTrigger.Config.prototype.addSchedule = function(value, opt_index) {
1668
+ proto.aggregator.CronTrigger.Config.prototype.addSchedules = function(value, opt_index) {
1669
1669
  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1670
1670
  };
1671
- proto.aggregator.CronTrigger.Config.prototype.clearScheduleList = function() {
1672
- return this.setScheduleList([]);
1671
+ proto.aggregator.CronTrigger.Config.prototype.clearSchedulesList = function() {
1672
+ return this.setSchedulesList([]);
1673
1673
  };
1674
1674
  if (jspb.Message.GENERATE_TO_OBJECT) {
1675
1675
  proto.aggregator.CronTrigger.Output.prototype.toObject = function(opt_includeInstance) {
@@ -16213,19 +16213,19 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
16213
16213
  }
16214
16214
  const trigger = new avs_pb3.CronTrigger();
16215
16215
  const config = new avs_pb3.CronTrigger.Config();
16216
- config.setScheduleList(this.data.scheduleList || []);
16216
+ config.setSchedulesList(this.data.schedules || []);
16217
16217
  trigger.setConfig(config);
16218
16218
  request.setCron(trigger);
16219
16219
  return request;
16220
16220
  }
16221
16221
  static fromResponse(raw) {
16222
16222
  const obj = raw.toObject();
16223
- let data = { scheduleList: [] };
16223
+ let data = { schedules: [] };
16224
16224
  if (raw.getCron() && raw.getCron().hasConfig()) {
16225
16225
  const config = raw.getCron().getConfig();
16226
16226
  if (config) {
16227
16227
  data = {
16228
- scheduleList: config.getScheduleList() || []
16228
+ schedules: config.getSchedulesList() || []
16229
16229
  };
16230
16230
  }
16231
16231
  }
package/dist/index.mjs CHANGED
@@ -1607,7 +1607,7 @@ var require_avs_pb = __commonJS({
1607
1607
  };
1608
1608
  proto.aggregator.CronTrigger.Config.toObject = function(includeInstance, msg) {
1609
1609
  var f, obj = {
1610
- scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f
1610
+ schedulesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f
1611
1611
  };
1612
1612
  if (includeInstance) {
1613
1613
  obj.$jspbMessageInstance = msg;
@@ -1632,7 +1632,7 @@ var require_avs_pb = __commonJS({
1632
1632
  /** @type {string} */
1633
1633
  reader.readString()
1634
1634
  );
1635
- msg.addSchedule(value);
1635
+ msg.addSchedules(value);
1636
1636
  break;
1637
1637
  default:
1638
1638
  reader.skipField();
@@ -1648,7 +1648,7 @@ var require_avs_pb = __commonJS({
1648
1648
  };
1649
1649
  proto.aggregator.CronTrigger.Config.serializeBinaryToWriter = function(message, writer) {
1650
1650
  var f = void 0;
1651
- f = message.getScheduleList();
1651
+ f = message.getSchedulesList();
1652
1652
  if (f.length > 0) {
1653
1653
  writer.writeRepeatedString(
1654
1654
  1,
@@ -1656,20 +1656,20 @@ var require_avs_pb = __commonJS({
1656
1656
  );
1657
1657
  }
1658
1658
  };
1659
- proto.aggregator.CronTrigger.Config.prototype.getScheduleList = function() {
1659
+ proto.aggregator.CronTrigger.Config.prototype.getSchedulesList = function() {
1660
1660
  return (
1661
1661
  /** @type {!Array<string>} */
1662
1662
  jspb.Message.getRepeatedField(this, 1)
1663
1663
  );
1664
1664
  };
1665
- proto.aggregator.CronTrigger.Config.prototype.setScheduleList = function(value) {
1665
+ proto.aggregator.CronTrigger.Config.prototype.setSchedulesList = function(value) {
1666
1666
  return jspb.Message.setField(this, 1, value || []);
1667
1667
  };
1668
- proto.aggregator.CronTrigger.Config.prototype.addSchedule = function(value, opt_index) {
1668
+ proto.aggregator.CronTrigger.Config.prototype.addSchedules = function(value, opt_index) {
1669
1669
  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1670
1670
  };
1671
- proto.aggregator.CronTrigger.Config.prototype.clearScheduleList = function() {
1672
- return this.setScheduleList([]);
1671
+ proto.aggregator.CronTrigger.Config.prototype.clearSchedulesList = function() {
1672
+ return this.setSchedulesList([]);
1673
1673
  };
1674
1674
  if (jspb.Message.GENERATE_TO_OBJECT) {
1675
1675
  proto.aggregator.CronTrigger.Output.prototype.toObject = function(opt_includeInstance) {
@@ -16183,19 +16183,19 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
16183
16183
  }
16184
16184
  const trigger = new avs_pb3.CronTrigger();
16185
16185
  const config = new avs_pb3.CronTrigger.Config();
16186
- config.setScheduleList(this.data.scheduleList || []);
16186
+ config.setSchedulesList(this.data.schedules || []);
16187
16187
  trigger.setConfig(config);
16188
16188
  request.setCron(trigger);
16189
16189
  return request;
16190
16190
  }
16191
16191
  static fromResponse(raw) {
16192
16192
  const obj = raw.toObject();
16193
- let data = { scheduleList: [] };
16193
+ let data = { schedules: [] };
16194
16194
  if (raw.getCron() && raw.getCron().hasConfig()) {
16195
16195
  const config = raw.getCron().getConfig();
16196
16196
  if (config) {
16197
16197
  data = {
16198
- scheduleList: config.getScheduleList() || []
16198
+ schedules: config.getSchedulesList() || []
16199
16199
  };
16200
16200
  }
16201
16201
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAoC,iBAAiB,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAKzH,cAAM,WAAY,SAAQ,OAAO;gBACnB,KAAK,EAAE,gBAAgB;IAInC,SAAS,IAAI,MAAM,CAAC,WAAW;IAoB/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,WAAW;IAuBzD;;;;OAIG;IACH,SAAS,IAAI,iBAAiB,GAAG,SAAS;IAI1C;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAoC,iBAAiB,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAEzH,cAAM,WAAY,SAAQ,OAAO;gBACnB,KAAK,EAAE,gBAAgB;IAInC,SAAS,IAAI,MAAM,CAAC,WAAW;IAoB/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,WAAW;IAuBzD;;;;OAIG;IACH,SAAS,IAAI,iBAAiB,GAAG,SAAS;IAI1C;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,WAAW,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
2
  import Trigger from "./interface";
3
3
  import { TriggerType } from "@avaprotocol/types";
4
- // Required props for constructor: id, name, type and data: { scheduleList }
5
4
  class CronTrigger extends Trigger {
6
5
  constructor(props) {
7
6
  super({ ...props, type: TriggerType.Cron, data: props.data });
@@ -16,7 +15,7 @@ class CronTrigger extends Trigger {
16
15
  }
17
16
  const trigger = new avs_pb.CronTrigger();
18
17
  const config = new avs_pb.CronTrigger.Config();
19
- config.setScheduleList(this.data.scheduleList || []);
18
+ config.setSchedulesList(this.data.schedules || []);
20
19
  trigger.setConfig(config);
21
20
  request.setCron(trigger);
22
21
  return request;
@@ -24,12 +23,12 @@ class CronTrigger extends Trigger {
24
23
  static fromResponse(raw) {
25
24
  // Convert the raw object to TriggerProps, which should keep name and id
26
25
  const obj = raw.toObject();
27
- let data = { scheduleList: [] };
26
+ let data = { schedules: [] };
28
27
  if (raw.getCron() && raw.getCron().hasConfig()) {
29
28
  const config = raw.getCron().getConfig();
30
29
  if (config) {
31
30
  data = {
32
- scheduleList: config.getScheduleList() || []
31
+ schedules: config.getSchedulesList() || []
33
32
  };
34
33
  }
35
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.3.0",
3
+ "version": "2.3.4",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",