pinecall 0.0.2 → 0.0.3
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/CHANGELOG.md +7 -0
- data/lib/pinecall/client/call.rb +3 -1
- data/lib/pinecall/testing.rb +7 -3
- data/lib/pinecall/version.rb +1 -1
- data/lib/pinecall/wire/shapes_call_events.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04f9fe8b027ddfb4111005c3f5786ecad1960112ba98acf22ee35a0e290bc0d5
|
|
4
|
+
data.tar.gz: 18d4266d58e43fdc882f3543cf03b91c4b8993ec6f1e8a49289cc9cc7cd88123
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3aecdcec9052a35ed955dfcf49e54bbdf599b42d6fd7774ccb9680174ca266cdf804c58db3724957c0cba9b8a1960420925f96ebd9a055750cfb29e72116540b
|
|
7
|
+
data.tar.gz: bb117dcb1db5aabd7814ce055c9aadc67acc7e6fe954d62f5b299b8272ff47d9e0bcbf86ee59612801f7f171c17593373c484f3572713bfa1d32ca0a41f3e47a
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ version number is the human's call.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.0.3] — A call runs on the day a golden pinned (2026-10-09)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`call.today` is the day `call.started` names when a golden pinned one** (`today`), so an agent
|
|
13
|
+
resolves "on Monday" against the golden's day, as the model does; the day the call opened
|
|
14
|
+
otherwise, as before. Needs runtime 0.1.10. `Pinecall::Testing`'s `call_started` takes `today:`.
|
|
15
|
+
|
|
9
16
|
## [0.0.2] — A refused registration is a sentence (2026-10-09)
|
|
10
17
|
|
|
11
18
|
### Fixed
|
data/lib/pinecall/client/call.rb
CHANGED
|
@@ -97,13 +97,15 @@ module Pinecall
|
|
|
97
97
|
line = data[:started]
|
|
98
98
|
started(line)
|
|
99
99
|
@state = data[:state].dup
|
|
100
|
-
@today = Time.at(line[:started_at]).strftime("%Y-%m-%d")
|
|
100
|
+
@today = line[:today] || Time.at(line[:started_at]).strftime("%Y-%m-%d")
|
|
101
101
|
@claimed = data[:claimed]
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def started(line)
|
|
105
105
|
the_line(line, "active")
|
|
106
106
|
@medium = line[:medium]
|
|
107
|
+
# A run's call says its day, which a golden may have pinned; a person's runs on the clock's.
|
|
108
|
+
@today = line[:today] if line[:today]
|
|
107
109
|
end
|
|
108
110
|
|
|
109
111
|
def the_line(line, status)
|
data/lib/pinecall/testing.rb
CHANGED
|
@@ -127,11 +127,15 @@ module Pinecall
|
|
|
127
127
|
# Unhandled errors, for assertions.
|
|
128
128
|
attr_reader :errors
|
|
129
129
|
|
|
130
|
-
# Start a call and return its `Fake` handle; `state:` is the state its opener asked for
|
|
131
|
-
|
|
130
|
+
# Start a call and return its `Fake` handle; `state:` is the state its opener asked for,
|
|
131
|
+
# `today:` the day a golden pinned (YYYY-MM-DD).
|
|
132
|
+
def call_started(id: nil, channel: "web", from: "+34600000000", to: "+34910000000", caller: nil, state: nil,
|
|
133
|
+
today: nil)
|
|
132
134
|
id ||= "CA_#{next_seq}"
|
|
133
135
|
started = { channel:, direction: "inbound", from:, to:, caller:, started_at: Time.now.to_f }
|
|
134
|
-
|
|
136
|
+
started = started.merge(state:) unless state.nil?
|
|
137
|
+
started = started.merge(today:) unless today.nil?
|
|
138
|
+
deliver("call.started", started, call: id)
|
|
135
139
|
settle
|
|
136
140
|
Fake.new(self, id)
|
|
137
141
|
end
|
data/lib/pinecall/version.rb
CHANGED
|
@@ -98,7 +98,8 @@ module Pinecall
|
|
|
98
98
|
env: { kind: :ref, ref: "Env" },
|
|
99
99
|
worker: { kind: :str, null: true },
|
|
100
100
|
medium: { kind: :ref, ref: "Medium", null: true },
|
|
101
|
-
state: { kind: :json }
|
|
101
|
+
state: { kind: :json },
|
|
102
|
+
today: { kind: :str, null: true }
|
|
102
103
|
}.freeze,
|
|
103
104
|
"CallSummary" => {
|
|
104
105
|
reason: { kind: :ref, ref: "EndReason", required: true },
|