{"action":"created","comment":{"url":"https://api.github.com/repos/workato/connector_sdk/pulls/comments/206250613","pull_request_review_id":141629308,"id":206250613,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjI1MDYxMw==","diff_hunk":"@@ -0,0 +1,1775 @@\n+{\n+  title: \"Greenhouse\",\n+\n+  connection: {\n+    fields: [\n+      {\n+        name: \"api_key\",\n+        control_type: \"password\",\n+        optional: false,\n+        label: \"API key\",\n+        hint: \"Find your API key <a href='https://app2.greenhouse.io/\" \\\n+          \"configure/dev_center/credentials'>here</a>\"\n+      },\n+      {\n+        name: \"usermail\",\n+        control_type: \"text\",\n+        optional: false,\n+        label: \"User Email\",\n+        hint: \"User email the API Key is generated from\"\n+      }\n+    ],\n+\n+    authorization: {\n+      type: \"api_key\",\n+\n+      credentials: lambda do |connection|\n+        user(connection['api_key'])\n+        password(\"\")\n+      end\n+    },\n+\n+    base_uri: lambda do\n+      \"https://harvest.greenhouse.io\"\n+    end\n+  },\n+\n+  object_definitions: {\n+    candidate: {\n+      # https://developers.greenhouse.io/harvest.html#the-candidate-object\n+      fields: lambda do |_|\n+        custom_fields = get(\"/v1/custom_fields\").\n+                        params(field_type: \"candidate\").\n+                        select lambda do |e|\n+                          e[\"field_type\"] == \"candidate\" &&\n+                          e[\"private\"] == false &&\n+                          e[\"active\"] == true\n+                        end.\n+                        map do |field|\n+          type = field[\"value_type\"]\n+          case type\n+          when \"short_text\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"long_text\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"text-area\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"yes_no\"\n+            { name: field[\"name_key\"], type: \"boolean\",\n+              control_type: \"checkbox\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"date\"\n+            { name: field[\"name_key\"], type: \"date\", control_type: \"date\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"url\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"url\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"user\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"single_select\"\n+            select_values = field[\"custom_field_options\"].\n+                            map do |ob|\n+                              [ob[\"name\"], ob[\"name\"]]\n+                            end\n+            { name: field[\"name_key\"], control_type: \"select\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: select_values,\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: false,\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"multi_select\"\n+            multiselect_values = field[\"custom_field_options\"].\n+                                 map do |ob|\n+                                   [ob[\"name\"], ob[\"name\"]]\n+                                 end\n+            { name: field[\"name_key\"], control_type: \"multiselect\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: multiselect_values,\n+              pick_list_params: {},\n+              delimiter: \",\",\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          else\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          end\n+        end\n+\n+        standard_fields = [\n+          { name: \"id\", type: \"integer\", control_type: \"number\",\n+            label: \"Candidate id\" },\n+          { name: \"first_name\" },\n+          { name: \"last_name\" },\n+          { name: \"company\",\n+            hint: \"The company at which the candidate currently works\" },\n+          { name: \"title\", hint: \"The candidate’s current title\" },\n+          { name: \"created_at\", type: \"date_time\", control_type: \"date_time\" },\n+          { name: \"updated_at\", type: \"date_time\", control_type: \"date_time\" },\n+          { name: \"last_activity\", type: \"date_time\",\n+            control_type: \"date_time\" },\n+          { name: \"is_private\", type: \"boolean\", control_type: \"checkbox\",\n+            hint: \"Yes if candidate is private, No if not\" },\n+          { name: \"photo_url\", control_type: \"url\" },\n+          { name: \"attachments\", type: \"array\", of: \"object\", properties: [\n+            { name: \"filename\" },\n+            { name: \"url\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"attachments_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"application_ids\", type: \"array\", of: \"integer\",\n+            properties: [],\n+            hint: \"Array of application IDs associated with this candidate\" },\n+          { name: \"phone_numbers\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"phone_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"address_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"email_addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"email_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"website_addresses\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"value\" },\n+              { name: \"type\",\n+                control_type: \"select\",\n+                pick_list: \"website_type\",\n+                toggle_hint: \"Select from list\",\n+                toggle_field: {\n+                  name: \"type\",\n+                  label: \"type\",\n+                  type: \"string\",\n+                  control_type: \"text\",\n+                  toggle_hint: \"Use custom value\"\n+                } }\n+            ] },\n+          { name: \"social_media_addresses\", type: \"object\", properties: [\n+            { name: \"value\" }\n+          ] },\n+          { name: \"recruiter\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"first_name\" },\n+            { name: \"last_name\" },\n+            { name: \"name\" },\n+            { name: \"employee_id\" }\n+          ] },\n+          { name: \"coordinator\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"first_name\" },\n+            { name: \"last_name\" },\n+            { name: \"name\" },\n+            { name: \"employee_id\" }\n+          ] },\n+          { name: \"tags\", type: \"array\", of: \"string\", properties: [] },\n+          { name: \"applications\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"candidate_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"prospect\", type: \"boolean\", control_type: \"checkbox\" },\n+            { name: \"applied_at\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"rejected_at\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"last_activity_at\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"location\", type: \"object\", properties: [\n+              { name: \"address\" }\n+            ] },\n+            { name: \"source\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"public_name\" }\n+            ] },\n+            { name: \"credited_to\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"first_name\" },\n+              { name: \"last_name\" },\n+              { name: \"name\" },\n+              { name: \"employee_id\" }\n+            ] },\n+            { name: \"rejection_reason\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" },\n+              { name: \"type\", type: \"object\", properties: [\n+                { name: \"id\", type: \"integer\", control_type: \"number\" },\n+                { name: \"name\" }\n+              ] }\n+            ] },\n+            # Rejection details\n+            { name: \"jobs\", type: \"array\", of: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] },\n+            { name: \"status\" },\n+            { name: \"current_stage\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] },\n+            { name: \"answers\", type: \"array\", of: \"object\", properties: [\n+              { name: \"question\" },\n+              { name: \"answer\" }\n+            ] },\n+            { name: \"prospect_detail\", type: \"object\", properties: [\n+              { name: \"prospect_pool\", type: \"object\", properties: [\n+                { name: \"id\", type: \"integer\", control_type: \"number\" },\n+                { name: \"name\" }\n+              ] },\n+              { name: \"prospect_stage\", type: \"object\", properties: [\n+                { name: \"id\", type: \"integer\", control_type: \"number\" },\n+                { name: \"name\" }\n+              ] },\n+              { name: \"prospect_owner\", type: \"object\", properties: [\n+                { name: \"id\", type: \"integer\", control_type: \"number\" },\n+                { name: \"name\" }\n+              ] }\n+              # Custom_fields, keyed custom fields (prospect endpoint) missing.\n+            ] }\n+          ] },\n+          { name: \"educations\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"school_name\" },\n+            { name: \"degree\" },\n+            { name: \"discipline\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\",\n+              control_type: \"date_time\" }\n+          ] },\n+          { name: \"employments\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"company_name\" },\n+            { name: \"title\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\", control_type: \"date_time\" }\n+          ] },\n+          { name: \"custom_fields\", type: \"object\", properties: custom_fields }\n+          # Keyed custom fields\n+        ]\n+        standard_fields\n+      end\n+    },\n+\n+    add_prospect: {\n+      # https://developers.greenhouse.io/harvest.html#post-add-prospect\n+      fields: lambda do |_|\n+        custom_fields = get(\"/v1/custom_fields\").\n+                        params(field_type: \"candidate\").\n+                        select lambda do |e|\n+                          e[\"field_type\"] == \"candidate\" &&\n+                          e[\"private\"] == false &&\n+                          e[\"active\"] == true\n+                        end.\n+                        map do |field|\n+          type = field[\"value_type\"]\n+          case type\n+          when \"short_text\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"text\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"long_text\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"text-area\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"yes_no\"\n+            { name: field[\"name_key\"], type: \"boolean\",\n+              control_type: \"checkbox\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"date\"\n+            { name: field[\"name_key\"], type: \"date\",\n+              control_type: \"date\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"url\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"url\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"user\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"text\", label: field[\"name\"],\n+              optional: !field[\"required\"] }\n+          when \"single_select\"\n+            select_values = field[\"custom_field_options\"].\n+                            map do |ob|\n+                              [ob[\"name\"], ob[\"name\"]]\n+                            end\n+            { name: field[\"name_key\"], control_type: \"select\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: select_values,\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: false,\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"multi_select\"\n+            multiselect_values = field[\"custom_field_options\"].\n+                                 map do |ob|\n+                                   [ob[\"name\"], ob[\"name\"]]\n+                                 end\n+            { name: field[\"name_key\"], control_type: \"multiselect\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: multiselect_values,\n+              pick_list_params: {},\n+              delimiter: \",\",\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          else\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          end\n+        end\n+\n+        standard_fields = [\n+          { name: \"first_name\", optional: false },\n+          { name: \"last_name\", optional: false },\n+          { name: \"company\",\n+            hint: \"The company at which the candidate currently works\" },\n+          { name: \"title\", hint: \"The candidate’s current title\" },\n+          { name: \"is_private\", type: \"boolean\", control_type: \"checkbox\" },\n+          { name: \"phone_numbers\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"phone_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"address_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"email_addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\", control_type: \"email\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"email_type\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"website_addresses\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"value\" },\n+              { name: \"type\",\n+                control_type: \"select\",\n+                pick_list: \"website_type\",\n+                toggle_hint: \"Select from list\",\n+                toggle_field: {\n+                  name: \"type\",\n+                  label: \"type\",\n+                  type: \"string\",\n+                  control_type: \"text\",\n+                  toggle_hint: \"Use custom value\"\n+                } }\n+            ] },\n+          { name: \"social_media_addresses\", type: \"object\", properties: [\n+            { name: \"value\" }\n+          ] },\n+          { name: \"source\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"public_name\" }\n+          ] },\n+          { name: \"educations\", type: \"array\", of: \"object\", properties: [\n+            { name: \"school_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"discipline_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"degree_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\", control_type: \"date_time\" }\n+          ] },\n+          { name: \"employments\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"company_name\" },\n+            { name: \"title\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\", control_type: \"date_time\" }\n+          ] },\n+          { name: \"tags\", type: \"array\", of: \"string\", properties: [] },\n+          { name: \"application\", type: \"object\", properties: [\n+            { name: \"job_ids\", type: \"array\", of: \"integer\",\n+              control_type: \"number\" },\n+            { name: \"source_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"referrer\", type: \"object\", properties: [\n+              { name: \"type\" },\n+              { name: \"value\", type: \"integer\", control_type: \"number\" }\n+            ] }\n+          ] },\n+          { name: \"custom_fields\", type: \"object\", properties: custom_fields },\n+          { name: \"recruiter\", type: \"object\", properties: [\n+            { name: \"id\", label: \"ID\", type: \"integer\", control_type: \"number\",\n+              hint: \"Either ID or email must be present\" },\n+            { name: \"email\", type: \"string\", control_type: \"email\",\n+              hint: \"Either ID or email must be present\" }\n+          ] },\n+          { name: \"coordinator\", type: \"object\", properties: [\n+            { name: \"id\", label: \"ID\", type: \"integer\", control_type: \"number\",\n+              hint: \"Either ID or email must be present\" },\n+            { name: \"email\", type: \"string\", control_type: \"email\",\n+              hint: \"Either ID or email must be present\" }\n+          ] },\n+          { name: \"activity_feed_notes\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"notes\", type: \"array\", of: \"object\", properties: [\n+                { name: \"id\", label: \"Note Id\" },\n+                { name: \"created_at\", type: \"date_time\",\n+                  control_type: \"date_time\" },\n+                { name: \"body\", type: \"string\", control_type: \"text-area\" },\n+                { name: \"user\", type: \"object\", properties: [\n+                  { name: \"id\", type: \"integer\", control_type: \"number\" },\n+                  { name: \"first_name\" },\n+                  { name: \"last_name\" },\n+                  { name: \"name\" },\n+                  { name: \"employee_id\" }\n+                ] },\n+                { name: \"private\", type: \"boolean\", control_type: \"checkbox\" },\n+                { name: \"visibility\" }\n+              ] }\n+            ] }\n+        ]\n+        standard_fields\n+      end\n+    },\n+\n+    create_candidate: {\n+      # https://developers.greenhouse.io/harvest.html#post-add-candidate\n+      fields: lambda do |_|\n+        custom_fields = get(\"/v1/custom_fields/candidate\").\n+                        select lambda do |e|\n+                          e[\"field_type\"] == \"candidate\" &&\n+                          e[\"private\"] == false &&\n+                          e[\"active\"] == true\n+                        end.\n+                        map do |field|\n+          type = field[\"value_type\"]\n+          case type\n+          when \"short_text\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"long_text\"\n+            { name: field[\"name_key\"], type: \"string\",\n+              control_type: \"text-area\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"yes_no\"\n+            { name: field[\"name_key\"], type: \"boolean\",\n+              control_type: \"checkbox\", label: field[\"name\"],\n+              optional: !field[\"required\"], toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"date\"\n+            { name: field[\"name_key\"], type: \"date\", control_type: \"date\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"url\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"url\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"user\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"single_select\"\n+            select_values = field[\"custom_field_options\"].\n+                            map do |ob|\n+                              [ob[\"name\"], ob[\"name\"]]\n+                            end\n+            { name: field[\"name_key\"], control_type: \"select\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: select_values,\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"multi_select\"\n+            multiselect_values = field[\"custom_field_options\"].\n+                                 map do |ob|\n+                                   [ob[\"name\"], ob[\"name\"]]\n+                                 end\n+            puts multiselect_values\n+            { name: field[\"name_key\"], control_type: \"multiselect\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: multiselect_values,\n+              pick_list_params: {},\n+              delimiter: \",\",\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          else\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          end\n+        end\n+\n+        standard_fields = [\n+          { name: \"first_name\" },\n+          { name: \"last_name\" },\n+          { name: \"company\",\n+            hint: \"The company at which the candidate currently works\" },\n+          { name: \"title\", hint: \"The candidate’s current title\" },\n+          { name: \"is_private\",\n+            type: \"boolean\",\n+            control_type: \"checkbox\",\n+            toggle_hint: \"Select from list\",\n+            toggle_field: {\n+              name: \"is_private\",\n+              label: \"type\",\n+              type: \"string\",\n+              control_type: \"text\",\n+              toggle_hint: \"Use custom value\",\n+              hint: \"Possible values: <code>true</code> / <code>false</code> \"\n+            } },\n+          { name: \"phone_numbers\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"phone_type\",\n+              hint: \"Type is required when you pass value\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                hint: \"Type is required when you pass value\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"address_type\",\n+              hint: \"Type is required when you pass value\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                hint: \"Type is required when you pass value\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"email_addresses\", type: \"array\", of: \"object\", properties: [\n+            { name: \"value\" },\n+            { name: \"type\",\n+              control_type: \"select\",\n+              pick_list: \"email_type\",\n+              hint: \"Type is required when you pass value\",\n+              toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"type\",\n+                label: \"type\",\n+                type: \"string\",\n+                control_type: \"text\",\n+                hint: \"Type is required when you pass value\",\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          ] },\n+          { name: \"website_addresses\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"value\" },\n+              { name: \"type\",\n+                control_type: \"select\",\n+                pick_list: \"website_type\",\n+                hint: \"Type is required when you pass value\",\n+                toggle_hint: \"Select from list\",\n+                toggle_field: {\n+                  name: \"type\",\n+                  label: \"type\",\n+                  type: \"string\",\n+                  control_type: \"text\",\n+                  hint: \"Type is required when you pass value\",\n+                  toggle_hint: \"Use custom value\"\n+                } }\n+            ] },\n+          { name: \"social_media_addresses\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"value\" }\n+            ] },\n+          { name: \"educations\", type: \"array\", of: \"object\", properties: [\n+            { name: \"school_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"discipline_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"degree_id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\", control_type: \"date_time\" }\n+          ] },\n+          { name: \"employments\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"company_name\" },\n+            { name: \"title\" },\n+            { name: \"start_date\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"end_date\", type: \"date_time\", control_type: \"date_time\" }\n+          ] },\n+          { name: \"tags\", type: \"array\", of: \"string\",\n+            hint: \"provide comma separated list of tags\" },\n+          { name: \"recruiter\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\",\n+              hint: \"Either ID or email must be present\" },\n+            { name: \"email\",\n+              hint: \"Either ID or email must be present\" }\n+          ] },\n+          { name: \"coordinator\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"email\" }\n+          ] },\n+          { name: \"applications\", optional: false, type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"job_id\", optional: false, type: \"integer\",\n+                control_type: \"number\" }\n+            ] },\n+          { name: \"custom_fields\", type: \"object\", properties: custom_fields }\n+          # Custom_fields[]\n+        ]\n+        standard_fields\n+      end\n+    },\n+\n+    application: {\n+      fields: lambda do |_|\n+        standard_fields = [\n+          { name: \"id\", label: \"Application ID\" },\n+          { name: \"candidate_id\", type: \"integer\", control_type: \"number\" },\n+          { name: \"prospect\", type: \"boolean\", control_type: \"checkbox\",\n+            toggle_hint: \"Select from list\",\n+            toggle_field: {\n+              name: \"prospect\",\n+              label: \"Prospect\",\n+              type: :string,\n+              control_type: \"text\",\n+              optional: true,\n+              toggle_hint: \"Use custom value\"\n+            } },\n+          { name: \"applied_at\", type: \"date_time\", control_type: \"date_time\" },\n+          { name: \"rejected_at\", type: \"date_time\",\n+            control_type: \"date_time\" },\n+          { name: \"last_activity_at\", type: \"date_time\",\n+            control_type: \"date_time\" },\n+          { name: \"location\", type: \"object\", properties: [\n+            { name: \"address\" }\n+          ] },\n+          { name: \"source\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"public_name\" }\n+          ] },\n+          { name: \"credited_to\", type: \"object\", properties: [\n+            { name: \"id\", label: \"User ID\", type: \"integer\",\n+              control_type: \"number\" },\n+            { name: \"first_name\" },\n+            { name: \"last_name\" },\n+            { name: \"name\" },\n+            { name: \"employee_id\" }\n+          ] },\n+          { name: \"rejection_reason\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"name\" },\n+            { name: \"type\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] }\n+          ] },\n+          # Rejection details\n+          { name: \"jobs\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"name\" }\n+          ] },\n+          { name: \"status\", control_type: \"select\",\n+            pick_list: [\n+              %w[Active active],\n+              %w[Rejected rejected],\n+              %w[Hired hired]\n+            ],\n+            toggle_hint: \"Select from list\",\n+            toggle_field: {\n+              name: \"status\",\n+              label: \"Status\",\n+              type: :string,\n+              control_type: \"text\",\n+              optional: true,\n+              toggle_hint: \"Use custom value\"\n+            } },\n+          { name: \"current_stage\", type: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"name\" }\n+          ] },\n+          { name: \"answers\", type: \"array\", of: \"object\", properties: [\n+            { name: \"question\" },\n+            { name: \"answer\" }\n+          ] },\n+          { name: \"prospect_detail\", type: \"object\", properties: [\n+            { name: \"prospect_pool\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] },\n+            { name: \"prospect_stage\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] },\n+            { name: \"prospect_owner\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"name\" }\n+            ] }\n+          ] }\n+          # Custom Field\n+          # Keyed_custom_fields\n+        ]\n+\n+        custom_fields = get(\"/v1/custom_fields/application\").\n+                        select lambda do |e|\n+                          e[\"field_type\"] == \"application\" &&\n+                          e[\"private\"] == false &&\n+                          e[\"active\"] == true\n+                        end.\n+                        map do |field|\n+          type = field[\"value_type\"]\n+          case type\n+          when \"short_text\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"long_text\"\n+            { name: field[\"name_key\"], type: \"string\", label: field[\"name\"],\n+              control_type: \"text-area\", optional: !field[\"required\"] }\n+          when \"yes_no\"\n+            { name: field[\"name_key\"], type: \"boolean\",\n+              control_type: \"checkbox\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"date\"\n+            { name: field[\"name_key\"], type: \"date\", control_type: \"date\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"url\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"url\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"user\"\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          when \"single_select\"\n+            select_values = field[\"custom_field_options\"].\n+                            map do |ob|\n+                              [ob[\"name\"], ob[\"name\"]]\n+                            end\n+            { name: field[\"name_key\"], control_type: \"select\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: select_values,\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          when \"multi_select\"\n+            multiselect_values = field[\"custom_field_options\"].\n+                                 map do |ob|\n+                                   [ob[\"name\"], ob[\"name\"]]\n+                                 end\n+            { name: field[\"name_key\"], control_type: \"multiselect\",\n+              label: field[\"name\"], optional: !field[\"required\"],\n+              pick_list: multiselect_values,\n+              pick_list_params: {},\n+              delimiter: \",\",\n+              toggle_hint: field[\"name\"],\n+              toggle_field: {\n+                name: field[\"name_key\"],\n+                label: field[\"name\"],\n+                type: :string,\n+                control_type: \"text\",\n+                optional: !field[\"required\"],\n+                toggle_hint: \"Use custom value\"\n+              } }\n+          else\n+            { name: field[\"name_key\"], type: \"string\", control_type: \"text\",\n+              label: field[\"name\"], optional: !field[\"required\"] }\n+          end\n+        end\n+\n+        standard_fields.concat(custom_fields || []).compact\n+      end\n+    },\n+\n+    user: {\n+      fields: lambda do\n+        [\n+          { name: \"id\", type: \"integer\", control_type: \"number\" },\n+          { name: \"name\" },\n+          { name: \"first_name\" },\n+          { name: \"last_name\" },\n+          { name: \"updated_at\", type: \"date_time\", control_type: \"date_time\" },\n+          { name: \"created_at\", type: \"date_time\", control_type: \"date_time\" },\n+          { name: \"disabled\", type: \"boolean\", control_type: \"checkbox\" },\n+          { name: \"site_admin\", type: \"boolean\", control_type: \"checkbox\" },\n+          { name: \"emails\", type: \"array\", of: \"string\",\n+            control_type: \"email\" },\n+          { name: \"employee_id\" }\n+        ]\n+      end\n+    },\n+\n+    add_education: {\n+      fields: lambda do\n+        [\n+          { name: \"school_id\", type: \"integer\", control_type: \"number\",\n+            optional: false },\n+          { name: \"discipline_id\", type: \"integer\", control_type: \"number\",\n+            optional: false },\n+          { name: \"degree_id\", type: \"integer\", control_type: \"number\",\n+            optional: false },\n+          { name: \"start_date\", type: \"date_time\", control_type: \"date_time\",\n+            optional: false,\n+            hint: \"Timestamp must be in in ISO-8601 format.\" },\n+          { name: \"end_date\", type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format.\" }\n+        ]\n+      end\n+    },\n+\n+    education_response: {\n+      fields: lambda do\n+        [\n+          { name: \"id\", type: \"integer\" },\n+          { name: \"school_name\" },\n+          { name: \"discipline\" },\n+          { name: \"degree\" },\n+          { name: \"start_date\", type: \"date_time\" },\n+          { name: \"end_date\", type: \"date_time\" }\n+        ]\n+      end\n+    },\n+\n+    employment: {\n+      fields: lambda do\n+        [\n+          { name: \"id\", type: \"integer\", control_type: \"number\" },\n+          { name: \"company_name\", optional: false },\n+          { name: \"title\", optional: false },\n+          { name: \"start_date\", type: \"date_time\", control_type: \"date_time\",\n+            optional: false, hint: \"Timestamp must be in in ISO-8601 format\" },\n+          { name: \"end_date\", type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format\" }\n+        ]\n+      end\n+    },\n+\n+    activity_feed: {\n+      fields: lambda do\n+        [\n+          { name: \"notes\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", label: \"Note Id\" },\n+            { name: \"created_at\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"body\", type: \"string\", control_type: \"text-area\" },\n+            { name: \"user\", type: \"object\", properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"first_name\" },\n+              { name: \"last_name\" },\n+              { name: \"name\" },\n+              { name: \"employee_id\" }\n+            ] },\n+            { name: \"private\", type: \"boolean\", control_type: \"checkbox\" },\n+            { name: \"visibility\" }\n+          ] },\n+          { name: \"emails\", type: \"array\", of: \"object\",\n+            properties: [\n+              { name: \"id\", type: \"integer\", control_type: \"number\" },\n+              { name: \"created_at\", type: \"date_time\",\n+                control_type: \"date_time\" },\n+              { name: \"to\" },\n+              { name: \"from\" },\n+              { name: \"cc\" },\n+              { name: \"subject\" },\n+              { name: \"body\" },\n+              { name: \"user\", type: \"object\", properties: [\n+                { name: \"id\" },\n+                { name: \"first_name\" },\n+                { name: \"last_name\" },\n+                { name: \"name\" },\n+                { name: \"employee_id\" }\n+              ] }\n+            ] },\n+          { name: \"activities\", type: \"array\", of: \"object\", properties: [\n+            { name: \"id\", type: \"integer\", control_type: \"number\" },\n+            { name: \"created_at\", type: \"date_time\",\n+              control_type: \"date_time\" },\n+            { name: \"subject\" },\n+            { name: \"body\" },\n+            { name: \"user\", type: \"object\", properties: [\n+              { name: \"id\" },\n+              { name: \"first_name\" },\n+              { name: \"last_name\" },\n+              { name: \"name\" },\n+              { name: \"employee_id\" }\n+            ] }\n+          ] }\n+        ]\n+      end\n+    }\n+  },\n+\n+  test: lambda do |_connection|\n+    get(\"/v1/users\").params(per_page: 1)\n+  end,\n+\n+  methods: {\n+    on_behalf_of: lambda { |input|\n+      (get(\"/v1/users\").\n+        params(per_page: 1,\n+               email: input) || {}) [\"id\"]\n+    }\n+  },\n+\n+  actions: {\n+    search_candidate: {\n+      description: \"Search <span class='provider'>candidates</span> in \" \\\n+        \"<span class='provider'>Greenhouse</span>\",\n+      title: \"Search candidates in Greenhouse\",\n+      help: \"Fetches a list of candidates that matches the search criteria.\" \\\n+        \"Returns a maximum of 100 records.\",\n+\n+      input_fields: lambda do |_object_definitions|\n+        [\n+          # Check job id?\n+          { name: \"job_id\", type: \"integer\", control_type: \"number\",\n+            hint: \"If supplied, returns only candidates that have applied \" \\\n+              \"to this job. Returns both when a candidate has applied to \" \\\n+              \"a job and when they're a prospect of a job\" },\n+          { name: \"email\", control_type: \"email\" },\n+          { name: \"candidate_ids\",\n+            hint: \"If supplied, returns only the candidates with the given \" \\\n+              \"ids. When combined with job ID, only candidates with an \" \\\n+              \"application on the job will be returned. \" \\\n+              \"Returns a maximum of 50 records\" },\n+          { name: \"created_before\",\n+            type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format\" },\n+          { name: \"created_after\",\n+            type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format\" },\n+          { name: \"updated_before\",\n+            type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format\" },\n+          { name: \"updated_after\",\n+            type: \"date_time\", control_type: \"date_time\",\n+            hint: \"Timestamp must be in in ISO-8601 format\" }\n+        ]\n+      end,\n+\n+      execute: lambda do |_connection, input|\n+        error(\"Provide at least one search criteria\") if input.blank?\n+        {\n+          candidates: get(\"/v1/candidates\", input)\n+        }\n+      end,\n+\n+      output_fields: lambda do |object_definitions|\n+        { name: \"candidates\", type: \"array\", of: \"object\",\n+          properties: object_definitions[\"candidate\"] }\n+      end\n+    },\n+\n+    get_candidate: {\n+      description: \"Get <span class='provider'>candidate</span> by \" \\\n+        \"ID in <span class='provider'>Greenhouse</span>\",\n+      title: \"Get candidate details by ID in Greenhouse\",\n+      help: \"Returns information about a candidate.\",\n+\n+      input_fields: lambda do |_object_definitions|\n+        [\n+          { name: \"id\", optional: false, type: \"integer\",\n+            control_type: \"number\", label: \"Candidate ID\" }\n+        ]\n+      end,\n+\n+      execute: lambda do |_connection, input|\n+        get(\"/v1/candidates/\" + input[\"id\"])\n+      end,\n+\n+      output_fields: lambda do |object_definitions|\n+        object_definitions[\"candidate\"]\n+      end\n+    },\n+\n+    create_candidate: {\n+      description: \"Create <span class='provider'>candidate</span> in \" \\\n+        \"<span class='provider'>Greenhouse</span>\",\n+      title: \"Create candidate in Greenhouse\",\n+\n+      input_fields: lambda do |object_definitions|\n+        object_definitions[\"create_candidate\"].\n+          required(\"first_name\", \"last_name\", \"applications\")\n+      end,\n+\n+      execute: lambda do |connection, input|\n+        on_behalf_of = (get(\"/v1/users\").\n+            params(per_page: 1, email: connection[\"usermail\"]) || {})[\"id\"]\n+\n+        params = input.map do |key, value|\n+          if key.include?(\"custom_fields\")\n+            custom_field = value.map do |k, v|\n+              {\n+                \"name_key\" => k,\n+                \"value\" => v\n+              }\n+            end\n+            { key => custom_field }\n+          else\n+            { key => value }\n+          end\n+        end.inject(:merge)\n+\n+        post(\"/v1/candidates\").\n+          headers(\"On-Behalf-Of\": on_behalf_of).payload(params)\n+      end,\n+\n+      output_fields: lambda do |object_definitions|\n+        object_definitions[\"candidate\"]\n+      end\n+    },\n+\n+    update_candidate: {\n+      description: \"Update <span class='provider'>Candidate</span> in \" \\\n+      \"<span class='provider'> Greenhouse</span>\",\n+      title: \"Update candidate in Greenhouse\",\n+\n+      input_fields: lambda do |object_definitions|\n+        [\n+          { name: \"id\", type: \"integer\", control_type: \"number\",\n+            optional: false,\n+            label: \"Candidate ID\" }\n+        ].concat(object_definitions[\"create_candidate\"])\n+      end,\n+\n+      execute: lambda do |connection, input|\n+        patch(\"/v1/candidates/\" + input.delete(\"id\")).\n+          headers(\n+            \"On-Behalf-Of\": call(\"on_behalf_of\", connection[\"usermail\"])\n+          ).payload(input)\n+      end,\n+\n+      output_fields: lambda do |object_definitions|\n+        object_definitions[\"candidate\"]\n+      end\n+    },\n+\n+    add_candidate_application: {\n+      description: \"Create a new <span class='provider'>application</span> \" \\\n+        \"for candidate / prospect in <span class='provider'>Greenhouse</span>\",\n+      title: \"Create new application\",\n+      help: \"If candidate is a prospect, a new candidate application will be\" \\\n+        \" added to their profile. It will not convert their existing \" \\\n+        \"prospect application into candidate application.\",\n+\n+      input_fields: lambda do |_object_definitions|\n+        [\n+          { name: \"id\", type: \"integer\", control_type: \"number\",\n+            optional: false, label: \"Candidate ID\" },\n+          { name: \"job_id\", type: \"array\", of: \"integer\",\n+            control_type: \"number\", optional: false },\n+          { name: \"source_id\", type: \"integer\", control_type: \"number\" },\n+          { name: \"initial_stage_id\", type: \"integer\",\n+            control_type: \"number\" },\n+          { name: \"referrer\", type: \"object\", properties: [\n+            { name: \"type\", label: \"Type\", control_type: :select, pick_list:\n+              [\n+                %w[ID id],\n+                %w[Email email],\n+                %w[Outside outside]\n+              ],\n+              optional: true, toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"referrer\",\n+                label: \"referrer\",\n+                type: :string,\n+                control_type: \"text\",\n+                optional: true,\n+                toggle_hint: \"Use custom value\"\n+              } },\n+            { name: \"value\" }\n+          ] },\n+          { name: \"attachments\", type: \"array\", of: \"object\", properties: [\n+            { name: \"filename\", optional: false,\n+              hint: \"Full name of file including its extension, \" \\\n+                \"e.g. resume.pdf\" },\n+            { name: \"type\", label: \"Type\", control_type: :select, pick_list:\n+              [\n+                %w[Resume resume],\n+                %w[Cover\\ letter cover_letter],\n+                %w[Admin\\ only admin_only]\n+              ],\n+              optional: false, toggle_hint: \"Select from list\",\n+              toggle_field: {\n+                name: \"referrer\",\n+                label: \"referrer\",\n+                type: :string,\n+                control_type: \"text\",\n+                optional: false,\n+                toggle_hint: \"Use custom value\",\n+                hint: \"Possible values: resume, cover_letter, or admin_only\"\n+              } },\n+            { name: \"content\", hint: \"Base64 encoded contents of attachment\" },\n+            { name: \"content_type\",\n+              hint: \"Recommended to specify. Find out more <a href='https://\" \\\n+                \"developers.greenhouse.io/harvest.html#post-add-attachment'>\" \\\n+                \"here</a>\" }\n+          ] }\n+        ]\n+      end,\n+\n+      execute: lambda do |connection, input|\n+        post(\"/v1/candidates/\" + input.delete(\"id\") + \"/applications\").\n+          headers(\n+            \"On-Behalf-Of\": call(\"on_behalf_of\", connection[\"usermail\"])\n+          ).\n+          payload(input)\n+      end,\n+\n+      output_fields: lambda do |object_definitions|\n+        object_definitions[\"candidate\"]\n+      end\n+    },\n+\n+    search_applications: {\n+      description: \"Search <span class='provider'>applications</span> in \" \\\n+        \"<span class='provider'>Greenhouse</span>\",\n+      title: \"Search applications in Greenhouse\",\n+      help: \"Fetches a list of applications that matches the search criteria\" \\\n+        \". Returns a maximum of 100 records.\",\n+\n+      input_fields: lambda do |_object_definitions|","path":"api_key_auth/greenhouse_connector.rb","position":1249,"original_position":1249,"commit_id":"69b1bcf1336691c0f3007393fb3094617f1c7b02","original_commit_id":"69b1bcf1336691c0f3007393fb3094617f1c7b02","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Metrics/BlockLength: Block has too many lines. [33/25]","created_at":"2018-07-30T17:08:54Z","updated_at":"2018-07-30T17:08:57Z","html_url":"https://github.com/workato/connector_sdk/pull/175#discussion_r206250613","pull_request_url":"https://api.github.com/repos/workato/connector_sdk/pulls/175","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/comments/206250613"},"html":{"href":"https://github.com/workato/connector_sdk/pull/175#discussion_r206250613"},"pull_request":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/workato/connector_sdk/pulls/175","id":204870501,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0ODcwNTAx","html_url":"https://github.com/workato/connector_sdk/pull/175","diff_url":"https://github.com/workato/connector_sdk/pull/175.diff","patch_url":"https://github.com/workato/connector_sdk/pull/175.patch","issue_url":"https://api.github.com/repos/workato/connector_sdk/issues/175","number":175,"state":"open","locked":false,"title":"Greenhouse SDK - Initial Commit","user":{"login":"brendonyang","id":39894932,"node_id":"MDQ6VXNlcjM5ODk0OTMy","avatar_url":"https://avatars1.githubusercontent.com/u/39894932?v=4","gravatar_id":"","url":"https://api.github.com/users/brendonyang","html_url":"https://github.com/brendonyang","followers_url":"https://api.github.com/users/brendonyang/followers","following_url":"https://api.github.com/users/brendonyang/following{/other_user}","gists_url":"https://api.github.com/users/brendonyang/gists{/gist_id}","starred_url":"https://api.github.com/users/brendonyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendonyang/subscriptions","organizations_url":"https://api.github.com/users/brendonyang/orgs","repos_url":"https://api.github.com/users/brendonyang/repos","events_url":"https://api.github.com/users/brendonyang/events{/privacy}","received_events_url":"https://api.github.com/users/brendonyang/received_events","type":"User","site_admin":false},"body":"Triggers:\r\n- [ ] New or updated candidate in Greenhouse \r\n\r\nActions:\r\n- [ ] Create new application \r\n- [ ] Add note to candidate \r\n- [ ] Add Education to candidate \r\n- [ ] Add email note to candidate \r\n- [ ] Add employment to candidate \r\n- [ ] Add Prospect \r\n- [ ] Create candidate in Greenhouse \r\n- [ ] Create user in Greenhouse \r\n- [ ] Get candidate by ID in Greenhouse \r\n- [ ] Get candidate activity feed \r\n- [ ] List degrees \r\n- [ ] List disciplines \r\n- [ ] List schools \r\n- [ ] Search applications in Greenhouse \r\n- [ ] Search candidates in Greenhouse \r\n- [ ] Search users in Greenhouse \r\n- [ ] Update candidate in Greenhouse","created_at":"2018-07-30T17:08:42Z","updated_at":"2018-07-30T17:08:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a75e9c578d7ecb1b96eb339c52315c86b238fb0","assignee":{"login":"brendonyang","id":39894932,"node_id":"MDQ6VXNlcjM5ODk0OTMy","avatar_url":"https://avatars1.githubusercontent.com/u/39894932?v=4","gravatar_id":"","url":"https://api.github.com/users/brendonyang","html_url":"https://github.com/brendonyang","followers_url":"https://api.github.com/users/brendonyang/followers","following_url":"https://api.github.com/users/brendonyang/following{/other_user}","gists_url":"https://api.github.com/users/brendonyang/gists{/gist_id}","starred_url":"https://api.github.com/users/brendonyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendonyang/subscriptions","organizations_url":"https://api.github.com/users/brendonyang/orgs","repos_url":"https://api.github.com/users/brendonyang/repos","events_url":"https://api.github.com/users/brendonyang/events{/privacy}","received_events_url":"https://api.github.com/users/brendonyang/received_events","type":"User","site_admin":false},"assignees":[{"login":"brendonyang","id":39894932,"node_id":"MDQ6VXNlcjM5ODk0OTMy","avatar_url":"https://avatars1.githubusercontent.com/u/39894932?v=4","gravatar_id":"","url":"https://api.github.com/users/brendonyang","html_url":"https://github.com/brendonyang","followers_url":"https://api.github.com/users/brendonyang/followers","following_url":"https://api.github.com/users/brendonyang/following{/other_user}","gists_url":"https://api.github.com/users/brendonyang/gists{/gist_id}","starred_url":"https://api.github.com/users/brendonyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendonyang/subscriptions","organizations_url":"https://api.github.com/users/brendonyang/orgs","repos_url":"https://api.github.com/users/brendonyang/repos","events_url":"https://api.github.com/users/brendonyang/events{/privacy}","received_events_url":"https://api.github.com/users/brendonyang/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":699880066,"node_id":"MDU6TGFiZWw2OTk4ODAwNjY=","url":"https://api.github.com/repos/workato/connector_sdk/labels/S1-development","name":"S1-development","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/workato/connector_sdk/pulls/175/commits","review_comments_url":"https://api.github.com/repos/workato/connector_sdk/pulls/175/comments","review_comment_url":"https://api.github.com/repos/workato/connector_sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/workato/connector_sdk/issues/175/comments","statuses_url":"https://api.github.com/repos/workato/connector_sdk/statuses/69b1bcf1336691c0f3007393fb3094617f1c7b02","head":{"label":"workato:Greenhouse-SDK---Brendon","ref":"Greenhouse-SDK---Brendon","sha":"69b1bcf1336691c0f3007393fb3094617f1c7b02","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":54221993,"node_id":"MDEwOlJlcG9zaXRvcnk1NDIyMTk5Mw==","name":"connector_sdk","full_name":"workato/connector_sdk","owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/workato/connector_sdk","description":"Connector SDK samples and documentation","fork":false,"url":"https://api.github.com/repos/workato/connector_sdk","forks_url":"https://api.github.com/repos/workato/connector_sdk/forks","keys_url":"https://api.github.com/repos/workato/connector_sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/connector_sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/connector_sdk/teams","hooks_url":"https://api.github.com/repos/workato/connector_sdk/hooks","issue_events_url":"https://api.github.com/repos/workato/connector_sdk/issues/events{/number}","events_url":"https://api.github.com/repos/workato/connector_sdk/events","assignees_url":"https://api.github.com/repos/workato/connector_sdk/assignees{/user}","branches_url":"https://api.github.com/repos/workato/connector_sdk/branches{/branch}","tags_url":"https://api.github.com/repos/workato/connector_sdk/tags","blobs_url":"https://api.github.com/repos/workato/connector_sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/connector_sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/connector_sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/connector_sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/connector_sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/connector_sdk/languages","stargazers_url":"https://api.github.com/repos/workato/connector_sdk/stargazers","contributors_url":"https://api.github.com/repos/workato/connector_sdk/contributors","subscribers_url":"https://api.github.com/repos/workato/connector_sdk/subscribers","subscription_url":"https://api.github.com/repos/workato/connector_sdk/subscription","commits_url":"https://api.github.com/repos/workato/connector_sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/connector_sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/connector_sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/connector_sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/connector_sdk/contents/{+path}","compare_url":"https://api.github.com/repos/workato/connector_sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/connector_sdk/merges","archive_url":"https://api.github.com/repos/workato/connector_sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/connector_sdk/downloads","issues_url":"https://api.github.com/repos/workato/connector_sdk/issues{/number}","pulls_url":"https://api.github.com/repos/workato/connector_sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/connector_sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/connector_sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/connector_sdk/labels{/name}","releases_url":"https://api.github.com/repos/workato/connector_sdk/releases{/id}","deployments_url":"https://api.github.com/repos/workato/connector_sdk/deployments","created_at":"2016-03-18T18:08:56Z","updated_at":"2018-07-27T16:55:51Z","pushed_at":"2018-07-30T17:08:41Z","git_url":"git://github.com/workato/connector_sdk.git","ssh_url":"git@github.com:workato/connector_sdk.git","clone_url":"https://github.com/workato/connector_sdk.git","svn_url":"https://github.com/workato/connector_sdk","homepage":"","size":2348,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":57,"license":null,"forks":38,"open_issues":57,"watchers":14,"default_branch":"master"}},"base":{"label":"workato:master","ref":"master","sha":"498b3d74cfc8ca947474e04ab2cdb02803587f03","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":54221993,"node_id":"MDEwOlJlcG9zaXRvcnk1NDIyMTk5Mw==","name":"connector_sdk","full_name":"workato/connector_sdk","owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/workato/connector_sdk","description":"Connector SDK samples and documentation","fork":false,"url":"https://api.github.com/repos/workato/connector_sdk","forks_url":"https://api.github.com/repos/workato/connector_sdk/forks","keys_url":"https://api.github.com/repos/workato/connector_sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/connector_sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/connector_sdk/teams","hooks_url":"https://api.github.com/repos/workato/connector_sdk/hooks","issue_events_url":"https://api.github.com/repos/workato/connector_sdk/issues/events{/number}","events_url":"https://api.github.com/repos/workato/connector_sdk/events","assignees_url":"https://api.github.com/repos/workato/connector_sdk/assignees{/user}","branches_url":"https://api.github.com/repos/workato/connector_sdk/branches{/branch}","tags_url":"https://api.github.com/repos/workato/connector_sdk/tags","blobs_url":"https://api.github.com/repos/workato/connector_sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/connector_sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/connector_sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/connector_sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/connector_sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/connector_sdk/languages","stargazers_url":"https://api.github.com/repos/workato/connector_sdk/stargazers","contributors_url":"https://api.github.com/repos/workato/connector_sdk/contributors","subscribers_url":"https://api.github.com/repos/workato/connector_sdk/subscribers","subscription_url":"https://api.github.com/repos/workato/connector_sdk/subscription","commits_url":"https://api.github.com/repos/workato/connector_sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/connector_sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/connector_sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/connector_sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/connector_sdk/contents/{+path}","compare_url":"https://api.github.com/repos/workato/connector_sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/connector_sdk/merges","archive_url":"https://api.github.com/repos/workato/connector_sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/connector_sdk/downloads","issues_url":"https://api.github.com/repos/workato/connector_sdk/issues{/number}","pulls_url":"https://api.github.com/repos/workato/connector_sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/connector_sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/connector_sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/connector_sdk/labels{/name}","releases_url":"https://api.github.com/repos/workato/connector_sdk/releases{/id}","deployments_url":"https://api.github.com/repos/workato/connector_sdk/deployments","created_at":"2016-03-18T18:08:56Z","updated_at":"2018-07-27T16:55:51Z","pushed_at":"2018-07-30T17:08:41Z","git_url":"git://github.com/workato/connector_sdk.git","ssh_url":"git@github.com:workato/connector_sdk.git","clone_url":"https://github.com/workato/connector_sdk.git","svn_url":"https://github.com/workato/connector_sdk","homepage":"","size":2348,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":57,"license":null,"forks":38,"open_issues":57,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/175"},"html":{"href":"https://github.com/workato/connector_sdk/pull/175"},"issue":{"href":"https://api.github.com/repos/workato/connector_sdk/issues/175"},"comments":{"href":"https://api.github.com/repos/workato/connector_sdk/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/workato/connector_sdk/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/workato/connector_sdk/statuses/69b1bcf1336691c0f3007393fb3094617f1c7b02"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}