contentstack 0.6.3.1 → 0.7.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/.github/workflows/check-branch.yml +20 -0
 - data/.github/workflows/codeql-analysis.yml +68 -68
 - data/.github/workflows/jira.yml +28 -28
 - data/.github/workflows/release-gem.yml +30 -30
 - data/.github/workflows/sast-scan.yml +10 -10
 - data/.github/workflows/sca-scan.yml +15 -15
 - data/.github/workflows/secrets-scan.yml +10 -10
 - data/.gitignore +11 -11
 - data/.yardopts +6 -6
 - data/CHANGELOG.md +129 -114
 - data/CODEOWNERS +1 -1
 - data/CODE_OF_CONDUCT.md +73 -73
 - data/Gemfile +2 -2
 - data/Gemfile.lock +79 -76
 - data/LICENSE.txt +21 -21
 - data/README.md +197 -197
 - data/SECURITY.md +27 -27
 - data/contentstack.gemspec +29 -29
 - data/lib/contentstack/api.rb +191 -191
 - data/lib/contentstack/asset.rb +68 -68
 - data/lib/contentstack/asset_collection.rb +27 -27
 - data/lib/contentstack/client.rb +122 -91
 - data/lib/contentstack/content_type.rb +53 -53
 - data/lib/contentstack/entry.rb +235 -221
 - data/lib/contentstack/entry_collection.rb +44 -44
 - data/lib/contentstack/error.rb +6 -6
 - data/lib/contentstack/query.rb +665 -653
 - data/lib/contentstack/region.rb +13 -5
 - data/lib/contentstack/sync_result.rb +29 -29
 - data/lib/contentstack/version.rb +2 -2
 - data/lib/contentstack.rb +31 -31
 - data/lib/util.rb +110 -110
 - data/rakefile.rb +3 -3
 - data/spec/asset_collection_spec.rb +15 -15
 - data/spec/asset_spec.rb +47 -47
 - data/spec/content_type_spec.rb +80 -80
 - data/spec/contentstack_spec.rb +63 -38
 - data/spec/entry_collection_spec.rb +41 -41
 - data/spec/entry_spec.rb +116 -101
 - 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 +2974 -2974
 - data/spec/query_spec.rb +210 -205
 - data/spec/spec_helper.rb +180 -180
 - data/spec/sync_spec.rb +26 -26
 - metadata +4 -3
 
    
        data/spec/contentstack_spec.rb
    CHANGED
    
    | 
         @@ -1,39 +1,64 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       2 
     | 
    
         
            -
            require_relative '../lib/contentstack.rb'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            describe Contentstack do
         
     | 
| 
       5 
     | 
    
         
            -
              let(:client) { create_client }
         
     | 
| 
       6 
     | 
    
         
            -
              let(:eu_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {region: Contentstack::Region::EU}) }
         
     | 
| 
       7 
     | 
    
         
            -
              let(: 
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
               
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
               
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
              it "has  
     | 
| 
       14 
     | 
    
         
            -
                expect(Contentstack:: 
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                expect( 
     | 
| 
       20 
     | 
    
         
            -
                expect( 
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                expect( 
     | 
| 
       26 
     | 
    
         
            -
               
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
               
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
               
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require_relative '../lib/contentstack.rb'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe Contentstack do
         
     | 
| 
      
 5 
     | 
    
         
            +
              let(:client) { create_client }
         
     | 
| 
      
 6 
     | 
    
         
            +
              let(:eu_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {region: Contentstack::Region::EU}) }
         
     | 
| 
      
 7 
     | 
    
         
            +
              let(:azure_na_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {region: Contentstack::Region::AZURE_NA}) }
         
     | 
| 
      
 8 
     | 
    
         
            +
              let(:azure_eu_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {region: Contentstack::Region::AZURE_EU}) }
         
     | 
| 
      
 9 
     | 
    
         
            +
              let(:custom_host_eu_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {host: "contentstack.com", region: Contentstack::Region::EU}) }
         
     | 
| 
      
 10 
     | 
    
         
            +
              let(:custom_host_azure_eu_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {host: "contentstack.com", region: Contentstack::Region::AZURE_EU}) }
         
     | 
| 
      
 11 
     | 
    
         
            +
              let(:custom_host_azure_na_client) { create_client('DELIVERY_TOKEN_TOKEN', 'API_KEY', 'STACK_ENV', {host: "contentstack.com", region: Contentstack::Region::AZURE_NA}) }
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              it "has a version number" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                expect(Contentstack::VERSION).not_to be nil
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              it "has region data" do
         
     | 
| 
      
 18 
     | 
    
         
            +
                expect(Contentstack::Region::EU).not_to be 'eu'
         
     | 
| 
      
 19 
     | 
    
         
            +
                expect(Contentstack::Region::US).not_to be 'us'
         
     | 
| 
      
 20 
     | 
    
         
            +
                expect(Contentstack::Region::AZURE_NA).not_to be 'azure-na'
         
     | 
| 
      
 21 
     | 
    
         
            +
                expect(Contentstack::Region::AZURE_EU).not_to be 'azure-eu'
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              it "has default host and region" do
         
     | 
| 
      
 25 
     | 
    
         
            +
                expect(client.region).to eq Contentstack::Region::US
         
     | 
| 
      
 26 
     | 
    
         
            +
                expect(client.host).to eq 'https://cdn.contentstack.io'  
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              it "has custom region with region host" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                expect(eu_client.region).to eq Contentstack::Region::EU
         
     | 
| 
      
 31 
     | 
    
         
            +
                expect(eu_client.host).to eq 'https://eu-cdn.contentstack.com'  
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              it "has custom region with region host" do
         
     | 
| 
      
 35 
     | 
    
         
            +
                expect(azure_na_client.region).to eq Contentstack::Region::AZURE_NA
         
     | 
| 
      
 36 
     | 
    
         
            +
                expect(azure_na_client.host).to eq 'https://azure-na-cdn.contentstack.com'  
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
              it "has custom region with region host" do
         
     | 
| 
      
 40 
     | 
    
         
            +
                expect(azure_eu_client.region).to eq Contentstack::Region::AZURE_EU
         
     | 
| 
      
 41 
     | 
    
         
            +
                expect(azure_eu_client.host).to eq 'https://azure-eu-cdn.contentstack.com'  
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              it "has custom host and eu region" do
         
     | 
| 
      
 45 
     | 
    
         
            +
                expect(custom_host_eu_client.host).to eq 'https://eu-cdn.contentstack.com'  
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              it "has custom host and azure-eu region" do
         
     | 
| 
      
 49 
     | 
    
         
            +
                expect(custom_host_azure_eu_client.host).to eq 'https://azure-eu-cdn.contentstack.com'  
         
     | 
| 
      
 50 
     | 
    
         
            +
              end
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
              it "has custom host and azure-na region" do
         
     | 
| 
      
 53 
     | 
    
         
            +
                expect(custom_host_azure_na_client.host).to eq 'https://azure-na-cdn.contentstack.com'  
         
     | 
| 
      
 54 
     | 
    
         
            +
              end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
              it "JSON to HTML" do
         
     | 
| 
      
 58 
     | 
    
         
            +
                expect(Contentstack::json_to_html({}, ContentstackUtils::Model::Options.new())).to eq ''  
         
     | 
| 
      
 59 
     | 
    
         
            +
              end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
              it "JSON to HTML" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                expect(Contentstack::render_content('', ContentstackUtils::Model::Options.new())).to eq ''  
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
       39 
64 
     | 
    
         
             
            end
         
     | 
| 
         @@ -1,42 +1,42 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       2 
     | 
    
         
            -
            require_relative '../lib/contentstack.rb'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            describe Contentstack::EntryCollection do
         
     | 
| 
       5 
     | 
    
         
            -
              let(:client) { create_client }
         
     | 
| 
       6 
     | 
    
         
            -
              
         
     | 
| 
       7 
     | 
    
         
            -
              it "has no instance variable `count`" do
         
     | 
| 
       8 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       9 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       10 
     | 
    
         
            -
                expect(@data.count).to be nil
         
     | 
| 
       11 
     | 
    
         
            -
              end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
              it "has instance variable `count`" do
         
     | 
| 
       14 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       15 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       16 
     | 
    
         
            -
                expect(@countdata.count).not_to be nil
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              it "has instance variable `entries`" do
         
     | 
| 
       20 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       21 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       22 
     | 
    
         
            -
                expect(@data.entries).not_to be nil
         
     | 
| 
       23 
     | 
    
         
            -
              end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
              it "has the same entry using `first` method" do
         
     | 
| 
       26 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       27 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       28 
     | 
    
         
            -
                expect(@data.entries[0].uid).to eq @data.first.uid
         
     | 
| 
       29 
     | 
    
         
            -
              end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
              it "has the same entry using `last` method" do
         
     | 
| 
       32 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       33 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       34 
     | 
    
         
            -
                expect(@data.entries[-1].uid).to eq @data.last.uid
         
     | 
| 
       35 
     | 
    
         
            -
              end
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
              it "has the same entry using `get` method" do
         
     | 
| 
       38 
     | 
    
         
            -
                @data = client.content_type("category").query.fetch
         
     | 
| 
       39 
     | 
    
         
            -
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
       40 
     | 
    
         
            -
                expect(@data.entries[3].uid).to eq @data.get(3).uid
         
     | 
| 
       41 
     | 
    
         
            -
              end
         
     | 
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require_relative '../lib/contentstack.rb'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe Contentstack::EntryCollection do
         
     | 
| 
      
 5 
     | 
    
         
            +
              let(:client) { create_client }
         
     | 
| 
      
 6 
     | 
    
         
            +
              
         
     | 
| 
      
 7 
     | 
    
         
            +
              it "has no instance variable `count`" do
         
     | 
| 
      
 8 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 9 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 10 
     | 
    
         
            +
                expect(@data.count).to be nil
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              it "has instance variable `count`" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 15 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 16 
     | 
    
         
            +
                expect(@countdata.count).not_to be nil
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
              it "has instance variable `entries`" do
         
     | 
| 
      
 20 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 21 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 22 
     | 
    
         
            +
                expect(@data.entries).not_to be nil
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              it "has the same entry using `first` method" do
         
     | 
| 
      
 26 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 27 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 28 
     | 
    
         
            +
                expect(@data.entries[0].uid).to eq @data.first.uid
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
              it "has the same entry using `last` method" do
         
     | 
| 
      
 32 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 33 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 34 
     | 
    
         
            +
                expect(@data.entries[-1].uid).to eq @data.last.uid
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
              it "has the same entry using `get` method" do
         
     | 
| 
      
 38 
     | 
    
         
            +
                @data = client.content_type("category").query.fetch
         
     | 
| 
      
 39 
     | 
    
         
            +
                @countdata = client.content_type("category").query.include_count.fetch
         
     | 
| 
      
 40 
     | 
    
         
            +
                expect(@data.entries[3].uid).to eq @data.get(3).uid
         
     | 
| 
      
 41 
     | 
    
         
            +
              end
         
     | 
| 
       42 
42 
     | 
    
         
             
            end
         
     | 
    
        data/spec/entry_spec.rb
    CHANGED
    
    | 
         @@ -1,102 +1,117 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       2 
     | 
    
         
            -
            require_relative '../lib/contentstack.rb'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            describe Contentstack::Entry do
         
     | 
| 
       5 
     | 
    
         
            -
              let(:client) { create_client }
         
     | 
| 
       6 
     | 
    
         
            -
              let(:preview_client) { create_preview_client }
         
     | 
| 
       7 
     | 
    
         
            -
              let(:uid) { "uid" }
         
     | 
| 
       8 
     | 
    
         
            -
              let(:category) {client.content_type("category").entry(uid)}
         
     | 
| 
       9 
     | 
    
         
            -
              let(:preview_category) {preview_client.content_type("category").entry(uid)}
         
     | 
| 
       10 
     | 
    
         
            -
              let(:product) {client.content_type("product").entry(uid)}
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              it "Contentstack::EntryCollection should have Contentstack::Entry instance" do
         
     | 
| 
       13 
     | 
    
         
            -
                data = client.content_type("category").query.fetch
         
     | 
| 
       14 
     | 
    
         
            -
                expect(data.class).to eq Contentstack::EntryCollection
         
     | 
| 
       15 
     | 
    
         
            -
                expect(data.first.class).to eq Contentstack::Entry
         
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              it "is an instance of Contentstack::Entry if single entry is fetched" do
         
     | 
| 
       19 
     | 
    
         
            -
                data = category.fetch
         
     | 
| 
       20 
     | 
    
         
            -
                expect(data.class).to eq Contentstack::Entry
         
     | 
| 
       21 
     | 
    
         
            -
              end
         
     | 
| 
       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 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
              it 'has a method `get` to get attributes data' do
         
     | 
| 
       30 
     | 
    
         
            -
                data = category.fetch
         
     | 
| 
       31 
     | 
    
         
            -
                expect(data.get('uid')).to eq uid
         
     | 
| 
       32 
     | 
    
         
            -
              end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
              it "should set locale the in the request entry" do
         
     | 
| 
       35 
     | 
    
         
            -
                data = category.locale('en-us')
         
     | 
| 
       36 
     | 
    
         
            -
                expect(data.query[:locale]).to eq 'en-us'
         
     | 
| 
       37 
     | 
    
         
            -
              end
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
              it "should get data using `only` method with string parameter" do
         
     | 
| 
       40 
     | 
    
         
            -
                data = category.fetch
         
     | 
| 
       41 
     | 
    
         
            -
                expect(data.fields[:title]).not_to be nil
         
     | 
| 
       42 
     | 
    
         
            -
                expect(data.fields[:uid]).not_to be nil
         
     | 
| 
       43 
     | 
    
         
            -
              end
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
              it "should get data using `only` method with array parameter" do
         
     | 
| 
       46 
     | 
    
         
            -
                data = category.only(["title"]).fetch
         
     | 
| 
       47 
     | 
    
         
            -
                expect(data.fields[:title]).not_to be nil
         
     | 
| 
       48 
     | 
    
         
            -
                expect(data.fields[:uid]).not_to be nil
         
     | 
| 
       49 
     | 
    
         
            -
              end
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
              it "should get data using `except` method with string parameter" do
         
     | 
| 
       52 
     | 
    
         
            -
                data = category.except("category_tags").fetch
         
     | 
| 
       53 
     | 
    
         
            -
                expect(data.fields[:category_tags]).to be nil
         
     | 
| 
       54 
     | 
    
         
            -
              end
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
              it "should get data using `except` method with array parameter" do
         
     | 
| 
       57 
     | 
    
         
            -
                data = category.except(["description"]).fetch
         
     | 
| 
       58 
     | 
    
         
            -
                expect(data.fields[:description]).to be nil
         
     | 
| 
       59 
     | 
    
         
            -
              end
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
              it "should get data using `only` method for reference fields" do
         
     | 
| 
       62 
     | 
    
         
            -
                data = product.include_reference('categories').only("categories", ["title", "description"]).fetch
         
     | 
| 
       63 
     | 
    
         
            -
                expect(data.fields[:categories][0][:title]).to eq "Smartphones"
         
     | 
| 
       64 
     | 
    
         
            -
              end
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
              it "should get data using `except` method for reference fields" do
         
     | 
| 
       67 
     | 
    
         
            -
                data = product.include_reference('categories').except("categories", "title").fetch
         
     | 
| 
       68 
     | 
    
         
            -
                expect(data.fields[:categories][0][:title]).to eq 'Smartphones'
         
     | 
| 
       69 
     | 
    
         
            -
              end
         
     | 
| 
       70 
     | 
    
         
            -
              
         
     | 
| 
       71 
     | 
    
         
            -
              it "should get data using `include_schema` method" do
         
     | 
| 
       72 
     | 
    
         
            -
                data = category.include_schema.fetch
         
     | 
| 
       73 
     | 
    
         
            -
                expect(data.schema).not_to be nil
         
     | 
| 
       74 
     | 
    
         
            -
              end
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
              it "should get data using `include_owner` method" do
         
     | 
| 
       77 
     | 
    
         
            -
                data = product.include_owner.fetch
         
     | 
| 
       78 
     | 
    
         
            -
                expect(data.fields[:_owner]).not_to be nil
         
     | 
| 
       79 
     | 
    
         
            -
              end
         
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
              it "should get data using `include_owner` method" do
         
     | 
| 
       82 
     | 
    
         
            -
                data = product.include_fallback.fetch
         
     | 
| 
       83 
     | 
    
         
            -
                expect(data.fields[:locale]).not_to be nil
         
     | 
| 
       84 
     | 
    
         
            -
              end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
              it "should get data using `include_content_type` method" do
         
     | 
| 
       87 
     | 
    
         
            -
                data = category.include_content_type.fetch
         
     | 
| 
       88 
     | 
    
         
            -
                expect(data.content_type).not_to be nil
         
     | 
| 
       89 
     | 
    
         
            -
              end
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
              it "should get data using ` 
     | 
| 
       92 
     | 
    
         
            -
                data =  
     | 
| 
       93 
     | 
    
         
            -
                 
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
                data 
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
               
     | 
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require_relative '../lib/contentstack.rb'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe Contentstack::Entry do
         
     | 
| 
      
 5 
     | 
    
         
            +
              let(:client) { create_client }
         
     | 
| 
      
 6 
     | 
    
         
            +
              let(:preview_client) { create_preview_client }
         
     | 
| 
      
 7 
     | 
    
         
            +
              let(:uid) { "uid" }
         
     | 
| 
      
 8 
     | 
    
         
            +
              let(:category) {client.content_type("category").entry(uid)}
         
     | 
| 
      
 9 
     | 
    
         
            +
              let(:preview_category) {preview_client.content_type("category").entry(uid)}
         
     | 
| 
      
 10 
     | 
    
         
            +
              let(:product) {client.content_type("product").entry(uid)}
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              it "Contentstack::EntryCollection should have Contentstack::Entry instance" do
         
     | 
| 
      
 13 
     | 
    
         
            +
                data = client.content_type("category").query.fetch
         
     | 
| 
      
 14 
     | 
    
         
            +
                expect(data.class).to eq Contentstack::EntryCollection
         
     | 
| 
      
 15 
     | 
    
         
            +
                expect(data.first.class).to eq Contentstack::Entry
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              it "is an instance of Contentstack::Entry if single entry is fetched" do
         
     | 
| 
      
 19 
     | 
    
         
            +
                data = category.fetch
         
     | 
| 
      
 20 
     | 
    
         
            +
                expect(data.class).to eq Contentstack::Entry
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
      
 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 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              it 'has a method `get` to get attributes data' do
         
     | 
| 
      
 30 
     | 
    
         
            +
                data = category.fetch
         
     | 
| 
      
 31 
     | 
    
         
            +
                expect(data.get('uid')).to eq uid
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              it "should set locale the in the request entry" do
         
     | 
| 
      
 35 
     | 
    
         
            +
                data = category.locale('en-us')
         
     | 
| 
      
 36 
     | 
    
         
            +
                expect(data.query[:locale]).to eq 'en-us'
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
              it "should get data using `only` method with string parameter" do
         
     | 
| 
      
 40 
     | 
    
         
            +
                data = category.fetch
         
     | 
| 
      
 41 
     | 
    
         
            +
                expect(data.fields[:title]).not_to be nil
         
     | 
| 
      
 42 
     | 
    
         
            +
                expect(data.fields[:uid]).not_to be nil
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
              it "should get data using `only` method with array parameter" do
         
     | 
| 
      
 46 
     | 
    
         
            +
                data = category.only(["title"]).fetch
         
     | 
| 
      
 47 
     | 
    
         
            +
                expect(data.fields[:title]).not_to be nil
         
     | 
| 
      
 48 
     | 
    
         
            +
                expect(data.fields[:uid]).not_to be nil
         
     | 
| 
      
 49 
     | 
    
         
            +
              end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
              it "should get data using `except` method with string parameter" do
         
     | 
| 
      
 52 
     | 
    
         
            +
                data = category.except("category_tags").fetch
         
     | 
| 
      
 53 
     | 
    
         
            +
                expect(data.fields[:category_tags]).to be nil
         
     | 
| 
      
 54 
     | 
    
         
            +
              end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
              it "should get data using `except` method with array parameter" do
         
     | 
| 
      
 57 
     | 
    
         
            +
                data = category.except(["description"]).fetch
         
     | 
| 
      
 58 
     | 
    
         
            +
                expect(data.fields[:description]).to be nil
         
     | 
| 
      
 59 
     | 
    
         
            +
              end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
              it "should get data using `only` method for reference fields" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                data = product.include_reference('categories').only("categories", ["title", "description"]).fetch
         
     | 
| 
      
 63 
     | 
    
         
            +
                expect(data.fields[:categories][0][:title]).to eq "Smartphones"
         
     | 
| 
      
 64 
     | 
    
         
            +
              end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
              it "should get data using `except` method for reference fields" do
         
     | 
| 
      
 67 
     | 
    
         
            +
                data = product.include_reference('categories').except("categories", "title").fetch
         
     | 
| 
      
 68 
     | 
    
         
            +
                expect(data.fields[:categories][0][:title]).to eq 'Smartphones'
         
     | 
| 
      
 69 
     | 
    
         
            +
              end
         
     | 
| 
      
 70 
     | 
    
         
            +
              
         
     | 
| 
      
 71 
     | 
    
         
            +
              it "should get data using `include_schema` method" do
         
     | 
| 
      
 72 
     | 
    
         
            +
                data = category.include_schema.fetch
         
     | 
| 
      
 73 
     | 
    
         
            +
                expect(data.schema).not_to be nil
         
     | 
| 
      
 74 
     | 
    
         
            +
              end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
              it "should get data using `include_owner` method" do
         
     | 
| 
      
 77 
     | 
    
         
            +
                data = product.include_owner.fetch
         
     | 
| 
      
 78 
     | 
    
         
            +
                expect(data.fields[:_owner]).not_to be nil
         
     | 
| 
      
 79 
     | 
    
         
            +
              end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
              it "should get data using `include_owner` method" do
         
     | 
| 
      
 82 
     | 
    
         
            +
                data = product.include_fallback.fetch
         
     | 
| 
      
 83 
     | 
    
         
            +
                expect(data.fields[:locale]).not_to be nil
         
     | 
| 
      
 84 
     | 
    
         
            +
              end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
              it "should get data using `include_content_type` method" do
         
     | 
| 
      
 87 
     | 
    
         
            +
                data = category.include_content_type.fetch
         
     | 
| 
      
 88 
     | 
    
         
            +
                expect(data.content_type).not_to be nil
         
     | 
| 
      
 89 
     | 
    
         
            +
              end
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
              it "should get data using `include_metadata` method" do
         
     | 
| 
      
 92 
     | 
    
         
            +
                data = category.include_metadata.fetch
         
     | 
| 
      
 93 
     | 
    
         
            +
                expect(data.content_type).not_to be nil
         
     | 
| 
      
 94 
     | 
    
         
            +
              end
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
              it "should get data using `include_metadata` method with param false" do
         
     | 
| 
      
 97 
     | 
    
         
            +
                data = category.include_metadata(false).fetch
         
     | 
| 
      
 98 
     | 
    
         
            +
                expect(data.content_type).not_to be nil
         
     | 
| 
      
 99 
     | 
    
         
            +
              end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
              it "should get data using `include_metadata` method with param true" do
         
     | 
| 
      
 102 
     | 
    
         
            +
                data = category.include_metadata(true).fetch
         
     | 
| 
      
 103 
     | 
    
         
            +
                expect(data.content_type).not_to be nil
         
     | 
| 
      
 104 
     | 
    
         
            +
              end
         
     | 
| 
      
 105 
     | 
    
         
            +
              
         
     | 
| 
      
 106 
     | 
    
         
            +
              it "should get data using `include_reference` method" do
         
     | 
| 
      
 107 
     | 
    
         
            +
                data = product.include_reference('categories').fetch
         
     | 
| 
      
 108 
     | 
    
         
            +
                puts data.get("categories.title")
         
     | 
| 
      
 109 
     | 
    
         
            +
                expect(data.fields[:categories][0][:title]).not_to be nil
         
     | 
| 
      
 110 
     | 
    
         
            +
              end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
              it "should get data using `include_embedded_items` method" do
         
     | 
| 
      
 113 
     | 
    
         
            +
                data = product.include_embedded_items().fetch
         
     | 
| 
      
 114 
     | 
    
         
            +
                puts data.get("categories.title")
         
     | 
| 
      
 115 
     | 
    
         
            +
                expect(data.fields[:categories][0][:title]).not_to be nil
         
     | 
| 
      
 116 
     | 
    
         
            +
              end
         
     | 
| 
       102 
117 
     | 
    
         
             
            end
         
     | 
    
        data/spec/fixtures/asset.json
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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":"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 
     | 
    
         
            +
            {"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/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":{}}}
         
     | 
| 
      
 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":{}}}
         
     |