Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/plugins/Spotify/ @jame2O
/plugins/Steam/ @kmichalski0
/plugins/SumoLogic/ @richpeters
/plugins/TeamDynamix/ @shawn149
/plugins/TransportForLondon/ @clarkd
/plugins/UniFi/ @adamkinniburgh
/plugins/UptimeRobot/ @kieranlangton
Expand Down
4 changes: 3 additions & 1 deletion plugins/TeamDynamix/v1/dataStreams/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
{ "name": "country", "displayName": "Country", "shape": "string" },
{ "name": "createdDate", "displayName": "Created", "shape": "date" }
],
"timeframes": false,
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
38 changes: 38 additions & 0 deletions plugins/TeamDynamix/v1/dataStreams/accountsIndex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "accountsIndex",
"displayName": "Accounts (Import)",
"description": "Active accounts and departments, one row per account (empty unless inventory import is turned on)",
"tags": ["Organization"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"endpointPath": "api/accounts/search",
"postBody": {
"IsActive": true,
"SearchText": "{{ dataSource.importInventory === true || dataSource.importInventory === 'true' ? null : 'squaredup-inventory-import-disabled' }}"
},
"paging": { "mode": "none" },
"postRequestScript": "accounts.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/rateLimit.js"
}
},
"matches": "none",
"metadata": [
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "accountId", "displayName": "Account ID", "shape": "string", "role": "id" },
{ "name": "code", "displayName": "Code", "shape": "string" },
{ "name": "managerName", "displayName": "Manager", "shape": "string" },
{ "name": "parentName", "displayName": "Parent", "shape": "string" },
{ "name": "industryName", "displayName": "Industry", "shape": "string" },
{ "name": "city", "displayName": "City", "shape": "string" },
{ "name": "stateName", "displayName": "State", "shape": "string" },
{ "name": "country", "displayName": "Country", "shape": "string" },
{ "name": "createdDate", "displayName": "Created", "shape": "date" }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
47 changes: 47 additions & 0 deletions plugins/TeamDynamix/v1/dataStreams/assetCount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "assetCount",
"displayName": "Asset Count",
"description": "Number of assets in an asset application, optionally only those in or out of service (exact, not limited by Maximum assets)",
"tags": ["Assets", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "api/{{object.rawId}}/assets/search/paged",
"getArgs": [
{ "key": "pageSize", "value": "1" },
{ "key": "pageNumber", "value": "1" }
],
"postBody": {
"OnlyParentAssets": false,
"IsInService": "{{typeof inService === 'undefined' || !inService || inService === 'all' ? null : inService === 'inService'}}"
},
"paging": { "mode": "none" },
"postRequestScript": "assetCount.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/rateLimit.js"
}
},
"matches": {
"sourceType": { "type": "oneOf", "values": ["TeamDynamix Asset App"] }
},
"ui": [
{
"type": "switch",
"name": "inService",
"label": "Service state",
"defaultValue": "all",
"options": [
{ "value": "all", "label": "All" },
{ "value": "inService", "label": "In service" },
{ "value": "outOfService", "label": "Out of service" }
]
}
],
"metadata": [
{ "name": "assets", "displayName": "Assets", "shape": "number", "role": "value" }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
8 changes: 5 additions & 3 deletions plugins/TeamDynamix/v1/dataStreams/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"httpMethod": "post",
"endpointPath": "api/{{object.rawId}}/assets/search",
"postBody": {
"MaxResults": "{{maxResults || dataSource.maxRecords || 2000}}",
"IsInService": "{{typeof inService === 'undefined' || inService === '' || inService === 'all' ? null : inService === 'inService'}}"
"MaxResults": "{{(typeof maxResults !== 'undefined' && maxResults) || dataSource.maxRecords || 2000}}",
"IsInService": "{{typeof inService === 'undefined' || !inService || inService === 'all' ? null : inService === 'inService'}}"
},
"paging": { "mode": "none" },
"postRequestScript": "assets.js",
Expand Down Expand Up @@ -71,5 +71,7 @@
"defaultShaping": {
"sort": { "by": [["name", "asc"]] }
},
"timeframes": false
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
55 changes: 55 additions & 0 deletions plugins/TeamDynamix/v1/dataStreams/assetsIndex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "assetsIndex",
"displayName": "Assets (Import)",
"description": "Assets in an asset application, one row per asset, up to the maximum records per request (empty unless inventory import is turned on)",
"tags": ["Assets", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "api/{{object.rawId}}/assets/search",
"postBody": {
"MaxResults": "{{dataSource.maxRecords || 2000}}",
"ExternalIDs": "{{ dataSource.importInventory === true || dataSource.importInventory === 'true' ? null : ['squaredup-inventory-import-disabled'] }}"
},
"paging": { "mode": "none" },
"postRequestScript": "assets.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/rateLimit.js"
}
},
"matches": {
"sourceType": { "type": "oneOf", "values": ["TeamDynamix Asset App"] }
},
"metadata": [
{ "name": "name", "displayName": "Asset", "shape": "string", "role": "label" },
{ "name": "sourceId", "displayName": "Source ID", "shape": "string", "role": "id", "visible": false },
{ "name": "assetId", "displayName": "Asset ID", "shape": "string", "visible": false },
{ "name": "link", "displayName": "Link", "shape": ["url", { "label": "Open in TeamDynamix" }], "role": "link" },
{ "name": "statusName", "displayName": "Status", "shape": "string" },
{ "name": "tag", "displayName": "Tag", "shape": "string" },
{ "name": "serialNumber", "displayName": "Serial Number", "shape": "string" },
{ "name": "manufacturerName", "displayName": "Manufacturer", "shape": "string" },
{ "name": "productModelName", "displayName": "Model", "shape": "string" },
{ "name": "supplierName", "displayName": "Supplier", "shape": "string", "visible": false },
{ "name": "locationName", "displayName": "Location", "shape": "string" },
{ "name": "locationRoomName", "displayName": "Room", "shape": "string", "visible": false },
{ "name": "owningCustomerName", "displayName": "Owner", "shape": "string" },
{ "name": "owningDepartmentName", "displayName": "Owning Department", "shape": "string" },
{ "name": "requestingCustomerName", "displayName": "Requestor", "shape": "string", "visible": false },
{ "name": "purchaseCost", "displayName": "Purchase Cost", "shape": ["number", { "decimalPlaces": 2, "thousandsSeparator": true }] },
{ "name": "acquisitionDate", "displayName": "Acquired", "shape": "date" },
{ "name": "expectedReplacementDate", "displayName": "Expected Replacement", "shape": "date" },
{ "name": "createdDate", "displayName": "Created", "shape": "date", "visible": false },
{ "name": "modifiedDate", "displayName": "Modified", "shape": "date" },
{ "name": "parentName", "displayName": "Parent Asset", "shape": "string", "visible": false },
{ "name": "externalId", "displayName": "External ID", "shape": "string", "visible": false },
{ "name": "configurationItemId", "displayName": "Configuration Item ID", "shape": "string", "visible": false },
{ "name": "appId", "displayName": "App ID", "shape": "string", "visible": false },
{ "name": "sourceType", "displayName": "Object Type", "shape": "string", "visible": false }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
9 changes: 6 additions & 3 deletions plugins/TeamDynamix/v1/dataStreams/configurationItems.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "configurationItems",
"displayName": "Configuration Items",
"description": "Configuration items in the CMDB of an asset application, one row per item",
"description": "Standalone configuration items in the CMDB of an asset application, one row per item (items that only mirror an asset are left out)",
"tags": ["Configuration Items", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "api/{{object.rawId}}/cmdb/search",
"postBody": {
"IsActive": "{{typeof activeState === 'undefined' || activeState === '' || activeState === 'all' ? null : activeState === 'active'}}"
"MaxResults": 10000,
"IsActive": "{{typeof activeState === 'undefined' || !activeState ? true : activeState === 'all' ? null : activeState === 'active'}}"
},
"paging": { "mode": "none" },
"postRequestScript": "configurationItems.js",
Expand Down Expand Up @@ -57,5 +58,7 @@
"defaultShaping": {
"sort": { "by": [["name", "asc"]] }
},
"timeframes": false
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
58 changes: 58 additions & 0 deletions plugins/TeamDynamix/v1/dataStreams/configurationItemsIndex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "configurationItemsIndex",
"displayName": "Configuration Items (Import)",
"description": "Every active standalone configuration item in an asset application, fetched page by page (empty unless inventory import is turned on)",
"tags": ["Configuration Items", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "api/{{object.rawId}}/cmdb/search/paged",
"postBody": {
"IsActive": true,
"NameLike": "{{ dataSource.importInventory === true || dataSource.importInventory === 'true' ? null : 'squaredup-inventory-import-disabled' }}"
},
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "pageSize", "value": "250" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "Data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "pageNumber" }
},
"postRequestScript": "configurationItems.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/rateLimit.js"
}
},
"matches": {
"sourceType": { "type": "oneOf", "values": ["TeamDynamix Asset App"] }
},
"metadata": [
{ "name": "name", "displayName": "Configuration Item", "shape": "string", "role": "label" },
{ "name": "sourceId", "displayName": "Source ID", "shape": "string", "role": "id", "visible": false },
{ "name": "configurationItemId", "displayName": "CI ID", "shape": "string", "visible": false },
{ "name": "link", "displayName": "Link", "shape": ["url", { "label": "Open in TeamDynamix" }], "role": "link" },
{ "name": "typeName", "displayName": "Type", "shape": "string" },
{ "name": "isActive", "displayName": "Active", "shape": "boolean" },
{ "name": "ownerFullName", "displayName": "Owner", "shape": "string" },
{ "name": "owningDepartmentName", "displayName": "Owning Department", "shape": "string" },
{ "name": "owningGroupName", "displayName": "Owning Group", "shape": "string" },
{ "name": "locationName", "displayName": "Location", "shape": "string" },
{ "name": "maintenanceScheduleName", "displayName": "Maintenance Window", "shape": "string" },
{ "name": "backingItemType", "displayName": "Backing Item Type", "shape": "string", "visible": false },
{ "name": "isSystemMaintained", "displayName": "System Maintained", "shape": "boolean", "visible": false },
{ "name": "externalSourceName", "displayName": "External Source", "shape": "string", "visible": false },
{ "name": "externalId", "displayName": "External ID", "shape": "string", "visible": false },
{ "name": "createdDate", "displayName": "Created", "shape": "date", "visible": false },
{ "name": "modifiedDate", "displayName": "Modified", "shape": "date" },
{ "name": "appId", "displayName": "App ID", "shape": "string", "visible": false },
{ "name": "sourceType", "displayName": "Object Type", "shape": "string", "visible": false }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
4 changes: 3 additions & 1 deletion plugins/TeamDynamix/v1/dataStreams/currentUser.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
{ "name": "BEID", "displayName": "BEID", "shape": "string" },
{ "name": "UID", "displayName": "UID", "shape": "string", "visible": false }
],
"timeframes": false,
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
4 changes: 3 additions & 1 deletion plugins/TeamDynamix/v1/dataStreams/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
{ "name": "CreatedDate", "displayName": "Created", "shape": "date" },
{ "name": "ModifiedDate", "displayName": "Modified", "shape": "date" }
],
"timeframes": false,
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"IncludeArticleBodies": false,
"IncludeShortcuts": false,
"IsPublished": "{{typeof publishedState === 'undefined' || publishedState === '' || publishedState === 'all' ? null : publishedState === 'published'}}",
"ReturnCount": "{{maxResults || dataSource.maxRecords || 1000}}"
"ReturnCount": "{{(typeof maxResults !== 'undefined' && maxResults) || dataSource.maxRecords || 1000}}"
},
"paging": { "mode": "none" },
"postRequestScript": "knowledgeBaseArticles.js",
Expand All @@ -21,7 +21,8 @@
}
},
"matches": {
"sourceType": { "type": "oneOf", "values": ["TeamDynamix Application"] }
"sourceType": { "type": "oneOf", "values": ["TeamDynamix Application"] },
"appClass": { "type": "oneOf", "values": ["TDClient"] }
},
"ui": [
{
Expand Down Expand Up @@ -62,5 +63,7 @@
"defaultShaping": {
"sort": { "by": [["modifiedDate", "desc"]] }
},
"timeframes": false
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
13 changes: 10 additions & 3 deletions plugins/TeamDynamix/v1/dataStreams/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
"tags": ["Organization", "Inventory"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/locations",
"httpMethod": "post",
"endpointPath": "api/locations/search",
"postBody": {
"IsActive": true,
"ReturnItemCounts": true,
"ReturnRooms": false
},
"paging": { "mode": "none" },
"postRequestScript": "locations.js",
"errorHandling": {
Expand All @@ -33,5 +38,7 @@
"defaultShaping": {
"sort": { "by": [["ticketsCount", "desc"]] }
},
"timeframes": false
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none"
}
43 changes: 43 additions & 0 deletions plugins/TeamDynamix/v1/dataStreams/locationsIndex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "locationsIndex",
"displayName": "Locations (Import)",
"description": "Active locations with their item counts, one row per location (empty unless inventory import is turned on)",
"tags": ["Organization", "Inventory"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"endpointPath": "api/locations/search",
"postBody": {
"IsActive": true,
"ReturnItemCounts": true,
"ReturnRooms": false,
"NameLike": "{{ dataSource.importInventory === true || dataSource.importInventory === 'true' ? null : 'squaredup-inventory-import-disabled' }}"
},
"paging": { "mode": "none" },
"postRequestScript": "locations.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/rateLimit.js"
}
},
"matches": "none",
"metadata": [
{ "name": "name", "displayName": "Location", "shape": "string", "role": "label" },
{ "name": "locationId", "displayName": "Location ID", "shape": "string", "role": "id" },
{ "name": "ticketsCount", "displayName": "Tickets", "shape": "number", "role": "value" },
{ "name": "assetsCount", "displayName": "Assets", "shape": "number" },
{ "name": "configurationItemsCount", "displayName": "Configuration Items", "shape": "number" },
{ "name": "usersCount", "displayName": "Users", "shape": "number" },
{ "name": "roomsCount", "displayName": "Rooms", "shape": "number" },
{ "name": "city", "displayName": "City", "shape": "string" },
{ "name": "state", "displayName": "State", "shape": "string" },
{ "name": "country", "displayName": "Country", "shape": "string" },
{ "name": "address", "displayName": "Address", "shape": "string" },
{ "name": "latitude", "displayName": "Latitude", "shape": "number", "visible": false },
{ "name": "longitude", "displayName": "Longitude", "shape": "number", "visible": false }
],
"timeframes": ["none"],
"supportsNoneTimeframe": true,
"defaultTimeframe": "none",
"visibility": { "type": "hidden" }
}
Loading
Loading