pinecall 0.11.48 → 0.11.49

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6e873d8b10a615c2e5d2af74900c534f839d0fd73e7cd11ccb927351382b55b
4
- data.tar.gz: df1f20f55172935a3157dfbd53a47ad20e8239438ab17c46010a57b319895930
3
+ metadata.gz: dde422389671de8ee487daaded827a5e1a254759e97178108642468fef25c749
4
+ data.tar.gz: bf96e3b082ab0db8b16e4760a867f5dcc16ff49a240ff4695d76f7545f51de48
5
5
  SHA512:
6
- metadata.gz: 360dee83b0723d337e897761326b684d150104439416abf5647675ce0aa6d2d30d839309f8a0a78d99144e9107c17fe476a9b2252d03a86b6c45ca92e8764af5
7
- data.tar.gz: 32429f80b5646f49906ae1c6ada19f78f7eb27b23788b4a5af2e8def9cba487b4742034708b8e2e38f92d9b4a22c13149ee93c1d167d875809ad25f709f4093b
6
+ metadata.gz: 5458beb59a9aa409fee120059015cbe42c19401d89e709c03563dd524321f084e4697a1f57d2e283c3abecd3c26927a12806291f22239b85cf53c67a0f1ab6f6
7
+ data.tar.gz: d344d854156f541baca348bb14f8ab54183e583a9f9c7ceb171196d2d23263552e2dbb92dbdfe8d2e7b4e0038273ebf32b98e7c8849d55fdbdf4f6844324d40f
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ Every change a person using this gem would notice. The format is
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version numbers and tags are the
5
5
  maintainer's call.
6
6
 
7
+ ## [0.11.49] — a flow writes to somebody by SMS, and an open written conversation reads as open (2026-11-18)
8
+
9
+ - **`step.text(to, Agent, words)`**: a flow has an agent send a contact one SMS first, from a number it answers SMS
10
+ at (`from:`), and reads what it came to as a `Texted`: `sent`, the `call` it was said on, or what `refused` it.
11
+
7
12
  ## [0.11.48] — an agent writes first by SMS, and a person's message on a thread reaches the contact (2026-11-18)
8
13
 
9
14
  - Released with the runtime: nothing of this package changed.
@@ -13,6 +13,9 @@ module Pinecall
13
13
  # What a call a flow placed came to; `refused` names why nothing rang.
14
14
  Called = Data.define(:answered, :reason, :call, :refused, :message)
15
15
 
16
+ # What a text a flow sent came to; `refused` names why nothing was sent.
17
+ Texted = Data.define(:sent, :call, :from, :refused, :message)
18
+
16
19
  # Where a stretch of a run left it; a failed one says what its function raised.
17
20
  Advanced = Data.define(:status, :error)
18
21
 
@@ -117,6 +120,16 @@ module Pinecall
117
120
  message: said[:message])
118
121
  end
119
122
 
123
+ # Have an agent send a contact one SMS first, from a number it answers SMS at.
124
+ def text(to, agent, words, from: nil)
125
+ slug = @slug_of.call(agent)
126
+ raise DeclarationRefused, "#{@flow.name}: #{agent} is no agent this process serves" if slug.nil?
127
+
128
+ said = waited("text", { agent: slug, to:, text: words, from: }.compact) || {}
129
+ Texted.new(sent: said[:sent] == true, call: said[:call], from: said[:from], refused: said[:refused],
130
+ message: said[:message])
131
+ end
132
+
120
133
  # Wait for an event of the app whose data has what `match` names; nil when it gave up.
121
134
  def wait_for(event, match: nil, within: nil)
122
135
  asked = { event:, match: }.compact
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.11.48"
5
+ VERSION = "0.11.49"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinecall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.48
4
+ version: 0.11.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall