Skip to content

Commit

Permalink
feat: add pull_profile_list for SAPSuccessFactors
Browse files Browse the repository at this point in the history
update review pr

update review pr
  • Loading branch information
itsnedhir authored and the-forest-tree committed Jul 1, 2024
1 parent 4e20c8d commit a3e4ffe
Show file tree
Hide file tree
Showing 9 changed files with 535 additions and 72 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ We invite developers to join us in our mission to bring AI and data integration
| **BizMerlinHR** | ATS | 🎯 | | | | | | |
| **Beetween** | ATS | 🎯 | | | | | | |
| [**Bullhorn**](./src/hrflow_connectors/connectors/bullhorn/README.md) | ATS | :white_check_mark: | *26/01/2022* | *30/10/2023* | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [**Breezy HR**](./src/hrflow_connectors/connectors/breezyhr/README.md) | ATS | :white_check_mark: | *19/01/2022* | *04/09/2023* | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| [**Breezy HR**](./src/hrflow_connectors/connectors/breezyhr/README.md) | ATS | :white_check_mark: | *19/01/2022* | *01/07/2024* | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| **CATS** | ATS | 🎯 | | | | | | |
| **Cegid (Meta4)** | ATS | 🎯 | | | | | | |
| [**Ceridian**](./src/hrflow_connectors/connectors/ceridian/README.md) | HCM | :white_check_mark: | *19/01/2022* | *04/09/2023* | :x: | :white_check_mark: | :x: | :x: | :x: |
Expand Down Expand Up @@ -95,7 +95,7 @@ We invite developers to join us in our mission to bring AI and data integration
| **RecruitBox** | ATS | 🎯 | | |
| **RecruiterFlow** | ATS | 🎯 | | | | | | |
| **Recruitive** | ATS | 🎯 | | | | | | |
| [**SAPSuccessfactors**](./src/hrflow_connectors/connectors/sapsuccessfactors/README.md) | ATS | :white_check_mark: | *19/01/2022* | *30/10/2023* | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [**SAPSuccessfactors**](./src/hrflow_connectors/connectors/sapsuccessfactors/README.md) | ATS | :white_check_mark: | *19/01/2022* | *30/10/2023* | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [**Salesforce**](./src/hrflow_connectors/connectors/salesforce/README.md) | CRM | :white_check_mark: | *03/08/2023* | *04/12/2023* | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [**Smartrecruiters**](./src/hrflow_connectors/connectors/smartrecruiters/README.md) | ATS | :white_check_mark: | *21/03/2022* | *30/10/2023* | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [**Taleez**](./src/hrflow_connectors/connectors/taleez/README.md) | ATS | :white_check_mark: | *19/01/2022* | *04/09/2023* | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
Expand Down
367 changes: 367 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11801,6 +11801,373 @@
"workflow_code_workflow_id_settings_key": "__workflow_id",
"workflow_code_origin_settings_prefix": "origin_",
"workflow_code_target_settings_prefix": "target_"
},
{
"name": "pull_profile_list",
"action_type": "inbound",
"action_parameters": {
"title": "ReadProfilesActionParameters",
"type": "object",
"properties": {
"read_mode": {
"description": "If 'incremental' then `read_from` of the last run is given to Origin Warehouse during read. **The actual behavior depends on implementation of read**. In 'sync' mode `read_from` is neither fetched nor given to Origin Warehouse during read.",
"default": "sync",
"allOf": [
{
"$ref": "#/definitions/ReadMode"
}
]
},
"logics": {
"title": "logics",
"description": "List of logic functions. Each function should have the following signature typing.Callable[[typing.Dict], typing.Optional[typing.Dict]]. The final list should be exposed in a variable named 'logics'.",
"template": "\nimport typing as t\n\ndef logic_1(item: t.Dict) -> t.Union[t.Dict, None]:\n return None\n\ndef logic_2(item: t.Dict) -> t.Uniont[t.Dict, None]:\n return None\n\nlogics = [logic_1, logic_2]\n",
"type": "code_editor"
},
"format": {
"title": "format",
"description": "Formatting function. You should expose a function named 'format' with following signature typing.Callable[[typing.Dict], typing.Dict]",
"template": "\nimport typing as t\n\ndef format(item: t.Dict) -> t.Dict:\n return item\n",
"type": "code_editor"
}
},
"additionalProperties": false,
"definitions": {
"ReadMode": {
"title": "ReadMode",
"description": "An enumeration.",
"enum": [
"sync",
"incremental"
]
}
}
},
"data_type": "profile",
"trigger_type": "schedule",
"origin": "SAP Profiles",
"origin_parameters": {
"title": "ReadProfilesParameters",
"type": "object",
"properties": {
"api_server": {
"title": "Api Server",
"description": "Server to be accessed",
"field_type": "Other",
"type": "string"
},
"api_key": {
"title": "Api Key",
"description": "API Key used to authenticate on the SAP API",
"field_type": "Auth",
"type": "string"
},
"top": {
"title": "Top",
"description": "Show only the first N items value is capped at 100",
"default": 100,
"field_type": "Query Param",
"type": "integer"
},
"skip": {
"title": "Skip",
"description": "Search items by search phrases",
"field_type": "Query Param",
"type": "integer"
},
"filter": {
"title": "Filter",
"description": "Filter items by property values",
"field_type": "Query Param",
"type": "string"
},
"search": {
"title": "Search",
"description": "Search items by search phrases",
"field_type": "Query Param",
"type": "string"
}
},
"required": [
"api_server",
"api_key"
],
"additionalProperties": false
},
"origin_data_schema": {
"title": "SapCandidateModel",
"type": "object",
"properties": {
"address": {
"title": "Address",
"type": "string"
},
"cellPhone": {
"title": "Cellphone",
"type": "string"
},
"city": {
"title": "City",
"type": "string"
},
"contactEmail": {
"title": "Contactemail",
"type": "string"
},
"country": {
"title": "Country",
"type": "string"
},
"currentTitle": {
"title": "Currenttitle",
"type": "string"
},
"firstName": {
"title": "Firstname",
"type": "string"
},
"homePhone": {
"title": "Homephone",
"type": "string"
},
"lastName": {
"title": "Lastname",
"type": "string"
},
"middleName": {
"title": "Middlename",
"type": "string"
},
"primaryEmail": {
"title": "Primaryemail",
"type": "string"
},
"zip": {
"title": "Zip",
"type": "string"
},
"education": {
"$ref": "#/definitions/Education"
},
"outsideWorkExperience": {
"$ref": "#/definitions/OutsideWorkExperience"
}
},
"required": [
"primaryEmail"
],
"definitions": {
"Result": {
"title": "Result",
"type": "object",
"properties": {
"endDate": {
"title": "Enddate",
"type": "string"
},
"school": {
"title": "School",
"type": "string"
},
"schoolAddress": {
"title": "Schooladdress",
"type": "string"
},
"startDate": {
"title": "Startdate",
"type": "string"
}
},
"required": [
"school",
"schoolAddress"
]
},
"Education": {
"title": "Education",
"type": "object",
"properties": {
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/definitions/Result"
}
}
},
"required": [
"results"
]
},
"ResultOutsideWorkExperience": {
"title": "ResultOutsideWorkExperience",
"type": "object",
"properties": {
"employer": {
"title": "Employer",
"type": "string"
},
"employerAddress": {
"title": "Employeraddress",
"type": "string"
},
"endDate": {
"title": "Enddate",
"type": "string"
},
"startDate": {
"title": "Startdate",
"type": "string"
}
},
"required": [
"employerAddress"
]
},
"OutsideWorkExperience": {
"title": "OutsideWorkExperience",
"type": "object",
"properties": {
"results": {
"title": "Results",
"type": "array",
"items": {
"$ref": "#/definitions/ResultOutsideWorkExperience"
}
}
},
"required": [
"results"
]
}
}
},
"supports_incremental": false,
"target": "HrFlow.ai Profile Parsing",
"target_parameters": {
"title": "WriteProfileParsingParameters",
"type": "object",
"properties": {
"api_secret": {
"title": "Api Secret",
"description": "X-API-KEY used to access HrFlow.ai API",
"field_type": "Auth",
"type": "string"
},
"api_user": {
"title": "Api User",
"description": "X-USER-EMAIL used to access HrFlow.ai API",
"field_type": "Auth",
"type": "string"
},
"source_key": {
"title": "Source Key",
"description": "HrFlow.ai source key",
"field_type": "Other",
"type": "string"
},
"only_insert": {
"title": "Only Insert",
"description": "When enabled the profile is written only if it doesn't exist in the source",
"default": false,
"field_type": "Other",
"type": "boolean"
}
},
"required": [
"api_secret",
"api_user",
"source_key"
],
"additionalProperties": false
},
"target_data_schema": {
"title": "HrFlowProfileParsing",
"type": "object",
"properties": {
"reference": {
"title": "Reference",
"description": "Custom identifier of the Profile.",
"type": "string"
},
"created_at": {
"title": "Created At",
"description": "type: datetime ISO8601, Creation date of the Profile.",
"type": "string"
},
"resume": {
"$ref": "#/definitions/ResumeToParse"
},
"tags": {
"title": "Tags",
"description": "List of tags of the Profile.",
"type": "array",
"items": {
"$ref": "#/definitions/GeneralEntitySchema"
}
},
"metadatas": {
"title": "Metadatas",
"description": "List of metadatas of the Profile.",
"type": "array",
"items": {
"$ref": "#/definitions/GeneralEntitySchema"
}
}
},
"required": [
"created_at",
"resume",
"tags",
"metadatas"
],
"definitions": {
"ResumeToParse": {
"title": "ResumeToParse",
"type": "object",
"properties": {
"raw": {
"title": "Raw",
"type": "string",
"format": "binary"
},
"content_type": {
"title": "Content Type",
"type": "string"
}
},
"required": [
"raw",
"content_type"
]
},
"GeneralEntitySchema": {
"title": "GeneralEntitySchema",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "Identification name of the Object",
"type": "string"
},
"value": {
"title": "Value",
"description": "Value associated to the Object's name",
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"workflow_code": "import typing as t\n\nfrom hrflow_connectors import SAPSuccessFactors\nfrom hrflow_connectors.core.connector import ActionInitError, Reason\n\nORIGIN_SETTINGS_PREFIX = \"origin_\"\nTARGET_SETTINGS_PREFIX = \"target_\"\n\n# << format_placeholder >>\n\n# << logics_placeholder >>\n\n\ndef workflow(\n \n settings: t.Dict\n ) -> None:\n actions_parameters = dict()\n try:\n format\n except NameError:\n pass\n else:\n actions_parameters[\"format\"] = format\n\n try:\n logics\n except NameError:\n pass\n else:\n actions_parameters[\"logics\"] = logics\n\n if \"__workflow_id\" not in settings:\n return SAPSuccessFactors.pull_profile_list(\n workflow_id=\"\",\n action_parameters=dict(),\n origin_parameters=dict(),\n target_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 origin_parameters = dict()\n for parameter in ['api_server', 'api_key', 'top', 'skip', 'filter', 'search']:\n if \"{}{}\".format(ORIGIN_SETTINGS_PREFIX, parameter) in settings:\n origin_parameters[parameter] = settings[\"{}{}\".format(ORIGIN_SETTINGS_PREFIX, parameter)]\n \n\n target_parameters = dict()\n for parameter in ['api_secret', 'api_user', 'source_key', 'only_insert']:\n if \"{}{}\".format(TARGET_SETTINGS_PREFIX, parameter) in settings:\n target_parameters[parameter] = settings[\"{}{}\".format(TARGET_SETTINGS_PREFIX, parameter)]\n \n\n return SAPSuccessFactors.pull_profile_list(\n workflow_id=workflow_id,\n action_parameters=actions_parameters,\n origin_parameters=origin_parameters,\n target_parameters=target_parameters,\n )",
"workflow_code_format_placeholder": "# << format_placeholder >>",
"workflow_code_logics_placeholder": "# << logics_placeholder >>",
"workflow_code_workflow_id_settings_key": "__workflow_id",
"workflow_code_origin_settings_prefix": "origin_",
"workflow_code_target_settings_prefix": "target_"
}
],
"type": "ATS",
Expand Down
Loading

0 comments on commit a3e4ffe

Please sign in to comment.