From a2f8e54b674a4036f1cdb80daf9bbdcb4150cf45 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 26 Mar 2021 23:30:40 +0200 Subject: [PATCH] v5.09 --- CHANGELOG.md | 2 +- Stackerfile.yml | 2 +- package-lock.json | 2 +- package.json | 2 +- public/api/wekan.html | 861 +++++++++++++++++++++++++++++++++++++++-- public/api/wekan.yml | 2 +- sandstorm-pkgdef.capnp | 4 +- 7 files changed, 842 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b169bf97c..26100fe33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Upcoming Wekan release +# v5.09 2021-03-26 Wekan release This release adds the following improvements: diff --git a/Stackerfile.yml b/Stackerfile.yml index 2e13208d3..d7f4be3cc 100644 --- a/Stackerfile.yml +++ b/Stackerfile.yml @@ -1,5 +1,5 @@ appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928 -appVersion: "v5.08.0" +appVersion: "v5.09.0" files: userUploads: - README.md diff --git a/package-lock.json b/package-lock.json index 271671c76..261321908 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "v5.08.0", + "version": "v5.09.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0b384126d..96bd7a58d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "v5.08.0", + "version": "v5.09.0", "description": "Open-Source kanban", "private": true, "scripts": { diff --git a/public/api/wekan.html b/public/api/wekan.html index b1214af66..b0cba2195 100644 --- a/public/api/wekan.html +++ b/public/api/wekan.html @@ -7,7 +7,7 @@ - Wekan REST API v4.96 + Wekan REST API v5.09 @@ -1549,7 +1549,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc @@ -2077,7 +2092,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
-

Wekan REST API v4.96

+

Wekan REST API v5.09

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

@@ -9072,6 +9087,7 @@ Accept: application/json
const inputBody = '{
   "title": "string",
+  "sort": "string",
   "parentId": "string",
   "description": "string",
   "color": "string",
@@ -9114,6 +9130,7 @@ fetch('/api/boards/{board}/lists/{list}/cards/{ca
 
const fetch = require('node-fetch');
 const inputBody = {
   "title": "string",
+  "sort": "string",
   "parentId": "string",
   "description": "string",
   "color": "string",
@@ -9261,6 +9278,7 @@ System.out.println(response.toString());
 

Body parameter

title: string
+sort: string
 parentId: string
 description: string
 color: string
@@ -9330,6 +9348,13 @@ System.out.println(response.toString());
 the new title of the card
 
 
+» sort
+body
+string
+false
+the new sort value of the card
+
+
 » parentId
 body
 string
@@ -10765,25 +10790,12 @@ System.out.println(response.toString());
 

200 Response

-
{
-  "boardIds": [
-    "string"
-  ],
-  "name": "string",
-  "type": "text",
-  "settings": {
-    "currencyCode": "string",
-    "dropdownItems": [
-      {}
-    ]
-  },
-  "showOnCard": true,
-  "automaticallyOnCard": true,
-  "alwaysOnCard": true,
-  "showLabelOnMiniCard": true,
-  "createdAt": "string",
-  "modifiedAt": "string"
-}
+
[
+  {
+    "_id": "string",
+    "boardIds": "string"
+  }
+]
 

Responses

@@ -10800,7 +10812,36 @@ System.out.println(response.toString()); - + + + +
200 OK 200 responseCustomFieldsInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
» boardIdsstringfalsenonenone
@@ -11050,14 +11091,14 @@ System.out.println(response.toString()); body boolean true -should we show the custom field on cards? +should we show the custom field on cards » automaticallyOnCard body boolean true -should the custom fields automatically be added on cards? +should the custom fields automatically be added on cards » alwaysOnCard @@ -11071,7 +11112,7 @@ System.out.println(response.toString()); body boolean true -should the label of the custom field be shown on minicards? +should the label of the custom field be shown on minicards @@ -11363,6 +11404,774 @@ System.out.println(response.toString()); To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +

add_custom_field_dropdown_items

+

+
+

Code samples

+
+
# You can also use wget
+curl -X POST /api/boards/{board}/custom-fields/{customField}/dropdown-items \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
POST /api/boards/{board}/custom-fields/{customField}/dropdown-items HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
const inputBody = '{
+  "items": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
const fetch = require('node-fetch');
+const inputBody = {
+  "items": "string"
+};
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items',
+{
+  method: 'POST',
+  body: JSON.stringify(inputBody),
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.post '/api/boards/{board}/custom-fields/{customField}/dropdown-items',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.post('/api/boards/{board}/custom-fields/{customField}/dropdown-items', headers = headers)
+
+print(r.json())
+
+
+
URL obj = new URL("/api/boards/{board}/custom-fields/{customField}/dropdown-items");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("POST");
+int responseCode = con.getResponseCode();
+BufferedReader in = new BufferedReader(
+    new InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = new StringBuffer();
+while ((inputLine = in.readLine()) != null) {
+    response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+
+
package main
+
+import (
+       "bytes"
+       "net/http"
+)
+
+func main() {
+
+    headers := map[string][]string{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("POST", "/api/boards/{board}/custom-fields/{customField}/dropdown-items", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+
 'multipart/form-data',
+    'Accept' => 'application/json',
+    'Authorization' => 'API_KEY',
+);
+
+$client = new \GuzzleHttp\Client();
+
+// Define array of request body.
+$request_body = array();
+
+try {
+    $response = $client->request('POST','/api/boards/{board}/custom-fields/{customField}/dropdown-items', array(
+        'headers' => $headers,
+        'json' => $request_body,
+       )
+    );
+    print_r($response->getBody()->getContents());
+ }
+ catch (\GuzzleHttp\Exception\BadResponseException $e) {
+    // handle exception or api errors.
+    print_r($e->getMessage());
+ }
+
+ // ...
+
+
+

POST /api/boards/{board}/custom-fields/{customField}/dropdown-items

+

Update a Custom Field's dropdown items

+
+

Body parameter

+
+
items: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
customFieldpathstringtruethe customField value
bodybodyobjectfalsenone
» itemsbodystringfalsenames of the custom field
+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+ +

edit_custom_field_dropdown_item

+

+
+

Code samples

+
+
# You can also use wget
+curl -X PUT /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
PUT /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
const inputBody = '{
+  "name": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+{
+  method: 'PUT',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
const fetch = require('node-fetch');
+const inputBody = {
+  "name": "string"
+};
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+{
+  method: 'PUT',
+  body: JSON.stringify(inputBody),
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.put '/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.put('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}', headers = headers)
+
+print(r.json())
+
+
+
URL obj = new URL("/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("PUT");
+int responseCode = con.getResponseCode();
+BufferedReader in = new BufferedReader(
+    new InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = new StringBuffer();
+while ((inputLine = in.readLine()) != null) {
+    response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+
+
package main
+
+import (
+       "bytes"
+       "net/http"
+)
+
+func main() {
+
+    headers := map[string][]string{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("PUT", "/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+
 'multipart/form-data',
+    'Accept' => 'application/json',
+    'Authorization' => 'API_KEY',
+);
+
+$client = new \GuzzleHttp\Client();
+
+// Define array of request body.
+$request_body = array();
+
+try {
+    $response = $client->request('PUT','/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}', array(
+        'headers' => $headers,
+        'json' => $request_body,
+       )
+    );
+    print_r($response->getBody()->getContents());
+ }
+ catch (\GuzzleHttp\Exception\BadResponseException $e) {
+    // handle exception or api errors.
+    print_r($e->getMessage());
+ }
+
+ // ...
+
+
+

PUT /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}

+

Update a Custom Field's dropdown item

+
+

Body parameter

+
+
name: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
customFieldpathstringtruethe customField value
dropdownItempathstringtruethe dropdownItem value
bodybodyobjecttruenone
» namebodystringtruenames of the custom field
+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+ +

delete_custom_field_dropdown_item

+

+
+

Code samples

+
+
# You can also use wget
+curl -X DELETE /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
DELETE /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} HTTP/1.1
+
+Accept: application/json
+
+
+

+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+{
+  method: 'DELETE',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+{
+  method: 'DELETE',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.delete '/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.delete('/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}', headers = headers)
+
+print(r.json())
+
+
+
URL obj = new URL("/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("DELETE");
+int responseCode = con.getResponseCode();
+BufferedReader in = new BufferedReader(
+    new InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = new StringBuffer();
+while ((inputLine = in.readLine()) != null) {
+    response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+
+
package main
+
+import (
+       "bytes"
+       "net/http"
+)
+
+func main() {
+
+    headers := map[string][]string{
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("DELETE", "/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+
 'application/json',
+    'Authorization' => 'API_KEY',
+);
+
+$client = new \GuzzleHttp\Client();
+
+// Define array of request body.
+$request_body = array();
+
+try {
+    $response = $client->request('DELETE','/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}', array(
+        'headers' => $headers,
+        'json' => $request_body,
+       )
+    );
+    print_r($response->getBody()->getContents());
+ }
+ catch (\GuzzleHttp\Exception\BadResponseException $e) {
+    // handle exception or api errors.
+    print_r($e->getMessage());
+ }
+
+ // ...
+
+
+

DELETE /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}

+

Update a Custom Field's dropdown items

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
customFieldpathstringtruethe customField value
dropdownItempathstringtruethe dropdownItem value
+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+

Integrations

get_all_integrations

diff --git a/public/api/wekan.yml b/public/api/wekan.yml index 06975fd37..9298b38bb 100644 --- a/public/api/wekan.yml +++ b/public/api/wekan.yml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: Wekan REST API - version: v5.08 + version: v5.09 description: | The REST API allows you to control and extend Wekan with ease. diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 12afd155d..11e9df7f5 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 508, + appVersion = 509, # Increment this for every release. - appMarketingVersion = (defaultText = "5.08.0~2021-03-26"), + appMarketingVersion = (defaultText = "5.09.0~2021-03-26"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0,