Skip to content

Commit

Permalink
feat: add legacy member key in app types (#657)
Browse files Browse the repository at this point in the history
* feat: add local context

* refactor: add member id to local context

* refactor: set account id optional for localcontext
  • Loading branch information
pyphilia authored Sep 17, 2024
1 parent f3dff53 commit da3a66e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Publisher } from './publisher.js';
import { Context } from '@/enums/context.js';
import { PermissionLevel } from '@/enums/permissionLevel/permissionLevel.js';
import { DiscriminatedItem } from '@/item/item.js';
import { Account, Member } from '@/member/member.js';
import { UUID } from '@/types.js';
Expand Down Expand Up @@ -66,3 +68,19 @@ export type AppSetting<T extends Data = Data> = {
createdAt: string;
updatedAt: string;
};

export type LocalContext = {
accountId?: UUID;
/** @deprecated use accountId */
memberId?: UUID;
apiHost: string;
context: 'standalone' | `${Context}`;
dev?: boolean;
itemId: UUID;
lang?: string;
mobile?: boolean;
offline?: boolean;
permission: PermissionLevel;
settings?: unknown;
standalone?: boolean;
};

0 comments on commit da3a66e

Please sign in to comment.