forest_admin_agent 1.0.0.pre.beta.109 → 1.0.0.pre.beta.110
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/lib/forest_admin_agent/routes/resources/csv.rb +5 -4
 - data/lib/forest_admin_agent/routes/resources/related/csv_related.rb +2 -1
 - data/lib/forest_admin_agent/utils/query_string_parser.rb +4 -0
 - data/lib/forest_admin_agent/utils/schema/schema_emitter.rb +1 -1
 - data/lib/forest_admin_agent/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 817c6bdb6543eefcaa7c24c05183b90856b73d539804c4f953f82fe13ea9577e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9b9d223c01a5656a7ffbd35cfb9bd35d1142f1c0f82e0eccb40eaa8cb5849475
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 04610a9f0d1296907e348d59705d93ddc5986bed3ae6515cc9f8412cce744dc6149065b74d4516f501cb462bacdc451e96bc3b1ee925b5e62c184058f9252199
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 827b483eb423f82facbe127026fe165cc2e8c7c1fd1a406ce5d6ac831733eb761e324704bcfa4bcd98c40eedaccb224179ace6c792011f66722e4aa66ddd0e65
         
     | 
| 
         @@ -27,15 +27,16 @@ module ForestAdminAgent 
     | 
|
| 
       27 
27 
     | 
    
         
             
                          [
         
     | 
| 
       28 
28 
     | 
    
         
             
                            @permissions.get_scope(@collection),
         
     | 
| 
       29 
29 
     | 
    
         
             
                            parse_query_segment(@collection, args, @permissions, @caller),
         
     | 
| 
       30 
     | 
    
         
            -
                             
     | 
| 
      
 30 
     | 
    
         
            +
                            QueryStringParser.parse_condition_tree(
         
     | 
| 
       31 
31 
     | 
    
         
             
                              @collection, args
         
     | 
| 
       32 
32 
     | 
    
         
             
                            )
         
     | 
| 
       33 
33 
     | 
    
         
             
                          ]
         
     | 
| 
       34 
34 
     | 
    
         
             
                        ),
         
     | 
| 
       35 
     | 
    
         
            -
                         
     | 
| 
       36 
     | 
    
         
            -
                         
     | 
| 
      
 35 
     | 
    
         
            +
                        page: QueryStringParser.parse_export_pagination(Facades::Container.config_from_cache[:limit_export_size]),
         
     | 
| 
      
 36 
     | 
    
         
            +
                        search: QueryStringParser.parse_search(@collection, args),
         
     | 
| 
      
 37 
     | 
    
         
            +
                        search_extended: QueryStringParser.parse_search_extended(args)
         
     | 
| 
       37 
38 
     | 
    
         
             
                      )
         
     | 
| 
       38 
     | 
    
         
            -
                      projection =  
     | 
| 
      
 39 
     | 
    
         
            +
                      projection = QueryStringParser.parse_projection(@collection, args)
         
     | 
| 
       39 
40 
     | 
    
         
             
                      records = @collection.list(@caller, filter, projection)
         
     | 
| 
       40 
41 
     | 
    
         
             
                      filename = args[:params][:filename] || "#{args[:params]["collection_name"]}.csv"
         
     | 
| 
       41 
42 
     | 
    
         
             
                      filename += '.csv' unless /\.csv$/i.match?(filename)
         
     | 
| 
         @@ -30,7 +30,8 @@ module ForestAdminAgent 
     | 
|
| 
       30 
30 
     | 
    
         
             
                              @permissions.get_scope(@collection),
         
     | 
| 
       31 
31 
     | 
    
         
             
                              ForestAdminAgent::Utils::QueryStringParser.parse_condition_tree(@child_collection, args)
         
     | 
| 
       32 
32 
     | 
    
         
             
                            ]
         
     | 
| 
       33 
     | 
    
         
            -
                          )
         
     | 
| 
      
 33 
     | 
    
         
            +
                          ),
         
     | 
| 
      
 34 
     | 
    
         
            +
                          page: QueryStringParser.parse_export_pagination(Facades::Container.config_from_cache[:limit_export_size])
         
     | 
| 
       34 
35 
     | 
    
         
             
                        )
         
     | 
| 
       35 
36 
     | 
    
         
             
                        projection = ForestAdminAgent::Utils::QueryStringParser.parse_projection_with_pks(@child_collection, args)
         
     | 
| 
       36 
37 
     | 
    
         
             
                        id = Utils::Id.unpack_id(@collection, args[:params]['id'], with_key: true)
         
     | 
| 
         @@ -74,6 +74,10 @@ module ForestAdminAgent 
     | 
|
| 
       74 
74 
     | 
    
         
             
                    Page.new(offset: offset, limit: items_per_pages.to_i)
         
     | 
| 
       75 
75 
     | 
    
         
             
                  end
         
     | 
| 
       76 
76 
     | 
    
         | 
| 
      
 77 
     | 
    
         
            +
                  def self.parse_export_pagination(limit)
         
     | 
| 
      
 78 
     | 
    
         
            +
                    Page.new(offset: 0, limit: limit&.to_i)
         
     | 
| 
      
 79 
     | 
    
         
            +
                  end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
       77 
81 
     | 
    
         
             
                  def self.parse_search(collection, args)
         
     | 
| 
       78 
82 
     | 
    
         
             
                    search = args.dig(:params, :data, :attributes, :all_records_subset_query, :search) || args.dig(:params, :search)
         
     | 
| 
       79 
83 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: forest_admin_agent
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0.0.pre.beta. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0.pre.beta.110
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Matthieu
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire:
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2025-09- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2025-09-22 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: activesupport
         
     |