Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

chore(ts/cli): update snapshots

jkomyno8d902a38f7f4
diff --git a/ts/packages/cli/test/src/generation/typescript/__snapshots__/generate-type-from-json-schema.test.ts.snap b/ts/packages/cli/test/src/generation/typescript/__snapshots__/generate-type-from-json-schema.test.ts.snap
index 7ad43050d..6cb0a9d0e 100644
--- a/ts/packages/cli/test/src/generation/typescript/__snapshots__/generate-type-from-json-schema.test.ts.snap
+++ b/ts/packages/cli/test/src/generation/typescript/__snapshots__/generate-type-from-json-schema.test.ts.snap
@@ -11,6 +11,7 @@ exports[`generateTypeFromJsonSchema > control group - simple schemas without dis
/**
* Page Id
* @description The unique identifier (UUID) of the Notion page to be archived or unarchived. This must be a page ID, not a database ID. Database IDs cannot be used with this action - databases must be archived using the archive database action instead. Page IDs can be obtained using NOTION_SEARCH_NOTION_PAGE with filter_value='page' or from the 'id' field of page objects returned by other Notion actions.
+ * @example a1b2c3d4-e5f6-7890-1234-567890abcdef
*/
page_id?: string;
};"
@@ -21,12 +22,33 @@ exports[`generateTypeFromJsonSchema > control group - simple schemas without dis
/**
* Comment
* @description Content of the comment as a NotionRichText object or a JSON string. Simplest form: {'content': 'Looks good!'} or {'text': 'Looks good!'} (both 'content' and 'text' are accepted as the field name). Can also be passed as a JSON string: '{"content": "Looks good!"}'. Optional styling fields: bold, italic, link, etc. Do NOT wrap this in a list or use Notion API block JSON.
+ * @example {
+ * "content": "Looks good to me!"
+ * }
+ * @example {
+ * "text": "Great work!"
+ * }
+ * @example {
+ * "bold": true,
+ * "content": "Fix typo"
+ * }
*/
comment?: {
/**
* Block Property
* @description The block property of the block to be added. Possible properties are \`paragraph\`, \`heading_1\`, \`heading_2\`, \`heading_3\`, \`callout\`, \`to_do\`, \`toggle\`, \`quote\`, \`bulleted_list_item\`, \`numbered_list_item\`. Other properties possible are \`file\`, \`image\`, \`video\` (link required), and \`divider\` (creates a horizontal divider line, no content required).
* @default paragraph
+ * @example paragraph
+ * @example heading_1
+ * @example heading_2
+ * @example heading_3
+ * @example bulleted_list_item
+ * @example numbered_list_item
+ * @example to_do
+ * @example callout
+ * @example toggle
+ * @example quote
+ * @example divider
* @enum {string}
*/
block_property: "paragraph" | "heading_1" | "heading_2" | "heading_3" | "callout" | "to_do" | "toggle" | "quote" | "bulleted_list_item" | "numbered_list_item" | "file" | "image" | "video" | "divider";
@@ -34,48 +56,68 @@ exports[`generateTypeFromJsonSchema > control group - simple schemas without dis
* Bold
* @description Indicates if the text is bold.
* @default false
+ * @example true
+ * @example false
*/
bold: boolean;
/**
* Code
* @description Indicates if the text is formatted as code.
* @default false
+ * @example true
+ * @example false
*/
code: boolean;
/**
* Color
* @description The color of the text background or text itself.
* @default default
+ * @example blue_background
+ * @example yellow_background
+ * @example gray
+ * @example purple
*/
color: string;
/**
* Content
* @description The textual content of the rich text object. ENHANCED: Now automatically parses markdown formatting including bold (**text**), italic (*text*), strikethrough (~~text~~), inline code (\`code\`), and links ([text](url)). Required for paragraph, heading_1, heading_2, heading_3, callout, to_do, toggle, quote.
* @default null
+ * @example Hello World
+ * @example This is **bold** and *italic* text
+ * @example Visit [our site](https://example.com)
+ * @example Use \`code\` snippets
+ * @example ~~Strikethrough~~ text
*/
content: string | null;
/**
* Italic
* @description Indicates if the text is italic.
* @default false
+ * @example true
+ * @example false
*/
italic: boolean;
/**
* Link
* @description The URL of the rich text object or the file to be uploaded or image/video link
* @default null
+ * @example https://www.google.com
*/
link: string | null;
/**
* Strikethrough
* @description Indicates if the text has strikethrough.
* @default false
+ * @example true
+ * @example false
*/
strikethrough: boolean;
/**
* Underline
* @description Indicates if the text is underlined.
* @default false
+ * @example true
+ * @example false
*/
underline: boolean;
};
@@ -83,12 +125,14 @@ exports[`generateTypeFromJsonSchema > control group - simple schemas without dis
* Discussion Id
* @description The ID of an existing discussion thread to which the comment will be added. This is required if \`parent_page_id\` is not provided.
* @default null
+ * @example yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
*/
discussion_id: string | null;
/**
* Parent Page Id
* @description The ID of the Notion page where the comment will be added. This is required if \`discussion_id\` is not provided. Page IDs can be obtained using other Notion actions that fetch page details or list pages.
* @default null
+ * @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
*/
parent_page_id: string | null;
};"
@@ -99,6 +143,7 @@ exports[`generateTypeFromJsonSchema > control group - simple schemas without dis
/**
* Block Id
* @description Identifier of the block, page, or database to be deleted (archived). Must be a valid Notion block/page/database ID in UUID format (with or without hyphens). To find page IDs and their titles, consider using an action like \`NOTION_FETCH_DATA\`.
+ * @example 59833787-2cf9-4fdf-8782-e53db20768a5
*/
block_id?: string;
};"
@@ -110,11 +155,14 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
* After
* @description Optional UUID of an existing child block. New blocks will be inserted after this block.
* @default null
+ * @example 9bc30ad4-9373-46a5-84ab-0a7845ee52e6
*/
after: string | null;
/**
* Block Id
* @description The UUID of the parent block or page to append children to.
+ * @example b55c9c91-384d-452b-81db-d1ef79372b75
+ * @example b55c9c91384d452b81dbd1ef79372b75
*/
block_id?: string;
/**
@@ -127,6 +175,38 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
*
* ⚠️ Text content limited to 2000 characters per rich_text text.content field.
* Max 100 blocks per request.
+ * @example [
+ * {
+ * "heading_2": {
+ * "rich_text": [
+ * {
+ * "text": {
+ * "content": "Section Title"
+ * },
+ * "type": "text"
+ * }
+ * ]
+ * },
+ * "object": "block",
+ * "type": "heading_2"
+ * }
+ * ]
+ * @example [
+ * {
+ * "object": "block",
+ * "paragraph": {
+ * "rich_text": [
+ * {
+ * "text": {
+ * "content": "This is a paragraph."
+ * },
+ * "type": "text"
+ * }
+ * ]
+ * },
+ * "type": "paragraph"
+ * }
+ * ]
*/
children?: ({
/**
@@ -204,6 +284,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -214,6 +296,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
@@ -309,6 +393,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -319,6 +405,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
@@ -421,6 +509,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -431,6 +521,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
@@ -533,6 +625,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -543,6 +637,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
@@ -639,6 +735,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -649,6 +747,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
@@ -745,6 +845,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Content
* @description The actual text content. CRITICAL: Maximum 2000 characters per text object.
+ * @example Hello, World!
+ * @example This is a paragraph of text.
*/
content: string;
/**
@@ -755,6 +857,8 @@ exports[`generateTypeFromJsonSchema > problematic schema - discriminator with $d
/**
* Url
* @description The URL the text links to.
+ * @example https://www.notion.so
+ * @example https://example.com
*/
url: string;
} | null;
diff --git a/ts/packages/cli/test/src/generation/typescript/generate-toolkit-source.test.ts b/ts/packages/cli/test/src/generation/typescript/generate-toolkit-source.test.ts
index d4806b809..f5841fa63 100644
--- a/ts/packages/cli/test/src/generation/typescript/generate-toolkit-source.test.ts
+++ b/ts/packages/cli/test/src/generation/typescript/generate-toolkit-source.test.ts
@@ -251,26 +251,31 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Author
* @description The GitHub username of the commit author
+ * @example octocat
*/
author?: string;
/**
* Id
* @description The SHA of the commit
+ * @example 7638417db6d59f3c431d3e1f261cc637155684cd
*/
id?: string;
/**
* Message
* @description The commit message
+ * @example Fix typo in README
*/
message?: string;
/**
* Timestamp
* @description The timestamp of the commit
+ * @example 2021-04-14T02:15:15Z
*/
timestamp?: string;
/**
* Url
* @description The GitHub URL of the commit
+ * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd
*/
url?: string;
};
@@ -293,42 +298,50 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the issue
+ * @example opened
*/
action?: string;
/**
* Createdat
* @description The timestamp when the issue was created
+ * @example 2021-04-14T02:15:15Z
*/
createdAt?: string;
/**
* Createdby
* @description The GitHub username of the user who created the issue
+ * @example octocat
*/
createdBy?: string;
/**
* Description
* @description A detailed description of the issue
* @default
+ * @example There is a bug in the code that needs to be fixed.
*/
description: string;
/**
* Issue Id
* @description The unique ID assigned to the issue
+ * @example 101
*/
issue_id?: number;
/**
* Number
* @description The unique number assigned to the issue
+ * @example 42
*/
number?: number;
/**
* Title
* @description The title of the issue
+ * @example Bug in code
*/
title?: string;
/**
* Url
* @description The GitHub URL of the issue
+ * @example https://github.com/octocat/Hello-World/issues/42
*/
url?: string;
};
@@ -340,36 +353,44 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the label
+ * @example labeled
*/
action?: string;
/**
* Label
* @description The name of the label that was added
+ * @example bug
+ * @example enhancement
*/
label?: string;
/**
* Labeled At
* @description The timestamp when the label was added
+ * @example 2021-04-14T02:15:15Z
*/
labeled_at?: string;
/**
* Labeled By
* @description The GitHub username of the user who added the label
+ * @example octocat
*/
labeled_by?: string;
/**
* Pull Request Number
* @description The unique number assigned to the pull request
+ * @example 42
*/
pull_request_number?: number;
/**
* Pull Request Title
* @description The title of the pull request
+ * @example Fix typo in README
*/
pull_request_title?: string;
/**
* Pull Request Url
* @description The GitHub URL of the pull request
+ * @example https://github.com/octocat/Hello-World/pull/42
*/
pull_request_url?: string;
};
@@ -381,37 +402,46 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the pull request
+ * @example opened
+ * @example closed
+ * @example synchronize
*/
action?: string;
/**
* Createdat
* @description The timestamp when the pull request was created
+ * @example 2021-04-14T02:15:15Z
*/
createdAt?: string;
/**
* Createdby
* @description The GitHub username of the user who created the pull request
+ * @example octocat
*/
createdBy?: string;
/**
* Description
* @description A detailed description of the pull request
* @default
+ * @example This pull request fixes a typo found in the README file under the 'Installation' section.
*/
description: string;
/**
* Number
* @description The unique number assigned to the pull request
+ * @example 42
*/
number?: number;
/**
* Title
* @description The title of the pull request
+ * @example Fix typo in README
*/
title?: string;
/**
* Url
* @description The GitHub URL of the pull request
+ * @example https://github.com/octocat/Hello-World/pull/42
*/
url?: string;
};
@@ -423,31 +453,37 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the star
+ * @example created
*/
action?: string;
/**
* Repository Id
* @description The unique ID assigned to the repository
+ * @example 101
*/
repository_id?: number;
/**
* Repository Name
* @description The name of the repository
+ * @example Hello-World
*/
repository_name?: string;
/**
* Repository Url
* @description The GitHub URL of the repository
+ * @example https://github.com/octocat/Hello-World
*/
repository_url?: string;
/**
* Starred At
* @description The timestamp when the star was added
+ * @example 2021-04-14T02:15:15Z
*/
starred_at?: string;
/**
* Starred By
* @description The GitHub username of the user who added the star
+ * @example octocat
*/
starred_by?: string;
};
@@ -779,6 +815,8 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Invitation Id
* @description Unique identifier of the repository invitation. Obtain by listing pending invitations for the authenticated user.
+ * @example 12345
+ * @example 67890
*/
invitation_id?: number;
};
@@ -815,6 +853,8 @@ describe('generateTypeScriptToolkitSources', () => {
* Direction
* @description Sort direction: 'asc' (ascending) or 'desc' (descending).
* @default desc
+ * @example asc
+ * @example desc
* @enum {string}
*/
direction: "asc" | "desc";
@@ -822,18 +862,26 @@ describe('generateTypeScriptToolkitSources', () => {
* Page
* @description Page number of results (starts from 1).
* @default 1
+ * @example 1
+ * @example 2
+ * @example 5
*/
page: number;
/**
* Per Page
* @description Number of results per page (max 100).
* @default 1
+ * @example 30
+ * @example 50
+ * @example 100
*/
per_page: number;
/**
* Sort
* @description Sorts starred repositories by 'created' (date starred) or 'updated' (date last pushed).
* @default created
+ * @example created
+ * @example updated
* @enum {string}
*/
sort: "created" | "updated";
@@ -867,23 +915,33 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Owner
* @description Username of the account owner (user or organization) of the repository; case-insensitive.
+ * @example octocat
+ * @example google
*/
owner?: string;
/**
* Page
* @description Page number of the results to fetch.
* @default 1
+ * @example 1
+ * @example 2
+ * @example 10
*/
page: number;
/**
* Per Page
* @description Number of results to display per page (max 100).
* @default 30
+ * @example 30
+ * @example 50
+ * @example 100
*/
per_page: number;
/**
* Repo
* @description Name of the repository, without the \`.git\` extension; case-insensitive.
+ * @example Spoon-Knife
+ * @example mercury
*/
repo?: string;
};
@@ -940,26 +998,31 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Author
* @description The GitHub username of the commit author
+ * @example octocat
*/
author?: string;
/**
* Id
* @description The SHA of the commit
+ * @example 7638417db6d59f3c431d3e1f261cc637155684cd
*/
id?: string;
/**
* Message
* @description The commit message
+ * @example Fix typo in README
*/
message?: string;
/**
* Timestamp
* @description The timestamp of the commit
+ * @example 2021-04-14T02:15:15Z
*/
timestamp?: string;
/**
* Url
* @description The GitHub URL of the commit
+ * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd
*/
url?: string;
};
@@ -982,42 +1045,50 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the issue
+ * @example opened
*/
action?: string;
/**
* Createdat
* @description The timestamp when the issue was created
+ * @example 2021-04-14T02:15:15Z
*/
createdAt?: string;
/**
* Createdby
* @description The GitHub username of the user who created the issue
+ * @example octocat
*/
createdBy?: string;
/**
* Description
* @description A detailed description of the issue
* @default
+ * @example There is a bug in the code that needs to be fixed.
*/
description: string;
/**
* Issue Id
* @description The unique ID assigned to the issue
+ * @example 101
*/
issue_id?: number;
/**
* Number
* @description The unique number assigned to the issue
+ * @example 42
*/
number?: number;
/**
* Title
* @description The title of the issue
+ * @example Bug in code
*/
title?: string;
/**
* Url
* @description The GitHub URL of the issue
+ * @example https://github.com/octocat/Hello-World/issues/42
*/
url?: string;
};
@@ -1029,36 +1100,44 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the label
+ * @example labeled
*/
action?: string;
/**
* Label
* @description The name of the label that was added
+ * @example bug
+ * @example enhancement
*/
label?: string;
/**
* Labeled At
* @description The timestamp when the label was added
+ * @example 2021-04-14T02:15:15Z
*/
labeled_at?: string;
/**
* Labeled By
* @description The GitHub username of the user who added the label
+ * @example octocat
*/
labeled_by?: string;
/**
* Pull Request Number
* @description The unique number assigned to the pull request
+ * @example 42
*/
pull_request_number?: number;
/**
* Pull Request Title
* @description The title of the pull request
+ * @example Fix typo in README
*/
pull_request_title?: string;
/**
* Pull Request Url
* @description The GitHub URL of the pull request
+ * @example https://github.com/octocat/Hello-World/pull/42
*/
pull_request_url?: string;
};
@@ -1070,37 +1149,46 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the pull request
+ * @example opened
+ * @example closed
+ * @example synchronize
*/
action?: string;
/**
* Createdat
* @description The timestamp when the pull request was created
+ * @example 2021-04-14T02:15:15Z
*/
createdAt?: string;
/**
* Createdby
* @description The GitHub username of the user who created the pull request
+ * @example octocat
*/
createdBy?: string;
/**
* Description
* @description A detailed description of the pull request
* @default
+ * @example This pull request fixes a typo found in the README file under the 'Installation' section.
*/
description: string;
/**
* Number
* @description The unique number assigned to the pull request
+ * @example 42
*/
number?: number;
/**
* Title
* @description The title of the pull request
+ * @example Fix typo in README
*/
title?: string;
/**
* Url
* @description The GitHub URL of the pull request
+ * @example https://github.com/octocat/Hello-World/pull/42
*/
url?: string;
};
@@ -1112,31 +1200,37 @@ describe('generateTypeScriptToolkitSources', () => {
/**
* Action
* @description The action that was performed on the star
+ * @example created
*/
action?: string;
/**
* Repository Id
* @description The unique ID assigned to the repository
+ * @example 101
*/
repository_id?: number;
/**
* Repository Name
* @description The name of the repository
+ * @example Hello-World
*/
repository_name?: string;
/**
* Repository Url
* @description The GitHub URL of the repository
+ * @example https://github.com/octocat/Hello-World
*/
repository_url?: string;
/**
* Starred At
* @description The timestamp when the star was added
+ * @example 2021-04-14T02:15:15Z
*/
starred_at?: string;
/**
* Starred By
* @description The GitHub username of the user who added the star
+ * @example octocat
*/
starred_by?: string;
};