contentful-management 3.10.1 → 3.11.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e11d5eba1080e56f80928b6e0b5eef8425b72c976fa814c78eef67b80eeb92c0
|
4
|
+
data.tar.gz: f7991340fd7452cd04503d8c036b36800629809e532a85dae6575efde55fafa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6030d1c3af5683ccbd8596c4643c9ed32ff2776c4c409b1bf7c53000e9fed7a841695a458471a40752ba4b7abaa76f3162c3a7e9759cf2673d1f0f399682da01
|
7
|
+
data.tar.gz: 37c6ebbebb2502d64ea3e70f98036e5d81bff2503da5c6b7c41bfe92e37812b178e9fbb8d758ed80a0d6f76c022744f5038b0fbb5d870c3584bfe84a3e3c208b
|
data/CHANGELOG.md
CHANGED
@@ -52,9 +52,14 @@ module Contentful
|
|
52
52
|
def self.build_endpoint(endpoint_options)
|
53
53
|
space_id = endpoint_options.fetch(:space_id)
|
54
54
|
environment_id = endpoint_options.fetch(:environment_id)
|
55
|
-
|
55
|
+
base_path = "spaces/#{space_id}/environments/#{environment_id}"
|
56
56
|
|
57
|
-
|
57
|
+
if endpoint_options.key?(:content_type_id)
|
58
|
+
content_type_id = endpoint_options.fetch(:content_type_id)
|
59
|
+
"#{base_path}/content_types/#{content_type_id}/editor_interface"
|
60
|
+
else
|
61
|
+
"#{base_path}/editor_interfaces"
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
# Updates an Editor Interface
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/oe3b689om6k5/environments/master/editor_interfaces
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
X-Contentful-User-Agent:
|
11
|
+
- sdk contentful-management.rb/3.10.0; platform ruby/3.4.3; os macOS/24;
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Connection:
|
17
|
+
- close
|
18
|
+
Host:
|
19
|
+
- api.contentful.com
|
20
|
+
User-Agent:
|
21
|
+
- http.rb/5.0.1
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
Content-Length:
|
30
|
+
- '5583'
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.contentful.management.v1+json
|
33
|
+
X-Contentful-Ratelimit-Hour-Remaining:
|
34
|
+
- '35999'
|
35
|
+
X-Contentful-Ratelimit-Second-Remaining:
|
36
|
+
- '9'
|
37
|
+
X-Contentful-Ratelimit-Hour-Limit:
|
38
|
+
- '36000'
|
39
|
+
X-Contentful-Ratelimit-Second-Limit:
|
40
|
+
- '10'
|
41
|
+
X-Contentful-Ratelimit-Reset:
|
42
|
+
- '0'
|
43
|
+
Cf-Space-Id:
|
44
|
+
- oe3b689om6k5
|
45
|
+
Cf-Environment-Id:
|
46
|
+
- master
|
47
|
+
Cf-Environment-Uuid:
|
48
|
+
- master
|
49
|
+
X-Contentful-Route:
|
50
|
+
- "/spaces/:space/environments/:environment/editor_interfaces"
|
51
|
+
Etag:
|
52
|
+
- '"1358933671436039259"'
|
53
|
+
Strict-Transport-Security:
|
54
|
+
- max-age=15768000
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
Server:
|
58
|
+
- Contentful
|
59
|
+
Contentful-Api:
|
60
|
+
- cma
|
61
|
+
Contentful-Upstream:
|
62
|
+
- content-api
|
63
|
+
Access-Control-Allow-Origin:
|
64
|
+
- "*"
|
65
|
+
Access-Control-Allow-Headers:
|
66
|
+
- Accept,Accept-Language,Authorization,Cache-Control,CF-Context,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-Tag-Visibility,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace,X-Contentful-Comment-Body-Format,X-Contentful-Parent-Entity-Reference,X-Contentful-Include-Invocation-Metadata,X-Contentful-Async-Ai-Action
|
67
|
+
Access-Control-Expose-Headers:
|
68
|
+
- Etag,x-contentful-request-id,x-contentful-ai-actions-ratelimit-reset
|
69
|
+
Access-Control-Allow-Methods:
|
70
|
+
- DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
|
71
|
+
Access-Control-Max-Age:
|
72
|
+
- '1728000'
|
73
|
+
Accept-Ranges:
|
74
|
+
- bytes
|
75
|
+
Date:
|
76
|
+
- Fri, 20 Jun 2025 12:56:28 GMT
|
77
|
+
X-Contentful-Request-Id:
|
78
|
+
- fc76cc7a-be78-4e41-9ac2-604f55ad634f
|
79
|
+
body:
|
80
|
+
encoding: ASCII-8BIT
|
81
|
+
string: '{"sys":{"type":"Array"},"total":8,"items":[{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":2,"createdAt":"2025-02-12T10:25:48.347Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2025-02-12T10:25:49.441Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"aaa","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"title","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"bar","widgetId":"richTextEditor","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":2,"createdAt":"2024-05-24T17:30:14.460Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2024-05-24T17:30:15.365Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"author","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"name","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"avatar","widgetId":"assetLinkEditor","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":4,"createdAt":"2025-03-21T05:51:01.897Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2025-03-21T06:40:13.391Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"blogPost","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"title","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"body","widgetId":"singleLine","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":2,"createdAt":"2024-05-04T08:09:45.250Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2024-05-04T08:09:46.204Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"category","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"title","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"photo","widgetId":"assetLinkEditor","widgetNamespace":"builtin"},{"fieldId":"subCategory","widgetId":"entryLinkEditor","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":2,"createdAt":"2022-12-25T18:51:16.158Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2022-12-25T18:51:16.936Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"crossSpace","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"title","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"singleSpace","widgetId":"resourceLinkEditor","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":4,"createdAt":"2024-07-25T21:05:25.045Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2024-07-25T21:05:51.516Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"footer","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"id","widgetId":"numberEditor","widgetNamespace":"builtin"},{"fieldId":"dag","widgetId":"singleLine","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":2,"createdAt":"2024-07-25T21:13:26.095Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2024-07-25T21:13:26.814Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"oneWithDefaultValue","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"title","widgetId":"singleLine","widgetNamespace":"builtin"}]},{"sys":{"type":"EditorInterface","space":{"sys":{"id":"oe3b689om6k5","type":"Link","linkType":"Space"}},"version":8,"createdAt":"2024-05-24T17:26:07.699Z","createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedAt":"2024-05-24T17:29:32.411Z","updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"contentType":{"sys":{"id":"post","type":"Link","linkType":"ContentType"}},"environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}}},"controls":[{"fieldId":"fTitle","widgetId":"singleLine","widgetNamespace":"builtin"},{"fieldId":"same","widgetId":"entryLinkEditor","widgetNamespace":"builtin"},{"fieldId":"different","widgetId":"resourceLinkEditor","widgetNamespace":"builtin"}]}]}
|
82
|
+
|
83
|
+
'
|
84
|
+
recorded_at: Fri, 20 Jun 2025 12:56:28 GMT
|
85
|
+
recorded_with: VCR 6.2.0
|
@@ -25,6 +25,15 @@ module Contentful
|
|
25
25
|
|
26
26
|
subject { client.editor_interfaces(space_id, 'master', content_type_id) }
|
27
27
|
|
28
|
+
describe '.all' do
|
29
|
+
it 'class method also works' do
|
30
|
+
vcr('editor_interfaces/all') { expect(Contentful::Management::EditorInterface.all(client, space_id, 'master')).to be_kind_of Contentful::Management::Array }
|
31
|
+
end
|
32
|
+
it 'builds a Contentful::Management::Entry object' do
|
33
|
+
vcr('editor_interfaces/all') { expect(Contentful::Management::EditorInterface.all(client, space_id, 'master').first).to be_kind_of Contentful::Management::EditorInterface }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
28
37
|
describe '.default' do
|
29
38
|
it 'class method also works' do
|
30
39
|
vcr('editor_interfaces/default_for_space') { expect(Contentful::Management::EditorInterface.default(client, space_id, 'master', content_type_id)).to be_kind_of Contentful::Management::EditorInterface }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Protas
|
@@ -544,6 +544,7 @@ files:
|
|
544
544
|
- spec/fixtures/vcr_cassettes/content_type/validation/size.yml
|
545
545
|
- spec/fixtures/vcr_cassettes/content_type/validation/unique.yml
|
546
546
|
- spec/fixtures/vcr_cassettes/delete_request.yml
|
547
|
+
- spec/fixtures/vcr_cassettes/editor_interfaces/all.yml
|
547
548
|
- spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml
|
548
549
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update.yml
|
549
550
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update_sidebar.yml
|
@@ -978,6 +979,7 @@ test_files:
|
|
978
979
|
- spec/fixtures/vcr_cassettes/content_type/validation/size.yml
|
979
980
|
- spec/fixtures/vcr_cassettes/content_type/validation/unique.yml
|
980
981
|
- spec/fixtures/vcr_cassettes/delete_request.yml
|
982
|
+
- spec/fixtures/vcr_cassettes/editor_interfaces/all.yml
|
981
983
|
- spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml
|
982
984
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update.yml
|
983
985
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update_sidebar.yml
|