Skip to content

Commit

Permalink
Pivot docs refresh (2600hz#3186)
Browse files Browse the repository at this point in the history
* cleanup Org presos, rework pivot ToC

* match deps in path with regex
  • Loading branch information
jamesaimonetti authored and lazedo committed Feb 1, 2017
1 parent 68ab0e9 commit 79ba84f
Show file tree
Hide file tree
Showing 15 changed files with 513 additions and 345 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ compile_commands.json
/doc/mkdocs/docs
/doc/mkdocs/site/
/doc/mkdocs/mkdocs.local.yml
/doc/mkdocs/theme
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ROOT = .
ROOT = $(shell readlink -f .)
RELX = $(ROOT)/deps/relx
ELVIS = $(ROOT)/deps/elvis
FMT = $(ROOT)/make/erlang-formatter-master/fmt.sh
Expand Down Expand Up @@ -196,14 +196,22 @@ apis:
@ERL_LIBS=deps/:core/:applications/ $(ROOT)/scripts/generate-fs-headers-hrl.escript

DOCS_ROOT=$(ROOT)/doc/mkdocs
docs:
docs: docs-setup docs-build

docs-setup:
@$(ROOT)/scripts/validate_mkdocs.py
@$(ROOT)/scripts/setup_docs.bash
@cp $(DOCS_ROOT)/mkdocs.yml $(DOCS_ROOT)/mkdocs.local.yml
@echo "site_dir: '$(DOCS_ROOT)/site'\ndocs_dir: '$(DOCS_ROOT)/docs'\n" >> doc/mkdocs/mkdocs.local.yml
@mkdocs build -f $(DOCS_ROOT)/mkdocs.local.yml -c -q
@mkdir -p $(DOCS_ROOT)/theme

docs-build:
@echo "\ntheme: null\ntheme_dir: '$(DOCS_ROOT)/theme'\ndocs_dir: '$(DOCS_ROOT)/docs'\n" >> $(DOCS_ROOT)/mkdocs.local.yml
@mkdocs build -f $(DOCS_ROOT)/mkdocs.local.yml --clean -q --site-dir $(DOCS_ROOT)/site

docs-clean:
@rm -rf $(DOCS_ROOT)/site $(DOCS_ROOT)/docs $(DOCS_ROOT)/mkdocs.local.yml

docs-serve: docs
docs-serve: docs-build
@mkdocs serve -f $(DOCS_ROOT)/mkdocs.local.yml

fs-headers:
Expand Down
28 changes: 28 additions & 0 deletions applications/pivot/doc/requests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The Request Payload

You can configure whether you receive the data as a querystring in a GET or as a url-encoded body in a POST.

## Payload

Some of the fields may not be included in every request.

| Field | Description |
| Call-ID | The unique call identifier |
| Account-ID | The account id receiving the call |
| From | The SIP From username |
| From-Realm | The SIP From realm |
| To | The SIP To username |
| To-Realm | The SIP To realm |
| Request | The SIP Request username |
| Request-Realm | The SIP Request realm |
| Call-Status | Status of the call |
| Api-Version | The version of the API |
| Direction | The direction of the call, relative to Kazoo |
| Caller-ID-Name | Caller ID Name |
| Caller-ID-Number | Caller ID Number |
| User-ID | The Kazoo User identifier(s) of the caller |
| Language | The caller's language preference |
| Recording-Url | Where the recording will be stored |
| Recording-Duration | How long the recording is |
| Recording-ID | The recording id |
| Digits | Any DTMF (or collection of DTMFs) pressed |
3 changes: 2 additions & 1 deletion core/kazoo_data/src/kz_data.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@

-type db_classifications() :: 'account' | 'modb' | 'acdc' |
'numbers' | 'aggregate' | 'system' |
'resource_selectors' | 'deprecated' | 'undefined'.
'resource_selectors' | 'deprecated' |
'undefined' | 'external'.

-type db_create_options() :: [{'q',integer()} | {'n',integer()} | 'ensure_other_dbs'].
-type db_delete_options() :: ['ensure_other_dbs'].
Expand Down
2 changes: 2 additions & 0 deletions core/kazoo_data/src/kzs_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
-spec db_classification(text()) -> db_classifications().
db_classification(Db) when not is_binary(Db) ->
db_classification(kz_term:to_binary(Db));
db_classification(<<"_users">>) -> 'external';
db_classification(<<"_replicator">>) -> 'external';
db_classification(<<"ts">>) -> 'deprecated';
db_classification(<<"crossbar_schemas">>) -> 'deprecated';
db_classification(<<"registrations">>) -> 'deprecated';
Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_translator/src/convertors/kzt_kazoo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ req_params(Call) ->
,{<<"Request">>, kapps_call:request_user(Call)}
,{<<"Request-Realm">>, kapps_call:request_realm(Call)}
,{<<"Call-Status">>, kzt_util:get_call_status(Call)}
,{<<"Api-Version">>, <<"2015-03-01">>}
,{<<"Api-Version">>, <<"4.x">>}
,{<<"Direction">>, <<"inbound">>}
,{<<"Caller-ID-Name">>, kapps_call:caller_id_name(Call)}
,{<<"Caller-ID-Number">>, kapps_call:caller_id_number(Call)}
Expand Down
Loading

0 comments on commit 79ba84f

Please sign in to comment.