memori-client 0.1.1 → 0.1.6

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/memori_client/backend/resources.rb +3 -0
  3. data/lib/memori_client/backend/v1/asset.rb +51 -25
  4. data/lib/memori_client/backend/v2/action_log.rb +19 -7
  5. data/lib/memori_client/backend/v2/analysis.rb +54 -0
  6. data/lib/memori_client/backend/v2/asset.rb +79 -23
  7. data/lib/memori_client/backend/v2/badge.rb +34 -17
  8. data/lib/memori_client/backend/v2/completion_config.rb +202 -0
  9. data/lib/memori_client/backend/v2/consumption_log.rb +31 -10
  10. data/lib/memori_client/backend/v2/import_export.rb +244 -80
  11. data/lib/memori_client/backend/v2/integration.rb +95 -47
  12. data/lib/memori_client/backend/v2/invitation.rb +127 -61
  13. data/lib/memori_client/backend/v2/memori.rb +652 -313
  14. data/lib/memori_client/backend/v2/memori_list.rb +65 -31
  15. data/lib/memori_client/backend/v2/notification.rb +13 -7
  16. data/lib/memori_client/backend/v2/process.rb +70 -0
  17. data/lib/memori_client/backend/v2/tenant.rb +192 -102
  18. data/lib/memori_client/backend/v2/user.rb +1058 -547
  19. data/lib/memori_client/configuration.rb +5 -0
  20. data/lib/memori_client/engine/hmac_helper.rb +186 -0
  21. data/lib/memori_client/engine/resource.rb +5 -31
  22. data/lib/memori_client/engine/resources.rb +2 -3
  23. data/lib/memori_client/engine/v2/chat_log.rb +51 -13
  24. data/lib/memori_client/engine/v2/context_var.rb +20 -10
  25. data/lib/memori_client/engine/v2/correlation_pair.rb +48 -23
  26. data/lib/memori_client/engine/v2/custom_dictionary.rb +74 -35
  27. data/lib/memori_client/engine/v2/dialog.rb +107 -57
  28. data/lib/memori_client/engine/v2/event_log.rb +54 -13
  29. data/lib/memori_client/engine/v2/expert_reference.rb +92 -45
  30. data/lib/memori_client/engine/v2/function.rb +220 -0
  31. data/lib/memori_client/engine/v2/intent.rb +175 -85
  32. data/lib/memori_client/engine/v2/localization_key.rb +72 -36
  33. data/lib/memori_client/engine/v2/medium.rb +92 -43
  34. data/lib/memori_client/engine/v2/memory.rb +341 -89
  35. data/lib/memori_client/engine/v2/nlp.rb +65 -128
  36. data/lib/memori_client/engine/v2/person.rb +88 -43
  37. data/lib/memori_client/engine/v2/private/memori.rb +17 -0
  38. data/lib/memori_client/engine/v2/private/memori_block.rb +24 -0
  39. data/lib/memori_client/engine/v2/search.rb +240 -52
  40. data/lib/memori_client/engine/v2/session.rb +41 -22
  41. data/lib/memori_client/engine/v2/stat.rb +8 -40
  42. data/lib/memori_client/engine/v2/topic.rb +88 -0
  43. data/lib/memori_client/engine/v2/unanswered_question.rb +54 -26
  44. data/lib/memori_client/engine/v2/user.rb +114 -14
  45. data/lib/memori_client/engine/v2/web_hook.rb +80 -34
  46. data/lib/memori_client/http_client.rb +8 -1
  47. data/lib/memori_client/resource.rb +3 -2
  48. data/lib/memori_client.rb +6 -0
  49. metadata +10 -2
@@ -5,6 +5,11 @@ module MemoriClient
5
5
  attr_accessor :backend_api_password
6
6
  attr_accessor :backend_api_tenant
7
7
  attr_accessor :engine_api_root
8
+ attr_accessor :engine_private_api_root
9
+
10
+ # Used to authorize private API calls to the engine
11
+ attr_accessor :engine_app_id
12
+ attr_accessor :engine_api_key
8
13
 
9
14
  # Initialize every configuration with a default.
10
15
  # Users of the gem will override these with their
@@ -0,0 +1,186 @@
1
+ require 'digest/md5'
2
+ require 'securerandom'
3
+ require 'time'
4
+
5
+ class MemoriClient::Engine::HMACHelper
6
+ IPAD = 0x36
7
+ OPAD = 0x5c
8
+
9
+ def initialize(app_id, key, max_delta_secs = 30)
10
+ # Check arguments
11
+ raise ArgumentError, "HMAC: invalid appID" if app_id.nil?
12
+ raise ArgumentError, "HMAC: invalid key" if key.nil? || key.to_s == "00000000-0000-0000-0000-000000000000"
13
+
14
+ # Initialization
15
+ @app_id = app_id
16
+ @max_delta_secs = max_delta_secs
17
+
18
+ @message_cache = {}
19
+ @cache_mutex = Mutex.new
20
+
21
+ @@next_nonce ||= 0
22
+ @nonce_mutex = Mutex.new
23
+
24
+ # Build inner and outer keys
25
+ key_bytes = guid_to_bytes(key)
26
+
27
+ inner_key_bytes = key_bytes.map { |byte| byte ^ IPAD }
28
+ @inner_key = inner_key_bytes.map { |byte| byte.to_s(16).rjust(2, '0') }.join
29
+
30
+ outer_key_bytes = key_bytes.map { |byte| byte ^ OPAD }
31
+ @outer_key = outer_key_bytes.map { |byte| byte.to_s(16).rjust(2, '0') }.join
32
+
33
+ # Start a thread for cache expiration
34
+ Thread.new do
35
+ loop do
36
+ clean_cache
37
+ sleep 1
38
+ end
39
+ end
40
+ end
41
+
42
+ # Not meant to be invoked directly, but could be used for testing
43
+ # @return [Hash] the message and the signed HMAC
44
+ def build_hmac(nonce:, epoch:)
45
+ message = "#{@app_id}:#{nonce}:#{epoch}"
46
+
47
+ # Sign the message
48
+ signature = sign(message, @inner_key, @outer_key)
49
+ [message, signature]
50
+ end
51
+
52
+ def next_hmac
53
+ nonce = @nonce_mutex.synchronize { @@next_nonce += 1 }
54
+ epoch = Time.now.utc.to_i # Use UTC time like C#
55
+ message, signature = build_hmac(nonce: nonce, epoch: epoch)
56
+
57
+ "#{message}:#{signature}"
58
+ end
59
+
60
+ def verify_hmac(hmac)
61
+ # Check arguments
62
+ raise ArgumentError, "HMAC: invalid message" if hmac.nil? || hmac.empty?
63
+
64
+ # String split HMAC message
65
+ parts = hmac.split(':')
66
+ raise ArgumentError, "HMAC: invalid message format" if parts.length != 4
67
+
68
+ # Check the app ID
69
+ begin
70
+ app_id = Integer(parts[0])
71
+ rescue
72
+ raise ArgumentError, "HMAC: invalid app ID"
73
+ end
74
+
75
+ raise ArgumentError, "HMAC: unrecognized app ID" if app_id != @app_id
76
+
77
+ # Check the nonce
78
+ begin
79
+ nonce = Integer(parts[1])
80
+ rescue
81
+ raise ArgumentError, "HMAC: invalid nonce"
82
+ end
83
+
84
+ raise ArgumentError, "HMAC: invalid nonce" if nonce < 1
85
+
86
+ # Check the timestamp
87
+ begin
88
+ timestamp = Integer(parts[2])
89
+ rescue
90
+ raise ArgumentError, "HMAC: invalid timestamp"
91
+ end
92
+
93
+ epoch = Time.now.utc.to_i # Use UTC time like C#
94
+ time_diff = epoch - timestamp
95
+ raise ArgumentError, "HMAC: timestamp out of range" if time_diff <= -@max_delta_secs || time_diff >= @max_delta_secs
96
+
97
+ # Check the signature
98
+ message = "#{app_id}:#{nonce}:#{timestamp}"
99
+ expected_signature = sign(message, @inner_key, @outer_key)
100
+ actual_signature = parts[3]
101
+
102
+ # Use a constant-time comparison to prevent timing attacks
103
+ signature_valid = secure_compare(expected_signature, actual_signature)
104
+ raise ArgumentError, "HMAC: wrong signature" unless signature_valid
105
+
106
+ # Check if the message has already been seen
107
+ is_new = false
108
+
109
+ @cache_mutex.synchronize do
110
+ unless @message_cache.key?(message)
111
+ @message_cache[message] = Time.now.to_i + 30
112
+ is_new = true
113
+ end
114
+ end
115
+
116
+ raise ArgumentError, "HMAC: message already seen" unless is_new
117
+
118
+ true
119
+ end
120
+
121
+ private
122
+
123
+ def sign(message, inner_key, outer_key)
124
+ # Compute the inner MD5 hash exactly like C#
125
+ inner_hash_bytes = Digest::MD5.digest(inner_key + message)
126
+ inner_hash_str = inner_hash_bytes.unpack1('H*')
127
+
128
+ # Compute the outer MD5 hash
129
+ outer_hash_bytes = Digest::MD5.digest(outer_key + inner_hash_str)
130
+ outer_hash_str = outer_hash_bytes.unpack1('H*')
131
+
132
+ return outer_hash_str
133
+ end
134
+
135
+ def guid_to_bytes(guid)
136
+ # Convert GUID to string if it's already an object
137
+ guid_str = guid.to_s
138
+
139
+ # Remove any curly braces and hyphens, standardize format
140
+ guid_str = guid_str.gsub(/[{}-]/, '')
141
+
142
+ # Ensure we have a valid 32-character GUID
143
+ raise ArgumentError, "Invalid GUID format" unless guid_str.length == 32
144
+
145
+ # Parse the GUID using the same byte ordering as .NET's Guid.ToByteArray()
146
+ # This matches the specific layout: Int32, Int16, Int16, byte[8]
147
+
148
+ # First 4 bytes (8 hex chars) - need to reverse byte order (little-endian)
149
+ int32_bytes = [guid_str[0, 8]].pack('H*').bytes.reverse
150
+
151
+ # Next 2 bytes (4 hex chars) - need to reverse byte order (little-endian)
152
+ int16_1_bytes = [guid_str[8, 4]].pack('H*').bytes.reverse
153
+
154
+ # Next 2 bytes (4 hex chars) - need to reverse byte order (little-endian)
155
+ int16_2_bytes = [guid_str[12, 4]].pack('H*').bytes.reverse
156
+
157
+ # Remaining 8 bytes (16 hex chars) - keep original byte order
158
+ remaining_bytes = [guid_str[16, 16]].pack('H*').bytes
159
+
160
+ # Combine all byte arrays in the correct order
161
+ return int32_bytes + int16_1_bytes + int16_2_bytes + remaining_bytes
162
+ end
163
+
164
+ def secure_compare(a, b)
165
+ return false if a.bytesize != b.bytesize
166
+
167
+ # Constant-time comparison
168
+ result = 0
169
+ a.bytes.zip(b.bytes) { |x, y| result |= x ^ y }
170
+ result == 0
171
+ end
172
+
173
+ def clean_cache
174
+ now = Time.now.to_i
175
+ @cache_mutex.synchronize do
176
+ # Remove expired entries
177
+ @message_cache.delete_if { |_, expiry| expiry < now }
178
+
179
+ # Enforce size limit
180
+ if @message_cache.size > 100000
181
+ sorted = @message_cache.sort_by { |_, expiry| expiry }
182
+ @message_cache = Hash[sorted.first(100000)]
183
+ end
184
+ end
185
+ end
186
+ end
@@ -1,39 +1,13 @@
1
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
32
-
33
2
  def self.build_url(url)
34
3
  [
35
4
  MemoriClient.configuration.engine_api_root,
36
5
  url
37
6
  ].join('')
38
7
  end
8
+
9
+ def self.hmac_authorization_header
10
+ helper = MemoriClient::Engine::HMACHelper.new(MemoriClient.configuration.engine_app_id, MemoriClient.configuration.engine_api_key)
11
+ ["HMAC", helper.next_hmac].join(' ')
12
+ end
39
13
  end
@@ -1,22 +1,21 @@
1
1
  require 'memori_client/engine/v2/chat_log.rb'
2
- require 'memori_client/engine/v2/completion_log.rb'
3
2
  require 'memori_client/engine/v2/context_var.rb'
4
3
  require 'memori_client/engine/v2/correlation_pair.rb'
5
4
  require 'memori_client/engine/v2/custom_dictionary.rb'
6
5
  require 'memori_client/engine/v2/dialog.rb'
7
6
  require 'memori_client/engine/v2/event_log.rb'
8
7
  require 'memori_client/engine/v2/expert_reference.rb'
8
+ require 'memori_client/engine/v2/function.rb'
9
9
  require 'memori_client/engine/v2/intent.rb'
10
10
  require 'memori_client/engine/v2/localization_key.rb'
11
11
  require 'memori_client/engine/v2/medium.rb'
12
- require 'memori_client/engine/v2/memori.rb'
13
12
  require 'memori_client/engine/v2/memory.rb'
14
13
  require 'memori_client/engine/v2/nlp.rb'
15
14
  require 'memori_client/engine/v2/person.rb'
16
- require 'memori_client/engine/v2/prompted_question.rb'
17
15
  require 'memori_client/engine/v2/search.rb'
18
16
  require 'memori_client/engine/v2/session.rb'
19
17
  require 'memori_client/engine/v2/stat.rb'
18
+ require 'memori_client/engine/v2/topic.rb'
20
19
  require 'memori_client/engine/v2/unanswered_question.rb'
21
20
  require 'memori_client/engine/v2/user.rb'
22
21
  require 'memori_client/engine/v2/web_hook.rb'
@@ -1,49 +1,87 @@
1
- # Generated on 2024-01-18 17:37:07 +0000
1
+ # Generated on 2025-01-27 20:29:52 +0000
2
2
  class MemoriClient::Engine::V2::ChatLog < MemoriClient::Engine::Resource
3
- # GET /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}
3
+ # `GET /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}`
4
+ #
4
5
  # Gets the Chat Log objects for the Memori of the current session record in a specific date interval.
5
- # Params list:
6
+ #
7
+ #
6
8
  # @param [string] strSessionID The session ID. required
9
+ #
7
10
  # @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
11
+ #
8
12
  # @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
9
- # list_memori_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
13
+ #
14
+ # `list_memori_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)`
10
15
  def self.list_memori_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
11
16
  args = build_arguments(binding)
12
17
 
13
18
  exec_http_request('get', '/memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}', **args)
14
19
  end
15
20
 
16
- # DELETE /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}
21
+ # `DELETE /memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}`
22
+ #
17
23
  # Removes all Chat Log objects in a specific date interval.
18
- # Params list:
24
+ #
25
+ #
19
26
  # @param [string] strSessionID The session ID. required
27
+ #
20
28
  # @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
29
+ #
21
30
  # @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
22
- # remove_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
31
+ #
32
+ # `remove_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)`
23
33
  def self.remove_chat_logs(strSessionID:, strDateFrom: nil, strDateTo: nil)
24
34
  args = build_arguments(binding)
25
35
 
26
36
  exec_http_request('delete', '/memori/v2/ChatLogs/{strSessionID}/{strDateFrom}/{strDateTo}', **args)
27
37
  end
28
38
 
29
- # GET /memori/v2/SessionChatLogs/{strSessionID}/{strChatLogSessionID}
39
+ # `GET /memori/v2/SessionChatLogs/{strSessionID}/{strChatLogSessionID}`
40
+ #
30
41
  # Gets the Chat Log objects for the Memori of the current session recorded during a specific other session.
31
- # Params list:
42
+ #
43
+ #
32
44
  # @param [string] strSessionID The session ID. required
45
+ #
33
46
  # @param [string] strChatLogSessionID The session ID for which Chat Log objects are being searched. required
34
- # list_session_chat_logs(strSessionID:, strChatLogSessionID:)
47
+ #
48
+ # `list_session_chat_logs(strSessionID:, strChatLogSessionID:)`
35
49
  def self.list_session_chat_logs(strSessionID:, strChatLogSessionID:)
36
50
  args = build_arguments(binding)
37
51
 
38
52
  exec_http_request('get', '/memori/v2/SessionChatLogs/{strSessionID}/{strChatLogSessionID}', **args)
39
53
  end
40
54
 
41
- # DELETE /memori/v2/ChatLog/{strSessionID}/{strChatLogID}
55
+ # `GET /memori/v2/UserChatLogs/{strSessionID}/{strUserID}/{strDateFrom}/{strDateTo}`
56
+ #
57
+ # Gets the Chat Log objects for the Memori of the current session created by a specific User.
58
+ #
59
+ #
60
+ # @param [string] strSessionID The session ID. required
61
+ #
62
+ # @param [string] strUserID The user ID for which Chat Log objects are being searched. required
63
+ #
64
+ # @param [string] strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
65
+ #
66
+ # @param [string] strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff. optional
67
+ #
68
+ # `list_user_chat_logs(strSessionID:, strUserID:, strDateFrom: nil, strDateTo: nil)`
69
+ def self.list_user_chat_logs(strSessionID:, strUserID:, strDateFrom: nil, strDateTo: nil)
70
+ args = build_arguments(binding)
71
+
72
+ exec_http_request('get', '/memori/v2/UserChatLogs/{strSessionID}/{strUserID}/{strDateFrom}/{strDateTo}', **args)
73
+ end
74
+
75
+ # `DELETE /memori/v2/ChatLog/{strSessionID}/{strChatLogID}`
76
+ #
42
77
  # Removes an existing Chat Log object.
43
- # Params list:
78
+ #
79
+ #
44
80
  # @param [string] strSessionID The session ID. required
81
+ #
45
82
  # @param [string] strChatLogID The Chat Log object ID. required
46
- # remove_chat_log(strSessionID:, strChatLogID:)
83
+ #
84
+ # `remove_chat_log(strSessionID:, strChatLogID:)`
47
85
  def self.remove_chat_log(strSessionID:, strChatLogID:)
48
86
  args = build_arguments(binding)
49
87
 
@@ -1,33 +1,43 @@
1
- # Generated on 2024-01-18 17:37:07 +0000
1
+ # Generated on 2025-01-27 20:29:52 +0000
2
2
  class MemoriClient::Engine::V2::ContextVar < MemoriClient::Engine::Resource
3
- # GET /memori/v2/ContextVarNames/{strSessionID}
3
+ # `GET /memori/v2/ContextVarNames/{strSessionID}`
4
+ #
4
5
  # Gets a list of currently known context variable names.
5
- # Params list:
6
+ #
7
+ #
6
8
  # @param [string] strSessionID The session ID. required
7
- # get_context_var_names(strSessionID:)
9
+ #
10
+ # `get_context_var_names(strSessionID:)`
8
11
  def self.get_context_var_names(strSessionID:)
9
12
  args = build_arguments(binding)
10
13
 
11
14
  exec_http_request('get', '/memori/v2/ContextVarNames/{strSessionID}', **args)
12
15
  end
13
16
 
14
- # GET /memori/v2/ContextVarValues/{strSessionID}/{contextVarName}
17
+ # `GET /memori/v2/ContextVarValues/{strSessionID}/{contextVarName}`
18
+ #
15
19
  # Gets a list of currently known values for a named context variable.
16
- # Params list:
20
+ #
21
+ #
17
22
  # @param [string] strSessionID The session ID. required
23
+ #
18
24
  # @param [string] contextVarName The name of the context variable. required
19
- # get_context_var_values(strSessionID:, contextVarName:)
25
+ #
26
+ # `get_context_var_values(strSessionID:, contextVarName:)`
20
27
  def self.get_context_var_values(strSessionID:, contextVarName:)
21
28
  args = build_arguments(binding)
22
29
 
23
30
  exec_http_request('get', '/memori/v2/ContextVarValues/{strSessionID}/{contextVarName}', **args)
24
31
  end
25
32
 
26
- # GET /memori/v2/ContextVars/{strSessionID}
33
+ # `GET /memori/v2/ContextVars/{strSessionID}`
34
+ #
27
35
  # Gets a dictionary of all the known values of known context variables.
28
- # Params list:
36
+ #
37
+ #
29
38
  # @param [string] strSessionID The session ID. required
30
- # get_context_vars(strSessionID:)
39
+ #
40
+ # `get_context_vars(strSessionID:)`
31
41
  def self.get_context_vars(strSessionID:)
32
42
  args = build_arguments(binding)
33
43
 
@@ -1,44 +1,65 @@
1
- # Generated on 2024-01-18 17:37:07 +0000
1
+ # Generated on 2025-01-27 20:29:52 +0000
2
2
  class MemoriClient::Engine::V2::CorrelationPair < MemoriClient::Engine::Resource
3
- # GET /memori/v2/CorrelationPairs/{strSessionID}
3
+ # `GET /memori/v2/CorrelationPairs/{strSessionID}`
4
+ #
4
5
  # Lists all Correlation Pair objects.
5
- # Params list:
6
+ #
7
+ #
6
8
  # @param [string] strSessionID The session ID. required
7
- # list_correlation_pairs(strSessionID:)
9
+ #
10
+ # `list_correlation_pairs(strSessionID:)`
8
11
  def self.list_correlation_pairs(strSessionID:)
9
12
  args = build_arguments(binding)
10
13
 
11
14
  exec_http_request('get', '/memori/v2/CorrelationPairs/{strSessionID}', **args)
12
15
  end
13
16
 
14
- # GET /memori/v2/CorrelationPairs/{strSessionID}/{from}/{howMany}
17
+ # `GET /memori/v2/CorrelationPairs/{strSessionID}/{from}/{howMany}`
18
+ #
15
19
  # Lists Correlation Pair objects with pagination.
16
- # Params list:
20
+ #
21
+ #
17
22
  # @param [string] strSessionID The session ID. required
23
+ #
18
24
  # @param [integer] from The 0-based index of the first Correlation Pair object to list. required
25
+ #
19
26
  # @param [integer] howMany The number of the Correlation Pair objects to list. required
20
- # list_correlation_pairs_paginated(strSessionID:, from:, howMany:)
27
+ #
28
+ # `list_correlation_pairs_paginated(strSessionID:, from:, howMany:)`
21
29
  def self.list_correlation_pairs_paginated(strSessionID:, from:, howMany:)
22
30
  args = build_arguments(binding)
23
31
 
24
32
  exec_http_request('get', '/memori/v2/CorrelationPairs/{strSessionID}/{from}/{howMany}', **args)
25
33
  end
26
34
 
27
- # POST /memori/v2/CorrelationPair/{strSessionID}
35
+ # `POST /memori/v2/CorrelationPair/{strSessionID}`
36
+ #
28
37
  # Adds a new Correlation Pair object.
29
- # Params list:
38
+ #
39
+ #
30
40
  # @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: {})
41
+ #
42
+ # @param [Hash] payload request payload. optional
43
+ #
44
+ # @param [String] payload.pairID . optional
45
+ #
46
+ # @param [String] payload.text1 . optional
47
+ #
48
+ # @param [String] payload.text2 . optional
49
+ #
50
+ # @param [Boolean] payload.correlated . optional
51
+ #
52
+ # @param [Integer] payload.occurrences . optional
53
+ #
54
+ # @param [String] payload.creationTimestamp . optional
55
+ #
56
+ # @param [String] payload.creationSessionID . optional
57
+ #
58
+ # @param [String] payload.lastChangeTimestamp . optional
59
+ #
60
+ # @param [String] payload.lastChangeSessionID . optional
61
+ #
62
+ # `add_correlation_pair(strSessionID:, payload: {})`
42
63
  def self.add_correlation_pair(strSessionID:, payload: {})
43
64
  args = build_arguments(binding)
44
65
  payload_keys = [
@@ -58,12 +79,16 @@ class MemoriClient::Engine::V2::CorrelationPair < MemoriClient::Engine::Resource
58
79
  exec_http_request('post', '/memori/v2/CorrelationPair/{strSessionID}', **args)
59
80
  end
60
81
 
61
- # DELETE /memori/v2/CorrelationPair/{strSessionID}/{strPairID}
82
+ # `DELETE /memori/v2/CorrelationPair/{strSessionID}/{strPairID}`
83
+ #
62
84
  # Removes an existing Correlation Pair object.
63
- # Params list:
85
+ #
86
+ #
64
87
  # @param [string] strSessionID The session ID. required
88
+ #
65
89
  # @param [string] strPairID The Correlation Pair object ID. required
66
- # remove_correlation_pair(strSessionID:, strPairID:)
90
+ #
91
+ # `remove_correlation_pair(strSessionID:, strPairID:)`
67
92
  def self.remove_correlation_pair(strSessionID:, strPairID:)
68
93
  args = build_arguments(binding)
69
94