@rayanmustafa/discord-chat-exporter 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @rayanmustafa/discord-chat-exporter might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.md +370 -0
- package/dist/ai/providers.d.ts +57 -0
- package/dist/ai/providers.d.ts.map +1 -0
- package/dist/ai/providers.js +297 -0
- package/dist/ai/providers.js.map +1 -0
- package/dist/analytics/report.d.ts +3 -0
- package/dist/analytics/report.d.ts.map +1 -0
- package/dist/analytics/report.js +264 -0
- package/dist/analytics/report.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -0
- package/dist/contracts/public-types-contract.d.ts +2 -0
- package/dist/contracts/public-types-contract.d.ts.map +1 -0
- package/dist/contracts/public-types-contract.js +2 -0
- package/dist/contracts/public-types-contract.js.map +1 -0
- package/dist/core/attachments.d.ts +12 -0
- package/dist/core/attachments.d.ts.map +1 -0
- package/dist/core/attachments.js +130 -0
- package/dist/core/attachments.js.map +1 -0
- package/dist/core/batch-export.d.ts +7 -0
- package/dist/core/batch-export.d.ts.map +1 -0
- package/dist/core/batch-export.js +129 -0
- package/dist/core/batch-export.js.map +1 -0
- package/dist/core/collector.d.ts +16 -0
- package/dist/core/collector.d.ts.map +1 -0
- package/dist/core/collector.js +88 -0
- package/dist/core/collector.js.map +1 -0
- package/dist/core/compliance.d.ts +17 -0
- package/dist/core/compliance.d.ts.map +1 -0
- package/dist/core/compliance.js +130 -0
- package/dist/core/compliance.js.map +1 -0
- package/dist/core/database-delivery.d.ts +14 -0
- package/dist/core/database-delivery.d.ts.map +1 -0
- package/dist/core/database-delivery.js +448 -0
- package/dist/core/database-delivery.js.map +1 -0
- package/dist/core/delta.d.ts +18 -0
- package/dist/core/delta.d.ts.map +1 -0
- package/dist/core/delta.js +110 -0
- package/dist/core/delta.js.map +1 -0
- package/dist/core/discord-api.d.ts +27 -0
- package/dist/core/discord-api.d.ts.map +1 -0
- package/dist/core/discord-api.js +88 -0
- package/dist/core/discord-api.js.map +1 -0
- package/dist/core/discord-delivery.d.ts +7 -0
- package/dist/core/discord-delivery.d.ts.map +1 -0
- package/dist/core/discord-delivery.js +103 -0
- package/dist/core/discord-delivery.js.map +1 -0
- package/dist/core/errors.d.ts +2 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +2 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/exporter.d.ts +25 -0
- package/dist/core/exporter.d.ts.map +1 -0
- package/dist/core/exporter.js +390 -0
- package/dist/core/exporter.js.map +1 -0
- package/dist/core/filter-engine.d.ts +9 -0
- package/dist/core/filter-engine.d.ts.map +1 -0
- package/dist/core/filter-engine.js +242 -0
- package/dist/core/filter-engine.js.map +1 -0
- package/dist/core/hash.d.ts +6 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +21 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/monitoring.d.ts +8 -0
- package/dist/core/monitoring.d.ts.map +1 -0
- package/dist/core/monitoring.js +19 -0
- package/dist/core/monitoring.js.map +1 -0
- package/dist/core/normalize.d.ts +18 -0
- package/dist/core/normalize.d.ts.map +1 -0
- package/dist/core/normalize.js +208 -0
- package/dist/core/normalize.js.map +1 -0
- package/dist/core/redaction.d.ts +6 -0
- package/dist/core/redaction.d.ts.map +1 -0
- package/dist/core/redaction.js +209 -0
- package/dist/core/redaction.js.map +1 -0
- package/dist/core/storage-delivery.d.ts +10 -0
- package/dist/core/storage-delivery.d.ts.map +1 -0
- package/dist/core/storage-delivery.js +209 -0
- package/dist/core/storage-delivery.js.map +1 -0
- package/dist/core/webhook-delivery.d.ts +14 -0
- package/dist/core/webhook-delivery.d.ts.map +1 -0
- package/dist/core/webhook-delivery.js +244 -0
- package/dist/core/webhook-delivery.js.map +1 -0
- package/dist/features/export/application/validate-request.d.ts +4 -0
- package/dist/features/export/application/validate-request.d.ts.map +1 -0
- package/dist/features/export/application/validate-request.js +53 -0
- package/dist/features/export/application/validate-request.js.map +1 -0
- package/dist/features/export/infrastructure/output-plan.d.ts +8 -0
- package/dist/features/export/infrastructure/output-plan.d.ts.map +1 -0
- package/dist/features/export/infrastructure/output-plan.js +21 -0
- package/dist/features/export/infrastructure/output-plan.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/client-script.d.ts +2 -0
- package/dist/features/rendering/infrastructure/html/client-script.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/client-script.js +134 -0
- package/dist/features/rendering/infrastructure/html/client-script.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/escape-html.d.ts +2 -0
- package/dist/features/rendering/infrastructure/html/escape-html.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/escape-html.js +9 -0
- package/dist/features/rendering/infrastructure/html/escape-html.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/styles.d.ts +3 -0
- package/dist/features/rendering/infrastructure/html/styles.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/styles.js +424 -0
- package/dist/features/rendering/infrastructure/html/styles.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/template-engine.d.ts +16 -0
- package/dist/features/rendering/infrastructure/html/template-engine.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/template-engine.js +138 -0
- package/dist/features/rendering/infrastructure/html/template-engine.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/types.d.ts +60 -0
- package/dist/features/rendering/infrastructure/html/types.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/types.js +2 -0
- package/dist/features/rendering/infrastructure/html/types.js.map +1 -0
- package/dist/features/rendering/infrastructure/html/view-data.d.ts +5 -0
- package/dist/features/rendering/infrastructure/html/view-data.d.ts.map +1 -0
- package/dist/features/rendering/infrastructure/html/view-data.js +129 -0
- package/dist/features/rendering/infrastructure/html/view-data.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/ticket-close-advanced.d.ts +6 -0
- package/dist/integrations/ticket-close-advanced.d.ts.map +1 -0
- package/dist/integrations/ticket-close-advanced.js +79 -0
- package/dist/integrations/ticket-close-advanced.js.map +1 -0
- package/dist/integrations/ticket-close.d.ts +6 -0
- package/dist/integrations/ticket-close.d.ts.map +1 -0
- package/dist/integrations/ticket-close.js +42 -0
- package/dist/integrations/ticket-close.js.map +1 -0
- package/dist/interfaces/cli/build-request.d.ts +15 -0
- package/dist/interfaces/cli/build-request.d.ts.map +1 -0
- package/dist/interfaces/cli/build-request.js +340 -0
- package/dist/interfaces/cli/build-request.js.map +1 -0
- package/dist/interfaces/cli/loaders.d.ts +4 -0
- package/dist/interfaces/cli/loaders.d.ts.map +1 -0
- package/dist/interfaces/cli/loaders.js +33 -0
- package/dist/interfaces/cli/loaders.js.map +1 -0
- package/dist/interfaces/cli/providers.d.ts +3 -0
- package/dist/interfaces/cli/providers.d.ts.map +1 -0
- package/dist/interfaces/cli/providers.js +31 -0
- package/dist/interfaces/cli/providers.js.map +1 -0
- package/dist/interfaces/cli/schemas.d.ts +198 -0
- package/dist/interfaces/cli/schemas.d.ts.map +1 -0
- package/dist/interfaces/cli/schemas.js +211 -0
- package/dist/interfaces/cli/schemas.js.map +1 -0
- package/dist/modules/ai/index.d.ts +3 -0
- package/dist/modules/ai/index.d.ts.map +1 -0
- package/dist/modules/ai/index.js +2 -0
- package/dist/modules/ai/index.js.map +1 -0
- package/dist/modules/ai/providers.d.ts +57 -0
- package/dist/modules/ai/providers.d.ts.map +1 -0
- package/dist/modules/ai/providers.js +297 -0
- package/dist/modules/ai/providers.js.map +1 -0
- package/dist/modules/analytics/index.d.ts +2 -0
- package/dist/modules/analytics/index.d.ts.map +1 -0
- package/dist/modules/analytics/index.js +2 -0
- package/dist/modules/analytics/index.js.map +1 -0
- package/dist/modules/analytics/report.d.ts +3 -0
- package/dist/modules/analytics/report.d.ts.map +1 -0
- package/dist/modules/analytics/report.js +264 -0
- package/dist/modules/analytics/report.js.map +1 -0
- package/dist/modules/cli/build-request.d.ts +15 -0
- package/dist/modules/cli/build-request.d.ts.map +1 -0
- package/dist/modules/cli/build-request.js +340 -0
- package/dist/modules/cli/build-request.js.map +1 -0
- package/dist/modules/cli/index.d.ts +6 -0
- package/dist/modules/cli/index.d.ts.map +1 -0
- package/dist/modules/cli/index.js +5 -0
- package/dist/modules/cli/index.js.map +1 -0
- package/dist/modules/cli/loaders.d.ts +4 -0
- package/dist/modules/cli/loaders.d.ts.map +1 -0
- package/dist/modules/cli/loaders.js +33 -0
- package/dist/modules/cli/loaders.js.map +1 -0
- package/dist/modules/cli/providers.d.ts +3 -0
- package/dist/modules/cli/providers.d.ts.map +1 -0
- package/dist/modules/cli/providers.js +31 -0
- package/dist/modules/cli/providers.js.map +1 -0
- package/dist/modules/cli/schemas.d.ts +198 -0
- package/dist/modules/cli/schemas.d.ts.map +1 -0
- package/dist/modules/cli/schemas.js +211 -0
- package/dist/modules/cli/schemas.js.map +1 -0
- package/dist/modules/compliance/index.d.ts +17 -0
- package/dist/modules/compliance/index.d.ts.map +1 -0
- package/dist/modules/compliance/index.js +130 -0
- package/dist/modules/compliance/index.js.map +1 -0
- package/dist/modules/delivery/database-delivery.d.ts +14 -0
- package/dist/modules/delivery/database-delivery.d.ts.map +1 -0
- package/dist/modules/delivery/database-delivery.js +424 -0
- package/dist/modules/delivery/database-delivery.js.map +1 -0
- package/dist/modules/delivery/discord-delivery.d.ts +7 -0
- package/dist/modules/delivery/discord-delivery.d.ts.map +1 -0
- package/dist/modules/delivery/discord-delivery.js +103 -0
- package/dist/modules/delivery/discord-delivery.js.map +1 -0
- package/dist/modules/delivery/index.d.ts +5 -0
- package/dist/modules/delivery/index.d.ts.map +1 -0
- package/dist/modules/delivery/index.js +5 -0
- package/dist/modules/delivery/index.js.map +1 -0
- package/dist/modules/delivery/storage-delivery.d.ts +10 -0
- package/dist/modules/delivery/storage-delivery.d.ts.map +1 -0
- package/dist/modules/delivery/storage-delivery.js +195 -0
- package/dist/modules/delivery/storage-delivery.js.map +1 -0
- package/dist/modules/delivery/webhook-delivery.d.ts +14 -0
- package/dist/modules/delivery/webhook-delivery.d.ts.map +1 -0
- package/dist/modules/delivery/webhook-delivery.js +245 -0
- package/dist/modules/delivery/webhook-delivery.js.map +1 -0
- package/dist/modules/discord/collector.d.ts +18 -0
- package/dist/modules/discord/collector.d.ts.map +1 -0
- package/dist/modules/discord/collector.js +29 -0
- package/dist/modules/discord/collector.js.map +1 -0
- package/dist/modules/discord/discord-api.d.ts +89 -0
- package/dist/modules/discord/discord-api.d.ts.map +1 -0
- package/dist/modules/discord/discord-api.js +78 -0
- package/dist/modules/discord/discord-api.js.map +1 -0
- package/dist/modules/discord/index.d.ts +3 -0
- package/dist/modules/discord/index.d.ts.map +1 -0
- package/dist/modules/discord/index.js +3 -0
- package/dist/modules/discord/index.js.map +1 -0
- package/dist/modules/export/application/ai-summary.d.ts +7 -0
- package/dist/modules/export/application/ai-summary.d.ts.map +1 -0
- package/dist/modules/export/application/ai-summary.js +27 -0
- package/dist/modules/export/application/ai-summary.js.map +1 -0
- package/dist/modules/export/application/delivery-resolver.d.ts +20 -0
- package/dist/modules/export/application/delivery-resolver.d.ts.map +1 -0
- package/dist/modules/export/application/delivery-resolver.js +79 -0
- package/dist/modules/export/application/delivery-resolver.js.map +1 -0
- package/dist/modules/export/application/incremental-state.d.ts +5 -0
- package/dist/modules/export/application/incremental-state.d.ts.map +1 -0
- package/dist/modules/export/application/incremental-state.js +56 -0
- package/dist/modules/export/application/incremental-state.js.map +1 -0
- package/dist/modules/export/application/recorder-merge.d.ts +3 -0
- package/dist/modules/export/application/recorder-merge.d.ts.map +1 -0
- package/dist/modules/export/application/recorder-merge.js +69 -0
- package/dist/modules/export/application/recorder-merge.js.map +1 -0
- package/dist/modules/export/application/transcript-chunking.d.ts +8 -0
- package/dist/modules/export/application/transcript-chunking.d.ts.map +1 -0
- package/dist/modules/export/application/transcript-chunking.js +50 -0
- package/dist/modules/export/application/transcript-chunking.js.map +1 -0
- package/dist/modules/export/application/validate-request.d.ts +4 -0
- package/dist/modules/export/application/validate-request.d.ts.map +1 -0
- package/dist/modules/export/application/validate-request.js +53 -0
- package/dist/modules/export/application/validate-request.js.map +1 -0
- package/dist/modules/export/batch-export.d.ts +7 -0
- package/dist/modules/export/batch-export.d.ts.map +1 -0
- package/dist/modules/export/batch-export.js +129 -0
- package/dist/modules/export/batch-export.js.map +1 -0
- package/dist/modules/export/index.d.ts +6 -0
- package/dist/modules/export/index.d.ts.map +1 -0
- package/dist/modules/export/index.js +6 -0
- package/dist/modules/export/index.js.map +1 -0
- package/dist/modules/export/infrastructure/output-plan.d.ts +8 -0
- package/dist/modules/export/infrastructure/output-plan.d.ts.map +1 -0
- package/dist/modules/export/infrastructure/output-plan.js +21 -0
- package/dist/modules/export/infrastructure/output-plan.js.map +1 -0
- package/dist/modules/export/monitoring.d.ts +8 -0
- package/dist/modules/export/monitoring.d.ts.map +1 -0
- package/dist/modules/export/monitoring.js +20 -0
- package/dist/modules/export/monitoring.js.map +1 -0
- package/dist/modules/integrations/index.d.ts +3 -0
- package/dist/modules/integrations/index.d.ts.map +1 -0
- package/dist/modules/integrations/index.js +3 -0
- package/dist/modules/integrations/index.js.map +1 -0
- package/dist/modules/integrations/ticket-close-advanced.d.ts +6 -0
- package/dist/modules/integrations/ticket-close-advanced.d.ts.map +1 -0
- package/dist/modules/integrations/ticket-close-advanced.js +79 -0
- package/dist/modules/integrations/ticket-close-advanced.js.map +1 -0
- package/dist/modules/integrations/ticket-close.d.ts +6 -0
- package/dist/modules/integrations/ticket-close.d.ts.map +1 -0
- package/dist/modules/integrations/ticket-close.js +42 -0
- package/dist/modules/integrations/ticket-close.js.map +1 -0
- package/dist/modules/recorder/index.d.ts +2 -0
- package/dist/modules/recorder/index.d.ts.map +1 -0
- package/dist/modules/recorder/index.js +2 -0
- package/dist/modules/recorder/index.js.map +1 -0
- package/dist/modules/recorder/live-recorder.d.ts +3 -0
- package/dist/modules/recorder/live-recorder.d.ts.map +1 -0
- package/dist/modules/recorder/live-recorder.js +118 -0
- package/dist/modules/recorder/live-recorder.js.map +1 -0
- package/dist/modules/rendering/analytics.d.ts +3 -0
- package/dist/modules/rendering/analytics.d.ts.map +1 -0
- package/dist/modules/rendering/analytics.js +8 -0
- package/dist/modules/rendering/analytics.js.map +1 -0
- package/dist/modules/rendering/csv.d.ts +3 -0
- package/dist/modules/rendering/csv.d.ts.map +1 -0
- package/dist/modules/rendering/csv.js +39 -0
- package/dist/modules/rendering/csv.js.map +1 -0
- package/dist/modules/rendering/docx.d.ts +3 -0
- package/dist/modules/rendering/docx.d.ts.map +1 -0
- package/dist/modules/rendering/docx.js +65 -0
- package/dist/modules/rendering/docx.js.map +1 -0
- package/dist/modules/rendering/html.d.ts +4 -0
- package/dist/modules/rendering/html.d.ts.map +1 -0
- package/dist/modules/rendering/html.js +44 -0
- package/dist/modules/rendering/html.js.map +1 -0
- package/dist/modules/rendering/index.d.ts +13 -0
- package/dist/modules/rendering/index.d.ts.map +1 -0
- package/dist/modules/rendering/index.js +13 -0
- package/dist/modules/rendering/index.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/client-script.d.ts +2 -0
- package/dist/modules/rendering/infrastructure/html/client-script.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/client-script.js +134 -0
- package/dist/modules/rendering/infrastructure/html/client-script.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/escape-html.d.ts +2 -0
- package/dist/modules/rendering/infrastructure/html/escape-html.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/escape-html.js +9 -0
- package/dist/modules/rendering/infrastructure/html/escape-html.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/styles.d.ts +3 -0
- package/dist/modules/rendering/infrastructure/html/styles.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/styles.js +424 -0
- package/dist/modules/rendering/infrastructure/html/styles.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/template-engine.d.ts +16 -0
- package/dist/modules/rendering/infrastructure/html/template-engine.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/template-engine.js +138 -0
- package/dist/modules/rendering/infrastructure/html/template-engine.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/types.d.ts +60 -0
- package/dist/modules/rendering/infrastructure/html/types.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/types.js +2 -0
- package/dist/modules/rendering/infrastructure/html/types.js.map +1 -0
- package/dist/modules/rendering/infrastructure/html/view-data.d.ts +5 -0
- package/dist/modules/rendering/infrastructure/html/view-data.d.ts.map +1 -0
- package/dist/modules/rendering/infrastructure/html/view-data.js +129 -0
- package/dist/modules/rendering/infrastructure/html/view-data.js.map +1 -0
- package/dist/modules/rendering/json.d.ts +4 -0
- package/dist/modules/rendering/json.d.ts.map +1 -0
- package/dist/modules/rendering/json.js +42 -0
- package/dist/modules/rendering/json.js.map +1 -0
- package/dist/modules/rendering/markdown.d.ts +3 -0
- package/dist/modules/rendering/markdown.d.ts.map +1 -0
- package/dist/modules/rendering/markdown.js +61 -0
- package/dist/modules/rendering/markdown.js.map +1 -0
- package/dist/modules/rendering/pdf.d.ts +3 -0
- package/dist/modules/rendering/pdf.d.ts.map +1 -0
- package/dist/modules/rendering/pdf.js +44 -0
- package/dist/modules/rendering/pdf.js.map +1 -0
- package/dist/modules/rendering/registry.d.ts +8 -0
- package/dist/modules/rendering/registry.d.ts.map +1 -0
- package/dist/modules/rendering/registry.js +13 -0
- package/dist/modules/rendering/registry.js.map +1 -0
- package/dist/modules/rendering/sqlite.d.ts +3 -0
- package/dist/modules/rendering/sqlite.d.ts.map +1 -0
- package/dist/modules/rendering/sqlite.js +130 -0
- package/dist/modules/rendering/sqlite.js.map +1 -0
- package/dist/modules/rendering/text.d.ts +3 -0
- package/dist/modules/rendering/text.d.ts.map +1 -0
- package/dist/modules/rendering/text.js +35 -0
- package/dist/modules/rendering/text.js.map +1 -0
- package/dist/modules/rendering/types.d.ts +3 -0
- package/dist/modules/rendering/types.d.ts.map +1 -0
- package/dist/modules/rendering/types.js +16 -0
- package/dist/modules/rendering/types.js.map +1 -0
- package/dist/modules/rendering/xml.d.ts +3 -0
- package/dist/modules/rendering/xml.d.ts.map +1 -0
- package/dist/modules/rendering/xml.js +50 -0
- package/dist/modules/rendering/xml.js.map +1 -0
- package/dist/modules/rendering/zip.d.ts +7 -0
- package/dist/modules/rendering/zip.d.ts.map +1 -0
- package/dist/modules/rendering/zip.js +70 -0
- package/dist/modules/rendering/zip.js.map +1 -0
- package/dist/modules/scheduler/engine.d.ts +13 -0
- package/dist/modules/scheduler/engine.d.ts.map +1 -0
- package/dist/modules/scheduler/engine.js +26 -0
- package/dist/modules/scheduler/engine.js.map +1 -0
- package/dist/modules/scheduler/index.d.ts +4 -0
- package/dist/modules/scheduler/index.d.ts.map +1 -0
- package/dist/modules/scheduler/index.js +4 -0
- package/dist/modules/scheduler/index.js.map +1 -0
- package/dist/modules/scheduler/runner.d.ts +24 -0
- package/dist/modules/scheduler/runner.d.ts.map +1 -0
- package/dist/modules/scheduler/runner.js +128 -0
- package/dist/modules/scheduler/runner.js.map +1 -0
- package/dist/modules/scheduler/store.d.ts +21 -0
- package/dist/modules/scheduler/store.d.ts.map +1 -0
- package/dist/modules/scheduler/store.js +72 -0
- package/dist/modules/scheduler/store.js.map +1 -0
- package/dist/modules/transcript/attachments.d.ts +13 -0
- package/dist/modules/transcript/attachments.d.ts.map +1 -0
- package/dist/modules/transcript/attachments.js +50 -0
- package/dist/modules/transcript/attachments.js.map +1 -0
- package/dist/modules/transcript/delta.d.ts +17 -0
- package/dist/modules/transcript/delta.d.ts.map +1 -0
- package/dist/modules/transcript/delta.js +45 -0
- package/dist/modules/transcript/delta.js.map +1 -0
- package/dist/modules/transcript/filter-engine.d.ts +10 -0
- package/dist/modules/transcript/filter-engine.d.ts.map +1 -0
- package/dist/modules/transcript/filter-engine.js +131 -0
- package/dist/modules/transcript/filter-engine.js.map +1 -0
- package/dist/modules/transcript/hash.d.ts +6 -0
- package/dist/modules/transcript/hash.d.ts.map +1 -0
- package/dist/modules/transcript/hash.js +21 -0
- package/dist/modules/transcript/hash.js.map +1 -0
- package/dist/modules/transcript/index.d.ts +7 -0
- package/dist/modules/transcript/index.d.ts.map +1 -0
- package/dist/modules/transcript/index.js +7 -0
- package/dist/modules/transcript/index.js.map +1 -0
- package/dist/modules/transcript/normalize.d.ts +20 -0
- package/dist/modules/transcript/normalize.d.ts.map +1 -0
- package/dist/modules/transcript/normalize.js +123 -0
- package/dist/modules/transcript/normalize.js.map +1 -0
- package/dist/modules/transcript/redaction.d.ts +9 -0
- package/dist/modules/transcript/redaction.d.ts.map +1 -0
- package/dist/modules/transcript/redaction.js +82 -0
- package/dist/modules/transcript/redaction.js.map +1 -0
- package/dist/plugins/registry.d.ts +8 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +13 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/recorder/live-recorder.d.ts +3 -0
- package/dist/recorder/live-recorder.d.ts.map +1 -0
- package/dist/recorder/live-recorder.js +118 -0
- package/dist/recorder/live-recorder.js.map +1 -0
- package/dist/renderers/analytics.d.ts +3 -0
- package/dist/renderers/analytics.d.ts.map +1 -0
- package/dist/renderers/analytics.js +8 -0
- package/dist/renderers/analytics.js.map +1 -0
- package/dist/renderers/csv.d.ts +3 -0
- package/dist/renderers/csv.d.ts.map +1 -0
- package/dist/renderers/csv.js +39 -0
- package/dist/renderers/csv.js.map +1 -0
- package/dist/renderers/docx.d.ts +3 -0
- package/dist/renderers/docx.d.ts.map +1 -0
- package/dist/renderers/docx.js +65 -0
- package/dist/renderers/docx.js.map +1 -0
- package/dist/renderers/html.d.ts +4 -0
- package/dist/renderers/html.d.ts.map +1 -0
- package/dist/renderers/html.js +44 -0
- package/dist/renderers/html.js.map +1 -0
- package/dist/renderers/index.d.ts +12 -0
- package/dist/renderers/index.d.ts.map +1 -0
- package/dist/renderers/index.js +12 -0
- package/dist/renderers/index.js.map +1 -0
- package/dist/renderers/json.d.ts +4 -0
- package/dist/renderers/json.d.ts.map +1 -0
- package/dist/renderers/json.js +42 -0
- package/dist/renderers/json.js.map +1 -0
- package/dist/renderers/markdown.d.ts +3 -0
- package/dist/renderers/markdown.d.ts.map +1 -0
- package/dist/renderers/markdown.js +61 -0
- package/dist/renderers/markdown.js.map +1 -0
- package/dist/renderers/pdf.d.ts +3 -0
- package/dist/renderers/pdf.d.ts.map +1 -0
- package/dist/renderers/pdf.js +44 -0
- package/dist/renderers/pdf.js.map +1 -0
- package/dist/renderers/sqlite.d.ts +3 -0
- package/dist/renderers/sqlite.d.ts.map +1 -0
- package/dist/renderers/sqlite.js +136 -0
- package/dist/renderers/sqlite.js.map +1 -0
- package/dist/renderers/text.d.ts +3 -0
- package/dist/renderers/text.d.ts.map +1 -0
- package/dist/renderers/text.js +35 -0
- package/dist/renderers/text.js.map +1 -0
- package/dist/renderers/types.d.ts +3 -0
- package/dist/renderers/types.d.ts.map +1 -0
- package/dist/renderers/types.js +16 -0
- package/dist/renderers/types.js.map +1 -0
- package/dist/renderers/xml.d.ts +3 -0
- package/dist/renderers/xml.d.ts.map +1 -0
- package/dist/renderers/xml.js +50 -0
- package/dist/renderers/xml.js.map +1 -0
- package/dist/renderers/zip.d.ts +7 -0
- package/dist/renderers/zip.d.ts.map +1 -0
- package/dist/renderers/zip.js +70 -0
- package/dist/renderers/zip.js.map +1 -0
- package/dist/scheduler/engine.d.ts +13 -0
- package/dist/scheduler/engine.d.ts.map +1 -0
- package/dist/scheduler/engine.js +31 -0
- package/dist/scheduler/engine.js.map +1 -0
- package/dist/scheduler/index.d.ts +4 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +4 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/scheduler/runner.d.ts +24 -0
- package/dist/scheduler/runner.d.ts.map +1 -0
- package/dist/scheduler/runner.js +128 -0
- package/dist/scheduler/runner.js.map +1 -0
- package/dist/scheduler/store.d.ts +21 -0
- package/dist/scheduler/store.d.ts.map +1 -0
- package/dist/scheduler/store.js +72 -0
- package/dist/scheduler/store.js.map +1 -0
- package/dist/shared/async/concurrency.d.ts +4 -0
- package/dist/shared/async/concurrency.d.ts.map +1 -0
- package/dist/shared/async/concurrency.js +10 -0
- package/dist/shared/async/concurrency.js.map +1 -0
- package/dist/shared/constants.d.ts +7 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +7 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/errors/index.d.ts +16 -0
- package/dist/shared/errors/index.d.ts.map +1 -0
- package/dist/shared/errors/index.js +27 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/json/safe-json.d.ts +5 -0
- package/dist/shared/json/safe-json.d.ts.map +1 -0
- package/dist/shared/json/safe-json.js +16 -0
- package/dist/shared/json/safe-json.js.map +1 -0
- package/dist/shared/optional-require.d.ts +6 -0
- package/dist/shared/optional-require.d.ts.map +1 -0
- package/dist/shared/optional-require.js +17 -0
- package/dist/shared/optional-require.js.map +1 -0
- package/dist/shared/utils/snowflake.d.ts +5 -0
- package/dist/shared/utils/snowflake.d.ts.map +1 -0
- package/dist/shared/utils/snowflake.js +35 -0
- package/dist/shared/utils/snowflake.js.map +1 -0
- package/dist/types/ai.d.ts +19 -0
- package/dist/types/ai.d.ts.map +1 -0
- package/dist/types/ai.js +2 -0
- package/dist/types/ai.js.map +1 -0
- package/dist/types/analytics.d.ts +69 -0
- package/dist/types/analytics.d.ts.map +1 -0
- package/dist/types/analytics.js +2 -0
- package/dist/types/analytics.js.map +1 -0
- package/dist/types/compliance.d.ts +41 -0
- package/dist/types/compliance.d.ts.map +1 -0
- package/dist/types/compliance.js +2 -0
- package/dist/types/compliance.js.map +1 -0
- package/dist/types/delta.d.ts +13 -0
- package/dist/types/delta.d.ts.map +1 -0
- package/dist/types/delta.js +2 -0
- package/dist/types/delta.js.map +1 -0
- package/dist/types/filters.d.ts +79 -0
- package/dist/types/filters.d.ts.map +1 -0
- package/dist/types/filters.js +2 -0
- package/dist/types/filters.js.map +1 -0
- package/dist/types/formats.d.ts +2 -0
- package/dist/types/formats.d.ts.map +1 -0
- package/dist/types/formats.js +2 -0
- package/dist/types/formats.js.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/integrations.d.ts +19 -0
- package/dist/types/integrations.d.ts.map +1 -0
- package/dist/types/integrations.js +2 -0
- package/dist/types/integrations.js.map +1 -0
- package/dist/types/monitoring.d.ts +34 -0
- package/dist/types/monitoring.d.ts.map +1 -0
- package/dist/types/monitoring.js +2 -0
- package/dist/types/monitoring.js.map +1 -0
- package/dist/types/output.d.ts +146 -0
- package/dist/types/output.d.ts.map +1 -0
- package/dist/types/output.js +2 -0
- package/dist/types/output.js.map +1 -0
- package/dist/types/recorder.d.ts +14 -0
- package/dist/types/recorder.d.ts.map +1 -0
- package/dist/types/recorder.js +2 -0
- package/dist/types/recorder.js.map +1 -0
- package/dist/types/redaction.d.ts +23 -0
- package/dist/types/redaction.d.ts.map +1 -0
- package/dist/types/redaction.js +2 -0
- package/dist/types/redaction.js.map +1 -0
- package/dist/types/render.d.ts +25 -0
- package/dist/types/render.d.ts.map +1 -0
- package/dist/types/render.js +2 -0
- package/dist/types/render.js.map +1 -0
- package/dist/types/request.d.ts +41 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/request.js +2 -0
- package/dist/types/request.js.map +1 -0
- package/dist/types/result.d.ts +90 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/result.js +2 -0
- package/dist/types/result.js.map +1 -0
- package/dist/types/stats.d.ts +15 -0
- package/dist/types/stats.d.ts.map +1 -0
- package/dist/types/stats.js +2 -0
- package/dist/types/stats.js.map +1 -0
- package/dist/types/transcript.d.ts +123 -0
- package/dist/types/transcript.d.ts.map +1 -0
- package/dist/types/transcript.js +2 -0
- package/dist/types/transcript.js.map +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +94 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rayan Mustafa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
# @rayanmustafa/discord-chat-exporter
|
|
2
|
+
|
|
3
|
+
High-fidelity Discord transcript exporter for bot-based workflows.
|
|
4
|
+
|
|
5
|
+
## Full Documentation
|
|
6
|
+
|
|
7
|
+
Complete docs are available in `docs/README.md` and the full `docs/` index.
|
|
8
|
+
|
|
9
|
+
## What is implemented now
|
|
10
|
+
|
|
11
|
+
- Bot-token-only export flow (Discord API compliant)
|
|
12
|
+
- Channel + thread history export with pagination and retry handling
|
|
13
|
+
- Canonical transcript model preserving raw Discord message payloads
|
|
14
|
+
- Advanced filters (`AND`/`OR`, nested groups, content/state/type/time/user filters)
|
|
15
|
+
- Attachment modes: `external-link`, `local-download`, `both`, `base64-inline`
|
|
16
|
+
- Output formats:
|
|
17
|
+
- `json-full`, `json-clean`
|
|
18
|
+
- `txt`, `md`, `csv`
|
|
19
|
+
- `html-single`, `html-bundle`
|
|
20
|
+
- `pdf` (optional dependency: `playwright`)
|
|
21
|
+
- `xml`
|
|
22
|
+
- `sqlite` (optional dependency: `better-sqlite3`)
|
|
23
|
+
- `docx` (optional dependency: `docx`)
|
|
24
|
+
- `zip` with optional AES-256 encryption (`archiver-zip-encrypted`)
|
|
25
|
+
- `analytics-json`
|
|
26
|
+
- Future-phase features now implemented:
|
|
27
|
+
- Incremental export state/checkpoints
|
|
28
|
+
- Split/chunk export policy by messages/bytes
|
|
29
|
+
- Watermark + read-only + TOC + accessibility HTML modes
|
|
30
|
+
- Custom HTML templates via `render.html.templatePath` / `--html-template`
|
|
31
|
+
- Analytics report module (counts, mentions, words, heatmap, response metrics, highlights)
|
|
32
|
+
- AI summary plugin system with built-in `heuristic` provider
|
|
33
|
+
- Google Gemini provider (`GoogleGeminiProvider`)
|
|
34
|
+
- Anthropic Claude provider (`AnthropicClaudeProvider`)
|
|
35
|
+
- OpenAI provider (`OpenAIProvider`)
|
|
36
|
+
- OpenAI-compatible provider adapter (`OpenAICompatibleProvider`)
|
|
37
|
+
- Live recorder for `create/update/delete/reaction` events (NDJSON)
|
|
38
|
+
- Ticket close helper for `discord.js` integrations
|
|
39
|
+
- Advanced ticket close helper (`createAdvancedTicketCloseHandler`) with post-actions
|
|
40
|
+
- Output delivery targets:
|
|
41
|
+
- `filesystem` (default)
|
|
42
|
+
- `discord-channel` (upload artifacts directly to a Discord channel)
|
|
43
|
+
- `both` (save locally and upload to Discord)
|
|
44
|
+
- Database sink (`output.database`) with built-in drivers:
|
|
45
|
+
- `sqlite`, `postgres`, `mysql`, `mongodb`, `mongoose`
|
|
46
|
+
- custom drivers via `exporter.registerDatabaseAdapter(...)`
|
|
47
|
+
- Batch export API (`exportBatch`) with per-channel isolation and master index
|
|
48
|
+
- Cloud storage sinks (`output.storage`): `s3` (S3/R2/MinIO), `gcs`, `azure-blob`
|
|
49
|
+
- Webhook delivery (`output.webhooks`): generic HTTP, Discord webhook, Slack webhook
|
|
50
|
+
- Redaction engine (`redaction`) for PII/token profiles + custom regex
|
|
51
|
+
- Delta export mode (`delta`) with checkpoint and recorder merge best-effort
|
|
52
|
+
- Compliance artifacts (`compliance`): manifest + optional Ed25519 signature
|
|
53
|
+
- Monitoring hooks (`monitoring.onEvent`) + CLI progress JSONL
|
|
54
|
+
- Scheduler commands: `schedule add/list/run/daemon`
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm i @rayanmustafa/discord-chat-exporter
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Optional format dependencies:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm i playwright better-sqlite3 docx archiver-zip-encrypted pg mysql2 mongodb mongoose \
|
|
66
|
+
@aws-sdk/client-s3 @google-cloud/storage @azure/storage-blob @slack/webhook \
|
|
67
|
+
node-cron json-canonicalize libphonenumber-js flexsearch
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## API Example
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import {
|
|
74
|
+
createExporter,
|
|
75
|
+
GoogleGeminiProvider,
|
|
76
|
+
AnthropicClaudeProvider,
|
|
77
|
+
OpenAIProvider,
|
|
78
|
+
} from "@rayanmustafa/discord-chat-exporter";
|
|
79
|
+
|
|
80
|
+
const exporter = createExporter();
|
|
81
|
+
|
|
82
|
+
exporter.registerAIProvider(new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY! }));
|
|
83
|
+
exporter.registerAIProvider(new GoogleGeminiProvider({ apiKey: process.env.GEMINI_API_KEY! }));
|
|
84
|
+
exporter.registerAIProvider(new AnthropicClaudeProvider({ apiKey: process.env.ANTHROPIC_API_KEY! }));
|
|
85
|
+
|
|
86
|
+
const result = await exporter.exportChannel({
|
|
87
|
+
token: process.env.DISCORD_BOT_TOKEN!,
|
|
88
|
+
channelId: "123456789012345678",
|
|
89
|
+
formats: ["html-single", "json-full", "analytics-json", "zip"],
|
|
90
|
+
attachments: {
|
|
91
|
+
mode: "both",
|
|
92
|
+
downloadConcurrency: 4,
|
|
93
|
+
},
|
|
94
|
+
render: {
|
|
95
|
+
watermark: "Internal Use",
|
|
96
|
+
readOnly: true,
|
|
97
|
+
includeTableOfContents: true,
|
|
98
|
+
splitPolicy: {
|
|
99
|
+
maxMessagesPerChunk: 50000,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
output: {
|
|
103
|
+
dir: "./exports",
|
|
104
|
+
target: "both",
|
|
105
|
+
discord: {
|
|
106
|
+
channelId: "987654321098765432",
|
|
107
|
+
content: "Ticket transcript exported",
|
|
108
|
+
},
|
|
109
|
+
database: {
|
|
110
|
+
enabled: true,
|
|
111
|
+
driver: "postgres",
|
|
112
|
+
connectionString: "postgres://user:pass@localhost:5432/transcripts",
|
|
113
|
+
table: "exports_log",
|
|
114
|
+
},
|
|
115
|
+
storage: {
|
|
116
|
+
enabled: true,
|
|
117
|
+
providers: [
|
|
118
|
+
{
|
|
119
|
+
kind: "s3",
|
|
120
|
+
bucket: "my-transcripts",
|
|
121
|
+
region: "eu-central-1",
|
|
122
|
+
keyPrefix: "discord",
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
webhooks: {
|
|
127
|
+
enabled: true,
|
|
128
|
+
targets: [
|
|
129
|
+
{ kind: "generic", url: "https://example.com/webhooks/transcript" },
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
basename: "ticket-1234",
|
|
133
|
+
incremental: {
|
|
134
|
+
enabled: true,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
analytics: {
|
|
138
|
+
enabled: true,
|
|
139
|
+
includeHeatmap: true,
|
|
140
|
+
ai: {
|
|
141
|
+
enabled: true,
|
|
142
|
+
providerId: "gemini",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
redaction: {
|
|
146
|
+
enabled: true,
|
|
147
|
+
profiles: ["email", "phone", "token"],
|
|
148
|
+
},
|
|
149
|
+
delta: {
|
|
150
|
+
enabled: true,
|
|
151
|
+
checkpointFile: "./exports/.dcexport/delta-123.json",
|
|
152
|
+
},
|
|
153
|
+
compliance: {
|
|
154
|
+
manifest: { enabled: true },
|
|
155
|
+
signature: {
|
|
156
|
+
enabled: true,
|
|
157
|
+
privateKeyPath: "./keys/ed25519-private.pem",
|
|
158
|
+
keyId: "key-2026-01",
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
monitoring: {
|
|
162
|
+
onEvent(event) {
|
|
163
|
+
console.log(event.kind, event);
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
console.log(result.stats, result.analyticsReport, result.aiResult);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Batch export example:
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
const batchResult = await exporter.exportBatch({
|
|
175
|
+
token: process.env.DISCORD_BOT_TOKEN!,
|
|
176
|
+
channelIds: ["111", "222", "333"],
|
|
177
|
+
formats: ["html-bundle", "json-full"],
|
|
178
|
+
output: { dir: "./exports" },
|
|
179
|
+
batch: {
|
|
180
|
+
concurrency: 3,
|
|
181
|
+
includeMasterIndex: true,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
console.log(batchResult.stats, batchResult.masterIndex?.path);
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Custom database adapter example:
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
exporter.registerDatabaseAdapter({
|
|
192
|
+
id: "firestore",
|
|
193
|
+
async persist(ctx) {
|
|
194
|
+
// write ctx.transcript / ctx.stats / ctx.request to your database
|
|
195
|
+
return {
|
|
196
|
+
driver: "firestore",
|
|
197
|
+
exportId: "doc_123",
|
|
198
|
+
location: "firestore.exports/doc_123",
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Popular AI Providers
|
|
205
|
+
|
|
206
|
+
- `openai`: register `OpenAIProvider` with `OPENAI_API_KEY`
|
|
207
|
+
- `gemini`: register `GoogleGeminiProvider` with `GEMINI_API_KEY` (or `GOOGLE_API_KEY`)
|
|
208
|
+
- `anthropic`: register `AnthropicClaudeProvider` with `ANTHROPIC_API_KEY`
|
|
209
|
+
- `openai-compatible`: use `OpenAICompatibleProvider` for providers with OpenAI-style APIs (for example Groq, Mistral, Together, xAI)
|
|
210
|
+
|
|
211
|
+
## CLI Examples
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Provider keys (CLI auto-registers when present)
|
|
215
|
+
export OPENAI_API_KEY="..."
|
|
216
|
+
export GEMINI_API_KEY="..."
|
|
217
|
+
export ANTHROPIC_API_KEY="..."
|
|
218
|
+
|
|
219
|
+
# Rich export with future features
|
|
220
|
+
npx dcexport export \
|
|
221
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
222
|
+
--channel 123456789012345678 \
|
|
223
|
+
--formats html-single,json-full,analytics-json,pdf,zip \
|
|
224
|
+
--attachments-mode both \
|
|
225
|
+
--watermark "Internal Use" \
|
|
226
|
+
--read-only \
|
|
227
|
+
--toc \
|
|
228
|
+
--split-max-messages 50000 \
|
|
229
|
+
--incremental \
|
|
230
|
+
--analytics \
|
|
231
|
+
--analytics-heatmap \
|
|
232
|
+
--ai \
|
|
233
|
+
--ai-provider gemini \
|
|
234
|
+
--output-target both \
|
|
235
|
+
--discord-output-channel 987654321098765432 \
|
|
236
|
+
--db-sqlite ./exports/transcripts.sqlite \
|
|
237
|
+
--out ./exports
|
|
238
|
+
|
|
239
|
+
# Custom HTML template
|
|
240
|
+
npx dcexport export \
|
|
241
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
242
|
+
--channel 123456789012345678 \
|
|
243
|
+
--formats html-single \
|
|
244
|
+
--html-template ./templates/discord-like.html \
|
|
245
|
+
--out ./exports
|
|
246
|
+
|
|
247
|
+
# PostgreSQL database sink
|
|
248
|
+
npx dcexport export \
|
|
249
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
250
|
+
--channel 123456789012345678 \
|
|
251
|
+
--formats html-single,json-full \
|
|
252
|
+
--db-driver postgres \
|
|
253
|
+
--db-connection "postgres://user:pass@localhost:5432/transcripts" \
|
|
254
|
+
--db-tls \
|
|
255
|
+
--db-table exports_log \
|
|
256
|
+
--out ./exports
|
|
257
|
+
|
|
258
|
+
# MongoDB / Mongoose sink
|
|
259
|
+
npx dcexport export \
|
|
260
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
261
|
+
--channel 123456789012345678 \
|
|
262
|
+
--formats json-full \
|
|
263
|
+
--db-driver mongodb \
|
|
264
|
+
--db-connection "mongodb://localhost:27017/transcripts" \
|
|
265
|
+
--db-collection exports_log \
|
|
266
|
+
--out ./exports
|
|
267
|
+
|
|
268
|
+
# Direct delivery to Discord channel with temporary local storage
|
|
269
|
+
npx dcexport export \
|
|
270
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
271
|
+
--channel 123456789012345678 \
|
|
272
|
+
--formats html-single,json-full \
|
|
273
|
+
--output-target discord-channel \
|
|
274
|
+
--discord-output-channel 987654321098765432 \
|
|
275
|
+
--discord-output-content "Transcript ready"
|
|
276
|
+
|
|
277
|
+
# Batch export with master index + merged transcript
|
|
278
|
+
npx dcexport export-batch \
|
|
279
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
280
|
+
--channels 111111111111111111,222222222222222222,333333333333333333 \
|
|
281
|
+
--formats html-bundle,json-full \
|
|
282
|
+
--out ./exports \
|
|
283
|
+
--batch-concurrency 3 \
|
|
284
|
+
--batch-merged
|
|
285
|
+
|
|
286
|
+
# Cloud storage + webhook + redaction + delta + compliance signature
|
|
287
|
+
npx dcexport export \
|
|
288
|
+
--token "$DISCORD_BOT_TOKEN" \
|
|
289
|
+
--channel 123456789012345678 \
|
|
290
|
+
--formats html-single,json-full,zip \
|
|
291
|
+
--storage-enable \
|
|
292
|
+
--storage-provider s3 \
|
|
293
|
+
--storage-bucket my-transcripts \
|
|
294
|
+
--storage-region eu-central-1 \
|
|
295
|
+
--storage-prefix discord \
|
|
296
|
+
--webhook-generic https://example.com/hook \
|
|
297
|
+
--redaction \
|
|
298
|
+
--redaction-profiles email,phone,token \
|
|
299
|
+
--delta \
|
|
300
|
+
--delta-checkpoint ./.dcexport/delta-123.json \
|
|
301
|
+
--manifest \
|
|
302
|
+
--sign-ed25519-key ./keys/ed25519-private.pem \
|
|
303
|
+
--sign-key-id key-2026-01 \
|
|
304
|
+
--progress-jsonl ./exports/progress.jsonl \
|
|
305
|
+
--out ./exports
|
|
306
|
+
|
|
307
|
+
# Doctor checks
|
|
308
|
+
npx dcexport doctor --token "$DISCORD_BOT_TOKEN" --channel 123456789012345678
|
|
309
|
+
|
|
310
|
+
# Start detached recorder
|
|
311
|
+
npx dcexport record start --token "$DISCORD_BOT_TOKEN" --out ./.dcexport/events.ndjson
|
|
312
|
+
|
|
313
|
+
# Stop recorder
|
|
314
|
+
npx dcexport record stop
|
|
315
|
+
|
|
316
|
+
# Scheduler
|
|
317
|
+
npx dcexport schedule add --job-file ./jobs.json --state ./.dcexport/scheduler-state.json
|
|
318
|
+
npx dcexport schedule list --state ./.dcexport/scheduler-state.json
|
|
319
|
+
npx dcexport schedule run --job-id daily-ticket-exports --state ./.dcexport/scheduler-state.json
|
|
320
|
+
npx dcexport schedule daemon --jobs ./jobs.json --state ./.dcexport/scheduler-state.json
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Important limits
|
|
324
|
+
|
|
325
|
+
- Historic edit/delete timelines cannot be reconstructed completely from Discord REST history.
|
|
326
|
+
- Message content access depends on `Message Content Intent` policies.
|
|
327
|
+
- Signed attachment URLs may expire; exporter retries best-effort.
|
|
328
|
+
- Some interaction/modal payload history is only available via live recording.
|
|
329
|
+
|
|
330
|
+
## Internal architecture
|
|
331
|
+
|
|
332
|
+
- Feature-oriented modules under `src/features/*` with layered internals:
|
|
333
|
+
- `domain`: core contracts and invariants
|
|
334
|
+
- `application`: use-cases and orchestration
|
|
335
|
+
- `infrastructure`: adapters/IO integrations
|
|
336
|
+
- CLI surface in `src/modules/cli/*` (typed Commander parsing + Zod validation).
|
|
337
|
+
- Shared primitives in `src/shared/*`:
|
|
338
|
+
- `shared/utils/snowflake.ts`
|
|
339
|
+
- `shared/async/concurrency.ts` (via `p-limit`)
|
|
340
|
+
- `shared/json/safe-json.ts`
|
|
341
|
+
- `shared/errors/*`
|
|
342
|
+
- Public compatibility preserved through `src/index.ts` and `src/types.ts`.
|
|
343
|
+
|
|
344
|
+
## Development
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
npm run lint
|
|
348
|
+
npm run typecheck
|
|
349
|
+
npm run test
|
|
350
|
+
npm run test:coverage
|
|
351
|
+
npm run build
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Publishing to npm
|
|
355
|
+
|
|
356
|
+
1. **Create an npm account** at [npmjs.com](https://www.npmjs.com/signup) if you don’t have one.
|
|
357
|
+
|
|
358
|
+
2. **Log in** from the project root:
|
|
359
|
+
```bash
|
|
360
|
+
npm login
|
|
361
|
+
```
|
|
362
|
+
Enter your username, password, and email (and OTP if you use 2FA).
|
|
363
|
+
|
|
364
|
+
3. **Build and publish** (scoped packages like `@rayanmustafa/...` are private by default; use `--access public` to publish for free):
|
|
365
|
+
```bash
|
|
366
|
+
npm publish --access public
|
|
367
|
+
```
|
|
368
|
+
Before publishing, `prepublishOnly` runs `typecheck`, `test`, and `build`. Only `dist/`, `README.md`, and `LICENSE` are included (see `files` in `package.json`).
|
|
369
|
+
|
|
370
|
+
4. **Later versions:** bump `version` in `package.json`, then run `npm publish --access public` again.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AIProvider, AIProviderContext, AIResult } from "../types.js";
|
|
2
|
+
export declare class HeuristicAIProvider implements AIProvider {
|
|
3
|
+
readonly id = "heuristic";
|
|
4
|
+
summarize(ctx: AIProviderContext): Promise<AIResult>;
|
|
5
|
+
}
|
|
6
|
+
export interface OpenAICompatibleProviderConfig {
|
|
7
|
+
id?: string;
|
|
8
|
+
apiKey: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
model?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class OpenAICompatibleProvider implements AIProvider {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
private readonly apiKey;
|
|
15
|
+
private readonly baseUrl;
|
|
16
|
+
private readonly model;
|
|
17
|
+
constructor(config: OpenAICompatibleProviderConfig);
|
|
18
|
+
summarize(ctx: AIProviderContext): Promise<AIResult>;
|
|
19
|
+
}
|
|
20
|
+
export interface OpenAIProviderConfig {
|
|
21
|
+
apiKey: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class OpenAIProvider extends OpenAICompatibleProvider {
|
|
25
|
+
constructor(config: OpenAIProviderConfig);
|
|
26
|
+
}
|
|
27
|
+
export interface GoogleGeminiProviderConfig {
|
|
28
|
+
apiKey: string;
|
|
29
|
+
model?: string;
|
|
30
|
+
baseUrl?: string;
|
|
31
|
+
id?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class GoogleGeminiProvider implements AIProvider {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
private readonly apiKey;
|
|
36
|
+
private readonly model;
|
|
37
|
+
private readonly baseUrl;
|
|
38
|
+
constructor(config: GoogleGeminiProviderConfig);
|
|
39
|
+
summarize(ctx: AIProviderContext): Promise<AIResult>;
|
|
40
|
+
}
|
|
41
|
+
export interface AnthropicClaudeProviderConfig {
|
|
42
|
+
apiKey: string;
|
|
43
|
+
model?: string;
|
|
44
|
+
baseUrl?: string;
|
|
45
|
+
id?: string;
|
|
46
|
+
anthropicVersion?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare class AnthropicClaudeProvider implements AIProvider {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
private readonly apiKey;
|
|
51
|
+
private readonly model;
|
|
52
|
+
private readonly baseUrl;
|
|
53
|
+
private readonly anthropicVersion;
|
|
54
|
+
constructor(config: AnthropicClaudeProviderConfig);
|
|
55
|
+
summarize(ctx: AIProviderContext): Promise<AIResult>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/ai/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK3E,qBAAa,mBAAoB,YAAW,UAAU;IACpD,SAAgB,EAAE,eAAe;IAEpB,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;CA+BlE;AAED,MAAM,WAAW,8BAA8B;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,wBAAyB,YAAW,UAAU;IACzD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEZ,MAAM,EAAE,8BAA8B;IAO5C,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAuElE;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,cAAe,SAAQ,wBAAwB;gBACvC,MAAM,EAAE,oBAAoB;CAQhD;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,oBAAqB,YAAW,UAAU;IACrD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAEd,MAAM,EAAE,0BAA0B;IAOxC,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAmDlE;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,uBAAwB,YAAW,UAAU;IACxD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAEvB,MAAM,EAAE,6BAA6B;IAQ3C,SAAS,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAwDlE"}
|