@lizard-build/sdk 0.1.60 → 0.1.61

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.mts CHANGED
@@ -1982,11 +1982,11 @@ declare class Lizard {
1982
1982
  /**
1983
1983
  * The account this credential belongs to — the SDK's `lizard whoami`.
1984
1984
  *
1985
- * A **scoped** key gets identity only: `id`, `username`, `avatarUrl`, `scoped: true`
1986
- * and the key's own `scopes`. The account's email, balance, plan and billing status
1987
- * are withheld — they belong to the account, not to the key holder, and a scoped key
1988
- * is meant to be handed to an end user or injected into a sandbox. An unscoped key
1989
- * or a session sees the full account.
1985
+ * A **scoped** key never learns whose account it is: it gets only `scoped: true` and
1986
+ * its `scopes`, each project or workspace with its name. No id, username, avatar,
1987
+ * email, balance or plan -- a scoped key is meant to be handed to someone who is not
1988
+ * the account's member, or injected into a sandbox. An unscoped key or a session
1989
+ * sees the full account.
1990
1990
  *
1991
1991
  * Reading back `scopes` is the cheapest way to answer "what can this key reach".
1992
1992
  */
@@ -1995,21 +1995,27 @@ declare class Lizard {
1995
1995
  get platform(): PlatformClient;
1996
1996
  }
1997
1997
  /**
1998
- * The account behind a credential — see {@link Lizard.whoami}.
1998
+ * The account behind a credential -- see {@link Lizard.whoami}.
1999
1999
  *
2000
- * Everything past `avatarUrl` is present only for an unscoped key or a session; a
2001
- * scoped key gets `scoped: true` and `scopes` in their place.
2000
+ * A scoped key gets only `scoped: true` and `scopes`; every other field is present only
2001
+ * for an unscoped key or a session.
2002
2002
  */
2003
2003
  interface Account {
2004
- id: string;
2005
- username: string;
2004
+ /** Absent for a scoped key. */
2005
+ id?: string;
2006
+ /** Absent for a scoped key. */
2007
+ username?: string;
2006
2008
  avatarUrl?: string | null;
2007
- /** True when the calling key is scoped, meaning the account fields below are absent. */
2009
+ /** True when the calling key is scoped, meaning the account fields are absent. */
2008
2010
  scoped?: boolean;
2009
- /** What the calling key may reach. Present when `scoped` is true. */
2011
+ /** What the calling key may reach, by name. Present when `scoped` is true. */
2010
2012
  scopes?: Array<{
2011
2013
  type: 'workspace' | 'project';
2012
2014
  id: string;
2015
+ name?: string | null;
2016
+ /** For a project scope: the workspace it belongs to. */
2017
+ workspaceId?: string | null;
2018
+ workspaceName?: string | null;
2013
2019
  }>;
2014
2020
  email?: string | null;
2015
2021
  plan?: string;
package/dist/index.d.ts CHANGED
@@ -1982,11 +1982,11 @@ declare class Lizard {
1982
1982
  /**
1983
1983
  * The account this credential belongs to — the SDK's `lizard whoami`.
1984
1984
  *
1985
- * A **scoped** key gets identity only: `id`, `username`, `avatarUrl`, `scoped: true`
1986
- * and the key's own `scopes`. The account's email, balance, plan and billing status
1987
- * are withheld — they belong to the account, not to the key holder, and a scoped key
1988
- * is meant to be handed to an end user or injected into a sandbox. An unscoped key
1989
- * or a session sees the full account.
1985
+ * A **scoped** key never learns whose account it is: it gets only `scoped: true` and
1986
+ * its `scopes`, each project or workspace with its name. No id, username, avatar,
1987
+ * email, balance or plan -- a scoped key is meant to be handed to someone who is not
1988
+ * the account's member, or injected into a sandbox. An unscoped key or a session
1989
+ * sees the full account.
1990
1990
  *
1991
1991
  * Reading back `scopes` is the cheapest way to answer "what can this key reach".
1992
1992
  */
@@ -1995,21 +1995,27 @@ declare class Lizard {
1995
1995
  get platform(): PlatformClient;
1996
1996
  }
1997
1997
  /**
1998
- * The account behind a credential — see {@link Lizard.whoami}.
1998
+ * The account behind a credential -- see {@link Lizard.whoami}.
1999
1999
  *
2000
- * Everything past `avatarUrl` is present only for an unscoped key or a session; a
2001
- * scoped key gets `scoped: true` and `scopes` in their place.
2000
+ * A scoped key gets only `scoped: true` and `scopes`; every other field is present only
2001
+ * for an unscoped key or a session.
2002
2002
  */
2003
2003
  interface Account {
2004
- id: string;
2005
- username: string;
2004
+ /** Absent for a scoped key. */
2005
+ id?: string;
2006
+ /** Absent for a scoped key. */
2007
+ username?: string;
2006
2008
  avatarUrl?: string | null;
2007
- /** True when the calling key is scoped, meaning the account fields below are absent. */
2009
+ /** True when the calling key is scoped, meaning the account fields are absent. */
2008
2010
  scoped?: boolean;
2009
- /** What the calling key may reach. Present when `scoped` is true. */
2011
+ /** What the calling key may reach, by name. Present when `scoped` is true. */
2010
2012
  scopes?: Array<{
2011
2013
  type: 'workspace' | 'project';
2012
2014
  id: string;
2015
+ name?: string | null;
2016
+ /** For a project scope: the workspace it belongs to. */
2017
+ workspaceId?: string | null;
2018
+ workspaceName?: string | null;
2013
2019
  }>;
2014
2020
  email?: string | null;
2015
2021
  plan?: string;
package/dist/index.js CHANGED
@@ -1990,11 +1990,11 @@ var Lizard = class {
1990
1990
  /**
1991
1991
  * The account this credential belongs to — the SDK's `lizard whoami`.
1992
1992
  *
1993
- * A **scoped** key gets identity only: `id`, `username`, `avatarUrl`, `scoped: true`
1994
- * and the key's own `scopes`. The account's email, balance, plan and billing status
1995
- * are withheld — they belong to the account, not to the key holder, and a scoped key
1996
- * is meant to be handed to an end user or injected into a sandbox. An unscoped key
1997
- * or a session sees the full account.
1993
+ * A **scoped** key never learns whose account it is: it gets only `scoped: true` and
1994
+ * its `scopes`, each project or workspace with its name. No id, username, avatar,
1995
+ * email, balance or plan -- a scoped key is meant to be handed to someone who is not
1996
+ * the account's member, or injected into a sandbox. An unscoped key or a session
1997
+ * sees the full account.
1998
1998
  *
1999
1999
  * Reading back `scopes` is the cheapest way to answer "what can this key reach".
2000
2000
  */
package/dist/index.mjs CHANGED
@@ -1937,11 +1937,11 @@ var Lizard = class {
1937
1937
  /**
1938
1938
  * The account this credential belongs to — the SDK's `lizard whoami`.
1939
1939
  *
1940
- * A **scoped** key gets identity only: `id`, `username`, `avatarUrl`, `scoped: true`
1941
- * and the key's own `scopes`. The account's email, balance, plan and billing status
1942
- * are withheld — they belong to the account, not to the key holder, and a scoped key
1943
- * is meant to be handed to an end user or injected into a sandbox. An unscoped key
1944
- * or a session sees the full account.
1940
+ * A **scoped** key never learns whose account it is: it gets only `scoped: true` and
1941
+ * its `scopes`, each project or workspace with its name. No id, username, avatar,
1942
+ * email, balance or plan -- a scoped key is meant to be handed to someone who is not
1943
+ * the account's member, or injected into a sandbox. An unscoped key or a session
1944
+ * sees the full account.
1945
1945
  *
1946
1946
  * Reading back `scopes` is the cheapest way to answer "what can this key reach".
1947
1947
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lizard-build/sdk",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "description": "TypeScript SDK for Lizard: Firecracker microVM sandboxes, code execution and cloud apps.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",