wolf_core 0.1.97 → 0.1.99
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d2f944616b25d134e6589f0dbfcb8fd909a27dfb881cfd78eb9b76e264f900c
|
4
|
+
data.tar.gz: d6644bfec1886500d96906243f1429e6d28145fc19dd3e419826309122b243c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afef89f59ffb52ca6dee4b5a9a5a8baf1d281ac609702c472f7e048de8d57472439b4c82fe5800aec86f1e7790b6ad9fa0c800adfb507482aad1bc49cbefd447
|
7
|
+
data.tar.gz: f0f4f40b589361933bf7a7f2f5df41f7bc4e6f1ade3f3872d10b6fa10bf508b8d0fc989e2892bd1454f6345c8dc04b4e5bf40fb6fbba8d3e4ed63d39db4456d4
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module WolfCore
|
2
|
+
module Integrations
|
3
|
+
module JobseekerApiOperations
|
4
|
+
include WolfCore::HttpOperations
|
5
|
+
|
6
|
+
def fetch_jobseeker(wolf_token:, jobseeker_id:, tenant:)
|
7
|
+
response = safe_http_get(
|
8
|
+
headers: { 'Authorization' => "Bearer #{wolf_token}" },
|
9
|
+
url: "#{ENV['WOLF_PLATFORM_URL']}/api/v2/jobseekers/#{jobseeker_id}",
|
10
|
+
query: { tenant: tenant },
|
11
|
+
error_message: 'Failed to fetch jobseeker',
|
12
|
+
)
|
13
|
+
response_body = response.body
|
14
|
+
response_body.dig('data', 'table', 'jobseeker')
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_jobseeker(wolf_token:, jobseeker:, tenant:)
|
18
|
+
response = http_post(
|
19
|
+
headers: { 'Authorization' => "Bearer #{wolf_token}" },
|
20
|
+
query: { tenant: tenant },
|
21
|
+
url: "#{ENV['WOLF_PLATFORM_URL']}/api/v2/jobseekers",
|
22
|
+
body: jobseeker
|
23
|
+
)
|
24
|
+
log_object response, title: 'create jobseeker response is'
|
25
|
+
validate_http_response(
|
26
|
+
response: response,
|
27
|
+
message: 'Can not create jobseeker'
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -4,7 +4,7 @@ module WolfCore
|
|
4
4
|
def get_payload(event_type:, params:)
|
5
5
|
return if event_type == 'SubscriptionConfirmation'
|
6
6
|
params = JSON.parse(params['Message'] || '{}')
|
7
|
-
|
7
|
+
JSON.parse(params['payload'] || '{}')
|
8
8
|
end
|
9
9
|
|
10
10
|
def get_event_type(params:)
|
@@ -46,9 +46,15 @@ module WolfCore
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def build_body_from_params(params:, id_key:)
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
{
|
50
|
+
event_name: get_event_name(params: params),
|
51
|
+
id_key => get_object_id(params: params)
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
def get_object_id(params:)
|
56
|
+
params = JSON.parse(params['Message'] || '{}')
|
57
|
+
params['object_id']
|
52
58
|
end
|
53
59
|
end
|
54
60
|
end
|
data/lib/wolf_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wolf_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/wolf_core/application/burnett/auth/auth_operations.rb
|
96
96
|
- lib/wolf_core/application/exception_operations.rb
|
97
97
|
- lib/wolf_core/application/integrations/change_detection.rb
|
98
|
+
- lib/wolf_core/application/integrations/jobseeker_api_operations.rb
|
98
99
|
- lib/wolf_core/application/integrations/routing_operations.rb
|
99
100
|
- lib/wolf_core/application/integrations/webhooks_operations.rb
|
100
101
|
- lib/wolf_core/application/salesforce_oauth_service.rb
|