Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ast typedefs #969

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 67 additions & 64 deletions packages/asana/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,79 +313,66 @@
"callback"
],
"docs": {
"description": "Options provided to the createTaskStory request",
"description": "Create a story to a specific task.",
"tags": [
{
"title": "typedef",
"description": null,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "StoryOptions"
},
{
"title": "public",
"description": null,
"type": null
},
{
"title": "property",
"description": "The plain text of the comment to add. Cannot be used with html_text.",
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "text"
"title": "example",
"description": "createTaskStory(\"1206933955023739\", {\n text: \"This is a comment\",\n});",
"caption": "Create a plain text comment"
},
{
"title": "property",
"description": "Opt In. HTML formatted text for a comment. This will not include the name of the creator.",
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "html_text"
"title": "example",
"description": "createTaskStory(\"1206933955023739\", {\n html_text: \"<body>This is a comment</body>\",\n});",
"caption": "Create a HTML formatted text comment"
},
{
"title": "function",
"description": null,
"name": null
},
{
"title": "property",
"description": "Default to `false`. Whether the story should be pinned on the resource.",
"title": "param",
"description": "Globally unique identifier for the task",
"type": {
"type": "NameExpression",
"name": "boolean"
"name": "string"
},
"name": "is_pinned"
"name": "taskGid"
},
{
"title": "property",
"description": "The name of the sticker in this story. `null` if there is no sticker.",
"title": "param",
"description": "Story parameters",
"type": {
"type": "NameExpression",
"name": "string"
"name": "StoryOptions"
},
"name": "sticker_name"
"name": "params"
},
{
"title": "property",
"description": "Opt In. This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.",
"title": "param",
"description": "(Optional) callback function",
"type": {
"type": "NameExpression",
"name": "array"
"name": "function"
},
"name": "opt_fields"
"name": "callback"
},
{
"title": "property",
"description": "Defaults to `false`. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.",
"title": "returns",
"description": null,
"type": {
"type": "NameExpression",
"name": "boolean"
},
"name": "opt_pretty"
"name": "Operation"
}
}
]
},
"valid": false
"valid": true
},
{
"name": "request",
Expand All @@ -395,52 +382,68 @@
"callback"
],
"docs": {
"description": "Options provided to the Asana API request",
"description": "Make a HTTP request against the Asana API.",
"tags": [
{
"title": "typedef",
"title": "public",
"description": null,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "RequestOptions"
"type": null
},
{
"title": "public",
"title": "example",
"description": "Get a task by id\nrequest(\"/tasks/1234\");"
},
{
"title": "example",
"description": "Query for tasks in a given project\nrequest(\"/tasks\", {\n query: { project: \"abc\" },\n});"
},
{
"title": "example",
"description": "Create a new task\nrequest(\"/tasks\", {\n method: \"POST\",\n body: { data: { name: \"do the thing\", completed: false } },\n});"
},
{
"title": "function",
"description": null,
"type": null
"name": null
},
{
"title": "property",
"description": "Body data to append to the request.",
"title": "param",
"description": "Path to resource (excluding api/version)",
"type": {
"type": "NameExpression",
"name": "object"
"name": "string"
},
"name": "body"
"name": "path"
},
{
"title": "property",
"description": "An object of query parameters to be encoded into the URL.",
"title": "param",
"description": "(Optional) Query, body and method parameters",
"type": {
"type": "NameExpression",
"name": "object"
"name": "RequestOptions"
},
"name": "query"
"name": "params"
},
{
"title": "property",
"description": "The HTTP method to use. Defaults to `GET`",
"title": "param",
"description": "(Optional) Callback function",
"type": {
"type": "NameExpression",
"name": "string"
"name": "function"
},
"name": "method"
"name": "callback"
},
{
"title": "returns",
"description": null,
"type": {
"type": "NameExpression",
"name": "Operation"
}
}
]
},
"valid": false
"valid": true
}
],
"exports": [],
Expand Down
76 changes: 76 additions & 0 deletions packages/cht/ast.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,81 @@
{
"operations": [
{
"name": "get",
"params": [
"path",
"options",
"callback"
],
"docs": {
"description": "Make a GET request against the base URL.",
"tags": [
{
"title": "example",
"description": "get(\"/api/v2/export/contacts\");",
"caption": "Get a list of contacts"
},
{
"title": "example",
"description": "get(\"/api/v2/export/contacts\", {\nquery: {\"filters\": {\n\"search\": \"jim\"\n}}\n});",
"caption": "Filter contacts given a name"
},
{
"title": "function",
"description": null,
"name": null
},
{
"title": "public",
"description": null,
"type": null
},
{
"title": "param",
"description": "Path to resource",
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "path"
},
{
"title": "param",
"description": "Options to configure the HTTP request",
"type": {
"type": "NameExpression",
"name": "RequestOptions"
},
"name": "options"
},
{
"title": "param",
"description": "Optional callback to handle the response",
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "function"
}
},
"name": "callback"
},
{
"title": "returns",
"description": null,
"type": {
"type": "NameExpression",
"name": "Operation"
}
},
{
"title": "state",
"description": "{CHTHttpState}"
}
]
},
"valid": true
},
{
"name": "post",
"params": [
Expand Down
57 changes: 57 additions & 0 deletions packages/ghana-bdr/ast.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
{
"operations": [
{
"name": "get",
"params": [
"path",
"query"
],
"docs": {
"description": "Make a GET request",
"tags": [
{
"title": "example",
"description": "get(\"patient\");"
},
{
"title": "function",
"description": null,
"name": null
},
{
"title": "public",
"description": null,
"type": null
},
{
"title": "param",
"description": "Path to resource",
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "path"
},
{
"title": "param",
"description": "An object of query parameters to be encoded into the URL.",
"type": {
"type": "NameExpression",
"name": "object"
},
"name": "query"
},
{
"title": "returns",
"description": null,
"type": {
"type": "NameExpression",
"name": "Operation"
}
},
{
"title": "state",
"description": "{HttpState}"
}
]
},
"valid": true
},
{
"name": "post",
"params": [
Expand Down
Loading