{"action":"created","comment":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/219737927","pull_request_review_id":157982813,"id":219737927,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTczNzkyNw==","diff_hunk":"@@ -1,530 +1,818 @@\n {\n- title: 'Bigtincan Hub',\n+  title: 'Bigtincan Hub',\n \n- connection: {\n-\n-    fields: [\n-      { name: 'account_id', optional: false, hint: 'Your Pub API account ID' }\n-    ],\n+  connection: {\n \n     authorization: {\n-     type: 'oauth2',\n+      type: 'oauth2',\n \n-    authorization_url: ->() {\n-     'https://pubapi.bigtincan.com/services/oauth/authorize?response_type=code&device_id=hub_auth'\n-    },\n+      authorization_url: - > () {\n+        'https://pubapi.bigtincan.com/services/oauth2/authorize?response_type=code&device_id=hub_auth'\n+      },\n \n-    token_url: ->() {\n-     'https://pubapi.bigtincan.com/services/oauth/token'\n-    },\n+      token_url: - > () {\n+        'https://pubapi.bigtincan.com/services/oauth2/token'\n+      },\n \n-    client_id: 'pa_wkt-btc_zHSFfb',\n+      client_id     : 'REPLACE_WITH_CLIENT_ID',\n \n-    client_secret: '59aed30fac72e7fade0a',\n+      client_secret : 'REPLACE_WITH_CLIENT_SECRET',\n \n-    credentials: ->(connection, access_token) {\n+      credentials: - > (connection, access_token) {\n         headers('Authorization': \"Bearer #{access_token}\")\n+      }\n     }\n-  }\n-},\n+  },\n \n   object_definitions: {\n \n     channel: {\n \n-      fields: ->() {\n-        [\n-          { name: 'id', type: 'string' },\n-          { name: 'name', type: 'string' },\n-          { name: 'channel_type', type: 'string' }\n+      fields: - > () {\n+        [{\n+            name: 'id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'name',\n+            type: 'string'\n+          },\n+          {\n+            name: 'channel_type',\n+            type: 'string'\n+          }\n         ]\n       }\n     },\n \n-\n     single_story: {\n-      fields: ->() {\n-        [\n-          { name: 'revision_id', type: 'string' },\n-          { name: 'perm_id', type: 'string' },\n-          { name: 'title', type: 'string'},\n-          { name: 'description', type: 'string'},\n-          { name: 'channels', type: :array, of: :object,\n-            properties: [\n-              { name: 'id', type: 'string'}\n-            ]\n+      fields: - > () {\n+        [{\n+            name: 'revision_id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'perm_id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'title',\n+            type: 'string'\n+          },\n+          {\n+            name: 'description',\n+            type: 'string'\n+          },\n+          {\n+            name: 'channels',\n+            type:: array,\n+            of:: object,\n+            properties: [{\n+              name: 'id',\n+              type: 'string'\n+            }]\n           }\n         ]\n       }\n-      },\n+    },\n \n     single_form: {\n-      fields: ->() {\n-        [\n-          { name: 'id', type: 'string' },\n-          { name: 'name', type: 'string' }\n+      fields: - > () {\n+        [{\n+            name: 'id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'name',\n+            type: 'string'\n+          }\n         ]\n       }\n \n     },\n \n     single_form_category: {\n \n-      fields: ->() {\n-        [\n-          { name: 'id', type: 'string' },\n-          { name: 'name', type: 'string' },\n-          { name: 'note', type: 'string' }\n+      fields: - > () {\n+        [{\n+            name: 'id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'name',\n+            type: 'string'\n+          },\n+          {\n+            name: 'note',\n+            type: 'string'\n+          }\n         ]\n       }\n     },\n \n     form_submission_data: {\n-      fields: ->(connection, config_fields) {\n-        [\n-          { name: 'submission_key', type: 'string' },\n-          { name: 'user_id', type: 'string' },\n-          { name: 'user_name', type: 'string' },\n-          { name: 'cursor', type: 'string' },\n-          { name: 'data', type: :object,\n-            properties:\n-              if config_fields['form_id'].present?\n-                fields = get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/get/#{config_fields['form_id']}\")['data']['form_data']['fields']\n-                fields.select { |field| field['label'].present? }.\n-                       map do |field|\n-                         {\n-                           name: field['label'].gsub(/[ ]/, '_'),\n-                           label: field['label'],\n-                           type: 'string'\n-                         }\n-                       end\n-              end\n+      fields: - > (connection, config_fields) {\n+        [{\n+            name: 'submission_key',\n+            type: 'string'\n+          },\n+          {\n+            name: 'user_id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'user_name',\n+            type: 'string'\n+          },\n+          {\n+            name: 'cursor',\n+            type: 'string'\n+          },\n+          {\n+            name: 'data',\n+            type:: object,\n+            properties: if config_fields['form_id'].present ?\n+            fields = get(\"https://pubapi.bigtincan.com/v1/form/get/#{config_fields['form_id']}\")['data']['form_data']['fields']\n+            fields.select { | field | field['label'].present ?\n+            }.\n+            map do |field | {\n+              name: field['label'].gsub(/[ ]/, '_'),\n+              label: field['label'],\n+              type: 'string'\n+            }\n+            end\n+            end\n           }\n         ]\n       }\n     }\n   },\n \n-  actions: {\n-   # form: form/data\n+  actions: {#\n+    form: form / data\n     get_form_data: {\n \n-      input_fields: ->() {\n-         [\n-           { name: 'form_id', optional: false },\n-           { name: 'page', optional: true },\n-           { name: 'limit', optional: true },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'form_id',\n+            optional: false\n+          },\n+          {\n+            name: 'page',\n+            optional: true\n+          },\n+          {\n+            name: 'limit',\n+            optional: true\n+          },\n+        ]\n       },\n \n-      execute: ->(connection, input) {\n-        if input['page'].blank?\n-             input['page'] = 1\n+      execute: - > (connection, input) {\n+        if input['page'].blank ?\n+          input['page'] = 1\n         end\n \n-        if input['limit'].blank?\n-             input['limit'] = 10\n+        if input['limit'].blank ?\n+          input['limit'] = 10\n         end\n \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/data/#{input['form_id']}\").params(page: input['page'], limit: input['limit'])['data']\n+        get(\"https://pubapi.bigtincan.com/v1/form/data/#{input['form_id']}\").params(page: input['page'], limit: input['limit'])['data']\n       },\n \n-      output_fields: ->(object_definitions) {\n-        [\n-         { name: 'columns', type: :array, of: :object,\n-           properties: [\n-               { name: 'columns', type: :array, of: :object },\n-             ]\n-         },\n-         { name: 'total_submissions', type: 'integer' },\n-         { name: 'submission_current_count', type: 'integer' },\n-         { name: 'submission_limit', type: 'integer'},\n-         { name: 'submission_page', type: 'integer' },\n-         { name: 'submission_next_page', type: 'integer' },\n-         { name: 'submission_prev_page', type: 'integer' },\n-         { name: 'submissions', type: :array, of: :object, properties: object_definitions['form_submission_data'] }\n-         ]\n-       }\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'columns',\n+            type:: array,\n+            of:: object,\n+            properties: [{\n+              name: 'columns',\n+              type:: array,\n+              of:: object\n+            }, ]\n+          },\n+          {\n+            name: 'total_submissions',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submission_current_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submission_limit',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submission_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submission_next_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submission_prev_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'submissions',\n+            type:: array,\n+            of:: object,\n+            properties: object_definitions['form_submission_data']\n+          }\n+        ]\n+      }\n     },\n \n-    # form: form/all\n+    #form: form / all\n     list_forms: {\n-      input_fields: ->() {\n-         [\n-           { name: 'category_id', optional: true },\n-           { name: 'page', optional: true },\n-           { name: 'limit', optional: true },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'category_id',\n+            optional: true\n+          },\n+          {\n+            name: 'page',\n+            optional: true\n+          },\n+          {\n+            name: 'limit',\n+            optional: true\n+          },\n+        ]\n       },\n \n-      execute: ->(connection, input) {\n+      execute: - > (connection, input) {\n \n-        if input['page'].blank?\n-             input['page'] = 1\n+        if input['page'].blank ?\n+          input['page'] = 1\n         end\n \n-        if input['limit'].blank?\n-             input['limit'] = 10\n+        if input['limit'].blank ?\n+          input['limit'] = 10\n         end\n \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/all\").params(input)\n-      \n+        get(\"https://pubapi.bigtincan.com/v1/form/all\").params(input)\n+\n       },\n \n-      output_fields: ->(object_definitions) {\n-        [\n-         { name: 'page',  type: 'integer' },\n-         { name: 'page_total',  type: 'integer' },\n-         { name: 'limit',  type: 'integer' },\n-         { name: 'total_count',  type: 'integer' },\n-         { name: 'next_page',  type: 'integer' },\n-         { name: 'prev_page',  type: 'integer' },\n-         { name: 'current_count',  type: 'integer' },\n-         { name: 'data', type: :array, of: :object, properties: object_definitions['single_form'] },\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'page_total',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'limit',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'total_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'next_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'prev_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'current_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'data',\n+            type:: array,\n+            of:: object,\n+            properties: object_definitions['single_form']\n+          },\n         ]\n       }\n     },\n \n-    #form: form_category/all\n+    #form: form_category / all\n     list_form_categories: {\n-        \n-        input_fields: ->() {\n-           [\n-             { name: 'page', optional: true },\n-             { name: 'limit', optional: true },\n-           ]\n-        },\n-\n-      execute: ->(connection, input) {\n-        if input['page'].blank?\n-               input['page'] = 1\n-          end\n-\n-          if input['limit'].blank?\n-               input['limit'] = 10\n+\n+      input_fields: - > () {\n+        [{\n+            name: 'page',\n+            optional: true\n+          },\n+          {\n+            name: 'limit',\n+            optional: true\n+          },\n+        ]\n+      },\n+\n+      execute: - > (connection, input) {\n+        if input['page'].blank ?\n+          input['page'] = 1\n+        end\n+\n+        if input['limit'].blank ?\n+          input['limit'] = 10\n         end\n-        \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form_category/all\").params(input)\n+\n+        get(\"https://pubapi.bigtincan.com/v1/form_category/all\").params(input)\n       },\n \n-      output_fields: ->(object_definitions) {\n-        [\n-         { name: 'page',  type: 'integer' },\n-         { name: 'page_total',  type: 'integer' },\n-         { name: 'limit',  type: 'integer' },\n-         { name: 'total_count',  type: 'integer' },\n-         { name: 'next_page',  type: 'integer' },\n-         { name: 'prev_page',  type: 'integer' },\n-         { name: 'current_count',  type: 'integer' },\n-         { name: 'data', type: :array, of: :object, properties: object_definitions['single_form_category'] },\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'page_total',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'limit',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'total_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'next_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'prev_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'current_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'data',\n+            type:: array,\n+            of:: object,\n+            properties: object_definitions['single_form_category']\n+          },\n         ]\n       }\n     },\n \n-    #form: form/get\n+    #form: form / get\n     get_form: {\n-      input_fields: ->() {\n-         [\n-           { name: 'form_id', optional: false },\n-           { name: 'include_data_sources', optional: true },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'form_id',\n+            optional: false\n+          },\n+          {\n+            name: 'include_data_sources',\n+            optional: true\n+          },\n+        ]\n       },\n \n-      execute: ->(connection, input) {\n+      execute: - > (connection, input) {\n \n-        if input['include_data_sources'].blank?\n-             input['include_data_sources'] = true\n+        if input['include_data_sources'].blank ?\n+          input['include_data_sources'] = true\n         end\n \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/get/#{input['form_id']}\").params(include_data_sources: input['include_data_sources'])['data']\n+        get(\"https://pubapi.bigtincan.com/v1/form/get/#{input['form_id']}\").params(include_data_sources: input['include_data_sources'])['data']\n \n       },\n \n-        output_fields: ->(object_definitions) {\n-        [\n-         { name: 'id', type: 'string' },\n-         { name: 'name', type: 'string' },\n-         { name: 'form_data', \n-           type: :object, \n-           properties: [\n-             { name: 'fields', type: :array, of: :object,\n-               properties: [\n-                 { name: 'type', type: 'string'},\n-                 { name: 'value', type: 'string'},\n-                 { name: 'label', type: 'string'},\n-               ] }\n-           ]\n-         }\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'id',\n+            type: 'string'\n+          },\n+          {\n+            name: 'name',\n+            type: 'string'\n+          },\n+          {\n+            name: 'form_data',\n+            type:: object,\n+            properties: [{\n+              name: 'fields',\n+              type:: array,\n+              of:: object,\n+              properties: [{\n+                  name: 'type',\n+                  type: 'string'\n+                },\n+                {\n+                  name: 'value',\n+                  type: 'string'\n+                },\n+                {\n+                  name: 'label',\n+                  type: 'string'\n+                },\n+              ]\n+            }]\n+          }\n         ]\n       },\n     },\n-    \n-    #form: form/get fields only\n+\n+    #form: form / get fields only\n     list_form_fields: {\n-             input_fields: ->() {\n-                [\n-                  { name: 'form_id', optional: false },\n-                ]\n-             },\n-       \n-             execute: ->(connection, input) {\n-       \n-               if input['include_data_sources'].blank?\n-                   input['include_data_sources'] = true\n-               end\n-       \n-               get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/get/#{input['form_id']}\")['data']['form_data']\n-       \n-             },\n-       \n-             output_fields: ->(object_definitions) {\n-             \n-                  [\n-                    { name: 'fields', type: :array, of: :object,\n-                      properties: [\n-                        { name: 'type', type: 'string'},\n-                        { name: 'value', type: 'string'},\n-                        { name: 'label', type: 'string'},\n-                      ] }\n-                  ]\n-         \n-             },\n+      input_fields: - > () {\n+        [{\n+          name: 'form_id',\n+          optional: false\n+        }, ]\n+      },\n+\n+      execute: - > (connection, input) {\n+\n+        if input['include_data_sources'].blank ?\n+          input['include_data_sources'] = true\n+        end\n+\n+        get(\"https://pubapi.bigtincan.com/v1/form/get/#{input['form_id']}\")['data']['form_data']\n+\n+      },\n+\n+      output_fields: - > (object_definitions) {\n+\n+        [{\n+          name: 'fields',\n+          type:: array,\n+          of:: object,\n+          properties: [{\n+              name: 'type',\n+              type: 'string'\n+            },\n+            {\n+              name: 'value',\n+              type: 'string'\n+            },\n+            {\n+              name: 'label',\n+              type: 'string'\n+            },\n+          ]\n+        }]\n+\n+      },\n     },\n \n-    #story: story/all\n+    #story: story / all\n     list_stories: {\n-      input_fields: ->() {\n-         [\n-           { name: 'channel_id', optional: true, type: :string , control_type: 'select', pick_list: 'channel_id' },\n-           { name: 'page', optional: true },\n-           { name: 'limit', optional: true },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'channel_id',\n+            optional: true,\n+            type:: string,\n+            control_type: 'select',\n+            pick_list: 'channel_id'\n+          },\n+          {\n+            name: 'page',\n+            optional: true\n+          },\n+          {\n+            name: 'limit',\n+            optional: true\n+          },\n+        ]\n       },\n-      execute: ->(connection, input) {\n-        \n-        if input['page'].blank?\n-                       input['page'] = 1\n-                  end\n-\n-                  if input['limit'].blank?\n-                       input['limit'] = 10\n+      execute: - > (connection, input) {\n+\n+        if input['page'].blank ?\n+          input['page'] = 1\n+        end\n+\n+        if input['limit'].blank ?\n+          input['limit'] = 10\n         end\n-        \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/story/all\").params(input)\n+\n+        get(\"https://pubapi.bigtincan.com/v1/story/all\").params(input)\n       },\n-      output_fields: ->(object_definitions) {\n-        [\n-         { name: 'page', type: 'integer' },\n-         { name: 'page_total', type: 'integer' },\n-         { name: 'limit',  type: 'integer' },\n-         { name: 'total_count', type: 'integer' },\n-         { name: 'next_page', type: 'integer' },\n-         { name: 'prev_page', type: 'integer' },\n-         { name: 'current_count',  type: 'integer' },\n-         { name: 'data', type: :array, of: :object, properties: object_definitions['single_story'] },\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'page_total',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'limit',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'total_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'next_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'prev_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'current_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'data',\n+            type:: array,\n+            of:: object,\n+            properties: object_definitions['single_story']\n+          },\n         ]\n       }\n     },\n \n-    #story: story/get\n+    #story: story / get\n     get_story: {\n-      input_fields: ->() {\n-         [\n-           { name: 'story_perm_id', optional: false },\n-         ]\n+      input_fields: - > () {\n+        [{\n+          name: 'story_perm_id',\n+          optional: false\n+        }, ]\n       },\n-      execute: ->(connection, input) {\n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/story/get/#{input['story_perm_id']}\")\n+      execute: - > (connection, input) {\n+        get(\"https://pubapi.bigtincan.com/v1/story/get/#{input['story_perm_id']}\")\n       },\n-      output_fields: ->(object_definitions) {\n-        [\n-          { name: 'data', type: :object, properties: object_definitions['single_story'] },\n-        ]\n+      output_fields: - > (object_definitions) {\n+        [{\n+          name: 'data',\n+          type:: object,\n+          properties: object_definitions['single_story']\n+        }, ]\n       }\n     },\n \n-    #story: story/add\n+    #story: story / add\n     create_story: {\n-      input_fields: ->() {\n-         [\n-           { name: 'title', optional: false },\n-           { name: 'description', optional: false },\n-           { name: 'channel_id', optional: false, type: :string , control_type: 'select', pick_list: 'channel_id' },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'title',\n+            optional: false\n+          },\n+          {\n+            name: 'description',\n+            optional: false\n+          },\n+          {\n+            name: 'channel_id',\n+            optional: false,\n+            type:: string,\n+            control_type: 'select',\n+            pick_list: 'channel_id'\n+          },\n+        ]\n       },\n-      execute: ->(connection, input) {\n-        \n-       payload_object = {\n+      execute: - > (connection, input) {\n+\n+        payload_object = {\n           title: input['title'].presence,\n           description: input['description'].presence,\n-          channels: [ { id: input['channel_id'] } ]\n+          channels: [{\n+            id: input['channel_id']\n+          }]\n         }.compact\n-        \n-        post(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/story/add\").payload(payload_object)\n+\n+        post(\"https://pubapi.bigtincan.com/v1/story/add\").payload(payload_object)\n       },\n-      \n-      output_fields: ->(object_definitions) {\n-        [\n-          { name: 'data', type: :object, properties: object_definitions['single_story'] },\n-        ]\n+\n+      output_fields: - > (object_definitions) {\n+        [{\n+          name: 'data',\n+          type:: object,\n+          properties: object_definitions['single_story']\n+        }, ]\n       }\n     },\n \n-    #story: story/edit\n+    #story: story / edit\n     update_story: {\n-      input_fields: ->() {\n-         [\n-           { name: 'title', optional: true },\n-           { name: 'description', optional: true },\n-           { name: 'channel_id', optional: false, type: :string , control_type: 'select', pick_list: 'channel_id' },\n-           { name: 'revision_id', optional: false },\n-         ]\n+      input_fields: - > () {\n+        [{\n+            name: 'title',\n+            optional: true\n+          },\n+          {\n+            name: 'description',\n+            optional: true\n+          },\n+          {\n+            name: 'channel_id',\n+            optional: false,\n+            type:: string,\n+            control_type: 'select',\n+            pick_list: 'channel_id'\n+          },\n+          {\n+            name: 'revision_id',\n+            optional: false\n+          },\n+        ]\n       },\n-      execute: ->(connection, input) {\n+      execute: - > (connection, input) {\n \n         payload_object = {\n           title: input['title'].presence,\n           description: input['description'].presence,\n-          channels: [ { id: input['channel_id'] } ]\n+          channels: [{\n+            id: input['channel_id']\n+          }]\n         }.compact\n-        \n-        put(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/story/edit/#{input['revision_id']}\").payload(payload_object)['data']\n+\n+        put(\"https://pubapi.bigtincan.com/v1/story/edit/#{input['revision_id']}\").payload(payload_object)['data']\n       },\n \n-      output_fields: ->(object_definitions) {\n+      output_fields: - > (object_definitions) {\n         object_definitions['single_story']\n       }\n     },\n \n-    #story: story/delete\n+    #story: story / delete\n     delete_story: {\n \n-    input_fields: ->() {\n-         [\n-           { name: 'revision_id', optional: false },\n-         ]\n+      input_fields: - > () {\n+        [{\n+          name: 'revision_id',\n+          optional: false\n+        }, ]\n       },\n-   execute: ->(connection, input) {\n-        delete(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/story/archive/#{input['revision_id']}\")['data']\n+      execute: - > (connection, input) {\n+        delete(\"https://pubapi.bigtincan.com/v1/story/archive/#{input['revision_id']}\")['data']\n       },\n-   output_fields: ->(object_definitions) {\n-        [\n-          { name:'deleted', type:'boolean' }\n+      output_fields: - > (object_definitions) {\n+        [{\n+          name: 'deleted',\n+          type: 'boolean'\n+        }]\n+      }\n+    },\n+\n+    #channal: channel / all\n+    list_channels: {\n+\n+      input_fields: - > () {\n+        [{\n+            name: 'page',\n+            optional: true\n+          },\n+          {\n+            name: 'limit',\n+            optional: true\n+          },\n         ]\n-    }\n-   },\n-\n-   #channal: channel/all\n-   list_channels: {\n-    \n-      input_fields: ->() {\n-         [\n-           { name: 'page', optional: true },\n-           { name: 'limit', optional: true },\n-         ]\n       },\n \n-      execute: ->(connection, input) {\n-         if input['page'].blank?\n-             input['page'] = 1\n+      execute: - > (connection, input) {\n+        if input['page'].blank ?\n+          input['page'] = 1\n         end\n \n-        if input['limit'].blank?\n-             input['limit'] = 10\n+        if input['limit'].blank ?\n+          input['limit'] = 10\n         end\n-        \n-        get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/channel/all\").params(input)\n+\n+        get(\"https://pubapi.bigtincan.com/v1/channel/all\").params(input)\n       },\n-      output_fields: ->(object_definitions) {\n-        [\n-         { name: 'page',  type: 'integer' },\n-         { name: 'page_total',  type: 'integer' },\n-         { name: 'limit',  type: 'integer' },\n-         { name: 'total_count',  type: 'integer' },\n-         { name: 'next_page',  type: 'integer' },\n-         { name: 'prev_page',  type: 'integer' },\n-         { name: 'current_count',  type: 'integer' },\n-         { name: 'data', type: :array, of: :object, properties: object_definitions['channel'] },\n+      output_fields: - > (object_definitions) {\n+        [{\n+            name: 'page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'page_total',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'limit',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'total_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'next_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'prev_page',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'current_count',\n+            type: 'integer'\n+          },\n+          {\n+            name: 'data',\n+            type:: array,\n+            of:: object,\n+            properties: object_definitions['channel']\n+          },\n         ]\n       }\n     },\n-   },\n+  },\n \n-   triggers: {\n+  triggers: {\n \n     new_form_submission: {\n \n-      type: :paging_desc,\n+      type:: paging_desc,\n \n-      config_fields: [\n-        {  name: 'form_id', label: 'Form ID', optional: false, control_type: 'select', pick_list: 'form_id' }\n-      ],\n+      config_fields: [{\n+        name: 'form_id',\n+        label: 'Form ID',\n+        optional: false,\n+        control_type: 'select',\n+        pick_list: 'form_id'\n+      }],\n \n-      poll: ->(connection, input, page) {\n+      poll: - > (connection, input, page) {\n \n-        page ||= 1\n+        page || = 1\n \n-        response = get(\"https://pubapi.bigtincan.com/#{connection['account_id']}/alpha/form/data/#{input['form_id']}\").\n-                    params(limit: 30,\n-                           page: page,\n-                           sort: 'desc')['data']\n+        response = get(\"https://pubapi.bigtincan.com/v1/form/data/#{input['form_id']}\").\n+        params(limit: 30,\n+          page: page,\n+          sort: 'desc')['data']\n \n         {\n           events: response['submissions'],\n           next_page: response['submission_next_page'],\n         }\n       },\n \n-      document_id: ->(submission) {\n+      document_id: - > (submission) {\n         submission['cursor']\n       },\n \n-      output_fields: ->(object_definitions) {\n+      output_fields: - > (object_definitions) {\n         object_definitions['form_submission_data']\n       }\n \n     },\n \n     new_story: {\n \n-      type: :paging_desc,\n+      type:: paging_desc,\n \n-      input_fields: ->() {\n-              [\n-                { name: 'channel_id', optional: false, type: :string, control_type: 'select', pick_list: 'channel_id' }\n-              ]\n+      input_fields: - > () {\n+        [{\n+          name: 'channel_id',\n+          optional: false,\n+          type:: string,\n+          control_type: 'select',\n+          pick_list: 'channel_id'\n+        }]\n       },\n \n-      poll: ->(connection, input, page) {\n+      poll: - > (connection, input, page) {","path":"custom_connectors/oauth2/bigtincan_connector.rb","position":1108,"original_position":1108,"commit_id":"edcf9d3abd09baf3646e0ff5e332b5984378b718","original_commit_id":"edcf9d3abd09baf3646e0ff5e332b5984378b718","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":"unexpected token tLCURLY","created_at":"2018-09-24T06:36:44Z","updated_at":"2018-09-24T06:36:45Z","html_url":"https://github.com/workato/custom_connector_docs/pull/23#discussion_r219737927","pull_request_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/219737927"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/23#discussion_r219737927"},"pull_request":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23","id":217562403,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NTYyNDAz","html_url":"https://github.com/workato/custom_connector_docs/pull/23","diff_url":"https://github.com/workato/custom_connector_docs/pull/23.diff","patch_url":"https://github.com/workato/custom_connector_docs/pull/23.patch","issue_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/23","number":23,"state":"open","locked":false,"title":"bigtincan-public-connector-fix","user":{"login":"sandeepbhattarai","id":26476047,"node_id":"MDQ6VXNlcjI2NDc2MDQ3","avatar_url":"https://avatars2.githubusercontent.com/u/26476047?v=4","gravatar_id":"","url":"https://api.github.com/users/sandeepbhattarai","html_url":"https://github.com/sandeepbhattarai","followers_url":"https://api.github.com/users/sandeepbhattarai/followers","following_url":"https://api.github.com/users/sandeepbhattarai/following{/other_user}","gists_url":"https://api.github.com/users/sandeepbhattarai/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeepbhattarai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeepbhattarai/subscriptions","organizations_url":"https://api.github.com/users/sandeepbhattarai/orgs","repos_url":"https://api.github.com/users/sandeepbhattarai/repos","events_url":"https://api.github.com/users/sandeepbhattarai/events{/privacy}","received_events_url":"https://api.github.com/users/sandeepbhattarai/received_events","type":"User","site_admin":false},"body":"Change log\r\n\r\nSummary\r\n\r\nThis PR fixes the broken authentication page as bigtincan uses oauth2 for authentication and updates the bigtincan public api urls.\r\n\r\nChanged\r\n\r\n- The authorization url.\r\n\r\n- The bigtincan public-api url\r\n\r\nRemoved\r\n\r\n- The account-id field","created_at":"2018-09-24T06:04:49Z","updated_at":"2018-09-24T06:36:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aec4033c2cd6fcb59d121273f1c2b647546e38c2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23/commits","review_comments_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23/comments","review_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/23/comments","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/edcf9d3abd09baf3646e0ff5e332b5984378b718","head":{"label":"sandeepbhattarai:bigtincan-sandeepbhattarai-fix-broken-login-page-and-update-api-url","ref":"bigtincan-sandeepbhattarai-fix-broken-login-page-and-update-api-url","sha":"edcf9d3abd09baf3646e0ff5e332b5984378b718","user":{"login":"sandeepbhattarai","id":26476047,"node_id":"MDQ6VXNlcjI2NDc2MDQ3","avatar_url":"https://avatars2.githubusercontent.com/u/26476047?v=4","gravatar_id":"","url":"https://api.github.com/users/sandeepbhattarai","html_url":"https://github.com/sandeepbhattarai","followers_url":"https://api.github.com/users/sandeepbhattarai/followers","following_url":"https://api.github.com/users/sandeepbhattarai/following{/other_user}","gists_url":"https://api.github.com/users/sandeepbhattarai/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeepbhattarai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeepbhattarai/subscriptions","organizations_url":"https://api.github.com/users/sandeepbhattarai/orgs","repos_url":"https://api.github.com/users/sandeepbhattarai/repos","events_url":"https://api.github.com/users/sandeepbhattarai/events{/privacy}","received_events_url":"https://api.github.com/users/sandeepbhattarai/received_events","type":"User","site_admin":false},"repo":{"id":150034648,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAwMzQ2NDg=","name":"custom_connector_docs","full_name":"sandeepbhattarai/custom_connector_docs","private":false,"owner":{"login":"sandeepbhattarai","id":26476047,"node_id":"MDQ6VXNlcjI2NDc2MDQ3","avatar_url":"https://avatars2.githubusercontent.com/u/26476047?v=4","gravatar_id":"","url":"https://api.github.com/users/sandeepbhattarai","html_url":"https://github.com/sandeepbhattarai","followers_url":"https://api.github.com/users/sandeepbhattarai/followers","following_url":"https://api.github.com/users/sandeepbhattarai/following{/other_user}","gists_url":"https://api.github.com/users/sandeepbhattarai/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeepbhattarai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeepbhattarai/subscriptions","organizations_url":"https://api.github.com/users/sandeepbhattarai/orgs","repos_url":"https://api.github.com/users/sandeepbhattarai/repos","events_url":"https://api.github.com/users/sandeepbhattarai/events{/privacy}","received_events_url":"https://api.github.com/users/sandeepbhattarai/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sandeepbhattarai/custom_connector_docs","description":null,"fork":true,"url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs","forks_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/sandeepbhattarai/custom_connector_docs/deployments","created_at":"2018-09-23T23:35:20Z","updated_at":"2018-09-23T23:35:22Z","pushed_at":"2018-09-24T06:36:28Z","git_url":"git://github.com/sandeepbhattarai/custom_connector_docs.git","ssh_url":"git@github.com:sandeepbhattarai/custom_connector_docs.git","clone_url":"https://github.com/sandeepbhattarai/custom_connector_docs.git","svn_url":"https://github.com/sandeepbhattarai/custom_connector_docs","homepage":null,"size":907,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"workato:master","ref":"master","sha":"e994021ff5108a3adf2c64d1eb11b104077f8449","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":143073259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNzMyNTk=","name":"custom_connector_docs","full_name":"workato/custom_connector_docs","private":false,"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},"html_url":"https://github.com/workato/custom_connector_docs","description":null,"fork":false,"url":"https://api.github.com/repos/workato/custom_connector_docs","forks_url":"https://api.github.com/repos/workato/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/workato/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/workato/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/workato/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/workato/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/workato/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/workato/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/workato/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/workato/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/workato/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/workato/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/workato/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/workato/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/workato/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/workato/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/workato/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/workato/custom_connector_docs/deployments","created_at":"2018-07-31T21:44:08Z","updated_at":"2018-09-19T05:18:22Z","pushed_at":"2018-09-24T06:36:28Z","git_url":"git://github.com/workato/custom_connector_docs.git","ssh_url":"git@github.com:workato/custom_connector_docs.git","clone_url":"https://github.com/workato/custom_connector_docs.git","svn_url":"https://github.com/workato/custom_connector_docs","homepage":null,"size":899,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":4,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/23"},"issue":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/23"},"comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/workato/custom_connector_docs/statuses/edcf9d3abd09baf3646e0ff5e332b5984378b718"}},"author_association":"NONE"}}
{"actor":{"display_login":"houndci-bot"}}