package wcs-lib

  1. Overview
  2. Docs

Wcs data structure constructors.

Builders
val list_workspaces_request : ?page_limit:int -> ?include_count:bool -> ?sort:Wcs_t.sort_workspace_criteria -> ?cursor:string -> unit -> Wcs_t.list_workspaces_request
val get_workspace_request : ?export:bool -> string -> Wcs_t.get_workspace_request
val example : string -> ?created:string -> ?updated:string -> unit -> Wcs_t.intent_example
val intent : string -> ?description:string -> ?examples:string list -> ?created:string -> ?updated:string -> unit -> Wcs_t.intent_def
val value : string -> ?metadata:Wcs_t.json -> ?synonyms:string list -> ?created:string -> ?updated:string -> unit -> Wcs_t.entity_value
val entity : string -> ?description:string -> ?metadata:Wcs_t.json -> ?source:string -> ?open_list:bool -> ?values:(string * string list) list -> ?created:string -> ?updated:string -> ?fuzzy_match:bool -> unit -> Wcs_t.entity_def
val next_step : Wcs_t.dialog_node -> selector:Wcs_t.selector -> unit -> Wcs_t.next_step
val next_step_id : string -> selector:Wcs_t.selector -> unit -> Wcs_t.next_step
val output : string -> Wcs_t.output_def
val dialog_node : string -> ?description:string -> ?type_:Wcs_t.dialog_node_type -> ?conditions:string -> ?conditions_spel:Spel_t.expression -> ?parent:Wcs_t.dialog_node -> ?previous_sibling:Wcs_t.dialog_node -> ?text:string -> ?text_spel:Spel_t.expression -> ?output:Wcs_t.json -> ?output_spel:Wcs_t.json_spel -> ?context:Wcs_t.json -> ?context_spel:Wcs_t.json_spel -> ?metadata:Wcs_t.json -> ?next_step:(Wcs_t.dialog_node * Wcs_t.selector) -> ?next_step_id:(string * Wcs_t.selector) -> ?created:string -> ?updated:string -> ?event_name:Wcs_t.dialog_node_event_name -> ?variable:string -> unit -> Wcs_t.dialog_node
val response_condition : parent:Wcs_t.dialog_node -> ?description:string -> ?conditions:string -> ?conditions_spel:Spel_t.expression -> ?previous_sibling:Wcs_t.dialog_node -> ?text:string -> ?text_spel:Spel_t.expression -> ?output:Wcs_t.json -> ?output_spel:Wcs_t.json_spel -> ?context:Wcs_t.json -> ?context_spel:Wcs_t.json_spel -> ?metadata:Wcs_t.json -> ?created:string -> ?updated:string -> unit -> Wcs_t.dialog_node
val workspace : string -> ?description:string -> ?language:string -> ?metadata:Wcs_t.json -> ?counterexamples:string list -> ?dialog_nodes:Wcs_t.dialog_node list -> ?entities:Wcs_t.entity_def list -> ?intents:Wcs_t.intent_def list -> ?created:string -> ?updated:string -> ?modified:string -> ?created_by:string -> ?modified_by:string -> ?workspace_id:string -> ?status:Wcs_t.workspace_status -> unit -> Wcs_t.workspace
val logs_request : ?filter:string -> ?sort:Wcs_t.sort_logs_criteria -> ?page_limit:int -> ?cursor:string -> unit -> Wcs_t.logs_request
val sys_number : Wcs_t.entity_def
val action_def : string -> ?agent:string -> ?type_:string -> ?parameters:Wcs_t.json_spel -> ?result_variable:string -> unit -> Wcs_t.action_def
val action : string -> ?agent:string -> ?type_:string -> ?parameters:Wcs_t.json -> ?result_variable:string -> unit -> Wcs_t.action
Message
val message_request : ?text:string -> ?input:Wcs_t.input -> ?alternate_intents:bool -> ?context:Wcs_t.json -> ?entities:Wcs_t.entity list -> ?intents:Wcs_t.intent list -> ?output:Wcs_t.output -> unit -> Wcs_t.message_request
Tree manipulation
val add_tree : Wcs_t.dialog_node list -> Wcs_t.dialog_node list -> Wcs_t.dialog_node option -> Wcs_t.dialog_node option -> Wcs_t.dialog_node list

add_tree tree subtree parent previous_sibling add the tree subtree in the dialog tree. The root of subtree is attached at the position defined with parent and previous_sibling. If there was already a node at this postion, it becomes the last sibling of the root of subtree.

val get_root : Wcs_t.dialog_node list -> Wcs_t.dialog_node option

get_root tree return the root of the dialog tree tree. It returns None if the tree is empty.

Json conversion
Conversion of Wcs data structures to JSON
val json_of_workspace_response : Wcs_t.workspace_response -> Wcs_t.json
val json_of_pagination_response : Wcs_t.pagination_response -> Wcs_t.json
val json_of_list_workspaces_request : Wcs_t.list_workspaces_request -> Wcs_t.json
val json_of_list_workspaces_response : Wcs_t.list_workspaces_response -> Wcs_t.json
val json_of_intent_example : Wcs_t.intent_example -> Wcs_t.json
val json_of_intent_def : Wcs_t.intent_def -> Wcs_t.json
val json_of_entity_value : Wcs_t.entity_value -> Wcs_t.json
val json_of_entity_def : Wcs_t.entity_def -> Wcs_t.json
val json_of_next_step : Wcs_t.next_step -> Wcs_t.json
val json_of_output_def : Wcs_t.output_def -> Wcs_t.json
val json_of_dialog_node : Wcs_t.dialog_node -> Wcs_t.json
val json_of_workspace : Wcs_t.workspace -> Wcs_t.json
val json_of_input : Wcs_t.input -> Wcs_t.json
val json_of_entity : Wcs_t.entity -> Wcs_t.json
val json_of_output : Wcs_t.output -> Wcs_t.json
val json_of_message_request : Wcs_t.message_request -> Wcs_t.json
val json_of_message_response : Wcs_t.message_response -> Wcs_t.json
val json_of_create_response : Wcs_t.create_response -> Wcs_t.json
val json_of_get_workspace_request : Wcs_t.get_workspace_request -> Wcs_t.json
val json_of_action : Wcs_t.action -> Wcs_t.json
val json_of_action_def : Wcs_t.action_def -> Wcs_t.json
val json_of_log_entry : Wcs_t.log_entry -> Wcs_t.json
val json_of_logs_request : Wcs_t.logs_request -> Wcs_t.json
val json_of_logs_response : Wcs_t.logs_response -> Wcs_t.json
Conversion of Wcs data structures to JSON with embedded Spel
val json_spel_of_workspace_response : Wcs_t.workspace_response -> Wcs_t.json_spel
val json_spel_of_pagination_response : Wcs_t.pagination_response -> Wcs_t.json_spel
val json_spel_of_list_workspaces_request : Wcs_t.list_workspaces_request -> Wcs_t.json_spel
val json_spel_of_list_workspaces_response : Wcs_t.list_workspaces_response -> Wcs_t.json_spel
val json_spel_of_intent_example : Wcs_t.intent_example -> Wcs_t.json_spel
val json_spel_of_intent_def : Wcs_t.intent_def -> Wcs_t.json_spel
val json_spel_of_entity_value : Wcs_t.entity_value -> Wcs_t.json_spel
val json_spel_of_entity_def : Wcs_t.entity_def -> Wcs_t.json_spel
val json_spel_of_next_step : Wcs_t.next_step -> Wcs_t.json_spel
val json_spel_of_output_def : Wcs_t.output_def -> Wcs_t.json_spel
val json_spel_of_dialog_node : Wcs_t.dialog_node -> Wcs_t.json_spel
val json_spel_of_workspace : Wcs_t.workspace -> Wcs_t.json_spel
val json_spel_of_input : Wcs_t.input -> Wcs_t.json_spel
val json_spel_of_entity : Wcs_t.entity -> Wcs_t.json_spel
val json_spel_of_output : Wcs_t.output -> Wcs_t.json_spel
val json_spel_of_message_request : Wcs_t.message_request -> Wcs_t.json_spel
val json_spel_of_message_response : Wcs_t.message_response -> Wcs_t.json_spel
val json_spel_of_create_response : Wcs_t.create_response -> Wcs_t.json_spel
val json_spel_of_get_workspace_request : Wcs_t.get_workspace_request -> Wcs_t.json_spel
val json_spel_of_action : Wcs_t.action -> Wcs_t.json_spel
val json_spel_of_action_def : Wcs_t.action_def -> Wcs_t.json_spel
val json_spel_of_log_entry : Wcs_t.log_entry -> Wcs_t.json_spel
val json_spel_of_logs_request : Wcs_t.logs_request -> Wcs_t.json_spel
val json_spel_of_logs_response : Wcs_t.logs_response -> Wcs_t.json_spel