@awesomate/sdk 0.26.0 → 0.27.0

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/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  * Docs: https://hub.awesomate.ai/docs/sdk/
27
27
  */
28
28
  /** This package's version, sent to the hub with every server call. */
29
- export declare const VERSION = "0.26.0";
29
+ export declare const VERSION = "0.27.0";
30
30
  /** Augmented by the generated awesomate.d.ts, so each kind's rows are typed. */
31
31
  export interface Kinds {
32
32
  }
@@ -962,9 +962,10 @@ export declare class AwesomateClient {
962
962
  }>;
963
963
  /**
964
964
  * Who this token is: the account, its plan, the token's scopes and when it expires, and which
965
- * features the account has (each with the sentence to say when it does not). An account token
966
- * acts as the account's owner, whoever made it. Needs hosting:read; an app key cannot ask (it
967
- * reads and writes its own kinds only).
965
+ * features the account has (each with the sentence to say when it does not), and whose key it
966
+ * is: the account owner's, which acts as the owner, or a team member's own, which does only what
967
+ * that person can do in the hub. Needs hosting:read; an app key cannot ask (it reads and writes
968
+ * its own kinds only).
968
969
  *
969
970
  * @example
970
971
  * const me = await db.whoami();
@@ -1842,6 +1843,20 @@ export interface WhoAmI {
1842
1843
  reason: string | null;
1843
1844
  message: string | null;
1844
1845
  }> | null;
1846
+ /**
1847
+ * Whose key this is: `account_owner` (acts as the owner), or `person`, a team member's own key,
1848
+ * which does what that person can do and never more (`level` view or full). Null for a browser
1849
+ * session, or from an older hub.
1850
+ */
1851
+ key: {
1852
+ holder: 'account_owner';
1853
+ email: string | null;
1854
+ } | {
1855
+ holder: 'person';
1856
+ email: string | null;
1857
+ name: string | null;
1858
+ level: 'view' | 'full';
1859
+ } | null;
1845
1860
  }
1846
1861
  /** One column of a kind, from schema(). */
1847
1862
  export interface SchemaColumn {
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@
26
26
  * Docs: https://hub.awesomate.ai/docs/sdk/
27
27
  */
28
28
  /** This package's version, sent to the hub with every server call. */
29
- export const VERSION = '0.26.0';
29
+ export const VERSION = '0.27.0';
30
30
  const DEFAULT_BASE = 'https://hub.awesomate.ai';
31
31
  /** Every record and contact id is a UUID; anything else can name no row. */
32
32
  const RECORD_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -709,9 +709,10 @@ export class AwesomateClient {
709
709
  }
710
710
  /**
711
711
  * Who this token is: the account, its plan, the token's scopes and when it expires, and which
712
- * features the account has (each with the sentence to say when it does not). An account token
713
- * acts as the account's owner, whoever made it. Needs hosting:read; an app key cannot ask (it
714
- * reads and writes its own kinds only).
712
+ * features the account has (each with the sentence to say when it does not), and whose key it
713
+ * is: the account owner's, which acts as the owner, or a team member's own, which does only what
714
+ * that person can do in the hub. Needs hosting:read; an app key cannot ask (it reads and writes
715
+ * its own kinds only).
715
716
  *
716
717
  * @example
717
718
  * const me = await db.whoami();
@@ -725,6 +726,7 @@ export class AwesomateClient {
725
726
  scopes: Array.isArray(r.scopes) ? r.scopes.map(String) : [],
726
727
  tokenExpiresAt: r.patExpiresAt ?? null,
727
728
  features: r.features ?? null,
729
+ key: r.key ?? null,
728
730
  };
729
731
  }
730
732
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Your own Awesomate data from Node and the browser: query contacts and app data with generated types, and sign your app's own users in",
5
5
  "license": "MIT",
6
6
  "type": "module",