ecoportal-api-graphql 0.4.4 → 0.4.5
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/CHANGELOG.md +12 -1
- data/lib/ecoportal/api/graphql/base/action.rb +1 -1
- data/lib/ecoportal/api/graphql/base/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/builder/action.rb +8 -0
- data/lib/ecoportal/api/graphql/connection/action_category.rb +11 -0
- data/lib/ecoportal/api/graphql/connection.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/action.rb +5 -1
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +17 -0
- data/lib/ecoportal/api/graphql/fragment.rb +1 -0
- data/lib/ecoportal/api/graphql/input/action/create.rb +13 -0
- data/lib/ecoportal/api/graphql/input/action.rb +2 -1
- data/lib/ecoportal/api/graphql/model/action.rb +1 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +1 -0
- data/lib/ecoportal/api/graphql/mutation/action/create.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/action.rb +2 -1
- data/lib/ecoportal/api/graphql/payload/action/create.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/action.rb +2 -1
- data/lib/ecoportal/api/graphql/query/action_categories.rb +52 -0
- data/lib/ecoportal/api/graphql/query.rb +1 -0
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3e3519f253819b10dad7bd065d244dd90a3d7cd3e2ebe224f20bc4ccb83185d
|
4
|
+
data.tar.gz: 2045d67da3b50b55feaab8bce0fbd67935c79e9947878e4d9483df1fd2cad596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f64880b73ca0cc855d1d8cbe179e1dda7f79f73b88b9f9d4e41883ef631ee7fac41ced10dc3c1a56f821afe7d9bb4faa239aae86703ffcf4a55a564145c3788
|
7
|
+
data.tar.gz: 1cb72054839f0aa37d35f86c6ba1a55914c65c721bddc03ea6100d0126a4a42c176fecfb917c35e8b0302db85a726ffa59f12d7dbf0a8e07b3a57f28612fdd3f
|
data/CHANGELOG.md
CHANGED
@@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file.
|
|
9
9
|
- Analyse how to "DSL" currentOrganization.action.activities
|
10
10
|
- review `path` tracking
|
11
11
|
|
12
|
-
## [0.4.
|
12
|
+
## [0.4.6] - 2025-03-xx
|
13
13
|
|
14
14
|
### Added
|
15
15
|
|
@@ -17,6 +17,17 @@ All notable changes to this project will be documented in this file.
|
|
17
17
|
|
18
18
|
### Fixed
|
19
19
|
|
20
|
+
## [0.4.5] - 2025-03-14
|
21
|
+
|
22
|
+
### Added
|
23
|
+
|
24
|
+
- Query `actionCategories`
|
25
|
+
- Mutation **create** `Action`
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
|
29
|
+
- `Action` model to have `locations` (**RS** upgrade)
|
30
|
+
|
20
31
|
## [0.4.4] - 2025-02-23
|
21
32
|
|
22
33
|
### Changed
|
@@ -17,6 +17,10 @@ module Ecoportal
|
|
17
17
|
updateMutation.query(**kargs, &block)
|
18
18
|
end
|
19
19
|
|
20
|
+
def create(**kargs, &block)
|
21
|
+
createMutation.query(**kargs, &block)
|
22
|
+
end
|
23
|
+
|
20
24
|
private
|
21
25
|
|
22
26
|
def archiveMutation
|
@@ -26,6 +30,10 @@ module Ecoportal
|
|
26
30
|
def updateMutation
|
27
31
|
Ecoportal::API::GraphQL::Mutation::Action::Update.new(client)
|
28
32
|
end
|
33
|
+
|
34
|
+
def createMutation
|
35
|
+
Ecoportal::API::GraphQL::Mutation::Action::Create.new(client)
|
36
|
+
end
|
29
37
|
end
|
30
38
|
end
|
31
39
|
end
|
@@ -61,5 +61,6 @@ end
|
|
61
61
|
|
62
62
|
require 'ecoportal/api/graphql/fragment/pagination'
|
63
63
|
require 'ecoportal/api/graphql/fragment/location_node'
|
64
|
+
require 'ecoportal/api/graphql/fragment/action_category'
|
64
65
|
require 'ecoportal/api/graphql/fragment/action'
|
65
66
|
require 'ecoportal/api/graphql/fragment/contractor_entity'
|
@@ -12,6 +12,7 @@ module Ecoportal
|
|
12
12
|
embeds_one :completer, klass: Model::PersonMember
|
13
13
|
embeds_many :fileContainers, klass: Model::FileContainer
|
14
14
|
embeds_many :linkedResources, klass: Model::Resource
|
15
|
+
embeds_many :locations, klass: Model::LocationNode
|
15
16
|
#embeds_many :activities, klass: GraphQL::Model::Action::Activity
|
16
17
|
#embeds_one :recurrence, klass: GraphQL::Model::Action::Recurrence
|
17
18
|
end
|
@@ -16,6 +16,7 @@ module Ecoportal
|
|
16
16
|
query :locationStructures, subpath: "locations", query_klass: "Ecoportal::API::GraphQL::Query::LocationStructures"
|
17
17
|
query :contractorEntities, query_klass: "Ecoportal::API::GraphQL::Query::ContractorEntities"
|
18
18
|
#contractorEntity,
|
19
|
+
query :actionCategories, query_klass: "Ecoportal::API::GraphQL::Query::ActionCategories"
|
19
20
|
query :action, query_klass: "Ecoportal::API::GraphQL::Query::Action"
|
20
21
|
query :actions, query_klass: "Ecoportal::API::GraphQL::Query::Actions"
|
21
22
|
query :archiveAction, query_klass: "Ecoportal::API::GraphQL::Mutation::Action::Archive"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Ecoportal
|
2
|
+
module API
|
3
|
+
class GraphQL
|
4
|
+
module Mutation
|
5
|
+
module Action
|
6
|
+
class Create < Ecoportal::API::GraphQL::Logic::Mutation
|
7
|
+
field_name :createAction
|
8
|
+
|
9
|
+
class_resolver :payload_class, Ecoportal::API::GraphQL::Payload::Action::Create
|
10
|
+
class_resolver :input_class, Ecoportal::API::GraphQL::Input::Action::Create
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def basic_block(&block)
|
15
|
+
payload_block = block || default_payload_block
|
16
|
+
proc {
|
17
|
+
mutation(input: :CreateActionInput!) {
|
18
|
+
createAction(input: :input, &payload_block)
|
19
|
+
}
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def default_payload_block
|
24
|
+
proc {
|
25
|
+
clientMutationId
|
26
|
+
errors {
|
27
|
+
details
|
28
|
+
fullMessages
|
29
|
+
}
|
30
|
+
item {
|
31
|
+
___Fragment__Action
|
32
|
+
}
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Ecoportal
|
2
|
+
module API
|
3
|
+
class GraphQL
|
4
|
+
module Query
|
5
|
+
class ActionCategories < Ecoportal::API::GraphQL::Logic::QueryConnection
|
6
|
+
field_name :actionCategories
|
7
|
+
|
8
|
+
class_resolver :item_class, Ecoportal::API::GraphQL::Base::ActionCategory
|
9
|
+
class_resolver :connection_class, Ecoportal::API::GraphQL::Connection::ActionCategory
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def basic_block(&block)
|
14
|
+
connection_block = block || default_connection_block
|
15
|
+
proc {
|
16
|
+
query(
|
17
|
+
searchConf: :Search,
|
18
|
+
after: :string,
|
19
|
+
before: :string,
|
20
|
+
first: :int,
|
21
|
+
last: :int
|
22
|
+
) {
|
23
|
+
currentOrganization {
|
24
|
+
actionCategories(
|
25
|
+
searchConf: :searchConf,
|
26
|
+
after: :after,
|
27
|
+
before: :before,
|
28
|
+
first: :first,
|
29
|
+
last: :last,
|
30
|
+
&connection_block
|
31
|
+
)
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def default_connection_block
|
38
|
+
proc {
|
39
|
+
totalCount
|
40
|
+
pageInfo {
|
41
|
+
endCursor
|
42
|
+
}
|
43
|
+
nodes {
|
44
|
+
___Ecoportal__API__GraphQL__Fragment__ActionCategory
|
45
|
+
}
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -10,6 +10,7 @@ end
|
|
10
10
|
require 'ecoportal/api/graphql/query/location_classifications'
|
11
11
|
require 'ecoportal/api/graphql/query/location_structure'
|
12
12
|
require 'ecoportal/api/graphql/query/location_structures'
|
13
|
+
require 'ecoportal/api/graphql/query/action_categories'
|
13
14
|
require 'ecoportal/api/graphql/query/action'
|
14
15
|
require 'ecoportal/api/graphql/query/actions'
|
15
16
|
require 'ecoportal/api/graphql/query/contractor_entities'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -252,6 +252,7 @@ files:
|
|
252
252
|
- lib/ecoportal/api/graphql/builder/location_structure.rb
|
253
253
|
- lib/ecoportal/api/graphql/connection.rb
|
254
254
|
- lib/ecoportal/api/graphql/connection/action.rb
|
255
|
+
- lib/ecoportal/api/graphql/connection/action_category.rb
|
255
256
|
- lib/ecoportal/api/graphql/connection/contractor_entity.rb
|
256
257
|
- lib/ecoportal/api/graphql/connection/person_member.rb
|
257
258
|
- lib/ecoportal/api/graphql/error.rb
|
@@ -260,6 +261,7 @@ files:
|
|
260
261
|
- lib/ecoportal/api/graphql/error/validation_errors.rb
|
261
262
|
- lib/ecoportal/api/graphql/fragment.rb
|
262
263
|
- lib/ecoportal/api/graphql/fragment/action.rb
|
264
|
+
- lib/ecoportal/api/graphql/fragment/action_category.rb
|
263
265
|
- lib/ecoportal/api/graphql/fragment/contractor_entity.rb
|
264
266
|
- lib/ecoportal/api/graphql/fragment/location_node.rb
|
265
267
|
- lib/ecoportal/api/graphql/fragment/pagination.rb
|
@@ -268,6 +270,7 @@ files:
|
|
268
270
|
- lib/ecoportal/api/graphql/input.rb
|
269
271
|
- lib/ecoportal/api/graphql/input/action.rb
|
270
272
|
- lib/ecoportal/api/graphql/input/action/archive.rb
|
273
|
+
- lib/ecoportal/api/graphql/input/action/create.rb
|
271
274
|
- lib/ecoportal/api/graphql/input/action/update.rb
|
272
275
|
- lib/ecoportal/api/graphql/input/contractor_entity.rb
|
273
276
|
- lib/ecoportal/api/graphql/input/contractor_entity/create.rb
|
@@ -312,6 +315,7 @@ files:
|
|
312
315
|
- lib/ecoportal/api/graphql/mutation.rb
|
313
316
|
- lib/ecoportal/api/graphql/mutation/action.rb
|
314
317
|
- lib/ecoportal/api/graphql/mutation/action/archive.rb
|
318
|
+
- lib/ecoportal/api/graphql/mutation/action/create.rb
|
315
319
|
- lib/ecoportal/api/graphql/mutation/action/update.rb
|
316
320
|
- lib/ecoportal/api/graphql/mutation/contractor_entity.rb
|
317
321
|
- lib/ecoportal/api/graphql/mutation/contractor_entity/create.rb
|
@@ -322,6 +326,7 @@ files:
|
|
322
326
|
- lib/ecoportal/api/graphql/payload.rb
|
323
327
|
- lib/ecoportal/api/graphql/payload/action.rb
|
324
328
|
- lib/ecoportal/api/graphql/payload/action/archive.rb
|
329
|
+
- lib/ecoportal/api/graphql/payload/action/create.rb
|
325
330
|
- lib/ecoportal/api/graphql/payload/action/update.rb
|
326
331
|
- lib/ecoportal/api/graphql/payload/contractor_entity.rb
|
327
332
|
- lib/ecoportal/api/graphql/payload/contractor_entity/create.rb
|
@@ -333,6 +338,7 @@ files:
|
|
333
338
|
- lib/ecoportal/api/graphql/payload/location_structure/command_interface.rb
|
334
339
|
- lib/ecoportal/api/graphql/query.rb
|
335
340
|
- lib/ecoportal/api/graphql/query/action.rb
|
341
|
+
- lib/ecoportal/api/graphql/query/action_categories.rb
|
336
342
|
- lib/ecoportal/api/graphql/query/actions.rb
|
337
343
|
- lib/ecoportal/api/graphql/query/contractor_entities.rb
|
338
344
|
- lib/ecoportal/api/graphql/query/location_classifications.rb
|