clarifai-web-grpc 11.1.1 → 11.1.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 11.1.1
1
+ 11.1.3
@@ -11487,7 +11487,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
11487
11487
  hitsList: jspb.Message.toObjectList(msg.getHitsList(), proto.clarifai.api.Hit.toObject, includeInstance),
11488
11488
  heatmapsList: jspb.Message.toObjectList(msg.getHeatmapsList(), proto.clarifai.api.Image.toObject, includeInstance),
11489
11489
  partsList: jspb.Message.toObjectList(msg.getPartsList(), proto.clarifai.api.Part.toObject, includeInstance),
11490
- ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f)
11490
+ ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f),
11491
+ intValue: jspb.Message.getFieldWithDefault(msg, 21, 0),
11492
+ floatValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 22, 0.0),
11493
+ bytesValue: msg.getBytesValue_asB64(),
11494
+ boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 24, false),
11495
+ stringValue: jspb.Message.getFieldWithDefault(msg, 25, "")
11491
11496
  };
11492
11497
  if (includeInstance) {
11493
11498
  obj.$jspbMessageInstance = msg;
@@ -11609,6 +11614,26 @@ proto.clarifai.api.Data.deserializeBinaryFromReader = function (msg, reader) {
11609
11614
  reader.readMessage(value, proto.clarifai.api.NDArray.deserializeBinaryFromReader);
11610
11615
  msg.setNdarray(value);
11611
11616
  break;
11617
+ case 21:
11618
+ var value = /** @type {number} */ (reader.readInt64());
11619
+ msg.setIntValue(value);
11620
+ break;
11621
+ case 22:
11622
+ var value = /** @type {number} */ (reader.readDouble());
11623
+ msg.setFloatValue(value);
11624
+ break;
11625
+ case 23:
11626
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
11627
+ msg.setBytesValue(value);
11628
+ break;
11629
+ case 24:
11630
+ var value = /** @type {boolean} */ (reader.readBool());
11631
+ msg.setBoolValue(value);
11632
+ break;
11633
+ case 25:
11634
+ var value = /** @type {string} */ (reader.readString());
11635
+ msg.setStringValue(value);
11636
+ break;
11612
11637
  default:
11613
11638
  reader.skipField();
11614
11639
  break;
@@ -11706,6 +11731,26 @@ proto.clarifai.api.Data.serializeBinaryToWriter = function (message, writer) {
11706
11731
  if (f != null) {
11707
11732
  writer.writeMessage(20, f, proto.clarifai.api.NDArray.serializeBinaryToWriter);
11708
11733
  }
11734
+ f = message.getIntValue();
11735
+ if (f !== 0) {
11736
+ writer.writeInt64(21, f);
11737
+ }
11738
+ f = message.getFloatValue();
11739
+ if (f !== 0.0) {
11740
+ writer.writeDouble(22, f);
11741
+ }
11742
+ f = message.getBytesValue_asU8();
11743
+ if (f.length > 0) {
11744
+ writer.writeBytes(23, f);
11745
+ }
11746
+ f = message.getBoolValue();
11747
+ if (f) {
11748
+ writer.writeBool(24, f);
11749
+ }
11750
+ f = message.getStringValue();
11751
+ if (f.length > 0) {
11752
+ writer.writeString(25, f);
11753
+ }
11709
11754
  };
11710
11755
  /**
11711
11756
  * optional Image image = 1;
@@ -12222,6 +12267,94 @@ proto.clarifai.api.Data.prototype.clearNdarray = function () {
12222
12267
  proto.clarifai.api.Data.prototype.hasNdarray = function () {
12223
12268
  return jspb.Message.getField(this, 20) != null;
12224
12269
  };
12270
+ /**
12271
+ * optional int64 int_value = 21;
12272
+ * @return {number}
12273
+ */
12274
+ proto.clarifai.api.Data.prototype.getIntValue = function () {
12275
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0));
12276
+ };
12277
+ /**
12278
+ * @param {number} value
12279
+ * @return {!proto.clarifai.api.Data} returns this
12280
+ */
12281
+ proto.clarifai.api.Data.prototype.setIntValue = function (value) {
12282
+ return jspb.Message.setProto3IntField(this, 21, value);
12283
+ };
12284
+ /**
12285
+ * optional double float_value = 22;
12286
+ * @return {number}
12287
+ */
12288
+ proto.clarifai.api.Data.prototype.getFloatValue = function () {
12289
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 22, 0.0));
12290
+ };
12291
+ /**
12292
+ * @param {number} value
12293
+ * @return {!proto.clarifai.api.Data} returns this
12294
+ */
12295
+ proto.clarifai.api.Data.prototype.setFloatValue = function (value) {
12296
+ return jspb.Message.setProto3FloatField(this, 22, value);
12297
+ };
12298
+ /**
12299
+ * optional bytes bytes_value = 23;
12300
+ * @return {string}
12301
+ */
12302
+ proto.clarifai.api.Data.prototype.getBytesValue = function () {
12303
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, ""));
12304
+ };
12305
+ /**
12306
+ * optional bytes bytes_value = 23;
12307
+ * This is a type-conversion wrapper around `getBytesValue()`
12308
+ * @return {string}
12309
+ */
12310
+ proto.clarifai.api.Data.prototype.getBytesValue_asB64 = function () {
12311
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBytesValue()));
12312
+ };
12313
+ /**
12314
+ * optional bytes bytes_value = 23;
12315
+ * Note that Uint8Array is not supported on all browsers.
12316
+ * @see http://caniuse.com/Uint8Array
12317
+ * This is a type-conversion wrapper around `getBytesValue()`
12318
+ * @return {!Uint8Array}
12319
+ */
12320
+ proto.clarifai.api.Data.prototype.getBytesValue_asU8 = function () {
12321
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBytesValue()));
12322
+ };
12323
+ /**
12324
+ * @param {!(string|Uint8Array)} value
12325
+ * @return {!proto.clarifai.api.Data} returns this
12326
+ */
12327
+ proto.clarifai.api.Data.prototype.setBytesValue = function (value) {
12328
+ return jspb.Message.setProto3BytesField(this, 23, value);
12329
+ };
12330
+ /**
12331
+ * optional bool bool_value = 24;
12332
+ * @return {boolean}
12333
+ */
12334
+ proto.clarifai.api.Data.prototype.getBoolValue = function () {
12335
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 24, false));
12336
+ };
12337
+ /**
12338
+ * @param {boolean} value
12339
+ * @return {!proto.clarifai.api.Data} returns this
12340
+ */
12341
+ proto.clarifai.api.Data.prototype.setBoolValue = function (value) {
12342
+ return jspb.Message.setProto3BooleanField(this, 24, value);
12343
+ };
12344
+ /**
12345
+ * optional string string_value = 25;
12346
+ * @return {string}
12347
+ */
12348
+ proto.clarifai.api.Data.prototype.getStringValue = function () {
12349
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, ""));
12350
+ };
12351
+ /**
12352
+ * @param {string} value
12353
+ * @return {!proto.clarifai.api.Data} returns this
12354
+ */
12355
+ proto.clarifai.api.Data.prototype.setStringValue = function (value) {
12356
+ return jspb.Message.setProto3StringField(this, 25, value);
12357
+ };
12225
12358
  if (jspb.Message.GENERATE_TO_OBJECT) {
12226
12359
  /**
12227
12360
  * Creates an object representation of this proto.
@@ -12249,7 +12382,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
12249
12382
  */
12250
12383
  proto.clarifai.api.Part.toObject = function (includeInstance, msg) {
12251
12384
  var f, obj = {
12252
- data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f)
12385
+ data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f),
12386
+ id: jspb.Message.getFieldWithDefault(msg, 2, "")
12253
12387
  };
12254
12388
  if (includeInstance) {
12255
12389
  obj.$jspbMessageInstance = msg;
@@ -12286,6 +12420,10 @@ proto.clarifai.api.Part.deserializeBinaryFromReader = function (msg, reader) {
12286
12420
  reader.readMessage(value, proto.clarifai.api.Data.deserializeBinaryFromReader);
12287
12421
  msg.setData(value);
12288
12422
  break;
12423
+ case 2:
12424
+ var value = /** @type {string} */ (reader.readString());
12425
+ msg.setId(value);
12426
+ break;
12289
12427
  default:
12290
12428
  reader.skipField();
12291
12429
  break;
@@ -12315,6 +12453,10 @@ proto.clarifai.api.Part.serializeBinaryToWriter = function (message, writer) {
12315
12453
  if (f != null) {
12316
12454
  writer.writeMessage(1, f, proto.clarifai.api.Data.serializeBinaryToWriter);
12317
12455
  }
12456
+ f = message.getId();
12457
+ if (f.length > 0) {
12458
+ writer.writeString(2, f);
12459
+ }
12318
12460
  };
12319
12461
  /**
12320
12462
  * optional Data data = 1;
@@ -12344,6 +12486,20 @@ proto.clarifai.api.Part.prototype.clearData = function () {
12344
12486
  proto.clarifai.api.Part.prototype.hasData = function () {
12345
12487
  return jspb.Message.getField(this, 1) != null;
12346
12488
  };
12489
+ /**
12490
+ * optional string id = 2;
12491
+ * @return {string}
12492
+ */
12493
+ proto.clarifai.api.Part.prototype.getId = function () {
12494
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12495
+ };
12496
+ /**
12497
+ * @param {string} value
12498
+ * @return {!proto.clarifai.api.Part} returns this
12499
+ */
12500
+ proto.clarifai.api.Part.prototype.setId = function (value) {
12501
+ return jspb.Message.setProto3StringField(this, 2, value);
12502
+ };
12347
12503
  if (jspb.Message.GENERATE_TO_OBJECT) {
12348
12504
  /**
12349
12505
  * Creates an object representation of this proto.
@@ -20513,7 +20669,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
20513
20669
  licenseType: jspb.Message.getFieldWithDefault(msg, 35, 0),
20514
20670
  source: jspb.Message.getFieldWithDefault(msg, 36, 0),
20515
20671
  creator: jspb.Message.getFieldWithDefault(msg, 37, ""),
20516
- versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0)
20672
+ versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0),
20673
+ usesTokens: jspb.Message.getBooleanFieldWithDefault(msg, 39, false)
20517
20674
  };
20518
20675
  if (includeInstance) {
20519
20676
  obj.$jspbMessageInstance = msg;
@@ -20681,6 +20838,10 @@ proto.clarifai.api.Model.deserializeBinaryFromReader = function (msg, reader) {
20681
20838
  var value = /** @type {number} */ (reader.readInt32());
20682
20839
  msg.setVersionCount(value);
20683
20840
  break;
20841
+ case 39:
20842
+ var value = /** @type {boolean} */ (reader.readBool());
20843
+ msg.setUsesTokens(value);
20844
+ break;
20684
20845
  default:
20685
20846
  reader.skipField();
20686
20847
  break;
@@ -20830,6 +20991,10 @@ proto.clarifai.api.Model.serializeBinaryToWriter = function (message, writer) {
20830
20991
  if (f !== 0) {
20831
20992
  writer.writeInt32(38, f);
20832
20993
  }
20994
+ f = message.getUsesTokens();
20995
+ if (f) {
20996
+ writer.writeBool(39, f);
20997
+ }
20833
20998
  };
20834
20999
  /**
20835
21000
  * @enum {number}
@@ -21502,6 +21667,20 @@ proto.clarifai.api.Model.prototype.getVersionCount = function () {
21502
21667
  proto.clarifai.api.Model.prototype.setVersionCount = function (value) {
21503
21668
  return jspb.Message.setProto3IntField(this, 38, value);
21504
21669
  };
21670
+ /**
21671
+ * optional bool uses_tokens = 39;
21672
+ * @return {boolean}
21673
+ */
21674
+ proto.clarifai.api.Model.prototype.getUsesTokens = function () {
21675
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 39, false));
21676
+ };
21677
+ /**
21678
+ * @param {boolean} value
21679
+ * @return {!proto.clarifai.api.Model} returns this
21680
+ */
21681
+ proto.clarifai.api.Model.prototype.setUsesTokens = function (value) {
21682
+ return jspb.Message.setProto3BooleanField(this, 39, value);
21683
+ };
21505
21684
  if (jspb.Message.GENERATE_TO_OBJECT) {
21506
21685
  /**
21507
21686
  * Creates an object representation of this proto.
@@ -11487,7 +11487,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
11487
11487
  hitsList: jspb.Message.toObjectList(msg.getHitsList(), proto.clarifai.api.Hit.toObject, includeInstance),
11488
11488
  heatmapsList: jspb.Message.toObjectList(msg.getHeatmapsList(), proto.clarifai.api.Image.toObject, includeInstance),
11489
11489
  partsList: jspb.Message.toObjectList(msg.getPartsList(), proto.clarifai.api.Part.toObject, includeInstance),
11490
- ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f)
11490
+ ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f),
11491
+ intValue: jspb.Message.getFieldWithDefault(msg, 21, 0),
11492
+ floatValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 22, 0.0),
11493
+ bytesValue: msg.getBytesValue_asB64(),
11494
+ boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 24, false),
11495
+ stringValue: jspb.Message.getFieldWithDefault(msg, 25, "")
11491
11496
  };
11492
11497
  if (includeInstance) {
11493
11498
  obj.$jspbMessageInstance = msg;
@@ -11609,6 +11614,26 @@ proto.clarifai.api.Data.deserializeBinaryFromReader = function (msg, reader) {
11609
11614
  reader.readMessage(value, proto.clarifai.api.NDArray.deserializeBinaryFromReader);
11610
11615
  msg.setNdarray(value);
11611
11616
  break;
11617
+ case 21:
11618
+ var value = /** @type {number} */ (reader.readInt64());
11619
+ msg.setIntValue(value);
11620
+ break;
11621
+ case 22:
11622
+ var value = /** @type {number} */ (reader.readDouble());
11623
+ msg.setFloatValue(value);
11624
+ break;
11625
+ case 23:
11626
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
11627
+ msg.setBytesValue(value);
11628
+ break;
11629
+ case 24:
11630
+ var value = /** @type {boolean} */ (reader.readBool());
11631
+ msg.setBoolValue(value);
11632
+ break;
11633
+ case 25:
11634
+ var value = /** @type {string} */ (reader.readString());
11635
+ msg.setStringValue(value);
11636
+ break;
11612
11637
  default:
11613
11638
  reader.skipField();
11614
11639
  break;
@@ -11706,6 +11731,26 @@ proto.clarifai.api.Data.serializeBinaryToWriter = function (message, writer) {
11706
11731
  if (f != null) {
11707
11732
  writer.writeMessage(20, f, proto.clarifai.api.NDArray.serializeBinaryToWriter);
11708
11733
  }
11734
+ f = message.getIntValue();
11735
+ if (f !== 0) {
11736
+ writer.writeInt64(21, f);
11737
+ }
11738
+ f = message.getFloatValue();
11739
+ if (f !== 0.0) {
11740
+ writer.writeDouble(22, f);
11741
+ }
11742
+ f = message.getBytesValue_asU8();
11743
+ if (f.length > 0) {
11744
+ writer.writeBytes(23, f);
11745
+ }
11746
+ f = message.getBoolValue();
11747
+ if (f) {
11748
+ writer.writeBool(24, f);
11749
+ }
11750
+ f = message.getStringValue();
11751
+ if (f.length > 0) {
11752
+ writer.writeString(25, f);
11753
+ }
11709
11754
  };
11710
11755
  /**
11711
11756
  * optional Image image = 1;
@@ -12222,6 +12267,94 @@ proto.clarifai.api.Data.prototype.clearNdarray = function () {
12222
12267
  proto.clarifai.api.Data.prototype.hasNdarray = function () {
12223
12268
  return jspb.Message.getField(this, 20) != null;
12224
12269
  };
12270
+ /**
12271
+ * optional int64 int_value = 21;
12272
+ * @return {number}
12273
+ */
12274
+ proto.clarifai.api.Data.prototype.getIntValue = function () {
12275
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0));
12276
+ };
12277
+ /**
12278
+ * @param {number} value
12279
+ * @return {!proto.clarifai.api.Data} returns this
12280
+ */
12281
+ proto.clarifai.api.Data.prototype.setIntValue = function (value) {
12282
+ return jspb.Message.setProto3IntField(this, 21, value);
12283
+ };
12284
+ /**
12285
+ * optional double float_value = 22;
12286
+ * @return {number}
12287
+ */
12288
+ proto.clarifai.api.Data.prototype.getFloatValue = function () {
12289
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 22, 0.0));
12290
+ };
12291
+ /**
12292
+ * @param {number} value
12293
+ * @return {!proto.clarifai.api.Data} returns this
12294
+ */
12295
+ proto.clarifai.api.Data.prototype.setFloatValue = function (value) {
12296
+ return jspb.Message.setProto3FloatField(this, 22, value);
12297
+ };
12298
+ /**
12299
+ * optional bytes bytes_value = 23;
12300
+ * @return {string}
12301
+ */
12302
+ proto.clarifai.api.Data.prototype.getBytesValue = function () {
12303
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, ""));
12304
+ };
12305
+ /**
12306
+ * optional bytes bytes_value = 23;
12307
+ * This is a type-conversion wrapper around `getBytesValue()`
12308
+ * @return {string}
12309
+ */
12310
+ proto.clarifai.api.Data.prototype.getBytesValue_asB64 = function () {
12311
+ return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBytesValue()));
12312
+ };
12313
+ /**
12314
+ * optional bytes bytes_value = 23;
12315
+ * Note that Uint8Array is not supported on all browsers.
12316
+ * @see http://caniuse.com/Uint8Array
12317
+ * This is a type-conversion wrapper around `getBytesValue()`
12318
+ * @return {!Uint8Array}
12319
+ */
12320
+ proto.clarifai.api.Data.prototype.getBytesValue_asU8 = function () {
12321
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBytesValue()));
12322
+ };
12323
+ /**
12324
+ * @param {!(string|Uint8Array)} value
12325
+ * @return {!proto.clarifai.api.Data} returns this
12326
+ */
12327
+ proto.clarifai.api.Data.prototype.setBytesValue = function (value) {
12328
+ return jspb.Message.setProto3BytesField(this, 23, value);
12329
+ };
12330
+ /**
12331
+ * optional bool bool_value = 24;
12332
+ * @return {boolean}
12333
+ */
12334
+ proto.clarifai.api.Data.prototype.getBoolValue = function () {
12335
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 24, false));
12336
+ };
12337
+ /**
12338
+ * @param {boolean} value
12339
+ * @return {!proto.clarifai.api.Data} returns this
12340
+ */
12341
+ proto.clarifai.api.Data.prototype.setBoolValue = function (value) {
12342
+ return jspb.Message.setProto3BooleanField(this, 24, value);
12343
+ };
12344
+ /**
12345
+ * optional string string_value = 25;
12346
+ * @return {string}
12347
+ */
12348
+ proto.clarifai.api.Data.prototype.getStringValue = function () {
12349
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, ""));
12350
+ };
12351
+ /**
12352
+ * @param {string} value
12353
+ * @return {!proto.clarifai.api.Data} returns this
12354
+ */
12355
+ proto.clarifai.api.Data.prototype.setStringValue = function (value) {
12356
+ return jspb.Message.setProto3StringField(this, 25, value);
12357
+ };
12225
12358
  if (jspb.Message.GENERATE_TO_OBJECT) {
12226
12359
  /**
12227
12360
  * Creates an object representation of this proto.
@@ -12249,7 +12382,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
12249
12382
  */
12250
12383
  proto.clarifai.api.Part.toObject = function (includeInstance, msg) {
12251
12384
  var f, obj = {
12252
- data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f)
12385
+ data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f),
12386
+ id: jspb.Message.getFieldWithDefault(msg, 2, "")
12253
12387
  };
12254
12388
  if (includeInstance) {
12255
12389
  obj.$jspbMessageInstance = msg;
@@ -12286,6 +12420,10 @@ proto.clarifai.api.Part.deserializeBinaryFromReader = function (msg, reader) {
12286
12420
  reader.readMessage(value, proto.clarifai.api.Data.deserializeBinaryFromReader);
12287
12421
  msg.setData(value);
12288
12422
  break;
12423
+ case 2:
12424
+ var value = /** @type {string} */ (reader.readString());
12425
+ msg.setId(value);
12426
+ break;
12289
12427
  default:
12290
12428
  reader.skipField();
12291
12429
  break;
@@ -12315,6 +12453,10 @@ proto.clarifai.api.Part.serializeBinaryToWriter = function (message, writer) {
12315
12453
  if (f != null) {
12316
12454
  writer.writeMessage(1, f, proto.clarifai.api.Data.serializeBinaryToWriter);
12317
12455
  }
12456
+ f = message.getId();
12457
+ if (f.length > 0) {
12458
+ writer.writeString(2, f);
12459
+ }
12318
12460
  };
12319
12461
  /**
12320
12462
  * optional Data data = 1;
@@ -12344,6 +12486,20 @@ proto.clarifai.api.Part.prototype.clearData = function () {
12344
12486
  proto.clarifai.api.Part.prototype.hasData = function () {
12345
12487
  return jspb.Message.getField(this, 1) != null;
12346
12488
  };
12489
+ /**
12490
+ * optional string id = 2;
12491
+ * @return {string}
12492
+ */
12493
+ proto.clarifai.api.Part.prototype.getId = function () {
12494
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12495
+ };
12496
+ /**
12497
+ * @param {string} value
12498
+ * @return {!proto.clarifai.api.Part} returns this
12499
+ */
12500
+ proto.clarifai.api.Part.prototype.setId = function (value) {
12501
+ return jspb.Message.setProto3StringField(this, 2, value);
12502
+ };
12347
12503
  if (jspb.Message.GENERATE_TO_OBJECT) {
12348
12504
  /**
12349
12505
  * Creates an object representation of this proto.
@@ -20513,7 +20669,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
20513
20669
  licenseType: jspb.Message.getFieldWithDefault(msg, 35, 0),
20514
20670
  source: jspb.Message.getFieldWithDefault(msg, 36, 0),
20515
20671
  creator: jspb.Message.getFieldWithDefault(msg, 37, ""),
20516
- versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0)
20672
+ versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0),
20673
+ usesTokens: jspb.Message.getBooleanFieldWithDefault(msg, 39, false)
20517
20674
  };
20518
20675
  if (includeInstance) {
20519
20676
  obj.$jspbMessageInstance = msg;
@@ -20681,6 +20838,10 @@ proto.clarifai.api.Model.deserializeBinaryFromReader = function (msg, reader) {
20681
20838
  var value = /** @type {number} */ (reader.readInt32());
20682
20839
  msg.setVersionCount(value);
20683
20840
  break;
20841
+ case 39:
20842
+ var value = /** @type {boolean} */ (reader.readBool());
20843
+ msg.setUsesTokens(value);
20844
+ break;
20684
20845
  default:
20685
20846
  reader.skipField();
20686
20847
  break;
@@ -20830,6 +20991,10 @@ proto.clarifai.api.Model.serializeBinaryToWriter = function (message, writer) {
20830
20991
  if (f !== 0) {
20831
20992
  writer.writeInt32(38, f);
20832
20993
  }
20994
+ f = message.getUsesTokens();
20995
+ if (f) {
20996
+ writer.writeBool(39, f);
20997
+ }
20833
20998
  };
20834
20999
  /**
20835
21000
  * @enum {number}
@@ -21502,6 +21667,20 @@ proto.clarifai.api.Model.prototype.getVersionCount = function () {
21502
21667
  proto.clarifai.api.Model.prototype.setVersionCount = function (value) {
21503
21668
  return jspb.Message.setProto3IntField(this, 38, value);
21504
21669
  };
21670
+ /**
21671
+ * optional bool uses_tokens = 39;
21672
+ * @return {boolean}
21673
+ */
21674
+ proto.clarifai.api.Model.prototype.getUsesTokens = function () {
21675
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 39, false));
21676
+ };
21677
+ /**
21678
+ * @param {boolean} value
21679
+ * @return {!proto.clarifai.api.Model} returns this
21680
+ */
21681
+ proto.clarifai.api.Model.prototype.setUsesTokens = function (value) {
21682
+ return jspb.Message.setProto3BooleanField(this, 39, value);
21683
+ };
21505
21684
  if (jspb.Message.GENERATE_TO_OBJECT) {
21506
21685
  /**
21507
21686
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "11.1.1",
3
+ "version": "11.1.3",
4
4
  "description": "The official Clarifai gRPC-web client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1172,6 +1172,23 @@ export class Data extends jspb.Message {
1172
1172
  hasNdarray(): boolean;
1173
1173
  clearNdarray(): Data;
1174
1174
 
1175
+ getIntValue(): number;
1176
+ setIntValue(value: number): Data;
1177
+
1178
+ getFloatValue(): number;
1179
+ setFloatValue(value: number): Data;
1180
+
1181
+ getBytesValue(): Uint8Array | string;
1182
+ getBytesValue_asU8(): Uint8Array;
1183
+ getBytesValue_asB64(): string;
1184
+ setBytesValue(value: Uint8Array | string): Data;
1185
+
1186
+ getBoolValue(): boolean;
1187
+ setBoolValue(value: boolean): Data;
1188
+
1189
+ getStringValue(): string;
1190
+ setStringValue(value: string): Data;
1191
+
1175
1192
  serializeBinary(): Uint8Array;
1176
1193
  toObject(includeInstance?: boolean): Data.AsObject;
1177
1194
  static toObject(includeInstance: boolean, msg: Data): Data.AsObject;
@@ -1200,6 +1217,11 @@ export namespace Data {
1200
1217
  heatmapsList: Array<Image.AsObject>,
1201
1218
  partsList: Array<Part.AsObject>,
1202
1219
  ndarray?: NDArray.AsObject,
1220
+ intValue: number,
1221
+ floatValue: number,
1222
+ bytesValue: Uint8Array | string,
1223
+ boolValue: boolean,
1224
+ stringValue: string,
1203
1225
  }
1204
1226
  }
1205
1227
 
@@ -1209,6 +1231,9 @@ export class Part extends jspb.Message {
1209
1231
  hasData(): boolean;
1210
1232
  clearData(): Part;
1211
1233
 
1234
+ getId(): string;
1235
+ setId(value: string): Part;
1236
+
1212
1237
  serializeBinary(): Uint8Array;
1213
1238
  toObject(includeInstance?: boolean): Part.AsObject;
1214
1239
  static toObject(includeInstance: boolean, msg: Part): Part.AsObject;
@@ -1220,6 +1245,7 @@ export class Part extends jspb.Message {
1220
1245
  export namespace Part {
1221
1246
  export type AsObject = {
1222
1247
  data?: Data.AsObject,
1248
+ id: string,
1223
1249
  }
1224
1250
  }
1225
1251
 
@@ -2678,6 +2704,9 @@ export class Model extends jspb.Message {
2678
2704
  getVersionCount(): number;
2679
2705
  setVersionCount(value: number): Model;
2680
2706
 
2707
+ getUsesTokens(): boolean;
2708
+ setUsesTokens(value: boolean): Model;
2709
+
2681
2710
  serializeBinary(): Uint8Array;
2682
2711
  toObject(includeInstance?: boolean): Model.AsObject;
2683
2712
  static toObject(includeInstance: boolean, msg: Model): Model.AsObject;
@@ -2719,6 +2748,7 @@ export namespace Model {
2719
2748
  source: Model.Source,
2720
2749
  creator: string,
2721
2750
  versionCount: number,
2751
+ usesTokens: boolean,
2722
2752
  }
2723
2753
 
2724
2754
  export enum Source {
@@ -13258,7 +13258,12 @@ proto.clarifai.api.Data.toObject = function(includeInstance, msg) {
13258
13258
  proto.clarifai.api.Image.toObject, includeInstance),
13259
13259
  partsList: jspb.Message.toObjectList(msg.getPartsList(),
13260
13260
  proto.clarifai.api.Part.toObject, includeInstance),
13261
- ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f)
13261
+ ndarray: (f = msg.getNdarray()) && proto.clarifai.api.NDArray.toObject(includeInstance, f),
13262
+ intValue: jspb.Message.getFieldWithDefault(msg, 21, 0),
13263
+ floatValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 22, 0.0),
13264
+ bytesValue: msg.getBytesValue_asB64(),
13265
+ boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 24, false),
13266
+ stringValue: jspb.Message.getFieldWithDefault(msg, 25, "")
13262
13267
  };
13263
13268
 
13264
13269
  if (includeInstance) {
@@ -13385,6 +13390,26 @@ proto.clarifai.api.Data.deserializeBinaryFromReader = function(msg, reader) {
13385
13390
  reader.readMessage(value,proto.clarifai.api.NDArray.deserializeBinaryFromReader);
13386
13391
  msg.setNdarray(value);
13387
13392
  break;
13393
+ case 21:
13394
+ var value = /** @type {number} */ (reader.readInt64());
13395
+ msg.setIntValue(value);
13396
+ break;
13397
+ case 22:
13398
+ var value = /** @type {number} */ (reader.readDouble());
13399
+ msg.setFloatValue(value);
13400
+ break;
13401
+ case 23:
13402
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
13403
+ msg.setBytesValue(value);
13404
+ break;
13405
+ case 24:
13406
+ var value = /** @type {boolean} */ (reader.readBool());
13407
+ msg.setBoolValue(value);
13408
+ break;
13409
+ case 25:
13410
+ var value = /** @type {string} */ (reader.readString());
13411
+ msg.setStringValue(value);
13412
+ break;
13388
13413
  default:
13389
13414
  reader.skipField();
13390
13415
  break;
@@ -13558,6 +13583,41 @@ proto.clarifai.api.Data.serializeBinaryToWriter = function(message, writer) {
13558
13583
  proto.clarifai.api.NDArray.serializeBinaryToWriter
13559
13584
  );
13560
13585
  }
13586
+ f = message.getIntValue();
13587
+ if (f !== 0) {
13588
+ writer.writeInt64(
13589
+ 21,
13590
+ f
13591
+ );
13592
+ }
13593
+ f = message.getFloatValue();
13594
+ if (f !== 0.0) {
13595
+ writer.writeDouble(
13596
+ 22,
13597
+ f
13598
+ );
13599
+ }
13600
+ f = message.getBytesValue_asU8();
13601
+ if (f.length > 0) {
13602
+ writer.writeBytes(
13603
+ 23,
13604
+ f
13605
+ );
13606
+ }
13607
+ f = message.getBoolValue();
13608
+ if (f) {
13609
+ writer.writeBool(
13610
+ 24,
13611
+ f
13612
+ );
13613
+ }
13614
+ f = message.getStringValue();
13615
+ if (f.length > 0) {
13616
+ writer.writeString(
13617
+ 25,
13618
+ f
13619
+ );
13620
+ }
13561
13621
  };
13562
13622
 
13563
13623
 
@@ -14238,6 +14298,120 @@ proto.clarifai.api.Data.prototype.hasNdarray = function() {
14238
14298
  };
14239
14299
 
14240
14300
 
14301
+ /**
14302
+ * optional int64 int_value = 21;
14303
+ * @return {number}
14304
+ */
14305
+ proto.clarifai.api.Data.prototype.getIntValue = function() {
14306
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0));
14307
+ };
14308
+
14309
+
14310
+ /**
14311
+ * @param {number} value
14312
+ * @return {!proto.clarifai.api.Data} returns this
14313
+ */
14314
+ proto.clarifai.api.Data.prototype.setIntValue = function(value) {
14315
+ return jspb.Message.setProto3IntField(this, 21, value);
14316
+ };
14317
+
14318
+
14319
+ /**
14320
+ * optional double float_value = 22;
14321
+ * @return {number}
14322
+ */
14323
+ proto.clarifai.api.Data.prototype.getFloatValue = function() {
14324
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 22, 0.0));
14325
+ };
14326
+
14327
+
14328
+ /**
14329
+ * @param {number} value
14330
+ * @return {!proto.clarifai.api.Data} returns this
14331
+ */
14332
+ proto.clarifai.api.Data.prototype.setFloatValue = function(value) {
14333
+ return jspb.Message.setProto3FloatField(this, 22, value);
14334
+ };
14335
+
14336
+
14337
+ /**
14338
+ * optional bytes bytes_value = 23;
14339
+ * @return {string}
14340
+ */
14341
+ proto.clarifai.api.Data.prototype.getBytesValue = function() {
14342
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, ""));
14343
+ };
14344
+
14345
+
14346
+ /**
14347
+ * optional bytes bytes_value = 23;
14348
+ * This is a type-conversion wrapper around `getBytesValue()`
14349
+ * @return {string}
14350
+ */
14351
+ proto.clarifai.api.Data.prototype.getBytesValue_asB64 = function() {
14352
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
14353
+ this.getBytesValue()));
14354
+ };
14355
+
14356
+
14357
+ /**
14358
+ * optional bytes bytes_value = 23;
14359
+ * Note that Uint8Array is not supported on all browsers.
14360
+ * @see http://caniuse.com/Uint8Array
14361
+ * This is a type-conversion wrapper around `getBytesValue()`
14362
+ * @return {!Uint8Array}
14363
+ */
14364
+ proto.clarifai.api.Data.prototype.getBytesValue_asU8 = function() {
14365
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
14366
+ this.getBytesValue()));
14367
+ };
14368
+
14369
+
14370
+ /**
14371
+ * @param {!(string|Uint8Array)} value
14372
+ * @return {!proto.clarifai.api.Data} returns this
14373
+ */
14374
+ proto.clarifai.api.Data.prototype.setBytesValue = function(value) {
14375
+ return jspb.Message.setProto3BytesField(this, 23, value);
14376
+ };
14377
+
14378
+
14379
+ /**
14380
+ * optional bool bool_value = 24;
14381
+ * @return {boolean}
14382
+ */
14383
+ proto.clarifai.api.Data.prototype.getBoolValue = function() {
14384
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 24, false));
14385
+ };
14386
+
14387
+
14388
+ /**
14389
+ * @param {boolean} value
14390
+ * @return {!proto.clarifai.api.Data} returns this
14391
+ */
14392
+ proto.clarifai.api.Data.prototype.setBoolValue = function(value) {
14393
+ return jspb.Message.setProto3BooleanField(this, 24, value);
14394
+ };
14395
+
14396
+
14397
+ /**
14398
+ * optional string string_value = 25;
14399
+ * @return {string}
14400
+ */
14401
+ proto.clarifai.api.Data.prototype.getStringValue = function() {
14402
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, ""));
14403
+ };
14404
+
14405
+
14406
+ /**
14407
+ * @param {string} value
14408
+ * @return {!proto.clarifai.api.Data} returns this
14409
+ */
14410
+ proto.clarifai.api.Data.prototype.setStringValue = function(value) {
14411
+ return jspb.Message.setProto3StringField(this, 25, value);
14412
+ };
14413
+
14414
+
14241
14415
 
14242
14416
 
14243
14417
 
@@ -14270,7 +14444,8 @@ proto.clarifai.api.Part.prototype.toObject = function(opt_includeInstance) {
14270
14444
  */
14271
14445
  proto.clarifai.api.Part.toObject = function(includeInstance, msg) {
14272
14446
  var f, obj = {
14273
- data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f)
14447
+ data: (f = msg.getData()) && proto.clarifai.api.Data.toObject(includeInstance, f),
14448
+ id: jspb.Message.getFieldWithDefault(msg, 2, "")
14274
14449
  };
14275
14450
 
14276
14451
  if (includeInstance) {
@@ -14312,6 +14487,10 @@ proto.clarifai.api.Part.deserializeBinaryFromReader = function(msg, reader) {
14312
14487
  reader.readMessage(value,proto.clarifai.api.Data.deserializeBinaryFromReader);
14313
14488
  msg.setData(value);
14314
14489
  break;
14490
+ case 2:
14491
+ var value = /** @type {string} */ (reader.readString());
14492
+ msg.setId(value);
14493
+ break;
14315
14494
  default:
14316
14495
  reader.skipField();
14317
14496
  break;
@@ -14349,6 +14528,13 @@ proto.clarifai.api.Part.serializeBinaryToWriter = function(message, writer) {
14349
14528
  proto.clarifai.api.Data.serializeBinaryToWriter
14350
14529
  );
14351
14530
  }
14531
+ f = message.getId();
14532
+ if (f.length > 0) {
14533
+ writer.writeString(
14534
+ 2,
14535
+ f
14536
+ );
14537
+ }
14352
14538
  };
14353
14539
 
14354
14540
 
@@ -14389,6 +14575,24 @@ proto.clarifai.api.Part.prototype.hasData = function() {
14389
14575
  };
14390
14576
 
14391
14577
 
14578
+ /**
14579
+ * optional string id = 2;
14580
+ * @return {string}
14581
+ */
14582
+ proto.clarifai.api.Part.prototype.getId = function() {
14583
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
14584
+ };
14585
+
14586
+
14587
+ /**
14588
+ * @param {string} value
14589
+ * @return {!proto.clarifai.api.Part} returns this
14590
+ */
14591
+ proto.clarifai.api.Part.prototype.setId = function(value) {
14592
+ return jspb.Message.setProto3StringField(this, 2, value);
14593
+ };
14594
+
14595
+
14392
14596
 
14393
14597
 
14394
14598
 
@@ -24788,7 +24992,8 @@ proto.clarifai.api.Model.toObject = function(includeInstance, msg) {
24788
24992
  licenseType: jspb.Message.getFieldWithDefault(msg, 35, 0),
24789
24993
  source: jspb.Message.getFieldWithDefault(msg, 36, 0),
24790
24994
  creator: jspb.Message.getFieldWithDefault(msg, 37, ""),
24791
- versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0)
24995
+ versionCount: jspb.Message.getFieldWithDefault(msg, 38, 0),
24996
+ usesTokens: jspb.Message.getBooleanFieldWithDefault(msg, 39, false)
24792
24997
  };
24793
24998
 
24794
24999
  if (includeInstance) {
@@ -24961,6 +25166,10 @@ proto.clarifai.api.Model.deserializeBinaryFromReader = function(msg, reader) {
24961
25166
  var value = /** @type {number} */ (reader.readInt32());
24962
25167
  msg.setVersionCount(value);
24963
25168
  break;
25169
+ case 39:
25170
+ var value = /** @type {boolean} */ (reader.readBool());
25171
+ msg.setUsesTokens(value);
25172
+ break;
24964
25173
  default:
24965
25174
  reader.skipField();
24966
25175
  break;
@@ -25219,6 +25428,13 @@ proto.clarifai.api.Model.serializeBinaryToWriter = function(message, writer) {
25219
25428
  f
25220
25429
  );
25221
25430
  }
25431
+ f = message.getUsesTokens();
25432
+ if (f) {
25433
+ writer.writeBool(
25434
+ 39,
25435
+ f
25436
+ );
25437
+ }
25222
25438
  };
25223
25439
 
25224
25440
 
@@ -26094,6 +26310,24 @@ proto.clarifai.api.Model.prototype.setVersionCount = function(value) {
26094
26310
  };
26095
26311
 
26096
26312
 
26313
+ /**
26314
+ * optional bool uses_tokens = 39;
26315
+ * @return {boolean}
26316
+ */
26317
+ proto.clarifai.api.Model.prototype.getUsesTokens = function() {
26318
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 39, false));
26319
+ };
26320
+
26321
+
26322
+ /**
26323
+ * @param {boolean} value
26324
+ * @return {!proto.clarifai.api.Model} returns this
26325
+ */
26326
+ proto.clarifai.api.Model.prototype.setUsesTokens = function(value) {
26327
+ return jspb.Message.setProto3BooleanField(this, 39, value);
26328
+ };
26329
+
26330
+
26097
26331
 
26098
26332
 
26099
26333