Skip to content

Commit fb47ec6

Browse files
committed
remove unused fields
1 parent 064be80 commit fb47ec6

12 files changed

+83
-246
lines changed

src/__tests__/getCurrentConnectionFromPortal.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ describe('getCurrentConnectionFromPortal', () => {
1010

1111
jest.spyOn(getPortalSdkModule, 'getPortalSdk').mockReturnValue({
1212
addShare: jest.fn(),
13-
editVoiceboxConversation: jest.fn(),
1413
getConnectionByIndex,
1514
getVoiceboxConversation: jest.fn(),
1615
listConnections: jest.fn(),
1716
listVoiceboxConversations: jest.fn(),
18-
marketplaceSettings: jest.fn(),
1917
profile: jest.fn(),
2018
trackEvent: jest.fn(),
2119
});

src/__tests__/getPortalSdk.test.ts

-8
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ jest.mock('../cookies', () => ({
1515
}));
1616

1717
const addShare = jest.fn(async () => ({ addShare: null }));
18-
const editVoiceboxConversation = jest.fn(async () => ({
19-
editVoiceboxConversation: null,
20-
}));
2118
const getConnectionByIndex = jest.fn(async () => ({ connection: null }));
2219
const getVoiceboxConversation = jest.fn(async () => ({
2320
getVoiceboxConversation: null,
@@ -27,22 +24,17 @@ const listVoiceboxConversations = jest.fn(async () => ({
2724
listVoiceboxConversations: null,
2825
voiceboxConversationCount: null,
2926
}));
30-
const marketplaceSettings = jest.fn(async () => ({
31-
marketplaceSettings: null,
32-
}));
3327
const profile = jest.fn(async () => ({ profile: null }));
3428
const trackEvent = jest.fn(async () => ({ trackEvent: null }));
3529

3630
describe('getPortalSdk', () => {
3731
beforeEach(() => {
3832
jest.spyOn(portalSdkImport, 'getSdk').mockReturnValue({
3933
addShare,
40-
editVoiceboxConversation,
4134
getConnectionByIndex,
4235
getVoiceboxConversation,
4336
listConnections,
4437
listVoiceboxConversations,
45-
marketplaceSettings,
4638
profile,
4739
trackEvent,
4840
});

src/getPortalSdk.ts

-10
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ export const getPortalSdk = () => {
5858
const result = await sdk.addShare({ input });
5959
return result.addShare || null;
6060
},
61-
editVoiceboxConversation: async (input: { id: string; name: string }) => {
62-
const result = await sdk.editVoiceboxConversation({
63-
input,
64-
});
65-
return result.editVoiceboxConversation || null;
66-
},
6761
getConnectionByIndex: async (index: number) => {
6862
const result = await sdk.getConnectionByIndex({ index });
6963
return result.connection || null;
@@ -115,10 +109,6 @@ export const getPortalSdk = () => {
115109
count: result.voiceboxConversationCount?.count || 0,
116110
};
117111
},
118-
marketplaceSettings: async () => {
119-
const result = await sdk.marketplaceSettings();
120-
return result.marketplaceSettings || null;
121-
},
122112
profile: async () => {
123113
const result = await sdk.profile();
124114
return result.profile || null;
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
mutation addShare($input: ShareInput!) {
22
addShare(input: $input) {
33
short_url
4-
target_path
5-
endpoint
6-
service
7-
expiration
84
}
95
}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
query getConnectionByIndex($index: Int!) {
22
connection: getConnectionByIndex(index: $index) {
3-
id
4-
index
5-
cloud {
6-
id
7-
}
8-
dashboard
9-
name
10-
username
11-
endpoint
3+
# getCurrentConnectionFromPortal
124
token
13-
isStardogCloud
14-
isStardogFree
15-
isAllocating
165
useBrowserAuth
17-
useSSO
6+
username
7+
8+
# useStardogConnectionFromPortalIndex (bones)
9+
endpoint
10+
11+
# usePortalDashboardUrl (bones)
12+
dashboard
13+
14+
# usePortalVoiceboxLastSettings (bones)
15+
id
16+
17+
# sign in form (VET apps)
18+
name
19+
20+
# refetch token (VET apps)
21+
index
1822
}
1923
}

src/sdk/documents/getVoiceboxConversation.graphql

-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ query getVoiceboxConversation($conversation_id: String!) {
55
id
66
content
77
sender
8-
created
98
score
109
user_message_context {
11-
id
1210
app
1311
connection_id
1412
database
@@ -17,7 +15,6 @@ query getVoiceboxConversation($conversation_id: String!) {
1715
reasoning
1816
}
1917
system_message_context {
20-
id
2118
followup_examples
2219
actions {
2320
type
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
query listConnections {
22
listConnections {
3+
# same fields as getConnectionByIndex
4+
dashboard
5+
endpoint
36
id
47
index
5-
cloud {
6-
id
7-
}
8-
dashboard
98
name
10-
username
11-
endpoint
129
token
13-
isStardogCloud
14-
isStardogFree
15-
isAllocating
1610
useBrowserAuth
17-
useSSO
11+
username
1812
}
1913
}

src/sdk/documents/listVoiceboxConversations.graphql

-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
query listVoiceboxConversations($paging: PagingInput) {
22
listVoiceboxConversations(paging: $paging) {
3-
id
43
last_user_message {
5-
id
6-
content
7-
sender
8-
created
9-
score
104
user_message_context {
11-
id
12-
app
135
connection_id
146
database
157
named_graphs

src/sdk/documents/marketplaceSettingsQuery.graphql

-8
This file was deleted.
+15-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
query profile {
22
profile {
3-
id
4-
username
5-
email
3+
# display name
64
first_name
75
last_name
6+
username
7+
8+
# analytics setup (bones)
9+
email
810
company
9-
use_case
11+
date_joined
12+
id
13+
is_databricks_user
1014
is_authenticated
11-
is_staff
12-
is_superuser
15+
is_ephemeral
16+
title
17+
use_case
1318
userflow_signature
14-
date_joined
15-
is_voicebox_enabled
19+
20+
# feature flags (bones)
21+
is_staff
1622
is_static_voicebox
23+
is_voicebox_enabled
1724
}
1825
}

src/sdk/documents/renameVoiceboxConversation.graphql

-6
This file was deleted.

0 commit comments

Comments
 (0)