decord/beta/source/modules/applications/getApplicationInstallURL.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

73 lines
2.6 KiB
TypeScript

// Module ID: 12265
// Function ID: 12266
// Name: getApplicationInstallURL
// Dependencies: [1074, 2]
// Exports: getActivityLaunchURL, getApplicationInstallURL
// Module 12265 (getApplicationInstallURL)
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
const Routes = Constants.Routes;
let result = size.fileFinishedImporting("modules/applications/getApplicationInstallURL.tsx");
export const getActivityLaunchURL = function getActivityLaunchURL(applicationId) {
({ customId, referrerId, linkId } = applicationId);
const str = new URL(Routes.ACTIVITY_DETAILS(applicationId.applicationId), "" + location.protocol + "//" + location.host);
const searchParams = str.searchParams;
if (null != linkId) {
const result = searchParams.set("link_id", linkId);
}
if (null != referrerId) {
const result1 = searchParams.set("referrer_id", referrerId);
}
if (null != customId) {
const result2 = searchParams.set("custom_id", customId);
}
return str.toString();
};
export const getApplicationInstallURL = function getApplicationInstallURL(application) {
({ customInstallUrl, installParams, integrationTypesConfig } = application);
if (null != customInstallUrl) {
return customInstallUrl;
} else {
const _URLSearchParams = URLSearchParams;
const str7 = new URLSearchParams();
const result = str7.set("client_id", tmp);
let someResult = null != integrationTypesConfig;
if (someResult) {
const _Object = Object;
const values = Object.values(integrationTypesConfig);
someResult = values.some((oauth2_install_params) => {
let prop;
if (oauth2_install_params != null) {
prop = oauth2_install_params.oauth2_install_params;
}
let tmp2 = null != prop;
if (!tmp2) {
let oauth2InstallParams;
if (oauth2_install_params != null) {
oauth2InstallParams = oauth2_install_params.oauth2InstallParams;
}
tmp2 = null != oauth2InstallParams;
}
return tmp2;
});
}
if (null != installParams) {
if (!someResult) {
({ permissions, scopes } = installParams);
if (null != permissions) {
const result1 = str7.set("permissions", permissions);
}
if (null != scopes) {
const result2 = str7.set("scope", scopes.join(" "));
}
}
}
const _location = location;
const _location2 = location;
const _HermesInternal = HermesInternal;
return "" + location.protocol + "//" + location.host + Routes.OAUTH2_AUTHORIZE + "?" + str7.toString();
}
};