basecradle 0.2.0 → 0.3.0
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 +20 -0
- data/README.md +4 -1
- data/lib/basecradle/timeline.rb +14 -0
- data/lib/basecradle/version.rb +1 -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: 3bf816afd2fd6daa64bd896c2d747fc858027ac4bc97e6561791f7125b49048c
|
|
4
|
+
data.tar.gz: c7639714261d5da32630add601b6490b1131c4f53d2e991f50f0313bef40f685
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 227e12fcbce92a086604c9a870e92e618f6f33753ddb97617a7309fa7c933b266196a759b4984a371f25b3d356af9c4af7bdd9f3d6a2e924fff12bc2b734634c
|
|
7
|
+
data.tar.gz: 64e27b82d97a01de50d116234ad23c3ac9b5253609e790448e401c9501d5b3325b2414ec5fce1b2452c4b52b568d45875cfc473b375193dae95d288a2c811cd2
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-06-13
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`timeline.delete`** — permanently delete a timeline you own (an admin may delete any
|
|
12
|
+
timeline), mapping to `DELETE /timelines/{uuid}`. It cascades to all of the timeline's
|
|
13
|
+
contents (messages, assets, tasks, webhook endpoints and their events, participations),
|
|
14
|
+
works even on a **locked** timeline (locking freezes content, not governance), and
|
|
15
|
+
returns `nil` (`204 No Content`). A participant who is not the owner raises
|
|
16
|
+
`BaseCradle::NotTimelineOwnerError` (`403`); an unknown uuid raises `NotFoundError`
|
|
17
|
+
(`404`). Mirrors the platform's new capability
|
|
18
|
+
([core PR #315](https://github.com/basecradle/basecradle/pull/315)), shipped in lockstep
|
|
19
|
+
with the Python SDK. ([#73](https://github.com/basecradle/basecradle-ruby/issues/73))
|
|
20
|
+
- The platform's new terminal **`timeline.deleted`** firehose event — fired to everyone
|
|
21
|
+
who was a viewer at deletion, with a `resource` pointer that then `404`s — is documented
|
|
22
|
+
alongside `timeline.delete`. The SDK exposes no firehose event-name enum to extend, so
|
|
23
|
+
there is no new type or constant; the semantics are captured in the docs.
|
|
24
|
+
|
|
7
25
|
## [0.2.0] - 2026-06-10
|
|
8
26
|
|
|
9
27
|
### Added
|
|
@@ -61,5 +79,7 @@ the Python SDK's behavior in idiomatic Ruby. Zero runtime dependencies.
|
|
|
61
79
|
- **Quality bars** — a README-as-tested-doc harness (every example runs against a mocked
|
|
62
80
|
API) and a spec drift-guard (CI fails if the live API grows beyond the SDK).
|
|
63
81
|
|
|
82
|
+
[0.3.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.3.0
|
|
83
|
+
[0.2.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.2.0
|
|
64
84
|
[0.1.1]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.1.1
|
|
65
85
|
[0.1.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.1.0
|
data/README.md
CHANGED
|
@@ -80,9 +80,12 @@ end
|
|
|
80
80
|
|
|
81
81
|
timeline = bc.timelines.create(name: "Incident response")
|
|
82
82
|
timeline.add_participant("019e7750-66ee-79c8-ad8a-bbb6ea7c2bcc") # a User or a uuid
|
|
83
|
-
timeline.lock
|
|
83
|
+
timeline.lock # the emergency stop: one-way, any viewer can pull it
|
|
84
|
+
timeline.delete # owner-only, permanent: removes the timeline and all its contents
|
|
84
85
|
```
|
|
85
86
|
|
|
87
|
+
`delete` is owner-only (an admin may delete any timeline; a participant gets `BaseCradle::NotTimelineOwnerError`, a `ForbiddenError`), permanent, and cascades to every message, asset, task, and webhook on the timeline. A locked timeline is still deletable. Viewers receive a terminal `timeline.deleted` firehose event whose resource pointer then 404s.
|
|
88
|
+
|
|
86
89
|
## Messages, assets, tasks
|
|
87
90
|
|
|
88
91
|
The content peers exchange. Create on a timeline; read across all of them.
|
data/lib/basecradle/timeline.rb
CHANGED
|
@@ -39,6 +39,20 @@ module BaseCradle
|
|
|
39
39
|
self
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
# Permanently delete this timeline and everything on it — messages, assets, tasks,
|
|
43
|
+
# webhook endpoints and their events, participations. Owner-only (an admin may delete
|
|
44
|
+
# any timeline); a mere participant gets NotTimelineOwnerError (a ForbiddenError,
|
|
45
|
+
# code +not_timeline_owner+).
|
|
46
|
+
#
|
|
47
|
+
# A locked timeline is still deletable: locking freezes content, not governance.
|
|
48
|
+
# Returns nil — the timeline is gone, so there is nothing left to return. A subsequent
|
|
49
|
+
# fetch of this uuid raises NotFoundError, and viewers receive a terminal
|
|
50
|
+
# +timeline.deleted+ firehose event whose resource pointer now 404s.
|
|
51
|
+
def delete
|
|
52
|
+
require_client.request("DELETE", "/timelines/#{uuid}")
|
|
53
|
+
nil
|
|
54
|
+
end
|
|
55
|
+
|
|
42
56
|
# Add a peer to this timeline (owner or admin only; mutual trust required). Accepts a
|
|
43
57
|
# User or a uuid. Idempotent. Returns the added user (also appended to +participants+).
|
|
44
58
|
def add_participant(user)
|
data/lib/basecradle/version.rb
CHANGED