From d7d7c8d8d57cdb03614bcfbdde164e5f62bc4cbd Mon Sep 17 00:00:00 2001 From: Nedhir Ebnou Date: Wed, 27 Nov 2024 17:19:38 +0100 Subject: [PATCH] feature: Add SmartRecruiters Connector in CRUD v2 --- README.md | 2 +- manifest.json | 11514 ++++++++++++++++ src/hrflow_connectors/v2/__init__.py | 3 +- .../v2/connectors/smartrecruiters/README.md | 94 + .../v2/connectors/smartrecruiters/__init__.py | 3 + .../v2/connectors/smartrecruiters/aisles.py | 486 + .../connectors/smartrecruiters/connector.py | 330 + .../connectors/smartrecruiters/connector.pyi | 15 + .../docs/archive_jobs_in_hrflow.md | 85 + .../docs/archive_profiles_in_hrflow.md | 89 + .../archive_profiles_in_smartrecruiters.md | 77 + .../docs/create_jobs_in_hrflow.md | 87 + .../docs/create_profiles_in_hrflow.md | 89 + .../create_profiles_in_smartrecruiters.md | 77 + .../docs/update_jobs_in_hrflow.md | 85 + .../docs/update_profiles_in_hrflow.md | 91 + .../update_profiles_in_smartrecruiters.md | 77 + .../v2/connectors/smartrecruiters/logo.png | Bin 0 -> 11858 bytes .../format/archive_jobs_in_hrflow.json | 3 + .../format/archive_profiles_in_hrflow.json | 3 + .../archive_profiles_in_smartrecruiters.json | 3 + .../format/create_jobs_in_hrflow.json | 63 + .../format/create_profiles_in_hrflow.json | 18 + .../create_profiles_in_smartrecruiters.json | 13 + .../format/update_jobs_in_hrflow.json | 63 + .../format/update_profiles_in_hrflow.json | 18 + .../update_profiles_in_smartrecruiters.json | 13 + .../smartrecruiters/notebooks/.gitkeep | 0 .../v2/connectors/smartrecruiters/schemas.py | 162 + .../smartrecruiters/test-config.yaml | 58 + .../connectors/smartrecruiters/warehouse.py | 10 + 31 files changed, 13629 insertions(+), 2 deletions(-) create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/README.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/__init__.py create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/aisles.py create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/connector.py create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/connector.pyi create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_smartrecruiters.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_smartrecruiters.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_smartrecruiters.md create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/logo.png create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/archive_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/archive_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/archive_profiles_in_smartrecruiters.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_smartrecruiters.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_smartrecruiters.json create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/notebooks/.gitkeep create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/schemas.py create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/test-config.yaml create mode 100644 src/hrflow_connectors/v2/connectors/smartrecruiters/warehouse.py diff --git a/README.md b/README.md index 952f5a095..205138907 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ We invite developers to join us in our mission to bring AI and data integration | [**Recruitee**](./src/hrflow_connectors/v1/connectors/recruitee/README.md) | ATS | :book: Open source | *30/10/2022* | *23/10/2024* | | [**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/v1/connectors/smartrecruiters/README.md) | ATS | :book: Open source | *21/03/2022* | *05/09/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* | | [**TalentSoft**](./src/hrflow_connectors/v1/connectors/talentsoft/README.md) | HCM | :book: Open source | *19/04/2022* | ** | | [**Teamtailor**](./src/hrflow_connectors/v1/connectors/teamtailor/README.md) | ATS | :book: Open source | *06/10/2022* | *05/09/2024* | diff --git a/manifest.json b/manifest.json index 54d366db0..6b571ee1e 100644 --- a/manifest.json +++ b/manifest.json @@ -36171,6 +36171,11520 @@ } } ] + }, + { + "name": "SmartRecruiters", + "type": "ATS", + "subtype": "smartrecruiters", + "logo": "https://raw.githubusercontent.com/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/smartrecruiters/logo.png", + "actions": [ + { + "name": "create_jobs_in_hrflow", + "data_type": "job", + "direction": "inbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "x_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersJob", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "refNumber": { + "type": "string" + }, + "createdOn": { + "type": "string" + }, + "updatedOn": { + "type": "string" + }, + "department": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Department" + } + ] + }, + "location": { + "$ref": "#/$defs/JobLocation" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "postingStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "targetHiringDate": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "industry": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Industry" + } + ] + }, + "function": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Function" + } + ] + }, + "typeOfEmployment": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/TypeOfEmployment" + } + ] + }, + "experienceLevel": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ExperienceLevel" + } + ] + }, + "eeoCategory": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/EeoCategory" + } + ] + }, + "creator": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Creator" + } + ] + }, + "compensation": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Compensation" + } + ] + }, + "jobAd": { + "$ref": "#/$defs/JobAd" + } + }, + "required": [ + "title", + "refNumber", + "createdOn", + "updatedOn", + "department", + "location", + "status", + "postingStatus", + "targetHiringDate", + "industry", + "function", + "typeOfEmployment", + "experienceLevel", + "eeoCategory", + "creator", + "compensation", + "jobAd" + ], + "$defs": { + "Department": { + "title": "Department", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "JobLocation": { + "title": "JobLocation", + "type": "object", + "properties": { + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "countryCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "regionCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "type": "string" + }, + "address": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "longitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "latitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "remote": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "manual": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "address", + "longitude", + "latitude", + "remote", + "manual" + ] + }, + "Industry": { + "title": "Industry", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Function": { + "title": "Function", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "TypeOfEmployment": { + "title": "TypeOfEmployment", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "ExperienceLevel": { + "title": "ExperienceLevel", + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ] + }, + "EeoCategory": { + "title": "EeoCategory", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Creator": { + "title": "Creator", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + }, + "required": [ + "firstName", + "lastName" + ] + }, + "Compensation": { + "title": "Compensation", + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "min", + "max", + "currency" + ] + }, + "JobAd": { + "title": "JobAd", + "type": "object", + "properties": { + "sections": { + "$ref": "#/$defs/Sections" + } + }, + "required": [ + "sections" + ] + }, + "Sections": { + "title": "Sections", + "type": "object", + "properties": { + "companyDescription": { + "$ref": "#/$defs/CompanyDescription" + }, + "jobDescription": { + "$ref": "#/$defs/JobDescription" + }, + "qualifications": { + "$ref": "#/$defs/Qualifications" + }, + "additionalInformation": { + "$ref": "#/$defs/AdditionalInformation" + } + }, + "required": [ + "companyDescription", + "jobDescription", + "qualifications", + "additionalInformation" + ] + }, + "CompanyDescription": { + "title": "CompanyDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "JobDescription": { + "title": "JobDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "Qualifications": { + "title": "Qualifications", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "AdditionalInformation": { + "title": "AdditionalInformation", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "query": { + "description": "Case insensitive full-text query against job title e.g. java developer", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the job update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "posting_status": { + "description": "Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE']", + "anyOf": [ + { + "$ref": "#/$defs/JobPostingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_status": { + "description": "Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD']", + "anyOf": [ + { + "$ref": "#/$defs/JobStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time.", + "type": "integer", + "default": 100 + } + }, + "required": [], + "$defs": { + "JobPostingStatus": { + "title": "JobPostingStatus", + "enum": [ + "INTERNAL", + "NOT_PUBLISHED", + "PRIVATE", + "PUBLIC" + ] + }, + "JobStatus": { + "title": "JobStatus", + "enum": [ + "CANCELLED", + "CREATED", + "FILLED", + "INTERVIEW", + "OFFER", + "ON_HOLD", + "SOURCING" + ] + } + } + }, + "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": ".title || 'Undefined'", + "reference": "?.id", + "created_at": "?.createdon", + "updated_at": "?.updatedon", + "url": null, + "summary": null, + "location": { + "lat": ".location.latitude != null ?? .location.latitude | $float : null", + "lng": ".location.longitude != null ?? .location.longitude | $float : null", + "text": ".location ?? '' : $concat(.location?.country >> '', ' ', .location?.region >> '', ' ', .location?.city >> '', ' ', .location?.address >> '') | $strip" + }, + "sections": [ + "?.jobAd?.sections?.companyDescription != null ?? .jobAd.sections.companyDescription | {name: 'smartrecruiters_jobAd-sections-companyDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.jobDescription != null ?? .jobAd.sections.jobDescription | {name: 'smartrecruiters_jobAd-sections-jobDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.qualifications != null ?? .jobAd.sections.qualifications | {name: 'smartrecruiters_jobAd-sections-qualifications', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.additionalInformation != null ?? .jobAd.sections.additionalInformation | {name: 'smartrecruiters_jobAd-sections-additionalInformation', title: ?.title, description: ?.text}" + ], + "tags": [ + { + "name": "smartrecruiters_refNumber", + "value": "?.refNumber" + }, + { + "name": "smartrecruiters_status", + "value": "?.status" + }, + { + "name": "smartrecruiters_postingStatus", + "value": "?.postingStatus" + }, + { + "name": "smartrecruiters_id", + "value": "?.id" + }, + { + "name": "smartrecruiters_experienceLevel-id", + "value": "?.experienceLevel?.id" + }, + { + "name": "smartrecruiters_typeOfEmployment-id", + "value": "?.typeOfEmployment?.id" + }, + { + "name": "smartrecruiters_compensation-min", + "value": "?.compensation?.min" + }, + { + "name": "smartrecruiters_compensation-max", + "value": "?.compensation?.max" + }, + { + "name": "smartrecruiters_compensation-currency", + "value": "?.compensation?.currency" + }, + { + "name": "smartrecruiters_industry-id", + "value": "?.industry?.id" + }, + { + "name": "smartrecruiters_creator-firstName", + "value": "?.firstName" + }, + { + "name": "smartrecruiters_creator-lastName", + "value": "?.lastName" + }, + { + "name": "smartrecruiters_function-id", + "value": "?.function?.id" + }, + { + "name": "smartrecruiters_department-id", + "value": "?.department?.id" + }, + { + "name": "smartrecruiters_location-manual", + "value": "?.location?.manual" + }, + { + "name": "smartrecruiters_location-remote", + "value": "?.location?.remote" + }, + { + "name": "smartrecruiters_eeoCategory-id", + "value": "?.eeoCategory?.id" + }, + { + "name": "smartrecruiters_targetHiringDate", + "value": "?.targetHiringDate" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersJob", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "refNumber": { + "type": "string" + }, + "createdOn": { + "type": "string" + }, + "updatedOn": { + "type": "string" + }, + "department": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Department" + } + ] + }, + "location": { + "$ref": "#/$defs/JobLocation" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "postingStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "targetHiringDate": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "industry": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Industry" + } + ] + }, + "function": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Function" + } + ] + }, + "typeOfEmployment": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/TypeOfEmployment" + } + ] + }, + "experienceLevel": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ExperienceLevel" + } + ] + }, + "eeoCategory": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/EeoCategory" + } + ] + }, + "creator": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Creator" + } + ] + }, + "compensation": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Compensation" + } + ] + }, + "jobAd": { + "$ref": "#/$defs/JobAd" + } + }, + "required": [ + "title", + "refNumber", + "createdOn", + "updatedOn", + "department", + "location", + "status", + "postingStatus", + "targetHiringDate", + "industry", + "function", + "typeOfEmployment", + "experienceLevel", + "eeoCategory", + "creator", + "compensation", + "jobAd" + ], + "$defs": { + "Department": { + "title": "Department", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "JobLocation": { + "title": "JobLocation", + "type": "object", + "properties": { + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "countryCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "regionCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "type": "string" + }, + "address": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "longitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "latitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "remote": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "manual": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "address", + "longitude", + "latitude", + "remote", + "manual" + ] + }, + "Industry": { + "title": "Industry", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Function": { + "title": "Function", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "TypeOfEmployment": { + "title": "TypeOfEmployment", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "ExperienceLevel": { + "title": "ExperienceLevel", + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ] + }, + "EeoCategory": { + "title": "EeoCategory", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Creator": { + "title": "Creator", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + }, + "required": [ + "firstName", + "lastName" + ] + }, + "Compensation": { + "title": "Compensation", + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "min", + "max", + "currency" + ] + }, + "JobAd": { + "title": "JobAd", + "type": "object", + "properties": { + "sections": { + "$ref": "#/$defs/Sections" + } + }, + "required": [ + "sections" + ] + }, + "Sections": { + "title": "Sections", + "type": "object", + "properties": { + "companyDescription": { + "$ref": "#/$defs/CompanyDescription" + }, + "jobDescription": { + "$ref": "#/$defs/JobDescription" + }, + "qualifications": { + "$ref": "#/$defs/Qualifications" + }, + "additionalInformation": { + "$ref": "#/$defs/AdditionalInformation" + } + }, + "required": [ + "companyDescription", + "jobDescription", + "qualifications", + "additionalInformation" + ] + }, + "CompanyDescription": { + "title": "CompanyDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "JobDescription": { + "title": "JobDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "Qualifications": { + "title": "Qualifications", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "AdditionalInformation": { + "title": "AdditionalInformation", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "query": { + "description": "Case insensitive full-text query against job title e.g. java developer", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the job update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "posting_status": { + "description": "Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE']", + "anyOf": [ + { + "$ref": "#/$defs/JobPostingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_status": { + "description": "Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD']", + "anyOf": [ + { + "$ref": "#/$defs/JobStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time.", + "type": "integer", + "default": 100 + } + }, + "required": [], + "$defs": { + "JobPostingStatus": { + "title": "JobPostingStatus", + "enum": [ + "INTERNAL", + "NOT_PUBLISHED", + "PRIVATE", + "PUBLIC" + ] + }, + "JobStatus": { + "title": "JobStatus", + "enum": [ + "CANCELLED", + "CREATED", + "FILLED", + "INTERVIEW", + "OFFER", + "ON_HOLD", + "SOURCING" + ] + } + } + }, + "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": ".title || 'Undefined'", + "reference": "?.id", + "created_at": "?.createdon", + "updated_at": "?.updatedon", + "url": null, + "summary": null, + "location": { + "lat": ".location.latitude != null ?? .location.latitude | $float : null", + "lng": ".location.longitude != null ?? .location.longitude | $float : null", + "text": ".location ?? '' : $concat(.location?.country >> '', ' ', .location?.region >> '', ' ', .location?.city >> '', ' ', .location?.address >> '') | $strip" + }, + "sections": [ + "?.jobAd?.sections?.companyDescription != null ?? .jobAd.sections.companyDescription | {name: 'smartrecruiters_jobAd-sections-companyDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.jobDescription != null ?? .jobAd.sections.jobDescription | {name: 'smartrecruiters_jobAd-sections-jobDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.qualifications != null ?? .jobAd.sections.qualifications | {name: 'smartrecruiters_jobAd-sections-qualifications', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.additionalInformation != null ?? .jobAd.sections.additionalInformation | {name: 'smartrecruiters_jobAd-sections-additionalInformation', title: ?.title, description: ?.text}" + ], + "tags": [ + { + "name": "smartrecruiters_refNumber", + "value": "?.refNumber" + }, + { + "name": "smartrecruiters_status", + "value": "?.status" + }, + { + "name": "smartrecruiters_postingStatus", + "value": "?.postingStatus" + }, + { + "name": "smartrecruiters_id", + "value": "?.id" + }, + { + "name": "smartrecruiters_experienceLevel-id", + "value": "?.experienceLevel?.id" + }, + { + "name": "smartrecruiters_typeOfEmployment-id", + "value": "?.typeOfEmployment?.id" + }, + { + "name": "smartrecruiters_compensation-min", + "value": "?.compensation?.min" + }, + { + "name": "smartrecruiters_compensation-max", + "value": "?.compensation?.max" + }, + { + "name": "smartrecruiters_compensation-currency", + "value": "?.compensation?.currency" + }, + { + "name": "smartrecruiters_industry-id", + "value": "?.industry?.id" + }, + { + "name": "smartrecruiters_creator-firstName", + "value": "?.firstName" + }, + { + "name": "smartrecruiters_creator-lastName", + "value": "?.lastName" + }, + { + "name": "smartrecruiters_function-id", + "value": "?.function?.id" + }, + { + "name": "smartrecruiters_department-id", + "value": "?.department?.id" + }, + { + "name": "smartrecruiters_location-manual", + "value": "?.location?.manual" + }, + { + "name": "smartrecruiters_location-remote", + "value": "?.location?.remote" + }, + { + "name": "smartrecruiters_eeoCategory-id", + "value": "?.eeoCategory?.id" + }, + { + "name": "smartrecruiters_targetHiringDate", + "value": "?.targetHiringDate" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersJob", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "refNumber": { + "type": "string" + }, + "createdOn": { + "type": "string" + }, + "updatedOn": { + "type": "string" + }, + "department": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Department" + } + ] + }, + "location": { + "$ref": "#/$defs/JobLocation" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "postingStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "targetHiringDate": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "industry": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Industry" + } + ] + }, + "function": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Function" + } + ] + }, + "typeOfEmployment": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/TypeOfEmployment" + } + ] + }, + "experienceLevel": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ExperienceLevel" + } + ] + }, + "eeoCategory": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/EeoCategory" + } + ] + }, + "creator": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Creator" + } + ] + }, + "compensation": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Compensation" + } + ] + }, + "jobAd": { + "$ref": "#/$defs/JobAd" + } + }, + "required": [ + "title", + "refNumber", + "createdOn", + "updatedOn", + "department", + "location", + "status", + "postingStatus", + "targetHiringDate", + "industry", + "function", + "typeOfEmployment", + "experienceLevel", + "eeoCategory", + "creator", + "compensation", + "jobAd" + ], + "$defs": { + "Department": { + "title": "Department", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "JobLocation": { + "title": "JobLocation", + "type": "object", + "properties": { + "country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "countryCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "regionCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "city": { + "type": "string" + }, + "address": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "longitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "latitude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "remote": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "manual": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "address", + "longitude", + "latitude", + "remote", + "manual" + ] + }, + "Industry": { + "title": "Industry", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Function": { + "title": "Function", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "TypeOfEmployment": { + "title": "TypeOfEmployment", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "ExperienceLevel": { + "title": "ExperienceLevel", + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ] + }, + "EeoCategory": { + "title": "EeoCategory", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "Creator": { + "title": "Creator", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + }, + "required": [ + "firstName", + "lastName" + ] + }, + "Compensation": { + "title": "Compensation", + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "min", + "max", + "currency" + ] + }, + "JobAd": { + "title": "JobAd", + "type": "object", + "properties": { + "sections": { + "$ref": "#/$defs/Sections" + } + }, + "required": [ + "sections" + ] + }, + "Sections": { + "title": "Sections", + "type": "object", + "properties": { + "companyDescription": { + "$ref": "#/$defs/CompanyDescription" + }, + "jobDescription": { + "$ref": "#/$defs/JobDescription" + }, + "qualifications": { + "$ref": "#/$defs/Qualifications" + }, + "additionalInformation": { + "$ref": "#/$defs/AdditionalInformation" + } + }, + "required": [ + "companyDescription", + "jobDescription", + "qualifications", + "additionalInformation" + ] + }, + "CompanyDescription": { + "title": "CompanyDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "JobDescription": { + "title": "JobDescription", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "Qualifications": { + "title": "Qualifications", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + }, + "AdditionalInformation": { + "title": "AdditionalInformation", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "title", + "text" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "query": { + "description": "Case insensitive full-text query against job title e.g. java developer", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the job update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "posting_status": { + "description": "Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE']", + "anyOf": [ + { + "$ref": "#/$defs/JobPostingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_status": { + "description": "Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD']", + "anyOf": [ + { + "$ref": "#/$defs/JobStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time.", + "type": "integer", + "default": 100 + } + }, + "required": [], + "$defs": { + "JobPostingStatus": { + "title": "JobPostingStatus", + "enum": [ + "INTERNAL", + "NOT_PUBLISHED", + "PRIVATE", + "PUBLIC" + ] + }, + "JobStatus": { + "title": "JobStatus", + "enum": [ + "CANCELLED", + "CREATED", + "FILLED", + "INTERVIEW", + "OFFER", + "ON_HOLD", + "SOURCING" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowJob", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "name": { + "description": "Job title.", + "type": "string" + }, + "location": { + "description": "Job location object.", + "$ref": "#/$defs/Location" + }, + "sections": { + "description": "Job custom sections.", + "type": "array", + "items": { + "$ref": "#/$defs/Section" + } + }, + "url": { + "description": "Job post original URL.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Brief summary of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "archieved_at": { + "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "list of skills of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "list of spoken languages of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "list of certifications of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "list of courses of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "list of tasks of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "list of tags of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "list of metadatas of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_float": { + "description": "list of ranges of floats", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesFloat" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_date": { + "description": "list of ranges of dates", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesDate" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "location", + "sections" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Section": { + "title": "Section", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Section of the Job. Example: culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Display Title of a Section. Example: Corporate Culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Text description of a Section: Example: Our values areNone", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "RangesFloat": { + "title": "RangesFloat", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of floats attached to the Job. Example: salary", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value. Example: 500.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value. Example: 100.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "unit": { + "description": "Unit of the value. Example: euros.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "RangesDate": { + "title": "RangesDate", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of dates attached to the Job. Example: availability.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value in datetime ISO 8601, Example: 500.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value in datetime ISO 8601, Example: 1000", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + } + } + }, + "push_parameters": { + "title": "ArchiveCriterias", + "type": "object", + "properties": { + "board_key": { + "description": "HrFlow.ai board key", + "type": "string" + } + }, + "required": [ + "board_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'updated_after', 'posting_status', 'job_status', 'limit'):\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 SmartRecruiters.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_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadProfilesParameters", + "type": "object", + "properties": { + "query": { + "description": "keyword search, for more infromation see SmartRecruiters HelpCenter", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_ids": { + "description": "List of job ids to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "onboarding_status": { + "description": "Onboarding status of a candidate", + "anyOf": [ + { + "$ref": "#/$defs/OnboardingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "candidate\u2019s status filter in a context of a job", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100", + "type": "integer", + "default": 100 + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the candidate update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "OnboardingStatus": { + "title": "OnboardingStatus", + "enum": [ + "ONBOARDING_FAILED", + "ONBOARDING_SUCCESSFUL", + "READY_TO_ONBOARD" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "CreateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "info": { + "first_name": "?.firstName", + "last_name": "?.lastName", + "full_name": "$concat(.firstName || '' , ' ', .lastName || '')", + "email": "?.email", + "phone": "?.phoneNumber", + "location": "?.location ?? .location | {lat: ?.lat ?? .lat | $float: null, lng: ?.lng ?? .lng | $float: null, text: $concat(.country ?? '', ' ', .region ?? '', ' ', .city ?? '', ' ', .address ?? '') | $strip}: {lat: null, lng: null, text: ''}", + "urls": "?.web ?? .web | $items | $map({type: .[0], url: .[1]}): []" + }, + "created_at": "?.createdOn", + "updated_at": "?.updatedOn", + "experiences": "?.experience | $map({company: ?.company, description: ?.description, date_end: ?.endDate, date_start: ?.startDate, title: ?.title, location: {lat: null, lng: null, text: ?.location}})", + "educations": "?.education | $map({school: ?.institution, title: $concat(?.major || '', ',', ?.degree || ''), date_start: ?.startDate, date_end: ?.endDate, description: ?.description, location: {lat: null, lng: null, text: .location}})", + "skills": [], + "tags": [] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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": "create_profiles_in_smartrecruiters", + "data_type": "profile", + "direction": "outbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "x_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "target_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "push_parameters": { + "title": "WriteProfilesParameters", + "type": "object", + "properties": {}, + "required": [], + "$defs": {} + }, + "jsonmap": { + "firstName": ".info.first_name", + "lastName": ".info.last_name", + "email": ".info.email", + "phoneNumber": ".info.phone", + "location": ".info.location | {lat: .lat >> 0, lng: .lng >> 0, city: .fields >> {} | ?.city >> Undefined, country: .fields >> {} | ?.country >> Undefined, region: .fields >> {} | ?.region >> Undefined }", + "experiences": ".experiences | $map({title: .title >> Undefined, company: .company >> Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "educations": ".educations | $map({institution: .school >> Undefined, degree: .title >> Undefined, major: Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "web": "{'type': 'url'}", + "tags": "[]", + "consent": true, + "attachments": "?.attachments >> []" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.create_profiles_in_smartrecruiters(\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 SmartRecruiters.create_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.create_profiles_in_smartrecruiters(\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 SmartRecruiters\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 SmartRecruiters.create_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.create_profiles_in_smartrecruiters(\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_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadProfilesParameters", + "type": "object", + "properties": { + "query": { + "description": "keyword search, for more infromation see SmartRecruiters HelpCenter", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_ids": { + "description": "List of job ids to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "onboarding_status": { + "description": "Onboarding status of a candidate", + "anyOf": [ + { + "$ref": "#/$defs/OnboardingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "candidate\u2019s status filter in a context of a job", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100", + "type": "integer", + "default": 100 + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the candidate update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "OnboardingStatus": { + "title": "OnboardingStatus", + "enum": [ + "ONBOARDING_FAILED", + "ONBOARDING_SUCCESSFUL", + "READY_TO_ONBOARD" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "UpdateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + }, + "only_edit_fields": { + "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "info": { + "first_name": "?.firstName", + "last_name": "?.lastName", + "full_name": "$concat(.firstName || '' , ' ', .lastName || '')", + "email": "?.email", + "phone": "?.phoneNumber", + "location": "?.location ?? .location | {lat: ?.lat ?? .lat | $float: null, lng: ?.lng ?? .lng | $float: null, text: $concat(.country ?? '', ' ', .region ?? '', ' ', .city ?? '', ' ', .address ?? '') | $strip}: {lat: null, lng: null, text: ''}", + "urls": "?.web ?? .web | $items | $map({type: .[0], url: .[1]}): []" + }, + "created_at": "?.createdOn", + "updated_at": "?.updatedOn", + "experiences": "?.experience | $map({company: ?.company, description: ?.description, date_end: ?.endDate, date_start: ?.startDate, title: ?.title, location: {lat: null, lng: null, text: ?.location}})", + "educations": "?.education | $map({school: .institution, title: $concat(.major, ',', .degree), date_start: .startDate, date_end: .endDate, description: .description, location: {lat: null, lng: null, text: .location}})", + "skills": [], + "tags": [] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key', 'only_edit_fields'):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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": "update_profiles_in_smartrecruiters", + "data_type": "profile", + "direction": "outbound", + "mode": "update", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "x_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "target_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "push_parameters": { + "title": "WriteProfilesParameters", + "type": "object", + "properties": {}, + "required": [], + "$defs": {} + }, + "jsonmap": { + "firstName": ".info.first_name", + "lastName": ".info.last_name", + "email": ".info.email", + "phoneNumber": ".info.phone", + "location": ".info.location | {lat: .lat >> 0, lng: .lng >> 0, city: .fields >> {} | ?.city >> Undefined, country: .fields >> {} | ?.country >> Undefined, region: .fields >> {} | ?.region >> Undefined }", + "experiences": ".experiences | $map({title: .title >> Undefined, company: .company >> Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "educations": ".educations | $map({institution: .school >> Undefined, degree: .title >> Undefined, major: Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "web": "{'type': 'url'}", + "tags": "[]", + "consent": true, + "attachments": "?.attachments >> []" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.update_profiles_in_smartrecruiters(\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 SmartRecruiters.update_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.update_profiles_in_smartrecruiters(\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 SmartRecruiters\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 SmartRecruiters.update_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.update_profiles_in_smartrecruiters(\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_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "origin_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadProfilesParameters", + "type": "object", + "properties": { + "query": { + "description": "keyword search, for more infromation see SmartRecruiters HelpCenter", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_ids": { + "description": "List of job ids to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags to filter candidates by", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "onboarding_status": { + "description": "Onboarding status of a candidate", + "anyOf": [ + { + "$ref": "#/$defs/OnboardingStatus" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "candidate\u2019s status filter in a context of a job", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "limit": { + "description": "Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100", + "type": "integer", + "default": 100 + }, + "updated_after": { + "description": "ISO8601-formatted time boundaries for the candidate update time", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "OnboardingStatus": { + "title": "OnboardingStatus", + "enum": [ + "ONBOARDING_FAILED", + "ONBOARDING_SUCCESSFUL", + "READY_TO_ONBOARD" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "ArchiveCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n pull_parameters[parameter] = _request[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n if parameter_name in _request:\n push_parameters[parameter] = _request[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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 SmartRecruiters\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 SmartRecruiters.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_smart_token',):\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 ('query', 'job_ids', 'tags', 'onboarding_status', 'status', 'limit', 'updated_after'):\n parameter_name = \"{}{}\".format(PULL_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n pull_parameters[parameter] = settings[parameter_name]\n \n\n push_parameters = dict()\n for parameter in ('source_key',):\n parameter_name = \"{}{}\".format(PUSH_PARAMETERS_SETTINGS_PREFIX, parameter)\n if parameter_name in settings:\n push_parameters[parameter] = settings[parameter_name]\n \n\n incremental = settings.get(\"__incremental\")\n\n return SmartRecruiters.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": "archive_profiles_in_smartrecruiters", + "data_type": "profile", + "direction": "outbound", + "mode": "archive", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "x_smart_token": { + "description": "X-SmartToken used to access SmartRecruiters API", + "type": "string" + } + }, + "required": [ + "x_smart_token" + ], + "$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": "SmartRecruiters", + "target_data_schema": { + "title": "SmartRecruitersProfile", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "location": { + "$ref": "#/$defs/ProfileLocation" + }, + "web": { + "$ref": "#/$defs/Web" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "education": { + "type": "array", + "items": { + "$ref": "#/$defs/EducationItem" + } + }, + "experience": { + "type": "array", + "items": { + "$ref": "#/$defs/ExperienceItem" + } + }, + "sourceDetails": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/sourceDetails" + } + ] + } + }, + "required": [ + "firstName", + "lastName", + "email", + "phoneNumber", + "location", + "web", + "tags", + "education", + "experience", + "sourceDetails" + ], + "$defs": { + "ProfileLocation": { + "title": "ProfileLocation", + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "city": { + "type": "string" + }, + "lat": { + "type": "integer" + }, + "lng": { + "type": "integer" + } + }, + "required": [ + "country", + "countryCode", + "regionCode", + "region", + "city", + "lat", + "lng" + ] + }, + "Web": { + "title": "Web", + "type": "object", + "properties": { + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "facebook": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website": { + "type": "string" + } + }, + "required": [ + "skype", + "linkedin", + "facebook", + "twitter", + "website" + ] + }, + "EducationItem": { + "title": "EducationItem", + "type": "object", + "properties": { + "institution": { + "type": "string" + }, + "degree": { + "type": "string" + }, + "major": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "institution", + "degree", + "major", + "current", + "location", + "startDate", + "endDate", + "description" + ] + }, + "ExperienceItem": { + "title": "ExperienceItem", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "company": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "location": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "company", + "current", + "startDate", + "endDate", + "location", + "description" + ] + }, + "sourceDetails": { + "title": "sourceDetails", + "type": "object", + "properties": { + "sourceTypeId": { + "type": "string" + }, + "sourceSubTypeId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sourceId": { + "type": "string" + } + }, + "required": [ + "sourceTypeId", + "sourceSubTypeId", + "sourceId" + ] + } + } + }, + "push_parameters": { + "title": "WriteProfilesParameters", + "type": "object", + "properties": {}, + "required": [], + "$defs": {} + }, + "jsonmap": { + "id": "?.reference" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import SmartRecruiters\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 SmartRecruiters.archive_profiles_in_smartrecruiters(\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 SmartRecruiters.archive_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.archive_profiles_in_smartrecruiters(\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 SmartRecruiters\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 SmartRecruiters.archive_profiles_in_smartrecruiters(\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_smart_token',):\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 SmartRecruiters.archive_profiles_in_smartrecruiters(\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 5e5382649..a294ea930 100644 --- a/src/hrflow_connectors/v2/__init__.py +++ b/src/hrflow_connectors/v2/__init__.py @@ -1,5 +1,6 @@ from hrflow_connectors.v2.connectors.admen import Admen from hrflow_connectors.v2.connectors.bullhorn import Bullhorn +from hrflow_connectors.v2.connectors.smartrecruiters import SmartRecruiters from hrflow_connectors.v2.connectors.zohorecruit import ZohoRecruit from hrflow_connectors.v2.core.connector import ( # noqa: F401 hrflow_connectors_manifest as hrflow_connectors_manifest, @@ -8,4 +9,4 @@ hrflow_connectors_docs as hrflow_connectors_docs, ) -__CONNECTORS__ = [Bullhorn, ZohoRecruit, Admen] +__CONNECTORS__ = [Bullhorn, ZohoRecruit, Admen, SmartRecruiters] diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/README.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/README.md new file mode 100644 index 000000000..46180b522 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/README.md @@ -0,0 +1,94 @@ +# 📖 Summary +- [📖 Summary](#-summary) +- [💼 About SmartRecruiters](#-about-smartrecruiters) + - [😍 Why is it a big deal for SmartRecruiters customers \& partners?](#-why-is-it-a-big-deal-for-smartrecruiters-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 SmartRecruiters + +SmartRecruiters’ Talent Acquisition Suite is used by organizations to make the best hires. It has complete functionality for recruitment marketing and collaborative hiring built on a modern cloud platform with an open marketplace for 3rd party recruitment services. + +

+ +

+ +

+ +

+ +## 😍 Why is it a big deal for SmartRecruiters customers & partners? + +This new connector will enable: + +- ⚡ A Fastlane Talent & Workforce data integration for SmartRecruiters customers & partners +- 🤖 Cutting-edge AI-powered Talent Experiences & Recruiter Experiences for SmartRecruiters customers + +# 🔧 How does it work? + +## 📊 Data integration capabilities: + +- ➡️ Send Profiles data from a Source of your choice to SmartRecruiters +- ⬅️ Send Jobs data from SmartRecruiters to a Destination of your choice + +## 🧠 Artificial Intelligence capabilities: + +- Extract, Structure, and Categorize Talent & Workforce data +- Search, Score, and Match Profiles & Jobs with our APIs and AI Widgets + +# 🔌 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 | +| [**Create profiles in **](docs/create_profiles_in_.md) | Send **created** 'profile(s)' _from_ HrFlow _to_ | +| [**Update profiles in hrflow**](docs/update_profiles_in_hrflow.md) | Send **updated** 'profile(s)' _from_ _to_ HrFlow | +| [**Update profiles in **](docs/update_profiles_in_.md) | Send **updated** 'profile(s)' _from_ HrFlow _to_ | +| [**Archive profiles in hrflow**](docs/archive_profiles_in_hrflow.md) | Send **archived** 'profile(s)' _from_ _to_ HrFlow | +| [**Archive profiles in **](docs/archive_profiles_in_.md) | Send **archived** '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 [SmartRecruiters](https://www.smartrecruiters.com/) to learn more. +- ⚙️ API documentation : (https://developers.smartrecruiters.com/doc) +- 💻 [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/connectors/smartrecruiters) on our Github. + + +# 👏 Special Thanks +- 💻 HrFlow.ai : [the-forest-tree](https://github.com/the-forest-tree) - Software Engineer +- 🤝 [SmartRecruiters](https://www.smartrecruiters.com/) : Special thanks to the SmartRecruiters team for their help and collaboration in building this integrationn \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/__init__.py b/src/hrflow_connectors/v2/connectors/smartrecruiters/__init__.py new file mode 100644 index 000000000..556da1581 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/__init__.py @@ -0,0 +1,3 @@ +from hrflow_connectors.v2.connectors.smartrecruiters.connector import ( # noqa + SmartRecruiters, +) diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/aisles.py b/src/hrflow_connectors/v2/connectors/smartrecruiters/aisles.py new file mode 100644 index 000000000..2c951b415 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/aisles.py @@ -0,0 +1,486 @@ +import enum +import typing as t +from logging import LoggerAdapter + +import requests +from msgspec import Meta, Struct +from typing_extensions import Annotated + +from hrflow_connectors.v2.connectors.smartrecruiters.schemas import ( + SmartRecruitersJob, + SmartRecruitersProfile, +) +from hrflow_connectors.v2.core.common import Entity +from hrflow_connectors.v2.core.warehouse import ( # Endpoints, + Aisle, + Criterias, + Endpoint, + ReadOperation, + WriteOperation, + merge, +) + +SMARTRECRUITERS_JOBS_ENDPOINT = "https://api.smartrecruiters.com/jobs" +SMARTRECRUITERS_PROFILES_ENDPOINT = "https://api.smartrecruiters.com/candidates" +SMARTRECRUITERS_ENDPOINT_LIMIT = 100 + +GET_ALL_JOBS_ENDPOINT = Endpoint( + name="Get all jobs", + description=( + "Endpoint to search jobs by traditional params (offset, limit...)" + " and get the list of all jobs with their ids, the request method" + " is `GET`" + ), + url="https://developers.smartrecruiters.com/reference/jobsall-1", +) +GET_JOB_ENDPOINT = Endpoint( + name="Get job", + description=( + "Endpoint to get the content of a job with a given id, a jobId parameter is" + " required, the request method is `GET`" + ), + url="https://developers.smartrecruiters.com/reference/jobsget-1", +) +UPDATE_JOB_ENDPOINT = Endpoint( + name="Update job", + description=( + "Endpoint to update a job with a given id, a jobId parameter is required, the" + " request method is `PUT`" + ), + url="https://developers.smartrecruiters.com/reference/jobspatch-1", +) +GET_CANDIDATE_ENDPOINT = Endpoint( + name="Get candidate", + description=( + "Endpoint to get the content of a candidate with a given id, a candidateId" + " parameter is required, the request method is `GET`" + ), + url="https://developers.smartrecruiters.com/reference/candidatesget-1", +) + +POST_CANDIDATE_ENDPOINT = Endpoint( + name="Post Candidate", + description=( + "Endpoint to create a new candidate and assign to a talent pool, the request" + " method is `POST`" + ), + url="https://developers.smartrecruiters.com/reference/candidatesadd-1", +) + +UPDATE_CANDIDATE_ENDPOINT = Endpoint( + name="Update Candidate", + description=( + "Endpoint to update a candidate with a given id, a candidateId parameter is" + " required, the request method is `PUT`" + ), + url="https://developers.smartrecruiters.com/reference/candidatespatch-1", +) + +DELETE_CANDIDATE_ENDPOINT = Endpoint( + name="Delete Candidate", + description=( + "Endpoint to delete a candidate with a given id, a candidateId parameter is" + " required, the request method is `DELETE`" + ), + url="https://developers.smartrecruiters.com/reference/candidatesdelete-1", +) + + +class JobPostingStatus(str, enum.Enum): + public = "PUBLIC" + internal = "INTERNAL" + not_published = "NOT_PUBLISHED" + private = "PRIVATE" + + +class JobStatus(str, enum.Enum): + created = "CREATED" + sourcing = "SOURCING" + filled = "FILLED" + interview = "INTERVIEW" + offer = "OFFER" + cancelled = "CANCELLED" + on_hold = "ON_HOLD" + + +class OnboardingStatus(str, enum.Enum): + ready_to_onboard = "READY_TO_ONBOARD" + onboarding_successful = "ONBOARDING_SUCCESSFUL" + onboarding_failed = "ONBOARDING_FAILED" + + +class AuthParameters(Struct): + x_smart_token: Annotated[ + str, + Meta( + description="X-SmartToken used to access SmartRecruiters API", + ), + ] + + +class ReadJobsParameters(Struct): + query: Annotated[ + t.Optional[str], + Meta( + description=( + "Case insensitive full-text query against job title e.g. java developer" + ), + ), + ] = None + updated_after: Annotated[ + t.Optional[str], + Meta( + description="ISO8601-formatted time boundaries for the job update time", + ), + ] = None + posting_status: Annotated[ + t.Optional[JobPostingStatus], + Meta( + description="Posting status of a job. One of {}".format( + [e.value for e in JobPostingStatus] + ), + ), + ] = None + job_status: Annotated[ + t.Optional[JobStatus], + Meta( + description="Status of a job. One of {}".format( + [e.value for e in JobStatus] + ), + ), + ] = None + limit: Annotated[ + int, + Meta(description="Number of items to pull from SmartRecruiters at a time."), + ] = SMARTRECRUITERS_ENDPOINT_LIMIT + + +class ReadProfilesParameters(Struct): + query: Annotated[ + t.Optional[str], + Meta( + description=( + "keyword search, for more infromation see SmartRecruiters HelpCenter" + ), + ), + ] = None + job_ids: Annotated[ + t.Optional[t.List[str]], + Meta( + description="List of job ids to filter candidates by", + ), + ] = None + tags: Annotated[ + t.Optional[t.List[str]], + Meta( + description="List of tags to filter candidates by", + ), + ] = None + onboarding_status: Annotated[ + t.Optional[OnboardingStatus], + Meta( + description="Onboarding status of a candidate", + ), + ] = None + status: Annotated[ + t.Optional[t.List[str]], + Meta( + description="candidate’s status filter in a context of a job", + ), + ] = None + limit: Annotated[ + int, + Meta( + description=( + "Number of items to pull from SmartRecruiters at a time. Not matter" + " what value is supplied it is capped at {}".format( + SMARTRECRUITERS_ENDPOINT_LIMIT + ) + ), + ), + ] = SMARTRECRUITERS_ENDPOINT_LIMIT + updated_after: Annotated[ + t.Optional[str], + Meta( + description=( + "ISO8601-formatted time boundaries for the candidate update time" + ), + ), + ] = None + + +class WriteProfilesParameters(Struct): + pass + + +def read_jobs( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadJobsParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterable[t.Dict]: + # The limit parameter in the endpoint specifies the number of items per page, + # not the total number of items returned. Therefore, we need to manually limit + # the number of items retrieved. + + page = None + jobs = [] + while True: + params = dict( + q=parameters.query, + updatedAfter=parameters.updated_after, + postingStatus=parameters.posting_status, + status=parameters.job_status, + limit=( + parameters.limit + if parameters.limit < SMARTRECRUITERS_ENDPOINT_LIMIT + else SMARTRECRUITERS_ENDPOINT_LIMIT + ), + pageId=page, + ) + response = requests.get( + SMARTRECRUITERS_JOBS_ENDPOINT, + headers={"X-SmartToken": auth_parameters.x_smart_token}, + params=params, + ) + if response.status_code // 100 != 2: + adapter.error( + "Failed to pull jobs from SmartRecruiters params={}" + " status_code={} response={}".format( + params, response.status_code, response.text + ) + ) + raise Exception("Failed to pull jobs from SmartRecruiters") + response = response.json() + jobs += response["content"] + if len(jobs) == 0 or len(jobs) >= parameters.limit: + break + + page = response["nextPageId"] + + if len(jobs) > parameters.limit: + jobs = jobs[: parameters.limit] + + for job in jobs: + full_job_response = requests.get( + "{}/{}".format(SMARTRECRUITERS_JOBS_ENDPOINT, job["id"]), + headers={"X-SmartToken": auth_parameters.x_smart_token}, + ) + if full_job_response.status_code // 100 != 2: + adapter.error( + "Failed to pull jobs details from SmartRecruiters job_id={}" + " status_code={} response={}".format( + job["id"], + full_job_response.status_code, + full_job_response.text, + ) + ) + raise Exception("Failed to pull jobs from SmartRecruiters") + yield full_job_response.json() + + +def read_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadProfilesParameters, + incremental: bool, + incremental_token: t.Optional[str], +): + # The limit parameter in the endpoint specifies the number of items per page, + # not the total number of items returned. Therefore, we need to manually limit + # the number of items retrieved. + + page = None + profiles = [] + while True: + params = dict( + q=parameters.query, + updatedAfter=parameters.updated_after, + jobId=parameters.job_ids, + tag=parameters.tags, + onboardingStatus=parameters.onboarding_status, + status=parameters.status, + limit=( + parameters.limit + if parameters.limit < SMARTRECRUITERS_ENDPOINT_LIMIT + else SMARTRECRUITERS_ENDPOINT_LIMIT + ), + pageId=page, + ) + response = requests.get( + SMARTRECRUITERS_PROFILES_ENDPOINT, + headers={"x-smarttoken": auth_parameters.x_smart_token}, + params=params, + ) + if response.status_code // 100 != 2: + adapter.error( + "Failed to pull profiles from SmartRecruiters params={}" + " status_code={} response={}".format( + params, response.status_code, response.text + ) + ) + raise Exception("Failed to pull profiles from SmartRecruiters") + response = response.json() + profiles += response["content"] + if len(profiles) == 0 or len(profiles) >= parameters.limit: + break + + page = response["nextPageId"] + + if len(profiles) > parameters.limit: + profiles = profiles[: parameters.limit] + + for profile in profiles: + full_profile_response = requests.get( + "{}/{}".format(SMARTRECRUITERS_PROFILES_ENDPOINT, profile["id"]), + headers={"x-smarttoken": auth_parameters.x_smart_token}, + ) + if full_profile_response.status_code // 100 != 2: + adapter.error( + "Failed to pull profile details from SmartRecruiters profile_id={}" + " status_code={} response={}".format( + profile["id"], + full_profile_response.status_code, + full_profile_response.text, + ) + ) + raise Exception("Failed to pull profiles from SmartRecruiters") + yield full_profile_response.json() + + +def write_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteProfilesParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + + for profile in items: + response = requests.post( + SMARTRECRUITERS_PROFILES_ENDPOINT, + headers={"x-smarttoken": auth_parameters.x_smart_token}, + json=profile, + ) + if response.status_code != 201: + adapter.error( + "Failed to push profile to SmartRecruiters" + " status_code={} response={}".format( + response.status_code, + response.text, + ) + ) + failed_profiles.append(profile) + return failed_profiles + + +def update_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteProfilesParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + for profile in items: + response = requests.patch( + "{}/{}".format(SMARTRECRUITERS_PROFILES_ENDPOINT, profile["id"]), + headers={"x-smarttoken": auth_parameters.x_smart_token}, + json=profile, + ) + if response.status_code // 100 != 2: + adapter.error( + "Failed to update profile to SmartRecruiters profile_id={}" + " status_code={} response={}".format( + profile["id"], + response.status_code, + response.text, + ) + ) + failed_profiles.append(profile) + return failed_profiles + + +def delete_profiles( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteProfilesParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_profiles = [] + for profile in items: + response = requests.delete( + "{}/{}".format(SMARTRECRUITERS_PROFILES_ENDPOINT, profile["id"]), + headers={"x-smarttoken": auth_parameters.x_smart_token}, + ) + if response.status_code // 100 != 2: + adapter.error( + "Failed to delete profile from SmartRecruiters profile_id={}" + " status_code={} response={}".format( + profile["id"], + response.status_code, + response.text, + ) + ) + failed_profiles.append(profile) + return failed_profiles + + +JobsAisle = Aisle( + name=Entity.job, + schema=SmartRecruitersJob, + read=ReadOperation( + criterias=Criterias( + create=ReadJobsParameters, + update=ReadJobsParameters, + archive=ReadJobsParameters, + ), + function=merge( + create=read_jobs, + update=read_jobs, + archive=read_jobs, + ), + # endpoints=Endpoints( + # create=GET_JOB_ENDPOINT, + # ), + ), +) + +ProfilesAisle = Aisle( + name=Entity.profile, + schema=SmartRecruitersProfile, + read=ReadOperation( + criterias=Criterias( + create=ReadProfilesParameters, + update=ReadProfilesParameters, + archive=ReadProfilesParameters, + ), + function=merge( + create=read_profiles, + update=read_profiles, + archive=read_profiles, + ), + # endpoints=Endpoints( + # create=GET_CANDIDATE_ENDPOINT, + # update=GET_CANDIDATE_ENDPOINT, + # archive=GET_CANDIDATE_ENDPOINT, + # ), + ), + write=WriteOperation( + criterias=Criterias( + create=WriteProfilesParameters, + update=WriteProfilesParameters, + archive=WriteProfilesParameters, + ), + function=merge( + create=write_profiles, + update=update_profiles, + archive=delete_profiles, + ), + # endpoints=Endpoints( + # create=POST_CANDIDATE_ENDPOINT, + # update=UPDATE_CANDIDATE_ENDPOINT, + # archive=DELETE_CANDIDATE_ENDPOINT, + # ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.py b/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.py new file mode 100644 index 000000000..a3b12e040 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.py @@ -0,0 +1,330 @@ +import typing as t + +from hrflow_connectors.v2.connectors.smartrecruiters.warehouse import ( + SmartRecruitersWarehouse, +) +from hrflow_connectors.v2.core.common import Direction, Entity, Mode +from hrflow_connectors.v2.core.connector import Connector, ConnectorType, Flow + + +def get_job_location(smartrecruiters_location: t.Union[t.Dict, None]) -> t.Dict: + if smartrecruiters_location is None: + return dict(lat=None, lng=None, text="") + + lat = smartrecruiters_location.get("latitude") + lat = float(lat) if lat is not None else lat + + lng = smartrecruiters_location.get("longitude") + lng = float(lng) if lng is not None else lng + + concatenate = [] + for field in ["country", "region", "city", "address"]: + if smartrecruiters_location.get(field): + concatenate.append(smartrecruiters_location.get(field)) + + return dict(lat=lat, lng=lng, text=" ".join(concatenate)) + + +def get_sections(smartrecruiters_job: t.Dict) -> t.List[t.Dict]: + sections = [] + if ( + "jobAd" not in smartrecruiters_job + or "sections" not in smartrecruiters_job["jobAd"] + ): + return sections + + smartrecruiters_sections = smartrecruiters_job["jobAd"]["sections"] + for section_name in [ + "companyDescription", + "jobDescription", + "qualifications", + "additionalInformation", + ]: + section = smartrecruiters_sections.get(section_name) + if section is not None: + sections.append( + dict( + name="smartrecruiters_jobAd-sections-{}".format(section_name), + title=section.get("title"), + description=section.get("text"), + ) + ) + return sections + + +def get_tags(smartrecruiters_job: t.Dict) -> t.List[t.Dict]: + job = smartrecruiters_job + creator = job.get("creator", {}) + compensation = job.get("compensation", {}) + + t = lambda name, value: dict(name=name, value=value) + return [ + t("smartrecruiters_refNumber", job.get("refNumber")), + t("smartrecruiters_status", job.get("status")), + t("smartrecruiters_postingStatus", job.get("postingStatus")), + t("smartrecruiters_id", job.get("id")), + t( + "smartrecruiters_experienceLevel-id", + job.get("experienceLevel", {}).get("id"), + ), + t( + "smartrecruiters_typeOfEmployment-id", + job.get("typeOfEmployment", {}).get("id"), + ), + t("smartrecruiters_compensation-min", compensation.get("min")), + t("smartrecruiters_compensation-max", compensation.get("max")), + t("smartrecruiters_compensation-currency", compensation.get("currency")), + t("smartrecruiters_industry-id", job.get("industry", {}).get("id")), + t("smartrecruiters_creator-firstName", creator.get("firstName")), + t("smartrecruiters_creator-lastName", creator.get("lastName")), + t("smartrecruiters_function-id", job.get("function", {}).get("id")), + t("smartrecruiters_department-id", job.get("department", {}).get("id")), + t("smartrecruiters_location-manual", job.get("location", {}).get("manual")), + t("smartrecruiters_location-remote", job.get("location", {}).get("remote")), + t("smartrecruiters_eeoCategory-id", job.get("eeoCategory", {}).get("id")), + t("smartrecruiters_targetHiringDate", job.get("targetHiringDate")), + ] + + +def format_sr_job(smartrecruiters_job: t.Dict) -> t.Dict: + job = dict( + name=smartrecruiters_job.get("title", "Undefined"), + reference=smartrecruiters_job.get("id"), + created_at=smartrecruiters_job.get("createdon"), + updated_at=smartrecruiters_job.get("updatedon"), + location=get_job_location(smartrecruiters_job.get("location")), + url=None, + summary=None, + sections=get_sections(smartrecruiters_job), + tags=get_tags(smartrecruiters_job), + ) + return job + + +def get_profile_location(hrflow_location: t.Dict) -> t.Dict: + fields = hrflow_location["fields"] or {} + return dict( + lat=hrflow_location["lat"] or 0, + lng=hrflow_location["lng"] or 0, + city=fields.get("city") or "Undefined", + country=fields.get("country") or "Undefined", + region=fields.get("state") or "Undefined", + ) + + +def get_profile_occupation(hrflow_occupation: t.Dict) -> t.Dict: + return dict( + description=hrflow_occupation["description"], + # FIXME Maybe that current could be True for the most recent occupation + current=False, + startDate=(hrflow_occupation["date_start"] or "XXXX").split("T")[0], + endDate=(hrflow_occupation["date_end"] or "XXXX").split("T")[0], + location=hrflow_occupation["location"]["text"] or "Undefined", + ) + + +def get_profile_experiences(hrflow_experiences: t.List[t.Dict]) -> t.List[t.Dict]: + return [ + dict( + title=experience["title"] or "Undefined", + company=experience["company"] or "Undefined", + **get_profile_occupation(experience), + ) + for experience in hrflow_experiences + ] + + +def get_profile_educations(hrflow_educations: t.List[t.Dict]) -> t.List[t.Dict]: + return [ + dict( + institution=education["school"] or "Undefined", + degree=education["title"] or "Undefined", + major="Undefined", + **get_profile_occupation(education), + ) + for education in hrflow_educations + ] + + +def format_hrflow_profile(hrflow_profile: t.Dict) -> t.Dict: + hrflow_profile_info = hrflow_profile["info"] + + profile = dict( + firstName=hrflow_profile_info["first_name"], + lastName=hrflow_profile_info["last_name"], + email=hrflow_profile_info["email"], + phoneNumber=hrflow_profile_info["phone"], + location=get_profile_location(hrflow_profile_info["location"]), + experiences=get_profile_experiences(hrflow_profile["experiences"]), + educations=get_profile_educations(hrflow_profile["educations"]), + web=dict(hrflow_profile_info["urls"]), + tags=[], + consent=True, + attachments=hrflow_profile.get("attachments") or [], + ) + return profile + + +def format_hrflow_profile_for_update(hrflow_profile: t.Dict) -> t.Dict: + profile = format_hrflow_profile(hrflow_profile) + profile["id"] = hrflow_profile["reference"] + return profile + + +def format_candidate_location( + smartrecruiters_location: t.Union[t.Dict, None] +) -> t.Dict: + if smartrecruiters_location is None: + return dict(lat=None, lng=None, text="") + + lat = smartrecruiters_location.get("latitude") + lat = float(lat) if lat is not None else lat + + lng = smartrecruiters_location.get("longitude") + lng = float(lng) if lng is not None else lng + + concatenate = [] + for field in ["country", "region", "city"]: + if smartrecruiters_location.get(field): + concatenate.append(smartrecruiters_location.get(field)) + + return dict(lat=lat, lng=lng, text=" ".join(concatenate)) + + +def format_candidate_urls(smartrecruiters_web_object): + urls = [] + if not smartrecruiters_web_object: + return urls + for key, value in smartrecruiters_web_object.items(): + if value: + urls.append(dict(url=value, type=key)) + return urls + + +def format_candidate_experiences(smartrecruiters_experience): + experiences = [] + for experience in smartrecruiters_experience: + experiences.append( + { + "company": experience.get("company"), + "description": experience.get("description"), + "date_end": experience.get("endDate"), + "date_start": experience.get("startDate"), + "title": experience.get("title"), + "location": dict(lat=None, lng=None, text=experience.get("location")), + } + ) + return experiences + + +def format_candidate_educations(smartrecruiters_education): + educations = [] + for education in smartrecruiters_education: + educations.append( + { + "school": education.get("institution"), + "title": ",".join([education["major"], education["degree"]]), + "date_start": education.get("startDate"), + "date_end": education.get("endDate"), + "description": education.get("description"), + "location": dict(lat=None, lng=None, text=None), + } + ) + return educations + + +def format_sr_candidate(smartrecruiters_candidate): + first_name = smartrecruiters_candidate.get("firstName") + last_name = smartrecruiters_candidate.get("lastName") + hrflow_profile = dict() + hrflow_profile["reference"] = smartrecruiters_candidate.get("id") + hrflow_profile["info"] = dict() + hrflow_profile["info"]["first_name"] = first_name + hrflow_profile["info"]["last_name"] = last_name + hrflow_profile["info"]["full_name"] = " ".join( + filter(None, [first_name, last_name]) + ) + hrflow_profile["info"]["email"] = smartrecruiters_candidate.get("email") + hrflow_profile["info"]["phone"] = smartrecruiters_candidate.get("phoneNumber") + hrflow_profile["info"]["location"] = format_candidate_location( + smartrecruiters_candidate.get("location") + ) + hrflow_profile["info"]["urls"] = format_candidate_urls( + smartrecruiters_candidate.get("web") + ) + hrflow_profile["created_at"] = smartrecruiters_candidate.get("createdOn") + hrflow_profile["updated_at"] = smartrecruiters_candidate.get("updatedOn") + hrflow_profile["experiences"] = format_candidate_experiences( + smartrecruiters_candidate.get("experience") + ) + hrflow_profile["educations"] = format_candidate_educations( + smartrecruiters_candidate.get("education") + ) + hrflow_profile["skills"] = [] + hrflow_profile["tags"] = [] + return hrflow_profile + + +def format_archive_in_hrflow(smartrecruiters_object): + return dict( + reference=smartrecruiters_object.get("id"), + ) + + +def format_archive_in_smartrecruiters(hrflow_object): + return dict( + id=hrflow_object.get("reference"), + ) + + +DESCRIPTION = ( + "Move beyond applicant tracking systems (ATS) with an enterprise-grade recruiting" + " platform designed for the modern workforce. SmartRecruiters' Talent Acquisition" + " Suite provides everything needed to attract, select, and hire great talent." +) + +SmartRecruiters = Connector( + name="SmartRecruiters", + type=ConnectorType.ATS, + subtype="smartrecruiters", + description=DESCRIPTION, + url="https://www.smartrecruiters.com/", + warehouse=SmartRecruitersWarehouse, + flows=( + Flow(Mode.create, Entity.job, Direction.inbound, format=format_sr_job), + Flow(Mode.update, Entity.job, Direction.inbound, format=format_sr_job), + Flow( + Mode.archive, Entity.job, Direction.inbound, format=format_archive_in_hrflow + ), + Flow( + Mode.create, Entity.profile, Direction.inbound, format=format_sr_candidate + ), + Flow( + Mode.create, + Entity.profile, + Direction.outbound, + format=format_hrflow_profile, + ), + Flow( + Mode.update, Entity.profile, Direction.inbound, format=format_sr_candidate + ), + Flow( + Mode.update, + Entity.profile, + Direction.outbound, + format=format_hrflow_profile_for_update, + ), + Flow( + Mode.archive, + Entity.profile, + Direction.inbound, + format=format_archive_in_hrflow, + ), + Flow( + Mode.archive, + Entity.profile, + Direction.outbound, + format=format_archive_in_smartrecruiters, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.pyi b/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.pyi new file mode 100644 index 000000000..035a8b5db --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/connector.pyi @@ -0,0 +1,15 @@ +# This file is generated automatically +from hrflow_connectors.v2.core.connector import Connector, PublicActionInterface + +class SmartRecruitersProto(Connector): + create_jobs_in_hrflow: PublicActionInterface + update_jobs_in_hrflow: PublicActionInterface + archive_jobs_in_hrflow: PublicActionInterface + create_profiles_in_hrflow: PublicActionInterface + create_profiles_in_smartrecruiters: PublicActionInterface + update_profiles_in_hrflow: PublicActionInterface + update_profiles_in_smartrecruiters: PublicActionInterface + archive_profiles_in_hrflow: PublicActionInterface + archive_profiles_in_smartrecruiters: PublicActionInterface + +SmartRecruiters: SmartRecruitersProto \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_jobs_in_hrflow.md new file mode 100644 index 000000000..49e4e7db6 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_jobs_in_hrflow.md @@ -0,0 +1,85 @@ +# Archive jobs in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **archived** 'job(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | Case insensitive full-text query against job title e.g. java developer | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the job update time | +| `posting_status` | `Literal['INTERNAL','NOT_PUBLISHED','PRIVATE','PUBLIC']\|null` | None | Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE'] | +| `job_status` | `Literal['CANCELLED','CREATED','FILLED','INTERVIEW','OFFER','ON_HOLD','SOURCING']\|null` | None | Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD'] | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.archive_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + updated_after=..., + posting_status=..., + job_status=..., + limit=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_hrflow.md new file mode 100644 index 000000000..e101e1b3d --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_hrflow.md @@ -0,0 +1,89 @@ +# Archive profiles in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **archived** 'profile(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | keyword search, for more infromation see SmartRecruiters HelpCenter | +| `job_ids` | `array\|null` | None | List of job ids to filter candidates by | +| `tags` | `array\|null` | None | List of tags to filter candidates by | +| `onboarding_status` | `Literal['ONBOARDING_FAILED','ONBOARDING_SUCCESSFUL','READY_TO_ONBOARD']\|null` | None | Onboarding status of a candidate | +| `status` | `array\|null` | None | candidate’s status filter in a context of a job | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100 | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the candidate update time | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.archive_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + job_ids=..., + tags=..., + onboarding_status=..., + status=..., + limit=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_smartrecruiters.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_smartrecruiters.md new file mode 100644 index 000000000..4430da61b --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/archive_profiles_in_smartrecruiters.md @@ -0,0 +1,77 @@ +# Archive profiles in smartrecruiters +`HrFlow` :arrow_right: `SmartRecruiters` + +Send **archived** 'profile(s)' _from_ HrFlow _to_ SmartRecruiters + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| 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 SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.archive_profiles_in_smartrecruiters( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + 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/smartrecruiters/docs/create_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_jobs_in_hrflow.md new file mode 100644 index 000000000..45e6fd417 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_jobs_in_hrflow.md @@ -0,0 +1,87 @@ +# Create jobs in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **created** 'job(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | Case insensitive full-text query against job title e.g. java developer | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the job update time | +| `posting_status` | `Literal['INTERNAL','NOT_PUBLISHED','PRIVATE','PUBLIC']\|null` | None | Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE'] | +| `job_status` | `Literal['CANCELLED','CREATED','FILLED','INTERVIEW','OFFER','ON_HOLD','SOURCING']\|null` | None | Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD'] | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | +| `enrich_with_parsing` | `boolean` | False | When enabled jobs are enriched with HrFlow.ai parsing | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.create_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + updated_after=..., + posting_status=..., + job_status=..., + limit=..., + ), + 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/smartrecruiters/docs/create_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_hrflow.md new file mode 100644 index 000000000..5956bc2e0 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_hrflow.md @@ -0,0 +1,89 @@ +# Create profiles in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **created** 'profile(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | keyword search, for more infromation see SmartRecruiters HelpCenter | +| `job_ids` | `array\|null` | None | List of job ids to filter candidates by | +| `tags` | `array\|null` | None | List of tags to filter candidates by | +| `onboarding_status` | `Literal['ONBOARDING_FAILED','ONBOARDING_SUCCESSFUL','READY_TO_ONBOARD']\|null` | None | Onboarding status of a candidate | +| `status` | `array\|null` | None | candidate’s status filter in a context of a job | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100 | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the candidate update time | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.create_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + job_ids=..., + tags=..., + onboarding_status=..., + status=..., + limit=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_smartrecruiters.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_smartrecruiters.md new file mode 100644 index 000000000..5b173abdd --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/create_profiles_in_smartrecruiters.md @@ -0,0 +1,77 @@ +# Create profiles in smartrecruiters +`HrFlow` :arrow_right: `SmartRecruiters` + +Send **created** 'profile(s)' _from_ HrFlow _to_ SmartRecruiters + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| 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 SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.create_profiles_in_smartrecruiters( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + 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/smartrecruiters/docs/update_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_jobs_in_hrflow.md new file mode 100644 index 000000000..df76f3a91 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_jobs_in_hrflow.md @@ -0,0 +1,85 @@ +# Update jobs in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **updated** 'job(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | Case insensitive full-text query against job title e.g. java developer | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the job update time | +| `posting_status` | `Literal['INTERNAL','NOT_PUBLISHED','PRIVATE','PUBLIC']\|null` | None | Posting status of a job. One of ['PUBLIC', 'INTERNAL', 'NOT_PUBLISHED', 'PRIVATE'] | +| `job_status` | `Literal['CANCELLED','CREATED','FILLED','INTERVIEW','OFFER','ON_HOLD','SOURCING']\|null` | None | Status of a job. One of ['CREATED', 'SOURCING', 'FILLED', 'INTERVIEW', 'OFFER', 'CANCELLED', 'ON_HOLD'] | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `board_key` :red_circle: | `string` | None | HrFlow.ai board key | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.update_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + updated_after=..., + posting_status=..., + job_status=..., + limit=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_hrflow.md new file mode 100644 index 000000000..85c46881e --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_hrflow.md @@ -0,0 +1,91 @@ +# Update profiles in hrflow +`SmartRecruiters` :arrow_right: `HrFlow` + +Send **updated** 'profile(s)' _from_ SmartRecruiters _to_ HrFlow + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `query` | `string\|null` | None | keyword search, for more infromation see SmartRecruiters HelpCenter | +| `job_ids` | `array\|null` | None | List of job ids to filter candidates by | +| `tags` | `array\|null` | None | List of tags to filter candidates by | +| `onboarding_status` | `Literal['ONBOARDING_FAILED','ONBOARDING_SUCCESSFUL','READY_TO_ONBOARD']\|null` | None | Onboarding status of a candidate | +| `status` | `array\|null` | None | candidate’s status filter in a context of a job | +| `limit` | `integer` | 100 | Number of items to pull from SmartRecruiters at a time. Not matter what value is supplied it is capped at 100 | +| `updated_after` | `string\|null` | None | ISO8601-formatted time boundaries for the candidate update time | + +## Push Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | +| `only_edit_fields` | `array\|null` | None | List of attributes to use for the edit operation e.g. ['tags', 'metadatas'] | + +## Other Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `workflow_id` :red_circle: | `string` | None | A stable identifier used for persisting in incremental mode | +| `logics` :red_circle: | `array\|null` | None | A list of functions called in sequence with each item pulled from the origin. Each function might either return it's argument or None to discard the item. Any item discarded is eventually not pushed to the target | +| `format` | `Callable\|null` | None | A formatting function to apply on items pulled before the push | +| `callback` | `Callable\|null` | None | Registers a callback function to be called at the of a successful execution | +| `persist` | `boolean` | True | When False has the effect of running in dry mode. Items are pulled but not pushed to the target | +| `incremental` | `boolean` | False | Controls the incremental reading execution mode | + +:red_circle: : *required* + +## Example + +```python +import logging +from hrflow_connectors.v2 import SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.update_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + query=..., + job_ids=..., + tags=..., + onboarding_status=..., + status=..., + limit=..., + updated_after=..., + ), + push_parameters=dict( + source_key=..., + only_edit_fields=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_smartrecruiters.md b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_smartrecruiters.md new file mode 100644 index 000000000..0191ed5a8 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/docs/update_profiles_in_smartrecruiters.md @@ -0,0 +1,77 @@ +# Update profiles in smartrecruiters +`HrFlow` :arrow_right: `SmartRecruiters` + +Send **updated** 'profile(s)' _from_ HrFlow _to_ SmartRecruiters + + + +## SmartRecruiters Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `x_smart_token` :red_circle: | `string` | None | X-SmartToken used to access SmartRecruiters API | + +## HrFlow 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 (SmartRecruiters) + +| 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 SmartRecruiters + + +logging.basicConfig(level=logging.INFO) + + +SmartRecruiters.update_profiles_in_smartrecruiters( + workflow_id=..., + logics=..., + connector_auth=dict( + x_smart_token=..., + ), + 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/smartrecruiters/logo.png b/src/hrflow_connectors/v2/connectors/smartrecruiters/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..dae357323cd37e74527030d071704af53d6a5998 GIT binary patch literal 11858 zcmY+q1ymiuvIUA0+}+*XJ-E9aTo3N<8rKU|x zzzv|Nz;EVg&un7uXbNQZvUmFD1t#dl|Ebyo-AqWm?Cl&}`Mre5|AXNF)c=`T$VvYL zakCX72PmqLiaWXhNx7L>nOVt&;YmqJ1zpT7_|+t&{_FnP5+b*9b93TnVe$0zWcK7> zc6701VdLZDV_{`yVP|LhL@>E}JGhy6F*&$W{13_h%Oe4FHFL3ca2(-}h z-uh?=@G%1Tz|xT`qDsV#pvLtG-O8|~4P{tGN3le)+4zkBAQo}`rHW}IvFyG;Fpw79 zA&dakf@2sCx!y#M`po2=OqI$C#~65`p0f?O5%MQZPWf!H84@^!o5 zGPWro0$hCkBZJfoIZ3gwN^C7qzsk0qgl`3#CSBPgH0xp9V%AT=HI2-epkeDL5Tu+3aec#z;a@YjLH zU{t|A{pwme@zIs=8k(Ag(Obt0U;!AIxRHqks8Fyl3vd|03t(xaNX=hsZZ8%e3lza7 zIUBzg7E4j2YkI{;@3wIvrL>kUzkl41ig5;X;y;X zmU2}IKod%%K=-$7t{nYD{mYnP^~yDs@cIK@9{(RWmHKF=$pEZ%9HJ16L`=-!KmDk4 z%W36N6B@ao0);aIyjbnv=Oc+KUfY8xIZUn89b-wd8-{oYEGWACveEn)NB8V+vi>8c zR*%8QpbU#%P4kH|Lz}qj#s#oRHCnEAe2pFB-zL?Yc~O!CTf-?`hLF)K%O-C#BHb9| zp<-|_;AImz47rwNxWDU=yxFhkKlTd3AzV<=@XW!a`C>6yf>g~hth(e{(X3$6Pz8uR z?{i}^A*X(zhA=Xdk4V^?vl+HfW3SK$mF79pMy1T#O|C|@E%^sYb9cuwjc$UA`I;F^ zC`&+x6-H{5X51vxCY1``LzY=9Gkpz(s~_uE`9_8-&2ZCDd@OIujpE906jl{(6gv({ zT_A4PC|km%%Gw8$Mzo`&1N2>F?ruF~T5otzEimWklu-JrD??aXL_hd_Vyrgy$y`=< zj&<(14$3s_Pmpm4eElGqU>*ASz^ePR5+0diS_DryD4{P_VcDzn{hVtK+wNcTjzbtXX4rqlyR;e*JQ|CizZhQZhxWFf86 zm2f#IekBwfvA7kZq`Egl#R%S!I!sHoOv(GAUS1H3JBW;ihZ?OZ*~P2B9xP2G6wN?w z7`^<*YLK6Z9^gMY*VEJew81Ye@5WX3`@Qo zq7~tulOaXjB03c7xCz~l8GvSc3Vf3qBmW0mj)-44T~S}XR6cB4%~*9eMf=hH%k|LV z3mdlyGJN?Pb2TGZflF+MEDlEeowpYr7|i8 zHjsM6Ux#X^slTycwK)*sdyf|fG8Xahad|DTzF`n*WACC&>1jwI*diG(Oul7b6v4|@ zyomlQ0;SaOVDuMv|E1(de{=x02En6$s3?nm%yy#-VvJ1b@3M>Fi4gH^IfSU;=p2+k zJ%&rWb+?z2rsmyKYRvg5K1}7U#H+z*AKlshFgp1rxQj?B{g{RaHP& zR0Ss@^7fG-<-wFK!64r)FEDnU6Za;N@??F2-re%eImAa859z(-E zQ>{ZxXI}T_ASoImR=FGOvF;6vIPe4SHo6~JL#f|qU16IKmPS8x$Ispwu^9lta`7ZE zGJ+_EeKgaJM9-C%xnBD&)MIVa>-tQP*Hzp+jNK&Bfqt|-O0xM)(l*_P`3LpLImSTO z0&U+w)V{n?SHH&cj$BBzW_k3TTcU9_DQbkvCG$6NKkL3%cRrY?k2*>ma(gJ6}P^+Wni(ING8yQ879n4jLo;LEM!?qO$Ad6=ZXTTlkg$e z2bqqT9aks>GvmV15fE)UZA>P*s*ds(O>!;poK(y14FZ9~=ttL!(f+r;E0IW1UmYYH zq+uxNvzPydqgPt|YFy2OwE>YqV?02h;B78lLN#8CPA9P0N@1 z>i&0V?de!=A1G0-xq1ZfU%8?U*87->kexrfOTCN-ww&Jhv^DDDRfS{0iME_A>q%Q6 z?&1f#uGiY$Lo7W6V^sAkT$>xGWBE5Szwg2ySUvEvH#|K<%TQ6Z=KR>O&ZQIn zO#8mX2Ks@0f@Z45FKoXgd&Xp(eIr*?Wd;oc)#B^@d3CzenfDe?!R&s`uLy=PXYFSQ z(9C2~^q1})wXVIS$-o3X*taiLx5AY2@tnm{o~4$1bj7qYOpIu@$Seb0B_Q}R6=T;? z0TIJ8Kr3v`N(XW=HsWAphR#?Gy|b+~G;Q4Qe2{5if}&1jcA0_MZ2kP~tLkI|Seda- zcCF$bplIaCXYks$apx4$3aCkigcZvB%runn;m(77t{+>NB$PPi($%z+S|=0lfuh>5 z&c%)=@94E!{n}6zF|k{-?H&#EVb4C$WS)aiQyGSFj0Aferu@1? zcAXuzO2i@qBV1<0){y0vQwvY%1=Jx5%bS;G0g>2GJAg(58`TT04OgC(Wkj8 zF!*UaBqF??Eu0`0xtN!@G25YfiN_7D&sW-Z8YOYe+y?9jotwH#9n|}|z#?(Ok2s9> zTpGuj*v0PX>ls&!djE2?Zd-i&=3Zv1rYrdfegE5wxlA{u54#Pi8zHn4m@#&7nwLel zk}A?z7U=lq(%l&Vm&f;q49CV!MH{Ei6$?~hL6 zzfK|2%X0@n!6}K?D~#t%<5K7s52bsJ;~6+v*TwwIrhbEibAKi_X|CsbwnnWEt9}b| zQPeyO-{aRawj|#V*k*T}3;97&+UeFWq>qmXV%&4YX(WYJyiuz;O2~DpCU)EDsQ zcw<O!))quSFm30yq~=V#}XaUa5n&;45h|qfFB|P;(i^Hse89Dh4hhmy@s1#JM*p z>oQ$#9jui#WV!9^@~3qtBCsNQ*WzwS+4e!29FD*K>bV;a#bC^M1>VxY0E)`#!@AD8 zYW;kW0E{UoZ+ggfqk0jBgNb9#`i)fiqL)az>KV#^q0#W9QXEV@O9g-L&;Nml$IJ@! zc~NCtz9XeBHMCleJbaE%k?e?9ht`tZ!{<~b5;xK*-W{PhmH<2K^A}1k!eDb;m#nSR zG^$c%8jF}6P9o>rK731=t_kQF$C;?29!?p6-MPOY*?xYV>|q|t-;B%F&*>D=DAkE> z@R6pL&rM+U@x30BXxgu$&}fd2yNLL9>?Qpj5l(WQvaovT^mThpgo3td�Ma1hL^?#@yBe+%#I$TTn2UA$^=1jat|C!7ThDBkytHd=m5*sc_I&6cwe*MUtg*3rL~iccn@rCBIwWX(q2 zV@XXR8p_b^liX2K@#dPZG&7W!3*p%*DQ{XIr}l!0`r;BX+>|LPLxbEC5j`ryZya&*uk?P$!R*!oYMTi?~h_zKSJEN+=}A79?v*d9+G7Vl#==5wji;0hV$96)%o`W`OsigJV-6Vug;lf(e%8LBMXFw z+9ZSxr+H$kI&8TommKP>c{X+xg!{t!JzixP04*phT{?pI)T0HYqQ6jDhN{Bc=8n=f zGDRk#dCUd)tBu*Km4hKxU(*Ag2A3n8j~Yo#{31HW_Fi)vjA($Wp*)=VK5Ggk5r{(^ z`8^7((5m7jCi8Gg;|VKHLo`h9lU477YYkG!)ufuY5-LaRE?Q3T9>i;AZhABaO3Ec( z>`Doclia^&LiPZv_0W)^wCyPp`AJ1NKh273IU7^B4t8b`Ti6*L$O&&J~pPdHh^61K<}FI9rW~3a(w4^*i2r z0K9sgci3HwVJBMQi~;Y#c0gPg6GJJkTTyyif-Cn9K)6hy2m_I!+(GZ9s8Lb{F0!$; z`z%C{wc!eob@NJq@Zb_6=oo{iiiC7EU_cv!)NkHbJ5q`81tR~|4XH@`kkpNvpT4Jx zUS+!N)T)qdL)5=gbz~7M{cl00NVHxqITI~@7d$dqK0**Q;~Mp^*xt=4ArwZ-o7Feb zXY$FA(_fk##1qNv!SgWQ+4bHZJTh0ylQTu`Lv)Lz6I9Tbe0UhFwO3Z_dF~v&1Um{5q#fP66&sR7g^Pa-56Nt6B+KCv0{F)-Z%Kj}ZK}yQ1 z$h8CK&Fwlbgy`*bwJ`t2%{o=>O_VQ@ff7V4L54L?ef-_l(P`cNtZp4Q8i!31t4N{h`G8S~X$pL+*gDee_F-@zbE zQcq;)MW@6Z)PX@hQiO7mKjd;lmjE|k3#Pu#gf~C)(@pmP9F#VbGa~PHpNyWP)_8Y)Zo@4ubMf-2ewv}EO|C27X-(8>2$h5Zp7 z@;OKx4IWV#yKdB9J?0&G#WA8=_#Dmre@IcZ)2J<`H0d(LiBYNl}%7!@vp>`@Onqd|V68)NK9!bXoiB zcm^BJ*5f|%P;j%OIom!5{bgeSFE(uE51K|RE_!%#9inswzQeouFGz?Gk#XYrGBng4 z6`a5|;j8MHKUcOSqmwwj@u9(~Ps#AR5)-CK%7wvre1o*$m13w9E^KiS^A+~EtwS$+4aPi)_D$CFTQ;oh4(V;9KQWZNp(u${;sj@GL$~g5 zY2i-6WAi=uc)C;5O{z7JDPkr>=7$widAHy1Wd|z<-wGIocKDa6@bSa<%=zFdcGD(> zT;O)LKDrqgP5XYnUFwQ`)o@9lN#h|SZWW2Q>y8N^c+{O zMB#@5?;iP`zYBN3 z&90D_|2_J-VB@HYL4@F8x$sGZzK(@~cguD(Lc$OG6vutSeIE)UuUOM0^UM>%OXb|W z^*OiW@cpLRSDwS(qu_({n44%GUas8K4rmiy&!r4~pC^L`88oevOwQoyRQ}Z}OJfO| z*g}qW#H`#``!f;enX0ClvkJ$(BbE>37>=#MfKDWB*anKpaIl{q%_c&ydutmG5*FiR z>LhuzMMDyUtbi3E_0DX{?u9}jWX9ByhvWcj{}mr(@YVDn%_dc7jt2R^ltKziOE)ZR zfRRxd}`mEzTXj!#<%`H ziT(A)Mb2H$PFjudJgZm86Y3dsP@=4+5JI4pHa%(;X#$bQP#HvqGIoP^z!{JZXhuXmkE{k(F=rU(xoKH4cCN(a%amYyn8_dT3KBR*cjZA7t@I(p*AksyVy0= zqt%g0pMY<4t<+qhXGw#;s|TWAZE0;)@G#q`)42SW#?(M|fS+Gtcep)ckOQNvr}E-P zH}#G)I{6^mK}#~a%3jP)N30$YAPZBMrJ2Zt{c`;uf22lBX##s781-wVQvh|dqB?HXdjLnd3uK=C0#z9o%dgA}u@ z!a(LjmY&+xlT66NS|jf(-Mkbkj!K@`OSYesjCj)?F3Lwkx2G^^U&GkciRR@JE`-pZ za$S}ma;MuyhbJ!`72^Wf$Ze?U`ENA7pdOS;aL zU-^E1vYPknkk&+JX1KuhPHai9-Qk*Tsu{r$JS%9>gizBH#Gq_fI?S_TCSBag-`zk} zCt7Fec4SkVn7jqh#)z`xjKS*N|7}ESr}eQ1p7CHc#LE22xhjK#FdULTdxiFw9F8kaxrHA z?1Z808jr(Q(=Xc)x>+?;RSTMZd2mwG(lL!hUm0vDGpX01EcA4jNRc~dm>jlrTmSfT zN8|LnKZ=?UL1U>om1Hucjd)X(J$<_*?N?#?Y5i&@`InXTUyQNyHV^f9)H-HDr&-`E z2ENK0+iIk1F~D0l^}e<1p?IF-lxFGs0p)aU0(UwcretpAF`c-&M@KFJu|H|Wi?$>C zpo-r+Vv+7V4ntdMB5|W_AEC!3By^Xek%_;L@iA>RaFH{|(SoJ)sW@F%WMed@gPG|c zvY)0dy!ae4Uwm@}%;kEX85pj{3NOzD(ka4TIOMXo2mvQ+@E#!EG=Ig*7Xa%mv{k2! z^-8eZuU+3~$GR&869jXt@0nfP#zP@wIs3U`cK9WH;qMPMBl%QjcC?=pdmn?KK9_7X zyt|c=Y9{U%1((eJc9Sa$yX8K-EyAtf7HHr4vhyzy7f?xX5_D}UQHY8oUYFV%BE2*) z?&lF?2C$^XwjvRKxwe{|`9=5-%qM$zZw-F_?Q>;g-w|xeD(9Z?nTWW5Ep+5U2Qk+g z*;#f6yrsw#k@%=GIC`g7WcFY~rrAmn18#5~KKA=gR05Ha1s;Pv{5Laf!PO~#wRk)3 zy-f-aXgq7Q>BY}uC76><=H11A7i)Iuij2@gnY>7(^1E@Q8pTI5*|Dgk)u>9y`7xo< z((tv%RFrDvR1d*%pmKfVu07qD*4>phjn`#!V1hW_BN2{CKyIJkyHBgH*zZ% zbhTa}T%i*_^12}y)xk!$a8o;c*JB`nInEdzncmU7cU4xT(Tw{NL|xaIRxg+nj35ZbeI7 z#-b@=AR~~SF|N1N>$q-mC#(;aS0_&6e3{@Gv8J{9SKg)u#4SY}xLp*A0vS3eZ0OsY zB^{7GIf&2}a9A#NLb8pzF}mU}YhdE(dwXY+Z|1j)hAJ_*NJm&+jr$TddQVGjfICtF6^;ybetL z8MqwACEnQLJ>+pUV9GvO7?vDnnzkVP#M6TlSqpYGe{7_5fy&4@+{{;EC-Jr5!^%w&Pni z4^n~uVnw(|_yru6-Ay=W=O!oZZr#jahhGWMVGa3mXxIH}w^g%mkDvh;Yh@1i%W2gi z)OZq%M#toJXe`O@`_;Oc2X7NmGoN$UnO;748oc=rpa$xcLYc^vs5!+Csf_fCv|=&> zZMT*de6b1fIBabkJ5#YPXPw8Zz1LW4+zDA-ri)o6H0E|Iee&OJK>FgEWA3Z95R_KG z5ZKmk8O2v@#OO>1{0>H*)mR;fVGPt`jpWmhS7m zdcT_ea^Z)xQCgA^x;nfvF=pd)a;XmM}81(>ELZsZe`^=v>MwHx;8fchL!iht4fm6XKb7v4A4 zkyFx2hCn@A>oH!^?--j;n_JTYEfG_y^w}n#d9WYC*FN?>f8j99i#1W@P!)65zYYEc z)M@>r6|^WvjI;(#tV(%ttSN>%$*}EA4DrR94kZpdG>H(^R6ju430@Lx!LJBZx$0E$ zZHs>M&;u-6I#qLy>zXrvQBQnobBd2Z^*y;{gx*I3lgBWwKL9wOHFLnk`}Y;`jQcix{$Z# zEyLp*6KXcqO$i`dzHg+GVQc8vaL}JvqY~VmJs+t^E6v4#?^^BEd4S?6@!4 z{A5J)l?DZtsWH&Ea~2f8TyfsbeH0i(g(GwXhDBFe75{VYua(WKFcKq{+&21(c4B&( z?ek_x>fh|2;k#+jnGrR|(go}UWKK{|p9@QZ+!xkAi~4+=^*x((l{K@Ko5YsH^fFDS z8s2dGw&kGG(p_muEU?R-<$+ykWxclJj&N!W`+;G9-)j3Ix8CBeYk)KtXD^G|d4G}W zHB7MeT?U+gBVh0*`4ab_x%#$hVN#CE0;cx#Ej4AnXz70lc0NxN8jDx09_bX?ib6n) zQvz;X0^j<-_08zIz+r{EU{@Vl5s4y^BP8_X00N%7jb5nA=h5Gx8Rc;C_ZjrLPP#Hc z5B7crE<<-tu5(j?oTN!LZ&}?_&Qs+g_@P2rvM%5Ip!*=w=(Rl*O{2#3JMY)5+nlPJ zH7#VAMK?bxKQ!8{h*cR`$t+kMGW^2m5-?jY`uSV(1Rv5(qGJ8kMs(WE#vJRpKjb;& zK;f%Kq5M*Q#!#(COrv|2TZhKMYD}nh@3^n*OZd>0G?U++I-~T(Mmhu)5hLh{@DGV9@8h5v*k*3DKXRxj{H^6h$yw!n_*v^m)e_ zc_g?P>m`9duf4wvtl3WXWw5<3+*|y>^AT#rtYxE+2rSaYhnx6oQAFm6k>L>~myqoATj+fvN8*3yuk_FGO5)j({N zl+a4x=g7;-LguZ2*mCT&Mz>yzz~Y+&@JYQjw`RDW`Qk>@UYL9M-?WREM8x@#fb z)%|@R`{fL#LRQzzimTtnK4;TfsKWc)3cL6@3j|CpT5Bge{#hbBA|89QnN^-TF;^J` zB#_qgQ-~yq2wk^TiIMfEllg_JG`F`qYmYk$d}BjHK62o`>IE$w?w4vpFr;o=I zQUGD&GV53x#9@cYml+z9k`^Oo7sja^ep$;Hy|ikA%coY+p{Z8Hf`l>6Ju<2O^il$4 zRhH-pucK?DkW0(^e%f=xbl0E&luUX!-r`TyFn^@)GseNhoJ^qa^dzCDpW87QO_-Q% zt3P(tAOl*M-y(^lZE<|pdXm;6b@ zJQ&h+{Q|9ZO^LSS9MGOhTnC_wZTR9snOG07Dk|6gie^2Q;b{3`V9$3`qicGJS@3F> zWh9NJgXm)1CD)Qn5<4afb}sPM)1ZS&+FU*>`fCjb^Xin#NE@x-$M-bVEi``nvs_+C z%TfV_M7`qeT6}x=ezn4CB`byeop!Th$7{(;cFH-&GJ)Jyy4(?{4zrZ(Q3G$1z22zX zB&le6n}fQ^uHPCDS_q7zH}$0J?0eLRih0pfw{4jO=Q4V8e26*_n1`s2d5ca zyg2;DOz}87G=4<7X9T{wo1!}VstIEPh&fxpGUybtiR?Q(;RGj7QUW z_&BHTDI#YZMFGZ|9x@VI)o@wo@~m&c=5g)$bRV4l7&gncQ@YVd-V z?&{=$9c)@ULw6135^{Cx?5rWPr9geR{*FCW$EQzf+Jg(> '', ' ', .location?.region >> '', ' ', .location?.city >> '', ' ', .location?.address >> '') | $strip" + }, + "sections": [ + "?.jobAd?.sections?.companyDescription != null ?? .jobAd.sections.companyDescription | {name: 'smartrecruiters_jobAd-sections-companyDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.jobDescription != null ?? .jobAd.sections.jobDescription | {name: 'smartrecruiters_jobAd-sections-jobDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.qualifications != null ?? .jobAd.sections.qualifications | {name: 'smartrecruiters_jobAd-sections-qualifications', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.additionalInformation != null ?? .jobAd.sections.additionalInformation | {name: 'smartrecruiters_jobAd-sections-additionalInformation', title: ?.title, description: ?.text}" + ], + "tags": [ + { "name": "smartrecruiters_refNumber", "value": "?.refNumber" }, + { "name": "smartrecruiters_status", "value": "?.status" }, + { "name": "smartrecruiters_postingStatus", "value": "?.postingStatus" }, + { "name": "smartrecruiters_id", "value": "?.id" }, + { + "name": "smartrecruiters_experienceLevel-id", + "value": "?.experienceLevel?.id" + }, + { + "name": "smartrecruiters_typeOfEmployment-id", + "value": "?.typeOfEmployment?.id" + }, + { + "name": "smartrecruiters_compensation-min", + "value": "?.compensation?.min" + }, + { + "name": "smartrecruiters_compensation-max", + "value": "?.compensation?.max" + }, + { + "name": "smartrecruiters_compensation-currency", + "value": "?.compensation?.currency" + }, + { "name": "smartrecruiters_industry-id", "value": "?.industry?.id" }, + { "name": "smartrecruiters_creator-firstName", "value": "?.firstName" }, + { "name": "smartrecruiters_creator-lastName", "value": "?.lastName" }, + { "name": "smartrecruiters_function-id", "value": "?.function?.id" }, + { "name": "smartrecruiters_department-id", "value": "?.department?.id" }, + { + "name": "smartrecruiters_location-manual", + "value": "?.location?.manual" + }, + { + "name": "smartrecruiters_location-remote", + "value": "?.location?.remote" + }, + { "name": "smartrecruiters_eeoCategory-id", "value": "?.eeoCategory?.id" }, + { + "name": "smartrecruiters_targetHiringDate", + "value": "?.targetHiringDate" + } + ] +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_hrflow.json new file mode 100644 index 000000000..9e12e9040 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_hrflow.json @@ -0,0 +1,18 @@ +{ + "reference": "?.id", + "info": { + "first_name": "?.firstName", + "last_name": "?.lastName", + "full_name": "$concat(.firstName || '' , ' ', .lastName || '')", + "email": "?.email", + "phone": "?.phoneNumber", + "location": "?.location ?? .location | {lat: ?.lat ?? .lat | $float: null, lng: ?.lng ?? .lng | $float: null, text: $concat(.country ?? '', ' ', .region ?? '', ' ', .city ?? '', ' ', .address ?? '') | $strip}: {lat: null, lng: null, text: ''}", + "urls": "?.web ?? .web | $items | $map({type: .[0], url: .[1]}): []" + }, + "created_at": "?.createdOn", + "updated_at": "?.updatedOn", + "experiences": "?.experience | $map({company: ?.company, description: ?.description, date_end: ?.endDate, date_start: ?.startDate, title: ?.title, location: {lat: null, lng: null, text: ?.location}})", + "educations": "?.education | $map({school: ?.institution, title: $concat(?.major || '', ',', ?.degree || ''), date_start: ?.startDate, date_end: ?.endDate, description: ?.description, location: {lat: null, lng: null, text: .location}})", + "skills": [], + "tags": [] +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_smartrecruiters.json b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_smartrecruiters.json new file mode 100644 index 000000000..52c0a3d2c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/create_profiles_in_smartrecruiters.json @@ -0,0 +1,13 @@ +{ + "firstName": ".info.first_name", + "lastName": ".info.last_name", + "email": ".info.email", + "phoneNumber": ".info.phone", + "location": ".info.location | {lat: .lat >> 0, lng: .lng >> 0, city: .fields >> {} | ?.city >> Undefined, country: .fields >> {} | ?.country >> Undefined, region: .fields >> {} | ?.region >> Undefined }", + "experiences": ".experiences | $map({title: .title >> Undefined, company: .company >> Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "educations": ".educations | $map({institution: .school >> Undefined, degree: .title >> Undefined, major: Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "web": "{'type': 'url'}", + "tags": "[]", + "consent": true, + "attachments": "?.attachments >> []" +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_jobs_in_hrflow.json new file mode 100644 index 000000000..5f3e2afc2 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_jobs_in_hrflow.json @@ -0,0 +1,63 @@ +{ + "name": ".title || 'Undefined'", + "reference": "?.id", + "created_at": "?.createdon", + "updated_at": "?.updatedon", + "url": null, + "summary": null, + "location": { + "lat": ".location.latitude != null ?? .location.latitude | $float : null", + "lng": ".location.longitude != null ?? .location.longitude | $float : null", + "text": ".location ?? '' : $concat(.location?.country >> '', ' ', .location?.region >> '', ' ', .location?.city >> '', ' ', .location?.address >> '') | $strip" + }, + "sections": [ + "?.jobAd?.sections?.companyDescription != null ?? .jobAd.sections.companyDescription | {name: 'smartrecruiters_jobAd-sections-companyDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.jobDescription != null ?? .jobAd.sections.jobDescription | {name: 'smartrecruiters_jobAd-sections-jobDescription', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.qualifications != null ?? .jobAd.sections.qualifications | {name: 'smartrecruiters_jobAd-sections-qualifications', title: ?.title, description: ?.text}", + "?.jobAd?.sections?.additionalInformation != null ?? .jobAd.sections.additionalInformation | {name: 'smartrecruiters_jobAd-sections-additionalInformation', title: ?.title, description: ?.text}" + ], + "tags": [ + { "name": "smartrecruiters_refNumber", "value": "?.refNumber" }, + { "name": "smartrecruiters_status", "value": "?.status" }, + { "name": "smartrecruiters_postingStatus", "value": "?.postingStatus" }, + { "name": "smartrecruiters_id", "value": "?.id" }, + { + "name": "smartrecruiters_experienceLevel-id", + "value": "?.experienceLevel?.id" + }, + { + "name": "smartrecruiters_typeOfEmployment-id", + "value": "?.typeOfEmployment?.id" + }, + { + "name": "smartrecruiters_compensation-min", + "value": "?.compensation?.min" + }, + { + "name": "smartrecruiters_compensation-max", + "value": "?.compensation?.max" + }, + { + "name": "smartrecruiters_compensation-currency", + "value": "?.compensation?.currency" + }, + { "name": "smartrecruiters_industry-id", "value": "?.industry?.id" }, + { "name": "smartrecruiters_creator-firstName", "value": "?.firstName" }, + { "name": "smartrecruiters_creator-lastName", "value": "?.lastName" }, + { "name": "smartrecruiters_function-id", "value": "?.function?.id" }, + { "name": "smartrecruiters_department-id", "value": "?.department?.id" }, + { + "name": "smartrecruiters_location-manual", + "value": "?.location?.manual" + }, + { + "name": "smartrecruiters_location-remote", + "value": "?.location?.remote" + }, + { "name": "smartrecruiters_eeoCategory-id", "value": "?.eeoCategory?.id" }, + { + "name": "smartrecruiters_targetHiringDate", + "value": "?.targetHiringDate" + } + ] +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_hrflow.json new file mode 100644 index 000000000..ca5114cab --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_hrflow.json @@ -0,0 +1,18 @@ +{ + "reference": "?.id", + "info": { + "first_name": "?.firstName", + "last_name": "?.lastName", + "full_name": "$concat(.firstName || '' , ' ', .lastName || '')", + "email": "?.email", + "phone": "?.phoneNumber", + "location": "?.location ?? .location | {lat: ?.lat ?? .lat | $float: null, lng: ?.lng ?? .lng | $float: null, text: $concat(.country ?? '', ' ', .region ?? '', ' ', .city ?? '', ' ', .address ?? '') | $strip}: {lat: null, lng: null, text: ''}", + "urls": "?.web ?? .web | $items | $map({type: .[0], url: .[1]}): []" + }, + "created_at": "?.createdOn", + "updated_at": "?.updatedOn", + "experiences": "?.experience | $map({company: ?.company, description: ?.description, date_end: ?.endDate, date_start: ?.startDate, title: ?.title, location: {lat: null, lng: null, text: ?.location}})", + "educations": "?.education | $map({school: .institution, title: $concat(.major, ',', .degree), date_start: .startDate, date_end: .endDate, description: .description, location: {lat: null, lng: null, text: .location}})", + "skills": [], + "tags": [] +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_smartrecruiters.json b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_smartrecruiters.json new file mode 100644 index 000000000..52c0a3d2c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/mappings/format/update_profiles_in_smartrecruiters.json @@ -0,0 +1,13 @@ +{ + "firstName": ".info.first_name", + "lastName": ".info.last_name", + "email": ".info.email", + "phoneNumber": ".info.phone", + "location": ".info.location | {lat: .lat >> 0, lng: .lng >> 0, city: .fields >> {} | ?.city >> Undefined, country: .fields >> {} | ?.country >> Undefined, region: .fields >> {} | ?.region >> Undefined }", + "experiences": ".experiences | $map({title: .title >> Undefined, company: .company >> Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "educations": ".educations | $map({institution: .school >> Undefined, degree: .title >> Undefined, major: Undefined, description: .description, current: false, startDate: .date_start >> XXXX | $split(T) | .[0], endDate: .date_end >> XXXX | $split(T) | .[0], location: .location.text >> Undefined })", + "web": "{'type': 'url'}", + "tags": "[]", + "consent": true, + "attachments": "?.attachments >> []" +} diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/notebooks/.gitkeep b/src/hrflow_connectors/v2/connectors/smartrecruiters/notebooks/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/schemas.py b/src/hrflow_connectors/v2/connectors/smartrecruiters/schemas.py new file mode 100644 index 000000000..4db295e99 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/schemas.py @@ -0,0 +1,162 @@ +import typing as t + +from msgspec import Struct + + +# Job +class Department(Struct): + id: str + + +class JobLocation(Struct): + country: t.Optional[str] + countryCode: t.Optional[str] + regionCode: t.Optional[str] + region: t.Optional[str] + city: str + address: t.Optional[str] + longitude: t.Optional[str] + latitude: t.Optional[str] + remote: t.Optional[bool] + manual: t.Optional[bool] + + +class Industry(Struct): + id: str + + +class Function(Struct): + id: str + + +class TypeOfEmployment(Struct): + id: str + + +class ExperienceLevel(Struct): + id: t.Optional[str] + + +class EeoCategory(Struct): + id: str + + +class Creator(Struct): + firstName: str + lastName: str + + +class Compensation(Struct): + min: int + max: int + currency: str + + +class CompanyDescription(Struct): + title: str + text: str + + +class JobDescription(Struct): + title: str + text: str + + +class Qualifications(Struct): + title: str + text: str + + +class AdditionalInformation(Struct): + title: str + text: str + + +class Sections(Struct): + companyDescription: CompanyDescription + jobDescription: JobDescription + qualifications: Qualifications + additionalInformation: AdditionalInformation + + +class JobAd(Struct): + sections: Sections + + +class SmartRecruitersJob(Struct): + title: str + refNumber: str + createdOn: str + updatedOn: str + department: t.Optional[Department] + location: JobLocation + status: t.Optional[str] + postingStatus: t.Optional[str] + targetHiringDate: t.Optional[str] + industry: t.Optional[Industry] + function: t.Optional[Function] + typeOfEmployment: t.Optional[TypeOfEmployment] + experienceLevel: t.Optional[ExperienceLevel] + eeoCategory: t.Optional[EeoCategory] + creator: t.Optional[Creator] + compensation: t.Optional[Compensation] + jobAd: JobAd + + +# Profile +class ProfileLocation(Struct): + country: str + countryCode: str + regionCode: str + region: str + city: str + lat: int + lng: int + + +class Web(Struct): + skype: str + linkedin: str + facebook: str + twitter: str + website: str + + +class EducationItem(Struct): + institution: str + degree: str + major: str + current: bool + location: str + startDate: str + endDate: str + description: str + + +class ExperienceItem(Struct): + title: str + company: str + current: bool + startDate: str + endDate: str + location: str + description: str + + +class sourceDetails(Struct): + sourceTypeId: str + sourceSubTypeId: t.Optional[str] + sourceId: str + + +class SmartRecruitersProfile(Struct): + firstName: str + lastName: str + email: str + phoneNumber: str + location: ProfileLocation + web: Web + tags: t.List[str] + education: t.List[EducationItem] + experience: t.List[ExperienceItem] + sourceDetails: t.Optional[sourceDetails] diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/test-config.yaml b/src/hrflow_connectors/v2/connectors/smartrecruiters/test-config.yaml new file mode 100644 index 000000000..3a3ec315b --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/test-config.yaml @@ -0,0 +1,58 @@ +actions: + create_jobs_in_hrflow: + - id: valid_parameters + connector_auth: + x_smart_token: $__X_SMART_TOKEN + pull_parameters: + posting_status: PUBLIC + hrflow_auth: + api_secret: $__API_SECRET + api_user: $__API_USER + push_parameters: + board_key: $__BOARD_KEY + status: success + - id: not_x_smart_token + hrflow_auth: + api_secret: $__API_SECRET + api_user: $__API_USER + pull_parameters: + posting_status: PUBLIC + push_parameters: + board_key: $__BOARD_KEY + status: fatal + reason: bad_origin_parameters + - id: no_hrflow_board_key + connector_auth: + x_smart_token: $__X_SMART_TOKEN + pull_parameters: + posting_status: PUBLIC + hrflow_auth: + api_secret: $__API_SECRET + api_user: $__API_USER + push_parameters: + status: fatal + reason: bad_target_parameters + - id: invalid_x_smart_token + connector_auth: + x_smart_token: bad_smart_token + pull_parameters: + posting_status: PUBLIC + hrflow_auth: + api_secret: $__API_SECRET + api_user: $__API_USER + push_parameters: + board_key: $__BOARD_KEY + status: fatal + reason: read_failure + - id: invalid_hrflow_api_secret + connector_auth: + x_smart_token: $__X_SMART_TOKEN + hrflow_auth: + api_secret: bad_api_secret + api_user: $__API_USER + pull_parameters: + posting_status: PUBLIC + push_parameters: + board_key: $__BOARD_KEY + status: fatal + reason: write_failure diff --git a/src/hrflow_connectors/v2/connectors/smartrecruiters/warehouse.py b/src/hrflow_connectors/v2/connectors/smartrecruiters/warehouse.py new file mode 100644 index 000000000..9a552295c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/smartrecruiters/warehouse.py @@ -0,0 +1,10 @@ +from hrflow_connectors.v2.connectors.smartrecruiters.aisles import ( + AuthParameters, + JobsAisle, + ProfilesAisle, +) +from hrflow_connectors.v2.core.warehouse import Warehouse + +SmartRecruitersWarehouse = Warehouse( + auth=AuthParameters, aisles=(JobsAisle, ProfilesAisle) +)