contentstack 0.4.3 → 0.5.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/.gitignore +1 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +8 -8
- data/lib/contentstack/api.rb +51 -11
- data/lib/contentstack/client.rb +8 -3
- data/lib/contentstack/entry.rb +13 -0
- data/lib/contentstack/query.rb +14 -1
- data/lib/contentstack/version.rb +1 -1
- data/lib/contentstack.rb +2 -0
- data/spec/asset_spec.rb +7 -7
- data/spec/entry_spec.rb +9 -1
- data/spec/fixtures/asset.json +1 -1
- data/spec/fixtures/asset_collection.json +1 -1
- data/spec/fixtures/category_content_type.json +1 -1
- data/spec/fixtures/category_entry.json +1 -1
- data/spec/fixtures/category_entry_collection.json +1 -1
- data/spec/fixtures/category_entry_collection_without_count.json +1 -1
- data/spec/fixtures/content_types.json +1 -1
- data/spec/fixtures/product_entry.json +1 -1
- data/spec/fixtures/product_entry_collection.json +1 -1
- data/spec/fixtures/sync_init.json +785 -785
- data/spec/query_spec.rb +8 -0
- data/spec/spec_helper.rb +14 -3
- metadata +2 -6
- data/coverage/.last_run.json +0 -5
- data/coverage/.resultset.json +0 -1965
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/index.html +0 -21591
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a123ae65668a6bf29833ecc4afcb2a2928e1732714972f6435a454b73aaf4ad
|
4
|
+
data.tar.gz: 62e2227a92867dc87c0924a9739f8992ec48f315b36bd6dddd4c67695dec4312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46d3100475b3e04a49b01982ac0ffe39bc75669da2127256275ad4b9264f265e298391ea7da6f24c00a91e58307daf519a34baf71b4d21a54b6a6d365a4d1792
|
7
|
+
data.tar.gz: d666b92d9b25fe675187cebac7f04f4fc426cc731636022ba6350293fbe61f9e5ef258ceae7df363abfc78dc6fbc37b1f0c294e79debaaba7b1a8dbb90b90f0c
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
## CHANGELOG
|
2
|
+
------------------------------------------------
|
3
|
+
## Version 0.5.0
|
4
|
+
### Date: 14th-Oct-2021
|
5
|
+
### New Features
|
6
|
+
- Live Preview feature support added
|
7
|
+
|
2
8
|
------------------------------------------------
|
3
9
|
## Version 0.4.3
|
4
10
|
### Date: 17th-Sept-2021
|
@@ -18,7 +24,6 @@
|
|
18
24
|
- Updated gemspec dependency
|
19
25
|
|
20
26
|
------------------------------------------------
|
21
|
-
|
22
27
|
## Version 0.4.0
|
23
28
|
### Date: 16th-Apr-2021
|
24
29
|
### New Features
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
contentstack (0.
|
4
|
+
contentstack (0.5.0)
|
5
5
|
activesupport (>= 3.2, < 6.2)
|
6
6
|
contentstack_utils (~> 1.0, >= 1.0.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (6.1.4)
|
11
|
+
activesupport (6.1.4.1)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 1.6, < 2)
|
14
14
|
minitest (>= 5.1)
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
addressable (2.8.0)
|
18
18
|
public_suffix (>= 2.0.2, < 5.0)
|
19
19
|
concurrent-ruby (1.1.9)
|
20
|
-
contentstack_utils (1.0
|
20
|
+
contentstack_utils (1.1.0)
|
21
21
|
activesupport (>= 3.2, < 6.2)
|
22
22
|
nokogiri (~> 1.11, >= 1.11.0)
|
23
23
|
crack (0.4.5)
|
@@ -27,13 +27,13 @@ GEM
|
|
27
27
|
hashdiff (1.0.1)
|
28
28
|
i18n (1.8.10)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
mini_portile2 (2.
|
30
|
+
mini_portile2 (2.6.1)
|
31
31
|
minitest (5.14.4)
|
32
|
-
nokogiri (1.
|
33
|
-
mini_portile2 (~> 2.
|
32
|
+
nokogiri (1.12.5)
|
33
|
+
mini_portile2 (~> 2.6.1)
|
34
34
|
racc (~> 1.4)
|
35
35
|
public_suffix (4.0.6)
|
36
|
-
racc (1.
|
36
|
+
racc (1.6.0)
|
37
37
|
rexml (3.2.5)
|
38
38
|
rspec (3.10.0)
|
39
39
|
rspec-core (~> 3.10.0)
|
@@ -61,7 +61,7 @@ GEM
|
|
61
61
|
crack (>= 0.3.2)
|
62
62
|
hashdiff (>= 0.4.0, < 2.0.0)
|
63
63
|
yard (0.9.26)
|
64
|
-
zeitwerk (2.
|
64
|
+
zeitwerk (2.5.1)
|
65
65
|
|
66
66
|
PLATFORMS
|
67
67
|
ruby
|
data/lib/contentstack/api.rb
CHANGED
@@ -7,13 +7,20 @@ require 'util'
|
|
7
7
|
module Contentstack
|
8
8
|
class API
|
9
9
|
using Utility
|
10
|
-
def self.init_api(api_key, delivery_token, environment,host)
|
10
|
+
def self.init_api(api_key, delivery_token, environment, host, branch, live_preview)
|
11
11
|
@host = host
|
12
12
|
@api_version = '/v3'
|
13
13
|
@environment = environment
|
14
14
|
@api_key = api_key
|
15
15
|
@access_token = delivery_token
|
16
|
+
@branch = branch
|
16
17
|
@headers = {environment: @environment}
|
18
|
+
@live_preview = live_preview
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.live_preview_query(query= {})
|
22
|
+
@live_preview[:content_type_uid] = query[:content_type_uid]
|
23
|
+
@live_preview[:live_preview] = query[:live_preview]
|
17
24
|
end
|
18
25
|
|
19
26
|
def self.fetch_content_types(uid="")
|
@@ -26,13 +33,23 @@ module Contentstack
|
|
26
33
|
end
|
27
34
|
|
28
35
|
def self.fetch_entries(content_type, query)
|
29
|
-
|
30
|
-
|
36
|
+
if @live_preview[:enable] && @live_preview[:content_type_uid] == content_type
|
37
|
+
path = "/content_types/#{content_type}/entries"
|
38
|
+
send_preview_request(path, query)
|
39
|
+
else
|
40
|
+
path = "/content_types/#{content_type}/entries"
|
41
|
+
send_request(path, query)
|
42
|
+
end
|
31
43
|
end
|
32
44
|
|
33
45
|
def self.fetch_entry(content_type, entry_uid, query)
|
34
|
-
|
35
|
-
|
46
|
+
if @live_preview[:enable] && @live_preview[:content_type_uid] == content_type
|
47
|
+
path = "/content_types/#{content_type}/entries/#{entry_uid}"
|
48
|
+
send_preview_request(path, query)
|
49
|
+
else
|
50
|
+
path = "/content_types/#{content_type}/entries/#{entry_uid}"
|
51
|
+
send_request(path, query)
|
52
|
+
end
|
36
53
|
end
|
37
54
|
|
38
55
|
def self.get_assets(asset_uid=nil)
|
@@ -54,12 +71,35 @@ module Contentstack
|
|
54
71
|
|
55
72
|
query = "?" + q.to_query
|
56
73
|
# puts "Request URL:- #{@host}#{@api_version}#{path}#{query} \n\n"
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
74
|
+
params = {
|
75
|
+
"api_key" => @api_key,
|
76
|
+
"access_token"=> @access_token,
|
77
|
+
"user_agent"=> "ruby-sdk/#{Contentstack::VERSION}",
|
78
|
+
"x-user-agent" => "ruby-sdk/#{Contentstack::VERSION}"
|
79
|
+
}
|
80
|
+
if !@branch.nil? && !@branch.empty?
|
81
|
+
params["branch"] = @branch
|
82
|
+
end
|
83
|
+
ActiveSupport::JSON.decode(open("#{@host}#{@api_version}#{path}#{query}",params).read)
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.send_preview_request(path, q=nil)
|
87
|
+
q ||= {}
|
88
|
+
|
89
|
+
q.merge!({live_preview: (!@live_preview.key?(:live_preview) ? 'init' : @live_preview[:live_preview]),})
|
90
|
+
|
91
|
+
query = "?" + q.to_query
|
92
|
+
preview_host = @live_preview[:host]
|
93
|
+
params = {
|
94
|
+
"api_key" => @api_key,
|
95
|
+
"authorization" => @live_preview[:management_token],
|
96
|
+
"user_agent"=> "ruby-sdk/#{Contentstack::VERSION}",
|
97
|
+
"x-user-agent" => "ruby-sdk/#{Contentstack::VERSION}"
|
98
|
+
}
|
99
|
+
if !@branch.nil? && !@branch.empty?
|
100
|
+
params["branch"] = @branch
|
101
|
+
end
|
102
|
+
ActiveSupport::JSON.decode(open("#{preview_host}#{@api_version}#{path}#{query}",params).read)
|
63
103
|
end
|
64
104
|
end
|
65
105
|
end
|
data/lib/contentstack/client.rb
CHANGED
@@ -11,7 +11,9 @@ module Contentstack
|
|
11
11
|
def initialize(api_key, delivery_token, environment, options={})
|
12
12
|
@region = options[:region].nil? ? Contentstack::Region::US : options[:region]
|
13
13
|
@host = options[:host].nil? ? get_default_region_hosts(@region) : options[:host]
|
14
|
-
|
14
|
+
@live_preview = !options.key?(:live_preview) ? {} : options[:live_preview]
|
15
|
+
@branch = options[:branch].nil? ? "" : options[:branch]
|
16
|
+
API.init_api(api_key, delivery_token, environment, @host, @branch, @live_preview)
|
15
17
|
end
|
16
18
|
|
17
19
|
def content_types
|
@@ -30,6 +32,9 @@ module Contentstack
|
|
30
32
|
Asset.new(uid)
|
31
33
|
end
|
32
34
|
|
35
|
+
def live_preview_query(query={})
|
36
|
+
API.live_preview_query(query)
|
37
|
+
end
|
33
38
|
|
34
39
|
# Syncs your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates
|
35
40
|
#
|
@@ -43,9 +48,9 @@ module Contentstack
|
|
43
48
|
#
|
44
49
|
# Stack.sync({'init': true, 'type': 'entry_published'}) // Use the type parameter to get a specific type of content.Supports 'asset_published', 'entry_published', 'asset_unpublished', 'entry_unpublished', 'asset_deleted', 'entry_deleted', 'content_type_deleted'.
|
45
50
|
#
|
46
|
-
# Stack.sync({'pagination_token': '<
|
51
|
+
# Stack.sync({'pagination_token': '<pagination>'}) // For fetching the next batch of entries using pagination token
|
47
52
|
#
|
48
|
-
# Stack.sync({'sync_token': '<
|
53
|
+
# Stack.sync({'sync_token': '<sync>'}) // For performing subsequent sync after initial sync
|
49
54
|
#
|
50
55
|
# @param params [Hash] params is an object that supports ‘locale’, ‘start_date’, ‘content_type_uid’, and ‘type’ queries.
|
51
56
|
def sync(params)
|
data/lib/contentstack/entry.rb
CHANGED
@@ -154,6 +154,19 @@ module Contentstack
|
|
154
154
|
self
|
155
155
|
end
|
156
156
|
|
157
|
+
# Include the branch for publish content.
|
158
|
+
#
|
159
|
+
# Example
|
160
|
+
#
|
161
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
162
|
+
# @entry.include_branch
|
163
|
+
#
|
164
|
+
# @return [Contentstack::Entry]
|
165
|
+
def include_branch(flag=true)
|
166
|
+
@query[:include_branch] = flag
|
167
|
+
self
|
168
|
+
end
|
169
|
+
|
157
170
|
# Include Embedded Objects (Entries and Assets) along with entry/entries details.
|
158
171
|
#
|
159
172
|
# Example
|
data/lib/contentstack/query.rb
CHANGED
@@ -289,7 +289,7 @@ module Contentstack
|
|
289
289
|
end
|
290
290
|
|
291
291
|
# This method provides only the entries matching the specified value.
|
292
|
-
#
|
292
|
+
# @deprecated since version 0.5.0
|
293
293
|
# @param [String] text value used to match or compare
|
294
294
|
#
|
295
295
|
# Example
|
@@ -518,6 +518,19 @@ module Contentstack
|
|
518
518
|
self
|
519
519
|
end
|
520
520
|
|
521
|
+
# Include the branch for publish content.
|
522
|
+
#
|
523
|
+
# Example
|
524
|
+
#
|
525
|
+
# @query = @stack.content_type('product').query
|
526
|
+
# @query.include_branch
|
527
|
+
#
|
528
|
+
# @return [Contentstack::Entry]
|
529
|
+
def include_branch(flag=true)
|
530
|
+
@query[:include_branch] = flag
|
531
|
+
self
|
532
|
+
end
|
533
|
+
|
521
534
|
# Include Embedded Objects (Entries and Assets) along with entry/entries details.
|
522
535
|
#
|
523
536
|
# Example
|
data/lib/contentstack/version.rb
CHANGED
data/lib/contentstack.rb
CHANGED
@@ -15,6 +15,8 @@ require "contentstack_utils"
|
|
15
15
|
# @stack = Contentstack::Client.new("site_api_key", "delivery_token", "enviroment_name", {"region": Contentstack::Region::EU })
|
16
16
|
# == Initialize the Stack for custom host
|
17
17
|
# @stack = Contentstack::Client.new("site_api_key", "delivery_token", "enviroment_name", {"host": "https://custom-cdn.contentstack.com" })
|
18
|
+
# == Initialize the Stack for EU region
|
19
|
+
# @stack = Contentstack::Client.new("site_api_key", "delivery_token", "enviroment_name", {"branch":"branch_name" })
|
18
20
|
# == Usage
|
19
21
|
# ==== Get single entry
|
20
22
|
# @stack.content_type('blog').entry('<entry_uid_here>').fetch
|
data/spec/asset_spec.rb
CHANGED
@@ -5,43 +5,43 @@ describe Contentstack::Asset do
|
|
5
5
|
let(:client) { create_client }
|
6
6
|
|
7
7
|
it "has attribute called `uid`" do
|
8
|
-
@uid = "
|
8
|
+
@uid = "image_1"
|
9
9
|
@asset = client.asset(@uid).fetch
|
10
10
|
expect(@asset.uid).not_to be nil
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should match uid" do
|
14
|
-
@uid = "
|
14
|
+
@uid = "image_1"
|
15
15
|
@asset = client.asset(@uid).fetch
|
16
16
|
expect(@asset.uid).to eq @uid
|
17
17
|
end
|
18
18
|
|
19
19
|
it "has attribute called `url`" do
|
20
|
-
@uid = "
|
20
|
+
@uid = "image_1"
|
21
21
|
@asset = client.asset(@uid).fetch
|
22
22
|
expect(@asset.url).not_to be nil
|
23
23
|
end
|
24
24
|
|
25
25
|
it "has attribute called `tags`" do
|
26
|
-
@uid = "
|
26
|
+
@uid = "image_1"
|
27
27
|
@asset = client.asset(@uid).fetch
|
28
28
|
expect(@asset.tags).not_to be nil
|
29
29
|
end
|
30
30
|
|
31
31
|
it "has attribute called `file_size`" do
|
32
|
-
@uid = "
|
32
|
+
@uid = "image_1"
|
33
33
|
@asset = client.asset(@uid).fetch
|
34
34
|
expect(@asset.file_size).not_to be nil
|
35
35
|
end
|
36
36
|
|
37
37
|
it "has attribute called `filename`" do
|
38
|
-
@uid = "
|
38
|
+
@uid = "image_1"
|
39
39
|
@asset = client.asset(@uid).fetch
|
40
40
|
expect(@asset.filename).not_to be nil
|
41
41
|
end
|
42
42
|
|
43
43
|
it "has attribute called `content_type`" do
|
44
|
-
@uid = "
|
44
|
+
@uid = "image_1"
|
45
45
|
@asset = client.asset(@uid).fetch
|
46
46
|
expect(@asset.content_type).not_to be nil
|
47
47
|
end
|
data/spec/entry_spec.rb
CHANGED
@@ -3,8 +3,10 @@ require_relative '../lib/contentstack.rb'
|
|
3
3
|
|
4
4
|
describe Contentstack::Entry do
|
5
5
|
let(:client) { create_client }
|
6
|
-
let(:
|
6
|
+
let(:preview_client) { create_preview_client }
|
7
|
+
let(:uid) { "uid" }
|
7
8
|
let(:category) {client.content_type("category").entry(uid)}
|
9
|
+
let(:preview_category) {preview_client.content_type("category").entry(uid)}
|
8
10
|
let(:product) {client.content_type("product").entry(uid)}
|
9
11
|
|
10
12
|
it "Contentstack::EntryCollection should have Contentstack::Entry instance" do
|
@@ -18,6 +20,12 @@ describe Contentstack::Entry do
|
|
18
20
|
expect(data.class).to eq Contentstack::Entry
|
19
21
|
end
|
20
22
|
|
23
|
+
it "is preview entry featch" do
|
24
|
+
preview_client.live_preview_query({hash: 'hash', content_type_uid: 'category'})
|
25
|
+
data = preview_category.fetch
|
26
|
+
expect(data.class).to eq Contentstack::Entry
|
27
|
+
end
|
28
|
+
|
21
29
|
it 'has a method `get` to get attributes data' do
|
22
30
|
data = category.fetch
|
23
31
|
expect(data.get('uid')).to eq uid
|
data/spec/fixtures/asset.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"asset":{"uid":"
|
1
|
+
{"asset":{"uid":"image_1","created_at":"2017-09-07T01:31:59.139Z","updated_at":"2017-09-07T01:31:59.139Z","created_by":"user","updated_by":"user","content_type":"image/png","file_size":"241691","tags":["tag1","tag2"],"filename":"maybe.png","url":"url","ACL":{},"is_dir":false,"parent_uid":null,"_version":1,"title":"maybe.png","description":""}}
|
@@ -1 +1 @@
|
|
1
|
-
{"assets":[{"uid":"
|
1
|
+
{"assets":[{"uid":"image_1","created_at":"2017-09-10T20:27:00.488Z","updated_at":"2017-09-10T20:27:00.488Z","created_by":"user","updated_by":"user","content_type":"image/jpeg","file_size":"115545","tags":[],"filename":"Win Against Dortmund.jpg","url":"image_url_1","ACL":{},"is_dir":false,"_version":1,"title":"Win Against Dortmund.jpg"},{"uid":"image_2","created_at":"2017-09-07T01:31:59.139Z","updated_at":"2017-09-07T01:31:59.139Z","created_by":"user","updated_by":"user","content_type":"image/png","file_size":"241691","tags":["tag1","tag2"],"filename":"maybe.png","url":"image_url_2","ACL":{},"is_dir":false,"parent_uid":null,"_version":1,"title":"maybe.png","description":""}]}
|
@@ -1 +1 @@
|
|
1
|
-
{"content_type":{"created_at":"2017-09-28T06:04:02.500Z","updated_at":"2017-09-28T07:13:13.612Z","title":"Product","uid":"product","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"display_name":"URL","uid":"url","data_type":"text","mandatory":false,"field_metadata":{"_default":true},"multiple":false,"unique":false},{"data_type":"text","display_name":"Price","uid":"price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Discounted Price","uid":"discounted_price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Featured Image","uid":"featured_image","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Product Images","uid":"product_images","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":true,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Categories","reference_to":"category","field_metadata":{"ref_multiple":true},"uid":"categories","multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Related Products","reference_to":"product","field_metadata":{"ref_multiple":true},"uid":"related_products","mandatory":false,"multiple":false,"unique":false}],"last_activity":{"environments":[{"uid":"
|
1
|
+
{"content_type":{"created_at":"2017-09-28T06:04:02.500Z","updated_at":"2017-09-28T07:13:13.612Z","title":"Product","uid":"product","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"display_name":"URL","uid":"url","data_type":"text","mandatory":false,"field_metadata":{"_default":true},"multiple":false,"unique":false},{"data_type":"text","display_name":"Price","uid":"price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Discounted Price","uid":"discounted_price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Featured Image","uid":"featured_image","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Product Images","uid":"product_images","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":true,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Categories","reference_to":"category","field_metadata":{"ref_multiple":true},"uid":"categories","multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Related Products","reference_to":"product","field_metadata":{"ref_multiple":true},"uid":"related_products","mandatory":false,"multiple":false,"unique":false}],"last_activity":{"environments":[{"uid":"env","details":[{"locale":"en-us","time":"2017-09-28T09:43:24.028Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":true,"singleton":false,"title":"title","sub_title":[],"url_pattern":"/:unique_id","url_prefix":"/products/"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]},"SYS_ACL":{"others":{"read":false,"create":false,"update":false,"delete":false,"sub_acl":{"read":false,"create":false,"update":false,"delete":false,"publish":false}},"roles":[{"uid":"role","read":true,"create":false,"update":false,"delete":false,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}},{"uid":"role2","read":true,"create":true,"update":true,"delete":true,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"entry":{"title":"Apple Products","tags":[],"locale":"en-us","uid":"
|
1
|
+
{"entry":{"title":"Apple Products","tags":[],"locale":"en-us","uid":"uid","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:08:21.276Z","updated_at":"2017-09-28T06:08:21.276Z","ACL":{},"_version":1}, "schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"content_type":{"created_at":"2017-08-28T11:26:16.005Z","updated_at":"2017-08-28T11:26:28.217Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"last_activity":{"environments":[{"uid":"environment","details":[{"locale":"en-us","time":"2017-09-28T09:37:14.441Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"entries":[{"title":"Home & Appliances","tags":[],"locale":"en-us","uid":"
|
1
|
+
{"entries":[{"title":"Home & Appliances","tags":[],"locale":"en-us","uid":"uid_1","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:08:32.914Z","updated_at":"2017-09-28T06:08:32.914Z","ACL":{},"_version":1,"_owner":{}},{"title":"Apple Products","tags":[],"locale":"en-us","uid":"uid_2","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:08:21.276Z","updated_at":"2017-09-28T06:08:21.276Z","ACL":{},"_version":1,"_owner":{}},{"title":"Smartphones","tags":[],"locale":"en-us","uid":"uid_3","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:37.132Z","updated_at":"2017-09-28T06:07:37.132Z","ACL":{},"_version":1,"_owner":{}},{"title":"Tablets","tags":[],"locale":"en-us","uid":"uid_4","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:20.740Z","updated_at":"2017-09-28T06:07:20.740Z","ACL":{},"_version":1,"_owner":{}},{"title":"Headphones","tags":[],"locale":"en-us","uid":"uid_5","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:07.673Z","updated_at":"2017-09-28T06:07:07.673Z","ACL":{},"_version":1,"_owner":{}}],"count":5,"content_type":{"created_at":"2017-09-28T06:06:44.057Z","updated_at":"2017-09-28T06:06:49.125Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false}],"last_activity":{"environments":[{"uid":"environment","details":[{"locale":"en-us","time":"2017-09-28T09:43:24.027Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]}},"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"content_type":{"created_at":"2017-08-28T11:26:16.005Z","updated_at":"2017-08-28T11:26:28.217Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"last_activity":{"environments":[{"uid":"environment","details":[{"locale":"en-us","time":"2017-09-28T09:37:14.441Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"entries":[{"title":"Home & Appliances","tags":[],"locale":"en-us","uid":"
|
1
|
+
{"entries":[{"title":"Home & Appliances","tags":[],"locale":"en-us","uid":"uid_1","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:08:32.914Z","updated_at":"2017-09-28T06:08:32.914Z","ACL":{},"_version":1},{"title":"Apple Products","tags":[],"locale":"en-us","uid":"uid_2","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:08:21.276Z","updated_at":"2017-09-28T06:08:21.276Z","ACL":{},"_version":1},{"title":"Smartphones","tags":[],"locale":"en-us","uid":"uid_3","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:37.132Z","updated_at":"2017-09-28T06:07:37.132Z","ACL":{},"_version":1},{"title":"Tablets","tags":[],"locale":"en-us","uid":"uid_4","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:20.740Z","updated_at":"2017-09-28T06:07:20.740Z","ACL":{},"_version":1},{"title":"Headphones","tags":[],"locale":"en-us","uid":"uid5","created_by":"user","updated_by":"user","created_at":"2017-09-28T06:07:07.673Z","updated_at":"2017-09-28T06:07:07.673Z","ACL":{},"_version":1}],"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"content_type":{"created_at":"2017-08-28T11:26:16.005Z","updated_at":"2017-08-28T11:26:28.217Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"last_activity":{"environments":[{"uid":"uid6","details":[{"locale":"en-us","time":"2017-09-28T09:37:14.441Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"uid_7","read":true,"sub_acl":{"read":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"content_types":[{"created_at":"2017-09-28T06:04:02.500Z","updated_at":"2017-09-28T07:13:13.612Z","title":"Product","uid":"product","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"display_name":"URL","uid":"url","data_type":"text","mandatory":false,"field_metadata":{"_default":true},"multiple":false,"unique":false},{"data_type":"text","display_name":"Price","uid":"price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Discounted Price","uid":"discounted_price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Featured Image","uid":"featured_image","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Product Images","uid":"product_images","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":true,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Categories","reference_to":"category","field_metadata":{"ref_multiple":true},"uid":"categories","multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Related Products","reference_to":"product","field_metadata":{"ref_multiple":true},"uid":"related_products","mandatory":false,"multiple":false,"unique":false}],"last_activity":{"environments":[{"uid":"
|
1
|
+
{"content_types":[{"created_at":"2017-09-28T06:04:02.500Z","updated_at":"2017-09-28T07:13:13.612Z","title":"Product","uid":"product","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"display_name":"URL","uid":"url","data_type":"text","mandatory":false,"field_metadata":{"_default":true},"multiple":false,"unique":false},{"data_type":"text","display_name":"Price","uid":"price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Discounted Price","uid":"discounted_price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Featured Image","uid":"featured_image","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Product Images","uid":"product_images","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":true,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Categories","reference_to":"category","field_metadata":{"ref_multiple":true},"uid":"categories","multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Related Products","reference_to":"product","field_metadata":{"ref_multiple":true},"uid":"related_products","mandatory":false,"multiple":false,"unique":false}],"last_activity":{"environments":[{"uid":"environment","details":[{"locale":"en-us","time":"2017-09-28T09:43:24.028Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":true,"singleton":false,"title":"title","sub_title":[],"url_pattern":"/:unique_id","url_prefix":"/products/"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]},"SYS_ACL":{"others":{"read":false,"create":false,"update":false,"delete":false,"sub_acl":{"read":false,"create":false,"update":false,"delete":false,"publish":false}},"roles":[{"uid":"role","read":true,"create":false,"update":false,"delete":false,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}},{"uid":"role2","read":true,"create":true,"update":true,"delete":true,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}}]}},{"created_at":"2017-09-28T06:06:44.057Z","updated_at":"2017-09-28T06:06:49.125Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false}],"last_activity":{"environments":[{"uid":"environment","details":[{"locale":"en-us","time":"2017-09-28T09:43:24.027Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"user","read":true,"sub_acl":{"read":true}}]},"SYS_ACL":{"others":{"read":false,"create":false,"update":false,"delete":false,"sub_acl":{"read":false,"create":false,"update":false,"delete":false,"publish":false}},"roles":[{"uid":"role","read":true,"create":false,"update":false,"delete":false,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}},{"uid":"role2","read":true,"create":true,"update":true,"delete":true,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}}]}}]}
|
@@ -1 +1 @@
|
|
1
|
-
{"entry":{"title":"Motorola Moto X4","url":"/products/
|
1
|
+
{"entry":{"title":"Motorola Moto X4","url":"/products/product_1_uid","price":"500","discounted_price":"450","featured_image":{"uid":"product_2_uid","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"image_url","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"created_by_string"}},"product_images":[{"uid":"product_2_uid","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"image_url","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"created_by_string"}},{"uid":"product_3_uid","created_at":"2017-09-28T07:02:30.108Z","updated_at":"2017-09-28T07:02:30.108Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"4226","tags":[],"filename":"2.jpg","url":"image_2_url","ACL":{},"is_dir":false,"_version":1,"title":"2.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"created_by_string"}},{"uid":"product_4_uid","created_at":"2017-09-28T07:02:32.375Z","updated_at":"2017-09-28T07:02:32.375Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"5755","tags":[],"filename":"3.jpg","url":"image_3_url","ACL":{},"is_dir":false,"_version":1,"title":"3.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"created_by_string"}},{"uid":"product_4_uid","created_at":"2017-09-28T07:02:36.507Z","updated_at":"2017-09-28T07:02:36.507Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"312464","tags":[],"filename":"4.jpg","url":"image_4_url","ACL":{},"is_dir":false,"_version":1,"title":"4.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"created_by_string"}}],"description":"dual cameras.\nsingular design.\nAdvanced dual rear cameras for your best photos yet. Plus, a beautiful contoured glass and metal frame with an IP68 water resistance rating.* Coming soon.","categories":[{"title":"Smartphones","tags":[],"locale":"en-us","uid":"product_5_uid","created_by":"created_by_string","updated_by":"created_by_string","created_at":"2017-09-28T06:07:37.132Z","updated_at":"2017-09-28T06:07:37.132Z","ACL":{},"_version":1,"publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.932Z","user":"created_by_string"},"_publish_environment":"environment_uid","_publish_locale":"en-us","_publish_scheduled":false}],"related_products":[{"title":"OnePlus 3T A3000 64GB Gunmetal","url":"/products/product_9_uid","price":"539","discounted_price":"499","featured_image":{"uid":"product_6_uid","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"image_5_url","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"created_by_string"}},"product_images":[{"uid":"product_6_uid","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"image_5_url","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"created_by_string"}},{"uid":"product_7_uid","created_at":"2017-09-28T06:56:20.954Z","updated_at":"2017-09-28T06:56:20.954Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"13187","tags":[],"filename":"one-plus-3-2.jpg","url":"image_6_url","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-2.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:42:31.431Z","user":"created_by_string"}},{"uid":"product_8_uid","created_at":"2017-09-28T06:56:24.656Z","updated_at":"2017-09-28T06:56:24.656Z","created_by":"created_by_string","updated_by":"created_by_string","content_type":"image/jpeg","file_size":"27485","tags":[],"filename":"one-plus-3-3.jpg","url":"image_7_url","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-3.jpg","publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:42:26.882Z","user":"created_by_string"}}],"description":"Snapdragon 821 6gb RAM Unlocked Smartphone","categories":["product_5_uid"],"related_products":["product_related_uid"],"tags":[],"locale":"en-us","uid":"product_9_uid","created_by":"created_by_string","updated_by":"created_by_string","created_at":"2017-09-28T06:57:55.574Z","updated_at":"2017-09-28T06:57:55.574Z","ACL":{},"_version":1,"publish_details":{"environment":"environment_uid","locale":"en-us","time":"2017-09-28T09:28:47.933Z","user":"created_by_string"},"_publish_environment":"environment_uid","_publish_locale":"en-us","_publish_scheduled":false}],"tags":[],"locale":"en-us","uid":"product_1_uid","created_by":"created_by_string","updated_by":"created_by_string","created_at":"2017-09-28T07:03:11.350Z","updated_at":"2017-09-28T07:03:11.350Z","ACL":{},"_version":1, "_owner":{}}}
|