@replit/protocol 0.3.8 → 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
@@ -24352,6 +24352,12 @@ export namespace replit {
24352
24352
 
24353
24353
  /** Repl userId */
24354
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);
24355
24361
  }
24356
24362
 
24357
24363
  /** Represents a Repl. */
@@ -24390,6 +24396,12 @@ export namespace replit {
24390
24396
  /** Repl userId. */
24391
24397
  public userId?: (replit.goval.api.repl.UserId|null);
24392
24398
 
24399
+ /** Repl isTeam. */
24400
+ public isTeam: boolean;
24401
+
24402
+ /** Repl roles. */
24403
+ public roles: string[];
24404
+
24393
24405
  /**
24394
24406
  * Creates a new Repl instance using the specified properties.
24395
24407
  * @param [properties] Properties to set
package/main/index.js CHANGED
@@ -60658,6 +60658,8 @@
60658
60658
  * @property {string|null} [database] Repl database
60659
60659
  * @property {replit.goval.api.repl.Buckets|replit.goval.api.repl.IBuckets|null} [buckets] Repl buckets
60660
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
60661
60663
  */
60662
60664
 
60663
60665
  /**
@@ -60668,6 +60670,7 @@
60668
60670
  * @param {replit.goval.api.repl.IRepl=} [properties] Properties to set
60669
60671
  */
60670
60672
  function Repl(properties) {
60673
+ this.roles = [];
60671
60674
  if (properties)
60672
60675
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
60673
60676
  if (properties[keys[i]] != null)
@@ -60746,6 +60749,22 @@
60746
60749
  */
60747
60750
  Repl.prototype.userId = null;
60748
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
+
60749
60768
  /**
60750
60769
  * Creates a new Repl instance using the specified properties.
60751
60770
  * @function create
@@ -60788,6 +60807,11 @@
60788
60807
  $root.replit.goval.api.repl.Buckets.encode(message.buckets, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
60789
60808
  if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
60790
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]);
60791
60815
  return writer;
60792
60816
  };
60793
60817
 
@@ -60849,6 +60873,14 @@
60849
60873
  case 9:
60850
60874
  message.userId = $root.replit.goval.api.repl.UserId.decode(reader, reader.uint32());
60851
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;
60852
60884
  default:
60853
60885
  reader.skipType(tag & 7);
60854
60886
  break;
@@ -60915,6 +60947,16 @@
60915
60947
  if (error)
60916
60948
  return "userId." + error;
60917
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
+ }
60918
60960
  return null;
60919
60961
  };
60920
60962
 
@@ -60954,6 +60996,15 @@
60954
60996
  throw TypeError(".replit.goval.api.repl.Repl.userId: object expected");
60955
60997
  message.userId = $root.replit.goval.api.repl.UserId.fromObject(object.userId);
60956
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
+ }
60957
61008
  return message;
60958
61009
  };
60959
61010
 
@@ -60970,6 +61021,8 @@
60970
61021
  if (!options)
60971
61022
  options = {};
60972
61023
  var object = {};
61024
+ if (options.arrays || options.defaults)
61025
+ object.roles = [];
60973
61026
  if (options.defaults) {
60974
61027
  object.id = "";
60975
61028
  object.language = "";
@@ -60980,6 +61033,7 @@
60980
61033
  object.database = "";
60981
61034
  object.buckets = null;
60982
61035
  object.userId = null;
61036
+ object.isTeam = false;
60983
61037
  }
60984
61038
  if (message.id != null && message.hasOwnProperty("id"))
60985
61039
  object.id = message.id;
@@ -60999,6 +61053,13 @@
60999
61053
  object.buckets = $root.replit.goval.api.repl.Buckets.toObject(message.buckets, options);
61000
61054
  if (message.userId != null && message.hasOwnProperty("userId"))
61001
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
+ }
61002
61063
  return object;
61003
61064
  };
61004
61065
 
@@ -34741,6 +34741,16 @@ declare type replit$goval$api$repl$IRepl = {|
34741
34741
  * Repl userId
34742
34742
  */
34743
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,
34744
34754
  |};
34745
34755
 
34746
34756
  /**
@@ -34798,6 +34808,16 @@ declare class replit$goval$api$repl$Repl {
34798
34808
  */
34799
34809
  userId?: replit$goval$api$repl$UserId | null;
34800
34810
 
34811
+ /**
34812
+ * Repl isTeam.
34813
+ */
34814
+ isTeam: boolean;
34815
+
34816
+ /**
34817
+ * Repl roles.
34818
+ */
34819
+ roles: string[];
34820
+
34801
34821
  /**
34802
34822
  * Creates a new Repl instance using the specified properties.
34803
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.8",
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",