-
Notifications
You must be signed in to change notification settings - Fork 53
patch to BIM60 connector #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: svchandra-bim_360
Are you sure you want to change the base?
Conversation
…_id` is dynamic value
…ntainer_id` in result
…` and `container_id` in result
… output `hub_id`, `project_id`, and `container_id`
…d` and `container_id`
…` and `container_id`
… and `folder_id`
…output `hub_id`, `project_id`, and `folder_id`
…le_content` in `PUT` payload, output `hub_id` and `project_id`
…t_id`, and `folder_id`
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2301,7 +1399,7 @@ | |||
[ | |||
{ | |||
name: 'hub_id', | |||
label: 'Hub name', | |||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2317,7 +1415,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2377,7 +1481,7 @@ | |||
[ | |||
{ | |||
name: 'hub_id', | |||
label: 'Hub name', | |||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2393,7 +1497,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
control_type: 'text', | ||
sticky: true, | ||
hint: 'Enter filters for the search. A list of filters can be' \ | ||
' found at https://forge.autodesk.com/en/docs/data/v2/' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use hyper link tag
e.g
hint: 'To create client ID, the system admin or manager can click ' \
"<a href='https://abc.com/app/settings/developer/apps/new' " \
"target='_blank'>here</a> to register a new client application." },
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2461,7 +1575,7 @@ | |||
[ | |||
{ | |||
name: 'hub_id', | |||
label: 'Hub name', | |||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2477,7 +1591,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2511,10 +1625,10 @@ | |||
hint: 'Use Folder ID' | |||
} }, | |||
{ name: 'item_id', | |||
label: 'File name', | |||
label: 'File Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'File name',
custom_connectors/oauth2/bim_360.rb
Outdated
}, | ||
config_fields: | ||
[ | ||
{ | ||
name: 'hub_id', | ||
label: 'Hub name', | ||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update label as
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2573,7 +1687,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
{ | ||
name: 'item_id', | ||
label: 'File name', | ||
label: 'File Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'File name'```
custom_connectors/oauth2/bim_360.rb
Outdated
optional: true, | ||
toggle_hint: 'Use custom value', | ||
hint: 'Use version number' | ||
hint: 'Use File/Item ID' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update hint
hint: 'Use fileiItem ID'
"#{version_url}/exports/#{input['export_id']}") | ||
project_id = input['project_id'].split('.').last | ||
get("/bim360/docs/v1/projects/#{project_id}/versions/" \ | ||
"#{version_url}/exports/#{input['export_id']}"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert all three in to one merge operation, there are other e.g.
merge({ hub_id: input['hub_id'] }).
merge({ project_id: input['project_id'] }).
merge({ item_id: input['item_id'] })
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2671,7 +1758,7 @@ | |||
[ | |||
{ | |||
name: 'hub_id', | |||
label: 'Hub name', | |||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name',
``
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2687,7 +1774,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as```
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2721,7 +1807,7 @@ | |||
hint: 'Use Folder ID' | |||
} }, | |||
{ name: 'item_id', | |||
label: 'File name', | |||
label: 'File Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'File name',
custom_connectors/oauth2/bim_360.rb
Outdated
config_fields: [ | ||
{ | ||
name: 'hub_id', | ||
label: 'Hub name', | ||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2778,7 +1874,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -2814,35 +1910,48 @@ | |||
], | |||
input_fields: lambda do |_object_definitions| | |||
[ | |||
{ name: 'file_name', optional: false, | |||
{ name: 'file_name', optional: false, label: 'File Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'File Name',
You can ignore as well, workato derives labels from name field.
custom_connectors/oauth2/bim_360.rb
Outdated
}, | ||
input_fields: lambda do |_object_definitions| | ||
[ | ||
{ | ||
name: 'hub_id', | ||
label: 'Hub name', | ||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Hub name'
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -3131,7 +2103,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
custom_connectors/oauth2/bim_360.rb
Outdated
}, | ||
input_fields: lambda do |_object_definitions| | ||
[ | ||
{ | ||
name: 'hub_id', | ||
label: 'Hub name', | ||
label: 'Hub Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label
label: 'Hub name',
custom_connectors/oauth2/bim_360.rb
Outdated
@@ -3264,7 +2228,7 @@ | |||
}, | |||
{ | |||
name: 'project_id', | |||
label: 'Project name', | |||
label: 'Project Name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update label as
label: 'Project name',
@@ -3324,22 +2289,27 @@ | |||
'filter[type]=items&filter[lastModifiedTimeRollup]-ge=' \ | |||
"#{last_modified_time}&" \ | |||
"page[limit]=#{limit}&page[skip]=#{skip}" | |||
get("/data/v1/projects/#{project_id}/folders/" \ | |||
"#{folder_id}/contents", query_params) | |||
get("/data/v1/projects/#{input['project_id']}/folders/" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use project_id
field instead of input['project_id']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where we were seeing issues where the project_id
is cached from another trigger and was not polling from the project specified in the input. we're using input['project_uid']
to make sure we're polling from the project specified in the input instead of the cached one.
get("/data/v1/projects/#{project_id}/folders/" \ | ||
"#{folder_id}/contents", query_params) | ||
get("/data/v1/projects/#{input['project_id']}/folders/" \ | ||
"#{input['folder_id']}/contents", query_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use folder_id
field instead of input['folder_id']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above. this ensures we're looking at the folder specified in the input instead of the cached value.
project_id = closure&.[]('project_id') || input['project_id'] | ||
container_id = closure&.[]('container_id') || | ||
get("/project/v1/hubs/#{input['hub_id']}" \ | ||
"/projects/#{project_id}")&. | ||
"/projects/#{input['project_id']}")&. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use project_id
field instead of input['project_id']
is there any issue to switch from the project_id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above. this ensures we're looking at the folder specified in the input instead of the cached value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sophatsam I updated the PR, please fix the changes.
@svchandra I have pushed the latest commit based on the changes you recommended, with the exception of the last 3 comments where i provided a response comment. |
No description provided.