@replit/protocol 0.2.57 → 0.2.58
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 +41 -41
- package/main/index.js +103 -103
- package/main/index.js.flow +41 -41
- package/package.json +1 -1
package/main/index.d.ts
CHANGED
|
@@ -8763,8 +8763,8 @@ export namespace api {
|
|
|
8763
8763
|
/** OTPacket version */
|
|
8764
8764
|
version?: (number|null);
|
|
8765
8765
|
|
|
8766
|
-
/** OTPacket
|
|
8767
|
-
|
|
8766
|
+
/** OTPacket op */
|
|
8767
|
+
op?: ((api.OTOpComponent|api.IOTOpComponent)[]|null);
|
|
8768
8768
|
|
|
8769
8769
|
/** OTPacket crc32 */
|
|
8770
8770
|
crc32?: (number|null);
|
|
@@ -8794,8 +8794,8 @@ export namespace api {
|
|
|
8794
8794
|
/** OTPacket version. */
|
|
8795
8795
|
public version: number;
|
|
8796
8796
|
|
|
8797
|
-
/** OTPacket
|
|
8798
|
-
public
|
|
8797
|
+
/** OTPacket op. */
|
|
8798
|
+
public op: api.OTOpComponent[];
|
|
8799
8799
|
|
|
8800
8800
|
/** OTPacket crc32. */
|
|
8801
8801
|
public crc32: number;
|
|
@@ -8880,106 +8880,106 @@ export namespace api {
|
|
|
8880
8880
|
public toJSON(): { [k: string]: any };
|
|
8881
8881
|
}
|
|
8882
8882
|
|
|
8883
|
-
/** Properties of a
|
|
8884
|
-
interface
|
|
8883
|
+
/** Properties of a OTOpComponent. */
|
|
8884
|
+
interface IOTOpComponent {
|
|
8885
8885
|
|
|
8886
|
-
/**
|
|
8886
|
+
/** OTOpComponent skip */
|
|
8887
8887
|
skip?: (number|null);
|
|
8888
8888
|
|
|
8889
|
-
/**
|
|
8889
|
+
/** OTOpComponent delete */
|
|
8890
8890
|
"delete"?: (number|null);
|
|
8891
8891
|
|
|
8892
|
-
/**
|
|
8892
|
+
/** OTOpComponent insert */
|
|
8893
8893
|
insert?: (string|null);
|
|
8894
8894
|
}
|
|
8895
8895
|
|
|
8896
|
-
/** Represents a
|
|
8897
|
-
class
|
|
8896
|
+
/** Represents a OTOpComponent. */
|
|
8897
|
+
class OTOpComponent {
|
|
8898
8898
|
|
|
8899
8899
|
/**
|
|
8900
|
-
* Constructs a new
|
|
8900
|
+
* Constructs a new OTOpComponent.
|
|
8901
8901
|
* @param [properties] Properties to set
|
|
8902
8902
|
*/
|
|
8903
|
-
private constructor(properties?: api.
|
|
8903
|
+
private constructor(properties?: api.IOTOpComponent);
|
|
8904
8904
|
|
|
8905
|
-
/**
|
|
8905
|
+
/** OTOpComponent skip. */
|
|
8906
8906
|
public skip?: (number|null);
|
|
8907
8907
|
|
|
8908
|
-
/**
|
|
8908
|
+
/** OTOpComponent delete. */
|
|
8909
8909
|
public delete?: (number|null);
|
|
8910
8910
|
|
|
8911
|
-
/**
|
|
8911
|
+
/** OTOpComponent insert. */
|
|
8912
8912
|
public insert?: (string|null);
|
|
8913
8913
|
|
|
8914
|
-
/**
|
|
8915
|
-
public
|
|
8914
|
+
/** OTOpComponent opComponent. */
|
|
8915
|
+
public opComponent?: ("skip"|"delete"|"insert");
|
|
8916
8916
|
|
|
8917
8917
|
/**
|
|
8918
|
-
* Creates a new
|
|
8918
|
+
* Creates a new OTOpComponent instance using the specified properties.
|
|
8919
8919
|
* @param [properties] Properties to set
|
|
8920
|
-
* @returns
|
|
8920
|
+
* @returns OTOpComponent instance
|
|
8921
8921
|
*/
|
|
8922
|
-
public static create(properties?: api.
|
|
8922
|
+
public static create(properties?: api.IOTOpComponent): api.OTOpComponent;
|
|
8923
8923
|
|
|
8924
8924
|
/**
|
|
8925
|
-
* Encodes the specified
|
|
8926
|
-
* @param message
|
|
8925
|
+
* Encodes the specified OTOpComponent message. Does not implicitly {@link api.OTOpComponent.verify|verify} messages.
|
|
8926
|
+
* @param message OTOpComponent message or plain object to encode
|
|
8927
8927
|
* @param [writer] Writer to encode to
|
|
8928
8928
|
* @returns Writer
|
|
8929
8929
|
*/
|
|
8930
|
-
public static encode(message: api.
|
|
8930
|
+
public static encode(message: api.OTOpComponent, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
8931
8931
|
|
|
8932
8932
|
/**
|
|
8933
|
-
* Encodes the specified
|
|
8934
|
-
* @param message
|
|
8933
|
+
* Encodes the specified OTOpComponent message, length delimited. Does not implicitly {@link api.OTOpComponent.verify|verify} messages.
|
|
8934
|
+
* @param message OTOpComponent message or plain object to encode
|
|
8935
8935
|
* @param [writer] Writer to encode to
|
|
8936
8936
|
* @returns Writer
|
|
8937
8937
|
*/
|
|
8938
|
-
public static encodeDelimited(message: api.
|
|
8938
|
+
public static encodeDelimited(message: api.OTOpComponent, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
8939
8939
|
|
|
8940
8940
|
/**
|
|
8941
|
-
* Decodes a
|
|
8941
|
+
* Decodes a OTOpComponent message from the specified reader or buffer.
|
|
8942
8942
|
* @param reader Reader or buffer to decode from
|
|
8943
8943
|
* @param [length] Message length if known beforehand
|
|
8944
|
-
* @returns
|
|
8944
|
+
* @returns OTOpComponent
|
|
8945
8945
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8946
8946
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8947
8947
|
*/
|
|
8948
|
-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): api.
|
|
8948
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): api.OTOpComponent;
|
|
8949
8949
|
|
|
8950
8950
|
/**
|
|
8951
|
-
* Decodes a
|
|
8951
|
+
* Decodes a OTOpComponent message from the specified reader or buffer, length delimited.
|
|
8952
8952
|
* @param reader Reader or buffer to decode from
|
|
8953
|
-
* @returns
|
|
8953
|
+
* @returns OTOpComponent
|
|
8954
8954
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8955
8955
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8956
8956
|
*/
|
|
8957
|
-
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): api.
|
|
8957
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): api.OTOpComponent;
|
|
8958
8958
|
|
|
8959
8959
|
/**
|
|
8960
|
-
* Verifies a
|
|
8960
|
+
* Verifies a OTOpComponent message.
|
|
8961
8961
|
* @param message Plain object to verify
|
|
8962
8962
|
* @returns `null` if valid, otherwise the reason why it is not
|
|
8963
8963
|
*/
|
|
8964
8964
|
public static verify(message: { [k: string]: any }): (string|null);
|
|
8965
8965
|
|
|
8966
8966
|
/**
|
|
8967
|
-
* Creates a
|
|
8967
|
+
* Creates a OTOpComponent message from a plain object. Also converts values to their respective internal types.
|
|
8968
8968
|
* @param object Plain object
|
|
8969
|
-
* @returns
|
|
8969
|
+
* @returns OTOpComponent
|
|
8970
8970
|
*/
|
|
8971
|
-
public static fromObject(object: { [k: string]: any }): api.
|
|
8971
|
+
public static fromObject(object: { [k: string]: any }): api.OTOpComponent;
|
|
8972
8972
|
|
|
8973
8973
|
/**
|
|
8974
|
-
* Creates a plain object from a
|
|
8975
|
-
* @param message
|
|
8974
|
+
* Creates a plain object from a OTOpComponent message. Also converts values to other types if specified.
|
|
8975
|
+
* @param message OTOpComponent
|
|
8976
8976
|
* @param [options] Conversion options
|
|
8977
8977
|
* @returns Plain object
|
|
8978
8978
|
*/
|
|
8979
|
-
public static toObject(message: api.
|
|
8979
|
+
public static toObject(message: api.OTOpComponent, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
8980
8980
|
|
|
8981
8981
|
/**
|
|
8982
|
-
* Converts this
|
|
8982
|
+
* Converts this OTOpComponent to JSON.
|
|
8983
8983
|
* @returns JSON object
|
|
8984
8984
|
*/
|
|
8985
8985
|
public toJSON(): { [k: string]: any };
|
package/main/index.js
CHANGED
|
@@ -22896,7 +22896,7 @@
|
|
|
22896
22896
|
* @interface IOTPacket
|
|
22897
22897
|
* @property {number|null} [spookyVersion] OTPacket spookyVersion
|
|
22898
22898
|
* @property {number|null} [version] OTPacket version
|
|
22899
|
-
* @property {Array.<api.
|
|
22899
|
+
* @property {Array.<api.OTOpComponent|api.IOTOpComponent>|null} [op] OTPacket op
|
|
22900
22900
|
* @property {number|null} [crc32] OTPacket crc32
|
|
22901
22901
|
* @property {google.protobuf.Timestamp|google.protobuf.ITimestamp|null} [committed] OTPacket committed
|
|
22902
22902
|
* @property {number|null} [nonce] OTPacket nonce
|
|
@@ -22911,7 +22911,7 @@
|
|
|
22911
22911
|
* @param {api.IOTPacket=} [properties] Properties to set
|
|
22912
22912
|
*/
|
|
22913
22913
|
function OTPacket(properties) {
|
|
22914
|
-
this.
|
|
22914
|
+
this.op = [];
|
|
22915
22915
|
if (properties)
|
|
22916
22916
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
22917
22917
|
if (properties[keys[i]] != null)
|
|
@@ -22935,12 +22935,12 @@
|
|
|
22935
22935
|
OTPacket.prototype.version = 0;
|
|
22936
22936
|
|
|
22937
22937
|
/**
|
|
22938
|
-
* OTPacket
|
|
22939
|
-
* @member {Array.<api.
|
|
22938
|
+
* OTPacket op.
|
|
22939
|
+
* @member {Array.<api.OTOpComponent>} op
|
|
22940
22940
|
* @memberof api.OTPacket
|
|
22941
22941
|
* @instance
|
|
22942
22942
|
*/
|
|
22943
|
-
OTPacket.prototype.
|
|
22943
|
+
OTPacket.prototype.op = $util.emptyArray;
|
|
22944
22944
|
|
|
22945
22945
|
/**
|
|
22946
22946
|
* OTPacket crc32.
|
|
@@ -23000,9 +23000,9 @@
|
|
|
23000
23000
|
writer = $Writer.create();
|
|
23001
23001
|
if (message.spookyVersion != null && Object.hasOwnProperty.call(message, "spookyVersion"))
|
|
23002
23002
|
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.spookyVersion);
|
|
23003
|
-
if (message.
|
|
23004
|
-
for (var i = 0; i < message.
|
|
23005
|
-
$root.api.
|
|
23003
|
+
if (message.op != null && message.op.length)
|
|
23004
|
+
for (var i = 0; i < message.op.length; ++i)
|
|
23005
|
+
$root.api.OTOpComponent.encode(message.op[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23006
23006
|
if (message.crc32 != null && Object.hasOwnProperty.call(message, "crc32"))
|
|
23007
23007
|
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.crc32);
|
|
23008
23008
|
if (message.committed != null && Object.hasOwnProperty.call(message, "committed"))
|
|
@@ -23054,9 +23054,9 @@
|
|
|
23054
23054
|
message.version = reader.uint32();
|
|
23055
23055
|
break;
|
|
23056
23056
|
case 2:
|
|
23057
|
-
if (!(message.
|
|
23058
|
-
message.
|
|
23059
|
-
message.
|
|
23057
|
+
if (!(message.op && message.op.length))
|
|
23058
|
+
message.op = [];
|
|
23059
|
+
message.op.push($root.api.OTOpComponent.decode(reader, reader.uint32()));
|
|
23060
23060
|
break;
|
|
23061
23061
|
case 3:
|
|
23062
23062
|
message.crc32 = reader.uint32();
|
|
@@ -23111,13 +23111,13 @@
|
|
|
23111
23111
|
if (message.version != null && message.hasOwnProperty("version"))
|
|
23112
23112
|
if (!$util.isInteger(message.version))
|
|
23113
23113
|
return "version: integer expected";
|
|
23114
|
-
if (message.
|
|
23115
|
-
if (!Array.isArray(message.
|
|
23116
|
-
return "
|
|
23117
|
-
for (var i = 0; i < message.
|
|
23118
|
-
var error = $root.api.
|
|
23114
|
+
if (message.op != null && message.hasOwnProperty("op")) {
|
|
23115
|
+
if (!Array.isArray(message.op))
|
|
23116
|
+
return "op: array expected";
|
|
23117
|
+
for (var i = 0; i < message.op.length; ++i) {
|
|
23118
|
+
var error = $root.api.OTOpComponent.verify(message.op[i]);
|
|
23119
23119
|
if (error)
|
|
23120
|
-
return "
|
|
23120
|
+
return "op." + error;
|
|
23121
23121
|
}
|
|
23122
23122
|
}
|
|
23123
23123
|
if (message.crc32 != null && message.hasOwnProperty("crc32"))
|
|
@@ -23153,14 +23153,14 @@
|
|
|
23153
23153
|
message.spookyVersion = object.spookyVersion >>> 0;
|
|
23154
23154
|
if (object.version != null)
|
|
23155
23155
|
message.version = object.version >>> 0;
|
|
23156
|
-
if (object.
|
|
23157
|
-
if (!Array.isArray(object.
|
|
23158
|
-
throw TypeError(".api.OTPacket.
|
|
23159
|
-
message.
|
|
23160
|
-
for (var i = 0; i < object.
|
|
23161
|
-
if (typeof object.
|
|
23162
|
-
throw TypeError(".api.OTPacket.
|
|
23163
|
-
message.
|
|
23156
|
+
if (object.op) {
|
|
23157
|
+
if (!Array.isArray(object.op))
|
|
23158
|
+
throw TypeError(".api.OTPacket.op: array expected");
|
|
23159
|
+
message.op = [];
|
|
23160
|
+
for (var i = 0; i < object.op.length; ++i) {
|
|
23161
|
+
if (typeof object.op[i] !== "object")
|
|
23162
|
+
throw TypeError(".api.OTPacket.op: object expected");
|
|
23163
|
+
message.op[i] = $root.api.OTOpComponent.fromObject(object.op[i]);
|
|
23164
23164
|
}
|
|
23165
23165
|
}
|
|
23166
23166
|
if (object.crc32 != null)
|
|
@@ -23191,7 +23191,7 @@
|
|
|
23191
23191
|
options = {};
|
|
23192
23192
|
var object = {};
|
|
23193
23193
|
if (options.arrays || options.defaults)
|
|
23194
|
-
object.
|
|
23194
|
+
object.op = [];
|
|
23195
23195
|
if (options.defaults) {
|
|
23196
23196
|
object.spookyVersion = 0;
|
|
23197
23197
|
object.crc32 = 0;
|
|
@@ -23202,10 +23202,10 @@
|
|
|
23202
23202
|
}
|
|
23203
23203
|
if (message.spookyVersion != null && message.hasOwnProperty("spookyVersion"))
|
|
23204
23204
|
object.spookyVersion = message.spookyVersion;
|
|
23205
|
-
if (message.
|
|
23206
|
-
object.
|
|
23207
|
-
for (var j = 0; j < message.
|
|
23208
|
-
object.
|
|
23205
|
+
if (message.op && message.op.length) {
|
|
23206
|
+
object.op = [];
|
|
23207
|
+
for (var j = 0; j < message.op.length; ++j)
|
|
23208
|
+
object.op[j] = $root.api.OTOpComponent.toObject(message.op[j], options);
|
|
23209
23209
|
}
|
|
23210
23210
|
if (message.crc32 != null && message.hasOwnProperty("crc32"))
|
|
23211
23211
|
object.crc32 = message.crc32;
|
|
@@ -23234,25 +23234,25 @@
|
|
|
23234
23234
|
return OTPacket;
|
|
23235
23235
|
})();
|
|
23236
23236
|
|
|
23237
|
-
api.
|
|
23237
|
+
api.OTOpComponent = (function() {
|
|
23238
23238
|
|
|
23239
23239
|
/**
|
|
23240
|
-
* Properties of a
|
|
23240
|
+
* Properties of a OTOpComponent.
|
|
23241
23241
|
* @memberof api
|
|
23242
|
-
* @interface
|
|
23243
|
-
* @property {number|null} [skip]
|
|
23244
|
-
* @property {number|null} ["delete"]
|
|
23245
|
-
* @property {string|null} [insert]
|
|
23242
|
+
* @interface IOTOpComponent
|
|
23243
|
+
* @property {number|null} [skip] OTOpComponent skip
|
|
23244
|
+
* @property {number|null} ["delete"] OTOpComponent delete
|
|
23245
|
+
* @property {string|null} [insert] OTOpComponent insert
|
|
23246
23246
|
*/
|
|
23247
23247
|
|
|
23248
23248
|
/**
|
|
23249
|
-
* Constructs a new
|
|
23249
|
+
* Constructs a new OTOpComponent.
|
|
23250
23250
|
* @memberof api
|
|
23251
|
-
* @classdesc Represents a
|
|
23251
|
+
* @classdesc Represents a OTOpComponent.
|
|
23252
23252
|
* @constructor
|
|
23253
|
-
* @param {api.
|
|
23253
|
+
* @param {api.IOTOpComponent=} [properties] Properties to set
|
|
23254
23254
|
*/
|
|
23255
|
-
function
|
|
23255
|
+
function OTOpComponent(properties) {
|
|
23256
23256
|
if (properties)
|
|
23257
23257
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23258
23258
|
if (properties[keys[i]] != null)
|
|
@@ -23260,65 +23260,65 @@
|
|
|
23260
23260
|
}
|
|
23261
23261
|
|
|
23262
23262
|
/**
|
|
23263
|
-
*
|
|
23263
|
+
* OTOpComponent skip.
|
|
23264
23264
|
* @member {number|null|undefined} skip
|
|
23265
|
-
* @memberof api.
|
|
23265
|
+
* @memberof api.OTOpComponent
|
|
23266
23266
|
* @instance
|
|
23267
23267
|
*/
|
|
23268
|
-
|
|
23268
|
+
OTOpComponent.prototype.skip = null;
|
|
23269
23269
|
|
|
23270
23270
|
/**
|
|
23271
|
-
*
|
|
23271
|
+
* OTOpComponent delete.
|
|
23272
23272
|
* @member {number|null|undefined} delete
|
|
23273
|
-
* @memberof api.
|
|
23273
|
+
* @memberof api.OTOpComponent
|
|
23274
23274
|
* @instance
|
|
23275
23275
|
*/
|
|
23276
|
-
|
|
23276
|
+
OTOpComponent.prototype["delete"] = null;
|
|
23277
23277
|
|
|
23278
23278
|
/**
|
|
23279
|
-
*
|
|
23279
|
+
* OTOpComponent insert.
|
|
23280
23280
|
* @member {string|null|undefined} insert
|
|
23281
|
-
* @memberof api.
|
|
23281
|
+
* @memberof api.OTOpComponent
|
|
23282
23282
|
* @instance
|
|
23283
23283
|
*/
|
|
23284
|
-
|
|
23284
|
+
OTOpComponent.prototype.insert = null;
|
|
23285
23285
|
|
|
23286
23286
|
// OneOf field names bound to virtual getters and setters
|
|
23287
23287
|
var $oneOfFields;
|
|
23288
23288
|
|
|
23289
23289
|
/**
|
|
23290
|
-
*
|
|
23291
|
-
* @member {"skip"|"delete"|"insert"|undefined}
|
|
23292
|
-
* @memberof api.
|
|
23290
|
+
* OTOpComponent opComponent.
|
|
23291
|
+
* @member {"skip"|"delete"|"insert"|undefined} opComponent
|
|
23292
|
+
* @memberof api.OTOpComponent
|
|
23293
23293
|
* @instance
|
|
23294
23294
|
*/
|
|
23295
|
-
Object.defineProperty(
|
|
23295
|
+
Object.defineProperty(OTOpComponent.prototype, "opComponent", {
|
|
23296
23296
|
get: $util.oneOfGetter($oneOfFields = ["skip", "delete", "insert"]),
|
|
23297
23297
|
set: $util.oneOfSetter($oneOfFields)
|
|
23298
23298
|
});
|
|
23299
23299
|
|
|
23300
23300
|
/**
|
|
23301
|
-
* Creates a new
|
|
23301
|
+
* Creates a new OTOpComponent instance using the specified properties.
|
|
23302
23302
|
* @function create
|
|
23303
|
-
* @memberof api.
|
|
23303
|
+
* @memberof api.OTOpComponent
|
|
23304
23304
|
* @static
|
|
23305
|
-
* @param {api.
|
|
23306
|
-
* @returns {api.
|
|
23305
|
+
* @param {api.IOTOpComponent=} [properties] Properties to set
|
|
23306
|
+
* @returns {api.OTOpComponent} OTOpComponent instance
|
|
23307
23307
|
*/
|
|
23308
|
-
|
|
23309
|
-
return
|
|
23308
|
+
OTOpComponent.create = function create(properties) {
|
|
23309
|
+
return OTOpComponent.fromObject(properties);
|
|
23310
23310
|
};
|
|
23311
23311
|
|
|
23312
23312
|
/**
|
|
23313
|
-
* Encodes the specified
|
|
23313
|
+
* Encodes the specified OTOpComponent message. Does not implicitly {@link api.OTOpComponent.verify|verify} messages.
|
|
23314
23314
|
* @function encode
|
|
23315
|
-
* @memberof api.
|
|
23315
|
+
* @memberof api.OTOpComponent
|
|
23316
23316
|
* @static
|
|
23317
|
-
* @param {api.
|
|
23317
|
+
* @param {api.OTOpComponent} message OTOpComponent message or plain object to encode
|
|
23318
23318
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23319
23319
|
* @returns {$protobuf.Writer} Writer
|
|
23320
23320
|
*/
|
|
23321
|
-
|
|
23321
|
+
OTOpComponent.encode = function encode(message, writer) {
|
|
23322
23322
|
if (!writer)
|
|
23323
23323
|
writer = $Writer.create();
|
|
23324
23324
|
if (message.skip != null && Object.hasOwnProperty.call(message, "skip"))
|
|
@@ -23331,33 +23331,33 @@
|
|
|
23331
23331
|
};
|
|
23332
23332
|
|
|
23333
23333
|
/**
|
|
23334
|
-
* Encodes the specified
|
|
23334
|
+
* Encodes the specified OTOpComponent message, length delimited. Does not implicitly {@link api.OTOpComponent.verify|verify} messages.
|
|
23335
23335
|
* @function encodeDelimited
|
|
23336
|
-
* @memberof api.
|
|
23336
|
+
* @memberof api.OTOpComponent
|
|
23337
23337
|
* @static
|
|
23338
|
-
* @param {api.
|
|
23338
|
+
* @param {api.OTOpComponent} message OTOpComponent message or plain object to encode
|
|
23339
23339
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23340
23340
|
* @returns {$protobuf.Writer} Writer
|
|
23341
23341
|
*/
|
|
23342
|
-
|
|
23342
|
+
OTOpComponent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23343
23343
|
return this.encode(message, writer).ldelim();
|
|
23344
23344
|
};
|
|
23345
23345
|
|
|
23346
23346
|
/**
|
|
23347
|
-
* Decodes a
|
|
23347
|
+
* Decodes a OTOpComponent message from the specified reader or buffer.
|
|
23348
23348
|
* @function decode
|
|
23349
|
-
* @memberof api.
|
|
23349
|
+
* @memberof api.OTOpComponent
|
|
23350
23350
|
* @static
|
|
23351
23351
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23352
23352
|
* @param {number} [length] Message length if known beforehand
|
|
23353
|
-
* @returns {api.
|
|
23353
|
+
* @returns {api.OTOpComponent} OTOpComponent
|
|
23354
23354
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23355
23355
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23356
23356
|
*/
|
|
23357
|
-
|
|
23357
|
+
OTOpComponent.decode = function decode(reader, length) {
|
|
23358
23358
|
if (!(reader instanceof $Reader))
|
|
23359
23359
|
reader = $Reader.create(reader);
|
|
23360
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.
|
|
23360
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.OTOpComponent();
|
|
23361
23361
|
while (reader.pos < end) {
|
|
23362
23362
|
var tag = reader.uint32();
|
|
23363
23363
|
switch (tag >>> 3) {
|
|
@@ -23379,49 +23379,49 @@
|
|
|
23379
23379
|
};
|
|
23380
23380
|
|
|
23381
23381
|
/**
|
|
23382
|
-
* Decodes a
|
|
23382
|
+
* Decodes a OTOpComponent message from the specified reader or buffer, length delimited.
|
|
23383
23383
|
* @function decodeDelimited
|
|
23384
|
-
* @memberof api.
|
|
23384
|
+
* @memberof api.OTOpComponent
|
|
23385
23385
|
* @static
|
|
23386
23386
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23387
|
-
* @returns {api.
|
|
23387
|
+
* @returns {api.OTOpComponent} OTOpComponent
|
|
23388
23388
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23389
23389
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23390
23390
|
*/
|
|
23391
|
-
|
|
23391
|
+
OTOpComponent.decodeDelimited = function decodeDelimited(reader) {
|
|
23392
23392
|
if (!(reader instanceof $Reader))
|
|
23393
23393
|
reader = new $Reader(reader);
|
|
23394
23394
|
return this.decode(reader, reader.uint32());
|
|
23395
23395
|
};
|
|
23396
23396
|
|
|
23397
23397
|
/**
|
|
23398
|
-
* Verifies a
|
|
23398
|
+
* Verifies a OTOpComponent message.
|
|
23399
23399
|
* @function verify
|
|
23400
|
-
* @memberof api.
|
|
23400
|
+
* @memberof api.OTOpComponent
|
|
23401
23401
|
* @static
|
|
23402
23402
|
* @param {Object.<string,*>} message Plain object to verify
|
|
23403
23403
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23404
23404
|
*/
|
|
23405
|
-
|
|
23405
|
+
OTOpComponent.verify = function verify(message) {
|
|
23406
23406
|
if (typeof message !== "object" || message === null)
|
|
23407
23407
|
return "object expected";
|
|
23408
23408
|
var properties = {};
|
|
23409
23409
|
if (message.skip != null && message.hasOwnProperty("skip")) {
|
|
23410
|
-
properties.
|
|
23410
|
+
properties.opComponent = 1;
|
|
23411
23411
|
if (!$util.isInteger(message.skip))
|
|
23412
23412
|
return "skip: integer expected";
|
|
23413
23413
|
}
|
|
23414
23414
|
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
23415
|
-
if (properties.
|
|
23416
|
-
return "
|
|
23417
|
-
properties.
|
|
23415
|
+
if (properties.opComponent === 1)
|
|
23416
|
+
return "opComponent: multiple values";
|
|
23417
|
+
properties.opComponent = 1;
|
|
23418
23418
|
if (!$util.isInteger(message["delete"]))
|
|
23419
23419
|
return "delete: integer expected";
|
|
23420
23420
|
}
|
|
23421
23421
|
if (message.insert != null && message.hasOwnProperty("insert")) {
|
|
23422
|
-
if (properties.
|
|
23423
|
-
return "
|
|
23424
|
-
properties.
|
|
23422
|
+
if (properties.opComponent === 1)
|
|
23423
|
+
return "opComponent: multiple values";
|
|
23424
|
+
properties.opComponent = 1;
|
|
23425
23425
|
if (!$util.isString(message.insert))
|
|
23426
23426
|
return "insert: string expected";
|
|
23427
23427
|
}
|
|
@@ -23429,17 +23429,17 @@
|
|
|
23429
23429
|
};
|
|
23430
23430
|
|
|
23431
23431
|
/**
|
|
23432
|
-
* Creates a
|
|
23432
|
+
* Creates a OTOpComponent message from a plain object. Also converts values to their respective internal types.
|
|
23433
23433
|
* @function fromObject
|
|
23434
|
-
* @memberof api.
|
|
23434
|
+
* @memberof api.OTOpComponent
|
|
23435
23435
|
* @static
|
|
23436
23436
|
* @param {Object.<string,*>} object Plain object
|
|
23437
|
-
* @returns {api.
|
|
23437
|
+
* @returns {api.OTOpComponent} OTOpComponent
|
|
23438
23438
|
*/
|
|
23439
|
-
|
|
23440
|
-
if (object instanceof $root.api.
|
|
23439
|
+
OTOpComponent.fromObject = function fromObject(object) {
|
|
23440
|
+
if (object instanceof $root.api.OTOpComponent)
|
|
23441
23441
|
return object;
|
|
23442
|
-
var message = new $root.api.
|
|
23442
|
+
var message = new $root.api.OTOpComponent();
|
|
23443
23443
|
if (object.skip != null)
|
|
23444
23444
|
message.skip = object.skip >>> 0;
|
|
23445
23445
|
if (object["delete"] != null)
|
|
@@ -23450,48 +23450,48 @@
|
|
|
23450
23450
|
};
|
|
23451
23451
|
|
|
23452
23452
|
/**
|
|
23453
|
-
* Creates a plain object from a
|
|
23453
|
+
* Creates a plain object from a OTOpComponent message. Also converts values to other types if specified.
|
|
23454
23454
|
* @function toObject
|
|
23455
|
-
* @memberof api.
|
|
23455
|
+
* @memberof api.OTOpComponent
|
|
23456
23456
|
* @static
|
|
23457
|
-
* @param {api.
|
|
23457
|
+
* @param {api.OTOpComponent} message OTOpComponent
|
|
23458
23458
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23459
23459
|
* @returns {Object.<string,*>} Plain object
|
|
23460
23460
|
*/
|
|
23461
|
-
|
|
23461
|
+
OTOpComponent.toObject = function toObject(message, options) {
|
|
23462
23462
|
if (!options)
|
|
23463
23463
|
options = {};
|
|
23464
23464
|
var object = {};
|
|
23465
23465
|
if (message.skip != null && message.hasOwnProperty("skip")) {
|
|
23466
23466
|
object.skip = message.skip;
|
|
23467
23467
|
if (options.oneofs)
|
|
23468
|
-
object.
|
|
23468
|
+
object.opComponent = "skip";
|
|
23469
23469
|
}
|
|
23470
23470
|
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
23471
23471
|
object["delete"] = message["delete"];
|
|
23472
23472
|
if (options.oneofs)
|
|
23473
|
-
object.
|
|
23473
|
+
object.opComponent = "delete";
|
|
23474
23474
|
}
|
|
23475
23475
|
if (message.insert != null && message.hasOwnProperty("insert")) {
|
|
23476
23476
|
object.insert = message.insert;
|
|
23477
23477
|
if (options.oneofs)
|
|
23478
|
-
object.
|
|
23478
|
+
object.opComponent = "insert";
|
|
23479
23479
|
}
|
|
23480
23480
|
return object;
|
|
23481
23481
|
};
|
|
23482
23482
|
|
|
23483
23483
|
/**
|
|
23484
|
-
* Converts this
|
|
23484
|
+
* Converts this OTOpComponent to JSON.
|
|
23485
23485
|
* @function toJSON
|
|
23486
|
-
* @memberof api.
|
|
23486
|
+
* @memberof api.OTOpComponent
|
|
23487
23487
|
* @instance
|
|
23488
23488
|
* @returns {Object.<string,*>} JSON object
|
|
23489
23489
|
*/
|
|
23490
|
-
|
|
23490
|
+
OTOpComponent.prototype.toJSON = function toJSON() {
|
|
23491
23491
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23492
23492
|
};
|
|
23493
23493
|
|
|
23494
|
-
return
|
|
23494
|
+
return OTOpComponent;
|
|
23495
23495
|
})();
|
|
23496
23496
|
|
|
23497
23497
|
api.OTStatus = (function() {
|
package/main/index.js.flow
CHANGED
|
@@ -95,7 +95,7 @@ declare var npm$namespace$api: {|
|
|
|
95
95
|
IOTTransformSelectionRequest: Class<api$IOTTransformSelectionRequest>,
|
|
96
96
|
IOTTransformSelectionResponse: Class<api$IOTTransformSelectionResponse>,
|
|
97
97
|
IOTPacket: Class<api$IOTPacket>,
|
|
98
|
-
|
|
98
|
+
IOTOpComponent: Class<api$IOTOpComponent>,
|
|
99
99
|
IOTStatus: Class<api$IOTStatus>,
|
|
100
100
|
IOTCursor: Class<api$IOTCursor>,
|
|
101
101
|
IChatMessage: Class<api$IChatMessage>,
|
|
@@ -264,7 +264,7 @@ declare var npm$namespace$api: {|
|
|
|
264
264
|
OTTransformSelectionRequest: typeof api$OTTransformSelectionRequest,
|
|
265
265
|
OTTransformSelectionResponse: typeof api$OTTransformSelectionResponse,
|
|
266
266
|
OTPacket: typeof api$OTPacket,
|
|
267
|
-
|
|
267
|
+
OTOpComponent: typeof api$OTOpComponent,
|
|
268
268
|
OTStatus: typeof api$OTStatus,
|
|
269
269
|
OTCursor: typeof api$OTCursor,
|
|
270
270
|
ChatMessage: typeof api$ChatMessage,
|
|
@@ -12389,9 +12389,9 @@ declare type api$IOTPacket = {|
|
|
|
12389
12389
|
version?: number | null,
|
|
12390
12390
|
|
|
12391
12391
|
/**
|
|
12392
|
-
* OTPacket
|
|
12392
|
+
* OTPacket op
|
|
12393
12393
|
*/
|
|
12394
|
-
|
|
12394
|
+
op?: (api$OTOpComponent | api$IOTOpComponent)[] | null,
|
|
12395
12395
|
|
|
12396
12396
|
/**
|
|
12397
12397
|
* OTPacket crc32
|
|
@@ -12435,9 +12435,9 @@ declare class api$OTPacket {
|
|
|
12435
12435
|
version: number;
|
|
12436
12436
|
|
|
12437
12437
|
/**
|
|
12438
|
-
* OTPacket
|
|
12438
|
+
* OTPacket op.
|
|
12439
12439
|
*/
|
|
12440
|
-
|
|
12440
|
+
op: api$OTOpComponent[];
|
|
12441
12441
|
|
|
12442
12442
|
/**
|
|
12443
12443
|
* OTPacket crc32.
|
|
@@ -12551,110 +12551,110 @@ declare class api$OTPacket {
|
|
|
12551
12551
|
}
|
|
12552
12552
|
|
|
12553
12553
|
/**
|
|
12554
|
-
* Properties of a
|
|
12554
|
+
* Properties of a OTOpComponent.
|
|
12555
12555
|
*/
|
|
12556
|
-
declare type api$
|
|
12556
|
+
declare type api$IOTOpComponent = {|
|
|
12557
12557
|
/**
|
|
12558
|
-
*
|
|
12558
|
+
* OTOpComponent skip
|
|
12559
12559
|
*/
|
|
12560
12560
|
skip?: number | null,
|
|
12561
12561
|
|
|
12562
12562
|
/**
|
|
12563
|
-
*
|
|
12563
|
+
* OTOpComponent delete
|
|
12564
12564
|
*/
|
|
12565
12565
|
delete?: number | null,
|
|
12566
12566
|
|
|
12567
12567
|
/**
|
|
12568
|
-
*
|
|
12568
|
+
* OTOpComponent insert
|
|
12569
12569
|
*/
|
|
12570
12570
|
insert?: string | null,
|
|
12571
12571
|
|};
|
|
12572
12572
|
|
|
12573
12573
|
/**
|
|
12574
|
-
* Represents a
|
|
12574
|
+
* Represents a OTOpComponent.
|
|
12575
12575
|
*/
|
|
12576
|
-
declare class api$
|
|
12576
|
+
declare class api$OTOpComponent {
|
|
12577
12577
|
/**
|
|
12578
|
-
* Constructs a new
|
|
12578
|
+
* Constructs a new OTOpComponent.
|
|
12579
12579
|
* @param [properties] Properties to set
|
|
12580
12580
|
*/
|
|
12581
|
-
constructor(properties?: api$
|
|
12581
|
+
constructor(properties?: api$IOTOpComponent): this;
|
|
12582
12582
|
|
|
12583
12583
|
/**
|
|
12584
|
-
*
|
|
12584
|
+
* OTOpComponent skip.
|
|
12585
12585
|
*/
|
|
12586
12586
|
skip?: number | null;
|
|
12587
12587
|
|
|
12588
12588
|
/**
|
|
12589
|
-
*
|
|
12589
|
+
* OTOpComponent delete.
|
|
12590
12590
|
*/
|
|
12591
12591
|
delete?: number | null;
|
|
12592
12592
|
|
|
12593
12593
|
/**
|
|
12594
|
-
*
|
|
12594
|
+
* OTOpComponent insert.
|
|
12595
12595
|
*/
|
|
12596
12596
|
insert?: string | null;
|
|
12597
12597
|
|
|
12598
12598
|
/**
|
|
12599
|
-
*
|
|
12599
|
+
* OTOpComponent opComponent.
|
|
12600
12600
|
*/
|
|
12601
|
-
|
|
12601
|
+
opComponent?: "skip" | "delete" | "insert";
|
|
12602
12602
|
|
|
12603
12603
|
/**
|
|
12604
|
-
* Creates a new
|
|
12604
|
+
* Creates a new OTOpComponent instance using the specified properties.
|
|
12605
12605
|
* @param [properties] Properties to set
|
|
12606
|
-
* @returns
|
|
12606
|
+
* @returns OTOpComponent instance
|
|
12607
12607
|
*/
|
|
12608
|
-
static create(properties?: api$
|
|
12608
|
+
static create(properties?: api$IOTOpComponent): api$OTOpComponent;
|
|
12609
12609
|
|
|
12610
12610
|
/**
|
|
12611
12611
|
* [object Object],[object Object],[object Object]
|
|
12612
|
-
* @param message
|
|
12612
|
+
* @param message OTOpComponent message or plain object to encode
|
|
12613
12613
|
* @param [writer] Writer to encode to
|
|
12614
12614
|
* @returns Writer
|
|
12615
12615
|
*/
|
|
12616
12616
|
static encode(
|
|
12617
|
-
message: api$
|
|
12617
|
+
message: api$OTOpComponent,
|
|
12618
12618
|
writer?: $protobuf.Writer
|
|
12619
12619
|
): $protobuf.Writer;
|
|
12620
12620
|
|
|
12621
12621
|
/**
|
|
12622
12622
|
* [object Object],[object Object],[object Object]
|
|
12623
|
-
* @param message
|
|
12623
|
+
* @param message OTOpComponent message or plain object to encode
|
|
12624
12624
|
* @param [writer] Writer to encode to
|
|
12625
12625
|
* @returns Writer
|
|
12626
12626
|
*/
|
|
12627
12627
|
static encodeDelimited(
|
|
12628
|
-
message: api$
|
|
12628
|
+
message: api$OTOpComponent,
|
|
12629
12629
|
writer?: $protobuf.Writer
|
|
12630
12630
|
): $protobuf.Writer;
|
|
12631
12631
|
|
|
12632
12632
|
/**
|
|
12633
|
-
* Decodes a
|
|
12633
|
+
* Decodes a OTOpComponent message from the specified reader or buffer.
|
|
12634
12634
|
* @param reader Reader or buffer to decode from
|
|
12635
12635
|
* @param [length] Message length if known beforehand
|
|
12636
|
-
* @returns
|
|
12636
|
+
* @returns OTOpComponent
|
|
12637
12637
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12638
12638
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12639
12639
|
*/
|
|
12640
12640
|
static decode(
|
|
12641
12641
|
reader: $protobuf.Reader | Uint8Array,
|
|
12642
12642
|
length?: number
|
|
12643
|
-
): api$
|
|
12643
|
+
): api$OTOpComponent;
|
|
12644
12644
|
|
|
12645
12645
|
/**
|
|
12646
|
-
* Decodes a
|
|
12646
|
+
* Decodes a OTOpComponent message from the specified reader or buffer, length delimited.
|
|
12647
12647
|
* @param reader Reader or buffer to decode from
|
|
12648
|
-
* @returns
|
|
12648
|
+
* @returns OTOpComponent
|
|
12649
12649
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12650
12650
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12651
12651
|
*/
|
|
12652
12652
|
static decodeDelimited(
|
|
12653
12653
|
reader: $protobuf.Reader | Uint8Array
|
|
12654
|
-
): api$
|
|
12654
|
+
): api$OTOpComponent;
|
|
12655
12655
|
|
|
12656
12656
|
/**
|
|
12657
|
-
* Verifies a
|
|
12657
|
+
* Verifies a OTOpComponent message.
|
|
12658
12658
|
* @param message Plain object to verify
|
|
12659
12659
|
* @returns `null` if valid, otherwise the reason why it is not
|
|
12660
12660
|
*/
|
|
@@ -12663,29 +12663,29 @@ declare class api$OTRuneTransformOp {
|
|
|
12663
12663
|
|}): string | null;
|
|
12664
12664
|
|
|
12665
12665
|
/**
|
|
12666
|
-
* Creates a
|
|
12666
|
+
* Creates a OTOpComponent message from a plain object. Also converts values to their respective internal types.
|
|
12667
12667
|
* @param object Plain object
|
|
12668
|
-
* @returns
|
|
12668
|
+
* @returns OTOpComponent
|
|
12669
12669
|
*/
|
|
12670
12670
|
static fromObject(object: {|
|
|
12671
12671
|
[k: string]: any,
|
|
12672
|
-
|}): api$
|
|
12672
|
+
|}): api$OTOpComponent;
|
|
12673
12673
|
|
|
12674
12674
|
/**
|
|
12675
|
-
* Creates a plain object from a
|
|
12676
|
-
* @param message
|
|
12675
|
+
* Creates a plain object from a OTOpComponent message. Also converts values to other types if specified.
|
|
12676
|
+
* @param message OTOpComponent
|
|
12677
12677
|
* @param [options] Conversion options
|
|
12678
12678
|
* @returns Plain object
|
|
12679
12679
|
*/
|
|
12680
12680
|
static toObject(
|
|
12681
|
-
message: api$
|
|
12681
|
+
message: api$OTOpComponent,
|
|
12682
12682
|
options?: $protobuf.IConversionOptions
|
|
12683
12683
|
): {|
|
|
12684
12684
|
[k: string]: any,
|
|
12685
12685
|
|};
|
|
12686
12686
|
|
|
12687
12687
|
/**
|
|
12688
|
-
* Converts this
|
|
12688
|
+
* Converts this OTOpComponent to JSON.
|
|
12689
12689
|
* @returns JSON object
|
|
12690
12690
|
*/
|
|
12691
12691
|
toJSON(): {|
|