aws-lex-conversation 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8722262608a479a7c20069ac72e1e15c70e417fe92ffcbc4eaaab6b54defc792
4
- data.tar.gz: ee77736e7e9c313a3de59b6c651253d226cfb5c0def75e52f50082489e514cd0
3
+ metadata.gz: 128c0cd7f79f2ba2f9fa8c8a148a06100cd9b4d26f9569cd97f53fee5d33b16e
4
+ data.tar.gz: 3e715ccfbec559fabc2503c49d00fac234df8668edeab39f2c561ad379909da5
5
5
  SHA512:
6
- metadata.gz: c0c8edafbb942dd0e692908db397887c5fea54e2fef7be71369ed72be2debd62054cb4c31593f0d38598d895758c9bd5b0ce678f3e3ec05ec807354a230b51a6
7
- data.tar.gz: 360558203dbc323968b841e8caf1f37cd3ee14afa43f308fa254d5edfee471321916527fd7806382614f19386f50c3753f8f7f403866d052c592dcdeccaf34e1
6
+ metadata.gz: 176b75d71df52db5799a95380d6820665511e2e3459e5cdf0d8e30ae4ca0f090086c0bb6609c6124b629fc1ab04d0e3ee1e63fd35da0463186cb7479f165c4e2
7
+ data.tar.gz: 315f366c43a00923b50828360ff00d32fa8f566d2cc2c990670557de2b87d4259f0960d8abddf0baed3a039a7667ec3aa7982e82edf97db5c20443beb9611a2c
@@ -9,8 +9,10 @@ module Aws
9
9
  def close(opts = {})
10
10
  params = {
11
11
  session_state: lex.session_state,
12
- request_attributes: lex.request_attributes
12
+ request_attributes: lex.request_attributes,
13
+ intent: lex.current_intent
13
14
  }.merge(opts)
15
+ lex.session_state.intent = params.fetch(:intent)
14
16
  Response::Close.new(params).to_lex
15
17
  end
16
18
 
@@ -27,16 +29,20 @@ module Aws
27
29
  def delegate(opts = {})
28
30
  params = {
29
31
  session_state: lex.session_state,
30
- request_attributes: lex.request_attributes
32
+ request_attributes: lex.request_attributes,
33
+ intent: lex.current_intent
31
34
  }.merge(opts)
35
+ lex.session_state.intent = params.fetch(:intent)
32
36
  Response::Delegate.new(params).to_lex
33
37
  end
34
38
 
35
39
  def elicit_intent(opts = {})
36
40
  params = {
37
41
  session_state: lex.session_state,
38
- request_attributes: lex.request_attributes
42
+ request_attributes: lex.request_attributes,
43
+ intent: lex.current_intent
39
44
  }.merge(opts)
45
+ lex.session_state.intent = params.fetch(:intent)
40
46
  Response::ElicitIntent.new(params).to_lex
41
47
  end
42
48
 
@@ -20,11 +20,12 @@ module Aws
20
20
  fulfillment_state: FulfillmentState
21
21
  )
22
22
 
23
- # rubocop:disable Metrics/MethodLength
23
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
24
24
  def restore(conversation, opts = {})
25
25
  case dialog_action_type.raw
26
26
  when 'Close'
27
27
  conversation.close(
28
+ intent: intent,
28
29
  fulfillment_state: opts.fetch(:fulfillment_state) { fulfillment_state },
29
30
  messages: opts.fetch(:messages)
30
31
  )
@@ -34,9 +35,12 @@ module Aws
34
35
  messages: opts.fetch(:messages)
35
36
  )
36
37
  when 'Delegate'
37
- conversation.delegate
38
+ conversation.delegate(
39
+ intent: intent
40
+ )
38
41
  when 'ElicitIntent'
39
42
  conversation.elicit_intent(
43
+ intent: intent,
40
44
  messages: opts.fetch(:messages)
41
45
  )
42
46
  when 'ElicitSlot'
@@ -49,7 +53,7 @@ module Aws
49
53
  raise ArgumentError, "invalid DialogActionType: `#{dialog_action_type.raw}`"
50
54
  end
51
55
  end
52
- # rubocop:enable Metrics/MethodLength
56
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
53
57
  end
54
58
  end
55
59
  end
@@ -3,7 +3,7 @@
3
3
  module Aws
4
4
  module Lex
5
5
  class Conversation
6
- VERSION = '5.0.0'
6
+ VERSION = '5.1.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-lex-conversation
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Doyle
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2021-08-30 00:00:00.000000000 Z
15
+ date: 2021-09-02 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: shrink_wrap