Skip to content

Commit 4902262

Browse files
committed
fix(react-doctor): remove unused export types, useEffect clearTimeout missing, a11y fixes
1 parent 6544e0a commit 4902262

1,162 files changed

Lines changed: 10103 additions & 14899 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/app/[lang]/layout.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ export default async function Layout({ children, params }: LayoutProps) {
7878
},
7979
},
8080
inLanguage: lang,
81-
potentialAction: {
82-
'@type': 'SearchAction',
83-
target: {
84-
'@type': 'EntryPoint',
85-
urlTemplate: `${DOCS_BASE_URL}/api/search?q={search_term_string}`,
86-
},
87-
'query-input': 'required name=search_term_string',
88-
},
8981
}
9082

9183
return (

apps/docs/app/api/search/route.ts

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,53 @@ import { generateSearchEmbedding } from '@/lib/embeddings'
66
export const runtime = 'nodejs'
77
export const revalidate = 0
88

9+
type SearchRequestBody = {
10+
query?: unknown
11+
q?: unknown
12+
locale?: unknown
13+
limit?: unknown
14+
}
15+
16+
const DEFAULT_SEARCH_LIMIT = 10
17+
18+
function getStringParam(value: unknown): string | undefined {
19+
return typeof value === 'string' ? value : undefined
20+
}
21+
22+
function getSearchLimit(value: unknown): number {
23+
const limit = Number.parseInt(String(value ?? DEFAULT_SEARCH_LIMIT), 10)
24+
return Number.isFinite(limit) && limit > 0 ? limit : DEFAULT_SEARCH_LIMIT
25+
}
26+
27+
async function getSearchParams(request: NextRequest) {
28+
const contentType = request.headers.get('content-type') ?? ''
29+
let body: SearchRequestBody = {}
30+
31+
if (contentType.includes('application/json')) {
32+
body = (await request.json()) as SearchRequestBody
33+
} else if (
34+
contentType.includes('application/x-www-form-urlencoded') ||
35+
contentType.includes('multipart/form-data')
36+
) {
37+
const formData = await request.formData()
38+
body = Object.fromEntries(formData.entries())
39+
}
40+
41+
return {
42+
query: getStringParam(body.query) || getStringParam(body.q) || '',
43+
locale: getStringParam(body.locale) || 'en',
44+
limit: getSearchLimit(body.limit),
45+
}
46+
}
47+
948
/**
1049
* Hybrid search API endpoint
1150
* - English: Vector embeddings + keyword search
1251
* - Other languages: Keyword search only
1352
*/
14-
export async function GET(request: NextRequest) {
53+
export async function POST(request: NextRequest) {
1554
try {
16-
const searchParams = request.nextUrl.searchParams
17-
const query = searchParams.get('query') || searchParams.get('q') || ''
18-
const locale = searchParams.get('locale') || 'en'
19-
const limit = Number.parseInt(searchParams.get('limit') || '10', 10)
55+
const { query, locale, limit } = await getSearchParams(request)
2056

2157
if (!query || query.trim().length === 0) {
2258
return NextResponse.json([])

apps/docs/app/robots.txt/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Disallow: /api/internal/
1313
Disallow: /_next/static/
1414
Disallow: /admin/
1515
Allow: /
16-
Allow: /api/search
1716
Allow: /llms.txt
1817
Allow: /llms-full.txt
1918
Allow: /llms.mdx/

apps/docs/components/icons.tsx

Lines changed: 1009 additions & 1048 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/en/tools/attio.mdx

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ Query and list records for a given object type (e.g. people, companies)
5353
| --------- | ---- | ----------- |
5454
| `records` | array | Array of Attio records |
5555
|`id` | object | The record identifier |
56-
|`workspace_id` | string | The workspace ID |
57-
|`object_id` | string | The object ID |
58-
|`record_id` | string | The record ID |
5956
|`created_at` | string | When the record was created |
6057
|`web_url` | string | URL to view the record in Attio |
6158
|`values` | json | The record attribute values |
@@ -78,9 +75,6 @@ Get a single record by ID from Attio
7875
| --------- | ---- | ----------- |
7976
| `record` | object | An Attio record |
8077
|`id` | object | The record identifier |
81-
|`workspace_id` | string | The workspace ID |
82-
|`object_id` | string | The object ID |
83-
|`record_id` | string | The record ID |
8478
|`created_at` | string | When the record was created |
8579
|`web_url` | string | URL to view the record in Attio |
8680
|`values` | json | The record attribute values |
@@ -104,9 +98,6 @@ Create a new record in Attio for a given object type
10498
| --------- | ---- | ----------- |
10599
| `record` | object | An Attio record |
106100
|`id` | object | The record identifier |
107-
|`workspace_id` | string | The workspace ID |
108-
|`object_id` | string | The object ID |
109-
|`record_id` | string | The record ID |
110101
|`created_at` | string | When the record was created |
111102
|`web_url` | string | URL to view the record in Attio |
112103
|`values` | json | The record attribute values |
@@ -131,9 +122,6 @@ Update an existing record in Attio (appends multiselect values)
131122
| --------- | ---- | ----------- |
132123
| `record` | object | An Attio record |
133124
|`id` | object | The record identifier |
134-
|`workspace_id` | string | The workspace ID |
135-
|`object_id` | string | The object ID |
136-
|`record_id` | string | The record ID |
137125
|`created_at` | string | When the record was created |
138126
|`web_url` | string | URL to view the record in Attio |
139127
|`values` | json | The record attribute values |
@@ -199,9 +187,6 @@ Upsert a record in Attio — creates it if no match is found, updates it if a ma
199187
| --------- | ---- | ----------- |
200188
| `record` | object | The upserted record |
201189
|`id` | object | The record identifier |
202-
|`workspace_id` | string | The workspace ID |
203-
|`object_id` | string | The object ID |
204-
|`record_id` | string | The record ID |
205190
|`created_at` | string | When the record was created |
206191
|`web_url` | string | URL to view the record in Attio |
207192
|`values` | json | The record attribute values |
@@ -237,8 +222,6 @@ List notes in Attio, optionally filtered by parent record
237222
|`type` | string | The tag type \(e.g. workspace-member\) |
238223
|`workspaceMemberId` | string | The workspace member ID of the tagger |
239224
|`createdByActor` | object | The actor who created the note |
240-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
241-
|`id` | string | The actor ID |
242225
|`createdAt` | string | When the note was created |
243226
| `count` | number | Number of notes returned |
244227

@@ -267,8 +250,6 @@ Get a single note by ID from Attio
267250
|`type` | string | The tag type \(e.g. workspace-member\) |
268251
|`workspaceMemberId` | string | The workspace member ID of the tagger |
269252
| `createdByActor` | object | The actor who created the note |
270-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
271-
|`id` | string | The actor ID |
272253
| `createdAt` | string | When the note was created |
273254

274255
### `attio_create_note`
@@ -302,8 +283,6 @@ Create a note on a record in Attio
302283
|`type` | string | The tag type \(e.g. workspace-member\) |
303284
|`workspaceMemberId` | string | The workspace member ID of the tagger |
304285
| `createdByActor` | object | The actor who created the note |
305-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
306-
|`id` | string | The actor ID |
307286
| `createdAt` | string | When the note was created |
308287

309288
### `attio_delete_note`
@@ -348,14 +327,8 @@ List tasks in Attio, optionally filtered by record, assignee, or completion stat
348327
|`deadlineAt` | string | The task deadline |
349328
|`isCompleted` | boolean | Whether the task is completed |
350329
|`linkedRecords` | array | Records linked to this task |
351-
|`targetObjectId` | string | The linked object ID |
352-
|`targetRecordId` | string | The linked record ID |
353330
|`assignees` | array | Task assignees |
354-
|`type` | string | The assignee actor type \(e.g. workspace-member\) |
355-
|`id` | string | The assignee actor ID |
356331
|`createdByActor` | object | The actor who created this task |
357-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
358-
|`id` | string | The actor ID |
359332
|`createdAt` | string | When the task was created |
360333
| `count` | number | Number of tasks returned |
361334

@@ -378,14 +351,8 @@ Get a single task by ID from Attio
378351
| `deadlineAt` | string | The task deadline |
379352
| `isCompleted` | boolean | Whether the task is completed |
380353
| `linkedRecords` | array | Records linked to this task |
381-
|`targetObjectId` | string | The linked object ID |
382-
|`targetRecordId` | string | The linked record ID |
383354
| `assignees` | array | Task assignees |
384-
|`type` | string | The assignee actor type \(e.g. workspace-member\) |
385-
|`id` | string | The assignee actor ID |
386355
| `createdByActor` | object | The actor who created this task |
387-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
388-
|`id` | string | The actor ID |
389356
| `createdAt` | string | When the task was created |
390357

391358
### `attio_create_task`
@@ -411,14 +378,8 @@ Create a task in Attio
411378
| `deadlineAt` | string | The task deadline |
412379
| `isCompleted` | boolean | Whether the task is completed |
413380
| `linkedRecords` | array | Records linked to this task |
414-
|`targetObjectId` | string | The linked object ID |
415-
|`targetRecordId` | string | The linked record ID |
416381
| `assignees` | array | Task assignees |
417-
|`type` | string | The assignee actor type \(e.g. workspace-member\) |
418-
|`id` | string | The assignee actor ID |
419382
| `createdByActor` | object | The actor who created this task |
420-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
421-
|`id` | string | The actor ID |
422383
| `createdAt` | string | When the task was created |
423384

424385
### `attio_update_task`
@@ -444,14 +405,8 @@ Update a task in Attio (deadline, completion status, linked records, assignees)
444405
| `deadlineAt` | string | The task deadline |
445406
| `isCompleted` | boolean | Whether the task is completed |
446407
| `linkedRecords` | array | Records linked to this task |
447-
|`targetObjectId` | string | The linked object ID |
448-
|`targetRecordId` | string | The linked record ID |
449408
| `assignees` | array | Task assignees |
450-
|`type` | string | The assignee actor type \(e.g. workspace-member\) |
451-
|`id` | string | The assignee actor ID |
452409
| `createdByActor` | object | The actor who created this task |
453-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
454-
|`id` | string | The actor ID |
455410
| `createdAt` | string | When the task was created |
456411

457412
### `attio_delete_task`
@@ -577,8 +532,6 @@ List all lists in the Attio workspace
577532
|`workspaceAccess` | string | Workspace-level access \(e.g. full-access, read-only\) |
578533
|`workspaceMemberAccess` | json | Member-level access entries |
579534
|`createdByActor` | object | The actor who created the list |
580-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
581-
|`id` | string | The actor ID |
582535
|`createdAt` | string | When the list was created |
583536
| `count` | number | Number of lists returned |
584537

@@ -603,8 +556,6 @@ Get a single list by ID or slug
603556
| `workspaceAccess` | string | Workspace-level access \(e.g. full-access, read-only\) |
604557
| `workspaceMemberAccess` | json | Member-level access entries |
605558
| `createdByActor` | object | The actor who created the list |
606-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
607-
|`id` | string | The actor ID |
608559
| `createdAt` | string | When the list was created |
609560

610561
### `attio_create_list`
@@ -632,8 +583,6 @@ Create a new list in Attio
632583
| `workspaceAccess` | string | Workspace-level access \(e.g. full-access, read-only\) |
633584
| `workspaceMemberAccess` | json | Member-level access entries |
634585
| `createdByActor` | object | The actor who created the list |
635-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
636-
|`id` | string | The actor ID |
637586
| `createdAt` | string | When the list was created |
638587

639588
### `attio_update_list`
@@ -661,8 +610,6 @@ Update a list in Attio
661610
| `workspaceAccess` | string | Workspace-level access \(e.g. full-access, read-only\) |
662611
| `workspaceMemberAccess` | json | Member-level access entries |
663612
| `createdByActor` | object | The actor who created the list |
664-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
665-
|`id` | string | The actor ID |
666613
| `createdAt` | string | When the list was created |
667614

668615
### `attio_query_list_entries`
@@ -848,8 +795,6 @@ Create a comment on a list entry in Attio
848795
| `threadId` | string | The thread ID |
849796
| `contentPlaintext` | string | The comment content as plaintext |
850797
| `author` | object | The comment author |
851-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
852-
|`id` | string | The actor ID |
853798
| `entry` | object | The list entry this comment is on |
854799
|`listId` | string | The list ID |
855800
|`entryId` | string | The entry ID |
@@ -858,8 +803,6 @@ Create a comment on a list entry in Attio
858803
|`recordId` | string | The record ID |
859804
| `resolvedAt` | string | When the thread was resolved |
860805
| `resolvedBy` | object | Who resolved the thread |
861-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
862-
|`id` | string | The actor ID |
863806
| `createdAt` | string | When the comment was created |
864807

865808
### `attio_get_comment`
@@ -880,8 +823,6 @@ Get a single comment by ID from Attio
880823
| `threadId` | string | The thread ID |
881824
| `contentPlaintext` | string | The comment content as plaintext |
882825
| `author` | object | The comment author |
883-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
884-
|`id` | string | The actor ID |
885826
| `entry` | object | The list entry this comment is on |
886827
|`listId` | string | The list ID |
887828
|`entryId` | string | The entry ID |
@@ -890,8 +831,6 @@ Get a single comment by ID from Attio
890831
|`recordId` | string | The record ID |
891832
| `resolvedAt` | string | When the thread was resolved |
892833
| `resolvedBy` | object | Who resolved the thread |
893-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
894-
|`id` | string | The actor ID |
895834
| `createdAt` | string | When the comment was created |
896835

897836
### `attio_delete_comment`
@@ -957,8 +896,6 @@ Get a single comment thread by ID from Attio
957896
| --------- | ---- | ----------- |
958897
| `threadId` | string | The thread ID |
959898
| `comments` | array | Comments in the thread |
960-
|`type` | string | The actor type \(e.g. workspace-member, api-token, system\) |
961-
|`id` | string | The actor ID |
962899
| `createdAt` | string | When the thread was created |
963900

964901
### `attio_list_webhooks`

0 commit comments

Comments
 (0)