Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowed field types to Ruuter Service Declarations #195

Merged
merged 7 commits into from
Apr 26, 2024
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
20 changes: 20 additions & 0 deletions DSL/Ruuter/GET/metrics/intents.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'INTENTS'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
params:
- field: end
type: string
description: "Parameter 'end'"
- field: intent
type: string
description: "Parameter 'intent'"
- field: start
type: string
description: "Parameter 'start'"

check_for_params:
switch:
- condition: ${incoming.params == null}
Expand Down
24 changes: 24 additions & 0 deletions DSL/Ruuter/GET/negative-feedback.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'NEGATIVE-FEEDBACK'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
params:
- field: end
type: string
description: "Parameter 'end'"
- field: events
type: string
description: "Parameter 'events'"
- field: start
type: string
description: "Parameter 'start'"
headers:
- field: cookie
type: string
description: "Cookie field"

check_for_cookie:
switch:
- condition: ${incoming.headers.cookie == null || incoming.headers.cookie == ""}
Expand Down
14 changes: 14 additions & 0 deletions DSL/Ruuter/GET/odp/dataset.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'DATASET'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
params:
- field: datasetId
type: string
description: "Parameter 'datasetId'"

getKey:
call: http.post
args:
Expand Down
9 changes: 9 additions & 0 deletions DSL/Ruuter/GET/odp/scheduled-reports.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'SCHEDULED-REPORTS'"
method: get
accepts: json
returns: json
namespace: analytics

getScheduledReports:
call: http.post
args:
Expand Down
9 changes: 9 additions & 0 deletions DSL/Ruuter/GET/odp/settings.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'SETTINGS'"
method: get
accepts: json
returns: json
namespace: analytics

checkOdpKey:
call: http.post
args:
Expand Down
14 changes: 14 additions & 0 deletions DSL/Ruuter/GET/odp/values.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'VALUES'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
params:
- field: lang
type: string
description: "Parameter 'lang'"

assign_vars:
assign:
lang: ${incoming.params.lang}
Expand Down
14 changes: 14 additions & 0 deletions DSL/Ruuter/GET/overview/metrics.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'METRICS'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
params:
- field: metrics
type: string
description: "Parameter 'metrics'"

extract_request_data:
assign:
requestedMetric: ${incoming.params.metrics}
Expand Down
14 changes: 14 additions & 0 deletions DSL/Ruuter/GET/overview/preferences.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'PREFERENCES'"
method: get
accepts: json
returns: json
namespace: analytics
allowlist:
headers:
- field: cookie
type: string
description: "Cookie field"

check_for_cookie:
switch:
- condition: ${incoming.headers.cookie == null || incoming.headers.cookie == ""}
Expand Down
9 changes: 9 additions & 0 deletions DSL/Ruuter/GET/testing.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'TESTING'"
method: get
accepts: json
returns: json
namespace: analytics

get_message:
call: http.post
args:
Expand Down
20 changes: 20 additions & 0 deletions DSL/Ruuter/POST/agents/avg-active.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'AVG-ACTIVE'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: metric
type: string
description: "Body field 'metric'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_required_parameters:
switch:
- condition: ${incoming.body.metric == null || incoming.body.start_date == null || incoming.body.end_date == null}
Expand Down
20 changes: 20 additions & 0 deletions DSL/Ruuter/POST/agents/chats/avg-time-picking-up.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'AVG-TIME-PICKING-UP'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: metric
type: string
description: "Body field 'metric'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_required_parameters:
switch:
- condition: ${incoming.body.metric == null || incoming.body.start_date == null || incoming.body.end_date == null}
Expand Down
23 changes: 23 additions & 0 deletions DSL/Ruuter/POST/agents/chats/avg-time.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'AVG-TIME'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: excluded_csas
type: array
description: "Body field 'excluded_csas'"
- field: metric
type: string
description: "Body field 'metric'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_required_parameters:
switch:
- condition: ${incoming.body.metric == null || incoming.body.start_date == null || incoming.body.end_date == null || incoming.body.excluded_csas == null}
Expand Down
20 changes: 20 additions & 0 deletions DSL/Ruuter/POST/agents/chats/forwards.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'FORWARDS'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: metric
type: string
description: "Body field 'metric'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_required_parameters:
switch:
- condition: ${incoming.body.metric == null || incoming.body.start_date == null || incoming.body.end_date == null}
Expand Down
23 changes: 23 additions & 0 deletions DSL/Ruuter/POST/agents/chats/total.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'TOTAL'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: excluded_csas
type: array
description: "Body field 'excluded_csas'"
- field: metric
type: string
description: "Body field 'metric'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_required_parameters:
switch:
- condition: ${incoming.body.metric == null || incoming.body.start_date == null || incoming.body.end_date == null || incoming.body.excluded_csas == null}
Expand Down
20 changes: 20 additions & 0 deletions DSL/Ruuter/POST/bots/avg-response-speed.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'AVG-RESPONSE-SPEED'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: period
type: string
description: "Body field 'period'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_body:
switch:
- condition: ${incoming.body == null}
Expand Down
23 changes: 23 additions & 0 deletions DSL/Ruuter/POST/bots/avg-sessions-time.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'AVG-SESSIONS-TIME'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: options
type: string
description: "Body field 'options'"
- field: period
type: string
description: "Body field 'period'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_body:
switch:
- condition: ${incoming.body == null}
Expand Down
23 changes: 23 additions & 0 deletions DSL/Ruuter/POST/bots/intents.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'INTENTS'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: options
type: string
description: "Body field 'options'"
- field: period
type: string
description: "Body field 'period'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_body:
switch:
- condition: ${incoming.body == null}
Expand Down
20 changes: 20 additions & 0 deletions DSL/Ruuter/POST/bots/pct-correctly-understood.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'PCT-CORRECTLY-UNDERSTOOD'"
method: post
accepts: json
returns: json
namespace: analytics
allowlist:
body:
- field: end_date
type: string
description: "Body field 'end_date'"
- field: period
type: string
description: "Body field 'period'"
- field: start_date
type: string
description: "Body field 'start_date'"

check_for_body:
switch:
- condition: ${incoming.body == null}
Expand Down
Loading