@replit/protocol 0.3.7 → 0.3.9

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/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # Publishing
2
+
3
+ After your `.proto` changes are merged:
4
+ - create a new branch
5
+ - cd into `api/npm`
6
+ - `npm --no-git-tag-version version <new-version>`
7
+ - submit a pull request
8
+ - merged
9
+ - pull latest `main`
10
+ - cd into `api/npm`
11
+ - `npm login` if you're not authed (will need to be in our npm org)
12
+ - `npm publish
13
+ - it will run a build
14
+ - you be asked for 2fa
15
+ - package will be published
package/main/index.d.ts CHANGED
@@ -22700,6 +22700,12 @@ export namespace replit {
22700
22700
 
22701
22701
  /** GovalReplIdentity buildInfo */
22702
22702
  buildInfo?: (replit.goval.api.repl.BuildInfo|replit.goval.api.repl.IBuildInfo|null);
22703
+
22704
+ /** GovalReplIdentity isTeam */
22705
+ isTeam?: (boolean|null);
22706
+
22707
+ /** GovalReplIdentity roles */
22708
+ roles?: (string[]|null);
22703
22709
  }
22704
22710
 
22705
22711
  /** Represents a GovalReplIdentity. */
@@ -22735,6 +22741,12 @@ export namespace replit {
22735
22741
  /** GovalReplIdentity buildInfo. */
22736
22742
  public buildInfo?: (replit.goval.api.repl.BuildInfo|null);
22737
22743
 
22744
+ /** GovalReplIdentity isTeam. */
22745
+ public isTeam: boolean;
22746
+
22747
+ /** GovalReplIdentity roles. */
22748
+ public roles: string[];
22749
+
22738
22750
  /**
22739
22751
  * Creates a new GovalReplIdentity instance using the specified properties.
22740
22752
  * @param [properties] Properties to set
@@ -24340,6 +24352,12 @@ export namespace replit {
24340
24352
 
24341
24353
  /** Repl userId */
24342
24354
  userId?: (replit.goval.api.repl.UserId|replit.goval.api.repl.IUserId|null);
24355
+
24356
+ /** Repl isTeam */
24357
+ isTeam?: (boolean|null);
24358
+
24359
+ /** Repl roles */
24360
+ roles?: (string[]|null);
24343
24361
  }
24344
24362
 
24345
24363
  /** Represents a Repl. */
@@ -24378,6 +24396,12 @@ export namespace replit {
24378
24396
  /** Repl userId. */
24379
24397
  public userId?: (replit.goval.api.repl.UserId|null);
24380
24398
 
24399
+ /** Repl isTeam. */
24400
+ public isTeam: boolean;
24401
+
24402
+ /** Repl roles. */
24403
+ public roles: string[];
24404
+
24381
24405
  /**
24382
24406
  * Creates a new Repl instance using the specified properties.
24383
24407
  * @param [properties] Properties to set
package/main/index.js CHANGED
@@ -56642,6 +56642,8 @@
56642
56642
  * @property {string|null} [originReplid] GovalReplIdentity originReplid
56643
56643
  * @property {number|null} [userId] GovalReplIdentity userId
56644
56644
  * @property {replit.goval.api.repl.BuildInfo|replit.goval.api.repl.IBuildInfo|null} [buildInfo] GovalReplIdentity buildInfo
56645
+ * @property {boolean|null} [isTeam] GovalReplIdentity isTeam
56646
+ * @property {Array.<string>|null} [roles] GovalReplIdentity roles
56645
56647
  */
56646
56648
 
56647
56649
  /**
@@ -56652,6 +56654,7 @@
56652
56654
  * @param {replit.goval.api.IGovalReplIdentity=} [properties] Properties to set
56653
56655
  */
56654
56656
  function GovalReplIdentity(properties) {
56657
+ this.roles = [];
56655
56658
  if (properties)
56656
56659
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
56657
56660
  if (properties[keys[i]] != null)
@@ -56722,6 +56725,22 @@
56722
56725
  */
56723
56726
  GovalReplIdentity.prototype.buildInfo = null;
56724
56727
 
56728
+ /**
56729
+ * GovalReplIdentity isTeam.
56730
+ * @member {boolean} isTeam
56731
+ * @memberof replit.goval.api.GovalReplIdentity
56732
+ * @instance
56733
+ */
56734
+ GovalReplIdentity.prototype.isTeam = false;
56735
+
56736
+ /**
56737
+ * GovalReplIdentity roles.
56738
+ * @member {Array.<string>} roles
56739
+ * @memberof replit.goval.api.GovalReplIdentity
56740
+ * @instance
56741
+ */
56742
+ GovalReplIdentity.prototype.roles = $util.emptyArray;
56743
+
56725
56744
  /**
56726
56745
  * Creates a new GovalReplIdentity instance using the specified properties.
56727
56746
  * @function create
@@ -56762,6 +56781,11 @@
56762
56781
  writer.uint32(/* id 7, wireType 0 =*/56).int64(message.userId);
56763
56782
  if (message.buildInfo != null && Object.hasOwnProperty.call(message, "buildInfo"))
56764
56783
  $root.replit.goval.api.repl.BuildInfo.encode(message.buildInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
56784
+ if (message.isTeam != null && Object.hasOwnProperty.call(message, "isTeam"))
56785
+ writer.uint32(/* id 9, wireType 0 =*/72).bool(message.isTeam);
56786
+ if (message.roles != null && message.roles.length)
56787
+ for (var i = 0; i < message.roles.length; ++i)
56788
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.roles[i]);
56765
56789
  return writer;
56766
56790
  };
56767
56791
 
@@ -56820,6 +56844,14 @@
56820
56844
  case 8:
56821
56845
  message.buildInfo = $root.replit.goval.api.repl.BuildInfo.decode(reader, reader.uint32());
56822
56846
  break;
56847
+ case 9:
56848
+ message.isTeam = reader.bool();
56849
+ break;
56850
+ case 10:
56851
+ if (!(message.roles && message.roles.length))
56852
+ message.roles = [];
56853
+ message.roles.push(reader.string());
56854
+ break;
56823
56855
  default:
56824
56856
  reader.skipType(tag & 7);
56825
56857
  break;
@@ -56881,6 +56913,16 @@
56881
56913
  if (error)
56882
56914
  return "buildInfo." + error;
56883
56915
  }
56916
+ if (message.isTeam != null && message.hasOwnProperty("isTeam"))
56917
+ if (typeof message.isTeam !== "boolean")
56918
+ return "isTeam: boolean expected";
56919
+ if (message.roles != null && message.hasOwnProperty("roles")) {
56920
+ if (!Array.isArray(message.roles))
56921
+ return "roles: array expected";
56922
+ for (var i = 0; i < message.roles.length; ++i)
56923
+ if (!$util.isString(message.roles[i]))
56924
+ return "roles: string[] expected";
56925
+ }
56884
56926
  return null;
56885
56927
  };
56886
56928
 
@@ -56922,6 +56964,15 @@
56922
56964
  throw TypeError(".replit.goval.api.GovalReplIdentity.buildInfo: object expected");
56923
56965
  message.buildInfo = $root.replit.goval.api.repl.BuildInfo.fromObject(object.buildInfo);
56924
56966
  }
56967
+ if (object.isTeam != null)
56968
+ message.isTeam = Boolean(object.isTeam);
56969
+ if (object.roles) {
56970
+ if (!Array.isArray(object.roles))
56971
+ throw TypeError(".replit.goval.api.GovalReplIdentity.roles: array expected");
56972
+ message.roles = [];
56973
+ for (var i = 0; i < object.roles.length; ++i)
56974
+ message.roles[i] = String(object.roles[i]);
56975
+ }
56925
56976
  return message;
56926
56977
  };
56927
56978
 
@@ -56938,6 +56989,8 @@
56938
56989
  if (!options)
56939
56990
  options = {};
56940
56991
  var object = {};
56992
+ if (options.arrays || options.defaults)
56993
+ object.roles = [];
56941
56994
  if (options.defaults) {
56942
56995
  object.replid = "";
56943
56996
  object.user = "";
@@ -56951,6 +57004,7 @@
56951
57004
  } else
56952
57005
  object.userId = options.longs === String ? "0" : 0;
56953
57006
  object.buildInfo = null;
57007
+ object.isTeam = false;
56954
57008
  }
56955
57009
  if (message.replid != null && message.hasOwnProperty("replid"))
56956
57010
  object.replid = message.replid;
@@ -56971,6 +57025,13 @@
56971
57025
  object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId;
56972
57026
  if (message.buildInfo != null && message.hasOwnProperty("buildInfo"))
56973
57027
  object.buildInfo = $root.replit.goval.api.repl.BuildInfo.toObject(message.buildInfo, options);
57028
+ if (message.isTeam != null && message.hasOwnProperty("isTeam"))
57029
+ object.isTeam = message.isTeam;
57030
+ if (message.roles && message.roles.length) {
57031
+ object.roles = [];
57032
+ for (var j = 0; j < message.roles.length; ++j)
57033
+ object.roles[j] = message.roles[j];
57034
+ }
56974
57035
  return object;
56975
57036
  };
56976
57037
 
@@ -60597,6 +60658,8 @@
60597
60658
  * @property {string|null} [database] Repl database
60598
60659
  * @property {replit.goval.api.repl.Buckets|replit.goval.api.repl.IBuckets|null} [buckets] Repl buckets
60599
60660
  * @property {replit.goval.api.repl.UserId|replit.goval.api.repl.IUserId|null} [userId] Repl userId
60661
+ * @property {boolean|null} [isTeam] Repl isTeam
60662
+ * @property {Array.<string>|null} [roles] Repl roles
60600
60663
  */
60601
60664
 
60602
60665
  /**
@@ -60607,6 +60670,7 @@
60607
60670
  * @param {replit.goval.api.repl.IRepl=} [properties] Properties to set
60608
60671
  */
60609
60672
  function Repl(properties) {
60673
+ this.roles = [];
60610
60674
  if (properties)
60611
60675
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
60612
60676
  if (properties[keys[i]] != null)
@@ -60685,6 +60749,22 @@
60685
60749
  */
60686
60750
  Repl.prototype.userId = null;
60687
60751
 
60752
+ /**
60753
+ * Repl isTeam.
60754
+ * @member {boolean} isTeam
60755
+ * @memberof replit.goval.api.repl.Repl
60756
+ * @instance
60757
+ */
60758
+ Repl.prototype.isTeam = false;
60759
+
60760
+ /**
60761
+ * Repl roles.
60762
+ * @member {Array.<string>} roles
60763
+ * @memberof replit.goval.api.repl.Repl
60764
+ * @instance
60765
+ */
60766
+ Repl.prototype.roles = $util.emptyArray;
60767
+
60688
60768
  /**
60689
60769
  * Creates a new Repl instance using the specified properties.
60690
60770
  * @function create
@@ -60727,6 +60807,11 @@
60727
60807
  $root.replit.goval.api.repl.Buckets.encode(message.buckets, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
60728
60808
  if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
60729
60809
  $root.replit.goval.api.repl.UserId.encode(message.userId, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
60810
+ if (message.isTeam != null && Object.hasOwnProperty.call(message, "isTeam"))
60811
+ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isTeam);
60812
+ if (message.roles != null && message.roles.length)
60813
+ for (var i = 0; i < message.roles.length; ++i)
60814
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.roles[i]);
60730
60815
  return writer;
60731
60816
  };
60732
60817
 
@@ -60788,6 +60873,14 @@
60788
60873
  case 9:
60789
60874
  message.userId = $root.replit.goval.api.repl.UserId.decode(reader, reader.uint32());
60790
60875
  break;
60876
+ case 10:
60877
+ message.isTeam = reader.bool();
60878
+ break;
60879
+ case 11:
60880
+ if (!(message.roles && message.roles.length))
60881
+ message.roles = [];
60882
+ message.roles.push(reader.string());
60883
+ break;
60791
60884
  default:
60792
60885
  reader.skipType(tag & 7);
60793
60886
  break;
@@ -60854,6 +60947,16 @@
60854
60947
  if (error)
60855
60948
  return "userId." + error;
60856
60949
  }
60950
+ if (message.isTeam != null && message.hasOwnProperty("isTeam"))
60951
+ if (typeof message.isTeam !== "boolean")
60952
+ return "isTeam: boolean expected";
60953
+ if (message.roles != null && message.hasOwnProperty("roles")) {
60954
+ if (!Array.isArray(message.roles))
60955
+ return "roles: array expected";
60956
+ for (var i = 0; i < message.roles.length; ++i)
60957
+ if (!$util.isString(message.roles[i]))
60958
+ return "roles: string[] expected";
60959
+ }
60857
60960
  return null;
60858
60961
  };
60859
60962
 
@@ -60893,6 +60996,15 @@
60893
60996
  throw TypeError(".replit.goval.api.repl.Repl.userId: object expected");
60894
60997
  message.userId = $root.replit.goval.api.repl.UserId.fromObject(object.userId);
60895
60998
  }
60999
+ if (object.isTeam != null)
61000
+ message.isTeam = Boolean(object.isTeam);
61001
+ if (object.roles) {
61002
+ if (!Array.isArray(object.roles))
61003
+ throw TypeError(".replit.goval.api.repl.Repl.roles: array expected");
61004
+ message.roles = [];
61005
+ for (var i = 0; i < object.roles.length; ++i)
61006
+ message.roles[i] = String(object.roles[i]);
61007
+ }
60896
61008
  return message;
60897
61009
  };
60898
61010
 
@@ -60909,6 +61021,8 @@
60909
61021
  if (!options)
60910
61022
  options = {};
60911
61023
  var object = {};
61024
+ if (options.arrays || options.defaults)
61025
+ object.roles = [];
60912
61026
  if (options.defaults) {
60913
61027
  object.id = "";
60914
61028
  object.language = "";
@@ -60919,6 +61033,7 @@
60919
61033
  object.database = "";
60920
61034
  object.buckets = null;
60921
61035
  object.userId = null;
61036
+ object.isTeam = false;
60922
61037
  }
60923
61038
  if (message.id != null && message.hasOwnProperty("id"))
60924
61039
  object.id = message.id;
@@ -60938,6 +61053,13 @@
60938
61053
  object.buckets = $root.replit.goval.api.repl.Buckets.toObject(message.buckets, options);
60939
61054
  if (message.userId != null && message.hasOwnProperty("userId"))
60940
61055
  object.userId = $root.replit.goval.api.repl.UserId.toObject(message.userId, options);
61056
+ if (message.isTeam != null && message.hasOwnProperty("isTeam"))
61057
+ object.isTeam = message.isTeam;
61058
+ if (message.roles && message.roles.length) {
61059
+ object.roles = [];
61060
+ for (var j = 0; j < message.roles.length; ++j)
61061
+ object.roles[j] = message.roles[j];
61062
+ }
60941
61063
  return object;
60942
61064
  };
60943
61065
 
@@ -32367,6 +32367,16 @@ declare type replit$goval$api$IGovalReplIdentity = {|
32367
32367
  | replit$goval$api$repl$BuildInfo
32368
32368
  | replit$goval$api$repl$IBuildInfo
32369
32369
  | null,
32370
+
32371
+ /**
32372
+ * GovalReplIdentity isTeam
32373
+ */
32374
+ isTeam?: boolean | null,
32375
+
32376
+ /**
32377
+ * GovalReplIdentity roles
32378
+ */
32379
+ roles?: string[] | null,
32370
32380
  |};
32371
32381
 
32372
32382
  /**
@@ -32419,6 +32429,16 @@ declare class replit$goval$api$GovalReplIdentity {
32419
32429
  */
32420
32430
  buildInfo?: replit$goval$api$repl$BuildInfo | null;
32421
32431
 
32432
+ /**
32433
+ * GovalReplIdentity isTeam.
32434
+ */
32435
+ isTeam: boolean;
32436
+
32437
+ /**
32438
+ * GovalReplIdentity roles.
32439
+ */
32440
+ roles: string[];
32441
+
32422
32442
  /**
32423
32443
  * Creates a new GovalReplIdentity instance using the specified properties.
32424
32444
  * @param [properties] Properties to set
@@ -34721,6 +34741,16 @@ declare type replit$goval$api$repl$IRepl = {|
34721
34741
  * Repl userId
34722
34742
  */
34723
34743
  userId?: replit$goval$api$repl$UserId | replit$goval$api$repl$IUserId | null,
34744
+
34745
+ /**
34746
+ * Repl isTeam
34747
+ */
34748
+ isTeam?: boolean | null,
34749
+
34750
+ /**
34751
+ * Repl roles
34752
+ */
34753
+ roles?: string[] | null,
34724
34754
  |};
34725
34755
 
34726
34756
  /**
@@ -34778,6 +34808,16 @@ declare class replit$goval$api$repl$Repl {
34778
34808
  */
34779
34809
  userId?: replit$goval$api$repl$UserId | null;
34780
34810
 
34811
+ /**
34812
+ * Repl isTeam.
34813
+ */
34814
+ isTeam: boolean;
34815
+
34816
+ /**
34817
+ * Repl roles.
34818
+ */
34819
+ roles: string[];
34820
+
34781
34821
  /**
34782
34822
  * Creates a new Repl instance using the specified properties.
34783
34823
  * @param [properties] Properties to set
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replit/protocol",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "JavaScript bindings for the Replit protocol",
5
5
  "main": "main/index.js",
6
6
  "repository": "https://github.com/replit/protocol",