From fe67c1203c11a3c3c143be33a4a05fd9330a7515 Mon Sep 17 00:00:00 2001 From: Shay Frendt Date: Tue, 20 Aug 2024 11:16:38 -0400 Subject: [PATCH] Decouple screens from apps --- .../v2/components/create-component.mdx | 4 +-- api-reference/v2/components/get-component.mdx | 2 +- .../v2/components/list-components.mdx | 4 +-- .../v2/components/update-component.mdx | 4 +-- .../v2/computations/create-computation.mdx | 26 +++++++++++++++++++ api-reference/v2/screens/create-screen.mdx | 4 +-- api-reference/v2/screens/list-screens.mdx | 4 +-- api-reference/v2/workflows/get-workflows.mdx | 4 +-- mint.json | 6 +++++ 9 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 api-reference/v2/computations/create-computation.mdx diff --git a/api-reference/v2/components/create-component.mdx b/api-reference/v2/components/create-component.mdx index 77dfc9d..56e1e1b 100644 --- a/api-reference/v2/components/create-component.mdx +++ b/api-reference/v2/components/create-component.mdx @@ -1,6 +1,6 @@ --- title: Create Component -openapi: post /app/{appID}/screens/{screenID}/components +openapi: post /screens/{screenID}/components --- -Creates a Component for a Screen in an App. \ No newline at end of file +Creates a Component for a Screen. \ No newline at end of file diff --git a/api-reference/v2/components/get-component.mdx b/api-reference/v2/components/get-component.mdx index ff9c6c3..b88a27b 100644 --- a/api-reference/v2/components/get-component.mdx +++ b/api-reference/v2/components/get-component.mdx @@ -1,6 +1,6 @@ --- title: Get Component -openapi: get /app/{appID}/screens/{screenID}/component/{componentID} +openapi: get /screens/{screenID}/component/{componentID} --- Retrieves a Component object. \ No newline at end of file diff --git a/api-reference/v2/components/list-components.mdx b/api-reference/v2/components/list-components.mdx index 8284973..b9eeb16 100644 --- a/api-reference/v2/components/list-components.mdx +++ b/api-reference/v2/components/list-components.mdx @@ -1,6 +1,6 @@ --- title: List Components -openapi: get /apps/{appID}/screens/{screenID}/components +openapi: get /screens/{screenID}/components --- -Returns a list of the Components belonging to a Screen in an App. \ No newline at end of file +Returns a list of the Components belonging to a Screen. \ No newline at end of file diff --git a/api-reference/v2/components/update-component.mdx b/api-reference/v2/components/update-component.mdx index 14d0962..4b9da61 100644 --- a/api-reference/v2/components/update-component.mdx +++ b/api-reference/v2/components/update-component.mdx @@ -1,6 +1,6 @@ --- title: Update Component -openapi: put /app/{appID}/screens/{screenID}/components/{componentID} +openapi: put /screens/{screenID}/components/{componentID} --- -Update a Component for a Screen in an App. \ No newline at end of file +Update a Component for a Screen. \ No newline at end of file diff --git a/api-reference/v2/computations/create-computation.mdx b/api-reference/v2/computations/create-computation.mdx new file mode 100644 index 0000000..4679352 --- /dev/null +++ b/api-reference/v2/computations/create-computation.mdx @@ -0,0 +1,26 @@ +--- +title: Create Computation +openapi: post /computations +--- + +Create a new computation. + +```json + "schema": { + "columns": [ + { + "id": "invoiceDate", + "displayName": "Invoice Date", + "type": { + "kind": "computation", + "id": "abc123" + } + }, + { + "id": "totalAmount", + "displayName": "Total", + "type": "number" + }, + ] + }, +``` \ No newline at end of file diff --git a/api-reference/v2/screens/create-screen.mdx b/api-reference/v2/screens/create-screen.mdx index 186c3f1..e28b941 100644 --- a/api-reference/v2/screens/create-screen.mdx +++ b/api-reference/v2/screens/create-screen.mdx @@ -1,6 +1,6 @@ --- title: Create Screen -openapi: post /app/{appID}/screens +openapi: post /screens --- -Create a new Screen for an App. \ No newline at end of file +Create a new Screen. \ No newline at end of file diff --git a/api-reference/v2/screens/list-screens.mdx b/api-reference/v2/screens/list-screens.mdx index 9e3ae2c..a1cbb64 100644 --- a/api-reference/v2/screens/list-screens.mdx +++ b/api-reference/v2/screens/list-screens.mdx @@ -1,6 +1,6 @@ --- title: List Screens -openapi: get /apps/{appID}/screens +openapi: get /screens --- -Returns a list of the Screens belonging to an App. \ No newline at end of file +Returns a list of the Screens. \ No newline at end of file diff --git a/api-reference/v2/workflows/get-workflows.mdx b/api-reference/v2/workflows/get-workflows.mdx index ae91034..4fd1fb3 100644 --- a/api-reference/v2/workflows/get-workflows.mdx +++ b/api-reference/v2/workflows/get-workflows.mdx @@ -1,6 +1,6 @@ --- title: List Workflows -openapi: get /apps/{appID}/workflows +openapi: get /workflows --- -Get a list of all Workflows associated with an App. \ No newline at end of file +Get a list of all Workflows. \ No newline at end of file diff --git a/mint.json b/mint.json index c65f101..d60a51b 100644 --- a/mint.json +++ b/mint.json @@ -48,6 +48,12 @@ "api-reference/v2/components/update-component" ] }, + { + "group": "Computations", + "pages": [ + "api-reference/v2/computations/create-computation" + ] + }, { "group": "Screens", "pages": [