memori-client 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/memori_client/backend/resource.rb +37 -30
- data/lib/memori_client/backend/resources.rb +4 -0
- data/lib/memori_client/backend/v1/asset.rb +94 -0
- data/lib/memori_client/backend/v2/action_log.rb +11 -7
- data/lib/memori_client/backend/v2/asset.rb +33 -13
- data/lib/memori_client/backend/v2/badge.rb +60 -0
- data/lib/memori_client/backend/v2/consumption_log.rb +16 -10
- data/lib/memori_client/backend/v2/import_export.rb +163 -0
- data/lib/memori_client/backend/v2/integration.rb +65 -21
- data/lib/memori_client/backend/v2/invitation.rb +92 -24
- data/lib/memori_client/backend/v2/memori.rb +364 -118
- data/lib/memori_client/backend/v2/memori_list.rb +118 -0
- data/lib/memori_client/backend/v2/notification.rb +11 -7
- data/lib/memori_client/backend/v2/tenant.rb +194 -4
- data/lib/memori_client/backend/v2/user.rb +620 -106
- data/lib/memori_client/engine/resource.rb +36 -29
- data/lib/memori_client/engine/resources.rb +8 -0
- data/lib/memori_client/engine/v2/chat_log.rb +21 -13
- data/lib/memori_client/engine/v2/completion_log.rb +17 -0
- data/lib/memori_client/engine/v2/context_var.rb +16 -10
- data/lib/memori_client/engine/v2/correlation_pair.rb +50 -10
- data/lib/memori_client/engine/v2/custom_dictionary.rb +113 -0
- data/lib/memori_client/engine/v2/dialog.rb +99 -34
- data/lib/memori_client/engine/v2/event_log.rb +21 -13
- data/lib/memori_client/engine/v2/expert_reference.rb +129 -0
- data/lib/memori_client/engine/v2/intent.rb +123 -43
- data/lib/memori_client/engine/v2/localization_key.rb +108 -0
- data/lib/memori_client/engine/v2/medium.rb +129 -0
- data/lib/memori_client/engine/v2/memori.rb +215 -16
- data/lib/memori_client/engine/v2/memory.rb +124 -25
- data/lib/memori_client/engine/v2/nlp.rb +162 -22
- data/lib/memori_client/engine/v2/person.rb +125 -0
- data/lib/memori_client/engine/v2/prompted_question.rb +121 -0
- data/lib/memori_client/engine/v2/search.rb +67 -10
- data/lib/memori_client/engine/v2/session.rb +31 -11
- data/lib/memori_client/engine/v2/stat.rb +26 -16
- data/lib/memori_client/engine/v2/unanswered_question.rb +56 -10
- data/lib/memori_client/engine/v2/user.rb +52 -0
- data/lib/memori_client/engine/v2/web_hook.rb +62 -25
- data/lib/memori_client/http_client.rb +1 -1
- data/lib/memori_client/resource.rb +56 -0
- data/lib/memori_client.rb +4 -0
- metadata +15 -2
@@ -1,32 +1,39 @@
|
|
1
|
-
class MemoriClient::Engine::Resource
|
2
|
-
def self.exec_http_request(method, path, args)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
class MemoriClient::Engine::Resource < MemoriClient::Resource
|
2
|
+
# def self.exec_http_request(method, path, args)
|
3
|
+
# stop = false
|
4
|
+
# processed_tokens = []
|
5
|
+
# path.split('/').each do |token|
|
6
|
+
# break if stop == true
|
7
|
+
# if token =~ /^{.*}$/
|
8
|
+
# param_name = token.match(/^{(.*)}$/).captures.first
|
9
|
+
# if args[param_name.to_sym].blank?
|
10
|
+
# stop = true
|
11
|
+
# else
|
12
|
+
# processed_tokens << args[param_name.to_sym]
|
13
|
+
# end
|
14
|
+
# else
|
15
|
+
# processed_tokens << token
|
16
|
+
# end
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# url = processed_tokens.join('/')
|
20
|
+
# url = [MemoriClient.configuration.engine_api_root, url].join('')
|
21
|
+
# http = MemoriClient::HttpClient.new
|
22
|
+
#
|
23
|
+
# case method
|
24
|
+
# when 'get'
|
25
|
+
# status, body = http.get(url)
|
26
|
+
# else
|
27
|
+
# status, body = http.send(method, url, payload: args[:payload])
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
# [status, body]
|
31
|
+
# end
|
18
32
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
when 'get'
|
25
|
-
status, body = http.get(url)
|
26
|
-
else
|
27
|
-
status, body = http.send(method, url, payload: args[:payload])
|
28
|
-
end
|
29
|
-
|
30
|
-
[status, body]
|
33
|
+
def self.build_url(url)
|
34
|
+
[
|
35
|
+
MemoriClient.configuration.engine_api_root,
|
36
|
+
url
|
37
|
+
].join('')
|
31
38
|
end
|
32
39
|
end
|
@@ -1,14 +1,22 @@
|
|
1
1
|
require 'memori_client/engine/v2/chat_log.rb'
|
2
|
+
require 'memori_client/engine/v2/completion_log.rb'
|
2
3
|
require 'memori_client/engine/v2/context_var.rb'
|
3
4
|
require 'memori_client/engine/v2/correlation_pair.rb'
|
5
|
+
require 'memori_client/engine/v2/custom_dictionary.rb'
|
4
6
|
require 'memori_client/engine/v2/dialog.rb'
|
5
7
|
require 'memori_client/engine/v2/event_log.rb'
|
8
|
+
require 'memori_client/engine/v2/expert_reference.rb'
|
6
9
|
require 'memori_client/engine/v2/intent.rb'
|
10
|
+
require 'memori_client/engine/v2/localization_key.rb'
|
11
|
+
require 'memori_client/engine/v2/medium.rb'
|
7
12
|
require 'memori_client/engine/v2/memori.rb'
|
8
13
|
require 'memori_client/engine/v2/memory.rb'
|
9
14
|
require 'memori_client/engine/v2/nlp.rb'
|
15
|
+
require 'memori_client/engine/v2/person.rb'
|
16
|
+
require 'memori_client/engine/v2/prompted_question.rb'
|
10
17
|
require 'memori_client/engine/v2/search.rb'
|
11
18
|
require 'memori_client/engine/v2/session.rb'
|
12
19
|
require 'memori_client/engine/v2/stat.rb'
|
13
20
|
require 'memori_client/engine/v2/unanswered_question.rb'
|
21
|
+
require 'memori_client/engine/v2/user.rb'
|
14
22
|
require 'memori_client/engine/v2/web_hook.rb'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Generated on
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
2
|
class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
|
3
3
|
# GET /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}
|
4
4
|
# Gets the Chat Log objects for the Memori of the current session record in a specific date interval.
|
@@ -6,9 +6,11 @@ class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
|
|
6
6
|
# @param [string] strSessionID The session ID. required
|
7
7
|
# @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
|
8
8
|
# @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
|
9
|
-
#
|
10
|
-
def self.
|
11
|
-
|
9
|
+
# list_memori_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
|
10
|
+
def self.list_memori_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
|
11
|
+
args = build_arguments(binding)
|
12
|
+
|
13
|
+
exec_http_request('get', '/memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}', **args)
|
12
14
|
end
|
13
15
|
|
14
16
|
# DELETE /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}
|
@@ -17,9 +19,11 @@ class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
|
|
17
19
|
# @param [string] strSessionID The session ID. required
|
18
20
|
# @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
|
19
21
|
# @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
|
20
|
-
#
|
21
|
-
def self.
|
22
|
-
|
22
|
+
# remove_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
|
23
|
+
def self.remove_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
|
24
|
+
args = build_arguments(binding)
|
25
|
+
|
26
|
+
exec_http_request('delete', '/memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}', **args)
|
23
27
|
end
|
24
28
|
|
25
29
|
# GET /memori/v2/SessionChatLogs/{strSessionID}/{strChatLogSessionID}
|
@@ -27,9 +31,11 @@ class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
|
|
27
31
|
# Params list:
|
28
32
|
# @param [string] strSessionID The session ID. required
|
29
33
|
# @param [string] strChatLogSessionID The session ID for which Chat Log objects are being searched. required
|
30
|
-
#
|
31
|
-
def self.
|
32
|
-
|
34
|
+
# list_session_chat_logs(strSessionID:, strChatLogSessionID:)
|
35
|
+
def self.list_session_chat_logs(strSessionID:, strChatLogSessionID:)
|
36
|
+
args = build_arguments(binding)
|
37
|
+
|
38
|
+
exec_http_request('get', '/memori/v2/SessionChatLogs/{strSessionID}/{strChatLogSessionID}', **args)
|
33
39
|
end
|
34
40
|
|
35
41
|
# DELETE /memori/v2/ChatLog/{strSessionID}/{strChatLogID}
|
@@ -37,9 +43,11 @@ class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
|
|
37
43
|
# Params list:
|
38
44
|
# @param [string] strSessionID The session ID. required
|
39
45
|
# @param [string] strChatLogID The Chat Log object ID. required
|
40
|
-
#
|
41
|
-
def self.
|
42
|
-
|
46
|
+
# remove_chat_log(strSessionID:, strChatLogID:)
|
47
|
+
def self.remove_chat_log(strSessionID:, strChatLogID:)
|
48
|
+
args = build_arguments(binding)
|
49
|
+
|
50
|
+
exec_http_request('delete', '/memori/v2/ChatLog/{strSessionID}/{strChatLogID}', **args)
|
43
51
|
end
|
44
52
|
|
45
53
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
|
+
class MemoriClient::Engine::V2::CompletionLog < MemoriClient::Engine::Resource
|
3
|
+
# GET /memori/v2/CompletionLogs/{strMemoriID}/{strDateFrom}/{strDateTo}
|
4
|
+
# Gets the Completion Log objects for the specified Memori in a specific date interval.
|
5
|
+
# Params list:
|
6
|
+
# @param [string] strMemoriID The Memori object ID. required
|
7
|
+
# @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMdd. optional
|
8
|
+
# @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMdd. optional
|
9
|
+
# list_memori_completion_logs(strMemoriID:, strDateFrom: nil, strDateTo: nil)
|
10
|
+
def self.list_memori_completion_logs(strMemoriID:, strDateFrom: nil, strDateTo: nil)
|
11
|
+
args = build_arguments(binding)
|
12
|
+
|
13
|
+
exec_http_request('get', '/memori/v2/CompletionLogs/{strMemoriID}/{strDateFrom}/{strDateTo}', **args)
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
end
|
@@ -1,12 +1,14 @@
|
|
1
|
-
# Generated on
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
2
|
class MemoriClient::Engine::V2::ContextVar < MemoriClient::Engine::Resource
|
3
3
|
# GET /memori/v2/ContextVarNames/{strSessionID}
|
4
4
|
# Gets a list of currently known context variable names.
|
5
5
|
# Params list:
|
6
6
|
# @param [string] strSessionID The session ID. required
|
7
|
-
#
|
8
|
-
def self.
|
9
|
-
|
7
|
+
# get_context_var_names(strSessionID:)
|
8
|
+
def self.get_context_var_names(strSessionID:)
|
9
|
+
args = build_arguments(binding)
|
10
|
+
|
11
|
+
exec_http_request('get', '/memori/v2/ContextVarNames/{strSessionID}', **args)
|
10
12
|
end
|
11
13
|
|
12
14
|
# GET /memori/v2/ContextVarValues/{strSessionID}/{contextVarName}
|
@@ -14,18 +16,22 @@ class MemoriClient::Engine::V2::ContextVar < MemoriClient::Engine::Resource
|
|
14
16
|
# Params list:
|
15
17
|
# @param [string] strSessionID The session ID. required
|
16
18
|
# @param [string] contextVarName The name of the context variable. required
|
17
|
-
#
|
18
|
-
def self.
|
19
|
-
|
19
|
+
# get_context_var_values(strSessionID:, contextVarName:)
|
20
|
+
def self.get_context_var_values(strSessionID:, contextVarName:)
|
21
|
+
args = build_arguments(binding)
|
22
|
+
|
23
|
+
exec_http_request('get', '/memori/v2/ContextVarValues/{strSessionID}/{contextVarName}', **args)
|
20
24
|
end
|
21
25
|
|
22
26
|
# GET /memori/v2/ContextVars/{strSessionID}
|
23
27
|
# Gets a dictionary of all the known values of known context variables.
|
24
28
|
# Params list:
|
25
29
|
# @param [string] strSessionID The session ID. required
|
26
|
-
#
|
27
|
-
def self.
|
28
|
-
|
30
|
+
# get_context_vars(strSessionID:)
|
31
|
+
def self.get_context_vars(strSessionID:)
|
32
|
+
args = build_arguments(binding)
|
33
|
+
|
34
|
+
exec_http_request('get', '/memori/v2/ContextVars/{strSessionID}', **args)
|
29
35
|
end
|
30
36
|
|
31
37
|
|
@@ -1,12 +1,14 @@
|
|
1
|
-
# Generated on
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
2
|
class MemoriClient::Engine::V2::CorrelationPair < MemoriClient::Engine::Resource
|
3
3
|
# GET /memori/v2/CorrelationPairs/{strSessionID}
|
4
4
|
# Lists all Correlation Pair objects.
|
5
5
|
# Params list:
|
6
6
|
# @param [string] strSessionID The session ID. required
|
7
|
-
#
|
8
|
-
def self.
|
9
|
-
|
7
|
+
# list_correlation_pairs(strSessionID:)
|
8
|
+
def self.list_correlation_pairs(strSessionID:)
|
9
|
+
args = build_arguments(binding)
|
10
|
+
|
11
|
+
exec_http_request('get', '/memori/v2/CorrelationPairs/{strSessionID}', **args)
|
10
12
|
end
|
11
13
|
|
12
14
|
# GET /memori/v2/CorrelationPairs/{strSessionID}/{from}/{howMany}
|
@@ -15,9 +17,45 @@ class MemoriClient::Engine::V2::CorrelationPair < MemoriClient::Engine::Resource
|
|
15
17
|
# @param [string] strSessionID The session ID. required
|
16
18
|
# @param [integer] from The 0-based index of the first Correlation Pair object to list. required
|
17
19
|
# @param [integer] howMany The number of the Correlation Pair objects to list. required
|
18
|
-
#
|
19
|
-
def self.
|
20
|
-
|
20
|
+
# list_correlation_pairs_paginated(strSessionID:, from:, howMany:)
|
21
|
+
def self.list_correlation_pairs_paginated(strSessionID:, from:, howMany:)
|
22
|
+
args = build_arguments(binding)
|
23
|
+
|
24
|
+
exec_http_request('get', '/memori/v2/CorrelationPairs/{strSessionID}/{from}/{howMany}', **args)
|
25
|
+
end
|
26
|
+
|
27
|
+
# POST /memori/v2/CorrelationPair/{strSessionID}
|
28
|
+
# Adds a new Correlation Pair object.
|
29
|
+
# Params list:
|
30
|
+
# @param [string] strSessionID The session ID. required
|
31
|
+
# @param [object] payload request payload. optional
|
32
|
+
# @param [string] payload.pairID . optional
|
33
|
+
# @param [string] payload.text1 . optional
|
34
|
+
# @param [string] payload.text2 . optional
|
35
|
+
# @param [boolean] payload.correlated . optional
|
36
|
+
# @param [integer] payload.occurrences . optional
|
37
|
+
# @param [string] payload.creationTimestamp . optional
|
38
|
+
# @param [string] payload.creationSessionID . optional
|
39
|
+
# @param [string] payload.lastChangeTimestamp . optional
|
40
|
+
# @param [string] payload.lastChangeSessionID . optional
|
41
|
+
# add_correlation_pair(strSessionID:, payload: {})
|
42
|
+
def self.add_correlation_pair(strSessionID:, payload: {})
|
43
|
+
args = build_arguments(binding)
|
44
|
+
payload_keys = [
|
45
|
+
'correlated',
|
46
|
+
'creationSessionID',
|
47
|
+
'creationTimestamp',
|
48
|
+
'lastChangeSessionID',
|
49
|
+
'lastChangeTimestamp',
|
50
|
+
'occurrences',
|
51
|
+
'pairID',
|
52
|
+
'text1',
|
53
|
+
'text2',
|
54
|
+
]
|
55
|
+
payload_required_keys = %w[]
|
56
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
57
|
+
|
58
|
+
exec_http_request('post', '/memori/v2/CorrelationPair/{strSessionID}', **args)
|
21
59
|
end
|
22
60
|
|
23
61
|
# DELETE /memori/v2/CorrelationPair/{strSessionID}/{strPairID}
|
@@ -25,9 +63,11 @@ class MemoriClient::Engine::V2::CorrelationPair < MemoriClient::Engine::Resource
|
|
25
63
|
# Params list:
|
26
64
|
# @param [string] strSessionID The session ID. required
|
27
65
|
# @param [string] strPairID The Correlation Pair object ID. required
|
28
|
-
#
|
29
|
-
def self.
|
30
|
-
|
66
|
+
# remove_correlation_pair(strSessionID:, strPairID:)
|
67
|
+
def self.remove_correlation_pair(strSessionID:, strPairID:)
|
68
|
+
args = build_arguments(binding)
|
69
|
+
|
70
|
+
exec_http_request('delete', '/memori/v2/CorrelationPair/{strSessionID}/{strPairID}', **args)
|
31
71
|
end
|
32
72
|
|
33
73
|
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
|
+
class MemoriClient::Engine::V2::CustomDictionary < MemoriClient::Engine::Resource
|
3
|
+
# GET /memori/v2/CustomWords/{strSessionID}
|
4
|
+
# Lists all Custom Word objects.
|
5
|
+
# Params list:
|
6
|
+
# @param [string] strSessionID The session ID. required
|
7
|
+
# list_custom_words(strSessionID:)
|
8
|
+
def self.list_custom_words(strSessionID:)
|
9
|
+
args = build_arguments(binding)
|
10
|
+
|
11
|
+
exec_http_request('get', '/memori/v2/CustomWords/{strSessionID}', **args)
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /memori/v2/CustomWords/{strSessionID}/{from}/{howMany}
|
15
|
+
# Lists Custom Word objects with pagination.
|
16
|
+
# Params list:
|
17
|
+
# @param [string] strSessionID The session ID. required
|
18
|
+
# @param [integer] from The 0-based index of the first Custom Word to list. required
|
19
|
+
# @param [integer] howMany The number of the Custom Word to list. required
|
20
|
+
# list_custom_words_paginated(strSessionID:, from:, howMany:)
|
21
|
+
def self.list_custom_words_paginated(strSessionID:, from:, howMany:)
|
22
|
+
args = build_arguments(binding)
|
23
|
+
|
24
|
+
exec_http_request('get', '/memori/v2/CustomWords/{strSessionID}/{from}/{howMany}', **args)
|
25
|
+
end
|
26
|
+
|
27
|
+
# GET /memori/v2/CustomWord/{strSessionID}/{strCustomWordID}
|
28
|
+
# Gets the details of a Custom Word object.
|
29
|
+
# Params list:
|
30
|
+
# @param [string] strSessionID The session ID. required
|
31
|
+
# @param [string] strCustomWordID The Custom Word object ID. required
|
32
|
+
# get_custom_word(strSessionID:, strCustomWordID:)
|
33
|
+
def self.get_custom_word(strSessionID:, strCustomWordID:)
|
34
|
+
args = build_arguments(binding)
|
35
|
+
|
36
|
+
exec_http_request('get', '/memori/v2/CustomWord/{strSessionID}/{strCustomWordID}', **args)
|
37
|
+
end
|
38
|
+
|
39
|
+
# PATCH /memori/v2/CustomWord/{strSessionID}/{strCustomWordID}
|
40
|
+
# Updates an existing Custom Word object.
|
41
|
+
# Params list:
|
42
|
+
# @param [string] strSessionID The session ID. required
|
43
|
+
# @param [string] strCustomWordID The Custom Word object ID. required
|
44
|
+
# @param [object] payload request payload. optional
|
45
|
+
# @param [string] payload.customWordID . optional
|
46
|
+
# @param [string] payload.word . optional
|
47
|
+
# @param [string] payload.definition . optional
|
48
|
+
# @param [string] payload.creationTimestamp . optional
|
49
|
+
# @param [string] payload.creationSessionID . optional
|
50
|
+
# @param [string] payload.lastChangeTimestamp . optional
|
51
|
+
# @param [string] payload.lastChangeSessionID . optional
|
52
|
+
# update_custom_word(strSessionID:, strCustomWordID:, payload: {})
|
53
|
+
def self.update_custom_word(strSessionID:, strCustomWordID:, payload: {})
|
54
|
+
args = build_arguments(binding)
|
55
|
+
payload_keys = [
|
56
|
+
'creationSessionID',
|
57
|
+
'creationTimestamp',
|
58
|
+
'customWordID',
|
59
|
+
'definition',
|
60
|
+
'lastChangeSessionID',
|
61
|
+
'lastChangeTimestamp',
|
62
|
+
'word',
|
63
|
+
]
|
64
|
+
payload_required_keys = %w[]
|
65
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
66
|
+
|
67
|
+
exec_http_request('patch', '/memori/v2/CustomWord/{strSessionID}/{strCustomWordID}', **args)
|
68
|
+
end
|
69
|
+
|
70
|
+
# DELETE /memori/v2/CustomWord/{strSessionID}/{strCustomWordID}
|
71
|
+
# Removes an existing Custom Word object.
|
72
|
+
# Params list:
|
73
|
+
# @param [string] strSessionID The session ID. required
|
74
|
+
# @param [string] strCustomWordID The Custom Word object ID. required
|
75
|
+
# remove_custom_word(strSessionID:, strCustomWordID:)
|
76
|
+
def self.remove_custom_word(strSessionID:, strCustomWordID:)
|
77
|
+
args = build_arguments(binding)
|
78
|
+
|
79
|
+
exec_http_request('delete', '/memori/v2/CustomWord/{strSessionID}/{strCustomWordID}', **args)
|
80
|
+
end
|
81
|
+
|
82
|
+
# POST /memori/v2/CustomWord/{strSessionID}
|
83
|
+
# Adds a new Custom Word object.
|
84
|
+
# Params list:
|
85
|
+
# @param [string] strSessionID The session ID. required
|
86
|
+
# @param [object] payload request payload. optional
|
87
|
+
# @param [string] payload.customWordID . optional
|
88
|
+
# @param [string] payload.word . optional
|
89
|
+
# @param [string] payload.definition . optional
|
90
|
+
# @param [string] payload.creationTimestamp . optional
|
91
|
+
# @param [string] payload.creationSessionID . optional
|
92
|
+
# @param [string] payload.lastChangeTimestamp . optional
|
93
|
+
# @param [string] payload.lastChangeSessionID . optional
|
94
|
+
# add_custom_word(strSessionID:, payload: {})
|
95
|
+
def self.add_custom_word(strSessionID:, payload: {})
|
96
|
+
args = build_arguments(binding)
|
97
|
+
payload_keys = [
|
98
|
+
'creationSessionID',
|
99
|
+
'creationTimestamp',
|
100
|
+
'customWordID',
|
101
|
+
'definition',
|
102
|
+
'lastChangeSessionID',
|
103
|
+
'lastChangeTimestamp',
|
104
|
+
'word',
|
105
|
+
]
|
106
|
+
payload_required_keys = %w[]
|
107
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
108
|
+
|
109
|
+
exec_http_request('post', '/memori/v2/CustomWord/{strSessionID}', **args)
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
end
|
@@ -1,14 +1,21 @@
|
|
1
|
-
# Generated on
|
1
|
+
# Generated on 2024-01-18 17:37:07 +0000
|
2
2
|
class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
3
3
|
# POST /memori/v2/TextEnteredEvent/{strSessionID}
|
4
4
|
# Submits a Text Entered event to the session's Dialog State Machine.
|
5
5
|
# Params list:
|
6
6
|
# @param [string] strSessionID The session ID. required
|
7
7
|
# @param [object] payload request payload. optional
|
8
|
-
# @param [string] payload.text .
|
9
|
-
#
|
10
|
-
def self.
|
11
|
-
|
8
|
+
# @param [string] payload.text . required
|
9
|
+
# enter_text(strSessionID:, payload: {})
|
10
|
+
def self.enter_text(strSessionID:, payload: {})
|
11
|
+
args = build_arguments(binding)
|
12
|
+
payload_keys = [
|
13
|
+
'text',
|
14
|
+
]
|
15
|
+
payload_required_keys = %w[text]
|
16
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
17
|
+
|
18
|
+
exec_http_request('post', '/memori/v2/TextEnteredEvent/{strSessionID}', **args)
|
12
19
|
end
|
13
20
|
|
14
21
|
# POST /memori/v2/DateChangedEvent/{strSessionID}
|
@@ -16,10 +23,17 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
16
23
|
# Params list:
|
17
24
|
# @param [string] strSessionID The session ID. required
|
18
25
|
# @param [object] payload request payload. optional
|
19
|
-
# @param [string] payload.date .
|
20
|
-
#
|
21
|
-
def self.
|
22
|
-
|
26
|
+
# @param [string] payload.date . required
|
27
|
+
# change_date(strSessionID:, payload: {})
|
28
|
+
def self.change_date(strSessionID:, payload: {})
|
29
|
+
args = build_arguments(binding)
|
30
|
+
payload_keys = [
|
31
|
+
'date',
|
32
|
+
]
|
33
|
+
payload_required_keys = %w[date]
|
34
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
35
|
+
|
36
|
+
exec_http_request('post', '/memori/v2/DateChangedEvent/{strSessionID}', **args)
|
23
37
|
end
|
24
38
|
|
25
39
|
# POST /memori/v2/PlaceChangedEvent/{strSessionID}
|
@@ -31,9 +45,19 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
31
45
|
# @param [number] payload.latitude . optional
|
32
46
|
# @param [number] payload.longitude . optional
|
33
47
|
# @param [number] payload.uncertaintyKm . optional
|
34
|
-
#
|
35
|
-
def self.
|
36
|
-
|
48
|
+
# change_place(strSessionID:, payload: {})
|
49
|
+
def self.change_place(strSessionID:, payload: {})
|
50
|
+
args = build_arguments(binding)
|
51
|
+
payload_keys = [
|
52
|
+
'latitude',
|
53
|
+
'longitude',
|
54
|
+
'placeName',
|
55
|
+
'uncertaintyKm',
|
56
|
+
]
|
57
|
+
payload_required_keys = %w[]
|
58
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
59
|
+
|
60
|
+
exec_http_request('post', '/memori/v2/PlaceChangedEvent/{strSessionID}', **args)
|
37
61
|
end
|
38
62
|
|
39
63
|
# POST /memori/v2/TagChangedEvent/{strSessionID}
|
@@ -41,19 +65,28 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
41
65
|
# Params list:
|
42
66
|
# @param [string] strSessionID The session ID. required
|
43
67
|
# @param [object] payload request payload. optional
|
44
|
-
# @param [string] payload.tag .
|
45
|
-
#
|
46
|
-
def self.
|
47
|
-
|
68
|
+
# @param [string] payload.tag . required
|
69
|
+
# change_tag(strSessionID:, payload: {})
|
70
|
+
def self.change_tag(strSessionID:, payload: {})
|
71
|
+
args = build_arguments(binding)
|
72
|
+
payload_keys = [
|
73
|
+
'tag',
|
74
|
+
]
|
75
|
+
payload_required_keys = %w[tag]
|
76
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
77
|
+
|
78
|
+
exec_http_request('post', '/memori/v2/TagChangedEvent/{strSessionID}', **args)
|
48
79
|
end
|
49
80
|
|
50
81
|
# POST /memori/v2/TimeoutEvent/{strSessionID}
|
51
82
|
# Submits a Timeout event to the session's Dialog State Machine.
|
52
83
|
# Params list:
|
53
84
|
# @param [string] strSessionID The session ID. required
|
54
|
-
#
|
55
|
-
def self.
|
56
|
-
|
85
|
+
# timeout(strSessionID:)
|
86
|
+
def self.timeout(strSessionID:)
|
87
|
+
args = build_arguments(binding)
|
88
|
+
|
89
|
+
exec_http_request('post', '/memori/v2/TimeoutEvent/{strSessionID}', **args)
|
57
90
|
end
|
58
91
|
|
59
92
|
# POST /memori/v2/MediumSelectedEvent/{strSessionID}
|
@@ -61,10 +94,17 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
61
94
|
# Params list:
|
62
95
|
# @param [string] strSessionID The session ID. required
|
63
96
|
# @param [object] payload request payload. optional
|
64
|
-
# @param [] payload.medium .
|
65
|
-
#
|
66
|
-
def self.
|
67
|
-
|
97
|
+
# @param [] payload.medium . required
|
98
|
+
# select_medium(strSessionID:, payload: {})
|
99
|
+
def self.select_medium(strSessionID:, payload: {})
|
100
|
+
args = build_arguments(binding)
|
101
|
+
payload_keys = [
|
102
|
+
'medium',
|
103
|
+
]
|
104
|
+
payload_required_keys = %w[medium]
|
105
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
106
|
+
|
107
|
+
exec_http_request('post', '/memori/v2/MediumSelectedEvent/{strSessionID}', **args)
|
68
108
|
end
|
69
109
|
|
70
110
|
# POST /memori/v2/DateSelectedEvent/{strSessionID}
|
@@ -72,11 +112,19 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
72
112
|
# Params list:
|
73
113
|
# @param [string] strSessionID The session ID. required
|
74
114
|
# @param [object] payload request payload. optional
|
75
|
-
# @param [string] payload.date .
|
115
|
+
# @param [string] payload.date . required
|
76
116
|
# @param [number] payload.uncertaintyDays . optional
|
77
|
-
#
|
78
|
-
def self.
|
79
|
-
|
117
|
+
# select_date(strSessionID:, payload: {})
|
118
|
+
def self.select_date(strSessionID:, payload: {})
|
119
|
+
args = build_arguments(binding)
|
120
|
+
payload_keys = [
|
121
|
+
'date',
|
122
|
+
'uncertaintyDays',
|
123
|
+
]
|
124
|
+
payload_required_keys = %w[date]
|
125
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
126
|
+
|
127
|
+
exec_http_request('post', '/memori/v2/DateSelectedEvent/{strSessionID}', **args)
|
80
128
|
end
|
81
129
|
|
82
130
|
# POST /memori/v2/PlaceSelectedEvent/{strSessionID}
|
@@ -88,9 +136,19 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
88
136
|
# @param [number] payload.latitude . optional
|
89
137
|
# @param [number] payload.longitude . optional
|
90
138
|
# @param [number] payload.uncertaintyKm . optional
|
91
|
-
#
|
92
|
-
def self.
|
93
|
-
|
139
|
+
# select_place(strSessionID:, payload: {})
|
140
|
+
def self.select_place(strSessionID:, payload: {})
|
141
|
+
args = build_arguments(binding)
|
142
|
+
payload_keys = [
|
143
|
+
'latitude',
|
144
|
+
'longitude',
|
145
|
+
'placeName',
|
146
|
+
'uncertaintyKm',
|
147
|
+
]
|
148
|
+
payload_required_keys = %w[]
|
149
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
150
|
+
|
151
|
+
exec_http_request('post', '/memori/v2/PlaceSelectedEvent/{strSessionID}', **args)
|
94
152
|
end
|
95
153
|
|
96
154
|
# POST /memori/v2/TagSelectedEvent/{strSessionID}
|
@@ -98,10 +156,17 @@ class MemoriClient::Engine::V2::Dialog < MemoriClient::Engine::Resource
|
|
98
156
|
# Params list:
|
99
157
|
# @param [string] strSessionID The session ID. required
|
100
158
|
# @param [object] payload request payload. optional
|
101
|
-
# @param [string] payload.tag .
|
102
|
-
#
|
103
|
-
def self.
|
104
|
-
|
159
|
+
# @param [string] payload.tag . required
|
160
|
+
# select_tag(strSessionID:, payload: {})
|
161
|
+
def self.select_tag(strSessionID:, payload: {})
|
162
|
+
args = build_arguments(binding)
|
163
|
+
payload_keys = [
|
164
|
+
'tag',
|
165
|
+
]
|
166
|
+
payload_required_keys = %w[tag]
|
167
|
+
validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)
|
168
|
+
|
169
|
+
exec_http_request('post', '/memori/v2/TagSelectedEvent/{strSessionID}', **args)
|
105
170
|
end
|
106
171
|
|
107
172
|
|