From 9918a248811f72f1831cb2ebd4294e1a40f5c40e Mon Sep 17 00:00:00 2001 From: Nedhir Ebnou Date: Thu, 2 Jan 2025 17:53:09 +0100 Subject: [PATCH] feature: Add JazzHR Connector in CRUD v2 --- README.md | 2 +- manifest.json | 8813 +++++++++++++++++ src/hrflow_connectors/v2/__init__.py | 2 + .../v2/connectors/jazzhr/README.md | 91 + .../v2/connectors/jazzhr/__init__.py | 1 + .../v2/connectors/jazzhr/aisles.py | 269 + .../v2/connectors/jazzhr/connector.py | 223 + .../v2/connectors/jazzhr/connector.pyi | 13 + .../jazzhr/docs/archive_jobs_in_hrflow.md | 99 + .../jazzhr/docs/archive_profiles_in_hrflow.md | 95 + .../jazzhr/docs/create_jobs_in_hrflow.md | 101 + .../jazzhr/docs/create_profiles_in_hrflow.md | 95 + .../jazzhr/docs/create_profiles_in_jazzhr.md | 77 + .../jazzhr/docs/update_jobs_in_hrflow.md | 99 + .../jazzhr/docs/update_profiles_in_hrflow.md | 97 + .../v2/connectors/jazzhr/logo.png | Bin 0 -> 6903 bytes .../format/archive_jobs_in_hrflow.json | 3 + .../format/archive_profiles_in_hrflow.json | 3 + .../format/create_jobs_in_hrflow.json | 40 + .../format/create_profiles_in_hrflow.json | 66 + .../format/create_profiles_in_jazzhr.json | 15 + .../format/update_jobs_in_hrflow.json | 40 + .../format/update_profiles_in_hrflow.json | 66 + .../v2/connectors/jazzhr/notebooks/.gitkeep | 0 .../v2/connectors/jazzhr/schemas.py | 100 + .../v2/connectors/jazzhr/warehouse.py | 8 + 26 files changed, 10417 insertions(+), 1 deletion(-) create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/README.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/__init__.py create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/aisles.py create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/connector.py create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/connector.pyi create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/create_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_jazzhr.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/update_jobs_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/docs/update_profiles_in_hrflow.md create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/logo.png create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_jazzhr.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_jobs_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_profiles_in_hrflow.json create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/notebooks/.gitkeep create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/schemas.py create mode 100644 src/hrflow_connectors/v2/connectors/jazzhr/warehouse.py diff --git a/README.md b/README.md index e046a9c41..fd6bfa563 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ We invite developers to join us in our mission to bring AI and data integration | [**Flatchr**](./src/hrflow_connectors/v2/connectors/flatchr/README.md) | ATS | :book: Open source | *21/04/2022* | ** | | [**Greenhouse**](./src/hrflow_connectors/v2/connectors/greenhouse/README.md) | ATS | :book: Open source | *19/01/2022* | *05/09/2024* | | [**Hubspot**](./src/hrflow_connectors/v2/connectors/hubspot/README.md) | CRM | :book: Open source | *27/10/2022* | *05/09/2024* | +| [**JazzHR**](./src/hrflow_connectors/v2/connectors/jazzhr/README.md) | ATS | :book: Open source | ** | ** | | [**Lever**](./src/hrflow_connectors/v1/connectors/lever/README.md) | ATS | :book: Open source | *18/08/2023* | *23/10/2024* | | [**Recruitee**](./src/hrflow_connectors/v2/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* | @@ -127,7 +128,6 @@ We invite developers to join us in our mission to bring AI and data integration | [**iCIMS**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | | [**Infinite BrassRing**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | | [**InRecruiting**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | -| [**JazzHR**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | | [**JobAdder**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | | [**Jobaffinity**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | | [**JobDiva**](https://forms.gle/pokoE9pAjSVSFtCe7) | ATS | :lock: Premium | | | diff --git a/manifest.json b/manifest.json index 6b9cd5b57..08462b390 100644 --- a/manifest.json +++ b/manifest.json @@ -139740,6 +139740,8819 @@ } } ] + }, + { + "name": "JazzHR", + "type": "ATS", + "subtype": "jazzhr", + "logo": "https://raw.githubusercontent.com/Riminder/hrflow-connectors/master/src/hrflow_connectors/v2/connectors/jazzhr/logo.png", + "actions": [ + { + "name": "create_jobs_in_hrflow", + "data_type": "job", + "direction": "inbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrJobs", + "type": "object", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "hiring_lead_id": { + "title": "Hiring Lead Id", + "type": "string" + }, + "employment_type": { + "title": "Employment Type", + "type": "string" + }, + "minimum_experience": { + "title": "Minimum Experience", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "country": { + "title": "Country", + "type": "string" + }, + "confidential": { + "title": "Confidential", + "type": "string" + }, + "private": { + "title": "Private", + "type": "string" + }, + "department": { + "title": "Department", + "type": "string" + }, + "job_status": { + "title": "Job Status", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "postal_code": { + "title": "Postal Code", + "type": "string" + }, + "syndication": { + "title": "Syndication", + "type": "string" + }, + "workflow_id": { + "title": "Workflow Id", + "type": "string" + }, + "canned_address": { + "title": "Canned Address", + "type": "string" + }, + "canned_cover_letter": { + "title": "Canned Cover Letter", + "type": "string" + }, + "canned_references": { + "title": "Canned References", + "type": "string" + }, + "canned_wmyu": { + "title": "Canned Wmyu", + "type": "string" + }, + "canned_linked_in": { + "title": "Canned Linked In", + "type": "string" + }, + "canned_website": { + "title": "Canned Website", + "type": "string" + }, + "canned_twitter_username": { + "title": "Canned Twitter Username", + "type": "string" + }, + "canned_start": { + "title": "Canned Start", + "type": "string" + }, + "canned_weekends": { + "title": "Canned Weekends", + "type": "string" + }, + "canned_evenings": { + "title": "Canned Evenings", + "type": "string" + }, + "canned_overtime": { + "title": "Canned Overtime", + "type": "string" + }, + "canned_languages": { + "title": "Canned Languages", + "type": "string" + }, + "canned_salary": { + "title": "Canned Salary", + "type": "string" + }, + "canned_referral": { + "title": "Canned Referral", + "type": "string" + }, + "canned_license": { + "title": "Canned License", + "type": "string" + }, + "canned_cdl": { + "title": "Canned Cdl", + "type": "string" + }, + "canned_relocate": { + "title": "Canned Relocate", + "type": "string" + }, + "canned_citizen": { + "title": "Canned Citizen", + "type": "string" + }, + "canned_education": { + "title": "Canned Education", + "type": "string" + }, + "canned_college": { + "title": "Canned College", + "type": "string" + }, + "canned_gpa": { + "title": "Canned Gpa", + "type": "string" + }, + "canned_over18": { + "title": "Canned Over18", + "type": "string" + }, + "canned_flighthours": { + "title": "Canned Flighthours", + "type": "string" + }, + "canned_flightgrade": { + "title": "Canned Flightgrade", + "type": "string" + }, + "canned_felony": { + "title": "Canned Felony", + "type": "string" + }, + "canned_felonyexplain": { + "title": "Canned Felonyexplain", + "type": "string" + }, + "custom_questions_id": { + "title": "Custom Questions Id", + "type": "string" + }, + "internal_job_code": { + "title": "Internal Job Code", + "type": "string" + }, + "eeo_1_job_category": { + "title": "Eeo 1 Job Category", + "type": "string" + }, + "approved_salary_range_minimum": { + "title": "Approved Salary Range Minimum", + "type": "number" + }, + "approved_salary_range_maximum": { + "title": "Approved Salary Range Maximum", + "type": "number" + }, + "job_notes": { + "title": "Job Notes", + "type": "string" + }, + "open_date": { + "title": "Open Date", + "type": "string" + } + }, + "required": [ + "title", + "hiring_lead_id", + "employment_type", + "minimum_experience", + "description", + "country", + "confidential", + "private", + "department", + "job_status", + "state", + "city", + "postal_code", + "syndication", + "workflow_id", + "canned_address", + "canned_cover_letter", + "canned_references", + "canned_wmyu", + "canned_linked_in", + "canned_website", + "canned_twitter_username", + "canned_start", + "canned_weekends", + "canned_evenings", + "canned_overtime", + "canned_languages", + "canned_salary", + "canned_referral", + "canned_license", + "canned_cdl", + "canned_relocate", + "canned_citizen", + "canned_education", + "canned_college", + "canned_gpa", + "canned_over18", + "canned_flighthours", + "canned_flightgrade", + "canned_felony", + "canned_felonyexplain", + "custom_questions_id", + "internal_job_code", + "eeo_1_job_category", + "approved_salary_range_minimum", + "approved_salary_range_maximum", + "job_notes", + "open_date" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "title": { + "description": "Title of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter": { + "description": "Recruiter of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "board_code": { + "description": "Board Code of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "department": { + "description": "Department of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "hiring_lead": { + "description": "Hiring Lead of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "state": { + "description": "Location of Job by State", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "description": "Location of Job by City", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Filter by Job Status", + "anyOf": [ + { + "$ref": "#/$defs/Status" + }, + { + "type": "null" + } + ], + "default": null + }, + "confidential": { + "description": "Filter by confidentiality", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + }, + "private": { + "description": "Filter by privacy", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "Status": { + "title": "Status", + "enum": [ + "Approved", + "Cancelled", + "Closed", + "Drafting", + "Filled", + "Needs Approval", + "On Hold", + "Open" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowJob", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "name": { + "description": "Job title.", + "type": "string" + }, + "location": { + "description": "Job location object.", + "$ref": "#/$defs/Location" + }, + "sections": { + "description": "Job custom sections.", + "type": "array", + "items": { + "$ref": "#/$defs/Section" + } + }, + "url": { + "description": "Job post original URL.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Brief summary of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "archieved_at": { + "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "list of skills of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "list of spoken languages of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "list of certifications of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "list of courses of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "list of tasks of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "list of tags of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "list of metadatas of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_float": { + "description": "list of ranges of floats", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesFloat" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_date": { + "description": "list of ranges of dates", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesDate" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "location", + "sections" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Section": { + "title": "Section", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Section of the Job. Example: culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Display Title of a Section. Example: Corporate Culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Text description of a Section: Example: Our values areNone", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "RangesFloat": { + "title": "RangesFloat", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of floats attached to the Job. Example: salary", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value. Example: 500.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value. Example: 100.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "unit": { + "description": "Unit of the value. Example: euros.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "RangesDate": { + "title": "RangesDate", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of dates attached to the Job. Example: availability.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value in datetime ISO 8601, Example: 500.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value in datetime ISO 8601, Example: 1000", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + } + } + }, + "push_parameters": { + "title": "CreateCriterias", + "type": "object", + "properties": { + "board_key": { + "description": "HrFlow.ai board key", + "type": "string" + }, + "enrich_with_parsing": { + "description": "When enabled jobs are enriched with HrFlow.ai parsing", + "type": "boolean", + "default": false + } + }, + "required": [ + "board_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "name": "?.title", + "description": "?.description", + "location": { + "text": "$concat(?.city, ', ', ?.state, ', ', ?.country)", + "lat": null, + "lng": null + }, + "sections": [ + { + "name": "Job Description", + "title": "Job Description", + "description": "?.description" + } + ], + "ranges_float": [ + { + "name": "Salary", + "value_min": "?.approved_salary_range_minimum", + "value_max": "?.approved_salary_range_maximum", + "unit": null + } + ], + "summary": "?.job_notes", + "tags": [ + { + "name": "hiring_lead_id", + "value": "?.hiring_lead_id" + }, + { + "name": "employment_type", + "value": "?.employment_type" + }, + { + "name": "minimum_experience", + "value": "?.minimum_experience" + }, + { + "name": "department", + "value": "?.department" + }, + { + "name": "job_status", + "value": "?.job_status" + }, + { + "name": "syndication", + "value": "?.syndication" + }, + { + "name": "workflow_id", + "value": "?.workflow_id" + }, + { + "name": "custom_questions_id", + "value": "?.custom_questions_id" + }, + { + "name": "internal_job_code", + "value": "?.internal_job_code" + }, + { + "name": "eeo_1_job_category", + "value": "?.eeo_1_job_category" + }, + { + "name": "eeo_1_job_category", + "value": "?.eeo_1_job_category" + }, + { + "name": "open_date", + "value": "?.open_date" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.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 JazzHR.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.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 JazzHR\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 JazzHR.create_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.create_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "update_jobs_in_hrflow", + "data_type": "job", + "direction": "inbound", + "mode": "update", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrJobs", + "type": "object", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "hiring_lead_id": { + "title": "Hiring Lead Id", + "type": "string" + }, + "employment_type": { + "title": "Employment Type", + "type": "string" + }, + "minimum_experience": { + "title": "Minimum Experience", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "country": { + "title": "Country", + "type": "string" + }, + "confidential": { + "title": "Confidential", + "type": "string" + }, + "private": { + "title": "Private", + "type": "string" + }, + "department": { + "title": "Department", + "type": "string" + }, + "job_status": { + "title": "Job Status", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "postal_code": { + "title": "Postal Code", + "type": "string" + }, + "syndication": { + "title": "Syndication", + "type": "string" + }, + "workflow_id": { + "title": "Workflow Id", + "type": "string" + }, + "canned_address": { + "title": "Canned Address", + "type": "string" + }, + "canned_cover_letter": { + "title": "Canned Cover Letter", + "type": "string" + }, + "canned_references": { + "title": "Canned References", + "type": "string" + }, + "canned_wmyu": { + "title": "Canned Wmyu", + "type": "string" + }, + "canned_linked_in": { + "title": "Canned Linked In", + "type": "string" + }, + "canned_website": { + "title": "Canned Website", + "type": "string" + }, + "canned_twitter_username": { + "title": "Canned Twitter Username", + "type": "string" + }, + "canned_start": { + "title": "Canned Start", + "type": "string" + }, + "canned_weekends": { + "title": "Canned Weekends", + "type": "string" + }, + "canned_evenings": { + "title": "Canned Evenings", + "type": "string" + }, + "canned_overtime": { + "title": "Canned Overtime", + "type": "string" + }, + "canned_languages": { + "title": "Canned Languages", + "type": "string" + }, + "canned_salary": { + "title": "Canned Salary", + "type": "string" + }, + "canned_referral": { + "title": "Canned Referral", + "type": "string" + }, + "canned_license": { + "title": "Canned License", + "type": "string" + }, + "canned_cdl": { + "title": "Canned Cdl", + "type": "string" + }, + "canned_relocate": { + "title": "Canned Relocate", + "type": "string" + }, + "canned_citizen": { + "title": "Canned Citizen", + "type": "string" + }, + "canned_education": { + "title": "Canned Education", + "type": "string" + }, + "canned_college": { + "title": "Canned College", + "type": "string" + }, + "canned_gpa": { + "title": "Canned Gpa", + "type": "string" + }, + "canned_over18": { + "title": "Canned Over18", + "type": "string" + }, + "canned_flighthours": { + "title": "Canned Flighthours", + "type": "string" + }, + "canned_flightgrade": { + "title": "Canned Flightgrade", + "type": "string" + }, + "canned_felony": { + "title": "Canned Felony", + "type": "string" + }, + "canned_felonyexplain": { + "title": "Canned Felonyexplain", + "type": "string" + }, + "custom_questions_id": { + "title": "Custom Questions Id", + "type": "string" + }, + "internal_job_code": { + "title": "Internal Job Code", + "type": "string" + }, + "eeo_1_job_category": { + "title": "Eeo 1 Job Category", + "type": "string" + }, + "approved_salary_range_minimum": { + "title": "Approved Salary Range Minimum", + "type": "number" + }, + "approved_salary_range_maximum": { + "title": "Approved Salary Range Maximum", + "type": "number" + }, + "job_notes": { + "title": "Job Notes", + "type": "string" + }, + "open_date": { + "title": "Open Date", + "type": "string" + } + }, + "required": [ + "title", + "hiring_lead_id", + "employment_type", + "minimum_experience", + "description", + "country", + "confidential", + "private", + "department", + "job_status", + "state", + "city", + "postal_code", + "syndication", + "workflow_id", + "canned_address", + "canned_cover_letter", + "canned_references", + "canned_wmyu", + "canned_linked_in", + "canned_website", + "canned_twitter_username", + "canned_start", + "canned_weekends", + "canned_evenings", + "canned_overtime", + "canned_languages", + "canned_salary", + "canned_referral", + "canned_license", + "canned_cdl", + "canned_relocate", + "canned_citizen", + "canned_education", + "canned_college", + "canned_gpa", + "canned_over18", + "canned_flighthours", + "canned_flightgrade", + "canned_felony", + "canned_felonyexplain", + "custom_questions_id", + "internal_job_code", + "eeo_1_job_category", + "approved_salary_range_minimum", + "approved_salary_range_maximum", + "job_notes", + "open_date" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "title": { + "description": "Title of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter": { + "description": "Recruiter of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "board_code": { + "description": "Board Code of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "department": { + "description": "Department of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "hiring_lead": { + "description": "Hiring Lead of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "state": { + "description": "Location of Job by State", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "description": "Location of Job by City", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Filter by Job Status", + "anyOf": [ + { + "$ref": "#/$defs/Status" + }, + { + "type": "null" + } + ], + "default": null + }, + "confidential": { + "description": "Filter by confidentiality", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + }, + "private": { + "description": "Filter by privacy", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "Status": { + "title": "Status", + "enum": [ + "Approved", + "Cancelled", + "Closed", + "Drafting", + "Filled", + "Needs Approval", + "On Hold", + "Open" + ] + } + } + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowJob", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "name": { + "description": "Job title.", + "type": "string" + }, + "location": { + "description": "Job location object.", + "$ref": "#/$defs/Location" + }, + "sections": { + "description": "Job custom sections.", + "type": "array", + "items": { + "$ref": "#/$defs/Section" + } + }, + "url": { + "description": "Job post original URL.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Brief summary of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "archieved_at": { + "description": "type: datetime ISO8601, Archive date of the Job. The value is null for unarchived Jobs.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Job.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "list of skills of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "list of spoken languages of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "list of certifications of the Job.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "list of courses of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "list of tasks of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "list of tags of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "list of metadatas of the Job", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_float": { + "description": "list of ranges of floats", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesFloat" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "ranges_date": { + "description": "list of ranges of dates", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/RangesDate" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "location", + "sections" + ], + "$defs": { + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Section": { + "title": "Section", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Section of the Job. Example: culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Display Title of a Section. Example: Corporate Culture", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Text description of a Section: Example: Our values areNone", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "RangesFloat": { + "title": "RangesFloat", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of floats attached to the Job. Example: salary", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value. Example: 500.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value. Example: 100.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "unit": { + "description": "Unit of the value. Example: euros.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "RangesDate": { + "title": "RangesDate", + "type": "object", + "properties": { + "name": { + "description": "Identification name of a Range of dates attached to the Job. Example: availability.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_min": { + "description": "Min value in datetime ISO 8601, Example: 500.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "value_max": { + "description": "Max value in datetime ISO 8601, Example: 1000", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + } + } + }, + "push_parameters": { + "title": "UpdateCriterias", + "type": "object", + "properties": { + "board_key": { + "description": "HrFlow.ai board key", + "type": "string" + } + }, + "required": [ + "board_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id", + "name": "?.title", + "description": "?.description", + "location": { + "text": "$concat(?.city, ', ', ?.state, ', ', ?.country)", + "lat": null, + "lng": null + }, + "sections": [ + { + "name": "Job Description", + "title": "Job Description", + "description": "?.description" + } + ], + "ranges_float": [ + { + "name": "Salary", + "value_min": "?.approved_salary_range_minimum", + "value_max": "?.approved_salary_range_maximum", + "unit": null + } + ], + "summary": "?.job_notes", + "tags": [ + { + "name": "hiring_lead_id", + "value": "?.hiring_lead_id" + }, + { + "name": "employment_type", + "value": "?.employment_type" + }, + { + "name": "minimum_experience", + "value": "?.minimum_experience" + }, + { + "name": "department", + "value": "?.department" + }, + { + "name": "job_status", + "value": "?.job_status" + }, + { + "name": "syndication", + "value": "?.syndication" + }, + { + "name": "workflow_id", + "value": "?.workflow_id" + }, + { + "name": "custom_questions_id", + "value": "?.custom_questions_id" + }, + { + "name": "internal_job_code", + "value": "?.internal_job_code" + }, + { + "name": "eeo_1_job_category", + "value": "?.eeo_1_job_category" + }, + { + "name": "eeo_1_job_category", + "value": "?.eeo_1_job_category" + }, + { + "name": "open_date", + "value": "?.open_date" + } + ] + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.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 JazzHR.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.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 JazzHR\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 JazzHR.update_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.update_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "archive_jobs_in_hrflow", + "data_type": "job", + "direction": "inbound", + "mode": "archive", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrJobs", + "type": "object", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "hiring_lead_id": { + "title": "Hiring Lead Id", + "type": "string" + }, + "employment_type": { + "title": "Employment Type", + "type": "string" + }, + "minimum_experience": { + "title": "Minimum Experience", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "country": { + "title": "Country", + "type": "string" + }, + "confidential": { + "title": "Confidential", + "type": "string" + }, + "private": { + "title": "Private", + "type": "string" + }, + "department": { + "title": "Department", + "type": "string" + }, + "job_status": { + "title": "Job Status", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "postal_code": { + "title": "Postal Code", + "type": "string" + }, + "syndication": { + "title": "Syndication", + "type": "string" + }, + "workflow_id": { + "title": "Workflow Id", + "type": "string" + }, + "canned_address": { + "title": "Canned Address", + "type": "string" + }, + "canned_cover_letter": { + "title": "Canned Cover Letter", + "type": "string" + }, + "canned_references": { + "title": "Canned References", + "type": "string" + }, + "canned_wmyu": { + "title": "Canned Wmyu", + "type": "string" + }, + "canned_linked_in": { + "title": "Canned Linked In", + "type": "string" + }, + "canned_website": { + "title": "Canned Website", + "type": "string" + }, + "canned_twitter_username": { + "title": "Canned Twitter Username", + "type": "string" + }, + "canned_start": { + "title": "Canned Start", + "type": "string" + }, + "canned_weekends": { + "title": "Canned Weekends", + "type": "string" + }, + "canned_evenings": { + "title": "Canned Evenings", + "type": "string" + }, + "canned_overtime": { + "title": "Canned Overtime", + "type": "string" + }, + "canned_languages": { + "title": "Canned Languages", + "type": "string" + }, + "canned_salary": { + "title": "Canned Salary", + "type": "string" + }, + "canned_referral": { + "title": "Canned Referral", + "type": "string" + }, + "canned_license": { + "title": "Canned License", + "type": "string" + }, + "canned_cdl": { + "title": "Canned Cdl", + "type": "string" + }, + "canned_relocate": { + "title": "Canned Relocate", + "type": "string" + }, + "canned_citizen": { + "title": "Canned Citizen", + "type": "string" + }, + "canned_education": { + "title": "Canned Education", + "type": "string" + }, + "canned_college": { + "title": "Canned College", + "type": "string" + }, + "canned_gpa": { + "title": "Canned Gpa", + "type": "string" + }, + "canned_over18": { + "title": "Canned Over18", + "type": "string" + }, + "canned_flighthours": { + "title": "Canned Flighthours", + "type": "string" + }, + "canned_flightgrade": { + "title": "Canned Flightgrade", + "type": "string" + }, + "canned_felony": { + "title": "Canned Felony", + "type": "string" + }, + "canned_felonyexplain": { + "title": "Canned Felonyexplain", + "type": "string" + }, + "custom_questions_id": { + "title": "Custom Questions Id", + "type": "string" + }, + "internal_job_code": { + "title": "Internal Job Code", + "type": "string" + }, + "eeo_1_job_category": { + "title": "Eeo 1 Job Category", + "type": "string" + }, + "approved_salary_range_minimum": { + "title": "Approved Salary Range Minimum", + "type": "number" + }, + "approved_salary_range_maximum": { + "title": "Approved Salary Range Maximum", + "type": "number" + }, + "job_notes": { + "title": "Job Notes", + "type": "string" + }, + "open_date": { + "title": "Open Date", + "type": "string" + } + }, + "required": [ + "title", + "hiring_lead_id", + "employment_type", + "minimum_experience", + "description", + "country", + "confidential", + "private", + "department", + "job_status", + "state", + "city", + "postal_code", + "syndication", + "workflow_id", + "canned_address", + "canned_cover_letter", + "canned_references", + "canned_wmyu", + "canned_linked_in", + "canned_website", + "canned_twitter_username", + "canned_start", + "canned_weekends", + "canned_evenings", + "canned_overtime", + "canned_languages", + "canned_salary", + "canned_referral", + "canned_license", + "canned_cdl", + "canned_relocate", + "canned_citizen", + "canned_education", + "canned_college", + "canned_gpa", + "canned_over18", + "canned_flighthours", + "canned_flightgrade", + "canned_felony", + "canned_felonyexplain", + "custom_questions_id", + "internal_job_code", + "eeo_1_job_category", + "approved_salary_range_minimum", + "approved_salary_range_maximum", + "job_notes", + "open_date" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadJobsParameters", + "type": "object", + "properties": { + "title": { + "description": "Title of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter": { + "description": "Recruiter of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "board_code": { + "description": "Board Code of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "department": { + "description": "Department of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "hiring_lead": { + "description": "Hiring Lead of the Job", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "state": { + "description": "Location of Job by State", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "description": "Location of Job by City", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_open_date": { + "description": "Filter by job open date. Use YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Filter by Job Status", + "anyOf": [ + { + "$ref": "#/$defs/Status" + }, + { + "type": "null" + } + ], + "default": null + }, + "confidential": { + "description": "Filter by confidentiality", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + }, + "private": { + "description": "Filter by privacy", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": { + "Status": { + "title": "Status", + "enum": [ + "Approved", + "Cancelled", + "Closed", + "Drafting", + "Filled", + "Needs Approval", + "On Hold", + "Open" + ] + } + } + }, + "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 JazzHR\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 JazzHR.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 JazzHR.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.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 JazzHR\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 JazzHR.archive_jobs_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('title', 'recruiter', 'board_code', 'department', 'hiring_lead', 'state', 'city', 'from_open_date', 'to_open_date', 'status', 'confidential', 'private'):\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 JazzHR.archive_jobs_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "create_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrApplicants", + "type": "object", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" + }, + "apply_date": { + "title": "Apply Date", + "type": "string" + }, + "address": { + "title": "Address", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "postal": { + "title": "Postal", + "type": "string" + }, + "phone": { + "title": "Phone", + "type": "string" + }, + "job": { + "title": "Job", + "type": "string" + }, + "workflow_step_id": { + "title": "Workflow Step Id", + "type": "string" + }, + "coverletter": { + "title": "Coverletter", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "referral": { + "title": "Referral", + "type": "string" + }, + "license": { + "title": "License", + "type": "string" + }, + "cdl": { + "title": "Cdl", + "type": "string" + }, + "relocate": { + "title": "Relocate", + "type": "string" + }, + "citizen": { + "title": "Citizen", + "type": "string" + }, + "college": { + "title": "College", + "type": "string" + }, + "gpa": { + "title": "Gpa", + "type": "string" + }, + "over18": { + "title": "Over18", + "type": "string" + }, + "flighthours": { + "title": "Flighthours", + "type": "string" + }, + "flightgrade": { + "title": "Flightgrade", + "type": "string" + }, + "linkedin": { + "title": "Linkedin", + "type": "string" + }, + "twitter": { + "title": "Twitter", + "type": "string" + }, + "website": { + "title": "Website", + "type": "string" + }, + "languages": { + "title": "Languages", + "type": "string" + }, + "salary": { + "title": "Salary", + "type": "string" + }, + "start": { + "title": "Start", + "type": "string" + }, + "weekends": { + "title": "Weekends", + "type": "string" + }, + "evenings": { + "title": "Evenings", + "type": "string" + }, + "overtime": { + "title": "Overtime", + "type": "string" + }, + "felony": { + "title": "Felony", + "type": "string" + }, + "felonyexplain": { + "title": "Felonyexplain", + "type": "string" + }, + "wmyu": { + "title": "Wmyu", + "type": "string" + }, + "references": { + "title": "References", + "type": "string" + }, + "eeo_gender": { + "title": "Eeo Gender", + "type": "string" + }, + "eeo_race": { + "title": "Eeo Race", + "type": "string" + }, + "eeo_disability": { + "title": "Eeo Disability", + "type": "string" + }, + "eeoc_veteran": { + "title": "Eeoc Veteran", + "type": "string" + }, + "eeoc_disability": { + "title": "Eeoc Disability", + "type": "string" + }, + "eeoc_disability_signature": { + "title": "Eeoc Disability Signature", + "type": "string" + }, + "eeoc_disability_date": { + "title": "Eeoc Disability Date", + "type": "string" + }, + "resumetext": { + "title": "Resumetext", + "type": "string" + }, + "base64_resume": { + "title": "Base64 Resume", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name", + "email", + "apply_date", + "address", + "city", + "state", + "postal", + "phone", + "job", + "workflow_step_id", + "coverletter", + "source", + "referral", + "license", + "cdl", + "relocate", + "citizen", + "college", + "gpa", + "over18", + "flighthours", + "flightgrade", + "linkedin", + "twitter", + "website", + "languages", + "salary", + "start", + "weekends", + "evenings", + "overtime", + "felony", + "felonyexplain", + "wmyu", + "references", + "eeo_gender", + "eeo_race", + "eeo_disability", + "eeoc_veteran", + "eeoc_disability", + "eeoc_disability_signature", + "eeoc_disability_date", + "resumetext", + "base64_resume" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadApplicantsParameters", + "type": "object", + "properties": { + "name": { + "description": "Any substring in first or last name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "apply_date": { + "description": "Exact applied date in YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Applicant's workflow status ID", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "rating": { + "description": "Applicant's rating (1-5)", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": {} + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "CreateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": ".id", + "info": { + "first_name": ".first_name", + "last_name": ".last_name", + "full_name": "$concat(.first_name , ' ' , .last_name)", + "email": ".email", + "phone": ".phone", + "location": { + "text": "$concat(.postal, ', ', .city, ', ', .state, ', ', .country)", + "lat": null, + "lng": null + }, + "urls": [ + { + "type": "linkedin", + "url": ".linkedin" + }, + { + "type": "website", + "url": ".website" + }, + { + "type": "twitter", + "url": ".twitter" + } + ], + "gender": ".eeo_gender == 1 ?? 'female': 'male'" + }, + "text": ".resume_text", + "skills": [], + "experiences": [], + "educations": [], + "languages": [], + "certifications": [], + "interests": [], + "tags": [ + { + "name": "apply_date", + "value": ".apply_date" + }, + { + "name": "address", + "value": ".address" + }, + { + "name": "job", + "value": ".job" + }, + { + "name": "job_status", + "value": ".job_status" + }, + { + "name": "workflow_id", + "value": ".workflow_id" + }, + { + "name": "coverletter", + "value": ".coverletter" + }, + { + "name": "source", + "value": ".source" + }, + { + "name": "referral", + "value": ".referral" + }, + { + "name": "license", + "value": ".license" + }, + { + "name": "cdl", + "value": ".cdl" + }, + { + "name": "relocate", + "value": ".relocate" + }, + { + "name": "citizen", + "value": ".citizen" + }, + { + "name": "education", + "value": ".education" + }, + { + "name": "college", + "value": ".college" + }, + { + "name": "gpa", + "value": ".gpa" + }, + { + "name": "over18", + "value": ".over18" + }, + { + "name": "flighthours", + "value": ".flighthours" + }, + { + "name": "flightgrade", + "value": ".flightgrade" + }, + { + "name": "felony", + "value": ".felony" + }, + { + "name": "felonyexplain", + "value": ".felonyexplain" + }, + { + "name": "custom_questions_id", + "value": ".custom_questions_id" + }, + { + "name": "internal_job_code", + "value": ".internal_job_code" + }, + { + "name": "eeo_1_job_category", + "value": ".eeo_1_job_category" + }, + { + "name": "open_date", + "value": ".open_date" + } + ], + "resume": { + "raw": ".base64_resume" + } + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.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 JazzHR.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.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 JazzHR\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 JazzHR.create_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.create_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "update_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "update", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrApplicants", + "type": "object", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" + }, + "apply_date": { + "title": "Apply Date", + "type": "string" + }, + "address": { + "title": "Address", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "postal": { + "title": "Postal", + "type": "string" + }, + "phone": { + "title": "Phone", + "type": "string" + }, + "job": { + "title": "Job", + "type": "string" + }, + "workflow_step_id": { + "title": "Workflow Step Id", + "type": "string" + }, + "coverletter": { + "title": "Coverletter", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "referral": { + "title": "Referral", + "type": "string" + }, + "license": { + "title": "License", + "type": "string" + }, + "cdl": { + "title": "Cdl", + "type": "string" + }, + "relocate": { + "title": "Relocate", + "type": "string" + }, + "citizen": { + "title": "Citizen", + "type": "string" + }, + "college": { + "title": "College", + "type": "string" + }, + "gpa": { + "title": "Gpa", + "type": "string" + }, + "over18": { + "title": "Over18", + "type": "string" + }, + "flighthours": { + "title": "Flighthours", + "type": "string" + }, + "flightgrade": { + "title": "Flightgrade", + "type": "string" + }, + "linkedin": { + "title": "Linkedin", + "type": "string" + }, + "twitter": { + "title": "Twitter", + "type": "string" + }, + "website": { + "title": "Website", + "type": "string" + }, + "languages": { + "title": "Languages", + "type": "string" + }, + "salary": { + "title": "Salary", + "type": "string" + }, + "start": { + "title": "Start", + "type": "string" + }, + "weekends": { + "title": "Weekends", + "type": "string" + }, + "evenings": { + "title": "Evenings", + "type": "string" + }, + "overtime": { + "title": "Overtime", + "type": "string" + }, + "felony": { + "title": "Felony", + "type": "string" + }, + "felonyexplain": { + "title": "Felonyexplain", + "type": "string" + }, + "wmyu": { + "title": "Wmyu", + "type": "string" + }, + "references": { + "title": "References", + "type": "string" + }, + "eeo_gender": { + "title": "Eeo Gender", + "type": "string" + }, + "eeo_race": { + "title": "Eeo Race", + "type": "string" + }, + "eeo_disability": { + "title": "Eeo Disability", + "type": "string" + }, + "eeoc_veteran": { + "title": "Eeoc Veteran", + "type": "string" + }, + "eeoc_disability": { + "title": "Eeoc Disability", + "type": "string" + }, + "eeoc_disability_signature": { + "title": "Eeoc Disability Signature", + "type": "string" + }, + "eeoc_disability_date": { + "title": "Eeoc Disability Date", + "type": "string" + }, + "resumetext": { + "title": "Resumetext", + "type": "string" + }, + "base64_resume": { + "title": "Base64 Resume", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name", + "email", + "apply_date", + "address", + "city", + "state", + "postal", + "phone", + "job", + "workflow_step_id", + "coverletter", + "source", + "referral", + "license", + "cdl", + "relocate", + "citizen", + "college", + "gpa", + "over18", + "flighthours", + "flightgrade", + "linkedin", + "twitter", + "website", + "languages", + "salary", + "start", + "weekends", + "evenings", + "overtime", + "felony", + "felonyexplain", + "wmyu", + "references", + "eeo_gender", + "eeo_race", + "eeo_disability", + "eeoc_veteran", + "eeoc_disability", + "eeoc_disability_signature", + "eeoc_disability_date", + "resumetext", + "base64_resume" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadApplicantsParameters", + "type": "object", + "properties": { + "name": { + "description": "Any substring in first or last name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "apply_date": { + "description": "Exact applied date in YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Applicant's workflow status ID", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "rating": { + "description": "Applicant's rating (1-5)", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": {} + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "UpdateCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + }, + "only_edit_fields": { + "description": "List of attributes to use for the edit operation e.g. ['tags', 'metadatas']", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": ".id", + "info": { + "first_name": ".first_name", + "last_name": ".last_name", + "full_name": "$concat(.first_name , ' ' , .last_name)", + "email": ".email", + "phone": ".phone", + "location": { + "text": "$concat(.postal, ', ', .city, ', ', .state, ', ', .country)", + "lat": null, + "lng": null + }, + "urls": [ + { + "type": "linkedin", + "url": ".linkedin" + }, + { + "type": "website", + "url": ".website" + }, + { + "type": "twitter", + "url": ".twitter" + } + ], + "gender": ".eeo_gender == 1 ?? 'female': 'male'" + }, + "text": ".resume_text", + "skills": [], + "experiences": [], + "educations": [], + "languages": [], + "certifications": [], + "interests": [], + "tags": [ + { + "name": "apply_date", + "value": ".apply_date" + }, + { + "name": "address", + "value": ".address" + }, + { + "name": "job", + "value": ".job" + }, + { + "name": "job_status", + "value": ".job_status" + }, + { + "name": "workflow_id", + "value": ".workflow_id" + }, + { + "name": "coverletter", + "value": ".coverletter" + }, + { + "name": "source", + "value": ".source" + }, + { + "name": "referral", + "value": ".referral" + }, + { + "name": "license", + "value": ".license" + }, + { + "name": "cdl", + "value": ".cdl" + }, + { + "name": "relocate", + "value": ".relocate" + }, + { + "name": "citizen", + "value": ".citizen" + }, + { + "name": "education", + "value": ".education" + }, + { + "name": "college", + "value": ".college" + }, + { + "name": "gpa", + "value": ".gpa" + }, + { + "name": "over18", + "value": ".over18" + }, + { + "name": "flighthours", + "value": ".flighthours" + }, + { + "name": "flightgrade", + "value": ".flightgrade" + }, + { + "name": "felony", + "value": ".felony" + }, + { + "name": "felonyexplain", + "value": ".felonyexplain" + }, + { + "name": "custom_questions_id", + "value": ".custom_questions_id" + }, + { + "name": "internal_job_code", + "value": ".internal_job_code" + }, + { + "name": "eeo_1_job_category", + "value": ".eeo_1_job_category" + }, + { + "name": "open_date", + "value": ".open_date" + } + ], + "resume": { + "raw": ".base64_resume" + } + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.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 JazzHR.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.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 JazzHR\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 JazzHR.update_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.update_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "archive_profiles_in_hrflow", + "data_type": "profile", + "direction": "inbound", + "mode": "archive", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "JazzHR", + "origin_data_schema": { + "title": "JazzHrApplicants", + "type": "object", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" + }, + "apply_date": { + "title": "Apply Date", + "type": "string" + }, + "address": { + "title": "Address", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "postal": { + "title": "Postal", + "type": "string" + }, + "phone": { + "title": "Phone", + "type": "string" + }, + "job": { + "title": "Job", + "type": "string" + }, + "workflow_step_id": { + "title": "Workflow Step Id", + "type": "string" + }, + "coverletter": { + "title": "Coverletter", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "referral": { + "title": "Referral", + "type": "string" + }, + "license": { + "title": "License", + "type": "string" + }, + "cdl": { + "title": "Cdl", + "type": "string" + }, + "relocate": { + "title": "Relocate", + "type": "string" + }, + "citizen": { + "title": "Citizen", + "type": "string" + }, + "college": { + "title": "College", + "type": "string" + }, + "gpa": { + "title": "Gpa", + "type": "string" + }, + "over18": { + "title": "Over18", + "type": "string" + }, + "flighthours": { + "title": "Flighthours", + "type": "string" + }, + "flightgrade": { + "title": "Flightgrade", + "type": "string" + }, + "linkedin": { + "title": "Linkedin", + "type": "string" + }, + "twitter": { + "title": "Twitter", + "type": "string" + }, + "website": { + "title": "Website", + "type": "string" + }, + "languages": { + "title": "Languages", + "type": "string" + }, + "salary": { + "title": "Salary", + "type": "string" + }, + "start": { + "title": "Start", + "type": "string" + }, + "weekends": { + "title": "Weekends", + "type": "string" + }, + "evenings": { + "title": "Evenings", + "type": "string" + }, + "overtime": { + "title": "Overtime", + "type": "string" + }, + "felony": { + "title": "Felony", + "type": "string" + }, + "felonyexplain": { + "title": "Felonyexplain", + "type": "string" + }, + "wmyu": { + "title": "Wmyu", + "type": "string" + }, + "references": { + "title": "References", + "type": "string" + }, + "eeo_gender": { + "title": "Eeo Gender", + "type": "string" + }, + "eeo_race": { + "title": "Eeo Race", + "type": "string" + }, + "eeo_disability": { + "title": "Eeo Disability", + "type": "string" + }, + "eeoc_veteran": { + "title": "Eeoc Veteran", + "type": "string" + }, + "eeoc_disability": { + "title": "Eeoc Disability", + "type": "string" + }, + "eeoc_disability_signature": { + "title": "Eeoc Disability Signature", + "type": "string" + }, + "eeoc_disability_date": { + "title": "Eeoc Disability Date", + "type": "string" + }, + "resumetext": { + "title": "Resumetext", + "type": "string" + }, + "base64_resume": { + "title": "Base64 Resume", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name", + "email", + "apply_date", + "address", + "city", + "state", + "postal", + "phone", + "job", + "workflow_step_id", + "coverletter", + "source", + "referral", + "license", + "cdl", + "relocate", + "citizen", + "college", + "gpa", + "over18", + "flighthours", + "flightgrade", + "linkedin", + "twitter", + "website", + "languages", + "salary", + "start", + "weekends", + "evenings", + "overtime", + "felony", + "felonyexplain", + "wmyu", + "references", + "eeo_gender", + "eeo_race", + "eeo_disability", + "eeoc_veteran", + "eeoc_disability", + "eeoc_disability_signature", + "eeoc_disability_date", + "resumetext", + "base64_resume" + ] + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadApplicantsParameters", + "type": "object", + "properties": { + "name": { + "description": "Any substring in first or last name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "job_title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "recruiter_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "apply_date": { + "description": "Exact applied date in YYYY-MM-DD format", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "from_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "to_apply_date": { + "description": "YYYY-MM-DD", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "status": { + "description": "Applicant's workflow status ID", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "rating": { + "description": "Applicant's rating (1-5)", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [], + "$defs": {} + }, + "target": "HrFlow", + "target_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "push_parameters": { + "title": "ArchiveCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + } + }, + "required": [ + "source_key" + ], + "$defs": {} + }, + "jsonmap": { + "reference": "?.id" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.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 JazzHR.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.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 JazzHR\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 JazzHR.archive_profiles_in_hrflow(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 ('name', 'city', 'job_id', 'job_title', 'recruiter_id', 'apply_date', 'from_apply_date', 'to_apply_date', 'status', 'rating'):\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 JazzHR.archive_profiles_in_hrflow(\n workflow_id=workflow_id,\n connector_auth=connector_auth,\n hrflow_auth=hrflow_auth,\n pull_parameters=pull_parameters,\n push_parameters=push_parameters,\n logics=globals().get(\"logics\"),\n format=globals().get(\"format\"),\n callback=globals().get(\"callback\"),\n incremental=incremental == \"enable\",\n )", + "settings_keys": { + "workflow_id": "__workflow_id", + "incremental": "__incremental", + "connector_auth_prefix": "connector_auth_", + "hrflow_auth_prefix": "hrflow_auth_", + "pull_parameters_prefix": "pull_parameters_", + "push_parameters_prefix": "push_parameters_" + }, + "placeholders": { + "logics": "# << logics_placeholder >>", + "format": "# << format_placeholder >>", + "callback": "# << callback_placeholder >>", + "event_parser": "# << event_parser_placeholder >>" + }, + "expected": { + "activate_incremental": "enable", + "logics_functions_name": "logics", + "format_functions_name": "format", + "callback_functions_name": "callback", + "event_parser_function_name": "event_parser" + } + } + }, + { + "name": "create_profiles_in_jazzhr", + "data_type": "profile", + "direction": "outbound", + "mode": "create", + "connector_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_key": { + "description": "The API key to authenticate with JazzHR", + "type": "string" + } + }, + "required": [ + "api_key" + ], + "$defs": {} + }, + "hrflow_auth_parameters": { + "title": "AuthParameters", + "type": "object", + "properties": { + "api_secret": { + "description": "API Key used to access HrFlow.ai API", + "type": "string" + }, + "api_user": { + "description": "User email used to access HrFlow.ai API", + "type": "string" + } + }, + "required": [ + "api_secret", + "api_user" + ], + "$defs": {} + }, + "origin": "HrFlow", + "origin_data_schema": { + "title": "HrFlowProfile", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "reference": { + "description": "Custom identifier of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "info": { + "description": "Object containing the Profile's info.", + "$ref": "#/$defs/ProfileInfo" + }, + "text_language": { + "description": "Code language of the Profile. type: string code ISO 639-1", + "type": "string" + }, + "text": { + "description": "Full text of the Profile.", + "type": "string" + }, + "archived_at": { + "description": "type: datetime ISO8601, Archive date of the Profile. The value is null for unarchived Profiles.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "updated_at": { + "description": "type: datetime ISO8601, Last update date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "created_at": { + "description": "type: datetime ISO8601, Creation date of the Profile.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "experiences_duration": { + "description": "Total number of years of experience.", + "type": "number" + }, + "educations_duration": { + "description": "Total number of years of education.", + "type": "number" + }, + "experiences": { + "description": "List of experiences of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Experience" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "educations": { + "description": "List of educations of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Education" + } + }, + { + "type": "null" + } + ], + "default": [] + }, + "attachments": { + "description": "List of documents attached to the Profile.", + "type": "array", + "default": [] + }, + "skills": { + "description": "List of skills of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "languages": { + "description": "List of spoken languages of the profile", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "description": "List of certifications of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "courses": { + "description": "List of courses of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tasks": { + "description": "List of tasks of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "interests": { + "description": "List of interests of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "tags": { + "description": "List of tags of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "metadatas": { + "description": "List of metadatas of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "labels": { + "description": "List of labels of the Profile.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Label" + } + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "info", + "text_language", + "text", + "experiences_duration", + "educations_duration" + ], + "$defs": { + "ProfileInfo": { + "title": "ProfileInfo", + "type": "object", + "properties": { + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "phone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date_birth": { + "description": "Profile date of birth", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Profile location object", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "urls": { + "description": "Profile social networks and URLs", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/InfoUrl" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "picture": { + "description": "Profile picture url", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "gender": { + "description": "Profile gender", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "summary": { + "description": "Profile summary text", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "full_name", + "first_name", + "last_name", + "email", + "phone" + ] + }, + "Location": { + "title": "Location", + "type": "object", + "properties": { + "text": { + "description": "Location text address.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "lat": { + "description": "Geocentric latitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "lng": { + "description": "Geocentric longitude of the Location.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null + }, + "fields": { + "description": "other location attributes like country, country_code etc", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [] + }, + "InfoUrl": { + "title": "InfoUrl", + "type": "object", + "properties": { + "type": { + "enum": [ + "facebook", + "from_resume", + "github", + "linkedin", + "twitter" + ] + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "type", + "url" + ] + }, + "Experience": { + "title": "Experience", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "company": { + "description": "Company name of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the Company", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Experience.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Experience.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the experience. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Experience.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Skill": { + "title": "Skill", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the skill", + "type": "string" + }, + "type": { + "description": "Type of the skill. hard or soft", + "enum": [ + "hard", + "soft" + ] + }, + "value": { + "description": "Value associated to the skill", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name", + "type" + ] + }, + "GeneralEntitySchema": { + "title": "GeneralEntitySchema", + "type": "object", + "properties": { + "name": { + "description": "Identification name of the Object", + "type": "string" + }, + "value": { + "description": "Value associated to the Object's name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "name" + ] + }, + "Education": { + "title": "Education", + "type": "object", + "properties": { + "key": { + "description": "Identification key of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "school": { + "description": "School name of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "logo": { + "description": "Logo of the School", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "title": { + "description": "Title of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "description": { + "description": "Description of the Education.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "location": { + "description": "Location object of the Education.", + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Location" + } + ], + "default": null + }, + "date_start": { + "description": "Start date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "date_end": { + "description": "End date of the Education. type: ('datetime ISO 8601')", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "skills": { + "description": "List of skills of the Education.", + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/Skill" + } + }, + { + "type": "null" + } + ], + "default": null + }, + "certifications": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "courses": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + }, + "tasks": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/GeneralEntitySchema" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "certifications", + "courses", + "tasks" + ] + }, + "Label": { + "title": "Label", + "type": "object", + "properties": { + "board_key": { + "description": "Identification key of the Board containing the target Job.", + "type": "string" + }, + "job_key": { + "description": "Identification key of the Job.", + "type": "string" + }, + "job_reference": { + "description": "Custom identifier of the Job.", + "type": "string" + }, + "stage": { + "description": "Stage associated to the Profile following the action of a recruiter (yes, no, later).", + "enum": [ + "later", + "no", + "yes" + ] + }, + "date_stage": { + "description": "Date of the stage edit action. type: ('datetime ISO 8601')", + "type": "string" + }, + "rating": { + "description": "Rating associated to the Profile following the action of a recruiter (from 1 to 5).", + "anyOf": [ + { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + { + "type": "null" + } + ] + }, + "date_rating": { + "description": "Date of the rating action. type: ('datetime ISO 8601')", + "type": "string" + } + }, + "required": [ + "board_key", + "job_key", + "job_reference", + "stage", + "date_stage", + "rating", + "date_rating" + ] + } + } + }, + "supports_incremental": false, + "pull_parameters": { + "title": "ReadAllModesCriterias", + "type": "object", + "properties": { + "source_key": { + "description": "HrFlow.ai source key", + "type": "string" + }, + "profile_key": { + "description": "HrFlow.ai profile key", + "type": "string" + } + }, + "required": [ + "source_key", + "profile_key" + ], + "$defs": {} + }, + "target": "JazzHR", + "target_data_schema": { + "title": "JazzHrApplicants", + "type": "object", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string" + }, + "apply_date": { + "title": "Apply Date", + "type": "string" + }, + "address": { + "title": "Address", + "type": "string" + }, + "city": { + "title": "City", + "type": "string" + }, + "state": { + "title": "State", + "type": "string" + }, + "postal": { + "title": "Postal", + "type": "string" + }, + "phone": { + "title": "Phone", + "type": "string" + }, + "job": { + "title": "Job", + "type": "string" + }, + "workflow_step_id": { + "title": "Workflow Step Id", + "type": "string" + }, + "coverletter": { + "title": "Coverletter", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "referral": { + "title": "Referral", + "type": "string" + }, + "license": { + "title": "License", + "type": "string" + }, + "cdl": { + "title": "Cdl", + "type": "string" + }, + "relocate": { + "title": "Relocate", + "type": "string" + }, + "citizen": { + "title": "Citizen", + "type": "string" + }, + "college": { + "title": "College", + "type": "string" + }, + "gpa": { + "title": "Gpa", + "type": "string" + }, + "over18": { + "title": "Over18", + "type": "string" + }, + "flighthours": { + "title": "Flighthours", + "type": "string" + }, + "flightgrade": { + "title": "Flightgrade", + "type": "string" + }, + "linkedin": { + "title": "Linkedin", + "type": "string" + }, + "twitter": { + "title": "Twitter", + "type": "string" + }, + "website": { + "title": "Website", + "type": "string" + }, + "languages": { + "title": "Languages", + "type": "string" + }, + "salary": { + "title": "Salary", + "type": "string" + }, + "start": { + "title": "Start", + "type": "string" + }, + "weekends": { + "title": "Weekends", + "type": "string" + }, + "evenings": { + "title": "Evenings", + "type": "string" + }, + "overtime": { + "title": "Overtime", + "type": "string" + }, + "felony": { + "title": "Felony", + "type": "string" + }, + "felonyexplain": { + "title": "Felonyexplain", + "type": "string" + }, + "wmyu": { + "title": "Wmyu", + "type": "string" + }, + "references": { + "title": "References", + "type": "string" + }, + "eeo_gender": { + "title": "Eeo Gender", + "type": "string" + }, + "eeo_race": { + "title": "Eeo Race", + "type": "string" + }, + "eeo_disability": { + "title": "Eeo Disability", + "type": "string" + }, + "eeoc_veteran": { + "title": "Eeoc Veteran", + "type": "string" + }, + "eeoc_disability": { + "title": "Eeoc Disability", + "type": "string" + }, + "eeoc_disability_signature": { + "title": "Eeoc Disability Signature", + "type": "string" + }, + "eeoc_disability_date": { + "title": "Eeoc Disability Date", + "type": "string" + }, + "resumetext": { + "title": "Resumetext", + "type": "string" + }, + "base64_resume": { + "title": "Base64 Resume", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name", + "email", + "apply_date", + "address", + "city", + "state", + "postal", + "phone", + "job", + "workflow_step_id", + "coverletter", + "source", + "referral", + "license", + "cdl", + "relocate", + "citizen", + "college", + "gpa", + "over18", + "flighthours", + "flightgrade", + "linkedin", + "twitter", + "website", + "languages", + "salary", + "start", + "weekends", + "evenings", + "overtime", + "felony", + "felonyexplain", + "wmyu", + "references", + "eeo_gender", + "eeo_race", + "eeo_disability", + "eeoc_veteran", + "eeoc_disability", + "eeoc_disability_signature", + "eeoc_disability_date", + "resumetext", + "base64_resume" + ] + }, + "push_parameters": { + "title": "WriteApplicantsParameters", + "type": "object", + "properties": {}, + "required": [], + "$defs": {} + }, + "jsonmap": { + "first_name": ".info.first_name", + "last_name": ".info.last_name", + "email": ".info.email", + "phone": ".info.phone", + "address": ".info.location.text", + "city": ".info.location?.fields?.city", + "state": ".info.location?.fields?.state", + "postal": ".info.location?.fields?.postcode", + "source": ".source.name", + "linkedin": ".info.urls | .type == 'linkedin' ?? .url: null", + "twitter": ".info.urls | .type == 'twitter' ?? .url: null", + "resumetext": ".text", + "base64-resume": ".attachments | .type == 'resume' ?? .public_url | $webhook(GET, ., {}, {}, {}, .content) | $b64encode: null" + }, + "workflow": { + "catch_template": "import typing as t\n\nfrom hrflow_connectors.v2 import JazzHR\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 JazzHR.create_profiles_in_jazzhr(\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 JazzHR.create_profiles_in_jazzhr(\n workflow_id=workflow_id,\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.event_parsing_failure,\n data=dict(error=e, event=_request),\n )\n )\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 JazzHR.create_profiles_in_jazzhr(\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 JazzHR\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 JazzHR.create_profiles_in_jazzhr(\n workflow_id=\"\",\n connector_auth=dict(),\n hrflow_auth=dict(),\n pull_parameters=dict(),\n push_parameters=dict(),\n init_error=ActionInitError(\n reason=Reason.workflow_id_not_found,\n data=dict(error=\"__workflow_id not found in settings\", settings_keys=list(settings.keys())),\n )\n )\n workflow_id = settings[\"__workflow_id\"]\n\n \n\n connector_auth = dict()\n for parameter in ('api_key',):\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 JazzHR.create_profiles_in_jazzhr(\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 9853418ef..267d0e22f 100644 --- a/src/hrflow_connectors/v2/__init__.py +++ b/src/hrflow_connectors/v2/__init__.py @@ -6,6 +6,7 @@ from hrflow_connectors.v2.connectors.francetravail import FranceTravail from hrflow_connectors.v2.connectors.greenhouse import Greenhouse from hrflow_connectors.v2.connectors.hubspot import Hubspot +from hrflow_connectors.v2.connectors.jazzhr import JazzHR from hrflow_connectors.v2.connectors.recruitee import Recruitee from hrflow_connectors.v2.connectors.smartrecruiters import SmartRecruiters from hrflow_connectors.v2.connectors.taleez import Taleez @@ -36,4 +37,5 @@ Workable, Waalaxy, Greenhouse, + JazzHR, ] diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/README.md b/src/hrflow_connectors/v2/connectors/jazzhr/README.md new file mode 100644 index 000000000..c69fc9ee2 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/README.md @@ -0,0 +1,91 @@ +# 📖 Summary +- [📖 Summary](#📖-summary) +- [💼 About Jazzhr](#💼-about-jazzhr) + - [😍 Why is it a big deal for Jazzhr customers & partners?](#😍-why-is-it-a-big-deal-for-jazzhr-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 Jazzhr + +> JazzHR is a powerful, user-friendly, applicant tracking system that is purpose-built to help businesses exceed their recruiting goals. + +

+ +

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

+ +

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

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

+ + +# 💍 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 [Jazzhr](https://www.jazzhr.com) to learn more. +- ⚙️ API documentation : (https://www.resumatorapi.com/v1/) +- 💻 [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/v2/connectors/jazzhr) on our Github. + + +# 👏 Special Thanks +- 💻 HrFlow.ai : Abdellahi Mezid - Software Engineer & [Nedhir Ebnou](https://github.com/itsnedhir) - Software Engineer diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/__init__.py b/src/hrflow_connectors/v2/connectors/jazzhr/__init__.py new file mode 100644 index 000000000..1c43a422b --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/__init__.py @@ -0,0 +1 @@ +from hrflow_connectors.v2.connectors.jazzhr.connector import JazzHR # noqa diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/aisles.py b/src/hrflow_connectors/v2/connectors/jazzhr/aisles.py new file mode 100644 index 000000000..7ba0d72f8 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/aisles.py @@ -0,0 +1,269 @@ +import typing as t +from enum import Enum +from logging import LoggerAdapter + +import requests +from msgspec import Meta, Struct +from msgspec import json as msgspec_json +from typing_extensions import Annotated + +from hrflow_connectors.v2.connectors.jazzhr.schemas import JazzHrApplicants, JazzHrJobs +from hrflow_connectors.v2.core.common import Entity +from hrflow_connectors.v2.core.warehouse import ( + Aisle, + Criterias, + ReadOperation, + WriteOperation, + merge, +) + +API_URL = "https://api.resumatorapi.com/v1" + + +class AuthParameters(Struct): + api_key: Annotated[ + str, + Meta( + description="The API key to authenticate with JazzHR", + ), + ] + + +class Status(str, Enum): + open = "Open" + on_hold = "On Hold" + approved = "Approved" + needs_approval = "Needs Approval" + drafting = "Drafting" + filled = "Filled" + cancelled = "Cancelled" + closed = "Closed" + + +class ReadJobsParameters(Struct, omit_defaults=True): + title: Annotated[ + t.Optional[str], + Meta( + description="Title of the Job", + ), + ] = None + recruiter: Annotated[ + t.Optional[str], + Meta( + description="Recruiter of the Job", + ), + ] = None + board_code: Annotated[ + t.Optional[str], + Meta( + description="Board Code of the Job", + ), + ] = None + department: Annotated[ + t.Optional[str], + Meta( + description="Department of the Job", + ), + ] = None + hiring_lead: Annotated[ + t.Optional[str], + Meta( + description="Hiring Lead of the Job", + ), + ] = None + state: Annotated[ + t.Optional[str], + Meta( + description="Location of Job by State", + ), + ] = None + city: Annotated[ + t.Optional[str], + Meta( + description="Location of Job by City", + ), + ] = None + from_open_date: Annotated[ + t.Optional[str], + Meta( + description="Filter by job open date. Use YYYY-MM-DD format", + ), + ] = None + to_open_date: Annotated[ + t.Optional[str], + Meta( + description="Filter by job open date. Use YYYY-MM-DD format", + ), + ] = None + status: Annotated[ + t.Optional[Status], + Meta( + description="Filter by Job Status", + ), + ] = None + confidential: Annotated[ + t.Optional[bool], + Meta( + description="Filter by confidentiality", + ), + ] = None + private: Annotated[ + t.Optional[bool], + Meta( + description="Filter by privacy", + ), + ] = None + + +class ReadApplicantsParameters(Struct, omit_defaults=True): + name: Annotated[ + t.Optional[str], + Meta( + description="Any substring in first or last name", + ), + ] = None + city: t.Optional[str] = None + job_id: t.Optional[str] = None + job_title: t.Optional[str] = None + recruiter_id: t.Optional[str] = None + apply_date: Annotated[ + t.Optional[str], + Meta( + description="Exact applied date in YYYY-MM-DD format", + ), + ] = None + from_apply_date: Annotated[ + t.Optional[str], + Meta( + description="YYYY-MM-DD", + ), + ] = None + to_apply_date: Annotated[ + t.Optional[str], + Meta( + description="YYYY-MM-DD", + ), + ] = None + status: Annotated[ + t.Optional[str], + Meta( + description="Applicant's workflow status ID", + ), + ] = None + rating: Annotated[ + t.Optional[str], + Meta( + description="Applicant's rating (1-5)", + ), + ] = None + + +class WriteApplicantsParameters(Struct): + pass + + +def read_jobs( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadJobsParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterable[t.Dict]: + adapter.debug("Reading jobs from JazzHR") + # TODO: Recheck how to authenticate with JazzHR + # TODO: Check if the API key is the only way to authenticate + # TODO: Check for pagination + headers = {"Authorization": f"Basic {auth_parameters.api_key}"} + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + response = requests.get("{}/jobs".format(API_URL), headers=headers, params=params) + if response.status_code == 200: + jobs = response.json() + for job in jobs: + yield job + else: + raise Exception(f"Failed to read jobs from JazzHR: {response.text}") + + +def read_applicants( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: ReadApplicantsParameters, + incremental: bool, + incremental_token: t.Optional[str], +) -> t.Iterable[t.Dict]: + adapter.debug("Reading applicants from JazzHR") + # TODO: Recheck how to authenticate with JazzHR + # TODO: Check if the API key is the only way to authenticate + # TODO: Check for pagination + headers = {"Authorization": f"Basic {auth_parameters.api_key}"} + params = msgspec_json.decode(msgspec_json.encode(parameters), type=dict) + response = requests.get( + "{}/applicants".format(API_URL), headers=headers, params=params + ) + + if response.status_code == 200: + applicants = response.json() + for applicant in applicants: + yield applicant + else: + raise Exception(f"Failed to read applicants from JazzHR: {response.text}") + + +def write_applicants( + adapter: LoggerAdapter, + auth_parameters: AuthParameters, + parameters: WriteApplicantsParameters, + items: t.Iterable[t.Dict], +) -> t.List[t.Dict]: + failed_applicants = [] + headers = {"Authorization": f"Basic {auth_parameters.api_key}"} + for item in items: + response = requests.post( + "{}/applicants".format(API_URL), headers=headers, json=item + ) + if response.status_code != 201: + failed_applicants.append(item) + return failed_applicants + + +ProfilesAisle = Aisle( + name=Entity.profile, + schema=JazzHrApplicants, + read=ReadOperation( + criterias=Criterias( + create=ReadApplicantsParameters, + update=ReadApplicantsParameters, + archive=ReadApplicantsParameters, + ), + function=merge( + create=read_applicants, + update=read_applicants, + archive=read_applicants, + ), + ), + write=WriteOperation( + criterias=Criterias( + create=WriteApplicantsParameters, + ), + function=merge( + create=write_applicants, + ), + ), +) + +JobsAisle = Aisle( + name=Entity.job, + schema=JazzHrJobs, + read=ReadOperation( + criterias=Criterias( + create=ReadJobsParameters, + update=ReadJobsParameters, + archive=ReadJobsParameters, + ), + function=merge( + create=read_jobs, + update=read_jobs, + archive=read_jobs, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/connector.py b/src/hrflow_connectors/v2/connectors/jazzhr/connector.py new file mode 100644 index 000000000..00d57caab --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/connector.py @@ -0,0 +1,223 @@ +import base64 +import typing as t + +import requests + +from hrflow_connectors.v2.connectors.jazzhr.warehouse import JazzhrWarehouse +from hrflow_connectors.v2.core.common import Direction, Entity, Mode +from hrflow_connectors.v2.core.connector import Connector, ConnectorType, Flow + + +def format_jazzhr_job(jazzhr_job: t.Dict) -> t.Dict: + hrflow_job = {} + location_text = ( + f"{jazzhr_job['city']}, {jazzhr_job['state']}, {jazzhr_job['country']}" + ) + hrflow_job["reference"] = jazzhr_job["id"] + hrflow_job["name"] = jazzhr_job["title"] + hrflow_job["description"] = jazzhr_job["description"] + hrflow_job["location"] = {"text": location_text, "lat": None, "lng": None} + hrflow_job["sections"] = [ + { + "name": "Job Description", + "title": "Job Description", + "description": jazzhr_job["description"], + } + ] + hrflow_job["ranges_float"] = [ + { + "name": "Salary", + "value_min": jazzhr_job["approved_salary_range_minimum"], + "value_max": jazzhr_job["approved_salary_range_maximum"], + "unit": None, + } + ] + hrflow_job["summary"] = jazzhr_job["job_notes"] + tags_list = [ + "hiring_lead_id", + "employment_type", + "minimum_experience", + "department", + "job_status", + "syndication", + "workflow_id", + "custom_questions_id", + "internal_job_code", + "eeo_1_job_category", + "eeo_1_job_category", + "open_date", + ] + for tag in tags_list: + if jazzhr_job[tag] is not None: + hrflow_job["tags"].append(dict(name=tag, value=jazzhr_job[tag])) + return hrflow_job + + +def format_jazzhr_applicant(jazzhr_applicant: t.Dict) -> t.Dict: + hrflow_profile = {} + location_text = ( + f"{jazzhr_applicant['postal']}, {jazzhr_applicant['city']}," + f" {jazzhr_applicant['state']}, {jazzhr_applicant['country']}" + ) + hrflow_profile["reference"] = jazzhr_applicant["id"] + hrflow_profile["info"]["first_name"] = jazzhr_applicant["first_name"] + hrflow_profile["info"]["last_name"] = jazzhr_applicant["last_name"] + hrflow_profile["info"]["full_name"] = ( + jazzhr_applicant["first_name"] + " " + jazzhr_applicant["last_name"] + ) + hrflow_profile["info"]["email"] = jazzhr_applicant["email"] + hrflow_profile["info"]["phone"] = jazzhr_applicant["phone"] + hrflow_profile["info"]["location"] = { + "text": location_text, + "lat": None, + "lng": None, + } + list_of_sites = ["linkedin", "website", "twitter"] + hrflow_profile["info"]["urls"] = [] + for site in list_of_sites: + if jazzhr_applicant[site] is not None: + hrflow_profile["info"]["urls"].append( + { + "type": site, + "url": jazzhr_applicant[site], + } + ) + hrflow_profile["info"]["gender"] = "" + if jazzhr_applicant["eeo_gender"] == 1: + hrflow_profile["info"]["gender"] = "female" + elif jazzhr_applicant["eeo_gender"] == 2: + hrflow_profile["info"]["gender"] = "male" + hrflow_profile["text"] = jazzhr_applicant["resume_text"] + list_of_tags = ( + [ + "apply_date", + "address", + "job", + "job_status", + "workflow_id", + "coverletter", + "source", + "referral", + "license", + "cdl", + "relocate", + "citizen", + "education", + "college", + "gpa", + "over18", + "flighthours", + "flightgrade", + "felony", + "felonyexplain", + "custom_questions_id", + "internal_job_code", + "eeo_1_job_category", + "open_date", + ], + ) + hrflow_profile["tags"] = [] + for tag in list_of_tags: + if jazzhr_applicant[tag] is not None: + hrflow_profile["tags"].append(dict(name=tag, value=jazzhr_applicant[tag])) + hrflow_profile["skills"] = [] + hrflow_profile["experiences"] = [] + hrflow_profile["educations"] = [] + hrflow_profile["languages"] = [] + hrflow_profile["certifications"] = [] + hrflow_profile["interests"] = [] + hrflow_profile["resume"]["raw"] = jazzhr_applicant["base64_resume"] + return hrflow_profile + + +def format_jazzhr_archive(jazzhr_entity: t.Dict) -> t.Dict: + return {"reference": jazzhr_entity["id"]} + + +def format_hrflow_profile( + hrflow_profile: t.Dict, +) -> t.Dict: + jazzhr_applicant = dict( + first_name=hrflow_profile["info"]["first_name"], + last_name=hrflow_profile["info"]["last_name"], + email=hrflow_profile["info"]["email"], + phone=hrflow_profile["info"]["phone"], + address=hrflow_profile["info"]["location"]["text"], + city=hrflow_profile["info"]["location"].get("fields", {}).get("city"), + state=hrflow_profile["info"]["location"].get("fields", {}).get("state"), + postal=hrflow_profile["info"]["location"].get("fields", {}).get("postcode"), + source=hrflow_profile["source"]["name"], + linkedin=next( + ( + url["url"] + for url in hrflow_profile["info"]["urls"] + if url["type"] == "linkedin" + ), + None, + ), + twitter=next( + ( + url["url"] + for url in hrflow_profile["info"]["urls"] + if url["type"] == "twitter" + ), + None, + ), + resumetext=hrflow_profile["text"], + ) + resume_link = next( + ( + attachment["public_url"] + for attachment in hrflow_profile["attachments"] + if attachment["type"] == "resume" + ), + None, + ) + if resume_link: + base64_resume = base64.b64encode(requests.get(resume_link).content) + jazzhr_applicant["base64-resume"] = base64_resume + return jazzhr_applicant + + +DESCRIPTION = ( + "JazzHR is a powerful, user-friendly, applicant tracking system " + "that is purpose-built to help businesses exceed their recruiting goals." +) + +JazzHR = Connector( + name="JazzHR", + type=ConnectorType.ATS, + subtype="jazzhr", + description=DESCRIPTION, + url="https://www.jazzhr.com", + warehouse=JazzhrWarehouse, + flows=( + Flow(Mode.create, Entity.job, Direction.inbound, format=format_jazzhr_job), + Flow(Mode.update, Entity.job, Direction.inbound, format=format_jazzhr_job), + Flow(Mode.archive, Entity.job, Direction.inbound, format=format_jazzhr_archive), + Flow( + Mode.create, + Entity.profile, + Direction.inbound, + format=format_jazzhr_applicant, + ), + Flow( + Mode.update, + Entity.profile, + Direction.inbound, + format=format_jazzhr_applicant, + ), + Flow( + Mode.archive, + Entity.profile, + Direction.inbound, + format=format_jazzhr_archive, + ), + Flow( + Mode.create, + Entity.profile, + Direction.outbound, + format=format_hrflow_profile, + ), + ), +) diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/connector.pyi b/src/hrflow_connectors/v2/connectors/jazzhr/connector.pyi new file mode 100644 index 000000000..0fb17aa1e --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/connector.pyi @@ -0,0 +1,13 @@ +# This file is generated automatically +from hrflow_connectors.v2.core.connector import Connector, PublicActionInterface + +class JazzHRProto(Connector): + create_jobs_in_hrflow: PublicActionInterface + update_jobs_in_hrflow: PublicActionInterface + archive_jobs_in_hrflow: PublicActionInterface + create_profiles_in_hrflow: PublicActionInterface + update_profiles_in_hrflow: PublicActionInterface + archive_profiles_in_hrflow: PublicActionInterface + create_profiles_in_jazzhr: PublicActionInterface + +JazzHR: JazzHRProto \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_jobs_in_hrflow.md new file mode 100644 index 000000000..eb014cbe3 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_jobs_in_hrflow.md @@ -0,0 +1,99 @@ +# Archive jobs in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **archived** 'job(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `title` | `string\|null` | None | Title of the Job | +| `recruiter` | `string\|null` | None | Recruiter of the Job | +| `board_code` | `string\|null` | None | Board Code of the Job | +| `department` | `string\|null` | None | Department of the Job | +| `hiring_lead` | `string\|null` | None | Hiring Lead of the Job | +| `state` | `string\|null` | None | Location of Job by State | +| `city` | `string\|null` | None | Location of Job by City | +| `from_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `to_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `status` | `Literal['Approved','Cancelled','Closed','Drafting','Filled','Needs Approval','On Hold','Open']\|null` | None | Filter by Job Status | +| `confidential` | `boolean\|null` | None | Filter by confidentiality | +| `private` | `boolean\|null` | None | Filter by privacy | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.archive_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + title=..., + recruiter=..., + board_code=..., + department=..., + hiring_lead=..., + state=..., + city=..., + from_open_date=..., + to_open_date=..., + status=..., + confidential=..., + private=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_profiles_in_hrflow.md new file mode 100644 index 000000000..a72d01d48 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/archive_profiles_in_hrflow.md @@ -0,0 +1,95 @@ +# Archive profiles in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **archived** 'profile(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `name` | `string\|null` | None | Any substring in first or last name | +| `city` | `string\|null` | None | | +| `job_id` | `string\|null` | None | | +| `job_title` | `string\|null` | None | | +| `recruiter_id` | `string\|null` | None | | +| `apply_date` | `string\|null` | None | Exact applied date in YYYY-MM-DD format | +| `from_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `to_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `status` | `string\|null` | None | Applicant's workflow status ID | +| `rating` | `string\|null` | None | Applicant's rating (1-5) | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.archive_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + name=..., + city=..., + job_id=..., + job_title=..., + recruiter_id=..., + apply_date=..., + from_apply_date=..., + to_apply_date=..., + status=..., + rating=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_jobs_in_hrflow.md new file mode 100644 index 000000000..26f982b9a --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_jobs_in_hrflow.md @@ -0,0 +1,101 @@ +# Create jobs in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **created** 'job(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `title` | `string\|null` | None | Title of the Job | +| `recruiter` | `string\|null` | None | Recruiter of the Job | +| `board_code` | `string\|null` | None | Board Code of the Job | +| `department` | `string\|null` | None | Department of the Job | +| `hiring_lead` | `string\|null` | None | Hiring Lead of the Job | +| `state` | `string\|null` | None | Location of Job by State | +| `city` | `string\|null` | None | Location of Job by City | +| `from_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `to_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `status` | `Literal['Approved','Cancelled','Closed','Drafting','Filled','Needs Approval','On Hold','Open']\|null` | None | Filter by Job Status | +| `confidential` | `boolean\|null` | None | Filter by confidentiality | +| `private` | `boolean\|null` | None | Filter by privacy | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.create_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + title=..., + recruiter=..., + board_code=..., + department=..., + hiring_lead=..., + state=..., + city=..., + from_open_date=..., + to_open_date=..., + status=..., + confidential=..., + private=..., + ), + 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/jazzhr/docs/create_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_hrflow.md new file mode 100644 index 000000000..ee87ac5a9 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_hrflow.md @@ -0,0 +1,95 @@ +# Create profiles in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **created** 'profile(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `name` | `string\|null` | None | Any substring in first or last name | +| `city` | `string\|null` | None | | +| `job_id` | `string\|null` | None | | +| `job_title` | `string\|null` | None | | +| `recruiter_id` | `string\|null` | None | | +| `apply_date` | `string\|null` | None | Exact applied date in YYYY-MM-DD format | +| `from_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `to_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `status` | `string\|null` | None | Applicant's workflow status ID | +| `rating` | `string\|null` | None | Applicant's rating (1-5) | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.create_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + name=..., + city=..., + job_id=..., + job_title=..., + recruiter_id=..., + apply_date=..., + from_apply_date=..., + to_apply_date=..., + status=..., + rating=..., + ), + push_parameters=dict( + source_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_jazzhr.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_jazzhr.md new file mode 100644 index 000000000..5ab362466 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/create_profiles_in_jazzhr.md @@ -0,0 +1,77 @@ +# Create profiles in jazzhr +`HrFlow` :arrow_right: `JazzHR` + +Send **created** 'profile(s)' _from_ HrFlow _to_ JazzHR + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (HrFlow) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `source_key` :red_circle: | `string` | None | HrFlow.ai source key | +| `profile_key` :red_circle: | `string` | None | HrFlow.ai profile key | + +## Push Parameters (JazzHR) + +| 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.create_profiles_in_jazzhr( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + 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/jazzhr/docs/update_jobs_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/update_jobs_in_hrflow.md new file mode 100644 index 000000000..4864d9699 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/update_jobs_in_hrflow.md @@ -0,0 +1,99 @@ +# Update jobs in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **updated** 'job(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `title` | `string\|null` | None | Title of the Job | +| `recruiter` | `string\|null` | None | Recruiter of the Job | +| `board_code` | `string\|null` | None | Board Code of the Job | +| `department` | `string\|null` | None | Department of the Job | +| `hiring_lead` | `string\|null` | None | Hiring Lead of the Job | +| `state` | `string\|null` | None | Location of Job by State | +| `city` | `string\|null` | None | Location of Job by City | +| `from_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `to_open_date` | `string\|null` | None | Filter by job open date. Use YYYY-MM-DD format | +| `status` | `Literal['Approved','Cancelled','Closed','Drafting','Filled','Needs Approval','On Hold','Open']\|null` | None | Filter by Job Status | +| `confidential` | `boolean\|null` | None | Filter by confidentiality | +| `private` | `boolean\|null` | None | Filter by privacy | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.update_jobs_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + title=..., + recruiter=..., + board_code=..., + department=..., + hiring_lead=..., + state=..., + city=..., + from_open_date=..., + to_open_date=..., + status=..., + confidential=..., + private=..., + ), + push_parameters=dict( + board_key=..., + ), + format=..., + callback=..., + persist=..., + incremental=... +) +``` \ No newline at end of file diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/docs/update_profiles_in_hrflow.md b/src/hrflow_connectors/v2/connectors/jazzhr/docs/update_profiles_in_hrflow.md new file mode 100644 index 000000000..ce03e92db --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/docs/update_profiles_in_hrflow.md @@ -0,0 +1,97 @@ +# Update profiles in hrflow +`JazzHR` :arrow_right: `HrFlow` + +Send **updated** 'profile(s)' _from_ JazzHR _to_ HrFlow + + + +## JazzHR Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_key` :red_circle: | `string` | None | The API key to authenticate with JazzHR | + +## HrFlow.ai Auth Parameters + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `api_secret` :red_circle: | `string` | None | API Key used to access HrFlow.ai API | +| `api_user` :red_circle: | `string` | None | User email used to access HrFlow.ai API | + +## Pull Parameters (JazzHR) + +| Field | Type | Default | Description | +| ----- | ---- | ------- | ----------- | +| `name` | `string\|null` | None | Any substring in first or last name | +| `city` | `string\|null` | None | | +| `job_id` | `string\|null` | None | | +| `job_title` | `string\|null` | None | | +| `recruiter_id` | `string\|null` | None | | +| `apply_date` | `string\|null` | None | Exact applied date in YYYY-MM-DD format | +| `from_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `to_apply_date` | `string\|null` | None | YYYY-MM-DD | +| `status` | `string\|null` | None | Applicant's workflow status ID | +| `rating` | `string\|null` | None | Applicant's rating (1-5) | + +## 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 JazzHR + + +logging.basicConfig(level=logging.INFO) + + +JazzHR.update_profiles_in_hrflow( + workflow_id=..., + logics=..., + connector_auth=dict( + api_key=..., + ), + hrflow_auth=dict( + api_secret=..., + api_user=..., + ), + pull_parameters=dict( + name=..., + city=..., + job_id=..., + job_title=..., + recruiter_id=..., + apply_date=..., + from_apply_date=..., + to_apply_date=..., + status=..., + rating=..., + ), + 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/jazzhr/logo.png b/src/hrflow_connectors/v2/connectors/jazzhr/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..830acbc03355a3448ce75e74286d2482d5d35456 GIT binary patch literal 6903 zcmeHMRaX=M)26#5mJaDyx*J?->1Iihk`@F3X%<)-ln!A5B}8IrB*X=l4r!2P=@z6x zKfizQUc8s@#msZ&V$RgXJaZ<&P+yajh=B+L1A`Q-rDpsOv;SWR@cwB9OyA9afazzf z`3$3WoM|5egP|U*rfM2wcU(XmWIEeC@OO7q*F`KNMun1+fDrQ;M(kPmLg}2jfV)}k zV{KD2Z74f$^UtcXn`(1wgzN12-iKXr^;&G+X-2} z?&gWb4DpO1>@no@#qmX0sP0bv#Hz>Rm6bj)|Gg=RgxpguuZr*HVdePK2O}v4F_P z|GE4}9kcgACSt$4%iC4?<~VGODt>8<6^&)Cz!Jv^4!YRpKUxl@6KW;?&0fot| zC*S^!#h{4t3xg>l{IX9z2%XchJ~9$h%6YFa^ps;SZ9QpT7nQ!WTY;OD%+%`t`8CfH z_s|NUcH;CP+psYaZWrw@{4WSF<+E2F@++s7=aB)!)3dLaQU%k@t#zl@fx>7eJeukh z11}_8`UomLQiy;gn#`T-zI$>=u%WY-o5-~$+lmiaKDaCs8tWjUm6OrBRvfM%HN#`A zPBA-kX{X5GtW5RxQ=Q|UqVHFK{zVsSguoP7wI1|_IF-dq-NKsAkQ&cP^@UWw!5|13 z&otK6k0$Vs@$Ia|_60-x(6WT_s7*REF`RT04G#|tp}1rNM@Ls&iO!L26>o3ud~2-u z^eoZj{5f8-zG@UEd?NPgB7MA?+e}f;$Tn2hS1n(FGU1uoEQ@)b_wj4F5?=n9w&8GD z!`_;jS;Dy9_x=MAT~$uXs3kNElzmU?{I6PC_%c*l$_!a}3}bQN;?@*}h)^I=76!<4 zd5I+TD|n;{4Nb(|8u{6(JnIJ9QP9?u>cJJx%yo7ZCREY?w(`y7a~f@vcg1)PY- z>8B5&$L3BuK@>Atd;Y_&o@b8RRToc)H0#43^{Gj&pC!;Yd1m@BX+dV}q(sK#sZ&de zc^O-6l(E0SgURc2iP~xXUNl7!oMf&ITuw}p>Z}D0ekY8ee%|GykZofH#b#x3Boep7 zQ3wChqNV|G@}*m6px^KqMx0YKy_Uuq%>t{a-$G{KGO<^wWTfd)k>d}lOgI;3Pz92S z2_1~N*=_>4wKOzA=TYf5Jh9~bmS?R0FUFQfediW9S7_X6b5;- zq_F(>L!LnA=Zo0qzq|T8`e9drQ}^Ivl&a{<3S}slg>D~dPR=I$o(!3Xm0eoJE5N7W z2KKc=xTnpd(fMdFAmxZ^D0q00%E;D_X{^R;H24zGQH~9d)=|k$69k2?8sbDh^$)n6 zoSYn59~nO{sr0$Y!}LJ6cROB`uMGZnH`Q^<^v@IU=4qGXXmglcY`bc?^;8TAoP9Bd z9TD5jLGs)j&y?~T3zIlXj2WB{O(3>>RxA!R`sgR>;-It|d_fnwNN;F%tfU_o(_fC! z2#K=CF;M)<+&k#N$4NvARASXDX2KxF3NXMH`FYHx=D@EF3-P@l^YhuwuQ8;-CA0ji zRFGTC67KpVt~|v3`r|3xE}QCWts{{O)|}*lO&y)HKYw}^1+%Lh{K2By8YxFK)dxS@ zIT5a;4V*8|EvXDmtmCrhq-3Tevw|xpKN9Nk-^FdYxOEOU^04zP#korK_drQsz|l(XW>o32to*Wu_*s+QLTL114B! zknPpfAy+I80EHo%d;)Vhomp(MgdQ6jr8?TI44%u}=g%EU_#wizYcOTcDyaBCQd^Z+ zrPjK?sA@p$uUQZN`n@~ZHs@aguClYZ1}#ar%cEjtZRF*l)Ro=#EW9I%blZDc)S6^hAH_oM$x1OwuA3 z5xFepW}e+K7ju~e!q*--nC!|`z&bM((W)f;n%O*r%4kS2a`^rjqJ0hb z)VM7I1`~2&tMkBuorqlAA6a1eZzZzv_}`>i$Gn~@T>TEnq`u3I@td4qgwpAwiGZT|Oqz%nrK8R0gMDL^b{t zQ(FuwJ<`w+*+j42cDKgk*wcr#v)ZGId+PnAU!eP*;!@JK82LP}w0{BjtnS$XaWJh+nw(M(<6KDthN$_3-WkASF9NOnLsWbvR^^r=K?w)%+!}ounKk<~s z6!p2|z01JwY{je!u-fkDWZO0ye!CQORFS7Pt*=(Jl$6Qh#4Ta6t0dJob)=_bi_%23 z#l(4kNFAAARxEB9dF)<}m2R2o*?;5iVX%lH;jJl>=tlDv;)f=oCLQbh4C7{!z4A@F zf!PbP7{$L=@3s8UYnzD|mwcB&S}E_FScpYcPzpDBitn-0#0R!_W4p#lvaViUX2P3O zVZ_H{uKs&_Y1h`!egPpA$ZGJAH3h!Ir7+*5lLAsrD0WZ?Rg41MmXQj4Uw2hFPQq?p z8RmjZNPMKjo$48^qHk6O8+~WFXbgE_V#_&cZ_l)dPi{7r2>AF%@_uD9!oTQd^Oqtz z7xG_?Av=dlSsb|n#4Y)a6DbEk6BaMf@{)8}hjTkGV-j~%hvw|5{djiJ_0}#NBYGtm zKW1ieyKsy)5FwZ@23(=+Pp%5;*%!h)Z@kbp;tP_M}u7Q_0r!#B_5yp$dm0G(YI zIGuU=fK%5ToH!i~kPd}F&P2ZjZL$GF94O!nB5?9HRKQA(-RCPaNxT}cl9hT;l5FB~ z9qHUCa$LRPw(DqvA9ee~uj4H4I<*(gC0+BRY`eZGVifC+qs>#}$%(a1g6=Ck;!M7! z)rAFl2)3_0Sd3YPCCQ#yzWtNDT{=d$awHXL3Xn`cHg9~(gj-KVU;iqyLcGmhu@SrO zTRR*D0bbO;Y`PU)%^d(cwJmC7QzTZkou1s@Janep(F_TW!*Z(5HX|aw+X$hoB!s@C zeRZ0ViaUFBZallx>F24|?J;KdLLR4mOENT#ny&e3jOKg)+GHahTH2}m;Dch)Wl(H- zu0vyn4%)h1S-1(1Y&2!^C!>DLM^A}W!V4IuPr$D$%+{*;;r*1W$PLkyl7IB^YqGIH z%p`=Q48>t26+9DJ;;^I;F8B419c(8fcq5NFXuBC(ccVX@tW~$#$Ae(=D;LKIV{%o{ zS?#UNOYeki2Q9Q5-wqoAJlu^u{NhgaMy#1cM0w0v#)-*;7+q8*{%Z_(n}n!+kU2c4 znnobvE>I$)jQzTze-ZqCKy~Yn+=G!Wi#Sdi5T0VBzW8Xx&v5^qc6GqRI+bI3_gQjQ zIVr6(4F(f&pU>fK8RYApr#bcR;d)ud1Xi`F*?D#`=OJyHW00y+e^!=Q>muA*-|EgD zdil^Oe|Bg=jyNZIBaNt*sp~4^8$KtIDyenm7e?z8fcU(4jgT z&wbbQ8sAk&^Or{#oPw$hl&+>&I`6zm6=0?EZx_-p?f(|-%w?qgXxZ^RiP z09Sdv!0ae3MzE#PG%62C@&b~GU3-OF(A{>*G1Wjp=69I`o9`*M8;u)}fCDs|wezu; z9<=s*hBZd-s7G!-Ielh$`4!%}`UTZ{7=ZZ1Cye<^jy1|`g{enTdhEL-ZBFAFOQqXD z^kK`#Z%FbS%>r6%ZDsHi4AUoVt~&(F9sYnuXn!%>x_IU!R@1JsM_}myqN^^HV!wSj z%Z@>)SNNp5)15tAkS<57`xAdA(C0bei?G1^@x|Y?oqk%p-_W%(w%&==Rl?#_CKb92 zJ}2&mf&k@j)9kE|lS@JOim!=H1&#uUR+`1xs#=HX6q)OWaHEYztATyYt>fyxMXduG ziy@VSfiThKC0F2v|_Hx$aBA=Ewy2LGcviI0YeFPeBysM zs$T~2dua(O9>$KdoffNyUo~m}7Bv!_p!tvQpe63$l<5Nu*g-ctmTmS{Pra=hX$A_S zeL_Br61l}XcQI?E7pu_#KRiz?v(S5nS7>;->BAm}l&9MCb<(1=p%)83KezMzX^h`G zP_n&0RT)z~ANbdcvNqo$Sxfi%3-?8B^5PYJ`ofx;8xg&BYa_cY$1a_{aD_1XK2UOv!;(EnCeVYeqFhD0gw|VgfExh6L zhVdlK9bbdwV((aNWd-vH&$NwegzKsk40SxO|#{{ z58la)J1#@>Ma)H3wlI{6a_wdi;_zX?AH z5T?su(RdIF@|iy+*Qo#fAO=(xX6;Z0AqK@x76U14|EQ3+@y-qZZWHY~KblT#zQg^Z ztX;q$Uw^mHywF^ydfGen0puQ*yqeVZVd3GT4iP%t8gV97rR3`5OLT~us++On*2e)w zOFngdM{n)2@W@H%9T)TH_2R*Qp9COZ^V2Z)T!EY&*5mL>dBJE^MHV_a*C#s@4N;~JP%h~(|oQco4?nVWg!HZEnT%p>tH5~Q$J z%qAhsg->)@;7JKIxIx|*Mww(oDr&EyvkNJI{(KhnP)=V-$RFf`X2CO$=UGVkao)-B z9PqqJ$ZcobDUZuy$bkkB^y?v=?`CuQubSP5pFR?SV?w>J+{U(^-G>OlqMLtr8UqX9 zX^Qx1pS<*hm?aw~=C<6Gf&-{S?8P8xXH!?)%$i(hFq7&MI>7b?2S#;#F5Iqv9$pc2Wb(ttgS3X<8vZ z$f?D(SvIl}qbj4D1Y<5oTsDIYk;9~BbQbH*q5yct+-y}DU%JrhuHgQ!!f-#qeq&3X zgAr+6lx*5*AEK>fx>$49?cn=+Phxc%?z1qVD7rUd0IF*Biump17i*%IWE9TI#rvph2Z3FDHW--ft(e<|UF( zJRU0cvb-<*?(>5Kp#H7>bdl^o2BC(kt!=!-f8YMa9ULCtBXhs(5mSyomRX4D_N+sF z;}CQ`CHW{xhs|8IXR47f4aE}P(H|a2*WrIxxZij3Q84HvEpBmI$OgmzUGb-_2Hfql z0n^T#9nHZBcIhtzVOw&GAPQ^~rD(HsigP17bS2m0nyZbljwy#24W3|1~>P0hD>+@1O@>+xhCMg4-|R*449IKEYi zgGGbCoI6B;1JMoatgl1q^LL*nQQ>35)Z9N%T`o+EM*z1~RpCZMu=5EF|20LuuKhHi zUNwc)Xz7E+cJ3q=g<3_m>0+U@1X|9w^dTI>pLK5et~a+v7b=VZW&N5n!2y wF~XjRSdzej1WZ?|&vE?E^}pSwiNDz7N6Sy<=DFGaeX=mX>iTN6&+MW92blWfo&W#< literal 0 HcmV?d00001 diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_jobs_in_hrflow.json new file mode 100644 index 000000000..692e23a1c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_jobs_in_hrflow.json @@ -0,0 +1,3 @@ +{ + "reference": "?.id" +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_profiles_in_hrflow.json new file mode 100644 index 000000000..692e23a1c --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/archive_profiles_in_hrflow.json @@ -0,0 +1,3 @@ +{ + "reference": "?.id" +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_jobs_in_hrflow.json new file mode 100644 index 000000000..c5c7a8b26 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_jobs_in_hrflow.json @@ -0,0 +1,40 @@ +{ + "reference": "?.id", + "name": "?.title", + "description": "?.description", + "location": { + "text": "$concat(?.city, ', ', ?.state, ', ', ?.country)", + "lat": null, + "lng": null + }, + "sections": [ + { + "name": "Job Description", + "title": "Job Description", + "description": "?.description" + } + ], + "ranges_float": [ + { + "name": "Salary", + "value_min": "?.approved_salary_range_minimum", + "value_max": "?.approved_salary_range_maximum", + "unit": null + } + ], + "summary": "?.job_notes", + "tags": [ + { "name": "hiring_lead_id", "value": "?.hiring_lead_id" }, + { "name": "employment_type", "value": "?.employment_type" }, + { "name": "minimum_experience", "value": "?.minimum_experience" }, + { "name": "department", "value": "?.department" }, + { "name": "job_status", "value": "?.job_status" }, + { "name": "syndication", "value": "?.syndication" }, + { "name": "workflow_id", "value": "?.workflow_id" }, + { "name": "custom_questions_id", "value": "?.custom_questions_id" }, + { "name": "internal_job_code", "value": "?.internal_job_code" }, + { "name": "eeo_1_job_category", "value": "?.eeo_1_job_category" }, + { "name": "eeo_1_job_category", "value": "?.eeo_1_job_category" }, + { "name": "open_date", "value": "?.open_date" } + ] +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_hrflow.json new file mode 100644 index 000000000..128bce09a --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_hrflow.json @@ -0,0 +1,66 @@ +{ + "reference": ".id", + "info": { + "first_name": ".first_name", + "last_name": ".last_name", + "full_name": "$concat(.first_name , ' ' , .last_name)", + "email": ".email", + "phone": ".phone", + "location": { + "text": "$concat(.postal, ', ', .city, ', ', .state, ', ', .country)", + "lat": null, + "lng": null + }, + "urls": [ + { + "type": "linkedin", + "url": ".linkedin" + }, + { + "type": "website", + "url": ".website" + }, + { + "type": "twitter", + "url": ".twitter" + } + ], + "gender": ".eeo_gender == 1 ?? 'female': 'male'" + }, + "text": ".resume_text", + "skills": [], + "experiences": [], + "educations": [], + "languages": [], + "certifications": [], + "interests": [], + "tags": [ + { "name": "apply_date", "value": ".apply_date" }, + { "name": "address", "value": ".address" }, + { "name": "job", "value": ".job" }, + { "name": "job_status", "value": ".job_status" }, + { "name": "workflow_id", "value": ".workflow_id" }, + { "name": "coverletter", "value": ".coverletter" }, + { "name": "source", "value": ".source" }, + { "name": "referral", "value": ".referral" }, + { "name": "license", "value": ".license" }, + { "name": "cdl", "value": ".cdl" }, + { "name": "relocate", "value": ".relocate" }, + { "name": "citizen", "value": ".citizen" }, + { "name": "education", "value": ".education" }, + { "name": "college", "value": ".college" }, + { "name": "gpa", "value": ".gpa" }, + { "name": "over18", "value": ".over18" }, + { "name": "flighthours", "value": ".flighthours" }, + { "name": "flightgrade", "value": ".flightgrade" }, + { "name": "felony", "value": ".felony" }, + { "name": "felonyexplain", "value": ".felonyexplain" }, + { "name": "custom_questions_id", "value": ".custom_questions_id" }, + { "name": "internal_job_code", "value": ".internal_job_code" }, + { "name": "eeo_1_job_category", "value": ".eeo_1_job_category" }, + { "name": "open_date", "value": ".open_date" } + ], + "resume": { + "raw": ".base64_resume" + } +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_jazzhr.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_jazzhr.json new file mode 100644 index 000000000..6e469697d --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/create_profiles_in_jazzhr.json @@ -0,0 +1,15 @@ +{ + "first_name": ".info.first_name", + "last_name": ".info.last_name", + "email": ".info.email", + "phone": ".info.phone", + "address": ".info.location.text", + "city": ".info.location?.fields?.city", + "state": ".info.location?.fields?.state", + "postal": ".info.location?.fields?.postcode", + "source": ".source.name", + "linkedin": ".info.urls | .type == 'linkedin' ?? .url: null", + "twitter": ".info.urls | .type == 'twitter' ?? .url: null", + "resumetext": ".text", + "base64-resume": ".attachments | .type == 'resume' ?? .public_url | $webhook(GET, ., {}, {}, {}, .content) | $b64encode: null" +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_jobs_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_jobs_in_hrflow.json new file mode 100644 index 000000000..c5c7a8b26 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_jobs_in_hrflow.json @@ -0,0 +1,40 @@ +{ + "reference": "?.id", + "name": "?.title", + "description": "?.description", + "location": { + "text": "$concat(?.city, ', ', ?.state, ', ', ?.country)", + "lat": null, + "lng": null + }, + "sections": [ + { + "name": "Job Description", + "title": "Job Description", + "description": "?.description" + } + ], + "ranges_float": [ + { + "name": "Salary", + "value_min": "?.approved_salary_range_minimum", + "value_max": "?.approved_salary_range_maximum", + "unit": null + } + ], + "summary": "?.job_notes", + "tags": [ + { "name": "hiring_lead_id", "value": "?.hiring_lead_id" }, + { "name": "employment_type", "value": "?.employment_type" }, + { "name": "minimum_experience", "value": "?.minimum_experience" }, + { "name": "department", "value": "?.department" }, + { "name": "job_status", "value": "?.job_status" }, + { "name": "syndication", "value": "?.syndication" }, + { "name": "workflow_id", "value": "?.workflow_id" }, + { "name": "custom_questions_id", "value": "?.custom_questions_id" }, + { "name": "internal_job_code", "value": "?.internal_job_code" }, + { "name": "eeo_1_job_category", "value": "?.eeo_1_job_category" }, + { "name": "eeo_1_job_category", "value": "?.eeo_1_job_category" }, + { "name": "open_date", "value": "?.open_date" } + ] +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_profiles_in_hrflow.json b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_profiles_in_hrflow.json new file mode 100644 index 000000000..128bce09a --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/mappings/format/update_profiles_in_hrflow.json @@ -0,0 +1,66 @@ +{ + "reference": ".id", + "info": { + "first_name": ".first_name", + "last_name": ".last_name", + "full_name": "$concat(.first_name , ' ' , .last_name)", + "email": ".email", + "phone": ".phone", + "location": { + "text": "$concat(.postal, ', ', .city, ', ', .state, ', ', .country)", + "lat": null, + "lng": null + }, + "urls": [ + { + "type": "linkedin", + "url": ".linkedin" + }, + { + "type": "website", + "url": ".website" + }, + { + "type": "twitter", + "url": ".twitter" + } + ], + "gender": ".eeo_gender == 1 ?? 'female': 'male'" + }, + "text": ".resume_text", + "skills": [], + "experiences": [], + "educations": [], + "languages": [], + "certifications": [], + "interests": [], + "tags": [ + { "name": "apply_date", "value": ".apply_date" }, + { "name": "address", "value": ".address" }, + { "name": "job", "value": ".job" }, + { "name": "job_status", "value": ".job_status" }, + { "name": "workflow_id", "value": ".workflow_id" }, + { "name": "coverletter", "value": ".coverletter" }, + { "name": "source", "value": ".source" }, + { "name": "referral", "value": ".referral" }, + { "name": "license", "value": ".license" }, + { "name": "cdl", "value": ".cdl" }, + { "name": "relocate", "value": ".relocate" }, + { "name": "citizen", "value": ".citizen" }, + { "name": "education", "value": ".education" }, + { "name": "college", "value": ".college" }, + { "name": "gpa", "value": ".gpa" }, + { "name": "over18", "value": ".over18" }, + { "name": "flighthours", "value": ".flighthours" }, + { "name": "flightgrade", "value": ".flightgrade" }, + { "name": "felony", "value": ".felony" }, + { "name": "felonyexplain", "value": ".felonyexplain" }, + { "name": "custom_questions_id", "value": ".custom_questions_id" }, + { "name": "internal_job_code", "value": ".internal_job_code" }, + { "name": "eeo_1_job_category", "value": ".eeo_1_job_category" }, + { "name": "open_date", "value": ".open_date" } + ], + "resume": { + "raw": ".base64_resume" + } +} diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/notebooks/.gitkeep b/src/hrflow_connectors/v2/connectors/jazzhr/notebooks/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/schemas.py b/src/hrflow_connectors/v2/connectors/jazzhr/schemas.py new file mode 100644 index 000000000..f0437a83e --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/schemas.py @@ -0,0 +1,100 @@ +from pydantic import BaseModel + + +class JazzHrJobs(BaseModel): + title: str + hiring_lead_id: str + employment_type: str + minimum_experience: str + description: str + country: str + confidential: str + private: str + department: str + job_status: str + state: str + city: str + postal_code: str + syndication: str + workflow_id: str + canned_address: str + canned_cover_letter: str + canned_references: str + canned_wmyu: str + canned_linked_in: str + canned_website: str + canned_twitter_username: str + canned_start: str + canned_weekends: str + canned_evenings: str + canned_overtime: str + canned_languages: str + canned_salary: str + canned_referral: str + canned_license: str + canned_cdl: str + canned_relocate: str + canned_citizen: str + canned_education: str + canned_college: str + canned_gpa: str + canned_over18: str + canned_flighthours: str + canned_flightgrade: str + canned_felony: str + canned_felonyexplain: str + custom_questions_id: str + internal_job_code: str + eeo_1_job_category: str + approved_salary_range_minimum: float + approved_salary_range_maximum: float + job_notes: str + open_date: str + + +class JazzHrApplicants(BaseModel): + first_name: str + last_name: str + email: str + apply_date: str + address: str + city: str + state: str + postal: str + phone: str + job: str + workflow_step_id: str + coverletter: str + source: str + referral: str + license: str + cdl: str + relocate: str + citizen: str + college: str + gpa: str + over18: str + flighthours: str + flightgrade: str + linkedin: str + twitter: str + website: str + languages: str + salary: str + start: str + weekends: str + evenings: str + overtime: str + felony: str + felonyexplain: str + wmyu: str + references: str + eeo_gender: str + eeo_race: str + eeo_disability: str + eeoc_veteran: str + eeoc_disability: str + eeoc_disability_signature: str + eeoc_disability_date: str + resumetext: str + base64_resume: str diff --git a/src/hrflow_connectors/v2/connectors/jazzhr/warehouse.py b/src/hrflow_connectors/v2/connectors/jazzhr/warehouse.py new file mode 100644 index 000000000..20109e4c3 --- /dev/null +++ b/src/hrflow_connectors/v2/connectors/jazzhr/warehouse.py @@ -0,0 +1,8 @@ +from hrflow_connectors.v2.connectors.jazzhr.aisles import ( + AuthParameters, + JobsAisle, + ProfilesAisle, +) +from hrflow_connectors.v2.core.warehouse import Warehouse + +JazzhrWarehouse = Warehouse(auth=AuthParameters, aisles=(JobsAisle, ProfilesAisle))