@l4yercak3/cli 1.3.1 → 2.0.0-alpha.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.
- package/README.md +10 -220
- package/dist/api/client.d.ts +12 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +37 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/platform.d.ts +161 -0
- package/dist/api/platform.d.ts.map +1 -0
- package/dist/api/platform.js +70 -0
- package/dist/api/platform.js.map +1 -0
- package/dist/bin/sevenlayers.d.ts +3 -0
- package/dist/bin/sevenlayers.d.ts.map +1 -0
- package/dist/bin/sevenlayers.js +198 -0
- package/dist/bin/sevenlayers.js.map +1 -0
- package/dist/commands/agent/catalog.d.ts +5 -0
- package/dist/commands/agent/catalog.d.ts.map +1 -0
- package/dist/commands/agent/catalog.js +142 -0
- package/dist/commands/agent/catalog.js.map +1 -0
- package/dist/commands/agent/drift.d.ts +5 -0
- package/dist/commands/agent/drift.d.ts.map +1 -0
- package/dist/commands/agent/drift.js +113 -0
- package/dist/commands/agent/drift.js.map +1 -0
- package/dist/commands/agent/init.d.ts +5 -0
- package/dist/commands/agent/init.d.ts.map +1 -0
- package/dist/commands/agent/init.js +75 -0
- package/dist/commands/agent/init.js.map +1 -0
- package/dist/commands/agent/permissions.d.ts +5 -0
- package/dist/commands/agent/permissions.d.ts.map +1 -0
- package/dist/commands/agent/permissions.js +88 -0
- package/dist/commands/agent/permissions.js.map +1 -0
- package/dist/commands/agent/runner.d.ts +14 -0
- package/dist/commands/agent/runner.d.ts.map +1 -0
- package/dist/commands/agent/runner.js +59 -0
- package/dist/commands/agent/runner.js.map +1 -0
- package/dist/commands/agent/shared.d.ts +13 -0
- package/dist/commands/agent/shared.d.ts.map +1 -0
- package/dist/commands/agent/shared.js +31 -0
- package/dist/commands/agent/shared.js.map +1 -0
- package/dist/commands/agent/template.d.ts +5 -0
- package/dist/commands/agent/template.d.ts.map +1 -0
- package/dist/commands/agent/template.js +104 -0
- package/dist/commands/agent/template.js.map +1 -0
- package/dist/commands/app/connect.d.ts +7 -0
- package/dist/commands/app/connect.d.ts.map +1 -0
- package/dist/commands/app/connect.js +12 -0
- package/dist/commands/app/connect.js.map +1 -0
- package/dist/commands/app/init.d.ts +7 -0
- package/dist/commands/app/init.d.ts.map +1 -0
- package/dist/commands/app/init.js +12 -0
- package/dist/commands/app/init.js.map +1 -0
- package/dist/commands/app/link.d.ts +3 -0
- package/dist/commands/app/link.d.ts.map +1 -0
- package/dist/commands/app/link.js +92 -0
- package/dist/commands/app/link.js.map +1 -0
- package/dist/commands/app/pages.d.ts +15 -0
- package/dist/commands/app/pages.d.ts.map +1 -0
- package/dist/commands/app/pages.js +180 -0
- package/dist/commands/app/pages.js.map +1 -0
- package/dist/commands/app/register.d.ts +3 -0
- package/dist/commands/app/register.d.ts.map +1 -0
- package/dist/commands/app/register.js +120 -0
- package/dist/commands/app/register.js.map +1 -0
- package/dist/commands/app/remote.d.ts +14 -0
- package/dist/commands/app/remote.d.ts.map +1 -0
- package/dist/commands/app/remote.js +44 -0
- package/dist/commands/app/remote.js.map +1 -0
- package/dist/commands/app/setup.d.ts +3 -0
- package/dist/commands/app/setup.d.ts.map +1 -0
- package/dist/commands/app/setup.js +299 -0
- package/dist/commands/app/setup.js.map +1 -0
- package/dist/commands/app/shared.d.ts +9 -0
- package/dist/commands/app/shared.d.ts.map +1 -0
- package/dist/commands/app/shared.js +122 -0
- package/dist/commands/app/shared.js.map +1 -0
- package/dist/commands/app/sync.d.ts +7 -0
- package/dist/commands/app/sync.d.ts.map +1 -0
- package/dist/commands/app/sync.js +107 -0
- package/dist/commands/app/sync.js.map +1 -0
- package/dist/commands/booking/check.d.ts +3 -0
- package/dist/commands/booking/check.d.ts.map +1 -0
- package/dist/commands/booking/check.js +68 -0
- package/dist/commands/booking/check.js.map +1 -0
- package/dist/commands/booking/setup.d.ts +3 -0
- package/dist/commands/booking/setup.d.ts.map +1 -0
- package/dist/commands/booking/setup.js +95 -0
- package/dist/commands/booking/setup.js.map +1 -0
- package/dist/commands/booking/shared.d.ts +31 -0
- package/dist/commands/booking/shared.d.ts.map +1 -0
- package/dist/commands/booking/shared.js +112 -0
- package/dist/commands/booking/shared.js.map +1 -0
- package/dist/commands/booking/smoke.d.ts +3 -0
- package/dist/commands/booking/smoke.d.ts.map +1 -0
- package/dist/commands/booking/smoke.js +101 -0
- package/dist/commands/booking/smoke.js.map +1 -0
- package/dist/commands/cms/bind.d.ts +3 -0
- package/dist/commands/cms/bind.d.ts.map +1 -0
- package/dist/commands/cms/bind.js +212 -0
- package/dist/commands/cms/bind.js.map +1 -0
- package/dist/commands/cms/content.d.ts +40 -0
- package/dist/commands/cms/content.d.ts.map +1 -0
- package/dist/commands/cms/content.js +169 -0
- package/dist/commands/cms/content.js.map +1 -0
- package/dist/commands/cms/doctor.d.ts +3 -0
- package/dist/commands/cms/doctor.d.ts.map +1 -0
- package/dist/commands/cms/doctor.js +69 -0
- package/dist/commands/cms/doctor.js.map +1 -0
- package/dist/commands/cms/migrate.d.ts +3 -0
- package/dist/commands/cms/migrate.d.ts.map +1 -0
- package/dist/commands/cms/migrate.js +78 -0
- package/dist/commands/cms/migrate.js.map +1 -0
- package/dist/commands/cms/registry.d.ts +3 -0
- package/dist/commands/cms/registry.d.ts.map +1 -0
- package/dist/commands/cms/registry.js +161 -0
- package/dist/commands/cms/registry.js.map +1 -0
- package/dist/commands/cms/seed.d.ts +3 -0
- package/dist/commands/cms/seed.d.ts.map +1 -0
- package/dist/commands/cms/seed.js +102 -0
- package/dist/commands/cms/seed.js.map +1 -0
- package/dist/commands/cms/shared.d.ts +22 -0
- package/dist/commands/cms/shared.d.ts.map +1 -0
- package/dist/commands/cms/shared.js +82 -0
- package/dist/commands/cms/shared.js.map +1 -0
- package/dist/commands/doctor/target.d.ts +3 -0
- package/dist/commands/doctor/target.d.ts.map +1 -0
- package/dist/commands/doctor/target.js +46 -0
- package/dist/commands/doctor/target.js.map +1 -0
- package/dist/commands/env/list.d.ts +3 -0
- package/dist/commands/env/list.d.ts.map +1 -0
- package/dist/commands/env/list.js +28 -0
- package/dist/commands/env/list.js.map +1 -0
- package/dist/commands/env/set.d.ts +3 -0
- package/dist/commands/env/set.d.ts.map +1 -0
- package/dist/commands/env/set.js +36 -0
- package/dist/commands/env/set.js.map +1 -0
- package/dist/commands/env/use.d.ts +3 -0
- package/dist/commands/env/use.d.ts.map +1 -0
- package/dist/commands/env/use.js +15 -0
- package/dist/commands/env/use.js.map +1 -0
- package/dist/commands/legacy/connect.d.ts +3 -0
- package/dist/commands/legacy/connect.d.ts.map +1 -0
- package/dist/commands/legacy/connect.js +8 -0
- package/dist/commands/legacy/connect.js.map +1 -0
- package/dist/commands/legacy/pages.d.ts +3 -0
- package/dist/commands/legacy/pages.d.ts.map +1 -0
- package/dist/commands/legacy/pages.js +16 -0
- package/dist/commands/legacy/pages.js.map +1 -0
- package/dist/commands/legacy/spread.d.ts +3 -0
- package/dist/commands/legacy/spread.d.ts.map +1 -0
- package/dist/commands/legacy/spread.js +8 -0
- package/dist/commands/legacy/spread.js.map +1 -0
- package/dist/commands/legacy/sync.d.ts +3 -0
- package/dist/commands/legacy/sync.d.ts.map +1 -0
- package/dist/commands/legacy/sync.js +8 -0
- package/dist/commands/legacy/sync.js.map +1 -0
- package/dist/config/env-diff.d.ts +10 -0
- package/dist/config/env-diff.d.ts.map +1 -0
- package/dist/config/env-diff.js +24 -0
- package/dist/config/env-diff.js.map +1 -0
- package/dist/config/env-parser.d.ts +20 -0
- package/dist/config/env-parser.d.ts.map +1 -0
- package/dist/config/env-parser.js +70 -0
- package/dist/config/env-parser.js.map +1 -0
- package/dist/config/env-writer.d.ts +22 -0
- package/dist/config/env-writer.d.ts.map +1 -0
- package/dist/config/env-writer.js +172 -0
- package/dist/config/env-writer.js.map +1 -0
- package/dist/config/profile-store.d.ts +29 -0
- package/dist/config/profile-store.d.ts.map +1 -0
- package/dist/config/profile-store.js +257 -0
- package/dist/config/profile-store.js.map +1 -0
- package/dist/core/args.d.ts +11 -0
- package/dist/core/args.d.ts.map +1 -0
- package/dist/core/args.js +106 -0
- package/dist/core/args.js.map +1 -0
- package/dist/core/colors.d.ts +6 -0
- package/dist/core/colors.d.ts.map +1 -0
- package/dist/core/colors.js +29 -0
- package/dist/core/colors.js.map +1 -0
- package/dist/safety/target-guard.d.ts +16 -0
- package/dist/safety/target-guard.d.ts.map +1 -0
- package/dist/safety/target-guard.js +55 -0
- package/dist/safety/target-guard.js.map +1 -0
- package/dist/testing/booking-smoke.d.ts +17 -0
- package/dist/testing/booking-smoke.d.ts.map +1 -0
- package/dist/testing/booking-smoke.js +43 -0
- package/dist/testing/booking-smoke.js.map +1 -0
- package/dist/tests/agent-commands.test.d.ts +2 -0
- package/dist/tests/agent-commands.test.d.ts.map +1 -0
- package/dist/tests/agent-commands.test.js +180 -0
- package/dist/tests/agent-commands.test.js.map +1 -0
- package/dist/tests/agent-governance.test.d.ts +2 -0
- package/dist/tests/agent-governance.test.d.ts.map +1 -0
- package/dist/tests/agent-governance.test.js +233 -0
- package/dist/tests/agent-governance.test.js.map +1 -0
- package/dist/tests/app-commands.test.d.ts +2 -0
- package/dist/tests/app-commands.test.d.ts.map +1 -0
- package/dist/tests/app-commands.test.js +462 -0
- package/dist/tests/app-commands.test.js.map +1 -0
- package/dist/tests/booking-commands.test.d.ts +2 -0
- package/dist/tests/booking-commands.test.d.ts.map +1 -0
- package/dist/tests/booking-commands.test.js +204 -0
- package/dist/tests/booking-commands.test.js.map +1 -0
- package/dist/tests/booking-smoke.test.d.ts +2 -0
- package/dist/tests/booking-smoke.test.d.ts.map +1 -0
- package/dist/tests/booking-smoke.test.js +183 -0
- package/dist/tests/booking-smoke.test.js.map +1 -0
- package/dist/tests/cms-commands.test.d.ts +2 -0
- package/dist/tests/cms-commands.test.d.ts.map +1 -0
- package/dist/tests/cms-commands.test.js +254 -0
- package/dist/tests/cms-commands.test.js.map +1 -0
- package/dist/tests/cms-ops.test.d.ts +2 -0
- package/dist/tests/cms-ops.test.d.ts.map +1 -0
- package/dist/tests/cms-ops.test.js +125 -0
- package/dist/tests/cms-ops.test.js.map +1 -0
- package/dist/tests/env-writer.test.d.ts +2 -0
- package/dist/tests/env-writer.test.d.ts.map +1 -0
- package/dist/tests/env-writer.test.js +90 -0
- package/dist/tests/env-writer.test.js.map +1 -0
- package/dist/tests/profile-store.test.d.ts +2 -0
- package/dist/tests/profile-store.test.d.ts.map +1 -0
- package/dist/tests/profile-store.test.js +88 -0
- package/dist/tests/profile-store.test.js.map +1 -0
- package/dist/tests/target-guard.test.d.ts +2 -0
- package/dist/tests/target-guard.test.d.ts.map +1 -0
- package/dist/tests/target-guard.test.js +132 -0
- package/dist/tests/target-guard.test.js.map +1 -0
- package/dist/ui/logo.d.ts +2 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +22 -0
- package/dist/ui/logo.js.map +1 -0
- package/package.json +17 -53
- package/.claude/settings.local.json +0 -36
- package/.cursor/rules.md +0 -203
- package/.eslintrc.js +0 -31
- package/CLAUDE.md +0 -100
- package/bin/cli.js +0 -116
- package/docs/ADDING_FRAMEWORK_DETECTORS.md +0 -391
- package/docs/ADDING_NEW_PROJECT_TYPE.md +0 -156
- package/docs/ARCHITECTURE_RELATIONSHIPS.md +0 -411
- package/docs/CLI_AUTHENTICATION.md +0 -214
- package/docs/CLI_PAGE_DETECTION_REQUIREMENTS.md +0 -519
- package/docs/CRM-PIPELINES-SEQUENCES-SPEC.md +0 -429
- package/docs/DETECTOR_ARCHITECTURE.md +0 -326
- package/docs/DEVELOPMENT.md +0 -194
- package/docs/IMPLEMENTATION_PHASES.md +0 -468
- package/docs/INTEGRATION_PATHS_ARCHITECTURE.md +0 -1543
- package/docs/OAUTH_CLARIFICATION.md +0 -258
- package/docs/OAUTH_SETUP_GUIDE_TEMPLATE.md +0 -211
- package/docs/PHASE_0_PROGRESS.md +0 -120
- package/docs/PHASE_1_COMPLETE.md +0 -366
- package/docs/PHASE_SUMMARY.md +0 -149
- package/docs/PLAN.md +0 -511
- package/docs/README.md +0 -56
- package/docs/STRIPE_INTEGRATION.md +0 -447
- package/docs/SUMMARY.md +0 -230
- package/docs/UPDATED_PLAN.md +0 -447
- package/docs/mcp_server/MCP_EXTENSION_GUIDE.md +0 -1313
- package/docs/mcp_server/MCP_SERVER_ARCHITECTURE.md +0 -1481
- package/docs/mcp_server/applicationOntology.ts +0 -817
- package/docs/mcp_server/cliApplications.ts +0 -639
- package/docs/mcp_server/crmOntology.ts +0 -1063
- package/docs/mcp_server/eventOntology.ts +0 -1183
- package/docs/mcp_server/formsOntology.ts +0 -1401
- package/docs/mcp_server/ontologySchemas.ts +0 -185
- package/docs/mcp_server/schema.ts +0 -250
- package/docs/microsass_production_machine/CLI_API_REFERENCE.md +0 -1197
- package/docs/microsass_production_machine/CLI_PRODUCT_VISION.md +0 -676
- package/docs/microsass_production_machine/CLI_REQUIREMENTS.md +0 -606
- package/docs/microsass_production_machine/CONNECTED_APPLICATIONS_SPEC.md +0 -390
- package/docs/microsass_production_machine/IMPLEMENTATION_ROADMAP.md +0 -725
- package/docs/microsass_production_machine/OBJECT_MAPPINGS.md +0 -808
- package/docs/microsass_production_machine/REFERENCE_IMPLEMENTATION.md +0 -532
- package/src/api/backend-client.js +0 -449
- package/src/commands/api-keys.js +0 -119
- package/src/commands/connect.js +0 -243
- package/src/commands/login.js +0 -332
- package/src/commands/logout.js +0 -30
- package/src/commands/mcp-server.js +0 -85
- package/src/commands/mcp-setup.js +0 -686
- package/src/commands/pages.js +0 -317
- package/src/commands/scaffold.js +0 -409
- package/src/commands/spread.js +0 -861
- package/src/commands/status.js +0 -62
- package/src/commands/sync.js +0 -169
- package/src/commands/upgrade.js +0 -48
- package/src/config/config-manager.js +0 -206
- package/src/detectors/api-client-detector.js +0 -85
- package/src/detectors/base-detector.js +0 -77
- package/src/detectors/database-detector.js +0 -245
- package/src/detectors/expo-detector.js +0 -166
- package/src/detectors/github-detector.js +0 -74
- package/src/detectors/index.js +0 -106
- package/src/detectors/mapping-suggestor.js +0 -119
- package/src/detectors/model-detector.js +0 -318
- package/src/detectors/nextjs-detector.js +0 -139
- package/src/detectors/oauth-detector.js +0 -122
- package/src/detectors/page-detector.js +0 -480
- package/src/detectors/registry.js +0 -121
- package/src/generators/api-client-generator.js +0 -223
- package/src/generators/api-only/client.js +0 -683
- package/src/generators/api-only/index.js +0 -96
- package/src/generators/api-only/types.js +0 -618
- package/src/generators/api-only/webhooks.js +0 -377
- package/src/generators/env-generator.js +0 -191
- package/src/generators/expo-auth-generator.js +0 -1009
- package/src/generators/gitignore-generator.js +0 -92
- package/src/generators/index.js +0 -166
- package/src/generators/manifest-generator.js +0 -154
- package/src/generators/mcp-guide-generator.js +0 -256
- package/src/generators/nextauth-generator.js +0 -247
- package/src/generators/oauth-guide-generator.js +0 -277
- package/src/generators/quickstart/components/index.js +0 -1699
- package/src/generators/quickstart/components-mobile/index.js +0 -1440
- package/src/generators/quickstart/database/convex.js +0 -1257
- package/src/generators/quickstart/database/index.js +0 -34
- package/src/generators/quickstart/database/supabase.js +0 -1132
- package/src/generators/quickstart/hooks/index.js +0 -1065
- package/src/generators/quickstart/index.js +0 -191
- package/src/generators/quickstart/pages/index.js +0 -1466
- package/src/generators/quickstart/screens/index.js +0 -1498
- package/src/logo.js +0 -116
- package/src/mcp/auth.js +0 -127
- package/src/mcp/registry/domains/applications.js +0 -516
- package/src/mcp/registry/domains/benefits.js +0 -798
- package/src/mcp/registry/domains/codegen.js +0 -894
- package/src/mcp/registry/domains/core.js +0 -324
- package/src/mcp/registry/domains/crm.js +0 -591
- package/src/mcp/registry/domains/events.js +0 -649
- package/src/mcp/registry/domains/forms.js +0 -696
- package/src/mcp/registry/index.js +0 -164
- package/src/mcp/server.js +0 -116
- package/src/utils/file-utils.js +0 -117
- package/src/utils/init-helpers.js +0 -243
- package/src/utils/prompt-utils.js +0 -195
- package/templates/CLAUDE.md +0 -86
- package/tests/api-client-detector.test.js +0 -214
- package/tests/api-client-generator.test.js +0 -176
- package/tests/backend-client.test.js +0 -640
- package/tests/base-detector.test.js +0 -101
- package/tests/commands/login.test.js +0 -143
- package/tests/commands/logout.test.js +0 -84
- package/tests/commands/status.test.js +0 -167
- package/tests/config-manager.test.js +0 -321
- package/tests/database-detector.test.js +0 -221
- package/tests/detector-index.test.js +0 -209
- package/tests/detector-registry.test.js +0 -93
- package/tests/env-generator.test.js +0 -278
- package/tests/expo-detector.test.js +0 -263
- package/tests/file-utils.test.js +0 -194
- package/tests/generators-index.test.js +0 -454
- package/tests/github-detector.test.js +0 -145
- package/tests/gitignore-generator.test.js +0 -109
- package/tests/logo.test.js +0 -96
- package/tests/nextauth-generator.test.js +0 -255
- package/tests/nextjs-detector.test.js +0 -235
- package/tests/oauth-detector.test.js +0 -264
- package/tests/oauth-guide-generator.test.js +0 -273
- package/tests/page-detector.test.js +0 -371
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API-Only Generator
|
|
3
|
-
* Generates just the typed API client and types for the project
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const clientGenerator = require('./client');
|
|
7
|
-
const typesGenerator = require('./types');
|
|
8
|
-
const webhooksGenerator = require('./webhooks');
|
|
9
|
-
|
|
10
|
-
class ApiOnlyGenerator {
|
|
11
|
-
/**
|
|
12
|
-
* Generate API-only files
|
|
13
|
-
* @param {Object} options - Generation options
|
|
14
|
-
* @returns {Promise<Object>} - Generated file paths
|
|
15
|
-
*/
|
|
16
|
-
async generate(options) {
|
|
17
|
-
const results = {
|
|
18
|
-
client: null,
|
|
19
|
-
types: null,
|
|
20
|
-
webhooks: null,
|
|
21
|
-
index: null,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// Generate TypeScript types first (used by client)
|
|
25
|
-
results.types = await typesGenerator.generate(options);
|
|
26
|
-
|
|
27
|
-
// Generate the typed API client
|
|
28
|
-
results.client = await clientGenerator.generate(options);
|
|
29
|
-
|
|
30
|
-
// Generate webhook utilities
|
|
31
|
-
results.webhooks = await webhooksGenerator.generate(options);
|
|
32
|
-
|
|
33
|
-
// Generate index file
|
|
34
|
-
results.index = await this.generateIndex(options);
|
|
35
|
-
|
|
36
|
-
return results;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Generate index.ts/js that exports everything
|
|
41
|
-
*/
|
|
42
|
-
async generateIndex(options) {
|
|
43
|
-
const { projectPath, isTypeScript } = options;
|
|
44
|
-
const fs = require('fs');
|
|
45
|
-
const path = require('path');
|
|
46
|
-
const { ensureDir, writeFileWithBackup, checkFileOverwrite } = require('../../utils/file-utils');
|
|
47
|
-
|
|
48
|
-
// Determine output directory
|
|
49
|
-
let outputDir;
|
|
50
|
-
if (fs.existsSync(path.join(projectPath, 'src'))) {
|
|
51
|
-
outputDir = path.join(projectPath, 'src', 'lib', 'l4yercak3');
|
|
52
|
-
} else {
|
|
53
|
-
outputDir = path.join(projectPath, 'lib', 'l4yercak3');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
ensureDir(outputDir);
|
|
57
|
-
|
|
58
|
-
const extension = isTypeScript ? 'ts' : 'js';
|
|
59
|
-
const outputPath = path.join(outputDir, `index.${extension}`);
|
|
60
|
-
|
|
61
|
-
const action = await checkFileOverwrite(outputPath);
|
|
62
|
-
if (action === 'skip') {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const content = isTypeScript
|
|
67
|
-
? `/**
|
|
68
|
-
* L4YERCAK3 API Client
|
|
69
|
-
* Auto-generated by @l4yercak3/cli
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
export { L4yercak3Client, getL4yercak3Client, L4yercak3Error } from './client';
|
|
73
|
-
export type * from './types';
|
|
74
|
-
export { verifyWebhookSignature, type WebhookEvent } from './webhooks';
|
|
75
|
-
`
|
|
76
|
-
: `/**
|
|
77
|
-
* L4YERCAK3 API Client
|
|
78
|
-
* Auto-generated by @l4yercak3/cli
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
const { L4yercak3Client, getL4yercak3Client, L4yercak3Error } = require('./client');
|
|
82
|
-
const { verifyWebhookSignature } = require('./webhooks');
|
|
83
|
-
|
|
84
|
-
module.exports = {
|
|
85
|
-
L4yercak3Client,
|
|
86
|
-
getL4yercak3Client,
|
|
87
|
-
L4yercak3Error,
|
|
88
|
-
verifyWebhookSignature,
|
|
89
|
-
};
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
return writeFileWithBackup(outputPath, content, action);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
module.exports = new ApiOnlyGenerator();
|
|
@@ -1,618 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types Generator
|
|
3
|
-
* Generates TypeScript type definitions for the L4YERCAK3 API
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const { ensureDir, writeFileWithBackup, checkFileOverwrite } = require('../../utils/file-utils');
|
|
9
|
-
|
|
10
|
-
class TypesGenerator {
|
|
11
|
-
/**
|
|
12
|
-
* Generate the types file
|
|
13
|
-
* @param {Object} options - Generation options
|
|
14
|
-
* @returns {Promise<string|null>} - Path to generated file or null if skipped
|
|
15
|
-
*/
|
|
16
|
-
async generate(options) {
|
|
17
|
-
const { projectPath, isTypeScript } = options;
|
|
18
|
-
|
|
19
|
-
// Only generate for TypeScript projects
|
|
20
|
-
if (!isTypeScript) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Determine output directory
|
|
25
|
-
let outputDir;
|
|
26
|
-
if (fs.existsSync(path.join(projectPath, 'src'))) {
|
|
27
|
-
outputDir = path.join(projectPath, 'src', 'lib', 'l4yercak3');
|
|
28
|
-
} else {
|
|
29
|
-
outputDir = path.join(projectPath, 'lib', 'l4yercak3');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ensureDir(outputDir);
|
|
33
|
-
|
|
34
|
-
const outputPath = path.join(outputDir, 'types.ts');
|
|
35
|
-
|
|
36
|
-
const action = await checkFileOverwrite(outputPath);
|
|
37
|
-
if (action === 'skip') {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const content = this.generateTypes();
|
|
42
|
-
|
|
43
|
-
return writeFileWithBackup(outputPath, content, action);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
generateTypes() {
|
|
47
|
-
return `/**
|
|
48
|
-
* L4YERCAK3 API Types
|
|
49
|
-
* Auto-generated by @l4yercak3/cli
|
|
50
|
-
*
|
|
51
|
-
* Comprehensive type definitions for the L4YERCAK3 platform.
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
// ============ CRM Types ============
|
|
55
|
-
|
|
56
|
-
export interface Contact {
|
|
57
|
-
id: string;
|
|
58
|
-
firstName: string;
|
|
59
|
-
lastName: string;
|
|
60
|
-
email: string;
|
|
61
|
-
phone?: string;
|
|
62
|
-
company?: string;
|
|
63
|
-
jobTitle?: string;
|
|
64
|
-
status: 'active' | 'inactive' | 'unsubscribed' | 'archived';
|
|
65
|
-
subtype: 'customer' | 'lead' | 'prospect' | 'partner';
|
|
66
|
-
tags: string[];
|
|
67
|
-
customFields?: Record<string, unknown>;
|
|
68
|
-
organizationId?: string;
|
|
69
|
-
organization?: Organization;
|
|
70
|
-
avatarUrl?: string;
|
|
71
|
-
notes?: ContactNote[];
|
|
72
|
-
activities?: ContactActivity[];
|
|
73
|
-
createdAt: string;
|
|
74
|
-
updatedAt: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface ContactCreateInput {
|
|
78
|
-
firstName: string;
|
|
79
|
-
lastName: string;
|
|
80
|
-
email: string;
|
|
81
|
-
phone?: string;
|
|
82
|
-
company?: string;
|
|
83
|
-
jobTitle?: string;
|
|
84
|
-
subtype?: 'customer' | 'lead' | 'prospect' | 'partner';
|
|
85
|
-
tags?: string[];
|
|
86
|
-
customFields?: Record<string, unknown>;
|
|
87
|
-
organizationId?: string;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface ContactUpdateInput {
|
|
91
|
-
firstName?: string;
|
|
92
|
-
lastName?: string;
|
|
93
|
-
email?: string;
|
|
94
|
-
phone?: string;
|
|
95
|
-
company?: string;
|
|
96
|
-
jobTitle?: string;
|
|
97
|
-
status?: 'active' | 'inactive' | 'unsubscribed';
|
|
98
|
-
subtype?: 'customer' | 'lead' | 'prospect' | 'partner';
|
|
99
|
-
tags?: string[];
|
|
100
|
-
customFields?: Record<string, unknown>;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface ContactNote {
|
|
104
|
-
id: string;
|
|
105
|
-
content: string;
|
|
106
|
-
createdBy: string;
|
|
107
|
-
createdAt: string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface ContactActivity {
|
|
111
|
-
id: string;
|
|
112
|
-
type: 'email' | 'call' | 'meeting' | 'note' | 'task' | 'event';
|
|
113
|
-
title: string;
|
|
114
|
-
description?: string;
|
|
115
|
-
occurredAt: string;
|
|
116
|
-
metadata?: Record<string, unknown>;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface Organization {
|
|
120
|
-
id: string;
|
|
121
|
-
name: string;
|
|
122
|
-
website?: string;
|
|
123
|
-
industry?: string;
|
|
124
|
-
size?: 'small' | 'medium' | 'large' | 'enterprise';
|
|
125
|
-
subtype: 'customer' | 'prospect' | 'partner' | 'vendor';
|
|
126
|
-
address?: Address;
|
|
127
|
-
taxId?: string;
|
|
128
|
-
billingEmail?: string;
|
|
129
|
-
contacts?: Contact[];
|
|
130
|
-
createdAt: string;
|
|
131
|
-
updatedAt: string;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface OrganizationCreateInput {
|
|
135
|
-
name: string;
|
|
136
|
-
website?: string;
|
|
137
|
-
industry?: string;
|
|
138
|
-
size?: 'small' | 'medium' | 'large' | 'enterprise';
|
|
139
|
-
subtype?: 'customer' | 'prospect' | 'partner' | 'vendor';
|
|
140
|
-
address?: AddressInput;
|
|
141
|
-
taxId?: string;
|
|
142
|
-
billingEmail?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ============ Event Types ============
|
|
146
|
-
|
|
147
|
-
export interface Event {
|
|
148
|
-
id: string;
|
|
149
|
-
name: string;
|
|
150
|
-
description?: string;
|
|
151
|
-
shortDescription?: string;
|
|
152
|
-
startDate: string;
|
|
153
|
-
endDate: string;
|
|
154
|
-
timezone: string;
|
|
155
|
-
location: string;
|
|
156
|
-
venue?: Venue;
|
|
157
|
-
status: 'draft' | 'published' | 'cancelled' | 'completed';
|
|
158
|
-
subtype: 'conference' | 'workshop' | 'webinar' | 'meetup' | 'seminar' | 'other';
|
|
159
|
-
maxCapacity?: number;
|
|
160
|
-
registeredCount?: number;
|
|
161
|
-
imageUrl?: string;
|
|
162
|
-
coverImageUrl?: string;
|
|
163
|
-
products?: Product[];
|
|
164
|
-
sponsors?: Sponsor[];
|
|
165
|
-
forms?: Form[];
|
|
166
|
-
tags?: string[];
|
|
167
|
-
customFields?: Record<string, unknown>;
|
|
168
|
-
createdAt: string;
|
|
169
|
-
updatedAt: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface EventCreateInput {
|
|
173
|
-
name: string;
|
|
174
|
-
description?: string;
|
|
175
|
-
shortDescription?: string;
|
|
176
|
-
startDate: string;
|
|
177
|
-
endDate: string;
|
|
178
|
-
timezone?: string;
|
|
179
|
-
location: string;
|
|
180
|
-
venue?: VenueInput;
|
|
181
|
-
subtype?: 'conference' | 'workshop' | 'webinar' | 'meetup' | 'seminar' | 'other';
|
|
182
|
-
maxCapacity?: number;
|
|
183
|
-
imageUrl?: string;
|
|
184
|
-
tags?: string[];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface Attendee {
|
|
188
|
-
id: string;
|
|
189
|
-
contactId: string;
|
|
190
|
-
contact: Contact;
|
|
191
|
-
eventId: string;
|
|
192
|
-
ticketId: string;
|
|
193
|
-
ticketName: string;
|
|
194
|
-
status: 'registered' | 'checked_in' | 'cancelled' | 'no_show';
|
|
195
|
-
checkedInAt?: string;
|
|
196
|
-
checkedInBy?: string;
|
|
197
|
-
registeredAt: string;
|
|
198
|
-
metadata?: Record<string, unknown>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface Venue {
|
|
202
|
-
name: string;
|
|
203
|
-
address: Address;
|
|
204
|
-
capacity?: number;
|
|
205
|
-
website?: string;
|
|
206
|
-
phone?: string;
|
|
207
|
-
notes?: string;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export interface VenueInput {
|
|
211
|
-
name: string;
|
|
212
|
-
address: AddressInput;
|
|
213
|
-
capacity?: number;
|
|
214
|
-
website?: string;
|
|
215
|
-
phone?: string;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export interface Sponsor {
|
|
219
|
-
id: string;
|
|
220
|
-
organizationId: string;
|
|
221
|
-
organizationName: string;
|
|
222
|
-
level: 'platinum' | 'gold' | 'silver' | 'bronze' | 'community';
|
|
223
|
-
logoUrl?: string;
|
|
224
|
-
websiteUrl?: string;
|
|
225
|
-
description?: string;
|
|
226
|
-
order?: number;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ============ Form Types ============
|
|
230
|
-
|
|
231
|
-
export interface Form {
|
|
232
|
-
id: string;
|
|
233
|
-
name: string;
|
|
234
|
-
description?: string;
|
|
235
|
-
status: 'draft' | 'published' | 'closed';
|
|
236
|
-
subtype: 'registration' | 'survey' | 'application' | 'feedback' | 'contact' | 'custom';
|
|
237
|
-
eventId?: string;
|
|
238
|
-
fields: FormField[];
|
|
239
|
-
settings: FormSettings;
|
|
240
|
-
responseCount: number;
|
|
241
|
-
createdAt: string;
|
|
242
|
-
updatedAt: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface FormField {
|
|
246
|
-
id: string;
|
|
247
|
-
type: FormFieldType;
|
|
248
|
-
label: string;
|
|
249
|
-
name: string;
|
|
250
|
-
required: boolean;
|
|
251
|
-
placeholder?: string;
|
|
252
|
-
helpText?: string;
|
|
253
|
-
options?: FormFieldOption[];
|
|
254
|
-
validation?: FormFieldValidation;
|
|
255
|
-
conditionalLogic?: FormFieldConditional;
|
|
256
|
-
order: number;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export type FormFieldType =
|
|
260
|
-
| 'text'
|
|
261
|
-
| 'email'
|
|
262
|
-
| 'phone'
|
|
263
|
-
| 'number'
|
|
264
|
-
| 'textarea'
|
|
265
|
-
| 'select'
|
|
266
|
-
| 'multiselect'
|
|
267
|
-
| 'checkbox'
|
|
268
|
-
| 'radio'
|
|
269
|
-
| 'date'
|
|
270
|
-
| 'datetime'
|
|
271
|
-
| 'time'
|
|
272
|
-
| 'file'
|
|
273
|
-
| 'image'
|
|
274
|
-
| 'signature'
|
|
275
|
-
| 'rating'
|
|
276
|
-
| 'slider'
|
|
277
|
-
| 'hidden';
|
|
278
|
-
|
|
279
|
-
export interface FormFieldOption {
|
|
280
|
-
label: string;
|
|
281
|
-
value: string;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface FormFieldValidation {
|
|
285
|
-
min?: number;
|
|
286
|
-
max?: number;
|
|
287
|
-
minLength?: number;
|
|
288
|
-
maxLength?: number;
|
|
289
|
-
pattern?: string;
|
|
290
|
-
customMessage?: string;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export interface FormFieldConditional {
|
|
294
|
-
action: 'show' | 'hide' | 'require';
|
|
295
|
-
conditions: Array<{
|
|
296
|
-
fieldId: string;
|
|
297
|
-
operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than';
|
|
298
|
-
value: unknown;
|
|
299
|
-
}>;
|
|
300
|
-
logic: 'and' | 'or';
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface FormSettings {
|
|
304
|
-
submitButtonText: string;
|
|
305
|
-
confirmationMessage: string;
|
|
306
|
-
redirectUrl?: string;
|
|
307
|
-
notifyEmails: string[];
|
|
308
|
-
allowMultipleSubmissions: boolean;
|
|
309
|
-
requireAuth: boolean;
|
|
310
|
-
closedMessage?: string;
|
|
311
|
-
limitResponses?: number;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
export interface FormSubmission {
|
|
315
|
-
id: string;
|
|
316
|
-
formId: string;
|
|
317
|
-
contactId?: string;
|
|
318
|
-
contact?: Contact;
|
|
319
|
-
data: Record<string, unknown>;
|
|
320
|
-
status: 'submitted' | 'reviewed' | 'approved' | 'rejected';
|
|
321
|
-
reviewedBy?: string;
|
|
322
|
-
reviewedAt?: string;
|
|
323
|
-
reviewNotes?: string;
|
|
324
|
-
submittedAt: string;
|
|
325
|
-
metadata?: {
|
|
326
|
-
ipAddress?: string;
|
|
327
|
-
userAgent?: string;
|
|
328
|
-
referrer?: string;
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// ============ Product & Checkout Types ============
|
|
333
|
-
|
|
334
|
-
export interface Product {
|
|
335
|
-
id: string;
|
|
336
|
-
name: string;
|
|
337
|
-
description?: string;
|
|
338
|
-
shortDescription?: string;
|
|
339
|
-
priceInCents: number;
|
|
340
|
-
currency: string;
|
|
341
|
-
eventId?: string;
|
|
342
|
-
category?: string;
|
|
343
|
-
sku?: string;
|
|
344
|
-
status: 'active' | 'sold_out' | 'hidden' | 'archived';
|
|
345
|
-
inventory?: number;
|
|
346
|
-
maxPerOrder?: number;
|
|
347
|
-
minPerOrder?: number;
|
|
348
|
-
salesStart?: string;
|
|
349
|
-
salesEnd?: string;
|
|
350
|
-
imageUrl?: string;
|
|
351
|
-
metadata?: Record<string, unknown>;
|
|
352
|
-
createdAt: string;
|
|
353
|
-
updatedAt: string;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
export interface Order {
|
|
357
|
-
id: string;
|
|
358
|
-
orderNumber: string;
|
|
359
|
-
contactId: string;
|
|
360
|
-
contact?: Contact;
|
|
361
|
-
items: OrderItem[];
|
|
362
|
-
subtotalInCents: number;
|
|
363
|
-
discountInCents?: number;
|
|
364
|
-
taxInCents?: number;
|
|
365
|
-
totalInCents: number;
|
|
366
|
-
currency: string;
|
|
367
|
-
status: 'pending' | 'paid' | 'partially_refunded' | 'refunded' | 'cancelled';
|
|
368
|
-
paymentStatus: 'unpaid' | 'paid' | 'refunded';
|
|
369
|
-
stripePaymentIntentId?: string;
|
|
370
|
-
stripeCustomerId?: string;
|
|
371
|
-
billingAddress?: Address;
|
|
372
|
-
notes?: string;
|
|
373
|
-
metadata?: Record<string, unknown>;
|
|
374
|
-
createdAt: string;
|
|
375
|
-
completedAt?: string;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export interface OrderItem {
|
|
379
|
-
id: string;
|
|
380
|
-
productId: string;
|
|
381
|
-
productName: string;
|
|
382
|
-
productSku?: string;
|
|
383
|
-
quantity: number;
|
|
384
|
-
unitPriceInCents: number;
|
|
385
|
-
totalPriceInCents: number;
|
|
386
|
-
metadata?: Record<string, unknown>;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// ============ Invoice Types ============
|
|
390
|
-
|
|
391
|
-
export interface Invoice {
|
|
392
|
-
id: string;
|
|
393
|
-
number: string;
|
|
394
|
-
contactId?: string;
|
|
395
|
-
contact?: Contact;
|
|
396
|
-
organizationId?: string;
|
|
397
|
-
organization?: Organization;
|
|
398
|
-
type: 'b2b' | 'b2c';
|
|
399
|
-
status: 'draft' | 'sent' | 'viewed' | 'paid' | 'overdue' | 'cancelled' | 'void';
|
|
400
|
-
issueDate: string;
|
|
401
|
-
dueDate: string;
|
|
402
|
-
paidAt?: string;
|
|
403
|
-
lineItems: InvoiceLineItem[];
|
|
404
|
-
subtotalInCents: number;
|
|
405
|
-
discountInCents?: number;
|
|
406
|
-
discountDescription?: string;
|
|
407
|
-
taxInCents: number;
|
|
408
|
-
taxRate: number;
|
|
409
|
-
totalInCents: number;
|
|
410
|
-
currency: string;
|
|
411
|
-
notes?: string;
|
|
412
|
-
terms?: string;
|
|
413
|
-
footer?: string;
|
|
414
|
-
pdfUrl?: string;
|
|
415
|
-
paymentLink?: string;
|
|
416
|
-
billingAddress?: Address;
|
|
417
|
-
paymentMethod?: string;
|
|
418
|
-
paymentReference?: string;
|
|
419
|
-
reminders?: InvoiceReminder[];
|
|
420
|
-
createdAt: string;
|
|
421
|
-
updatedAt: string;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export interface InvoiceLineItem {
|
|
425
|
-
id?: string;
|
|
426
|
-
description: string;
|
|
427
|
-
quantity: number;
|
|
428
|
-
unitPriceInCents: number;
|
|
429
|
-
totalInCents: number;
|
|
430
|
-
productId?: string;
|
|
431
|
-
taxable?: boolean;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
export interface InvoiceCreateInput {
|
|
435
|
-
contactId?: string;
|
|
436
|
-
organizationId?: string;
|
|
437
|
-
type: 'b2b' | 'b2c';
|
|
438
|
-
dueDate: string;
|
|
439
|
-
lineItems: Array<{
|
|
440
|
-
description: string;
|
|
441
|
-
quantity: number;
|
|
442
|
-
unitPriceInCents: number;
|
|
443
|
-
productId?: string;
|
|
444
|
-
taxable?: boolean;
|
|
445
|
-
}>;
|
|
446
|
-
taxRate?: number;
|
|
447
|
-
discountInCents?: number;
|
|
448
|
-
discountDescription?: string;
|
|
449
|
-
notes?: string;
|
|
450
|
-
terms?: string;
|
|
451
|
-
billingAddress?: AddressInput;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface InvoiceReminder {
|
|
455
|
-
sentAt: string;
|
|
456
|
-
type: 'upcoming' | 'due' | 'overdue';
|
|
457
|
-
method: 'email' | 'sms';
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
// ============ Benefits Types ============
|
|
461
|
-
|
|
462
|
-
export interface BenefitClaim {
|
|
463
|
-
id: string;
|
|
464
|
-
claimNumber: string;
|
|
465
|
-
memberId: string;
|
|
466
|
-
memberName: string;
|
|
467
|
-
memberEmail?: string;
|
|
468
|
-
benefitType: string;
|
|
469
|
-
benefitPlanId?: string;
|
|
470
|
-
amountInCents: number;
|
|
471
|
-
currency: string;
|
|
472
|
-
status: 'pending' | 'under_review' | 'approved' | 'rejected' | 'paid' | 'cancelled';
|
|
473
|
-
description?: string;
|
|
474
|
-
receiptUrl?: string;
|
|
475
|
-
supportingDocuments?: string[];
|
|
476
|
-
submittedAt: string;
|
|
477
|
-
processedAt?: string;
|
|
478
|
-
processedBy?: string;
|
|
479
|
-
paidAt?: string;
|
|
480
|
-
paymentMethod?: string;
|
|
481
|
-
paymentReference?: string;
|
|
482
|
-
rejectionReason?: string;
|
|
483
|
-
notes?: string;
|
|
484
|
-
metadata?: Record<string, unknown>;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
export interface BenefitClaimInput {
|
|
488
|
-
memberId: string;
|
|
489
|
-
benefitType: string;
|
|
490
|
-
benefitPlanId?: string;
|
|
491
|
-
amountInCents: number;
|
|
492
|
-
currency?: string;
|
|
493
|
-
description?: string;
|
|
494
|
-
receiptUrl?: string;
|
|
495
|
-
supportingDocuments?: string[];
|
|
496
|
-
metadata?: Record<string, unknown>;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
export interface CommissionPayout {
|
|
500
|
-
id: string;
|
|
501
|
-
payoutNumber: string;
|
|
502
|
-
memberId: string;
|
|
503
|
-
memberName: string;
|
|
504
|
-
memberEmail?: string;
|
|
505
|
-
commissionType: string;
|
|
506
|
-
amountInCents: number;
|
|
507
|
-
currency: string;
|
|
508
|
-
status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
509
|
-
sourceTransactionId?: string;
|
|
510
|
-
sourceTransactionType?: string;
|
|
511
|
-
calculationDetails?: {
|
|
512
|
-
baseAmount: number;
|
|
513
|
-
rate: number;
|
|
514
|
-
adjustments?: Array<{ description: string; amount: number }>;
|
|
515
|
-
};
|
|
516
|
-
scheduledFor?: string;
|
|
517
|
-
processedAt?: string;
|
|
518
|
-
paymentMethod?: string;
|
|
519
|
-
paymentReference?: string;
|
|
520
|
-
failureReason?: string;
|
|
521
|
-
notes?: string;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// ============ Certificate Types ============
|
|
525
|
-
|
|
526
|
-
export interface Certificate {
|
|
527
|
-
id: string;
|
|
528
|
-
certificateNumber: string;
|
|
529
|
-
type: 'attendance' | 'completion' | 'cme' | 'ce' | 'achievement' | 'custom';
|
|
530
|
-
recipientId: string;
|
|
531
|
-
recipientName: string;
|
|
532
|
-
recipientEmail?: string;
|
|
533
|
-
eventId?: string;
|
|
534
|
-
eventName?: string;
|
|
535
|
-
courseName?: string;
|
|
536
|
-
credits?: number;
|
|
537
|
-
creditType?: string;
|
|
538
|
-
issueDate: string;
|
|
539
|
-
expiryDate?: string;
|
|
540
|
-
status: 'draft' | 'issued' | 'revoked' | 'expired';
|
|
541
|
-
pdfUrl?: string;
|
|
542
|
-
verificationUrl?: string;
|
|
543
|
-
metadata?: Record<string, unknown>;
|
|
544
|
-
createdAt: string;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
// ============ Common Types ============
|
|
548
|
-
|
|
549
|
-
export interface Address {
|
|
550
|
-
street?: string;
|
|
551
|
-
street2?: string;
|
|
552
|
-
city?: string;
|
|
553
|
-
state?: string;
|
|
554
|
-
postalCode?: string;
|
|
555
|
-
country?: string;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
export interface AddressInput {
|
|
559
|
-
street?: string;
|
|
560
|
-
street2?: string;
|
|
561
|
-
city?: string;
|
|
562
|
-
state?: string;
|
|
563
|
-
postalCode?: string;
|
|
564
|
-
country?: string;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
// ============ Pagination ============
|
|
568
|
-
|
|
569
|
-
export interface PaginatedResponse<T> {
|
|
570
|
-
items: T[];
|
|
571
|
-
total: number;
|
|
572
|
-
hasMore: boolean;
|
|
573
|
-
nextCursor?: string;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
// ============ Webhook Types ============
|
|
577
|
-
|
|
578
|
-
export interface WebhookEvent {
|
|
579
|
-
id: string;
|
|
580
|
-
type: WebhookEventType;
|
|
581
|
-
timestamp: string;
|
|
582
|
-
data: Record<string, unknown>;
|
|
583
|
-
organizationId: string;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
export type WebhookEventType =
|
|
587
|
-
| 'contact.created'
|
|
588
|
-
| 'contact.updated'
|
|
589
|
-
| 'contact.deleted'
|
|
590
|
-
| 'organization.created'
|
|
591
|
-
| 'organization.updated'
|
|
592
|
-
| 'event.created'
|
|
593
|
-
| 'event.updated'
|
|
594
|
-
| 'event.published'
|
|
595
|
-
| 'event.cancelled'
|
|
596
|
-
| 'attendee.registered'
|
|
597
|
-
| 'attendee.checked_in'
|
|
598
|
-
| 'attendee.cancelled'
|
|
599
|
-
| 'form.submitted'
|
|
600
|
-
| 'order.created'
|
|
601
|
-
| 'order.paid'
|
|
602
|
-
| 'order.refunded'
|
|
603
|
-
| 'invoice.created'
|
|
604
|
-
| 'invoice.sent'
|
|
605
|
-
| 'invoice.paid'
|
|
606
|
-
| 'invoice.overdue'
|
|
607
|
-
| 'benefit_claim.submitted'
|
|
608
|
-
| 'benefit_claim.approved'
|
|
609
|
-
| 'benefit_claim.rejected'
|
|
610
|
-
| 'benefit_claim.paid'
|
|
611
|
-
| 'commission.calculated'
|
|
612
|
-
| 'commission.paid'
|
|
613
|
-
| 'certificate.issued';
|
|
614
|
-
`;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
module.exports = new TypesGenerator();
|