@replit/protocol 0.4.2 → 0.4.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/main/index.d.ts CHANGED
@@ -35920,12 +35920,106 @@ export namespace replit {
35920
35920
  public static getTypeUrl(typeUrlPrefix?: string): string;
35921
35921
  }
35922
35922
 
35923
+ /** Properties of a Viktor. */
35924
+ interface IViktor {
35925
+ }
35926
+
35927
+ /** Represents a Viktor. */
35928
+ class Viktor {
35929
+
35930
+ /**
35931
+ * Constructs a new Viktor.
35932
+ * @param [properties] Properties to set
35933
+ */
35934
+ private constructor(properties?: replit.goval.api.features.IViktor);
35935
+
35936
+ /**
35937
+ * Creates a new Viktor instance using the specified properties.
35938
+ * @param [properties] Properties to set
35939
+ * @returns Viktor instance
35940
+ */
35941
+ public static create(properties?: replit.goval.api.features.IViktor): replit.goval.api.features.Viktor;
35942
+
35943
+ /**
35944
+ * Encodes the specified Viktor message. Does not implicitly {@link replit.goval.api.features.Viktor.verify|verify} messages.
35945
+ * @param message Viktor message or plain object to encode
35946
+ * @param [writer] Writer to encode to
35947
+ * @returns Writer
35948
+ */
35949
+ public static encode(message: replit.goval.api.features.Viktor, writer?: $protobuf.Writer): $protobuf.Writer;
35950
+
35951
+ /**
35952
+ * Encodes the specified Viktor message, length delimited. Does not implicitly {@link replit.goval.api.features.Viktor.verify|verify} messages.
35953
+ * @param message Viktor message or plain object to encode
35954
+ * @param [writer] Writer to encode to
35955
+ * @returns Writer
35956
+ */
35957
+ public static encodeDelimited(message: replit.goval.api.features.Viktor, writer?: $protobuf.Writer): $protobuf.Writer;
35958
+
35959
+ /**
35960
+ * Decodes a Viktor message from the specified reader or buffer.
35961
+ * @param reader Reader or buffer to decode from
35962
+ * @param [length] Message length if known beforehand
35963
+ * @returns Viktor
35964
+ * @throws {Error} If the payload is not a reader or valid buffer
35965
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35966
+ */
35967
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replit.goval.api.features.Viktor;
35968
+
35969
+ /**
35970
+ * Decodes a Viktor message from the specified reader or buffer, length delimited.
35971
+ * @param reader Reader or buffer to decode from
35972
+ * @returns Viktor
35973
+ * @throws {Error} If the payload is not a reader or valid buffer
35974
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35975
+ */
35976
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replit.goval.api.features.Viktor;
35977
+
35978
+ /**
35979
+ * Verifies a Viktor message.
35980
+ * @param message Plain object to verify
35981
+ * @returns `null` if valid, otherwise the reason why it is not
35982
+ */
35983
+ public static verify(message: { [k: string]: any }): (string|null);
35984
+
35985
+ /**
35986
+ * Creates a Viktor message from a plain object. Also converts values to their respective internal types.
35987
+ * @param object Plain object
35988
+ * @returns Viktor
35989
+ */
35990
+ public static fromObject(object: { [k: string]: any }): replit.goval.api.features.Viktor;
35991
+
35992
+ /**
35993
+ * Creates a plain object from a Viktor message. Also converts values to other types if specified.
35994
+ * @param message Viktor
35995
+ * @param [options] Conversion options
35996
+ * @returns Plain object
35997
+ */
35998
+ public static toObject(message: replit.goval.api.features.Viktor, options?: $protobuf.IConversionOptions): { [k: string]: any };
35999
+
36000
+ /**
36001
+ * Converts this Viktor to JSON.
36002
+ * @returns JSON object
36003
+ */
36004
+ public toJSON(): { [k: string]: any };
36005
+
36006
+ /**
36007
+ * Gets the default type url for Viktor
36008
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
36009
+ * @returns The default type url
36010
+ */
36011
+ public static getTypeUrl(typeUrlPrefix?: string): string;
36012
+ }
36013
+
35923
36014
  /** Properties of a Feature. */
35924
36015
  interface IFeature {
35925
36016
 
35926
36017
  /** Feature boosted */
35927
36018
  boosted?: (replit.goval.api.features.Boosted|replit.goval.api.features.IBoosted|null);
35928
36019
 
36020
+ /** Feature viktor */
36021
+ viktor?: (replit.goval.api.features.Viktor|replit.goval.api.features.IViktor|null);
36022
+
35929
36023
  /** Feature required */
35930
36024
  required?: (boolean|null);
35931
36025
  }
@@ -35942,11 +36036,14 @@ export namespace replit {
35942
36036
  /** Feature boosted. */
35943
36037
  public boosted?: (replit.goval.api.features.Boosted|null);
35944
36038
 
36039
+ /** Feature viktor. */
36040
+ public viktor?: (replit.goval.api.features.Viktor|null);
36041
+
35945
36042
  /** Feature required. */
35946
36043
  public required: boolean;
35947
36044
 
35948
36045
  /** Feature feature. */
35949
- public feature?: "boosted";
36046
+ public feature?: ("boosted"|"viktor");
35950
36047
 
35951
36048
  /**
35952
36049
  * Creates a new Feature instance using the specified properties.
package/main/index.js CHANGED
@@ -89236,6 +89236,180 @@
89236
89236
  return Boosted;
89237
89237
  })();
89238
89238
 
89239
+ features.Viktor = (function() {
89240
+
89241
+ /**
89242
+ * Properties of a Viktor.
89243
+ * @memberof replit.goval.api.features
89244
+ * @interface IViktor
89245
+ */
89246
+
89247
+ /**
89248
+ * Constructs a new Viktor.
89249
+ * @memberof replit.goval.api.features
89250
+ * @classdesc Represents a Viktor.
89251
+ * @constructor
89252
+ * @param {replit.goval.api.features.IViktor=} [properties] Properties to set
89253
+ */
89254
+ function Viktor(properties) {
89255
+ if (properties)
89256
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
89257
+ if (properties[keys[i]] != null)
89258
+ this[keys[i]] = properties[keys[i]];
89259
+ }
89260
+
89261
+ /**
89262
+ * Creates a new Viktor instance using the specified properties.
89263
+ * @function create
89264
+ * @memberof replit.goval.api.features.Viktor
89265
+ * @static
89266
+ * @param {replit.goval.api.features.IViktor=} [properties] Properties to set
89267
+ * @returns {replit.goval.api.features.Viktor} Viktor instance
89268
+ */
89269
+ Viktor.create = function create(properties) {
89270
+ return Viktor.fromObject(properties);
89271
+ };
89272
+
89273
+ /**
89274
+ * Encodes the specified Viktor message. Does not implicitly {@link replit.goval.api.features.Viktor.verify|verify} messages.
89275
+ * @function encode
89276
+ * @memberof replit.goval.api.features.Viktor
89277
+ * @static
89278
+ * @param {replit.goval.api.features.Viktor} message Viktor message or plain object to encode
89279
+ * @param {$protobuf.Writer} [writer] Writer to encode to
89280
+ * @returns {$protobuf.Writer} Writer
89281
+ */
89282
+ Viktor.encode = function encode(message, writer) {
89283
+ if (!writer)
89284
+ writer = $Writer.create();
89285
+ return writer;
89286
+ };
89287
+
89288
+ /**
89289
+ * Encodes the specified Viktor message, length delimited. Does not implicitly {@link replit.goval.api.features.Viktor.verify|verify} messages.
89290
+ * @function encodeDelimited
89291
+ * @memberof replit.goval.api.features.Viktor
89292
+ * @static
89293
+ * @param {replit.goval.api.features.Viktor} message Viktor message or plain object to encode
89294
+ * @param {$protobuf.Writer} [writer] Writer to encode to
89295
+ * @returns {$protobuf.Writer} Writer
89296
+ */
89297
+ Viktor.encodeDelimited = function encodeDelimited(message, writer) {
89298
+ return this.encode(message, writer).ldelim();
89299
+ };
89300
+
89301
+ /**
89302
+ * Decodes a Viktor message from the specified reader or buffer.
89303
+ * @function decode
89304
+ * @memberof replit.goval.api.features.Viktor
89305
+ * @static
89306
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
89307
+ * @param {number} [length] Message length if known beforehand
89308
+ * @returns {replit.goval.api.features.Viktor} Viktor
89309
+ * @throws {Error} If the payload is not a reader or valid buffer
89310
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
89311
+ */
89312
+ Viktor.decode = function decode(reader, length) {
89313
+ if (!(reader instanceof $Reader))
89314
+ reader = $Reader.create(reader);
89315
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replit.goval.api.features.Viktor();
89316
+ while (reader.pos < end) {
89317
+ var tag = reader.uint32();
89318
+ switch (tag >>> 3) {
89319
+ default:
89320
+ reader.skipType(tag & 7);
89321
+ break;
89322
+ }
89323
+ }
89324
+ return message;
89325
+ };
89326
+
89327
+ /**
89328
+ * Decodes a Viktor message from the specified reader or buffer, length delimited.
89329
+ * @function decodeDelimited
89330
+ * @memberof replit.goval.api.features.Viktor
89331
+ * @static
89332
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
89333
+ * @returns {replit.goval.api.features.Viktor} Viktor
89334
+ * @throws {Error} If the payload is not a reader or valid buffer
89335
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
89336
+ */
89337
+ Viktor.decodeDelimited = function decodeDelimited(reader) {
89338
+ if (!(reader instanceof $Reader))
89339
+ reader = new $Reader(reader);
89340
+ return this.decode(reader, reader.uint32());
89341
+ };
89342
+
89343
+ /**
89344
+ * Verifies a Viktor message.
89345
+ * @function verify
89346
+ * @memberof replit.goval.api.features.Viktor
89347
+ * @static
89348
+ * @param {Object.<string,*>} message Plain object to verify
89349
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
89350
+ */
89351
+ Viktor.verify = function verify(message) {
89352
+ if (typeof message !== "object" || message === null)
89353
+ return "object expected";
89354
+ return null;
89355
+ };
89356
+
89357
+ /**
89358
+ * Creates a Viktor message from a plain object. Also converts values to their respective internal types.
89359
+ * @function fromObject
89360
+ * @memberof replit.goval.api.features.Viktor
89361
+ * @static
89362
+ * @param {Object.<string,*>} object Plain object
89363
+ * @returns {replit.goval.api.features.Viktor} Viktor
89364
+ */
89365
+ Viktor.fromObject = function fromObject(object) {
89366
+ if (object instanceof $root.replit.goval.api.features.Viktor)
89367
+ return object;
89368
+ return new $root.replit.goval.api.features.Viktor();
89369
+ };
89370
+
89371
+ /**
89372
+ * Creates a plain object from a Viktor message. Also converts values to other types if specified.
89373
+ * @function toObject
89374
+ * @memberof replit.goval.api.features.Viktor
89375
+ * @static
89376
+ * @param {replit.goval.api.features.Viktor} message Viktor
89377
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
89378
+ * @returns {Object.<string,*>} Plain object
89379
+ */
89380
+ Viktor.toObject = function toObject() {
89381
+ return {};
89382
+ };
89383
+
89384
+ /**
89385
+ * Converts this Viktor to JSON.
89386
+ * @function toJSON
89387
+ * @memberof replit.goval.api.features.Viktor
89388
+ * @instance
89389
+ * @returns {Object.<string,*>} JSON object
89390
+ */
89391
+ Viktor.prototype.toJSON = function toJSON() {
89392
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
89393
+ };
89394
+
89395
+ /**
89396
+ * Gets the default type url for Viktor
89397
+ * @function getTypeUrl
89398
+ * @memberof replit.goval.api.features.Viktor
89399
+ * @static
89400
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
89401
+ * @returns {string} The default type url
89402
+ */
89403
+ Viktor.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
89404
+ if (typeUrlPrefix === undefined) {
89405
+ typeUrlPrefix = "type.googleapis.com";
89406
+ }
89407
+ return typeUrlPrefix + "/replit.goval.api.features.Viktor";
89408
+ };
89409
+
89410
+ return Viktor;
89411
+ })();
89412
+
89239
89413
  features.Feature = (function() {
89240
89414
 
89241
89415
  /**
@@ -89243,6 +89417,7 @@
89243
89417
  * @memberof replit.goval.api.features
89244
89418
  * @interface IFeature
89245
89419
  * @property {replit.goval.api.features.Boosted|replit.goval.api.features.IBoosted|null} [boosted] Feature boosted
89420
+ * @property {replit.goval.api.features.Viktor|replit.goval.api.features.IViktor|null} [viktor] Feature viktor
89246
89421
  * @property {boolean|null} [required] Feature required
89247
89422
  */
89248
89423
 
@@ -89268,6 +89443,14 @@
89268
89443
  */
89269
89444
  Feature.prototype.boosted = null;
89270
89445
 
89446
+ /**
89447
+ * Feature viktor.
89448
+ * @member {replit.goval.api.features.Viktor|null|undefined} viktor
89449
+ * @memberof replit.goval.api.features.Feature
89450
+ * @instance
89451
+ */
89452
+ Feature.prototype.viktor = null;
89453
+
89271
89454
  /**
89272
89455
  * Feature required.
89273
89456
  * @member {boolean} required
@@ -89281,12 +89464,12 @@
89281
89464
 
89282
89465
  /**
89283
89466
  * Feature feature.
89284
- * @member {"boosted"|undefined} feature
89467
+ * @member {"boosted"|"viktor"|undefined} feature
89285
89468
  * @memberof replit.goval.api.features.Feature
89286
89469
  * @instance
89287
89470
  */
89288
89471
  Object.defineProperty(Feature.prototype, "feature", {
89289
- get: $util.oneOfGetter($oneOfFields = ["boosted"]),
89472
+ get: $util.oneOfGetter($oneOfFields = ["boosted", "viktor"]),
89290
89473
  set: $util.oneOfSetter($oneOfFields)
89291
89474
  });
89292
89475
 
@@ -89318,6 +89501,8 @@
89318
89501
  $root.replit.goval.api.features.Boosted.encode(message.boosted, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
89319
89502
  if (message.required != null && Object.hasOwnProperty.call(message, "required"))
89320
89503
  writer.uint32(/* id 3, wireType 0 =*/24).bool(message.required);
89504
+ if (message.viktor != null && Object.hasOwnProperty.call(message, "viktor"))
89505
+ $root.replit.goval.api.features.Viktor.encode(message.viktor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
89321
89506
  return writer;
89322
89507
  };
89323
89508
 
@@ -89356,6 +89541,10 @@
89356
89541
  message.boosted = $root.replit.goval.api.features.Boosted.decode(reader, reader.uint32());
89357
89542
  break;
89358
89543
  }
89544
+ case 5: {
89545
+ message.viktor = $root.replit.goval.api.features.Viktor.decode(reader, reader.uint32());
89546
+ break;
89547
+ }
89359
89548
  case 3: {
89360
89549
  message.required = reader.bool();
89361
89550
  break;
@@ -89404,6 +89593,16 @@
89404
89593
  return "boosted." + error;
89405
89594
  }
89406
89595
  }
89596
+ if (message.viktor != null && message.hasOwnProperty("viktor")) {
89597
+ if (properties.feature === 1)
89598
+ return "feature: multiple values";
89599
+ properties.feature = 1;
89600
+ {
89601
+ var error = $root.replit.goval.api.features.Viktor.verify(message.viktor);
89602
+ if (error)
89603
+ return "viktor." + error;
89604
+ }
89605
+ }
89407
89606
  if (message.required != null && message.hasOwnProperty("required"))
89408
89607
  if (typeof message.required !== "boolean")
89409
89608
  return "required: boolean expected";
@@ -89427,6 +89626,11 @@
89427
89626
  throw TypeError(".replit.goval.api.features.Feature.boosted: object expected");
89428
89627
  message.boosted = $root.replit.goval.api.features.Boosted.fromObject(object.boosted);
89429
89628
  }
89629
+ if (object.viktor != null) {
89630
+ if (typeof object.viktor !== "object")
89631
+ throw TypeError(".replit.goval.api.features.Feature.viktor: object expected");
89632
+ message.viktor = $root.replit.goval.api.features.Viktor.fromObject(object.viktor);
89633
+ }
89430
89634
  if (object.required != null)
89431
89635
  message.required = Boolean(object.required);
89432
89636
  return message;
@@ -89454,6 +89658,11 @@
89454
89658
  }
89455
89659
  if (message.required != null && message.hasOwnProperty("required"))
89456
89660
  object.required = message.required;
89661
+ if (message.viktor != null && message.hasOwnProperty("viktor")) {
89662
+ object.viktor = $root.replit.goval.api.features.Viktor.toObject(message.viktor, options);
89663
+ if (options.oneofs)
89664
+ object.feature = "viktor";
89665
+ }
89457
89666
  return object;
89458
89667
  };
89459
89668
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replit/protocol",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "JavaScript bindings for the Replit protocol",
5
5
  "main": "main/index.js",
6
6
  "author": "eng@replit.com",