poli-page 0.15.0 → 0.17.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d083da77b3893662d0664a84192ee5f4bd429d1ee485cef629c7b2a8c8650f2
4
- data.tar.gz: 7c975d040174300af186acb3a4caaf57a2c896740bcf540b6e890147e5912f13
3
+ metadata.gz: f32f429b7f3b0109756accc6d250b2e87d516f6deab1c7bd22a5159c631c4ad3
4
+ data.tar.gz: 11ba47204013ae53053dd4d80ed47cf75ddf6c4d641ced20129676ebca383ad5
5
5
  SHA512:
6
- metadata.gz: 69ef7293edac8c85c48da1706b826b3f05fb1a5f24d3fe54063a13f720d7377ddc80d9b73c82ab9bc0b3723f41ef02da3719cf11c9dd7a5009b27c8d573763bd
7
- data.tar.gz: d2dc2404e4ce6006517b2759d570cb3509b7653de0e78cdebc9eaa5fb8c7ba7b8d75a671a548679368acf9ed8133de73dac455cad670ce748f20bf946672ba12
6
+ metadata.gz: 71b45810af4eb1560df732f0c4fef6c1d726101cc97ad60298838808ab3641a048cb8b09437e5d626769f1b65a55678edde634b8d4692e5dbd64167dc6c2c58d
7
+ data.tar.gz: a0abb12da20f23f17b7d75d288b33c0f3d27b01cc59bdcac7969f3602784c4b2e77241f017043bea6199d1abaa8007b20bf1675897f06ddb64c1d5baef51227a
data/CHANGELOG.md CHANGED
@@ -10,6 +10,25 @@ Breaking releases (minor bumps while on 0.x) are summarized in
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.17.0] - 2026-12-01
14
+
15
+ Conformance with the Poli Page API contract v0.17.0
16
+
17
+ ### Added
18
+
19
+ - `PoliPage::ErrorCodes::API_KEY_EXPIRED` (401): the key's expiry has passed.
20
+ Create a new key in the dashboard and update `POLI_PAGE_API_KEY`. Raised as
21
+ `AuthenticationError`, never retried.
22
+ - `PoliPage::ErrorCodes::PROJECT_OUT_OF_SCOPE` (403): the key is restricted to
23
+ other projects than the one rendered. Raised as `PermissionDeniedError`,
24
+ never retried. Distinct from the playground's `400 PROJECT_NOT_ALLOWED`.
25
+
26
+ ### Changed
27
+
28
+ - CI pins the API contract `v0.17.0`. `INVALID_API_KEY` also covers a revoked
29
+ key, a deleted environment and a disabled or deleted service account, and a
30
+ document outside a restricted key's projects answers `404 DOCUMENT_NOT_FOUND`.
31
+
13
32
  ## [0.15.0] - 2026-11-17
14
33
 
15
34
  Conformance with the Poli Page API contract v0.15.0
data/README.md CHANGED
@@ -295,7 +295,9 @@ rescue PoliPage::Error => e
295
295
  when "ORGANIZATION_PAYMENT_GRACE" then show_banner("Subscription has unpaid invoices.")
296
296
  when "ORGANIZATION_CANCELLED" then show_banner("Subscription cancelled — service is read-only.")
297
297
  when "ORGANIZATION_PURGED" then show_banner("Organization has been purged.")
298
- when "DOCUMENT_NOT_FOUND" then render_404
298
+ when "API_KEY_EXPIRED" then alert_ops("Key expired: create a new key in the dashboard and update POLI_PAGE_API_KEY.")
299
+ when "PROJECT_OUT_OF_SCOPE" then alert_ops("The key is restricted to other projects: use a key that includes this project.")
300
+ when "DOCUMENT_NOT_FOUND" then render_404 # also a stored document outside a restricted key's projects
299
301
  when "DOCUMENT_GONE" then render_410 # deleted, or a sandbox document past 30 days
300
302
  else
301
303
  raise
@@ -211,9 +211,11 @@ module PoliPage
211
211
  module ErrorCodes
212
212
  MISSING_API_KEY = "MISSING_API_KEY" # 401
213
213
  INVALID_API_KEY = "INVALID_API_KEY" # 401
214
+ API_KEY_EXPIRED = "API_KEY_EXPIRED" # 401
214
215
  ORGANIZATION_PAYMENT_GRACE = "ORGANIZATION_PAYMENT_GRACE" # 403
215
216
  ORGANIZATION_CANCELLED = "ORGANIZATION_CANCELLED" # 403
216
217
  FORBIDDEN = "FORBIDDEN" # 403
218
+ PROJECT_OUT_OF_SCOPE = "PROJECT_OUT_OF_SCOPE" # 403
217
219
  ENVIRONMENT_PROTECTED = "ENVIRONMENT_PROTECTED" # 403
218
220
  THUMBNAILS_NOT_AVAILABLE = "THUMBNAILS_NOT_AVAILABLE" # 403
219
221
  VALIDATION_ERROR = "VALIDATION_ERROR" # 400
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PoliPage
4
- VERSION = "0.15.0"
4
+ VERSION = "0.17.0"
5
5
  end
@@ -72,9 +72,11 @@ module PoliPage
72
72
  module ErrorCodes
73
73
  MISSING_API_KEY: String
74
74
  INVALID_API_KEY: String
75
+ API_KEY_EXPIRED: String
75
76
  ORGANIZATION_PAYMENT_GRACE: String
76
77
  ORGANIZATION_CANCELLED: String
77
78
  FORBIDDEN: String
79
+ PROJECT_OUT_OF_SCOPE: String
78
80
  ENVIRONMENT_PROTECTED: String
79
81
  THUMBNAILS_NOT_AVAILABLE: String
80
82
  VALIDATION_ERROR: String
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poli-page
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Poli Page