Skip to content
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
592 changes: 527 additions & 65 deletions Annotations/AnnotationGenerator.php

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions Annotations/GlobalApiComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,15 @@
* )
*
* Parameters specific to DataTables and Views
* @OA\Parameter(parameter="expandedOptional", name="expanded", in="query",
* description="If true, loads all subtables.", required=false,
* @OA\Schema(type="integer", enum={0,1}, example=0, default=0))
*
* @OA\Parameter(parameter="idSubtableOptional", name="idSubtable", in="query",
* description="An in-database subtable ID.", required=false,
* @OA\Schema(type="integer"))
*
* Parameters specific to DataTables and Views
* @OA\Parameter(parameter="flatOptional", name="flat", in="query",
* description="Flatten subtables into the parent table.", required=false,
* @OA\Schema(type="integer", enum={0,1}, example=0))
Expand Down Expand Up @@ -358,7 +367,7 @@
* description="Row index after which rows are removed.", required=false, @OA\Schema(type="integer"))
*
* @OA\Parameter(parameter="filter_limitOptional", name="filter_limit", in="query",
* description="Maximum rows to return.", required=false, @OA\Schema(type="integer"))
* description="Maximum number of rows to return.", required=false, @OA\Schema(type="integer"))
*
* @OA\Parameter(parameter="filter_offsetOptional", name="filter_offset", in="query",
* description="Row offset.", required=false, @OA\Schema(type="integer"))
Expand All @@ -384,8 +393,11 @@
* @OA\Parameter(parameter="labelOptional", name="label", in="query",
* description="Keep only rows with these label(s). Supports path via '>' and arrays.", required=false, @OA\Schema(type="string"))
*
* @OA\Parameter(parameter="idGoalRequired", name="idGoal", in="query",
* description="The ID of a configured goal.", required=true, @OA\Schema(type="integer"))
*
* @OA\Parameter(parameter="idGoalOptional", name="idGoal", in="query",
* description="Goal ID or special values (overview/minimal/full table).", required=false, @OA\Schema(type="string"))
* description="The ID of a configured goal.", required=false, @OA\Schema(type="integer"))
*/
class GlobalApiComponents
{
Expand Down
23 changes: 23 additions & 0 deletions tests/Resources/ExampleResponses/CustomAlerts.getAlert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"idalert": 1,
"name": "Test Alert",
"login": "someUserName",
"period": "day",
"report": "VisitsSummary_get",
"report_condition": null,
"report_matched": null,
"report_mediums": [
"email"
],
"metric": "nb_uniq_visitors",
"metric_condition": "greater_than",
"metric_matched": 500,
"compared_to": 7,
"email_me": 1,
"additional_emails": [],
"phone_numbers": [],
"slack_channel_id": null,
"id_sites": [
1
]
}
26 changes: 26 additions & 0 deletions tests/Resources/ExampleResponses/CustomAlerts.getAlert.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<idalert>1</idalert>
<name>Test Alert</name>
<login>someUserName</login>
<period>day</period>
<report>VisitsSummary_get</report>
<report_condition />
<report_matched />
<report_mediums>
<row>email</row>
</report_mediums>
<metric>nb_uniq_visitors</metric>
<metric_condition>greater_than</metric_condition>
<metric_matched>500</metric_matched>
<compared_to>7</compared_to>
<email_me>1</email_me>
<additional_emails>
</additional_emails>
<phone_numbers>
</phone_numbers>
<slack_channel_id />
<id_sites>
<row>1</row>
</id_sites>
</result>
48 changes: 48 additions & 0 deletions tests/Resources/ExampleResponses/CustomAlerts.getAlerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[
{
"idalert": 1,
"name": "Test Alert",
"login": "someUserName",
"period": "day",
"report": "VisitsSummary_get",
"report_condition": null,
"report_matched": null,
"report_mediums": [
"email"
],
"metric": "nb_uniq_visitors",
"metric_condition": "greater_than",
"metric_matched": 500,
"compared_to": 7,
"email_me": 1,
"additional_emails": [],
"phone_numbers": [],
"slack_channel_id": null,
"id_sites": [
1
]
},
{
"idalert": 2,
"name": "Test Visit Drop Previous Day",
"login": "someUserName",
"period": "day",
"report": "VisitsSummary_get",
"report_condition": null,
"report_matched": null,
"report_mediums": [
"email"
],
"metric": "nb_uniq_visitors",
"metric_condition": "percentage_decrease_more_than",
"metric_matched": 20,
"compared_to": 1,
"email_me": 1,
"additional_emails": [],
"phone_numbers": [],
"slack_channel_id": null,
"id_sites": [
1
]
}
]
53 changes: 53 additions & 0 deletions tests/Resources/ExampleResponses/CustomAlerts.getAlerts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>
<idalert>1</idalert>
<name>Test Alert</name>
<login>someUserName</login>
<period>day</period>
<report>VisitsSummary_get</report>
<report_condition />
<report_matched />
<report_mediums>
<row>email</row>
</report_mediums>
<metric>nb_uniq_visitors</metric>
<metric_condition>greater_than</metric_condition>
<metric_matched>500</metric_matched>
<compared_to>7</compared_to>
<email_me>1</email_me>
<additional_emails>
</additional_emails>
<phone_numbers>
</phone_numbers>
<slack_channel_id />
<id_sites>
<row>1</row>
</id_sites>
</row>
<row>
<idalert>2</idalert>
<name>Test Visit Drop Previous Day</name>
<login>someUserName</login>
<period>day</period>
<report>VisitsSummary_get</report>
<report_condition />
<report_matched />
<report_mediums>
<row>email</row>
</report_mediums>
<metric>nb_uniq_visitors</metric>
<metric_condition>percentage_decrease_more_than</metric_condition>
<metric_matched>20</metric_matched>
<compared_to>1</compared_to>
<email_me>1</email_me>
<additional_emails>
</additional_emails>
<phone_numbers>
</phone_numbers>
<slack_channel_id />
<id_sites>
<row>1</row>
</id_sites>
</row>
</result>
Loading