SPB Git

Repository Public

asc-create-app-record.safari.js 3.4 KB 58 lines javascript

1/**2 * =============================================================================3 *                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : MacLustr Command Center (MCC)8 * File             : infra/apple/asc-create-app-record.safari.js9 * Module           : infra10 * Repository       : https://git.spboucher.ai/maclustr-command-center11 * Project Website  : https://clustr.spboucher.ai12 * Created          : 2026-11-1913 * Last Modified    : 2026-11-1914 *15 * Author           : Simon-Pierre Boucher16 * Position         : Professor of Finance17 * Institution      : Université du Québec en Outaouais (UQO)18 * Organization     : SP Boucher19 * Website          : https://spboucher.ai20 * Git              : https://git.spboucher.ai21 *22 * Preferred Contact: admin@spboucher.ai23 * Technical Contact: dev@spboucher.ai24 * Security/Admin   : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License          : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142// Creates the App Store Connect app record through a signed-in Safari tab (the public API cannot).43// Run with: osascript -e 'tell application "Safari" to do JavaScript (read POSIX file "…/this file") in <ASC tab>' then read window.__mccCreate.44// Used once on 2026-11-19 → app id 6836652715.45(function(){46  window.__mccCreate = "pending";47  var body = {"data":{"type":"apps","attributes":{"sku":"maclustr-cc-ios-001","primaryLocale":"fr-CA","bundleId":"ai.spboucher.clustr.ios"},48    "relationships":{"appStoreVersions":{"data":[{"type":"appStoreVersions","id":"${store-version-ios}"}]},"appInfos":{"data":[{"type":"appInfos","id":"${new-appInfo-id}"}]}}},49    "included":[{"type":"appStoreVersions","id":"${store-version-ios}","attributes":{"platform":"IOS","versionString":"1.0"},"relationships":{"appStoreVersionLocalizations":{"data":[{"type":"appStoreVersionLocalizations","id":"${new-asvl-id}"}]}}},50      {"type":"appStoreVersionLocalizations","id":"${new-asvl-id}","attributes":{"locale":"fr-CA"}},51      {"type":"appInfos","id":"${new-appInfo-id}","relationships":{"appInfoLocalizations":{"data":[{"type":"appInfoLocalizations","id":"${new-appInfoLocalization-id}"}]}}},52      {"type":"appInfoLocalizations","id":"${new-appInfoLocalization-id}","attributes":{"locale":"fr-CA","name":"MacLustr CC"}}]};53  fetch("/iris/v1/apps", {method:"POST", credentials:"include", headers:{"Content-Type":"application/vnd.api+json","Accept":"application/vnd.api+json, application/json","X-Requested-With":"XMLHttpRequest"}, body: JSON.stringify(body)})54    .then(function(r){ return r.text().then(function(t){ window.__mccCreate = r.status + " " + t.slice(0,700); }); })55    .catch(function(e){ window.__mccCreate = "error " + e; });56  return "started";57})();58
Files main
Menu

Theme