contentful-management 3.9.0 → 3.10.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: c3fb532555b680e1310d4919295c046a81e7cf25143157b846aa2bffaa6e6fc8
4
- data.tar.gz: 7e21aed3e6c01cfd0dec029553753a3eb059975f060831c26163b43361c63a52
3
+ metadata.gz: b1be880d5abec4cfc960c7b8e7cde62db19416f6d1d6db73efe5ac73ecd4578f
4
+ data.tar.gz: d4094d5b52444e0583128a18a387069240398096c30a01280209d9e74594fa9d
5
5
  SHA512:
6
- metadata.gz: a8930ebc2559f4ac7e7664ee04c5edeb12adf679d26d6935037bc0786d0375a1d284a803a3139d98edd6f5eb65949c2ec093c677088756ce1c72df2a8a025d6a
7
- data.tar.gz: 6a8a800dbb58060d2113ba8b3d62804cd26a682e10fad1fdc8e66129108a058a534d056ec3b4e6cc361402e9e724b074d8b562320b789aadfcdac9d168b23135
6
+ metadata.gz: 5fd24cc082d32d9ce80d6233e6639d5759feeee06da98284d865ae31e17bb9749d6fd2cf65da3499711ca543070c2ab02b0802d9fe658b19db42cc2909cafb52
7
+ data.tar.gz: e9417a27dec68db9474b7edfc6f02cd84f71bb02bfec3cd790cc8877d3ab2c8eed59aaab2c39a3dc1dca6f51c475f8e563cd687fe73d2571220879d9dc91be13
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log
2
2
 
3
- ### Unlreleased
3
+ ### Unreleased
4
+
5
+ ## 3.10.0
6
+ * Added defaultValue field property
7
+ * Added delete field property
8
+ * Fixed an issue when updating editor interface with sidebar
4
9
 
5
10
  ## 3.9.0
6
11
  * Update ruby versions in CI/CD
@@ -74,8 +74,8 @@ module Contentful
74
74
  },
75
75
  {
76
76
  'controls' => attributes[:controls] || controls,
77
- 'sidebar' => attributes[:sidebar] || sidebar
78
- },
77
+ 'sidebar' => attributes.fetch(:sidebar, sidebar)
78
+ }.compact,
79
79
  version: sys[:version]
80
80
  )
81
81
  end
@@ -16,7 +16,9 @@ module Contentful
16
16
  property :linkType, :string
17
17
  property :required, :boolean
18
18
  property :disabled, :boolean
19
+ property :deleted, :boolean
19
20
  property :localized, :boolean
21
+ property :defaultValue, :hash
20
22
  property :validations, Validation
21
23
  property :allowedResources
22
24
 
@@ -5,6 +5,6 @@ module Contentful
5
5
  # Management Namespace
6
6
  module Management
7
7
  # Gem Version
8
- VERSION = '3.9.0'
8
+ VERSION = '3.10.0'
9
9
  end
10
10
  end
@@ -0,0 +1,487 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/32dbl893yf99
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
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
+ - '594'
31
+ Content-Type:
32
+ - application/vnd.contentful.management.v1+json
33
+ X-Contentful-Ratelimit-Hour-Limit:
34
+ - '36000'
35
+ X-Contentful-Ratelimit-Second-Limit:
36
+ - '10'
37
+ X-Contentful-Ratelimit-Reset:
38
+ - '0'
39
+ X-Contentful-Ratelimit-Hour-Remaining:
40
+ - '35999'
41
+ X-Contentful-Ratelimit-Second-Remaining:
42
+ - '9'
43
+ X-Xss-Protection:
44
+ - '0'
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Download-Options:
48
+ - noopen
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - strict-origin-when-cross-origin
53
+ X-Contentful-Route:
54
+ - "/spaces/:id"
55
+ Cf-Space-Id:
56
+ - 32dbl893yf99
57
+ Cf-Organization-Id:
58
+ - 5JMqP9UrBoEuRnPSzJRKep
59
+ Cf-User-Id:
60
+ - 1cRzCWn3HdX3jCI0Gkisl6
61
+ Etag:
62
+ - W/"53a9b2eb2ba7bd06b11e0b065f3a5e70"
63
+ Content-Security-Policy:
64
+ - 'default-src ''self'' static.contentful.com; font-src ''self'' data: static.contentful.com
65
+ https://www.contentful.com fonts.googleapis.com static.contentful.com www.ctfstatic.com
66
+ fonts.gstatic.com https://use.typekit.net https://storage.googleapis.com;
67
+ img-src ''self'' data: static.contentful.com https://www.contentful.com www.ctfstatic.com
68
+ https://segments.company-target.com https://match.prod.bidr.io https://scripts.demandbase.com/
69
+ https://www.gstatic.com https://www.google-analytics.com; object-src ''none'';
70
+ script-src ''self'' static.contentful.com https://tag.demandbase.com https://autocomplete.demandbase.com
71
+ https://www.gstatic.com https://static.zuora.com https://www.recaptcha.net
72
+ https://www.google-analytics.com https://js.hcaptcha.com ''nonce-d0Jk+u+32zaCpeuVFJBqrA=='';
73
+ style-src ''self'' static.contentful.com https://www.contentful.com fonts.googleapis.com
74
+ www.ctfstatic.com https://scripts.demandbase.com ''nonce-d0Jk+u+32zaCpeuVFJBqrA=='';
75
+ connect-src ''self'' static.contentful.com https://api.company-target.com
76
+ https://segments.company-target.com https://www.google-analytics.com https://sentry.io;
77
+ frame-src https://*.zuora.com https://www.google.com https://www.recaptcha.net
78
+ https://newassets.hcaptcha.com; frame-ancestors ''self'' https://app.contentful.com;
79
+ report-uri https://51772a31e6668243854408567273914e.report-uri.com/r/t/csp/enforce'
80
+ Accept-Ranges:
81
+ - bytes
82
+ Cache-Control:
83
+ - max-age=0
84
+ Strict-Transport-Security:
85
+ - max-age=15768000
86
+ Server:
87
+ - Contentful
88
+ Contentful-Api:
89
+ - cma
90
+ Contentful-Upstream:
91
+ - gatekeeper
92
+ Access-Control-Allow-Origin:
93
+ - "*"
94
+ Access-Control-Allow-Headers:
95
+ - 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
96
+ Access-Control-Expose-Headers:
97
+ - Etag,x-contentful-request-id
98
+ Access-Control-Allow-Methods:
99
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
100
+ Access-Control-Max-Age:
101
+ - '1728000'
102
+ Date:
103
+ - Sat, 09 Sep 2023 03:21:35 GMT
104
+ X-Contentful-Request-Id:
105
+ - 1783deab-6330-4342-9b00-4428e47ca2cd
106
+ body:
107
+ encoding: ASCII-8BIT
108
+ string: |+
109
+ {
110
+ "name":"Blank",
111
+ "sys":{
112
+ "type":"Space",
113
+ "id":"32dbl893yf99",
114
+ "version":1,
115
+ "createdBy":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"User",
119
+ "id":"1cRzCWn3HdX3jCI0Gkisl6"
120
+ }
121
+ },
122
+ "createdAt":"2023-09-09T02:37:44Z",
123
+ "updatedBy":{
124
+ "sys":{
125
+ "type":"Link",
126
+ "linkType":"User",
127
+ "id":"1cRzCWn3HdX3jCI0Gkisl6"
128
+ }
129
+ },
130
+ "updatedAt":"2023-09-09T02:37:44Z",
131
+ "organization":{
132
+ "sys":{
133
+ "type":"Link",
134
+ "linkType":"Organization",
135
+ "id":"5JMqP9UrBoEuRnPSzJRKep"
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ recorded_at: Sat, 09 Sep 2023 03:21:35 GMT
142
+ - request:
143
+ method: put
144
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_default_value
145
+ body:
146
+ encoding: UTF-8
147
+ string: '{"name":"Content With Default Value","fields":[{"id":"default_value_field","name":"default_value_field","type":"Text","defaultValue":{"en-US":"default
148
+ content"}}]}'
149
+ headers:
150
+ X-Contentful-User-Agent:
151
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
152
+ Authorization:
153
+ - Bearer <ACCESS_TOKEN>
154
+ Content-Type:
155
+ - application/vnd.contentful.management.v1+json
156
+ Connection:
157
+ - close
158
+ Host:
159
+ - api.contentful.com
160
+ User-Agent:
161
+ - http.rb/5.0.1
162
+ response:
163
+ status:
164
+ code: 201
165
+ message: Created
166
+ headers:
167
+ Connection:
168
+ - close
169
+ Content-Length:
170
+ - '778'
171
+ Content-Type:
172
+ - application/vnd.contentful.management.v1+json
173
+ X-Contentful-Ratelimit-Hour-Limit:
174
+ - '36000'
175
+ X-Contentful-Ratelimit-Second-Limit:
176
+ - '10'
177
+ X-Contentful-Ratelimit-Reset:
178
+ - '0'
179
+ X-Contentful-Ratelimit-Hour-Remaining:
180
+ - '35998'
181
+ X-Contentful-Ratelimit-Second-Remaining:
182
+ - '8'
183
+ Cf-Environment-Id:
184
+ - master
185
+ Cf-Environment-Uuid:
186
+ - master
187
+ Cf-Space-Id:
188
+ - 32dbl893yf99
189
+ Etag:
190
+ - '"4044777871622356263"'
191
+ X-Contentful-Route:
192
+ - "/spaces/:space/environments/:environment/content_types/:id"
193
+ Strict-Transport-Security:
194
+ - max-age=15768000
195
+ X-Content-Type-Options:
196
+ - nosniff
197
+ Contentful-Api:
198
+ - cma
199
+ Server:
200
+ - Contentful
201
+ Contentful-Upstream:
202
+ - content-api
203
+ Access-Control-Allow-Origin:
204
+ - "*"
205
+ Access-Control-Allow-Headers:
206
+ - 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
207
+ Access-Control-Expose-Headers:
208
+ - Etag,x-contentful-request-id
209
+ Access-Control-Allow-Methods:
210
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
211
+ Access-Control-Max-Age:
212
+ - '1728000'
213
+ Accept-Ranges:
214
+ - bytes
215
+ Date:
216
+ - Sat, 09 Sep 2023 03:21:36 GMT
217
+ X-Contentful-Request-Id:
218
+ - 669fa9aa-ecd8-438a-9196-4f7bb78209e5
219
+ body:
220
+ encoding: ASCII-8BIT
221
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_default_value","type":"ContentType","createdAt":"2023-09-09T03:21:35.939Z","updatedAt":"2023-09-09T03:21:35.939Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":0,"version":1},"displayField":null,"name":"Content
222
+ With Default Value","description":null,"fields":[{"id":"default_value_field","name":"default_value_field","type":"Text","localized":false,"required":false,"validations":[],"defaultValue":{"en-US":"default
223
+ content"},"disabled":false,"omitted":false}]}
224
+
225
+ '
226
+ recorded_at: Sat, 09 Sep 2023 03:21:35 GMT
227
+ - request:
228
+ method: put
229
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_default_value/published
230
+ body:
231
+ encoding: UTF-8
232
+ string: ''
233
+ headers:
234
+ X-Contentful-User-Agent:
235
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
236
+ Authorization:
237
+ - Bearer <ACCESS_TOKEN>
238
+ Content-Type:
239
+ - application/vnd.contentful.management.v1+json
240
+ X-Contentful-Version:
241
+ - '1'
242
+ Version:
243
+ - '1'
244
+ Connection:
245
+ - close
246
+ Host:
247
+ - api.contentful.com
248
+ User-Agent:
249
+ - http.rb/5.0.1
250
+ response:
251
+ status:
252
+ code: 200
253
+ message: OK
254
+ headers:
255
+ Connection:
256
+ - close
257
+ Content-Length:
258
+ - '972'
259
+ Content-Type:
260
+ - application/vnd.contentful.management.v1+json
261
+ X-Contentful-Ratelimit-Reset:
262
+ - '0'
263
+ X-Contentful-Ratelimit-Hour-Remaining:
264
+ - '35999'
265
+ X-Contentful-Ratelimit-Second-Remaining:
266
+ - '9'
267
+ X-Contentful-Ratelimit-Hour-Limit:
268
+ - '36000'
269
+ X-Contentful-Ratelimit-Second-Limit:
270
+ - '10'
271
+ Cf-Environment-Id:
272
+ - master
273
+ Cf-Environment-Uuid:
274
+ - master
275
+ Cf-Space-Id:
276
+ - 32dbl893yf99
277
+ Etag:
278
+ - '"7419449699360668456"'
279
+ X-Contentful-Route:
280
+ - "/spaces/:space/environments/:environment/content_types/:id/published"
281
+ Strict-Transport-Security:
282
+ - max-age=15768000
283
+ X-Content-Type-Options:
284
+ - nosniff
285
+ Contentful-Api:
286
+ - cma
287
+ Server:
288
+ - Contentful
289
+ Contentful-Upstream:
290
+ - content-api
291
+ Access-Control-Allow-Origin:
292
+ - "*"
293
+ Access-Control-Allow-Headers:
294
+ - 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
295
+ Access-Control-Expose-Headers:
296
+ - Etag,x-contentful-request-id
297
+ Access-Control-Allow-Methods:
298
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
299
+ Access-Control-Max-Age:
300
+ - '1728000'
301
+ Accept-Ranges:
302
+ - bytes
303
+ Date:
304
+ - Sat, 09 Sep 2023 03:21:36 GMT
305
+ X-Contentful-Request-Id:
306
+ - 5cfd8c02-7f04-41e4-880f-cedd77c43328
307
+ body:
308
+ encoding: ASCII-8BIT
309
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_default_value","type":"ContentType","createdAt":"2023-09-09T03:21:35.939Z","updatedAt":"2023-09-09T03:21:36.224Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":1,"version":2,"firstPublishedAt":"2023-09-09T03:21:36.224Z","publishedAt":"2023-09-09T03:21:36.224Z","publishedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedVersion":1},"displayField":null,"name":"Content
310
+ With Default Value","description":null,"fields":[{"id":"default_value_field","name":"default_value_field","type":"Text","localized":false,"required":false,"validations":[],"defaultValue":{"en-US":"default
311
+ content"},"disabled":false,"omitted":false}]}
312
+
313
+ '
314
+ recorded_at: Sat, 09 Sep 2023 03:21:35 GMT
315
+ - request:
316
+ method: get
317
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_default_value
318
+ body:
319
+ encoding: UTF-8
320
+ string: ''
321
+ headers:
322
+ X-Contentful-User-Agent:
323
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
324
+ Authorization:
325
+ - Bearer <ACCESS_TOKEN>
326
+ Content-Type:
327
+ - application/vnd.contentful.management.v1+json
328
+ Connection:
329
+ - close
330
+ Host:
331
+ - api.contentful.com
332
+ User-Agent:
333
+ - http.rb/5.0.1
334
+ response:
335
+ status:
336
+ code: 200
337
+ message: OK
338
+ headers:
339
+ Connection:
340
+ - close
341
+ Content-Length:
342
+ - '972'
343
+ Content-Type:
344
+ - application/vnd.contentful.management.v1+json
345
+ X-Contentful-Ratelimit-Second-Remaining:
346
+ - '8'
347
+ X-Contentful-Ratelimit-Hour-Limit:
348
+ - '36000'
349
+ X-Contentful-Ratelimit-Second-Limit:
350
+ - '10'
351
+ X-Contentful-Ratelimit-Reset:
352
+ - '0'
353
+ X-Contentful-Ratelimit-Hour-Remaining:
354
+ - '35998'
355
+ Cf-Environment-Id:
356
+ - master
357
+ Cf-Environment-Uuid:
358
+ - master
359
+ Cf-Space-Id:
360
+ - 32dbl893yf99
361
+ Etag:
362
+ - '"7838732340352631259"'
363
+ X-Contentful-Route:
364
+ - "/spaces/:space/environments/:environment/content_types/:id"
365
+ Strict-Transport-Security:
366
+ - max-age=15768000
367
+ X-Content-Type-Options:
368
+ - nosniff
369
+ Contentful-Api:
370
+ - cma
371
+ Server:
372
+ - Contentful
373
+ Contentful-Upstream:
374
+ - content-api
375
+ Access-Control-Allow-Origin:
376
+ - "*"
377
+ Access-Control-Allow-Headers:
378
+ - 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
379
+ Access-Control-Expose-Headers:
380
+ - Etag,x-contentful-request-id
381
+ Access-Control-Allow-Methods:
382
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
383
+ Access-Control-Max-Age:
384
+ - '1728000'
385
+ Accept-Ranges:
386
+ - bytes
387
+ Date:
388
+ - Sat, 09 Sep 2023 03:21:36 GMT
389
+ X-Contentful-Request-Id:
390
+ - 233c11b7-631f-4a2d-8ac2-1849861e5c65
391
+ body:
392
+ encoding: ASCII-8BIT
393
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_default_value","type":"ContentType","createdAt":"2023-09-09T03:21:35.939Z","updatedAt":"2023-09-09T03:21:36.224Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"publishedVersion":1,"publishedAt":"2023-09-09T03:21:36.224Z","firstPublishedAt":"2023-09-09T03:21:36.224Z","createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":1,"version":2,"publishedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}}},"displayField":null,"name":"Content
394
+ With Default Value","description":null,"fields":[{"id":"default_value_field","name":"default_value_field","type":"Text","localized":false,"required":false,"validations":[],"defaultValue":{"en-US":"default
395
+ content"},"disabled":false,"omitted":false}]}
396
+
397
+ '
398
+ recorded_at: Sat, 09 Sep 2023 03:21:36 GMT
399
+ - request:
400
+ method: post
401
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/entries
402
+ body:
403
+ encoding: UTF-8
404
+ string: '{"metadata":null,"fields":{}}'
405
+ headers:
406
+ X-Contentful-User-Agent:
407
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
408
+ Authorization:
409
+ - Bearer <ACCESS_TOKEN>
410
+ Content-Type:
411
+ - application/vnd.contentful.management.v1+json
412
+ X-Contentful-Content-Type:
413
+ - content_with_default_value
414
+ Content-Type-Id:
415
+ - content_with_default_value
416
+ Connection:
417
+ - close
418
+ Host:
419
+ - api.contentful.com
420
+ User-Agent:
421
+ - http.rb/5.0.1
422
+ response:
423
+ status:
424
+ code: 201
425
+ message: Created
426
+ headers:
427
+ Connection:
428
+ - close
429
+ Content-Length:
430
+ - '683'
431
+ Content-Type:
432
+ - application/vnd.contentful.management.v1+json
433
+ X-Contentful-Ratelimit-Hour-Limit:
434
+ - '36000'
435
+ X-Contentful-Ratelimit-Second-Limit:
436
+ - '10'
437
+ X-Contentful-Ratelimit-Reset:
438
+ - '0'
439
+ X-Contentful-Ratelimit-Hour-Remaining:
440
+ - '35997'
441
+ X-Contentful-Ratelimit-Second-Remaining:
442
+ - '7'
443
+ Cf-Environment-Id:
444
+ - master
445
+ Cf-Environment-Uuid:
446
+ - master
447
+ Cf-Space-Id:
448
+ - 32dbl893yf99
449
+ Etag:
450
+ - '"9130801670712245701"'
451
+ X-Contentful-Route:
452
+ - "/spaces/:space/environments/:environment/entries"
453
+ Strict-Transport-Security:
454
+ - max-age=15768000
455
+ X-Content-Type-Options:
456
+ - nosniff
457
+ Contentful-Api:
458
+ - cma
459
+ Server:
460
+ - Contentful
461
+ Contentful-Upstream:
462
+ - content-api
463
+ Access-Control-Allow-Origin:
464
+ - "*"
465
+ Access-Control-Allow-Headers:
466
+ - 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
467
+ Access-Control-Expose-Headers:
468
+ - Etag,x-contentful-request-id
469
+ Access-Control-Allow-Methods:
470
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
471
+ Access-Control-Max-Age:
472
+ - '1728000'
473
+ Accept-Ranges:
474
+ - bytes
475
+ Date:
476
+ - Sat, 09 Sep 2023 03:21:37 GMT
477
+ X-Contentful-Request-Id:
478
+ - eb78f4b3-503b-4de5-8fbd-54f9ffb5ab59
479
+ body:
480
+ encoding: ASCII-8BIT
481
+ string: '{"metadata":{"tags":[]},"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"5HOeUNysgEeta24CCEeUDc","type":"Entry","createdAt":"2023-09-09T03:21:36.985Z","updatedAt":"2023-09-09T03:21:36.985Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":0,"version":1,"automationTags":[],"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"content_with_default_value"}}},"fields":{"default_value_field":{"en-US":"default
482
+ content"}}}
483
+
484
+ '
485
+ recorded_at: Sat, 09 Sep 2023 03:21:36 GMT
486
+ recorded_with: VCR 6.2.0
487
+ ...
@@ -0,0 +1,483 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/32dbl893yf99
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
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
+ - '594'
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
+ X-Xss-Protection:
44
+ - '0'
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Download-Options:
48
+ - noopen
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - strict-origin-when-cross-origin
53
+ X-Contentful-Route:
54
+ - "/spaces/:id"
55
+ Cf-Space-Id:
56
+ - 32dbl893yf99
57
+ Cf-Organization-Id:
58
+ - 5JMqP9UrBoEuRnPSzJRKep
59
+ Cf-User-Id:
60
+ - 1cRzCWn3HdX3jCI0Gkisl6
61
+ Etag:
62
+ - W/"53a9b2eb2ba7bd06b11e0b065f3a5e70"
63
+ Content-Security-Policy:
64
+ - 'default-src ''self'' static.contentful.com; font-src ''self'' data: static.contentful.com
65
+ https://www.contentful.com fonts.googleapis.com static.contentful.com www.ctfstatic.com
66
+ fonts.gstatic.com https://use.typekit.net https://storage.googleapis.com;
67
+ img-src ''self'' data: static.contentful.com https://www.contentful.com www.ctfstatic.com
68
+ https://segments.company-target.com https://match.prod.bidr.io https://scripts.demandbase.com/
69
+ https://www.gstatic.com https://www.google-analytics.com; object-src ''none'';
70
+ script-src ''self'' static.contentful.com https://tag.demandbase.com https://autocomplete.demandbase.com
71
+ https://www.gstatic.com https://static.zuora.com https://www.recaptcha.net
72
+ https://www.google-analytics.com https://js.hcaptcha.com ''nonce-4+EDRiVrRcBxUnogmQUVEw=='';
73
+ style-src ''self'' static.contentful.com https://www.contentful.com fonts.googleapis.com
74
+ www.ctfstatic.com https://scripts.demandbase.com ''nonce-4+EDRiVrRcBxUnogmQUVEw=='';
75
+ connect-src ''self'' static.contentful.com https://api.company-target.com
76
+ https://segments.company-target.com https://www.google-analytics.com https://sentry.io;
77
+ frame-src https://*.zuora.com https://www.google.com https://www.recaptcha.net
78
+ https://newassets.hcaptcha.com; frame-ancestors ''self'' https://app.contentful.com;
79
+ report-uri https://51772a31e6668243854408567273914e.report-uri.com/r/t/csp/enforce'
80
+ Accept-Ranges:
81
+ - bytes
82
+ Cache-Control:
83
+ - max-age=0
84
+ Strict-Transport-Security:
85
+ - max-age=15768000
86
+ Server:
87
+ - Contentful
88
+ Contentful-Api:
89
+ - cma
90
+ Contentful-Upstream:
91
+ - gatekeeper
92
+ Access-Control-Allow-Origin:
93
+ - "*"
94
+ Access-Control-Allow-Headers:
95
+ - 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
96
+ Access-Control-Expose-Headers:
97
+ - Etag,x-contentful-request-id
98
+ Access-Control-Allow-Methods:
99
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
100
+ Access-Control-Max-Age:
101
+ - '1728000'
102
+ Date:
103
+ - Sat, 09 Sep 2023 03:46:18 GMT
104
+ X-Contentful-Request-Id:
105
+ - 30a936aa-d530-4e6b-96d4-112464383b7e
106
+ body:
107
+ encoding: ASCII-8BIT
108
+ string: |+
109
+ {
110
+ "name":"Blank",
111
+ "sys":{
112
+ "type":"Space",
113
+ "id":"32dbl893yf99",
114
+ "version":1,
115
+ "createdBy":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"User",
119
+ "id":"1cRzCWn3HdX3jCI0Gkisl6"
120
+ }
121
+ },
122
+ "createdAt":"2023-09-09T02:37:44Z",
123
+ "updatedBy":{
124
+ "sys":{
125
+ "type":"Link",
126
+ "linkType":"User",
127
+ "id":"1cRzCWn3HdX3jCI0Gkisl6"
128
+ }
129
+ },
130
+ "updatedAt":"2023-09-09T02:37:44Z",
131
+ "organization":{
132
+ "sys":{
133
+ "type":"Link",
134
+ "linkType":"Organization",
135
+ "id":"5JMqP9UrBoEuRnPSzJRKep"
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ recorded_at: Sat, 09 Sep 2023 03:46:18 GMT
142
+ - request:
143
+ method: put
144
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_field_to_delete
145
+ body:
146
+ encoding: UTF-8
147
+ string: '{"name":"Content With Field To Delete","fields":[{"id":"field_to_delete","name":"field_to_delete","type":"Text","omitted":true}]}'
148
+ headers:
149
+ X-Contentful-User-Agent:
150
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
151
+ Authorization:
152
+ - Bearer <ACCESS_TOKEN>
153
+ Content-Type:
154
+ - application/vnd.contentful.management.v1+json
155
+ Connection:
156
+ - close
157
+ Host:
158
+ - api.contentful.com
159
+ User-Agent:
160
+ - http.rb/5.0.1
161
+ response:
162
+ status:
163
+ code: 201
164
+ message: Created
165
+ headers:
166
+ Connection:
167
+ - close
168
+ Content-Length:
169
+ - '730'
170
+ Content-Type:
171
+ - application/vnd.contentful.management.v1+json
172
+ X-Contentful-Ratelimit-Hour-Remaining:
173
+ - '35998'
174
+ X-Contentful-Ratelimit-Second-Remaining:
175
+ - '8'
176
+ X-Contentful-Ratelimit-Hour-Limit:
177
+ - '36000'
178
+ X-Contentful-Ratelimit-Second-Limit:
179
+ - '10'
180
+ X-Contentful-Ratelimit-Reset:
181
+ - '0'
182
+ Cf-Environment-Id:
183
+ - master
184
+ Cf-Environment-Uuid:
185
+ - master
186
+ Cf-Space-Id:
187
+ - 32dbl893yf99
188
+ Etag:
189
+ - '"867790919839850038"'
190
+ X-Contentful-Route:
191
+ - "/spaces/:space/environments/:environment/content_types/:id"
192
+ Strict-Transport-Security:
193
+ - max-age=15768000
194
+ X-Content-Type-Options:
195
+ - nosniff
196
+ Contentful-Api:
197
+ - cma
198
+ Server:
199
+ - Contentful
200
+ Contentful-Upstream:
201
+ - content-api
202
+ Access-Control-Allow-Origin:
203
+ - "*"
204
+ Access-Control-Allow-Headers:
205
+ - 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
206
+ Access-Control-Expose-Headers:
207
+ - Etag,x-contentful-request-id
208
+ Access-Control-Allow-Methods:
209
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
210
+ Access-Control-Max-Age:
211
+ - '1728000'
212
+ Accept-Ranges:
213
+ - bytes
214
+ Date:
215
+ - Sat, 09 Sep 2023 03:46:18 GMT
216
+ X-Contentful-Request-Id:
217
+ - bac10013-f9e9-4035-a91c-6e7c05e560d7
218
+ body:
219
+ encoding: ASCII-8BIT
220
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_field_to_delete","type":"ContentType","createdAt":"2023-09-09T03:46:18.865Z","updatedAt":"2023-09-09T03:46:18.865Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":0,"version":1},"displayField":null,"name":"Content
221
+ With Field To Delete","description":null,"fields":[{"id":"field_to_delete","name":"field_to_delete","type":"Text","localized":false,"required":false,"validations":[],"disabled":false,"omitted":true}]}
222
+
223
+ '
224
+ recorded_at: Sat, 09 Sep 2023 03:46:18 GMT
225
+ - request:
226
+ method: put
227
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_field_to_delete/published
228
+ body:
229
+ encoding: UTF-8
230
+ string: ''
231
+ headers:
232
+ X-Contentful-User-Agent:
233
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
234
+ Authorization:
235
+ - Bearer <ACCESS_TOKEN>
236
+ Content-Type:
237
+ - application/vnd.contentful.management.v1+json
238
+ X-Contentful-Version:
239
+ - '1'
240
+ Version:
241
+ - '1'
242
+ Connection:
243
+ - close
244
+ Host:
245
+ - api.contentful.com
246
+ User-Agent:
247
+ - http.rb/5.0.1
248
+ response:
249
+ status:
250
+ code: 200
251
+ message: OK
252
+ headers:
253
+ Connection:
254
+ - close
255
+ Content-Length:
256
+ - '924'
257
+ Content-Type:
258
+ - application/vnd.contentful.management.v1+json
259
+ X-Contentful-Ratelimit-Hour-Remaining:
260
+ - '35999'
261
+ X-Contentful-Ratelimit-Second-Remaining:
262
+ - '9'
263
+ X-Contentful-Ratelimit-Hour-Limit:
264
+ - '36000'
265
+ X-Contentful-Ratelimit-Second-Limit:
266
+ - '10'
267
+ X-Contentful-Ratelimit-Reset:
268
+ - '0'
269
+ Cf-Environment-Id:
270
+ - master
271
+ Cf-Environment-Uuid:
272
+ - master
273
+ Cf-Space-Id:
274
+ - 32dbl893yf99
275
+ Etag:
276
+ - '"8267765743534796938"'
277
+ X-Contentful-Route:
278
+ - "/spaces/:space/environments/:environment/content_types/:id/published"
279
+ Strict-Transport-Security:
280
+ - max-age=15768000
281
+ X-Content-Type-Options:
282
+ - nosniff
283
+ Contentful-Api:
284
+ - cma
285
+ Server:
286
+ - Contentful
287
+ Contentful-Upstream:
288
+ - content-api
289
+ Access-Control-Allow-Origin:
290
+ - "*"
291
+ Access-Control-Allow-Headers:
292
+ - 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
293
+ Access-Control-Expose-Headers:
294
+ - Etag,x-contentful-request-id
295
+ Access-Control-Allow-Methods:
296
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
297
+ Access-Control-Max-Age:
298
+ - '1728000'
299
+ Accept-Ranges:
300
+ - bytes
301
+ Date:
302
+ - Sat, 09 Sep 2023 03:46:19 GMT
303
+ X-Contentful-Request-Id:
304
+ - 3af608ff-a1ee-40f8-91f8-24e4d847907e
305
+ body:
306
+ encoding: ASCII-8BIT
307
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_field_to_delete","type":"ContentType","createdAt":"2023-09-09T03:46:18.865Z","updatedAt":"2023-09-09T03:46:19.112Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":1,"version":2,"firstPublishedAt":"2023-09-09T03:46:19.112Z","publishedAt":"2023-09-09T03:46:19.112Z","publishedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedVersion":1},"displayField":null,"name":"Content
308
+ With Field To Delete","description":null,"fields":[{"id":"field_to_delete","name":"field_to_delete","type":"Text","localized":false,"required":false,"validations":[],"disabled":false,"omitted":true}]}
309
+
310
+ '
311
+ recorded_at: Sat, 09 Sep 2023 03:46:18 GMT
312
+ - request:
313
+ method: get
314
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_field_to_delete
315
+ body:
316
+ encoding: UTF-8
317
+ string: ''
318
+ headers:
319
+ X-Contentful-User-Agent:
320
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
321
+ Authorization:
322
+ - Bearer <ACCESS_TOKEN>
323
+ Content-Type:
324
+ - application/vnd.contentful.management.v1+json
325
+ Connection:
326
+ - close
327
+ Host:
328
+ - api.contentful.com
329
+ User-Agent:
330
+ - http.rb/5.0.1
331
+ response:
332
+ status:
333
+ code: 200
334
+ message: OK
335
+ headers:
336
+ Connection:
337
+ - close
338
+ Content-Length:
339
+ - '924'
340
+ Content-Type:
341
+ - application/vnd.contentful.management.v1+json
342
+ X-Contentful-Ratelimit-Second-Remaining:
343
+ - '8'
344
+ X-Contentful-Ratelimit-Hour-Limit:
345
+ - '36000'
346
+ X-Contentful-Ratelimit-Second-Limit:
347
+ - '10'
348
+ X-Contentful-Ratelimit-Reset:
349
+ - '0'
350
+ X-Contentful-Ratelimit-Hour-Remaining:
351
+ - '35998'
352
+ Cf-Environment-Id:
353
+ - master
354
+ Cf-Environment-Uuid:
355
+ - master
356
+ Cf-Space-Id:
357
+ - 32dbl893yf99
358
+ Etag:
359
+ - '"10721659139756783581"'
360
+ X-Contentful-Route:
361
+ - "/spaces/:space/environments/:environment/content_types/:id"
362
+ Strict-Transport-Security:
363
+ - max-age=15768000
364
+ X-Content-Type-Options:
365
+ - nosniff
366
+ Contentful-Api:
367
+ - cma
368
+ Server:
369
+ - Contentful
370
+ Contentful-Upstream:
371
+ - content-api
372
+ Access-Control-Allow-Origin:
373
+ - "*"
374
+ Access-Control-Allow-Headers:
375
+ - 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
376
+ Access-Control-Expose-Headers:
377
+ - Etag,x-contentful-request-id
378
+ Access-Control-Allow-Methods:
379
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
380
+ Access-Control-Max-Age:
381
+ - '1728000'
382
+ Accept-Ranges:
383
+ - bytes
384
+ Date:
385
+ - Sat, 09 Sep 2023 03:46:19 GMT
386
+ X-Contentful-Request-Id:
387
+ - fa08d3dd-c7b4-4b43-976a-85f4ecf42d75
388
+ body:
389
+ encoding: ASCII-8BIT
390
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_field_to_delete","type":"ContentType","createdAt":"2023-09-09T03:46:18.865Z","updatedAt":"2023-09-09T03:46:19.112Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"publishedVersion":1,"publishedAt":"2023-09-09T03:46:19.112Z","firstPublishedAt":"2023-09-09T03:46:19.112Z","createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":1,"version":2,"publishedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}}},"displayField":null,"name":"Content
391
+ With Field To Delete","description":null,"fields":[{"id":"field_to_delete","name":"field_to_delete","type":"Text","localized":false,"required":false,"validations":[],"disabled":false,"omitted":true}]}
392
+
393
+ '
394
+ recorded_at: Sat, 09 Sep 2023 03:46:19 GMT
395
+ - request:
396
+ method: put
397
+ uri: https://api.contentful.com/spaces/32dbl893yf99/environments/master/content_types/content_with_field_to_delete
398
+ body:
399
+ encoding: UTF-8
400
+ string: '{"name":"Content With Field To Delete","fields":[{"id":"field_to_delete","name":"field_to_delete","type":"Text","omitted":true,"deleted":true}]}'
401
+ headers:
402
+ X-Contentful-User-Agent:
403
+ - sdk contentful-management.rb/3.9.0; platform ruby/3.2.2; os Windows/ucrt;
404
+ Authorization:
405
+ - Bearer <ACCESS_TOKEN>
406
+ Content-Type:
407
+ - application/vnd.contentful.management.v1+json
408
+ X-Contentful-Version:
409
+ - '2'
410
+ Version:
411
+ - '2'
412
+ Connection:
413
+ - close
414
+ Host:
415
+ - api.contentful.com
416
+ User-Agent:
417
+ - http.rb/5.0.1
418
+ response:
419
+ status:
420
+ code: 200
421
+ message: OK
422
+ headers:
423
+ Connection:
424
+ - close
425
+ Content-Length:
426
+ - '777'
427
+ Content-Type:
428
+ - application/vnd.contentful.management.v1+json
429
+ X-Contentful-Ratelimit-Hour-Remaining:
430
+ - '35997'
431
+ X-Contentful-Ratelimit-Second-Remaining:
432
+ - '7'
433
+ X-Contentful-Ratelimit-Hour-Limit:
434
+ - '36000'
435
+ X-Contentful-Ratelimit-Second-Limit:
436
+ - '10'
437
+ X-Contentful-Ratelimit-Reset:
438
+ - '0'
439
+ Cf-Environment-Id:
440
+ - master
441
+ Cf-Environment-Uuid:
442
+ - master
443
+ Cf-Space-Id:
444
+ - 32dbl893yf99
445
+ Etag:
446
+ - '"2699166329675537603"'
447
+ X-Contentful-Route:
448
+ - "/spaces/:space/environments/:environment/content_types/:id"
449
+ Strict-Transport-Security:
450
+ - max-age=15768000
451
+ X-Content-Type-Options:
452
+ - nosniff
453
+ Contentful-Api:
454
+ - cma
455
+ Server:
456
+ - Contentful
457
+ Contentful-Upstream:
458
+ - content-api
459
+ Access-Control-Allow-Origin:
460
+ - "*"
461
+ Access-Control-Allow-Headers:
462
+ - 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
463
+ Access-Control-Expose-Headers:
464
+ - Etag,x-contentful-request-id
465
+ Access-Control-Allow-Methods:
466
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
467
+ Access-Control-Max-Age:
468
+ - '1728000'
469
+ Accept-Ranges:
470
+ - bytes
471
+ Date:
472
+ - Sat, 09 Sep 2023 03:46:19 GMT
473
+ X-Contentful-Request-Id:
474
+ - 42e7113c-55a2-410c-8f7e-77e51bc9a52e
475
+ body:
476
+ encoding: ASCII-8BIT
477
+ string: '{"sys":{"space":{"sys":{"type":"Link","linkType":"Space","id":"32dbl893yf99"}},"id":"content_with_field_to_delete","type":"ContentType","createdAt":"2023-09-09T03:46:18.865Z","updatedAt":"2023-09-09T03:46:19.717Z","environment":{"sys":{"id":"master","type":"Link","linkType":"Environment"}},"publishedVersion":1,"publishedAt":"2023-09-09T03:46:19.112Z","firstPublishedAt":"2023-09-09T03:46:19.112Z","createdBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}},"publishedCounter":1,"version":3,"publishedBy":{"sys":{"type":"Link","linkType":"User","id":"1cRzCWn3HdX3jCI0Gkisl6"}}},"displayField":null,"name":"Content
478
+ With Field To Delete","description":null,"fields":[]}
479
+
480
+ '
481
+ recorded_at: Sat, 09 Sep 2023 03:46:19 GMT
482
+ recorded_with: VCR 6.2.0
483
+ ...
@@ -272,6 +272,30 @@ module Contentful
272
272
  expect(field.omitted).to be_falsey
273
273
  }
274
274
  end
275
+
276
+ it 'creates a content_type with a default value' do
277
+ vcr('content_type/default_value') {
278
+ space = client.spaces.find('32dbl893yf99')
279
+
280
+ default_value_field = Contentful::Management::Field.new
281
+ default_value_field.id = 'default_value_field'
282
+ default_value_field.name = 'default_value_field'
283
+ default_value_field.type = 'Text'
284
+ default_value_field.default_value = { 'en-US' => 'default content' }
285
+
286
+ content_type = client.content_types(space.id, 'master').create(
287
+ id: 'content_with_default_value',
288
+ name: 'Content With Default Value',
289
+ fields: [default_value_field]
290
+ )
291
+
292
+ content_type.activate
293
+ content_type.reload
294
+ entry = content_type.entries.new.save
295
+
296
+ expect(entry.default_value_field).to eq 'default content'
297
+ }
298
+ end
275
299
  end
276
300
 
277
301
  describe '#update' do
@@ -342,6 +366,32 @@ module Contentful
342
366
  end
343
367
  end
344
368
 
369
+ it 'deletes a field when updated with deleted set to true' do
370
+ vcr('content_type/update_with_deleted_true') {
371
+ space = client.spaces.find('32dbl893yf99')
372
+
373
+ field_to_delete = Contentful::Management::Field.new
374
+ field_to_delete.id = 'field_to_delete'
375
+ field_to_delete.name = 'field_to_delete'
376
+ field_to_delete.type = 'Text'
377
+ field_to_delete.omitted = true
378
+
379
+ content_type = client.content_types(space.id, 'master').create(
380
+ id: 'content_with_field_to_delete',
381
+ name: 'Content With Field To Delete',
382
+ fields: [field_to_delete]
383
+ )
384
+
385
+ content_type.activate
386
+ content_type.reload
387
+
388
+ field = content_type.fields.detect { _1.name == 'field_to_delete' }
389
+ field.deleted = true
390
+ content_type.update(fields: content_type.fields)
391
+
392
+ expect(content_type.fields).to be_empty
393
+ }
394
+ end
345
395
  end
346
396
 
347
397
  describe '#save' do
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.9.0
4
+ version: 3.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Protas
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-09-08 00:00:00.000000000 Z
13
+ date: 2024-02-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -495,6 +495,7 @@ files:
495
495
  - spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml
496
496
  - spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml
497
497
  - spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml
498
+ - spec/fixtures/vcr_cassettes/content_type/default_value.yml
498
499
  - spec/fixtures/vcr_cassettes/content_type/destroy.yml
499
500
  - spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml
500
501
  - spec/fixtures/vcr_cassettes/content_type/entry/all.yml
@@ -525,6 +526,7 @@ files:
525
526
  - spec/fixtures/vcr_cassettes/content_type/update.yml
526
527
  - spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml
527
528
  - spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml
529
+ - spec/fixtures/vcr_cassettes/content_type/update_with_deleted_true.yml
528
530
  - spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml
529
531
  - spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml
530
532
  - spec/fixtures/vcr_cassettes/content_type/validation/in.yml
@@ -929,6 +931,7 @@ test_files:
929
931
  - spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml
930
932
  - spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml
931
933
  - spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml
934
+ - spec/fixtures/vcr_cassettes/content_type/default_value.yml
932
935
  - spec/fixtures/vcr_cassettes/content_type/destroy.yml
933
936
  - spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml
934
937
  - spec/fixtures/vcr_cassettes/content_type/entry/all.yml
@@ -959,6 +962,7 @@ test_files:
959
962
  - spec/fixtures/vcr_cassettes/content_type/update.yml
960
963
  - spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml
961
964
  - spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml
965
+ - spec/fixtures/vcr_cassettes/content_type/update_with_deleted_true.yml
962
966
  - spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml
963
967
  - spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml
964
968
  - spec/fixtures/vcr_cassettes/content_type/validation/in.yml