collabSupport/.gitignore
Joseph McQueen 07152a467b Add scripts/removeAdvancedMessaging.js + extract shared bulk lib
New scripts/removeAdvancedMessaging.js reads a Users Export CSV
and bulk-removes the Advanced Messaging and Advanced Space Meetings
licenses from every listed user (with optional add of a Basic
Messaging license, though in most Webex orgs Basic Messaging is a
derived entitlement and no explicit add is required).

Detection is authoritative like the reclaim script: the assignee
rosters of the two Advanced licenses are fetched once up-front,
unioned by email, and the CSV is cross-referenced. PersonIds come
straight off the roster (no per-user /people lookup). Only the
remove ops the user actually still needs are emitted — the PATCH
body is trimmed per user based on which licenses they hold.

Dry-run enumerates every org license whose name matches
/message|advanced|space|basic/i so the operator can discover the
three ids without prior knowledge. --advanced-messaging-license-id,
--advanced-space-meetings-license-id, and --basic-messaging-license-id
also read WEBEX_ADV_MSG_LICENSE_ID / WEBEX_ADV_SPACE_MTG_LICENSE_ID
/ WEBEX_BASIC_MSG_LICENSE_ID from .env if set.

Also extracted the CSV parsing, format detection, pool/retry
helpers, and Webex license helpers from reclaimWebexHosts.js into
a shared scripts/lib/webexBulk.js module. reclaimWebexHosts.js now
imports from it — no behavior change (verified against both CSV
formats: 1028 candidates on the Meetings Inactive Users report,
665 on the Users Export report). Net -106 lines from the reclaim
script.

.gitignore updates:
  - whitelist scripts/lib/ and the new removeAdvancedMessaging.js
    file so they get tracked
  - exclude reclaim-*.csv and remove-*.csv (per-user report CSVs
    generated by --report contain PII and must never be committed)
2026-07-07 15:54:37 -04:00

85 lines
1.6 KiB
Text

# Dependencies
node_modules/
# Environment & Secrets
.env
.env.local
.env.*.local
*.pem
*.cer
*.key
debug_cert_*.pem
# The rotating service token file must be provided locally for Docker mounts (and runtime writes).
# Never commit real tokens.
config/webex-service-tokens.json
# Logs & Runtime data
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Storage / Certificates / Debug artifacts (provide aeoroots.cer etc. locally for your clone; volume mounted in Docker)
storage/
# Dev / test artifacts (local only)
characterization-runs/
scripts/*
# Tracked operational scripts (whitelisted; keep local dev helpers ignored above)
!scripts/reclaimWebexHosts.js
!scripts/removeAdvancedMessaging.js
!scripts/lib/
!scripts/lib/**
characterize-*.js
# Backup & temp files
*.bak
*~
*.swp
.DS_Store
Thumbs.db
# IDE / Editor
.idea/
.vscode/
*.sublime-project
*.sublime-workspace
.history/
# Build / Output
dist/
build/
coverage/
.nyc_output/
# DECT relay agent deploy bundles produced by dect-relay-agent/bundle.sh.
# The datestamped zip lands at repo root and shouldn't be committed —
# it's ~40MB (Docker image tarball) and rebuildable on demand.
dect-relay-agent-bundle-*.zip
dect-relay-agent-bundle-*/
# Docker / Misc
docker-compose.override.yml
# OS generated
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes
# Misc project artifacts
testobjects.json
meraki-store-topology-demo.html
config/config.json
config/config.bak
# Local spike samples pulled from lab DBS-210 (never commit)
.dect-samples/
# Per-user report CSVs written by the bulk admin scripts.
# These contain emails, personIds, and per-user outcome — PII, never commit.
reclaim-*.csv
remove-*.csv