From 7e97eb791163648045fcbbc1ee77bce8015e24b8 Mon Sep 17 00:00:00 2001 From: Navish Date: Mon, 16 Dec 2019 15:03:09 +0300 Subject: [PATCH 1/5] docs(api.md): add api documentation for alert catalogue #16 --- docs/api.md | 381 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 380 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 7bdc5e7..3372fbc 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2952,7 +2952,386 @@ HTTP/1.1 200 Success ## EventCatalogue -> TODO +`EventCatalogue` maps an emergency response activity to the responsible [party](#core-resources-party), [role](#core-resources-partyrole) or [group](#core-resources-partygroup) + +### EventCatalogue Schema + +`EventCatalogue` have the following attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +### Create EventCatalogue + +To create a new event catalogue, send a`POST` request to`https://api.ewea.io/v1/predefines/eventcatalogues`.The following attributes are supported: + +
+ +| Name | Type | Description | Required | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------: | :------: | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | true | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | false | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | true | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | true | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | false | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | false | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | false | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | false | + +> Example Request + +```curl +curl --request POST \ +--url https://api.ewea.io/v1/predefines/eventcatalogues \ +--header 'Accept: application/json' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer ' \ +--data '{ +"type": { "Floods" }, +"function": { "Communication and Warning" }, +"action": { "Disseminating warning information to the public" }, +} +``` + +The response will be a`JSON object` with the standard event group attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +> Example Response + +```curl +HTTP/1.1 200 Success +{ +"_id": "5de7b7bb9a6ed7342b200f02", +"type": { + "_id": "5de7b7bb9a6ed7342b200f02" + "strings": { "name": { "en": "Floods" }}, +} +"function": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Communication and Warning" }, +}, +"action": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Disseminating warning information to the public" }, +}, +"groups": [{ + "_id": "5de7b7b79a6ed7342b200dd9", + "name": { "en": "Telephone Companies" }, +}, +], +"roles": [{ + "_id": "5de7b7b79a6ed7342b200ddc", + "name": { "en": "Regional Admnistrative Secretary" }, +}], +"agencies": [], +"focals": [], +"updatedAt": "2019-12-16T13:42:46.937Z", +"createdAt": "2019-12-16T13:42:20.186Z", +} +``` + +### Retrieve EventCatalogue + +To get an event catalogue, send a`GET` request to`https://api.ewea.io/v1/predefines/eventcatalogues/:id`. + +> Example Request + +```curl +curl --request GET \ +--url https://api.ewea.io/v1/predefines/eventcatalogues/5de7b7bb9a6ed7342b200f02 \ +--header 'Accept: application/json' \ +--header 'Authorization: Bearer ' +``` + +The response will be a`JSON object` with the standard event catalogue attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +> Example Response + +```curl +HTTP/1.1 200 Success +{ +"_id": "5de7b7bb9a6ed7342b200f02", +"type": { + "_id": "5de7b7bb9a6ed7342b200f02" + "strings": { "name": { "en": "Floods" }}, +} +"function": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Communication and Warning" }, +}, +"action": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Disseminating warning information to the public" }, +}, +"groups": [{ + "_id": "5de7b7b79a6ed7342b200dd9", + "name": { "en": "Telephone Companies" }, +}, +], +"roles": [{ + "_id": "5de7b7b79a6ed7342b200ddc", + "name": { "en": "Regional Admnistrative Secretary" }, +}], +"agencies": [], +"focals": [], +"updatedAt": "2019-12-16T13:42:46.937Z", +"createdAt": "2019-12-16T13:42:20.186Z", +} +``` + +### Update EventCatalogue + +To update existing event catalogue, send a`PATCH` request to`https://api.ewea.io/v1/predefines/eventcatalogues/:id`.The following attributes are supported: + +
+ +| Name | Type | Description | Required | +| :-------------------------------------------: | :----: | :---------------------------------------------------------------------------------------------: | :------: | +| [type](#core - resources - eventtype) | String | Human readable type of a event that the action can be triggered to take place. | true | +| name | Object | Human - translatable - readable name for the event catalogue. | true | +| description | Object | Human - translatable - readable description for the event catalogue. | false | +| [function](#core - resources - eventfunction) | String | Human - translatable - readable name of event function to which the action is categorized into. | true | + +> Example Request + +```curl +curl --request PATCH \ +--url https://api.ewea.io/v1/predefines/eventcatalogues/5de7b7bb9a6ed7342b200f02 \ +--header 'Accept: application/json' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer ' \ +--data '{ + "type": { "Floods" }, + "function": { "Communication and Warning" }, + "action": { "Disseminating warning information to the public" }, +}' +``` + +The response will be a`JSON object` with the standard event catalogue attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +> Example Response + +```curl +HTTP/1.1 200 Success +{ +"_id": "5de7b7bb9a6ed7342b200f02", +"type": { + "_id": "5de7b7bb9a6ed7342b200f02" + "strings": { "name": { "en": "Floods" }}, +} +"function": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Communication and Warning" }, +}, +"action": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Disseminating warning information to the public" }, +}, +"groups": [{ + "_id": "5de7b7b79a6ed7342b200dd9", + "name": { "en": "Telephone Companies" }, +}, +], +"roles": [{ + "_id": "5de7b7b79a6ed7342b200ddc", + "name": { "en": "Regional Admnistrative Secretary" }, +}], +"agencies": [], +"focals": [], +"updatedAt": "2019-12-16T13:42:46.937Z", +"createdAt": "2019-12-16T13:42:20.186Z", +} +``` + +### Delete EventCatalogue + +To delete existing event catalogue, send a`DELETE` request to`https://api.ewea.io/v1/predefines/eventcatalogues/:id`. + +> Example Request + +```curl +curl --request DELETE \ +--url https://api.ewea.io/v1/predefines/eventcatalogues/5de7b7bb9a6ed7342b200f02 \ +--header 'Accept: application/json' \ +--header 'Authorization: Bearer ' +``` + +The response will be a`JSON object` with the standard event catalogue attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +> Example Response + +```curl +HTTP/1.1 200 Success +{ +"_id": "5de7b7bb9a6ed7342b200f02", +"type": { + "_id": "5de7b7bb9a6ed7342b200f02" + "strings": { "name": { "en": "Floods" }}, +} +"function": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Communication and Warning" }, +}, +"action": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Disseminating warning information to the public" }, +}, +"groups": [{ + "_id": "5de7b7b79a6ed7342b200dd9", + "name": { "en": "Telephone Companies" }, +}, +], +"roles": [{ + "_id": "5de7b7b79a6ed7342b200ddc", + "name": { "en": "Regional Admnistrative Secretary" }, +}], +"agencies": [], +"focals": [], +"updatedAt": "2019-12-16T13:42:46.937Z", +"createdAt": "2019-12-16T13:42:20.186Z", +} +``` + +### List All EventCatalogue + +To list all event catalogues, send a`GET` request to`https://api.ewea.io/v1/predefines/`. + +> Example Request + +```curl +curl --request GET \ +--url https://api.ewea.io/v1/predefines/eventcatalogues \ +--header 'Accept: application/json' \ +--header 'Authorization: Bearer ' +``` + +The response will be a`JSON object` with a`data key`.The values in the`data key` are set of eventcatalogue with the standard event catalogue attributes: + +
+ +| Name | Type | Description | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | +| \_id | String | Unique universal identifier of this event action. | +| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | String | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | +| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | + +> Example Response: + +```curl +HTTP/1.1 200 Success +{ +"_id": "5de7b7bb9a6ed7342b200f02", +"type": { + "_id": "5de7b7bb9a6ed7342b200f02" + "strings": { "name": { "en": "Floods" }}, +} +"function": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Communication and Warning" }, +}, +"action": { + "_id": "5ddbbc871283e3131b2d41dc", + "name": { "en": "Disseminating warning information to the public" }, +}, +"groups": [{ + "_id": "5de7b7b79a6ed7342b200dd9", + "name": { "en": "Telephone Companies" }, +}, +], +"roles": [{ + "_id": "5de7b7b79a6ed7342b200ddc", + "name": { "en": "Regional Admnistrative Secretary" }, +}], +"agencies": [], +"focals": [], +"updatedAt": "2019-12-16T13:42:46.937Z", +"createdAt": "2019-12-16T13:42:20.186Z", +} +``` ## Event From 38a19863b91f619481ed44336f9508c2592c8f45 Mon Sep 17 00:00:00 2001 From: Navish Date: Mon, 16 Dec 2019 15:58:09 +0300 Subject: [PATCH 2/5] docs(api.md): update alert catalogue documentation --- docs/api.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index 3372fbc..ba2cf29 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2952,7 +2952,7 @@ HTTP/1.1 200 Success ## EventCatalogue -`EventCatalogue` maps an emergency response activity to the responsible [party](#core-resources-party), [role](#core-resources-partyrole) or [group](#core-resources-partygroup) +`EventCatalogue` maps an emergency response activity to the responsible [PARTY](#core-resources-party), [ROLE](#core-resources-partyrole) or [GROUP](#core-resources-partygroup) ### EventCatalogue Schema @@ -3031,7 +3031,7 @@ HTTP/1.1 200 Success { "_id": "5de7b7bb9a6ed7342b200f02", "type": { - "_id": "5de7b7bb9a6ed7342b200f02" + "_id": "5de7b7bb9a6ed7342b200f02", "strings": { "name": { "en": "Floods" }}, } "function": { @@ -3265,6 +3265,7 @@ HTTP/1.1 200 Success "focals": [], "updatedAt": "2019-12-16T13:42:46.937Z", "createdAt": "2019-12-16T13:42:20.186Z", +"deletedAt": "2019-12-16T13:42:20.186Z", } ``` @@ -3304,6 +3305,7 @@ The response will be a`JSON object` with a`data key`.The values in the`data key` ```curl HTTP/1.1 200 Success { +"data": [{ "_id": "5de7b7bb9a6ed7342b200f02", "type": { "_id": "5de7b7bb9a6ed7342b200f02" @@ -3330,7 +3332,15 @@ HTTP/1.1 200 Success "focals": [], "updatedAt": "2019-12-16T13:42:46.937Z", "createdAt": "2019-12-16T13:42:20.186Z", -} +}], +"total": 198, +"size": 10, +"limit": 10, +"skip": 0, +"page": 10, +"pages": 20, +"lastModified": "2019-12-05T17:14:48.206Z", +"hasMore": true ``` ## Event From 0955efeee45b59a26ee1d7c080498cc9b56f06ec Mon Sep 17 00:00:00 2001 From: Navish Date: Mon, 16 Dec 2019 16:19:26 +0300 Subject: [PATCH 3/5] docs(api.md): update attributes on alert catalogue documentation --- docs/api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api.md b/docs/api.md index ba2cf29..519dfed 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3233,6 +3233,7 @@ The response will be a`JSON object` with the standard event catalogue attributes | [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | | createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | | updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| deletedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was deleted. | > Example Response From 9cc1c8b9e019b4c3528d1fbbe23a87c336b647f8 Mon Sep 17 00:00:00 2001 From: Navish Date: Mon, 16 Dec 2019 16:37:53 +0300 Subject: [PATCH 4/5] docs(api.md): update data types on alert catalogue documentation --- docs/api.md | 154 +++++++++++++++++++++++++++------------------------- 1 file changed, 79 insertions(+), 75 deletions(-) diff --git a/docs/api.md b/docs/api.md index 519dfed..e100405 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2963,16 +2963,16 @@ HTTP/1.1 200 Success | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | ### Create EventCatalogue @@ -2982,14 +2982,14 @@ To create a new event catalogue, send a`POST` request to`https://api.ewea.io/v1/ | Name | Type | Description | Required | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------: | :------: | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | true | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | false | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | true | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | true | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | false | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | false | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | false | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | false | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | true | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | false | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | true | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | true | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | false | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | false | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | false | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | false | > Example Request @@ -3013,16 +3013,16 @@ The response will be a`JSON object` with the standard event group attributes: | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | > Example Response @@ -3078,16 +3078,16 @@ The response will be a`JSON object` with the standard event catalogue attributes | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | > Example Response @@ -3129,12 +3129,16 @@ To update existing event catalogue, send a`PATCH` request to`https://api.ewea.io
-| Name | Type | Description | Required | -| :-------------------------------------------: | :----: | :---------------------------------------------------------------------------------------------: | :------: | -| [type](#core - resources - eventtype) | String | Human readable type of a event that the action can be triggered to take place. | true | -| name | Object | Human - translatable - readable name for the event catalogue. | true | -| description | Object | Human - translatable - readable description for the event catalogue. | false | -| [function](#core - resources - eventfunction) | String | Human - translatable - readable name of event function to which the action is categorized into. | true | +| Name | Type | Description | Required | +| :-----------------------------------------: | :----: | :---------------------------------------------------------------------: | :------: | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | true | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | false | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | true | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | true | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | false | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | false | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | false | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | false | > Example Request @@ -3158,16 +3162,16 @@ The response will be a`JSON object` with the standard event catalogue attributes | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | > Example Response @@ -3223,17 +3227,17 @@ The response will be a`JSON object` with the standard event catalogue attributes | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | -| deletedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was deleted. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| deletedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was deleted. | > Example Response @@ -3290,16 +3294,16 @@ The response will be a`JSON object` with a`data key`.The values in the`data key` | Name | Type | Description | | :-----------------------------------------: | :----: | :---------------------------------------------------------------------------------------------------------: | | \_id | String | Unique universal identifier of this event action. | -| [type](#core-resources-eventtype) | String | The type of a event in which the action can be triggered to take place. | -| [area](#core-resources-administrativelevel) | String | The administrative area(s) where the action should take place | -| [function](#core-resources-eventfunction) | String | The group to which the specified action belongs. | -| [action](#core-resources-eventaction) | String | The activity that has to be carried out | -| [groups](#core-resources-partygroup) | String | The group(s) of parties that will carry out the activity | -| [roles](#core-resources-partyrole) | String | The role(s) of a parties that will carry out the activity | -| [agencies](#core-resources-party) | String | The agency(s) that will be carrying out the activity. | -| [focals](#core-resources-party) | String | The focal person(s) that will be carrying out the activity | -| createdAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | -| updatedAt | String | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | +| [type](#core-resources-eventtype) | Object | The type of a event in which the action can be triggered to take place. | +| [area](#core-resources-administrativelevel) | Array | The administrative area(s) where the action should take place | +| [function](#core-resources-eventfunction) | Object | The group to which the specified action belongs. | +| [action](#core-resources-eventaction) | Object | The activity that has to be carried out | +| [groups](#core-resources-partygroup) | Array | The group(s) of parties that will carry out the activity | +| [roles](#core-resources-partyrole) | Array | The role(s) of a parties that will carry out the activity | +| [agencies](#core-resources-party) | Array | The agency(s) that will be carrying out the activity. | +| [focals](#core-resources-party) | Array | The focal person(s) that will be carrying out the activity | +| createdAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was created. | +| updatedAt | Date | A time value given in ISO8601 combined date and time format that represents when the catalogue was updated. | > Example Response: From e0f1537cec43459bc4d709d461d48604fbdc2ffa Mon Sep 17 00:00:00 2001 From: Navish Date: Mon, 16 Dec 2019 17:43:15 +0300 Subject: [PATCH 5/5] docs(api.md): remove commas from alert catalogue documentation --- docs/api.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/api.md b/docs/api.md index e100405..97eb844 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3045,8 +3045,7 @@ HTTP/1.1 200 Success "groups": [{ "_id": "5de7b7b79a6ed7342b200dd9", "name": { "en": "Telephone Companies" }, -}, -], +}], "roles": [{ "_id": "5de7b7b79a6ed7342b200ddc", "name": { "en": "Regional Admnistrative Secretary" }, @@ -3110,8 +3109,7 @@ HTTP/1.1 200 Success "groups": [{ "_id": "5de7b7b79a6ed7342b200dd9", "name": { "en": "Telephone Companies" }, -}, -], +}], "roles": [{ "_id": "5de7b7b79a6ed7342b200ddc", "name": { "en": "Regional Admnistrative Secretary" }, @@ -3194,8 +3192,7 @@ HTTP/1.1 200 Success "groups": [{ "_id": "5de7b7b79a6ed7342b200dd9", "name": { "en": "Telephone Companies" }, -}, -], +}], "roles": [{ "_id": "5de7b7b79a6ed7342b200ddc", "name": { "en": "Regional Admnistrative Secretary" }, @@ -3260,8 +3257,7 @@ HTTP/1.1 200 Success "groups": [{ "_id": "5de7b7b79a6ed7342b200dd9", "name": { "en": "Telephone Companies" }, -}, -], +}], "roles": [{ "_id": "5de7b7b79a6ed7342b200ddc", "name": { "en": "Regional Admnistrative Secretary" }, @@ -3327,8 +3323,7 @@ HTTP/1.1 200 Success "groups": [{ "_id": "5de7b7b79a6ed7342b200dd9", "name": { "en": "Telephone Companies" }, -}, -], +}], "roles": [{ "_id": "5de7b7b79a6ed7342b200ddc", "name": { "en": "Regional Admnistrative Secretary" },