Commit 935080d
feat(cues): add send_at + exit_criteria + idempotency_key to fire()
Extends the existing CuesResource.fire() method with three kwargs
covering recently-shipped server features:
- send_at (str | datetime, cueapi #618)
Per-fire scheduling — delay this fire to a specific timestamp
instead of executing immediately.
- exit_criteria (dict, cueapi #632)
Per-fire termination conditions. Dict shape mirrors the API
contract; SDK passes through verbatim.
- idempotency_key (str, cueapi #683)
Optional Idempotency-Key header. Same key + same body within
24h returns the existing execution (HTTP 200) instead of a
fresh fire; same key + different body returns 409
idempotency_key_conflict. Sent as a request header, not a body
field.
datetime is auto-serialized to ISO 8601 via .isoformat().
Backwards compatible — all three kwargs default to None, omitted from
the request body when unset. Existing fire(cue_id) and
fire(cue_id, payload_override=..., merge_strategy=...) calls are
unchanged.
6 new tests in test_cues.py::TestCueFire (no-args, payload-override,
merge_strategy=replace, send_at, idempotency_key replay returns same
exec, return-shape-is-dict-not-Cue). All run against staging via the
existing client + cue fixtures.
Source: drift audit handoff/cueapi-package-drift-2026-05-06; Backlog
rows "Parity port: PR #618 → cueapi-python", "PR #632 → cueapi-python",
implicit on idempotency from #683 (which dropped today; no separate
backlog row yet).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b30d23b commit 935080d
2 files changed
Lines changed: 122 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
234 | 240 | | |
235 | 241 | | |
236 | 242 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
244 | 261 | | |
245 | 262 | | |
246 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
247 | 274 | | |
248 | 275 | | |
249 | 276 | | |
250 | 277 | | |
251 | 278 | | |
252 | 279 | | |
253 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
0 commit comments