@company-semantics/contracts 0.113.0 → 0.113.3
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 +1 -1
- package/src/api/generated.ts +64 -0
- package/src/impersonation.ts +0 -2
- package/src/index.ts +1 -0
- package/src/org/index.ts +1 -0
- package/src/resource-keys.ts +3 -0
package/package.json
CHANGED
package/src/api/generated.ts
CHANGED
|
@@ -1578,6 +1578,27 @@ export interface paths {
|
|
|
1578
1578
|
patch?: never;
|
|
1579
1579
|
trace?: never;
|
|
1580
1580
|
};
|
|
1581
|
+
"/api/chats/{id}/messages/{messageId}": {
|
|
1582
|
+
parameters: {
|
|
1583
|
+
query?: never;
|
|
1584
|
+
header?: never;
|
|
1585
|
+
path?: never;
|
|
1586
|
+
cookie?: never;
|
|
1587
|
+
};
|
|
1588
|
+
get?: never;
|
|
1589
|
+
put?: never;
|
|
1590
|
+
post?: never;
|
|
1591
|
+
/**
|
|
1592
|
+
* Delete a single message
|
|
1593
|
+
* @description Deletes a single message from a chat.
|
|
1594
|
+
* Only the chat owner can delete messages from their chats.
|
|
1595
|
+
*/
|
|
1596
|
+
delete: operations["deleteMessage"];
|
|
1597
|
+
options?: never;
|
|
1598
|
+
head?: never;
|
|
1599
|
+
patch?: never;
|
|
1600
|
+
trace?: never;
|
|
1601
|
+
};
|
|
1581
1602
|
"/api/chats/{id}/generate-title": {
|
|
1582
1603
|
parameters: {
|
|
1583
1604
|
query?: never;
|
|
@@ -6572,6 +6593,49 @@ export interface operations {
|
|
|
6572
6593
|
};
|
|
6573
6594
|
};
|
|
6574
6595
|
};
|
|
6596
|
+
deleteMessage: {
|
|
6597
|
+
parameters: {
|
|
6598
|
+
query?: never;
|
|
6599
|
+
header?: never;
|
|
6600
|
+
path: {
|
|
6601
|
+
/** @description Chat ID (UUID) */
|
|
6602
|
+
id: string;
|
|
6603
|
+
/** @description Message ID (UUID) */
|
|
6604
|
+
messageId: string;
|
|
6605
|
+
};
|
|
6606
|
+
cookie?: never;
|
|
6607
|
+
};
|
|
6608
|
+
requestBody?: never;
|
|
6609
|
+
responses: {
|
|
6610
|
+
/** @description Message deleted */
|
|
6611
|
+
200: {
|
|
6612
|
+
headers: {
|
|
6613
|
+
[name: string]: unknown;
|
|
6614
|
+
};
|
|
6615
|
+
content: {
|
|
6616
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
6617
|
+
};
|
|
6618
|
+
};
|
|
6619
|
+
/** @description Not authenticated */
|
|
6620
|
+
401: {
|
|
6621
|
+
headers: {
|
|
6622
|
+
[name: string]: unknown;
|
|
6623
|
+
};
|
|
6624
|
+
content: {
|
|
6625
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6626
|
+
};
|
|
6627
|
+
};
|
|
6628
|
+
/** @description Chat or message not found */
|
|
6629
|
+
404: {
|
|
6630
|
+
headers: {
|
|
6631
|
+
[name: string]: unknown;
|
|
6632
|
+
};
|
|
6633
|
+
content: {
|
|
6634
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6635
|
+
};
|
|
6636
|
+
};
|
|
6637
|
+
};
|
|
6638
|
+
};
|
|
6575
6639
|
generateChatTitle: {
|
|
6576
6640
|
parameters: {
|
|
6577
6641
|
query?: never;
|
package/src/impersonation.ts
CHANGED
|
@@ -29,7 +29,6 @@ export type RestrictedImpersonationAction =
|
|
|
29
29
|
| 'delete_chat'
|
|
30
30
|
| 'delete_message'
|
|
31
31
|
| 'modify_billing'
|
|
32
|
-
| 'rotate_credentials'
|
|
33
32
|
| 'invite_remove_users'
|
|
34
33
|
| 'accept_agreements'
|
|
35
34
|
| 'irreversible_write'
|
|
@@ -40,7 +39,6 @@ export const RESTRICTED_IMPERSONATION_ACTIONS: readonly RestrictedImpersonationA
|
|
|
40
39
|
'delete_chat',
|
|
41
40
|
'delete_message',
|
|
42
41
|
'modify_billing',
|
|
43
|
-
'rotate_credentials',
|
|
44
42
|
'invite_remove_users',
|
|
45
43
|
'accept_agreements',
|
|
46
44
|
'irreversible_write',
|
package/src/index.ts
CHANGED
package/src/org/index.ts
CHANGED
package/src/resource-keys.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type ResourceKey =
|
|
|
19
19
|
| { type: 'department'; orgId: string; departmentId: string }
|
|
20
20
|
| { type: 'chat'; orgId: string; chatId: string }
|
|
21
21
|
| { type: 'goalDoc'; orgId: string; slug: string }
|
|
22
|
+
| { type: 'companyMdContextBank'; orgId: string; slug: string }
|
|
22
23
|
| { type: 'workspace'; orgId: string }
|
|
23
24
|
| { type: 'workspaceDomains'; orgId: string }
|
|
24
25
|
| { type: 'authSettings'; orgId: string }
|
|
@@ -78,6 +79,7 @@ export function toQueryKey(key: ResourceKey): readonly string[] {
|
|
|
78
79
|
case 'chat':
|
|
79
80
|
return [key.type, key.orgId, key.chatId] as const;
|
|
80
81
|
case 'goalDoc':
|
|
82
|
+
case 'companyMdContextBank':
|
|
81
83
|
return [key.type, key.orgId, key.slug] as const;
|
|
82
84
|
|
|
83
85
|
// User-scoped
|
|
@@ -131,6 +133,7 @@ export function fromQueryKey(queryKey: readonly string[]): ResourceKey {
|
|
|
131
133
|
department: 'departmentId',
|
|
132
134
|
chat: 'chatId',
|
|
133
135
|
goalDoc: 'slug',
|
|
136
|
+
companyMdContextBank: 'slug',
|
|
134
137
|
};
|
|
135
138
|
|
|
136
139
|
if (type in identityFields) {
|