(app: PagedApp & Partial<AppResponse>)
| 83 | } |
| 84 | |
| 85 | export 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 | |
| 95 | export const authorizeApp = async ( |
| 96 | app: AppUpdateRequest, |