Skip to content

Commit aa3a1cd

Browse files
committed
chore(contracts): export the Slack search schemas alongside their type aliases
1 parent 12c671d commit aa3a1cd

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎apps/sim/lib/api/contracts/knowledge/sim-search.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SLACK_SEARCH_MAX_LIMIT } from '@/lib/slack-search/client'
55

66
export const MAX_SIM_SEARCH_SLACK_QUERY_LENGTH = 2000
77

8-
const slackSearchBodySchema = z.object({
8+
export const slackSearchBodySchema = z.object({
99
workspaceId: workspaceIdSchema,
1010
query: z
1111
.string()
@@ -17,7 +17,7 @@ const slackSearchBodySchema = z.object({
1717
limit: z.number().int().min(1).max(SLACK_SEARCH_MAX_LIMIT).optional(),
1818
})
1919

20-
const slackSearchResultSchema = z.object({
20+
export const slackSearchResultSchema = z.object({
2121
channelId: z.string(),
2222
messageTs: z.string(),
2323
channelName: z.string(),
@@ -33,7 +33,12 @@ const slackSearchResultSchema = z.object({
3333
* `needs_reauth` is its own state because reconnecting is a real action they
3434
* can take, where `unavailable` is nothing they can fix.
3535
*/
36-
const slackSearchStatusSchema = z.enum(['ok', 'not_connected', 'needs_reauth', 'unavailable'])
36+
export const slackSearchStatusSchema = z.enum([
37+
'ok',
38+
'not_connected',
39+
'needs_reauth',
40+
'unavailable',
41+
])
3742

3843
/**
3944
* Searching Slack for the person asking, live, under their own Slack account.

0 commit comments

Comments
 (0)