seatlayer 0.4.0 → 0.6.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 +13 -1
- data/README.md +1 -1
- data/lib/seatlayer/performance_groups.rb +105 -0
- data/lib/seatlayer/resources.rb +15 -0
- data/lib/seatlayer/version.rb +1 -1
- data/lib/seatlayer.rb +4 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0ac6e36b23b34e28d914944c5a15cf08dabb40f9b31466740b4b04b99cec1c6
|
|
4
|
+
data.tar.gz: cabf4e47e42d39f2fe9f9ef0d001ff8043428702982f41d4c20f04f70cd333f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eef04285447d411a1ab752e670136491716bc27284cbb5a825670ff9eca7d292de3ed473b842ce4c4a7af3925dd278353cb48683dd9029d371c03b11c76f30b0
|
|
7
|
+
data.tar.gz: f86eacb6d08d744362d0d84cc802720a4c5a04b9134b70950a1051cf4f4d1b3266744b356374895340b1c782a7fcc32e5b49a45e59e845a70bf84d0159cc6148
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.6.0 — 2026-08-23
|
|
4
|
+
|
|
5
|
+
- Added exact immutable Event configuration binding reads and compare-and-set
|
|
6
|
+
attach/detach through `events.retrieve_configuration_binding` and
|
|
7
|
+
`events.update_configuration_binding`. Updates remain deliberately single-attempt.
|
|
8
|
+
|
|
9
|
+
## 0.5.0 — 2026-08-21
|
|
10
|
+
|
|
11
|
+
- Added `performance_groups`, the trusted server resource for fixed two-to-eight
|
|
12
|
+
performance runs. It creates and activates groups, mints one-time browser
|
|
13
|
+
access, retrieves authoritative group holds, and confirms bookings with
|
|
14
|
+
stable action and order references. Browser-only group routes remain outside
|
|
15
|
+
this secret-key SDK.
|
|
4
16
|
|
|
5
17
|
- Added `templates.instantiate_template` and the ticket-release lifecycle on
|
|
6
18
|
`events` (`list_ticket_releases`, `update_ticket_releases`, and
|
data/README.md
CHANGED
|
@@ -291,7 +291,7 @@ client.request("POST", "/v1/events/ev_1/some-new-route", body: { "qty" => 2 })
|
|
|
291
291
|
| --- | --- |
|
|
292
292
|
| `charts` | `list` `list_all` `create` `retrieve` `update` `delete` `copy` `archive` `unarchive` `publish` |
|
|
293
293
|
| `templates` | `instantiate_template` |
|
|
294
|
-
| `events` | `list` `list_all` `create` `retrieve` `update` `delete` `update_poster` `delete_poster` `update_chart` `close` `reopen` `archive` `retrieve_hold_ttl` `update_hold_ttl` `list_ticket_releases` `update_ticket_releases` `close_ticket_release` `retrieve_report` `retrieve_log` |
|
|
294
|
+
| `events` | `list` `list_all` `create` `retrieve` `retrieve_configuration_binding` `update_configuration_binding` `update` `delete` `update_poster` `delete_poster` `update_chart` `close` `reopen` `archive` `retrieve_hold_ttl` `update_hold_ttl` `list_ticket_releases` `update_ticket_releases` `close_ticket_release` `retrieve_report` `retrieve_log` |
|
|
295
295
|
| `inventory` | `hold` `hold_best_available` `book_best_available` `extend_hold` `retrieve_hold` `release` `book` `box_office_book` `unbook` `list_bookings` `retrieve_booking` `block` `unblock` `unblock_all` `retrieve_availability` `update_availability` |
|
|
296
296
|
| `channels` | `list_channels` `create_channel` `update_channel` `update_assignments` `list_allocation` `retrieve_access_preview` `retrieve_report` `pause` `unpause` `archive` `create_buyer_access_session` `list_buyer_access_sessions` `revoke_buyer_access_session` `create_access_link` `list_access_links` `rotate_access_link` `revoke_access_link` |
|
|
297
297
|
| `sessions` | `create_manage_session` `revoke_manage_session` `create_designer_session` `revoke_designer_session` |
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SeatLayer
|
|
4
|
+
# Fixed multi-performance runs. This is a secret-key surface: mint the
|
|
5
|
+
# browser token here, then give that token (never this client) to the
|
|
6
|
+
# PerformanceGroupPicker in the browser SDK.
|
|
7
|
+
class PerformanceGroups < Resource
|
|
8
|
+
# One page of fixed runs.
|
|
9
|
+
def list(workspace_id: nil, external_ref: nil, state: nil, limit: nil, cursor: nil)
|
|
10
|
+
@client.get("/v1/performance-groups", compact({ "workspaceId" => workspace_id,
|
|
11
|
+
"externalRef" => external_ref,
|
|
12
|
+
"state" => state, "limit" => limit,
|
|
13
|
+
"cursor" => cursor }))
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Create a draft from two to eight compatible assigned-seat events. The
|
|
17
|
+
# server validates compatibility and exactly replays a request with the
|
|
18
|
+
# same idempotency key.
|
|
19
|
+
def create(name:, event_keys:, external_ref: UNSET, idempotency_key: nil)
|
|
20
|
+
body = { "name" => name, "eventKeys" => event_keys }
|
|
21
|
+
body.merge!(supplied({ "externalRef" => external_ref }))
|
|
22
|
+
@client.post("/v1/performance-groups", body, idempotency_key: idempotency_key,
|
|
23
|
+
retry_policy: :header_replay)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def retrieve(performance_group_key)
|
|
27
|
+
@client.get(path(performance_group_key))
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Only a draft can be deleted. Activated runs retain their audit identity.
|
|
31
|
+
def delete(performance_group_key)
|
|
32
|
+
@client.delete(path(performance_group_key))
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Starts lifecycle coordination. When its response contains a non-terminal
|
|
36
|
+
# lifecycle operation, poll +retrieve_lifecycle+ until it completes.
|
|
37
|
+
def activate(performance_group_key, expected_revision:)
|
|
38
|
+
@client.post(path(performance_group_key, "/activate"),
|
|
39
|
+
{ "expectedRevision" => expected_revision })
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Stops new group sales. Poll +retrieve_lifecycle+ while the close remains pending.
|
|
43
|
+
def close(performance_group_key, expected_revision:)
|
|
44
|
+
@client.post(path(performance_group_key, "/close"),
|
|
45
|
+
{ "expectedRevision" => expected_revision })
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def retrieve_lifecycle(performance_group_key, operation_id)
|
|
49
|
+
@client.get(path(performance_group_key, "/lifecycle/#{encode(operation_id)}"))
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Reveals a one-time, origin-bound browser bearer. It intentionally remains
|
|
53
|
+
# single-attempt: a retry could create a token whose only reveal is lost.
|
|
54
|
+
def create_buyer_access_session(performance_group_key, allowed_origin:, include_public:,
|
|
55
|
+
channel_ids_by_event: nil, expires_in_seconds: nil,
|
|
56
|
+
max_quantity: UNSET, buyer_ref: UNSET, partner_ref: UNSET)
|
|
57
|
+
body = compact({ "allowedOrigin" => allowed_origin, "includePublic" => include_public,
|
|
58
|
+
"channelIdsByEvent" => channel_ids_by_event,
|
|
59
|
+
"expiresInSeconds" => expires_in_seconds })
|
|
60
|
+
body.merge!(supplied({ "maxQuantity" => max_quantity, "buyerRef" => buyer_ref,
|
|
61
|
+
"partnerRef" => partner_ref }))
|
|
62
|
+
@client.post(path(performance_group_key, "/buyer-access-sessions"), body)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Token records only: the bearer value is never returned again.
|
|
66
|
+
def list_buyer_access_sessions(performance_group_key, limit: nil)
|
|
67
|
+
@client.get(path(performance_group_key, "/buyer-access-sessions"), { "limit" => limit })
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def revoke_buyer_access_session(performance_group_key, session_id)
|
|
71
|
+
@client.delete(path(performance_group_key, "/buyer-access-sessions/#{encode(session_id)}"))
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Read the trusted server projection before charging; do not price from
|
|
75
|
+
# client input or the picker state.
|
|
76
|
+
def retrieve_hold(performance_group_key, operation_id)
|
|
77
|
+
@client.get(path(performance_group_key, "/holds/#{encode(operation_id)}"))
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Confirm external payment for a committed hold. Keep both identifiers
|
|
81
|
+
# stable, and poll +retrieve_booking+ if the response is +book_pending+.
|
|
82
|
+
def book_hold(performance_group_key, operation_id, book_action_id:, booking_ref:)
|
|
83
|
+
@client.post(path(performance_group_key, "/holds/#{encode(operation_id)}/book"),
|
|
84
|
+
{ "bookActionId" => book_action_id,
|
|
85
|
+
"bookingRef" => normalise_booking_ref(booking_ref) })
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def retrieve_booking(performance_group_key, action_id)
|
|
89
|
+
@client.get(path(performance_group_key, "/bookings/#{encode(action_id)}"))
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
private
|
|
93
|
+
|
|
94
|
+
def path(performance_group_key, suffix = "")
|
|
95
|
+
"/v1/performance-groups/#{encode(performance_group_key)}#{suffix}"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def normalise_booking_ref(booking_ref)
|
|
99
|
+
value = booking_ref&.strip
|
|
100
|
+
return value unless value.nil? || value.empty?
|
|
101
|
+
|
|
102
|
+
raise ArgumentError, "booking_ref is required and must be a non-empty stable reference"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
data/lib/seatlayer/resources.rb
CHANGED
|
@@ -196,6 +196,21 @@ module SeatLayer
|
|
|
196
196
|
@client.get("/v1/events/#{encode(event_key)}")
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
# Read the Event's exact immutable configuration selection and audit trail.
|
|
200
|
+
def retrieve_configuration_binding(event_key)
|
|
201
|
+
@client.get("/v1/events/#{encode(event_key)}/event-configuration")
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Attach an exact published configuration version, or pass +nil+ to detach.
|
|
205
|
+
# The expected revision prevents one administrator from silently overwriting
|
|
206
|
+
# another, and the mutation remains deliberately single-attempt.
|
|
207
|
+
def update_configuration_binding(event_key, expected_revision:, configuration:)
|
|
208
|
+
@client.put(
|
|
209
|
+
"/v1/events/#{encode(event_key)}/event-configuration",
|
|
210
|
+
{ "expectedRevision" => expected_revision, "configuration" => configuration }
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
|
|
199
214
|
def update(event_key, fields)
|
|
200
215
|
@client.patch("/v1/events/#{encode(event_key)}", fields)
|
|
201
216
|
end
|
data/lib/seatlayer/version.rb
CHANGED
data/lib/seatlayer.rb
CHANGED
|
@@ -6,6 +6,7 @@ require_relative "seatlayer/http_client"
|
|
|
6
6
|
require_relative "seatlayer/resources"
|
|
7
7
|
require_relative "seatlayer/inventory"
|
|
8
8
|
require_relative "seatlayer/channels"
|
|
9
|
+
require_relative "seatlayer/performance_groups"
|
|
9
10
|
require_relative "seatlayer/webhook"
|
|
10
11
|
|
|
11
12
|
# Official Ruby server SDK for the SeatLayer reserved-seating API.
|
|
@@ -19,7 +20,8 @@ require_relative "seatlayer/webhook"
|
|
|
19
20
|
module SeatLayer
|
|
20
21
|
# The SeatLayer client.
|
|
21
22
|
class Client
|
|
22
|
-
attr_reader :charts, :events, :inventory, :channels, :
|
|
23
|
+
attr_reader :charts, :events, :inventory, :channels, :performance_groups, :sessions,
|
|
24
|
+
:webhooks, :workspaces, :templates
|
|
23
25
|
|
|
24
26
|
def initialize(secret_key, base_url: HTTPClient::DEFAULT_BASE_URL,
|
|
25
27
|
max_retries: HTTPClient::DEFAULT_MAX_RETRIES,
|
|
@@ -31,6 +33,7 @@ module SeatLayer
|
|
|
31
33
|
@events = Events.new(@http)
|
|
32
34
|
@inventory = Inventory.new(@http)
|
|
33
35
|
@channels = Channels.new(@http)
|
|
36
|
+
@performance_groups = PerformanceGroups.new(@http)
|
|
34
37
|
@sessions = Sessions.new(@http)
|
|
35
38
|
@templates = Templates.new(@http)
|
|
36
39
|
@webhooks = Webhooks.new(@http)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: seatlayer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SeatLayer
|
|
@@ -25,6 +25,7 @@ files:
|
|
|
25
25
|
- lib/seatlayer/errors.rb
|
|
26
26
|
- lib/seatlayer/http_client.rb
|
|
27
27
|
- lib/seatlayer/inventory.rb
|
|
28
|
+
- lib/seatlayer/performance_groups.rb
|
|
28
29
|
- lib/seatlayer/resources.rb
|
|
29
30
|
- lib/seatlayer/version.rb
|
|
30
31
|
- lib/seatlayer/webhook.rb
|