ecoportal-api-graphql 1.3.3 → 1.3.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 +29 -1
- data/ecoportal-api-graphql.gemspec +1 -1
- data/lib/ecoportal/api/common/graphql/auth_service.rb +12 -14
- data/lib/ecoportal/api/common/graphql/client.rb +10 -2
- data/lib/ecoportal/api/common/graphql/http_client.rb +86 -30
- data/lib/ecoportal/api/common/graphql.rb +1 -1
- data/lib/ecoportal/api/graphql/base/location_structure/draft.rb +23 -19
- data/lib/ecoportal/api/graphql/base/page/data_field.rb +12 -0
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +14 -0
- data/lib/ecoportal/api/graphql/base/page/phased.rb +14 -0
- data/lib/ecoportal/api/graphql/base/page/section.rb +12 -0
- data/lib/ecoportal/api/graphql/base/page.rb +5 -1
- data/lib/ecoportal/api/graphql/base.rb +15 -15
- data/lib/ecoportal/api/graphql/builder/page.rb +41 -0
- data/lib/ecoportal/api/graphql/builder/register.rb +41 -0
- data/lib/ecoportal/api/graphql/builder.rb +5 -3
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +75 -0
- data/lib/ecoportal/api/graphql/concerns.rb +10 -0
- data/lib/ecoportal/api/graphql/connection.rb +4 -4
- data/lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb +8 -6
- data/lib/ecoportal/api/graphql/error/locations_error.rb +3 -1
- data/lib/ecoportal/api/graphql/error/locations_validation_error.rb +4 -1
- data/lib/ecoportal/api/graphql/error.rb +3 -3
- data/lib/ecoportal/api/graphql/fragment/location_draft.rb +14 -0
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment.rb +10 -54
- data/lib/ecoportal/api/graphql/helpers/locations_tree.rb +1 -0
- data/lib/ecoportal/api/graphql/helpers.rb +1 -1
- data/lib/ecoportal/api/graphql/input/location_structure/update_command.rb +14 -1
- data/lib/ecoportal/api/graphql/input.rb +7 -7
- data/lib/ecoportal/api/graphql/logic/mutation.rb +6 -1
- data/lib/ecoportal/api/graphql/logic/payload.rb +7 -5
- data/lib/ecoportal/api/graphql/logic/query_array.rb +1 -0
- data/lib/ecoportal/api/graphql/logic/query_connection.rb +2 -0
- data/lib/ecoportal/api/graphql/logic.rb +9 -9
- data/lib/ecoportal/api/graphql/model/organization.rb +9 -6
- data/lib/ecoportal/api/graphql/model/page/data_field.rb +12 -0
- data/lib/ecoportal/api/graphql/model/page/phased/stage.rb +14 -0
- data/lib/ecoportal/api/graphql/model/page/phased.rb +20 -0
- data/lib/ecoportal/api/graphql/model/page/section.rb +12 -0
- data/lib/ecoportal/api/graphql/model/page.rb +5 -7
- data/lib/ecoportal/api/graphql/model/resource.rb +1 -1
- data/lib/ecoportal/api/graphql/model.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation.rb +3 -3
- data/lib/ecoportal/api/graphql/payload/location_structure/apply_commands.rb +3 -2
- data/lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb +19 -9
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb +5 -2
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/delete.rb +5 -2
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/drop_bad_commands.rb +9 -7
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/publish.rb +13 -6
- data/lib/ecoportal/api/graphql/payload.rb +3 -3
- data/lib/ecoportal/api/graphql/query/action_categories.rb +1 -0
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +1 -0
- data/lib/ecoportal/api/graphql/query.rb +7 -7
- data/lib/ecoportal/api/graphql.rb +12 -2
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/tests/local_libs.rb +7 -7
- metadata +17 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a601be8bd2712d265a92f530ea2737d1df427b73066daf3a7dd5eb4befdfb14d
|
|
4
|
+
data.tar.gz: 68152b23448092ec5da50a052c600ff5f768eb1ff5ae20db37de174af785ef3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11ab235ee54f4a3c42986a5c1f5a066b4ed235c530ff7011bbf7d02cd30afe403d8d82c158aa1bd974a0b320f3bcbf52d19cfb45cfc5012b4c1cc1afb7ba30c4
|
|
7
|
+
data.tar.gz: 03c9e3ca74579879996c8a3edf44f03e240dcd79c6418a599fd4ff6eb05a2084d506037139207dcc8713f785fd23cf0f7486e829c8d87511127036235b7875f5
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [1.3.
|
|
5
|
+
## [1.3.6] - 2026-05-26
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
@@ -10,6 +10,34 @@ All notable changes to this project will be documented in this file.
|
|
|
10
10
|
|
|
11
11
|
### Fixed
|
|
12
12
|
|
|
13
|
+
## [1.3.5] - 2026-05-26
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Moved `graphql` endpoint to `external/graphql`
|
|
18
|
+
- Missing env var (i.e. `ORG_ID`) will **raise** now an error (instead of just a print)
|
|
19
|
+
|
|
20
|
+
## [1.3.4] - 2025-09-04
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Command execution result: **added** command doc when there's a `results` error.
|
|
25
|
+
- Payload improvements:
|
|
26
|
+
- On `LocationsError.validationErrors`: fetch `property` property.
|
|
27
|
+
- On **results**, `Command` always fetch `__typename` and the other properties.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Changed base `error_doc`: **consistent property name**
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Correct fetch on `ok` (sometimes it is `null`: that doesn't mean failed).
|
|
36
|
+
- **Consistent order** on `error?` and `error_doc`.
|
|
37
|
+
- `Draft`
|
|
38
|
+
- **Overlapping** name `ConflictingIds` (vs `LocationsError.conflictingIds`)
|
|
39
|
+
- **Wrong** include on `FetchNested`
|
|
40
|
+
|
|
13
41
|
## [1.3.3] - 2025-08-29
|
|
14
42
|
|
|
15
43
|
### Added
|
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.add_development_dependency 'rubocop-rake', '~> 0'
|
|
33
33
|
spec.add_development_dependency 'yard', '>= 0.9.34', '< 1'
|
|
34
34
|
|
|
35
|
-
spec.add_dependency 'ecoportal-api', '~> 0.10', '>= 0.10.
|
|
35
|
+
spec.add_dependency 'ecoportal-api', '~> 0.10', '>= 0.10.15'
|
|
36
36
|
spec.add_dependency 'ecoportal-api-v2', '~> 3.3', '>= 3.3.1'
|
|
37
37
|
spec.add_dependency 'graphlient', '>= 0.8.0', '< 0.9'
|
|
38
38
|
end
|
|
@@ -7,14 +7,13 @@ module Ecoportal
|
|
|
7
7
|
TOKEN_AUTORENEW = 90 # minutes
|
|
8
8
|
|
|
9
9
|
module InstanceMethods
|
|
10
|
-
def session_token(host: server,
|
|
11
|
-
session_token_data(host: host
|
|
10
|
+
def session_token(host: server, auto_renew: true)
|
|
11
|
+
session_token_data(host: host).then do |body|
|
|
12
12
|
next unless body
|
|
13
13
|
|
|
14
14
|
if auto_renew && token_renew?(body['expires_in'])
|
|
15
15
|
session_token_renewed(
|
|
16
16
|
host: host,
|
|
17
|
-
version: version,
|
|
18
17
|
refresh_token: body['refresh_token']
|
|
19
18
|
)
|
|
20
19
|
else
|
|
@@ -23,15 +22,14 @@ module Ecoportal
|
|
|
23
22
|
end
|
|
24
23
|
end
|
|
25
24
|
|
|
26
|
-
def session_token_renewed(host: server,
|
|
25
|
+
def session_token_renewed(host: server, refresh_token: nil)
|
|
27
26
|
unless refresh_token
|
|
28
|
-
return unless (body = session_token_data(host: host
|
|
27
|
+
return unless (body = session_token_data(host: host))
|
|
29
28
|
return unless (refresh_token = body['resfresh_token'])
|
|
30
29
|
end
|
|
31
30
|
|
|
32
31
|
session_refresh_token_data(
|
|
33
32
|
host: host,
|
|
34
|
-
version: version,
|
|
35
33
|
refresh_token: refresh_token
|
|
36
34
|
).then do |bdy|
|
|
37
35
|
bdy['access_token'] if bdy
|
|
@@ -40,8 +38,8 @@ module Ecoportal
|
|
|
40
38
|
|
|
41
39
|
private
|
|
42
40
|
|
|
43
|
-
def session_token_data(host: server
|
|
44
|
-
|
|
41
|
+
def session_token_data(host: server)
|
|
42
|
+
auth_http_client(host: host).post(
|
|
45
43
|
'/oauth/token',
|
|
46
44
|
data: {
|
|
47
45
|
'grant_type' => 'password',
|
|
@@ -53,8 +51,8 @@ module Ecoportal
|
|
|
53
51
|
end
|
|
54
52
|
end
|
|
55
53
|
|
|
56
|
-
def session_refresh_token_data(refresh_token:, host: server
|
|
57
|
-
|
|
54
|
+
def session_refresh_token_data(refresh_token:, host: server)
|
|
55
|
+
auth_http_client(host: host).post(
|
|
58
56
|
'/oauth/token',
|
|
59
57
|
data: {
|
|
60
58
|
'grant_type' => 'refresh_token',
|
|
@@ -69,10 +67,10 @@ module Ecoportal
|
|
|
69
67
|
(TOKEN_AUTORENEW * 60) > seconds
|
|
70
68
|
end
|
|
71
69
|
|
|
72
|
-
def
|
|
73
|
-
@
|
|
70
|
+
def auth_http_client(host: server)
|
|
71
|
+
@auth_http_client ||= Ecoportal::API::Common::GraphQL::HttpClient.new(
|
|
74
72
|
host: host,
|
|
75
|
-
version:
|
|
73
|
+
version: 'http'
|
|
76
74
|
)
|
|
77
75
|
end
|
|
78
76
|
|
|
@@ -89,7 +87,7 @@ module Ecoportal
|
|
|
89
87
|
end
|
|
90
88
|
|
|
91
89
|
def fetch_env_required(name)
|
|
92
|
-
|
|
90
|
+
raise "Missing ENV '#{name}'" unless ENV.key?(name)
|
|
93
91
|
ENV[name]
|
|
94
92
|
end
|
|
95
93
|
|
|
@@ -4,6 +4,8 @@ module Ecoportal
|
|
|
4
4
|
module Common
|
|
5
5
|
module GraphQL
|
|
6
6
|
class Client < ::Graphlient::Client
|
|
7
|
+
ENDPOINT_PATH = 'external/graphql'.freeze
|
|
8
|
+
|
|
7
9
|
attr_accessor :host
|
|
8
10
|
|
|
9
11
|
READ_TIMEOUT = 90
|
|
@@ -42,7 +44,12 @@ module Ecoportal
|
|
|
42
44
|
end
|
|
43
45
|
|
|
44
46
|
def new(org_id: self.org_id, host: self.host, schema_path: host, no_schema: @no_schema)
|
|
45
|
-
self.class.new(
|
|
47
|
+
self.class.new(
|
|
48
|
+
org_id: org_id,
|
|
49
|
+
host: host,
|
|
50
|
+
schema_path: schema_path,
|
|
51
|
+
no_schema: no_schema
|
|
52
|
+
)
|
|
46
53
|
end
|
|
47
54
|
|
|
48
55
|
def org_id
|
|
@@ -52,7 +59,8 @@ module Ecoportal
|
|
|
52
59
|
private
|
|
53
60
|
|
|
54
61
|
def url
|
|
55
|
-
|
|
62
|
+
base_url = Ecoportal::API::Common::GraphQL::HttpClient.base_url(host)
|
|
63
|
+
"#{base_url}/api/#{org_id}/#{ENDPOINT_PATH}"
|
|
56
64
|
end
|
|
57
65
|
end
|
|
58
66
|
end
|
|
@@ -13,20 +13,36 @@ module Ecoportal
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
READ_TIMEOUT = 90
|
|
17
|
+
WRITE_TIMEOUT = 90
|
|
18
|
+
|
|
16
19
|
attr_reader :host, :version
|
|
17
20
|
|
|
21
|
+
include Ecoportal::API::Common::GraphQL::AuthService
|
|
22
|
+
|
|
18
23
|
def initialize(
|
|
24
|
+
email: nil,
|
|
25
|
+
pass: nil,
|
|
26
|
+
org_id: nil,
|
|
19
27
|
api_key: nil,
|
|
20
|
-
version:
|
|
28
|
+
version: 'graphql',
|
|
21
29
|
host: 'live.ecoportal.com',
|
|
22
30
|
logger: ::Logger.new(IO::NULL),
|
|
23
|
-
deep_logging: false
|
|
31
|
+
deep_logging: false,
|
|
32
|
+
no_schema: true
|
|
24
33
|
)
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
@org_id = org_id
|
|
35
|
+
@user_email = email
|
|
36
|
+
@user_pass = pass
|
|
37
|
+
@no_schema = no_schema
|
|
38
|
+
@version = version
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
super(
|
|
41
|
+
api_key: api_key,
|
|
42
|
+
host: host,
|
|
43
|
+
logger: logger,
|
|
44
|
+
deep_logging: deep_logging
|
|
45
|
+
)
|
|
30
46
|
end
|
|
31
47
|
|
|
32
48
|
# Creates a HTTP object adding the `X-ApiKey` or `X-ECOPORTAL-API-KEY` param to the header, depending on the API version.
|
|
@@ -35,52 +51,92 @@ module Ecoportal
|
|
|
35
51
|
def base_request
|
|
36
52
|
@base_request ||=
|
|
37
53
|
case @version
|
|
38
|
-
when NilClass
|
|
39
|
-
HTTP
|
|
40
|
-
when '
|
|
41
|
-
HTTP.headers('X-
|
|
54
|
+
when NilClass, 'http'
|
|
55
|
+
HTTP
|
|
56
|
+
when 'v1', 'v0'
|
|
57
|
+
HTTP.headers('X-ApiKey' => key_token)
|
|
58
|
+
when 'v2', 'v3'
|
|
59
|
+
HTTP.headers('X-ECOPORTAL-API-KEY' => key_token)
|
|
42
60
|
when 'graphql'
|
|
43
|
-
HTTP.headers('Authorization' => "Bearer #{key_token}")
|
|
44
|
-
|
|
45
|
-
|
|
61
|
+
HTTP.headers('Authorization' => "Bearer #{key_token}")
|
|
62
|
+
end.then do |request|
|
|
63
|
+
request.accept(:json).timeout(
|
|
64
|
+
read: READ_TIMEOUT,
|
|
65
|
+
write: WRITE_TIMEOUT
|
|
66
|
+
)
|
|
46
67
|
end
|
|
47
68
|
end
|
|
48
69
|
|
|
70
|
+
def org_id
|
|
71
|
+
@org_id || fetch_env_required('ORGANIZATION_ID')
|
|
72
|
+
end
|
|
73
|
+
|
|
49
74
|
# Full URl builder of the request
|
|
50
75
|
# @param path [String] the tail that completes the url of the request.
|
|
51
76
|
# @return [String] the final url.
|
|
52
77
|
def url_for(path)
|
|
53
|
-
|
|
78
|
+
"#{api_url}#{path}"
|
|
54
79
|
end
|
|
55
80
|
|
|
56
81
|
private
|
|
57
82
|
|
|
58
|
-
def
|
|
59
|
-
|
|
83
|
+
def key_token
|
|
84
|
+
return if http?
|
|
85
|
+
return session_token(host: host) if graphql?
|
|
86
|
+
return @api_key if api_key?
|
|
87
|
+
return ENV['ORG_INT_KEY'] if v0?
|
|
88
|
+
|
|
89
|
+
puts 'Api-key missing!'
|
|
60
90
|
end
|
|
61
91
|
|
|
62
|
-
def
|
|
63
|
-
|
|
92
|
+
def api_url
|
|
93
|
+
base_url.then do |url|
|
|
94
|
+
next "#{url}/api/#{version}" if v1_0? || v2_3?
|
|
95
|
+
next "#{url}/api/#{org_id}/graphql" if graphql?
|
|
96
|
+
|
|
97
|
+
url
|
|
98
|
+
end
|
|
64
99
|
end
|
|
65
100
|
|
|
66
101
|
def base_url
|
|
67
102
|
@base_url ||= self.class.base_url(host)
|
|
68
103
|
end
|
|
69
104
|
|
|
70
|
-
def
|
|
71
|
-
@
|
|
105
|
+
def protocol
|
|
106
|
+
@protocol ||= self.class.protocol(host)
|
|
72
107
|
end
|
|
73
108
|
|
|
74
|
-
def
|
|
75
|
-
if @
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
109
|
+
def http?
|
|
110
|
+
return true if @version.nil?
|
|
111
|
+
|
|
112
|
+
@version == 'http'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def api_key?
|
|
116
|
+
@api_key && !@api_key.match(/\A\W*\z/)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def v1_0?
|
|
120
|
+
v1? || v0?
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def v1?
|
|
124
|
+
@version == 'v1'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def v0?
|
|
128
|
+
@version == 'v0'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def v2_3?
|
|
132
|
+
return true if @version == 'v2'
|
|
133
|
+
return true if @version == 'v3'
|
|
134
|
+
|
|
135
|
+
false
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def graphql?
|
|
139
|
+
@version == 'graphql'
|
|
84
140
|
end
|
|
85
141
|
end
|
|
86
142
|
end
|
|
@@ -7,8 +7,8 @@ module Ecoportal
|
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
require 'ecoportal/api/common/graphql/http_client'
|
|
11
10
|
require 'ecoportal/api/common/graphql/auth_service'
|
|
11
|
+
require 'ecoportal/api/common/graphql/http_client'
|
|
12
12
|
require 'ecoportal/api/common/graphql/client'
|
|
13
13
|
require 'ecoportal/api/common/graphql/class_helpers'
|
|
14
14
|
require 'ecoportal/api/common/graphql/hash_helpers'
|
|
@@ -11,46 +11,50 @@ module Ecoportal
|
|
|
11
11
|
passkey :id
|
|
12
12
|
|
|
13
13
|
passthrough :name, :notes
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
passboolean :commited
|
|
15
16
|
alias_method :commited?, :commited
|
|
16
|
-
alias_method :ok?, :ok
|
|
17
17
|
|
|
18
18
|
embeds_one :createdAt, klass: Base::DateTime
|
|
19
19
|
|
|
20
|
+
embeds_one :structure, klass: :structure_class
|
|
21
|
+
|
|
20
22
|
passarray :conflictingIds
|
|
21
23
|
embeds_many :commands, klass: Interface::LocationStructure::Command
|
|
22
24
|
embeds_many :results, read_only: true, klass: "Ecoportal::API::GraphQL::Payload::LocationStructure::CommandExecutionResult"
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
passboolean :ok
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
def ok?
|
|
29
|
+
ok != false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def success?
|
|
33
|
+
!error?
|
|
34
|
+
end
|
|
27
35
|
|
|
28
36
|
def error?
|
|
29
|
-
|
|
37
|
+
conflictingIds? ||
|
|
30
38
|
result_errors? ||
|
|
31
|
-
|
|
39
|
+
!ok?
|
|
32
40
|
end
|
|
33
41
|
|
|
34
42
|
def error_doc
|
|
35
|
-
if
|
|
43
|
+
if conflictingIds?
|
|
36
44
|
{
|
|
37
|
-
|
|
45
|
+
conflictingIds: conflictingIds.doc
|
|
38
46
|
}
|
|
39
|
-
elsif
|
|
47
|
+
elsif result_errors?
|
|
40
48
|
{
|
|
41
|
-
|
|
49
|
+
results: [result_errors.first&.error_doc]
|
|
42
50
|
}
|
|
43
51
|
elsif !ok?
|
|
44
52
|
{
|
|
45
|
-
ok:
|
|
53
|
+
ok: ok
|
|
46
54
|
}
|
|
47
55
|
end
|
|
48
56
|
end
|
|
49
57
|
|
|
50
|
-
def success?
|
|
51
|
-
!error?
|
|
52
|
-
end
|
|
53
|
-
|
|
54
58
|
def structure_id
|
|
55
59
|
parent_structure&.id
|
|
56
60
|
end
|
|
@@ -68,6 +72,10 @@ module Ecoportal
|
|
|
68
72
|
_parent._parent
|
|
69
73
|
end
|
|
70
74
|
|
|
75
|
+
def conflictingIds?
|
|
76
|
+
(conflictingIds || []).any?
|
|
77
|
+
end
|
|
78
|
+
|
|
71
79
|
def result_errors?
|
|
72
80
|
result_errors.any?
|
|
73
81
|
end
|
|
@@ -75,10 +83,6 @@ module Ecoportal
|
|
|
75
83
|
def result_errors
|
|
76
84
|
results.select(&:error?)
|
|
77
85
|
end
|
|
78
|
-
|
|
79
|
-
def conflictingIds?
|
|
80
|
-
(conflictingIds || []).any?
|
|
81
|
-
end
|
|
82
86
|
end
|
|
83
87
|
end
|
|
84
88
|
end # GraphQL
|
|
@@ -7,18 +7,18 @@ module Ecoportal
|
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
require_relative 'base/date_time'
|
|
11
|
+
require_relative 'base/page_info'
|
|
12
|
+
require_relative 'base/location_classification_type'
|
|
13
|
+
require_relative 'base/location_node'
|
|
14
|
+
require_relative 'base/location_structure'
|
|
15
|
+
require_relative 'base/person_member'
|
|
16
|
+
require_relative 'base/file_attachment'
|
|
17
|
+
require_relative 'base/file_container'
|
|
18
|
+
require_relative 'base/field'
|
|
19
|
+
require_relative 'base/page'
|
|
20
|
+
require_relative 'base/resource'
|
|
21
|
+
require_relative 'base/action_category'
|
|
22
|
+
require_relative 'base/action'
|
|
23
|
+
require_relative 'base/contractor_entity'
|
|
24
|
+
require_relative 'base/organization'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class Page
|
|
6
|
+
attr_reader :client
|
|
7
|
+
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# def archive(**kargs, &block)
|
|
13
|
+
# archiveMutation.query(**kargs, &block)
|
|
14
|
+
# end
|
|
15
|
+
|
|
16
|
+
# def update(**kargs, &block)
|
|
17
|
+
# updateMutation.query(**kargs, &block)
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
# def create(**kargs, &block)
|
|
21
|
+
# createMutation.query(**kargs, &block)
|
|
22
|
+
# end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
# def archiveMutation
|
|
27
|
+
# Mutation::Page::Archive.new(client)
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
# def updateMutation
|
|
31
|
+
# Mutation::Page::Update.new(client)
|
|
32
|
+
# end
|
|
33
|
+
|
|
34
|
+
# def createMutation
|
|
35
|
+
# Mutation::Page::Create.new(client)
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class Register
|
|
6
|
+
attr_reader :client
|
|
7
|
+
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# def archive(**kargs, &block)
|
|
13
|
+
# archiveMutation.query(**kargs, &block)
|
|
14
|
+
# end
|
|
15
|
+
|
|
16
|
+
# def update(**kargs, &block)
|
|
17
|
+
# updateMutation.query(**kargs, &block)
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
# def create(**kargs, &block)
|
|
21
|
+
# createMutation.query(**kargs, &block)
|
|
22
|
+
# end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
# def archiveMutation
|
|
27
|
+
# Mutation::Register::Archive.new(client)
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
# def updateMutation
|
|
31
|
+
# Mutation::Register::Update.new(client)
|
|
32
|
+
# end
|
|
33
|
+
|
|
34
|
+
# def createMutation
|
|
35
|
+
# Mutation::Register::Create.new(client)
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -7,6 +7,8 @@ module Ecoportal
|
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
require_relative 'builder/location_structure'
|
|
11
|
+
require_relative 'builder/action'
|
|
12
|
+
require_relative 'builder/contractor_entity'
|
|
13
|
+
require_relative 'builder/register'
|
|
14
|
+
require_relative 'builder/page'
|