@aifabrix/builder 2.32.2 → 2.33.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.
Files changed (130) hide show
  1. package/.cursor/rules/project-rules.mdc +8 -0
  2. package/README.md +36 -8
  3. package/bin/aifabrix.js +6 -8
  4. package/integration/hubspot/README.md +8 -7
  5. package/integration/hubspot/companies.json +2048 -0
  6. package/integration/hubspot/create-hubspot.js +665 -0
  7. package/integration/hubspot/{hubspot-deploy-company.json → hubspot-datasource-company.json} +1 -1
  8. package/integration/hubspot/{hubspot-deploy-contact.json → hubspot-datasource-contact.json} +1 -1
  9. package/integration/hubspot/{hubspot-deploy-deal.json → hubspot-datasource-deal.json} +1 -1
  10. package/integration/hubspot/hubspot-deploy.json +832 -81
  11. package/integration/hubspot/hubspot-system.json +99 -0
  12. package/integration/hubspot/test-artifacts/wizard-hubspot-credential-real.yaml +20 -0
  13. package/integration/hubspot/test-artifacts/wizard-hubspot-env-vars.yaml +9 -0
  14. package/integration/hubspot/test-artifacts/wizard-invalid-add-datasource.yaml +5 -0
  15. package/integration/hubspot/test-artifacts/wizard-invalid-app-name.yaml +5 -0
  16. package/integration/hubspot/test-artifacts/wizard-invalid-credential-create.yaml +7 -0
  17. package/integration/hubspot/test-artifacts/wizard-invalid-credential-select.yaml +7 -0
  18. package/integration/hubspot/test-artifacts/wizard-invalid-known-platform.yaml +4 -0
  19. package/integration/hubspot/test-artifacts/wizard-invalid-missing-app.yaml +4 -0
  20. package/integration/hubspot/test-artifacts/wizard-invalid-missing-source.yaml +2 -0
  21. package/integration/hubspot/test-artifacts/wizard-invalid-mode.yaml +5 -0
  22. package/integration/hubspot/test-artifacts/wizard-invalid-openapi-file.yaml +5 -0
  23. package/integration/hubspot/test-artifacts/wizard-invalid-openapi-url.yaml +4 -0
  24. package/integration/hubspot/test-artifacts/wizard-invalid-source.yaml +4 -0
  25. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-array-test.yaml +5 -0
  26. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-key-test.yaml +5 -0
  27. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-path-test.yaml +5 -0
  28. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-test.yaml +5 -0
  29. package/integration/hubspot/test-artifacts/wizard-valid-for-rbac-test.yaml +5 -0
  30. package/integration/hubspot/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +5 -0
  31. package/integration/hubspot/test-dataplane-down-helpers.js +246 -0
  32. package/integration/hubspot/test-dataplane-down-tests.js +419 -0
  33. package/integration/hubspot/test-dataplane-down.js +157 -0
  34. package/integration/hubspot/test.js +1517 -0
  35. package/integration/hubspot/variables.yaml +4 -4
  36. package/integration/hubspot/wizard-hubspot-e2e.yaml +16 -0
  37. package/integration/hubspot/wizard-hubspot-platform.yaml +8 -0
  38. package/lib/api/applications.api.js +1 -0
  39. package/lib/api/index.js +10 -5
  40. package/lib/api/types/wizard.types.js +176 -38
  41. package/lib/api/wizard.api.js +207 -38
  42. package/lib/app/deploy.js +116 -54
  43. package/lib/app/display.js +6 -5
  44. package/lib/app/dockerfile.js +2 -1
  45. package/lib/app/list.js +78 -37
  46. package/lib/app/prompts.js +9 -5
  47. package/lib/app/readme.js +41 -112
  48. package/lib/app/register.js +44 -9
  49. package/lib/app/rotate-secret.js +50 -32
  50. package/lib/cli.js +243 -65
  51. package/lib/commands/app.js +4 -9
  52. package/lib/commands/auth-config.js +125 -0
  53. package/lib/commands/auth-status.js +261 -0
  54. package/lib/commands/datasource.js +3 -6
  55. package/lib/commands/login-credentials.js +4 -4
  56. package/lib/commands/login-device.js +43 -29
  57. package/lib/commands/login.js +22 -13
  58. package/lib/commands/wizard-config-normalizer.js +92 -0
  59. package/lib/commands/wizard-core.js +515 -0
  60. package/lib/commands/wizard-dataplane.js +122 -0
  61. package/lib/commands/wizard-headless.js +115 -0
  62. package/lib/commands/wizard.js +129 -357
  63. package/lib/core/config.js +46 -0
  64. package/lib/core/secrets.js +3 -22
  65. package/lib/core/templates-env.js +1 -1
  66. package/lib/datasource/deploy.js +34 -23
  67. package/lib/datasource/list.js +8 -6
  68. package/lib/deployment/deployer.js +25 -0
  69. package/lib/deployment/environment.js +10 -13
  70. package/lib/external-system/delete.js +151 -0
  71. package/lib/external-system/deploy.js +54 -378
  72. package/lib/external-system/download-helpers.js +45 -65
  73. package/lib/external-system/download.js +34 -13
  74. package/lib/external-system/generator.js +11 -7
  75. package/lib/external-system/test-auth.js +5 -3
  76. package/lib/generator/builders.js +3 -1
  77. package/lib/generator/external-controller-manifest.js +157 -0
  78. package/lib/generator/external-schema-utils.js +236 -0
  79. package/lib/generator/external.js +55 -3
  80. package/lib/generator/index.js +22 -10
  81. package/lib/generator/wizard-prompts.js +33 -10
  82. package/lib/generator/wizard.js +69 -86
  83. package/lib/infrastructure/compose.js +100 -0
  84. package/lib/infrastructure/helpers.js +139 -0
  85. package/lib/infrastructure/index.js +52 -311
  86. package/lib/infrastructure/services.js +168 -0
  87. package/lib/schema/application-schema.json +24 -5
  88. package/lib/schema/external-datasource.schema.json +303 -17
  89. package/lib/schema/external-system.schema.json +1 -1
  90. package/lib/schema/wizard-config.schema.json +234 -0
  91. package/lib/utils/api.js +37 -42
  92. package/lib/utils/app-existence.js +42 -0
  93. package/lib/utils/app-register-config.js +7 -2
  94. package/lib/utils/app-register-display.js +2 -1
  95. package/lib/utils/auth-config-validator.js +92 -0
  96. package/lib/utils/cli-utils.js +3 -1
  97. package/lib/utils/command-header.js +43 -0
  98. package/lib/utils/compose-generator.js +113 -70
  99. package/lib/utils/controller-url.js +115 -0
  100. package/lib/utils/dataplane-health.js +115 -0
  101. package/lib/utils/dataplane-resolver.js +29 -0
  102. package/lib/utils/dev-config.js +6 -2
  103. package/lib/utils/env-copy.js +2 -1
  104. package/lib/utils/env-map.js +2 -1
  105. package/lib/utils/env-ports.js +2 -1
  106. package/lib/utils/env-template.js +1 -1
  107. package/lib/utils/error-formatter.js +149 -28
  108. package/lib/utils/external-readme.js +125 -0
  109. package/lib/utils/help-builder.js +190 -0
  110. package/lib/utils/infra-status.js +13 -3
  111. package/lib/utils/paths.js +17 -2
  112. package/lib/utils/port-resolver.js +111 -0
  113. package/lib/utils/secrets-helpers.js +3 -15
  114. package/lib/utils/secrets-utils.js +2 -2
  115. package/lib/utils/token-manager.js +69 -4
  116. package/lib/utils/variable-transformer.js +7 -2
  117. package/lib/validation/external-manifest-validator.js +202 -0
  118. package/lib/validation/validate-display.js +406 -0
  119. package/lib/validation/validate.js +159 -123
  120. package/lib/validation/validator.js +38 -4
  121. package/lib/validation/wizard-config-validator.js +267 -0
  122. package/package.json +4 -2
  123. package/templates/applications/README.md.hbs +19 -17
  124. package/templates/applications/miso-controller/env.template +1 -1
  125. package/templates/applications/miso-controller/rbac.yaml +7 -7
  126. package/templates/external-system/README.md.hbs +99 -0
  127. package/templates/external-system/external-system.json.hbs +1 -1
  128. package/templates/infra/compose.yaml.hbs +35 -0
  129. package/templates/python/docker-compose.hbs +26 -0
  130. package/templates/typescript/docker-compose.hbs +26 -0
@@ -7,11 +7,11 @@ app:
7
7
  externalIntegration:
8
8
  schemaBasePath: ./
9
9
  systems:
10
- - hubspot-deploy.json
10
+ - hubspot-system.json
11
11
  dataSources:
12
- - hubspot-deploy-company.json
13
- - hubspot-deploy-contact.json
14
- - hubspot-deploy-deal.json
12
+ - hubspot-datasource-company.json
13
+ - hubspot-datasource-contact.json
14
+ - hubspot-datasource-deal.json
15
15
  autopublish: true
16
16
  version: 1.0.0
17
17
 
@@ -0,0 +1,16 @@
1
+ appName: hubspot-test-e2e
2
+ mode: create-system
3
+ source:
4
+ type: openapi-file
5
+ filePath: /workspace/aifabrix-builder/integration/hubspot/companies.json
6
+ credential:
7
+ action: skip
8
+ preferences:
9
+ intent: "HubSpot CRM integration for companies entity"
10
+ fieldOnboardingLevel: full
11
+ enableOpenAPIGeneration: true
12
+ enableABAC: true
13
+ enableRBAC: false
14
+ deployment:
15
+ controller: http://localhost:3110
16
+ environment: miso
@@ -0,0 +1,8 @@
1
+ appName: hubspot-test-platform
2
+ mode: create-system
3
+ source:
4
+ type: known-platform
5
+ platform: hubspot
6
+ preferences:
7
+ intent: "HubSpot CRM integration"
8
+ fieldOnboardingLevel: standard
@@ -123,6 +123,7 @@ async function deleteApplication(controllerUrl, appKey, authConfig) {
123
123
  * @param {string} [registrationData.description] - Application description
124
124
  * @param {string} [registrationData.registryMode] - Registry mode
125
125
  * @param {number} [registrationData.port] - Application port
126
+ * @param {string} [registrationData.url] - Application URL (e.g. http://localhost:3001 when controller is localhost)
126
127
  * @param {string} [registrationData.image] - Container image
127
128
  * @param {Object} [registrationData.externalIntegration] - External integration config
128
129
  * @returns {Promise<Object>} Registration response with application and credentials
package/lib/api/index.js CHANGED
@@ -97,7 +97,8 @@ class ApiClient {
97
97
  }
98
98
 
99
99
  if (this.authConfig.type === 'bearer' || this.authConfig.type === 'client-token') {
100
- return await authenticatedApiCall(url, { method: 'GET', headers }, this.authConfig.token);
100
+ // Pass full authConfig to enable proper token refresh using controller URL
101
+ return await authenticatedApiCall(url, { method: 'GET', headers }, this.authConfig);
101
102
  }
102
103
 
103
104
  return await makeApiCall(url, { method: 'GET', headers });
@@ -141,7 +142,8 @@ class ApiClient {
141
142
  }
142
143
 
143
144
  if (this.authConfig.type === 'bearer' || this.authConfig.type === 'client-token') {
144
- return await authenticatedApiCall(url, requestOptions, this.authConfig.token);
145
+ // Pass full authConfig to enable proper token refresh using controller URL
146
+ return await authenticatedApiCall(url, requestOptions, this.authConfig);
145
147
  }
146
148
 
147
149
  return await makeApiCall(url, requestOptions);
@@ -170,7 +172,8 @@ class ApiClient {
170
172
  }
171
173
 
172
174
  if (this.authConfig.type === 'bearer' || this.authConfig.type === 'client-token') {
173
- return await authenticatedApiCall(url, requestOptions, this.authConfig.token);
175
+ // Pass full authConfig to enable proper token refresh using controller URL
176
+ return await authenticatedApiCall(url, requestOptions, this.authConfig);
174
177
  }
175
178
 
176
179
  return await makeApiCall(url, requestOptions);
@@ -199,7 +202,8 @@ class ApiClient {
199
202
  }
200
203
 
201
204
  if (this.authConfig.type === 'bearer' || this.authConfig.type === 'client-token') {
202
- return await authenticatedApiCall(url, requestOptions, this.authConfig.token);
205
+ // Pass full authConfig to enable proper token refresh using controller URL
206
+ return await authenticatedApiCall(url, requestOptions, this.authConfig);
203
207
  }
204
208
 
205
209
  return await makeApiCall(url, requestOptions);
@@ -223,7 +227,8 @@ class ApiClient {
223
227
  };
224
228
 
225
229
  if (this.authConfig.type === 'bearer' || this.authConfig.type === 'client-token') {
226
- return await authenticatedApiCall(url, requestOptions, this.authConfig.token);
230
+ // Pass full authConfig to enable proper token refresh using controller URL
231
+ return await authenticatedApiCall(url, requestOptions, this.authConfig);
227
232
  }
228
233
 
229
234
  return await makeApiCall(url, requestOptions);
@@ -5,33 +5,66 @@
5
5
  */
6
6
 
7
7
  /**
8
- * Wizard mode selection request
9
- * @typedef {Object} WizardModeSelectionRequest
8
+ * Wizard session request
9
+ * @typedef {Object} WizardSessionRequest
10
10
  * @property {string} mode - Wizard mode ('create-system' | 'add-datasource')
11
+ * @property {string} [systemIdOrKey] - Existing system ID or key (required when mode='add-datasource')
11
12
  */
12
13
 
13
14
  /**
14
- * Wizard mode selection response
15
- * @typedef {Object} WizardModeSelectionResponse
15
+ * Wizard session response
16
+ * @typedef {Object} WizardSessionResponse
16
17
  * @property {boolean} success - Request success flag
17
- * @property {Object} data - Mode selection data
18
- * @property {string} data.mode - Selected mode
18
+ * @property {Object} data - Session data
19
+ * @property {Object} data.sessionId - Session identifier object
20
+ * @property {string} data.sessionId.id - Session ID
21
+ * @property {string} data.sessionId.key - Session key
22
+ * @property {string} data.sessionId.name - Session name
23
+ * @property {string} data.sessionId.type - Session type ('WizardSession')
24
+ * @property {string} data.expiresAt - Session expiration timestamp (ISO 8601)
19
25
  * @property {string} timestamp - Response timestamp (ISO 8601)
20
26
  */
21
27
 
22
28
  /**
23
- * Wizard source selection request
24
- * @typedef {Object} WizardSourceSelectionRequest
25
- * @property {string} sourceType - Source type ('openapi-file' | 'openapi-url' | 'mcp-server' | 'known-platform')
26
- * @property {string} [sourceData] - Source data (file path, URL, etc.)
29
+ * Wizard session delete response
30
+ * @typedef {Object} WizardDeleteSessionResponse
31
+ * @property {boolean} success - Request success flag
32
+ * @property {Object} [data] - Delete response data
33
+ * @property {string} [data.message] - Confirmation message
34
+ * @property {string} timestamp - Response timestamp (ISO 8601)
35
+ */
36
+
37
+ /**
38
+ * Wizard session progress response
39
+ * @typedef {Object} WizardProgressResponse
40
+ * @property {boolean} success - Request success flag
41
+ * @property {Object} data - Progress data
42
+ * @property {number} data.currentStep - Current step number
43
+ * @property {number} data.totalSteps - Total number of steps
44
+ * @property {string[]} data.completedSteps - Array of completed step names
45
+ * @property {boolean} data.canProceed - Whether user can proceed to next step
46
+ * @property {string} timestamp - Response timestamp (ISO 8601)
47
+ */
48
+
49
+ /**
50
+ * Credential selection request
51
+ * @typedef {Object} CredentialSelectionRequest
52
+ * @property {string} action - Action type ('create' | 'select' | 'skip')
53
+ * @property {Object} [credentialConfig] - Credential config (required when action='create')
54
+ * @property {string} [credentialConfig.key] - Credential key
55
+ * @property {string} [credentialConfig.displayName] - Credential display name
56
+ * @property {string} [credentialConfig.type] - Credential type (e.g., 'OAUTH2', 'API_KEY')
57
+ * @property {Object} [credentialConfig.config] - Credential configuration
58
+ * @property {string} [credentialIdOrKey] - Credential ID or key (required when action='select')
27
59
  */
28
60
 
29
61
  /**
30
- * Wizard source selection response
31
- * @typedef {Object} WizardSourceSelectionResponse
62
+ * Credential selection response
63
+ * @typedef {Object} CredentialSelectionResponse
32
64
  * @property {boolean} success - Request success flag
33
- * @property {Object} data - Source selection data
34
- * @property {string} data.sourceType - Selected source type
65
+ * @property {Object} data - Credential selection data
66
+ * @property {string} data.action - Selected action
67
+ * @property {string} [data.credentialIdOrKey] - Selected or created credential ID/key
35
68
  * @property {string} timestamp - Response timestamp (ISO 8601)
36
69
  */
37
70
 
@@ -41,14 +74,19 @@
41
74
  * @property {boolean} success - Request success flag
42
75
  * @property {Object} data - Parsed OpenAPI data
43
76
  * @property {Object} data.spec - Parsed OpenAPI specification
44
- * @property {string} data.version - OpenAPI version
77
+ * @property {string} data.validationStatus - Validation status ('valid' | 'invalid')
78
+ * @property {string[]} [data.validationErrors] - Validation errors (if any)
79
+ * @property {Object} data.specInfo - Specification info
80
+ * @property {string} data.specInfo.title - API title
81
+ * @property {string} data.specInfo.version - API version
82
+ * @property {string[]} data.specInfo.servers - Server URLs
45
83
  * @property {string} timestamp - Response timestamp (ISO 8601)
46
84
  */
47
85
 
48
86
  /**
49
87
  * Wizard detect type request
50
88
  * @typedef {Object} WizardDetectTypeRequest
51
- * @property {Object} openApiSpec - OpenAPI specification object
89
+ * @property {Object} openapiSpec - OpenAPI specification object
52
90
  */
53
91
 
54
92
  /**
@@ -56,23 +94,34 @@
56
94
  * @typedef {Object} WizardDetectTypeResponse
57
95
  * @property {boolean} success - Request success flag
58
96
  * @property {Object} data - Type detection data
59
- * @property {string} data.apiType - Detected API type (e.g., 'rest', 'graphql', 'rpc')
60
- * @property {string} data.category - API category (e.g., 'crm', 'support', 'sales')
61
- * @property {Object} data.confidence - Confidence scores for detection
97
+ * @property {Object[]} data.detectedTypes - Array of detected types with confidence
98
+ * @property {string} data.detectedTypes[].type - Detected type
99
+ * @property {number} data.detectedTypes[].confidence - Confidence score (0-1)
100
+ * @property {string} data.detectedTypes[].reasoning - Reasoning for detection
101
+ * @property {string} data.recommendedType - Recommended type
62
102
  * @property {string} timestamp - Response timestamp (ISO 8601)
63
103
  */
64
104
 
65
105
  /**
66
106
  * Wizard generate config request
67
107
  * @typedef {Object} WizardGenerateConfigRequest
68
- * @property {string} mode - Wizard mode
69
- * @property {string} sourceType - Source type
70
- * @property {Object} [openApiSpec] - OpenAPI specification (if applicable)
71
- * @property {string} [userIntent] - User intent (e.g., 'sales-focused', 'support-focused')
72
- * @property {Object} [preferences] - User preferences
73
- * @property {boolean} [preferences.mcp] - Enable MCP
74
- * @property {boolean} [preferences.abac] - Enable ABAC
75
- * @property {boolean} [preferences.rbac] - Enable RBAC
108
+ * @property {Object} openapiSpec - OpenAPI specification object (required)
109
+ * @property {string} detectedType - Detected API type (required, e.g., 'record-based')
110
+ * @property {string} intent - User intent (required, any descriptive text)
111
+ * @property {string} mode - Wizard mode (required, 'create-system' | 'add-datasource')
112
+ * @property {string} [systemIdOrKey] - Existing system ID/key (required for add-datasource)
113
+ * @property {string} [credentialIdOrKey] - Credential ID or key
114
+ * @property {string} [fieldOnboardingLevel] - Field onboarding level ('full' | 'standard' | 'minimal')
115
+ * @property {boolean} [enableOpenAPIGeneration] - Enable OpenAPI operation generation
116
+ * @property {Object} [userPreferences] - User preferences
117
+ * @property {boolean} [userPreferences.enableMCP] - Enable MCP
118
+ * @property {boolean} [userPreferences.enableABAC] - Enable ABAC
119
+ * @property {boolean} [userPreferences.enableRBAC] - Enable RBAC
120
+ */
121
+
122
+ /**
123
+ * Wizard generate config stream request
124
+ * @typedef {WizardGenerateConfigRequest} WizardGenerateConfigStreamRequest
76
125
  */
77
126
 
78
127
  /**
@@ -81,8 +130,17 @@
81
130
  * @property {boolean} success - Request success flag
82
131
  * @property {Object} data - Generated configuration data
83
132
  * @property {Object} data.systemConfig - External system configuration
84
- * @property {Object[]} data.datasourceConfigs - Array of datasource configurations
85
- * @property {string} data.systemKey - Generated system key
133
+ * @property {Object} data.datasourceConfig - Datasource configuration
134
+ * @property {string} [data.systemKey] - Generated system key
135
+ * @property {string} timestamp - Response timestamp (ISO 8601)
136
+ */
137
+
138
+ /**
139
+ * Wizard generate config stream response
140
+ * @typedef {Object} WizardGenerateConfigStreamResponse
141
+ * @property {boolean} success - Request success flag
142
+ * @property {Object} [data] - Stream response metadata
143
+ * @property {string} [data.streamId] - Stream identifier
86
144
  * @property {string} timestamp - Response timestamp (ISO 8601)
87
145
  */
88
146
 
@@ -90,7 +148,7 @@
90
148
  * Wizard validate request
91
149
  * @typedef {Object} WizardValidateRequest
92
150
  * @property {Object} systemConfig - System configuration to validate
93
- * @property {Object[]} datasourceConfigs - Array of datasource configurations to validate
151
+ * @property {Object|Object[]} datasourceConfig - Datasource configuration(s) to validate
94
152
  */
95
153
 
96
154
  /**
@@ -98,9 +156,66 @@
98
156
  * @typedef {Object} WizardValidateResponse
99
157
  * @property {boolean} success - Request success flag
100
158
  * @property {Object} data - Validation data
101
- * @property {boolean} data.valid - Whether configuration is valid
159
+ * @property {boolean} data.isValid - Whether configuration is valid
102
160
  * @property {Object[]} [data.errors] - Array of validation errors (if invalid)
161
+ * @property {string} data.errors[].severity - Error severity
162
+ * @property {string} data.errors[].field - Field with error
163
+ * @property {string} data.errors[].message - Error message
103
164
  * @property {Object[]} [data.warnings] - Array of validation warnings
165
+ * @property {string} data.warnings[].severity - Warning severity
166
+ * @property {string} data.warnings[].field - Field with warning
167
+ * @property {string} data.warnings[].message - Warning message
168
+ * @property {string} timestamp - Response timestamp (ISO 8601)
169
+ */
170
+
171
+ /**
172
+ * Wizard validate all steps response
173
+ * @typedef {Object} WizardValidateAllStepsResponse
174
+ * @property {boolean} success - Request success flag
175
+ * @property {Object} data - Validation data
176
+ * @property {boolean} data.isValid - Whether all steps are valid
177
+ * @property {Object[]} [data.errors] - Array of validation errors (if invalid)
178
+ * @property {Object[]} [data.warnings] - Array of validation warnings
179
+ * @property {string} timestamp - Response timestamp (ISO 8601)
180
+ */
181
+
182
+ /**
183
+ * Wizard step validation response
184
+ * @typedef {Object} WizardStepValidationResponse
185
+ * @property {boolean} success - Request success flag
186
+ * @property {Object} data - Step validation data
187
+ * @property {number} data.step - Step number
188
+ * @property {boolean} data.isValid - Whether step is valid
189
+ * @property {Object[]} [data.errors] - Array of validation errors
190
+ * @property {Object[]} [data.warnings] - Array of validation warnings
191
+ * @property {string[]} [data.suggestions] - Array of suggestions
192
+ * @property {boolean} data.canProceed - Whether user can proceed
193
+ * @property {string} timestamp - Response timestamp (ISO 8601)
194
+ */
195
+
196
+ /**
197
+ * Wizard preview response
198
+ * @typedef {Object} WizardPreviewResponse
199
+ * @property {boolean} success - Request success flag
200
+ * @property {Object} data - Preview data
201
+ * @property {Object} data.sessionId - Session identifier
202
+ * @property {Object} data.systemConfig - System configuration
203
+ * @property {Object} data.datasourceConfig - Datasource configuration
204
+ * @property {Object} data.systemSummary - System summary
205
+ * @property {string} data.systemSummary.key - System key
206
+ * @property {string} data.systemSummary.displayName - Display name
207
+ * @property {string} data.systemSummary.type - System type
208
+ * @property {string} data.systemSummary.baseUrl - Base URL
209
+ * @property {string} data.systemSummary.authenticationType - Authentication type
210
+ * @property {number} data.systemSummary.endpointCount - Number of endpoints
211
+ * @property {Object} data.datasourceSummary - Datasource summary
212
+ * @property {string} data.datasourceSummary.key - Datasource key
213
+ * @property {string} data.datasourceSummary.entity - Entity name
214
+ * @property {string} data.datasourceSummary.resourceType - Resource type
215
+ * @property {number} data.datasourceSummary.cipStepCount - Number of CIP steps
216
+ * @property {number} data.datasourceSummary.fieldMappingCount - Number of field mappings
217
+ * @property {number} data.datasourceSummary.exposedProfileCount - Number of exposed profiles
218
+ * @property {number} data.datasourceSummary.indexingFieldCount - Number of indexing fields
104
219
  * @property {string} timestamp - Response timestamp (ISO 8601)
105
220
  */
106
221
 
@@ -121,12 +236,6 @@
121
236
  * @property {string} timestamp - Response timestamp (ISO 8601)
122
237
  */
123
238
 
124
- /**
125
- * Deployment docs request
126
- * @typedef {Object} DeploymentDocsRequest
127
- * @property {string} systemKey - System key identifier
128
- */
129
-
130
239
  /**
131
240
  * Deployment docs response
132
241
  * @typedef {Object} DeploymentDocsResponse
@@ -138,5 +247,34 @@
138
247
  * @property {string} timestamp - Response timestamp (ISO 8601)
139
248
  */
140
249
 
141
- module.exports = {};
250
+ /**
251
+ * Wizard config YAML structure
252
+ * @typedef {Object} WizardConfigYaml
253
+ * @property {string} appName - Application name (pattern: ^[a-z0-9-_]+$)
254
+ * @property {string} mode - Wizard mode ('create-system' | 'add-datasource')
255
+ * @property {string} [systemIdOrKey] - Existing system ID/key (required when mode='add-datasource')
256
+ * @property {Object} source - Source configuration
257
+ * @property {string} source.type - Source type ('openapi-file' | 'openapi-url' | 'mcp-server' | 'known-platform')
258
+ * @property {string} [source.filePath] - OpenAPI file path (for openapi-file)
259
+ * @property {string} [source.url] - OpenAPI URL (for openapi-url)
260
+ * @property {string} [source.serverUrl] - MCP server URL (for mcp-server)
261
+ * @property {string} [source.token] - MCP token (for mcp-server, supports ${ENV_VAR})
262
+ * @property {string} [source.platform] - Known platform (for known-platform)
263
+ * @property {Object} [credential] - Credential configuration
264
+ * @property {string} credential.action - Action ('create' | 'select' | 'skip')
265
+ * @property {string} [credential.credentialIdOrKey] - Credential ID/key (for select)
266
+ * @property {Object} [credential.config] - Credential config (for create)
267
+ * @property {Object} [preferences] - Generation preferences
268
+ * @property {string} [preferences.intent] - User intent (any descriptive text)
269
+ * @property {string} [preferences.fieldOnboardingLevel] - Field level ('full' | 'standard' | 'minimal')
270
+ * @property {boolean} [preferences.enableOpenAPIGeneration] - Enable OpenAPI generation
271
+ * @property {boolean} [preferences.enableMCP] - Enable MCP
272
+ * @property {boolean} [preferences.enableABAC] - Enable ABAC
273
+ * @property {boolean} [preferences.enableRBAC] - Enable RBAC
274
+ * @property {Object} [deployment] - Deployment settings
275
+ * @property {string} [deployment.controller] - Controller URL
276
+ * @property {string} [deployment.environment] - Environment key
277
+ * @property {string} [deployment.dataplane] - Dataplane URL override
278
+ */
142
279
 
280
+ module.exports = {};