From e9f052305b124a83cd9e166edfbd3b08e76976ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Cutzach?= Date: Tue, 13 Aug 2024 14:05:59 +0200 Subject: [PATCH 1/3] feat: Update README.md More explicit supported python versions more explicit grist-checkout -> grist-core-checkout --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18848ee9c..0d5449b15 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Repository for Grist documentation and tutorials. The public site is at , served using GitHub Pages. -The content is hosted at . On changes to master (such as +The content is hosted at . On changes to master (such as when a pull request is merged), the public site gets automatically republished. Previews of pull requests are automatically built by Netlify, and made available at URLs such as @@ -15,6 +15,8 @@ Conversation tab. ## Setting up local environment +N.B.: Python 3.12 isn't supported yet. Please, use Python 3.10 or 3.11 instead. + ``` sh # initiate a python virtual environment python3 -m venv env @@ -92,7 +94,7 @@ Once you're done, add the results to the main documentation with: To update `help/en/docs/functions.md` from the documentation comments in Grist, run: ``` -./build-functions.sh +./build-functions.sh ``` It replaces content between `BEGIN mkpydocs`/`END mkpydocs` markers in `help/en/docs/functions.md`. You @@ -103,7 +105,7 @@ can edit text outside of those markers directly. To update `help/en/docs/code` from the documentation comments in Grist, run: ``` -./build-plugin-api.sh +./build-plugin-api.sh ``` You need to first run `yarn install` in your Grist checkout directory. From 54495fa88260d123fe2bb08fb7c73169324c3a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Cutzach?= Date: Tue, 13 Aug 2024 14:59:35 +0200 Subject: [PATCH 2/3] feat: docApiKey Documentation ADDED --- api/grist.yml | 133 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 2 deletions(-) diff --git a/api/grist.yml b/api/grist.yml index 639e9c224..070a2e2b0 100644 --- a/api/grist.yml +++ b/api/grist.yml @@ -929,7 +929,95 @@ paths: responses: 200: description: Success - + /docs/{docId}/apikey: + post: + operationId: "createDocApiKey" + tags: + - document API key + summary: "Create a document API key" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + requestBody: + description: > + A Share object. + The linkId must be unique for the document. + In options the apiKey flag set to true is mandatory. + In options access can be set to editors or viewers. + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDocApiKey" + required: true + responses: + 200: + description: Success + content: + /docs/{docId}/apikey/{linkId}: + get: + operationId: "readDocApiKey" + tags: + - document API key + summary: "Read a document API key" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + - $ref: '#/components/parameters/linkIdPathParam' + responses: + 200: + description: Success + patch: + operationId: "updateDocApiKey" + tags: + - document API key + summary: "Update a document API key" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + - $ref: '#/components/parameters/linkIdPathParam' + requestBody: + description: > + A Share object. + The linkId must be unique for the document. + In options the apiKey flag set to true is mandatory. + In options access can be set to editors or viewers. + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateDocApiKey" + required: true + responses: + 200: + description: Success + delete: + operationId: "deleteDocApiKey" + tags: + - document API key + summary: "Delete a document API key" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + - $ref: '#/components/parameters/linkIdPathParam' + responses: + 200: + description: Success + /docs/{docId}/apikeys: + get: + operationId: "readDocApiKeys" + tags: + - document API key + summary: "Read all API keys of a document" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + responses: + 200: + description: Success + delete: + operationId: "deleteDocApiKeys" + tags: + - document API key + summary: "Delete all API keys of a document" + parameters: + - $ref: '#/components/parameters/docIdPathParam' + responses: + 200: + description: Success /docs/{docId}/webhooks: get: tags: @@ -1696,7 +1784,41 @@ components: - id: popularity fields: label: "Popularity ❤" - + DocApiKeyOptions: + type: object + properties: + apikey: + type: boolean + enum: true + example: true + access: + type: string + enum: + -editors + -viewers + example: editors + CreateDocApiKey: + type: object + properties: + docId: + type: string + example: XXXXXXXXXXX + linkId: + type: string + example: YYYYYYYYYYY + options: + $ref: "#/components/schemas/DocApiKeyOptions" + UpdateDocApiKey: + type: object + properties: + docId: + type: string + example: XXXXXXXXXXX + linkId: + type: string + example: YYYYYYYYYYY + options: + $ref: "#/components/schemas/DocApiKeyOptions" ColumnsList: type: object properties: @@ -2163,6 +2285,13 @@ components: type: integer description: A user id required: true + linkIdPathParam: + in: path + name: linkId + schema: + type: string + description: A string id (UUID) + required: true noparseQueryParam: in: query name: noparse From 8c1f6c2e69a45716957cdd6a5b8afdd52f85b45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Cutzach?= Date: Tue, 13 Aug 2024 15:01:35 +0200 Subject: [PATCH 3/3] fix: better parsability yaml : in array can be misinterpreted by some yaml parsers. Split enum in many line makes it easy --- api/grist.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/grist.yml b/api/grist.yml index 070a2e2b0..ba4c95249 100644 --- a/api/grist.yml +++ b/api/grist.yml @@ -1936,7 +1936,19 @@ components: type: type: string description: "Column type, by default Any. Ref, RefList and DateTime types requires a postfix, e.g. DateTime:America/New_York, Ref:Users" - enum: [Any, Text, Numeric, Int, Bool, Date, DateTime:, Choice, ChoiceList, Ref:, RefList:, Attachments] + enum: + - Any + - Text + - Numeric + - Int + - Bool + - Date + - DateTime: + - Choice + - ChoiceList + - Ref: + - RefList: + - Attachments label: type: string description: Column label.