UNPKG

@joshfarrant/shortcuts-js

Version:
37 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const utils_1 = require("../utils"); /** * @action Get Network Details * @section Actions > Scripting > Device * @icon Wi-Fi * * Gets information about the currently connected networks. * * ```js * getNetworkDetails({ * network: 'Wi-Fi', * get: 'Network Name', * }); * * getNetworkDetails({ * network: 'Cellular', * get: 'Carrier Name', * }); * ``` */ const getNetworkDetails = ({ network = 'Wi-Fi', attribute = 'Network Name', }) => { let detailKey = 'WFWiFiDetail'; if (network === 'Cellular') { detailKey = 'WFCellularDetail'; } return { WFWorkflowActionIdentifier: 'is.workflow.actions.getwifi', WFWorkflowActionParameters: { WFNetworkDetailsNetwork: network, [detailKey]: attribute, }, }; }; exports.default = utils_1.withActionOutput(getNetworkDetails); //# sourceMappingURL=getNetworkDetails.js.map