@lightdash/common 2.87.0 → 2.88.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.
@@ -1,6 +1,19 @@
1
- import { type Account, type AccountHelpers } from './auth';
2
- export type SerializedAccount = Omit<Account, 'user' | keyof AccountHelpers> & {
1
+ import { type Account, type AccountOrganization, type AnonymousAccount, type AuthType } from './auth';
2
+ /**
3
+ * The account as returned by the API. Kept to what the app needs so a session
4
+ * never echoes its own credential (cookie, token, key) or, for embeds, the
5
+ * embed configuration behind the JWT.
6
+ *
7
+ * We omit AbilityRules because tsoa is very unforgiving. We'll still get this in the UI to apply abilities.
8
+ * The same approach is taken for SessionUser from the UserController.
9
+ */
10
+ export type SerializedAccount = {
11
+ organization: AccountOrganization;
12
+ authentication: {
13
+ type: AuthType;
14
+ };
3
15
  user: Omit<Account['user'], 'ability' | 'abilityRules'>;
16
+ embedWriteContext?: AnonymousAccount['embedWriteContext'];
4
17
  };
5
18
  export type ApiGetAccountResponse = {
6
19
  status: 'ok';
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/types/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAI3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,cAAc,CAAC,GAAG;IAC3E,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/types/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EAChB,MAAM,QAAQ,CAAC;AAEhB;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,YAAY,EAAE,mBAAmB,CAAC;IAClC,cAAc,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;IACnC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC,CAAC;IACxD,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "2.87.0",
3
+ "version": "2.88.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",