Bundles several in-progress efforts that were sitting uncommitted: - User queue-preferences (migration 087, API route, popover component) - QBO invoice soft-delete (migration 088) and AR diagnostics route - Dashboard/mobile engagement route and page adjustments - Docker Compose log-rotation config - One-off ticket/RMM investigation scripts (scripts/) - Planning docs: phase verification/pattern notes, mobile shell design spec - .gitignore: exclude local scratch financial/inventory data and Claude Code worktree/local-settings runtime state (never meant for version control) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6RuWdiUiXrPK6FLBHjtpY
26 lines
988 B
TypeScript
26 lines
988 B
TypeScript
import { config } from 'dotenv';
|
|
import { resolve } from 'path';
|
|
config({ path: resolve('/opt/stacks/pulse/.env.local') });
|
|
|
|
async function main() {
|
|
const res = await fetch(`${process.env.AUTOTASK_API_URL}/Tickets/query`, {
|
|
method: 'POST',
|
|
headers: {
|
|
Username: process.env.AUTOTASK_USERNAME!,
|
|
Secret: process.env.AUTOTASK_SECRET!,
|
|
APIIntegrationcode: process.env.AUTOTASK_API_INTEGRATION_CODE!,
|
|
'Content-Type': 'application/json',
|
|
Accept: 'application/json',
|
|
},
|
|
body: JSON.stringify({ MaxRecords: 1, filter: [{ field: 'id', op: 'gt', value: 0 }] }),
|
|
});
|
|
const data = await res.json();
|
|
const rec = data.items[0];
|
|
console.log('All string fields:');
|
|
for (const [k, v] of Object.entries(rec).sort()) {
|
|
if (typeof v === 'string') console.log(` ${k.padEnd(45)} len=${(v as string).length}`);
|
|
}
|
|
console.log('\nAll field names (for reference):');
|
|
console.log(Object.keys(rec).sort().join(', '));
|
|
}
|
|
main().catch(console.error);
|