MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / shortARNorURL

Function shortARNorURL

src/lib/command/util/apps-util.ts:85–93  ·  view source on GitHub ↗
(app: PagedApp & Partial<AppResponse>)

Source from the content-addressed store, hash-verified

83}
84
85export const shortARNorURL = (app: PagedApp & Partial<AppResponse>): string => {
86 const uri = (app.webhookSmartApp
87 ? app.webhookSmartApp.targetUrl
88 : (app.lambdaSmartApp
89 ? (app.lambdaSmartApp.functions?.length ? app.lambdaSmartApp.functions[0] : '')
90 : (app.apiOnly?.subscription?.targetUrl))) ?? ''
91
92 return uri.length < 96 ? uri : uri.slice(0, 95) + '...'
93}
94
95export const authorizeApp = async (
96 app: AppUpdateRequest,

Callers 1

apps-util.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected