@rool-dev/extension 0.3.10 → 0.3.11-dev.a6ddf33

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.
@@ -5697,10 +5697,10 @@ var GraphQLClient = class {
5697
5697
  parentInteractionId: options.parentInteractionId
5698
5698
  })).prompt;
5699
5699
  }
5700
- async getAccount() {
5700
+ async getCurrentUser() {
5701
5701
  return (await this.request(`
5702
- query GetAccount {
5703
- getAccount {
5702
+ query GetCurrentUser {
5703
+ getCurrentUser {
5704
5704
  id
5705
5705
  email
5706
5706
  name
@@ -5714,14 +5714,26 @@ var GraphQLClient = class {
5714
5714
  storage
5715
5715
  }
5716
5716
  }
5717
- `)).getAccount;
5717
+ `)).getCurrentUser;
5718
5718
  }
5719
- async setSlug(slug) {
5720
- await this.request(`
5721
- mutation SetSlug($slug: String!) {
5722
- setSlug(slug: $slug)
5719
+ async updateCurrentUser(input) {
5720
+ return (await this.request(`
5721
+ mutation UpdateCurrentUser($input: UpdateCurrentUserInput!) {
5722
+ updateCurrentUser(input: $input) {
5723
+ id
5724
+ email
5725
+ name
5726
+ slug
5727
+ plan
5728
+ creditsBalance
5729
+ totalCreditsUsed
5730
+ createdAt
5731
+ lastActivity
5732
+ processedAt
5733
+ storage
5734
+ }
5723
5735
  }
5724
- `, { slug });
5736
+ `, { input })).updateCurrentUser;
5725
5737
  }
5726
5738
  async findExtensions(options) {
5727
5739
  return (await this.request(`
@@ -6493,7 +6505,7 @@ function toAsyncIterable(val) {
6493
6505
  var INITIAL_RECONNECT_DELAY = 1e3;
6494
6506
  var MAX_RECONNECT_DELAY = 3e4;
6495
6507
  var RECONNECT_MULTIPLIER = 2;
6496
- var HEARTBEAT_TIMEOUT = 35e3;
6508
+ var HEARTBEAT_TIMEOUT = 15e3;
6497
6509
  var ClientSubscriptionManager = class {
6498
6510
  config;
6499
6511
  client = null;
@@ -8704,7 +8716,7 @@ var RoolClient = class extends EventEmitter {
8704
8716
  * Returns the user's server-assigned id, email, plan, and credits.
8705
8717
  */
8706
8718
  async getCurrentUser() {
8707
- const user = await this.graphqlClient.getAccount();
8719
+ const user = await this.graphqlClient.getCurrentUser();
8708
8720
  this._currentUser = user;
8709
8721
  return user;
8710
8722
  }
@@ -8715,13 +8727,14 @@ var RoolClient = class extends EventEmitter {
8715
8727
  return this.graphqlClient.searchUser(email);
8716
8728
  }
8717
8729
  /**
8718
- * Set the current user's slug (used in app publishing URLs).
8719
- * Slug must be 3-32 characters, start with a letter, and contain only
8720
- * lowercase letters, numbers, hyphens, and underscores.
8721
- * Cannot be changed if the user has published apps.
8730
+ * Update the current user's profile.
8731
+ * - name: display name
8732
+ * - slug: used in app publishing URLs (3-32 chars, start with letter, lowercase alphanumeric/hyphens/underscores)
8722
8733
  */
8723
- async setSlug(slug) {
8724
- return this.graphqlClient.setSlug(slug);
8734
+ async updateCurrentUser(input) {
8735
+ const user = await this.graphqlClient.updateCurrentUser(input);
8736
+ this._currentUser = user;
8737
+ return user;
8725
8738
  }
8726
8739
  /**
8727
8740
  * Publish an extension. The extension will be accessible at: