Skip to content

Commit

Permalink
add parent_id in returns
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Dec 11, 2024
1 parent ee57b59 commit 463f7e7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ async function handler(
timestamp: table.timestamp,
tags: table.tags,
parents: table.parents,
parent_id: table.parent_id,
mime_type: table.mime_type,
title: table.title,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ async function handler(
timestamp: table.timestamp,
tags: table.tags,
parents: table.parents,
parent_id: table.parent_id,
mime_type: table.mime_type,
title: table.title,
};
Expand Down
12 changes: 12 additions & 0 deletions front/pages/api/v1/w/[wId]/swagger_schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@
* description: Array of tags associated with the table
* items:
* type: string
* parent_id:
* type: string
* description: ID of the table parent
* items:
* type: string
* example: "1234f4567c"
* parents:
* type: array
* description: Array of parent table IDs
Expand Down Expand Up @@ -594,6 +600,12 @@
* items:
* type: string
* example: ["customer_support", "faq"]
* parent_id:
* type: string
* description: ID of the document parent
* items:
* type: string
* example: "1234f4567c"
* parents:
* type: array
* items:
Expand Down
2 changes: 2 additions & 0 deletions sdks/js/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ const CoreAPIDocumentSchema = z.object({
created: z.number(),
document_id: z.string(),
timestamp: z.number(),
parent_id: z.string().nullable().optional(),
tags: z.array(z.string()),
source_url: z.string().nullable().optional(),
hash: z.string(),
Expand Down Expand Up @@ -318,6 +319,7 @@ const CoreAPITablePublicSchema = z.object({
timestamp: z.number(),
tags: z.array(z.string()),
parents: z.array(z.string()),
parent_id: z.string().nullable().optional(),
mime_type: z.string().optional(),
title: z.string().optional(),
});
Expand Down
2 changes: 2 additions & 0 deletions types/src/core/data_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export type CoreAPIDocument = {
data_source_id: string;
created: number;
document_id: string;
parent_id: string | null;
timestamp: number;
tags: string[];
source_url?: string | null;
Expand Down Expand Up @@ -79,6 +80,7 @@ export type CoreAPIFolder = {
folder_id: string;
timestamp: number;
title: string;
parent_id: string | null;
parents: string[];
};

Expand Down

0 comments on commit 463f7e7

Please sign in to comment.