mawsitsit 0.1.12 → 0.1.13
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/Cargo.lock +71 -0
- data/ext/mawsitsit/Cargo.toml +1 -1
- data/ext/mawsitsit/src/lib.rs +3 -5
- data/ext/mawsitsit/src/parser/manipulators.rs +120 -5
- data/ext/mawsitsit/src/parser/parser.rs +95 -8
- data/ext/mawsitsit/src/parser/utils/application_option.rs +15 -2
- data/ext/mawsitsit/src/parser/utils/helpers.rs +60 -5
- data/lib/mawsitsit/version.rb +1 -1
- data/var/data_lever_test_1.identifier +2 -0
- data/var/data_lever_test_1.json +333 -0
- data/var/data_lever_test_2.identifier +2 -0
- data/var/data_lever_test_2.json +52 -0
- data/var/expected_test_1.identifier +0 -1
- data/var/lever_test_1.identifier +2 -0
- data/var/lever_test_1.json +41 -0
- data/var/lever_test_2.identifier +2 -0
- data/var/lever_test_2.json +41 -0
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8822dfa37e369cfcf7ab3633b016e5cb8f2704798233aa32d546c2ef6a754e4
|
|
4
|
+
data.tar.gz: 6b9f99a27efba3b5ff94970b8e890cd5bfbae353d88b93bf9a8093c9e5d4ab5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a3c73aea5ae02a5321be9f9261af7b8d0d90a1442164c20870a65a886cb2cb4f808c2c6fd6667c4fdc5821a1076657a5bde7fba4c1d56c614a394cf89a33b8e
|
|
7
|
+
data.tar.gz: 99416b91be67f0c2933c0ea85de53b52e377d4835230b4a3c7a1c57c4041ae9682dce3be036a424257902ca0996da4326c15d48a045cc064b09a3315a0fcd378
|
data/Cargo.lock
CHANGED
|
@@ -26,6 +26,21 @@ dependencies = [
|
|
|
26
26
|
"memchr",
|
|
27
27
|
]
|
|
28
28
|
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "android-tzdata"
|
|
31
|
+
version = "0.1.1"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "android_system_properties"
|
|
37
|
+
version = "0.1.5"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"libc",
|
|
42
|
+
]
|
|
43
|
+
|
|
29
44
|
[[package]]
|
|
30
45
|
name = "async-recursion"
|
|
31
46
|
version = "1.1.1"
|
|
@@ -135,6 +150,20 @@ version = "1.0.0"
|
|
|
135
150
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
151
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
137
152
|
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "chrono"
|
|
155
|
+
version = "0.4.38"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"android-tzdata",
|
|
160
|
+
"iana-time-zone",
|
|
161
|
+
"js-sys",
|
|
162
|
+
"num-traits",
|
|
163
|
+
"wasm-bindgen",
|
|
164
|
+
"windows-targets 0.52.5",
|
|
165
|
+
]
|
|
166
|
+
|
|
138
167
|
[[package]]
|
|
139
168
|
name = "clang-sys"
|
|
140
169
|
version = "1.8.1"
|
|
@@ -516,6 +545,29 @@ dependencies = [
|
|
|
516
545
|
"tracing",
|
|
517
546
|
]
|
|
518
547
|
|
|
548
|
+
[[package]]
|
|
549
|
+
name = "iana-time-zone"
|
|
550
|
+
version = "0.1.60"
|
|
551
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
552
|
+
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
|
|
553
|
+
dependencies = [
|
|
554
|
+
"android_system_properties",
|
|
555
|
+
"core-foundation-sys",
|
|
556
|
+
"iana-time-zone-haiku",
|
|
557
|
+
"js-sys",
|
|
558
|
+
"wasm-bindgen",
|
|
559
|
+
"windows-core",
|
|
560
|
+
]
|
|
561
|
+
|
|
562
|
+
[[package]]
|
|
563
|
+
name = "iana-time-zone-haiku"
|
|
564
|
+
version = "0.1.2"
|
|
565
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
566
|
+
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
|
567
|
+
dependencies = [
|
|
568
|
+
"cc",
|
|
569
|
+
]
|
|
570
|
+
|
|
519
571
|
[[package]]
|
|
520
572
|
name = "idna"
|
|
521
573
|
version = "0.5.0"
|
|
@@ -645,6 +697,7 @@ version = "0.1.0"
|
|
|
645
697
|
dependencies = [
|
|
646
698
|
"async-recursion",
|
|
647
699
|
"base64",
|
|
700
|
+
"chrono",
|
|
648
701
|
"exitfailure",
|
|
649
702
|
"futures",
|
|
650
703
|
"magnus",
|
|
@@ -722,6 +775,15 @@ dependencies = [
|
|
|
722
775
|
"minimal-lexical",
|
|
723
776
|
]
|
|
724
777
|
|
|
778
|
+
[[package]]
|
|
779
|
+
name = "num-traits"
|
|
780
|
+
version = "0.2.19"
|
|
781
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
782
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
783
|
+
dependencies = [
|
|
784
|
+
"autocfg",
|
|
785
|
+
]
|
|
786
|
+
|
|
725
787
|
[[package]]
|
|
726
788
|
name = "num_cpus"
|
|
727
789
|
version = "1.16.0"
|
|
@@ -1600,6 +1662,15 @@ dependencies = [
|
|
|
1600
1662
|
"wasm-bindgen",
|
|
1601
1663
|
]
|
|
1602
1664
|
|
|
1665
|
+
[[package]]
|
|
1666
|
+
name = "windows-core"
|
|
1667
|
+
version = "0.52.0"
|
|
1668
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1669
|
+
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
|
1670
|
+
dependencies = [
|
|
1671
|
+
"windows-targets 0.52.5",
|
|
1672
|
+
]
|
|
1673
|
+
|
|
1603
1674
|
[[package]]
|
|
1604
1675
|
name = "windows-sys"
|
|
1605
1676
|
version = "0.48.0"
|
data/ext/mawsitsit/Cargo.toml
CHANGED
data/ext/mawsitsit/src/lib.rs
CHANGED
|
@@ -4,7 +4,6 @@ use crate::parser::parser::JsonToJson;
|
|
|
4
4
|
use serde_magnus::deserialize;
|
|
5
5
|
use magnus::{Value as RubyValue, RHash};
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
fn hello(subject: String) -> String {
|
|
9
8
|
format!("Hello from Rust, {subject}!")
|
|
10
9
|
}
|
|
@@ -21,11 +20,10 @@ async fn parse(args: &[RubyValue]) -> Result<RubyValue, magnus::Error> {
|
|
|
21
20
|
let origin = deserialize(origin).unwrap();
|
|
22
21
|
let destination = deserialize(destination).unwrap();
|
|
23
22
|
let mut parser = JsonToJson::new(origin, destination);
|
|
24
|
-
if let Some(no_null) = no_null {
|
|
25
|
-
parser.no_null = no_null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
23
|
parser.call().await;
|
|
24
|
+
if no_null.is_some() {
|
|
25
|
+
parser.destination.drop_nulls();
|
|
26
|
+
}
|
|
29
27
|
Ok(parser.destination.to_ruby())
|
|
30
28
|
}
|
|
31
29
|
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
use crate::parser::utils::{application_option::ApplicationOption, helpers::{fetch, str_vec}};
|
|
2
|
-
use
|
|
3
|
-
use serde_json::{Map, Value};
|
|
2
|
+
use serde_json::{Map, Value, json};
|
|
4
3
|
use std::collections::HashMap;
|
|
5
4
|
use serde_json::Value::Null;
|
|
6
5
|
use crate::parser::parser::JsonValue;
|
|
7
|
-
use super::utils::application_option::parse_ashby_type;
|
|
8
|
-
|
|
6
|
+
use super::utils::application_option::{parse_ashby_type, parse_lever_type};
|
|
7
|
+
use chrono::{DateTime, NaiveDateTime, SecondsFormat, Utc};
|
|
8
|
+
|
|
9
|
+
pub enum EnumValue {
|
|
10
|
+
Str(String),
|
|
11
|
+
Bool(bool),
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
pub fn like_enum(args: EnumValue, enm: &str) -> Value {
|
|
9
15
|
let enm_list = str_vec(enm, ",");
|
|
10
16
|
let mut enm_map: Map<String, Value> = serde_json::Map::new();
|
|
17
|
+
|
|
11
18
|
for enm_a in enm_list {
|
|
12
19
|
let enm_args = enm_a.split(':').collect::<Vec<&str>>();
|
|
13
20
|
enm_map.insert(enm_args[0].to_string(), serde_json::Value::String(enm_args[1].to_string()));
|
|
14
21
|
}
|
|
15
|
-
|
|
22
|
+
|
|
23
|
+
match args {
|
|
24
|
+
EnumValue::Str(str_value) => {
|
|
25
|
+
enm_map.get(&str_value).unwrap_or_else(|| enm_map.get("else").unwrap_or(&serde_json::Value::Null)).clone()
|
|
26
|
+
},
|
|
27
|
+
EnumValue::Bool(bool_value) => {
|
|
28
|
+
if bool_value {
|
|
29
|
+
enm_map.get("true").unwrap_or_else(|| enm_map.get("else").unwrap_or(&serde_json::Value::Null)).clone()
|
|
30
|
+
} else {
|
|
31
|
+
enm_map.get("false").unwrap_or_else(|| enm_map.get("else").unwrap_or(&serde_json::Value::Null)).clone()
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
}
|
|
16
35
|
}
|
|
17
36
|
|
|
18
37
|
pub async fn like_fetch(args: &str, ftch: &str) -> Value {
|
|
@@ -106,3 +125,99 @@ pub fn like_ashby(_args: &Value) -> Value {
|
|
|
106
125
|
|
|
107
126
|
return serde_json::Value::Array(new_appl);
|
|
108
127
|
}
|
|
128
|
+
|
|
129
|
+
pub fn like_lever(_args: &Value) -> Value {
|
|
130
|
+
let mut new_appl: Vec<serde_json::Value> = Vec::new();
|
|
131
|
+
|
|
132
|
+
if let Value::Object(map) = _args {
|
|
133
|
+
if let Some(Value::Array(arr)) = map.get("customQuestions") {
|
|
134
|
+
for value in arr {
|
|
135
|
+
if let Value::Object(map) = value {
|
|
136
|
+
if let Some(Value::Array(fields)) = map.get("fields") {
|
|
137
|
+
for field in fields {
|
|
138
|
+
process_field(field, &mut new_appl);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if let Some(Value::Array(arr)) = map.get("personalInformation") {
|
|
146
|
+
for value in arr {
|
|
147
|
+
if let Value::Object(_) = value {
|
|
148
|
+
process_field(value, &mut new_appl);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if let Some(Value::Array(arr)) = map.get("urls") {
|
|
154
|
+
for value in arr {
|
|
155
|
+
if let Value::Object(_) = value {
|
|
156
|
+
process_field(value, &mut new_appl);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if let Some(Value::Object(map)) = map.get("eeoQuestions") {
|
|
162
|
+
for key in ["gender", "race", "veteran", "disability", "disabilitySignature", "disabilitySignatureDate"] {
|
|
163
|
+
if let Some(Value::Object(map)) = map.get(key) {
|
|
164
|
+
process_eeo(map, key, &mut new_appl);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
serde_json::Value::Array(new_appl)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
fn process_field(value: &Value, new_appl: &mut Vec<serde_json::Value>) {
|
|
174
|
+
let question = value.get("text").and_then(Value::as_str).unwrap_or("Unknown question");
|
|
175
|
+
let question_type = value.get("type").and_then(Value::as_str).unwrap_or("Unknown type");
|
|
176
|
+
let ext_id = value.get("id").or_else(|| value.get("name"))
|
|
177
|
+
.and_then(Value::as_str)
|
|
178
|
+
.map(|s| format!("lever__{}", s))
|
|
179
|
+
.unwrap_or("Unknown question".to_string());
|
|
180
|
+
let required = value.get("required").and_then(Value::as_bool).unwrap_or(false);
|
|
181
|
+
let answer_options = value.get("options").and_then(Value::as_array).map(|array| {
|
|
182
|
+
array.iter().filter_map(|item| item.get("text").and_then(Value::as_str)).map(|s| s.to_string()).collect()
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
let app_option = ApplicationOption::new(
|
|
186
|
+
question.to_string(),
|
|
187
|
+
parse_lever_type(question_type).unwrap(),
|
|
188
|
+
Some(ext_id),
|
|
189
|
+
answer_options,
|
|
190
|
+
required,
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
new_appl.push(app_option.to_json());
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
fn process_eeo(map: &serde_json::Map<String, Value>, key: &str, new_appl: &mut Vec<serde_json::Value>) {
|
|
197
|
+
let question = map.get("text").and_then(Value::as_str).unwrap_or("Unknown question");
|
|
198
|
+
let question_type = map.get("type").and_then(Value::as_str).unwrap_or("Unknown type");
|
|
199
|
+
let ext_id = format!("lever__{}", key);
|
|
200
|
+
let required = map.get("required").and_then(Value::as_bool).unwrap_or(false);
|
|
201
|
+
let answer_options = map.get("options").and_then(Value::as_array).map(|array| {
|
|
202
|
+
array.iter().filter_map(|item| item.get("text").and_then(Value::as_str)).map(|s| s.to_string()).collect()
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
let app_option = ApplicationOption::new(
|
|
206
|
+
question.to_string(),
|
|
207
|
+
parse_lever_type(question_type).unwrap(),
|
|
208
|
+
Some(ext_id),
|
|
209
|
+
answer_options,
|
|
210
|
+
required,
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
new_appl.push(app_option.to_json());
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
pub fn int_to_dt(timestamp: i64) -> Value {
|
|
217
|
+
// Convert the timestamp (which is in seconds since Unix epoch) to a NaiveDateTime
|
|
218
|
+
let datetime = DateTime::from_timestamp(timestamp, 0);
|
|
219
|
+
println!("Datetime {:?}", datetime);
|
|
220
|
+
json!("none".to_string())
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
use serde_json::Value;
|
|
1
|
+
use serde_json::{Map, Value};
|
|
2
2
|
use async_recursion::async_recursion;
|
|
3
3
|
use serde::{Serialize, Deserialize};
|
|
4
4
|
use serde_magnus::serialize;
|
|
5
5
|
use magnus::Value as RubyValue;
|
|
6
|
-
use crate::parser::manipulators::{like_enum, like_fetch, like_lambda, like_ashby};
|
|
6
|
+
use crate::parser::manipulators::{like_enum, like_fetch, like_lambda, like_ashby, like_lever, int_to_dt};
|
|
7
|
+
use super::{manipulators::EnumValue, utils::helpers::{remove_nulls, remove_nulls_in_place, vec_str}};
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
#[derive(Serialize, Deserialize, PartialEq, Debug)]
|
|
@@ -58,6 +59,15 @@ impl JsonValue {
|
|
|
58
59
|
let ruby : RubyValue = serialize(&self.value).unwrap();
|
|
59
60
|
return ruby;
|
|
60
61
|
}
|
|
62
|
+
pub fn no_null(&self) -> JsonValue{
|
|
63
|
+
JsonValue {
|
|
64
|
+
value: remove_nulls(&self.value),
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
pub fn drop_nulls(&mut self) {
|
|
68
|
+
remove_nulls_in_place(&mut self.value);
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
|
|
62
72
|
}
|
|
63
73
|
|
|
@@ -117,23 +127,100 @@ impl JsonToJson {
|
|
|
117
127
|
let mut task_res = serde_json::Value::Null;
|
|
118
128
|
match task.get(0) {
|
|
119
129
|
Some(&"enum") => {
|
|
120
|
-
task_res =
|
|
121
|
-
|
|
130
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
131
|
+
Some(value) => {
|
|
132
|
+
match task.get(1) {
|
|
133
|
+
Some(todo) => {
|
|
134
|
+
match value {
|
|
135
|
+
serde_json::Value::String(value_str) => like_enum(EnumValue::Str(value_str.to_string()), todo),
|
|
136
|
+
serde_json::Value::Bool(value_bool) => like_enum(EnumValue::Bool(*value_bool), todo),
|
|
137
|
+
_ => serde_json::Value::Null,
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
None => serde_json::Value::Null
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
None => serde_json::Value::Null
|
|
145
|
+
}
|
|
122
146
|
}
|
|
123
147
|
Some(&"fetch") => {
|
|
124
|
-
task_res =
|
|
148
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
149
|
+
Some(value) => {
|
|
150
|
+
match task.get(1) {
|
|
151
|
+
Some(todo) => match value.as_str() {
|
|
152
|
+
Some(value) => like_fetch(value, todo).await,
|
|
153
|
+
None => serde_json::Value::Null
|
|
154
|
+
}
|
|
155
|
+
None => serde_json::Value::Null
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
None => serde_json::Value::Null
|
|
159
|
+
}
|
|
125
160
|
}
|
|
126
161
|
Some(&"ashby") => {
|
|
127
|
-
task_res =
|
|
162
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
163
|
+
Some(value) => like_ashby(value),
|
|
164
|
+
None => serde_json::Value::Null
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
Some(&"lever") => {
|
|
169
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
170
|
+
Some(value) => like_lever(value),
|
|
171
|
+
None => serde_json::Value::Null
|
|
172
|
+
}
|
|
128
173
|
}
|
|
129
174
|
Some(&"lambda") => {
|
|
130
|
-
task_res =
|
|
175
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
176
|
+
Some(value) => {
|
|
177
|
+
match task.get(1) {
|
|
178
|
+
Some(todo) => match value.as_str() {
|
|
179
|
+
Some(value) => like_lambda(value, todo),
|
|
180
|
+
None => serde_json::Value::Null
|
|
181
|
+
}
|
|
182
|
+
None => serde_json::Value::Null
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
None => serde_json::Value::Null
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
Some(&"int_to_datetime") => {
|
|
190
|
+
task_res = match reference.get_by_path(bin[0]) {
|
|
191
|
+
Some(value) => {
|
|
192
|
+
match value.as_i64() {
|
|
193
|
+
Some(value) => int_to_dt(value),
|
|
194
|
+
None => serde_json::Value::Null
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
None => serde_json::Value::Null
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
Some(&"flatten") => {
|
|
202
|
+
task_res = reference.get_by_path(bin[0])
|
|
203
|
+
.and_then(|value| value.as_array())
|
|
204
|
+
.map_or(serde_json::Value::Null, |array| {
|
|
205
|
+
let strings: Vec<&str> = array.iter()
|
|
206
|
+
.filter_map(|v| v.as_str())
|
|
207
|
+
.collect();
|
|
208
|
+
serde_json::Value::String(vec_str(strings, ", "))
|
|
209
|
+
});
|
|
210
|
+
|
|
131
211
|
}
|
|
132
212
|
_ => (),
|
|
133
213
|
}
|
|
134
214
|
*value = task_res;
|
|
135
215
|
} else {
|
|
136
|
-
|
|
216
|
+
let bin_spl:Vec<&str>= bin[0].split(".").collect();
|
|
217
|
+
if bin_spl[0] == "ignore" {
|
|
218
|
+
*value = bin[0].clone().into();
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
*value = reference
|
|
222
|
+
.get_by_path(value_str)
|
|
223
|
+
.map_or_else(|| serde_json::Value::Null, |v| v.clone().into());
|
|
137
224
|
}
|
|
138
225
|
}
|
|
139
226
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
use std::fmt;
|
|
2
|
-
use serde_json::
|
|
2
|
+
use serde_json::Value;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
#[derive(Debug)]
|
|
@@ -9,7 +9,7 @@ pub enum ParseError {
|
|
|
9
9
|
|
|
10
10
|
impl fmt::Display for ParseError {
|
|
11
11
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
12
|
-
write!(f, "
|
|
12
|
+
write!(f, "Application Option Type is not represented in QuestionType")
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
impl std::error::Error for ParseError {}
|
|
@@ -86,6 +86,19 @@ pub fn parse_ashby_type(input: &str) -> Result<QuestionType, ParseError> {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
pub fn parse_lever_type(input: &str) -> Result<QuestionType, ParseError> {
|
|
90
|
+
match input {
|
|
91
|
+
"text" => Ok(QuestionType::ShortText),
|
|
92
|
+
"file-upload" => Ok(QuestionType::File),
|
|
93
|
+
"textarea" => Ok(QuestionType::LongText),
|
|
94
|
+
"dropdown" => Ok(QuestionType::SingleChoice),
|
|
95
|
+
"multiple-choice" => Ok(QuestionType::SingleChoice),
|
|
96
|
+
"university" => Ok(QuestionType::SingleChoice),
|
|
97
|
+
"multiple-select" => Ok(QuestionType::MultipleChoice),
|
|
98
|
+
_ => Err(ParseError::InvalidType),
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
89
102
|
#[derive(Debug)]
|
|
90
103
|
pub struct ApplicationOption {
|
|
91
104
|
pub question: String,
|
|
@@ -2,10 +2,16 @@ use reqwest::{Client, Method};
|
|
|
2
2
|
use std::collections::HashMap;
|
|
3
3
|
use base64::encode;
|
|
4
4
|
use magnus::Value as RubyValue;
|
|
5
|
+
use serde_json::{Map, Value as SerdeValue};
|
|
6
|
+
|
|
7
|
+
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
pub fn str_vec<'a>(args: &'a str, param: &str) -> Vec<&'a str> {
|
|
8
|
-
|
|
11
|
+
args.split(param).collect()
|
|
12
|
+
}
|
|
13
|
+
pub fn vec_str(args: Vec<&str>, separator: &str) -> String {
|
|
14
|
+
args.join(separator)
|
|
9
15
|
}
|
|
10
16
|
|
|
11
17
|
pub async fn fetch(
|
|
@@ -34,8 +40,57 @@ pub trait IO {
|
|
|
34
40
|
fn to_ruby(&self) -> RubyValue;
|
|
35
41
|
}
|
|
36
42
|
|
|
43
|
+
pub fn remove_nulls(value: &SerdeValue) -> SerdeValue {
|
|
44
|
+
match value {
|
|
45
|
+
SerdeValue::Object(map) => {
|
|
46
|
+
let filtered_map: Map<_, _> = map.iter()
|
|
47
|
+
.filter_map(|(k, v)| {
|
|
48
|
+
let cleaned_value = remove_nulls(v);
|
|
49
|
+
if !cleaned_value.is_null() {
|
|
50
|
+
Some((k.clone(), cleaned_value))
|
|
51
|
+
} else {
|
|
52
|
+
None
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
.collect();
|
|
56
|
+
SerdeValue::Object(filtered_map)
|
|
57
|
+
}
|
|
58
|
+
SerdeValue::Array(arr) => {
|
|
59
|
+
let filtered_array: Vec<_> = arr.iter()
|
|
60
|
+
.map(|v| remove_nulls(v))
|
|
61
|
+
.filter(|v| !v.is_null())
|
|
62
|
+
.collect();
|
|
63
|
+
SerdeValue::Array(filtered_array)
|
|
64
|
+
}
|
|
65
|
+
_ => value.clone(),
|
|
66
|
+
}
|
|
67
|
+
}
|
|
37
68
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
69
|
+
pub fn remove_nulls_in_place(value: &mut serde_json::Value) {
|
|
70
|
+
match value {
|
|
71
|
+
serde_json::Value::Array(arr) => {
|
|
72
|
+
let mut i = 0;
|
|
73
|
+
while i < arr.len() {
|
|
74
|
+
if arr[i].is_null() {
|
|
75
|
+
arr.remove(i);
|
|
76
|
+
} else {
|
|
77
|
+
remove_nulls_in_place(&mut arr[i]);
|
|
78
|
+
i += 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
serde_json::Value::Object(obj) => {
|
|
83
|
+
let keys: Vec<_> = obj.keys().cloned().collect();
|
|
84
|
+
for key in keys {
|
|
85
|
+
if let Some(v) = obj.get_mut(&key) {
|
|
86
|
+
if v.is_null() {
|
|
87
|
+
obj.remove(&key);
|
|
88
|
+
} else {
|
|
89
|
+
remove_nulls_in_place(v);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
_ => {}
|
|
95
|
+
}
|
|
96
|
+
}
|
data/lib/mawsitsit/version.rb
CHANGED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
|
|
2
|
+
{
|
|
3
|
+
"data": {
|
|
4
|
+
"id": "54d15a33-c024-4ba4-bc62-6f9588978758",
|
|
5
|
+
"text": "test",
|
|
6
|
+
"customQuestions": [
|
|
7
|
+
{
|
|
8
|
+
"id": "911f7ca4-e7a2-4081-9472-0c1f94d9df25",
|
|
9
|
+
"text": "Custom Questions",
|
|
10
|
+
"fields": [
|
|
11
|
+
{
|
|
12
|
+
"description": "",
|
|
13
|
+
"required": true,
|
|
14
|
+
"text": "Short text",
|
|
15
|
+
"type": "text",
|
|
16
|
+
"id": "e7ac71d9-78e2-403a-a541-6c1802ee21e6",
|
|
17
|
+
"value": null
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"description": "",
|
|
21
|
+
"required": true,
|
|
22
|
+
"text": "Long text",
|
|
23
|
+
"type": "textarea",
|
|
24
|
+
"id": "5844afad-6f34-47a1-bf69-b099e48db9c7",
|
|
25
|
+
"value": null
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"description": "",
|
|
29
|
+
"required": true,
|
|
30
|
+
"text": "Dropdown",
|
|
31
|
+
"type": "dropdown",
|
|
32
|
+
"id": "5c89bddd-7aa7-430f-9db7-98ba78a524a9",
|
|
33
|
+
"prompt": "Choose one",
|
|
34
|
+
"options": [
|
|
35
|
+
{
|
|
36
|
+
"text": "Choice 1",
|
|
37
|
+
"optionId": "b0e17be1-c39f-4899-8fc5-a0b74b230371"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"text": "Choice 2",
|
|
41
|
+
"optionId": "d36aec06-c439-4832-8982-11e9c29bcb54"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"text": "Choice 3",
|
|
45
|
+
"optionId": "c1a6f7e3-bfeb-436d-8c78-08f08d7353f1"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"text": "Choice 4",
|
|
49
|
+
"optionId": "0a5fc73b-d775-4d31-8b7f-fb19a852c59d"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"value": null
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"description": "",
|
|
56
|
+
"required": true,
|
|
57
|
+
"text": "File upload",
|
|
58
|
+
"type": "file-upload",
|
|
59
|
+
"id": "4d1e49c2-1619-4216-9245-7f69c63b400d",
|
|
60
|
+
"value": null
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"description": "",
|
|
64
|
+
"required": true,
|
|
65
|
+
"text": "Single Choice",
|
|
66
|
+
"type": "multiple-select",
|
|
67
|
+
"id": "4b3898d9-6dfa-4602-874a-dbe31fc8945c",
|
|
68
|
+
"options": [
|
|
69
|
+
{
|
|
70
|
+
"text": "Option1",
|
|
71
|
+
"optionId": "ff2e4a8a-0736-444f-b950-c4ab2c749973"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"text": "Option2",
|
|
75
|
+
"optionId": "f6f58997-2fa2-485f-85fd-fdb840913120"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"value": []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"description": "",
|
|
82
|
+
"required": true,
|
|
83
|
+
"text": "Multiple Choice",
|
|
84
|
+
"type": "multiple-choice",
|
|
85
|
+
"id": "d9cf6785-2452-44bf-9eba-6854b68863c2",
|
|
86
|
+
"options": [
|
|
87
|
+
{
|
|
88
|
+
"text": "MC1",
|
|
89
|
+
"optionId": "0dab75d4-b915-4838-b764-c546a30f50e8"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"text": "MC2",
|
|
93
|
+
"optionId": "b4d057f0-5b4f-4182-b060-8147e670b4f9"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"text": "MC3",
|
|
97
|
+
"optionId": "7be4a1c6-ea29-41c6-b5c7-57b687341885"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"value": null
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"distribution": [
|
|
104
|
+
"external"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"personalInformation": [
|
|
109
|
+
{
|
|
110
|
+
"text": "Full name",
|
|
111
|
+
"name": "fullName",
|
|
112
|
+
"type": "text",
|
|
113
|
+
"required": true,
|
|
114
|
+
"value": null
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"text": "Email",
|
|
118
|
+
"name": "email",
|
|
119
|
+
"type": "text",
|
|
120
|
+
"required": true,
|
|
121
|
+
"value": null
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"text": "Current company",
|
|
125
|
+
"name": "currentCompany",
|
|
126
|
+
"type": "text",
|
|
127
|
+
"required": false,
|
|
128
|
+
"value": null
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"text": "Current location",
|
|
132
|
+
"name": "currentLocation",
|
|
133
|
+
"type": "text",
|
|
134
|
+
"required": true,
|
|
135
|
+
"value": null
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"text": "Phone",
|
|
139
|
+
"name": "phone",
|
|
140
|
+
"type": "text",
|
|
141
|
+
"required": false,
|
|
142
|
+
"value": null
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"text": "Resume",
|
|
146
|
+
"name": "resume",
|
|
147
|
+
"type": "file-upload",
|
|
148
|
+
"required": false,
|
|
149
|
+
"value": null
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"text": "Additional information",
|
|
153
|
+
"name": "additionalInformation",
|
|
154
|
+
"type": "textarea",
|
|
155
|
+
"required": false,
|
|
156
|
+
"value": null
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"urls": [
|
|
160
|
+
{
|
|
161
|
+
"text": "LinkedIn",
|
|
162
|
+
"name": "LinkedIn",
|
|
163
|
+
"type": "text",
|
|
164
|
+
"required": false,
|
|
165
|
+
"value": null
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"text": "Twitter",
|
|
169
|
+
"name": "Twitter",
|
|
170
|
+
"type": "text",
|
|
171
|
+
"required": false,
|
|
172
|
+
"value": null
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"text": "GitHub",
|
|
176
|
+
"name": "GitHub",
|
|
177
|
+
"type": "text",
|
|
178
|
+
"required": false,
|
|
179
|
+
"value": null
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"text": "Portfolio",
|
|
183
|
+
"name": "Portfolio",
|
|
184
|
+
"type": "text",
|
|
185
|
+
"required": false,
|
|
186
|
+
"value": null
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"text": "Other",
|
|
190
|
+
"name": "Other",
|
|
191
|
+
"type": "text",
|
|
192
|
+
"required": false,
|
|
193
|
+
"value": null
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"consentDisclosures": null,
|
|
197
|
+
"eeoQuestions": {
|
|
198
|
+
"gender": {
|
|
199
|
+
"description": null,
|
|
200
|
+
"required": false,
|
|
201
|
+
"text": "Gender",
|
|
202
|
+
"type": "dropdown",
|
|
203
|
+
"options": [
|
|
204
|
+
{
|
|
205
|
+
"text": "Female",
|
|
206
|
+
"optionId": "Female"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"text": "Male",
|
|
210
|
+
"optionId": "Male"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"text": "Decline to self-identify",
|
|
214
|
+
"optionId": "Decline to self-identify"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"prompt": "Gender",
|
|
218
|
+
"value": null
|
|
219
|
+
},
|
|
220
|
+
"race": {
|
|
221
|
+
"description": null,
|
|
222
|
+
"required": false,
|
|
223
|
+
"text": "Race",
|
|
224
|
+
"type": "dropdown",
|
|
225
|
+
"options": [
|
|
226
|
+
{
|
|
227
|
+
"text": "Hispanic or Latino",
|
|
228
|
+
"optionId": "Hispanic or Latino",
|
|
229
|
+
"description": "A person of Cuban, Mexican, Puerto Rican, South or Central American, or other Spanish culture or origin regardless of race."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"text": "White (Not Hispanic or Latino)",
|
|
233
|
+
"optionId": "White (Not Hispanic or Latino)",
|
|
234
|
+
"description": "A person having origins in any of the original peoples of Europe, the Middle East, or North Africa."
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"text": "Black or African American (Not Hispanic or Latino)",
|
|
238
|
+
"optionId": "Black or African American (Not Hispanic or Latino)",
|
|
239
|
+
"description": "A person having origins in any of the black racial groups of Africa."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"text": "Native Hawaiian or Other Pacific Islander (Not Hispanic or Latino)",
|
|
243
|
+
"optionId": "Native Hawaiian or Other Pacific Islander (Not Hispanic or Latino)",
|
|
244
|
+
"description": "A person having origins in any of the peoples of Hawaii, Guam, Samoa, or other Pacific Islands."
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"text": "Asian (Not Hispanic or Latino)",
|
|
248
|
+
"optionId": "Asian (Not Hispanic or Latino)",
|
|
249
|
+
"description": "A person having origins in any of the original peoples of the Far East, Southeast Asia, or the Indian Subcontinent, including, for example, Cambodia, China, India, Japan, Korea, Malaysia, Pakistan, the Philippine Islands, Thailand, and Vietnam."
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"text": "American Indian or Alaska Native (Not Hispanic or Latino)",
|
|
253
|
+
"optionId": "American Indian or Alaska Native (Not Hispanic or Latino)",
|
|
254
|
+
"description": "A person having origins in any of the original peoples of North and South America (including Central America), and who maintain tribal affiliation or community attachment."
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"text": "Two or More Races (Not Hispanic or Latino)",
|
|
258
|
+
"optionId": "Two or More Races (Not Hispanic or Latino)",
|
|
259
|
+
"description": "All persons who identify with more than one of the above five races."
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"text": "Decline to self-identify",
|
|
263
|
+
"optionId": "Decline to self-identify"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"prompt": "Race",
|
|
267
|
+
"value": null
|
|
268
|
+
},
|
|
269
|
+
"veteran": {
|
|
270
|
+
"description": "We are a Government contractor subject to the Section 4212 of the Vietnam Era Veterans’ Readjustment Assistance Act of 1974, as amended by the Jobs for Veterans Act of 2002, which requires Government contractors to take affirmative action to employ and advance in employment: (1) Disabled veterans – A veteran who served on active duty in the U.S. military and is entitled to disability compensation (or who but for the receipt of military retired pay would be entitled to disability compensation) under laws administered by the Secretary of Veterans Affairs, or was discharged or released from active duty because of a service-connected disability; (2) Recently separated veteran – A veteran separated during the three-year period beginning on the date of the veteran's discharge or release from active duty in the U.S military, ground, naval, or air service; (3) Active duty wartime or campaign badge veteran – A veteran who served on active duty in the U.S. military during a war, or in a campaign or expedition for which a campaign badge was authorized under the laws administered by the Department of Defense; (4) Armed forces service medal veteran – A veteran who, while serving on active duty in the U.S. military ground, naval, or air service, participated in a United States military operation for which an Armed Forces service medal was awarded pursuant to Executive Order 12985 (61 Fed. Reg. 1209). If you believe that you belong to any of the categories of protected veterans, please indicate by making the appropriate selection.",
|
|
271
|
+
"required": false,
|
|
272
|
+
"text": "Veteran status",
|
|
273
|
+
"type": "dropdown",
|
|
274
|
+
"options": [
|
|
275
|
+
{
|
|
276
|
+
"text": "I am a Protected Veteran",
|
|
277
|
+
"optionId": "I am a Protected Veteran",
|
|
278
|
+
"description": "I identify as one or more of the classifications of protected veteran"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"text": "I am not a Protected Veteran",
|
|
282
|
+
"optionId": "I am not a Protected Veteran",
|
|
283
|
+
"description": "I do not identify as one or more of the classifications of protected veteran"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"text": "Decline to self-identify",
|
|
287
|
+
"optionId": "Decline to self-identify",
|
|
288
|
+
"description": "I decline to self-identify for protected veteran status"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"prompt": "Veteran status",
|
|
292
|
+
"value": null
|
|
293
|
+
},
|
|
294
|
+
"disability": {
|
|
295
|
+
"description": null,
|
|
296
|
+
"required": false,
|
|
297
|
+
"text": "Voluntary self-identification of disability",
|
|
298
|
+
"type": "dropdown",
|
|
299
|
+
"options": [
|
|
300
|
+
{
|
|
301
|
+
"text": "Yes, I have a disability, or have a history/record of having a disability",
|
|
302
|
+
"optionId": "Yes, I have a disability, or have a history/record of having a disability"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"text": "No, I don't have a disability, or a history/record of having a disability",
|
|
306
|
+
"optionId": "No, I don't have a disability, or a history/record of having a disability"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"text": "I don't wish to answer",
|
|
310
|
+
"optionId": "I don't wish to answer"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"prompt": "Voluntary self-identification of disability",
|
|
314
|
+
"value": null
|
|
315
|
+
},
|
|
316
|
+
"disabilitySignature": {
|
|
317
|
+
"type": "text",
|
|
318
|
+
"text": "Disability signature",
|
|
319
|
+
"description": "Captured user signature string. eg. \"First Last\"",
|
|
320
|
+
"required": false,
|
|
321
|
+
"value": null
|
|
322
|
+
},
|
|
323
|
+
"disabilitySignatureDate": {
|
|
324
|
+
"type": "text",
|
|
325
|
+
"text": "Disability signature date",
|
|
326
|
+
"description": "Please enter the date when the disabilitySignature was filled out eg. \"11/21/2022\"",
|
|
327
|
+
"required": false,
|
|
328
|
+
"value": null
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"id": "54d15a33-c024-4ba4-bc62-6f9588978758",
|
|
4
|
+
"text": "test",
|
|
5
|
+
"state": "published",
|
|
6
|
+
"distributionChannels": [
|
|
7
|
+
"public"
|
|
8
|
+
],
|
|
9
|
+
"user": "715f7dbc-7e66-4bf6-949e-2d8bf368f9f5",
|
|
10
|
+
"owner": "715f7dbc-7e66-4bf6-949e-2d8bf368f9f5",
|
|
11
|
+
"hiringManager": null,
|
|
12
|
+
"categories": {
|
|
13
|
+
"commitment": "worktype1",
|
|
14
|
+
"department": null,
|
|
15
|
+
"level": null,
|
|
16
|
+
"location": "STUTTGART",
|
|
17
|
+
"team": "team1",
|
|
18
|
+
"allLocations": [
|
|
19
|
+
"STUTTGART"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"tags": [],
|
|
23
|
+
"content": {
|
|
24
|
+
"description": "Hello World\n",
|
|
25
|
+
"descriptionHtml": "<div>Hello World</div>",
|
|
26
|
+
"lists": [],
|
|
27
|
+
"closing": "",
|
|
28
|
+
"closingHtml": ""
|
|
29
|
+
},
|
|
30
|
+
"country": "AS",
|
|
31
|
+
"followers": [
|
|
32
|
+
"715f7dbc-7e66-4bf6-949e-2d8bf368f9f5"
|
|
33
|
+
],
|
|
34
|
+
"reqCode": "",
|
|
35
|
+
"requisitionCodes": [],
|
|
36
|
+
"urls": {
|
|
37
|
+
"list": "https://jobs.sandbox.lever.co/de",
|
|
38
|
+
"show": "https://jobs.sandbox.lever.co/de/54d15a33-c024-4ba4-bc62-6f9588978758",
|
|
39
|
+
"apply": "https://jobs.sandbox.lever.co/de/54d15a33-c024-4ba4-bc62-6f9588978758/apply"
|
|
40
|
+
},
|
|
41
|
+
"confidentiality": "non-confidential",
|
|
42
|
+
"createdAt": 1716466155252,
|
|
43
|
+
"updatedAt": 1719617791866,
|
|
44
|
+
"workplaceType": "onsite",
|
|
45
|
+
"salaryRange": {
|
|
46
|
+
"min": 1,
|
|
47
|
+
"max": 123,
|
|
48
|
+
"currency": "EUR",
|
|
49
|
+
"interval": "per-year-salary"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"job_id": null,
|
|
3
|
+
"job_type": null,
|
|
4
|
+
"job_slug": null,
|
|
5
|
+
"job_type_value": null,
|
|
6
|
+
"activity_status": null,
|
|
7
|
+
"job_status": null,
|
|
8
|
+
"user_id": null,
|
|
9
|
+
"referrer_url": null,
|
|
10
|
+
"duration": null,
|
|
11
|
+
"code_lang": null,
|
|
12
|
+
"title": null,
|
|
13
|
+
"position": null,
|
|
14
|
+
"description": null,
|
|
15
|
+
"key_skills": null,
|
|
16
|
+
"salary": null,
|
|
17
|
+
"euro_salary": null,
|
|
18
|
+
"relevance_score": null,
|
|
19
|
+
"currency": null,
|
|
20
|
+
"start_slot": null,
|
|
21
|
+
"longitude": null,
|
|
22
|
+
"latitude": null,
|
|
23
|
+
"country_code": null,
|
|
24
|
+
"postal_code": null,
|
|
25
|
+
"city": null,
|
|
26
|
+
"address": null,
|
|
27
|
+
"view_count": null,
|
|
28
|
+
"created_at": null,
|
|
29
|
+
"updated_at": null,
|
|
30
|
+
"applications_count": null,
|
|
31
|
+
"employer_rating": null,
|
|
32
|
+
"job_notifications": null,
|
|
33
|
+
"boost": null,
|
|
34
|
+
"cv_required": null,
|
|
35
|
+
"allowed_cv_formats": null,
|
|
36
|
+
"deleted_at": null,
|
|
37
|
+
"job_value": null,
|
|
38
|
+
"allowed_cv_format": null,
|
|
39
|
+
"application_options_attributes": "data-<lever>",
|
|
40
|
+
"image_url": null
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"job_id": null,
|
|
3
|
+
"job_type": null,
|
|
4
|
+
"job_slug": "data.id",
|
|
5
|
+
"job_type_value": null,
|
|
6
|
+
"activity_status": null,
|
|
7
|
+
"job_status": "data.state-<enum|published:listed,else:unlisted>",
|
|
8
|
+
"user_id": null,
|
|
9
|
+
"referrer_url": "data.urls.show",
|
|
10
|
+
"duration": null,
|
|
11
|
+
"code_lang": null,
|
|
12
|
+
"title": "data.text",
|
|
13
|
+
"position": "data.text",
|
|
14
|
+
"description": "data.content.descriptionHtml",
|
|
15
|
+
"key_skills": null,
|
|
16
|
+
"salary": null,
|
|
17
|
+
"euro_salary": null,
|
|
18
|
+
"relevance_score": null,
|
|
19
|
+
"currency": null,
|
|
20
|
+
"start_slot": null,
|
|
21
|
+
"longitude": null,
|
|
22
|
+
"latitude": null,
|
|
23
|
+
"country_code": "data.country",
|
|
24
|
+
"postal_code": null,
|
|
25
|
+
"city": "data.categories.allLocations-<flatten>",
|
|
26
|
+
"address": null,
|
|
27
|
+
"view_count": null,
|
|
28
|
+
"created_at": null,
|
|
29
|
+
"updated_at": null,
|
|
30
|
+
"applications_count": null,
|
|
31
|
+
"employer_rating": null,
|
|
32
|
+
"job_notifications": null,
|
|
33
|
+
"boost": null,
|
|
34
|
+
"cv_required": null,
|
|
35
|
+
"allowed_cv_formats": null,
|
|
36
|
+
"deleted_at": null,
|
|
37
|
+
"job_value": null,
|
|
38
|
+
"allowed_cv_format": null,
|
|
39
|
+
"application_options_attributes": null,
|
|
40
|
+
"image_url": null
|
|
41
|
+
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mawsitsit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Hummel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-06-
|
|
11
|
+
date: 2024-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -38,6 +38,10 @@ files:
|
|
|
38
38
|
- lib/mawsitsit.rb
|
|
39
39
|
- lib/mawsitsit/version.rb
|
|
40
40
|
- sig/mawsitsit.rbs
|
|
41
|
+
- var/data_lever_test_1.identifier
|
|
42
|
+
- var/data_lever_test_1.json
|
|
43
|
+
- var/data_lever_test_2.identifier
|
|
44
|
+
- var/data_lever_test_2.json
|
|
41
45
|
- var/destination.Identifier
|
|
42
46
|
- var/destination.json
|
|
43
47
|
- var/expected.identifier
|
|
@@ -46,6 +50,10 @@ files:
|
|
|
46
50
|
- var/expected_test_1.json
|
|
47
51
|
- var/expected_test_2.identifier
|
|
48
52
|
- var/expected_test_2.json
|
|
53
|
+
- var/lever_test_1.identifier
|
|
54
|
+
- var/lever_test_1.json
|
|
55
|
+
- var/lever_test_2.identifier
|
|
56
|
+
- var/lever_test_2.json
|
|
49
57
|
- var/origin.Identifier
|
|
50
58
|
- var/origin.json
|
|
51
59
|
- var/test_1.identifier
|