@company-semantics/contracts 0.133.0 → 0.134.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.133.0",
3
+ "version": "0.134.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,6 +49,7 @@ export type WorkspaceAccessResponse = z.infer<typeof WorkspaceAccessResponseSche
49
49
  export const WorkspaceOverviewSchema = z.object({
50
50
  id: z.string(),
51
51
  name: z.string(),
52
+ slug: z.string(),
52
53
  type: z.enum(['personal', 'shared']),
53
54
  logoUrl: z.string().nullable(),
54
55
  owner: WorkspaceOwnerSchema,
@@ -18,7 +18,7 @@ export type ResourceKey =
18
18
  | { type: 'team'; orgId: string; teamId: string }
19
19
  | { type: 'department'; orgId: string; departmentId: string }
20
20
  | { type: 'chat'; orgId: string; chatId: string }
21
- | { type: 'goalDoc'; orgId: string; slug: string }
21
+ | { type: 'companyMdDoc'; orgId: string; slug: string }
22
22
  | { type: 'companyMdContextBank'; orgId: string; slug: string }
23
23
  | { type: 'workspace'; orgId: string }
24
24
  | { type: 'workspaceDomains'; orgId: string }
@@ -27,7 +27,7 @@ export type ResourceKey =
27
27
  | { type: 'aiUsage'; orgId: string }
28
28
  | { type: 'deletionEligibility'; orgId: string }
29
29
  | { type: 'transferOwnership'; orgId: string }
30
- | { type: 'goals'; orgId: string }
30
+ | { type: 'companyMdDocs'; orgId: string }
31
31
  // User-scoped
32
32
  | { type: 'dismissedBanners'; userId: string }
33
33
  | { type: 'userOrgs'; userId: string }
@@ -53,7 +53,7 @@ export function resolveScope(context: {
53
53
  const ORG_SCOPED_TYPES = [
54
54
  'members', 'departments', 'chats', 'teams', 'integrations', 'invites',
55
55
  'auditEvents', 'timeline', 'workspace', 'workspaceDomains', 'authSettings',
56
- 'billing', 'aiUsage', 'deletionEligibility', 'transferOwnership', 'goals',
56
+ 'billing', 'aiUsage', 'deletionEligibility', 'transferOwnership', 'companyMdDocs',
57
57
  ] as const;
58
58
 
59
59
  const USER_SCOPED_TYPES = ['dismissedBanners', 'userOrgs', 'sessions', 'viewer'] as const;
@@ -78,7 +78,7 @@ export function toQueryKey(key: ResourceKey): readonly string[] {
78
78
  return [key.type, key.orgId, key.departmentId] as const;
79
79
  case 'chat':
80
80
  return [key.type, key.orgId, key.chatId] as const;
81
- case 'goalDoc':
81
+ case 'companyMdDoc':
82
82
  case 'companyMdContextBank':
83
83
  return [key.type, key.orgId, key.slug] as const;
84
84
 
@@ -105,7 +105,7 @@ export function toQueryKey(key: ResourceKey): readonly string[] {
105
105
  case 'aiUsage':
106
106
  case 'deletionEligibility':
107
107
  case 'transferOwnership':
108
- case 'goals':
108
+ case 'companyMdDocs':
109
109
  return [key.type, key.orgId] as const;
110
110
 
111
111
  default: {
@@ -132,7 +132,7 @@ export function fromQueryKey(queryKey: readonly string[]): ResourceKey {
132
132
  team: 'teamId',
133
133
  department: 'departmentId',
134
134
  chat: 'chatId',
135
- goalDoc: 'slug',
135
+ companyMdDoc: 'slug',
136
136
  companyMdContextBank: 'slug',
137
137
  };
138
138
 
@@ -170,8 +170,8 @@ export const resourceRelationships: Record<string, string[]> = {
170
170
  chat: ['chats'],
171
171
  teams: ['team'],
172
172
  team: ['teams'],
173
- goals: ['goalDoc'],
174
- goalDoc: ['goals'],
173
+ companyMdDocs: ['companyMdDoc'],
174
+ companyMdDoc: ['companyMdDocs'],
175
175
  };
176
176
 
177
177
  /**