@quiltdata/benchling-webhook 0.6.3-20251104T170954Z → 0.7.2-20251106T003353Z

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 (141) hide show
  1. package/README.md +166 -5
  2. package/dist/bin/benchling-webhook.d.ts +2 -16
  3. package/dist/bin/benchling-webhook.d.ts.map +1 -1
  4. package/dist/bin/benchling-webhook.js +98 -158
  5. package/dist/bin/benchling-webhook.js.map +1 -1
  6. package/dist/bin/cli.js +96 -8
  7. package/dist/bin/cli.js.map +1 -1
  8. package/dist/bin/{config-profiles.d.ts → commands/config-profiles.d.ts} +10 -9
  9. package/dist/bin/commands/config-profiles.d.ts.map +1 -0
  10. package/dist/bin/{config-profiles.js → commands/config-profiles.js} +110 -102
  11. package/dist/bin/commands/config-profiles.js.map +1 -0
  12. package/dist/bin/commands/create-secret.d.ts.map +1 -0
  13. package/dist/bin/commands/create-secret.js.map +1 -0
  14. package/dist/bin/commands/deploy.d.ts +11 -0
  15. package/dist/bin/commands/deploy.d.ts.map +1 -1
  16. package/dist/bin/commands/deploy.js +65 -110
  17. package/dist/bin/commands/deploy.js.map +1 -1
  18. package/dist/bin/{get-env.d.ts → commands/get-env.d.ts} +1 -1
  19. package/dist/bin/commands/get-env.d.ts.map +1 -0
  20. package/dist/bin/{get-env.js → commands/get-env.js} +2 -2
  21. package/dist/bin/commands/get-env.js.map +1 -0
  22. package/dist/bin/commands/health-check.d.ts +47 -0
  23. package/dist/bin/commands/health-check.d.ts.map +1 -0
  24. package/dist/bin/commands/health-check.js +357 -0
  25. package/dist/bin/commands/health-check.js.map +1 -0
  26. package/dist/bin/commands/infer-quilt-config.d.ts +50 -0
  27. package/dist/bin/commands/infer-quilt-config.d.ts.map +1 -0
  28. package/dist/bin/commands/infer-quilt-config.js +356 -0
  29. package/dist/bin/commands/infer-quilt-config.js.map +1 -0
  30. package/dist/bin/commands/init.d.ts.map +1 -1
  31. package/dist/bin/commands/init.js +2 -32
  32. package/dist/bin/commands/init.js.map +1 -1
  33. package/dist/bin/commands/manifest.d.ts +11 -0
  34. package/dist/bin/commands/manifest.d.ts.map +1 -1
  35. package/dist/bin/commands/manifest.js +22 -8
  36. package/dist/bin/commands/manifest.js.map +1 -1
  37. package/dist/bin/commands/publish.d.ts.map +1 -0
  38. package/dist/bin/{publish.js → commands/publish.js} +2 -2
  39. package/dist/bin/commands/publish.js.map +1 -0
  40. package/dist/bin/commands/setup-profile.d.ts +29 -0
  41. package/dist/bin/commands/setup-profile.d.ts.map +1 -0
  42. package/dist/bin/commands/setup-profile.js +220 -0
  43. package/dist/bin/commands/setup-profile.js.map +1 -0
  44. package/dist/bin/commands/setup-wizard.d.ts +26 -11
  45. package/dist/bin/commands/setup-wizard.d.ts.map +1 -1
  46. package/dist/bin/commands/setup-wizard.js +844 -46
  47. package/dist/bin/commands/setup-wizard.js.map +1 -1
  48. package/dist/{scripts → bin/commands}/sync-secrets.d.ts +6 -1
  49. package/dist/bin/commands/sync-secrets.d.ts.map +1 -0
  50. package/dist/{scripts → bin/commands}/sync-secrets.js +159 -55
  51. package/dist/bin/commands/sync-secrets.js.map +1 -0
  52. package/dist/bin/commands/validate.d.ts.map +1 -1
  53. package/dist/bin/commands/validate.js +2 -12
  54. package/dist/bin/commands/validate.js.map +1 -1
  55. package/dist/lib/alb-api-gateway.d.ts +7 -1
  56. package/dist/lib/alb-api-gateway.d.ts.map +1 -1
  57. package/dist/lib/alb-api-gateway.js +9 -6
  58. package/dist/lib/alb-api-gateway.js.map +1 -1
  59. package/dist/lib/benchling-webhook-stack.d.ts +13 -12
  60. package/dist/lib/benchling-webhook-stack.d.ts.map +1 -1
  61. package/dist/lib/benchling-webhook-stack.js +43 -30
  62. package/dist/lib/benchling-webhook-stack.js.map +1 -1
  63. package/dist/lib/configuration-saver.d.ts +4 -16
  64. package/dist/lib/configuration-saver.d.ts.map +1 -1
  65. package/dist/lib/configuration-saver.js +14 -54
  66. package/dist/lib/configuration-saver.js.map +1 -1
  67. package/dist/lib/fargate-service.d.ts +11 -21
  68. package/dist/lib/fargate-service.d.ts.map +1 -1
  69. package/dist/lib/fargate-service.js +79 -176
  70. package/dist/lib/fargate-service.js.map +1 -1
  71. package/dist/lib/types/config.d.ts +591 -224
  72. package/dist/lib/types/config.d.ts.map +1 -1
  73. package/dist/lib/types/config.js +134 -3
  74. package/dist/lib/types/config.js.map +1 -1
  75. package/dist/lib/utils/config.d.ts.map +1 -1
  76. package/dist/lib/utils/config.js.map +1 -1
  77. package/dist/lib/xdg-config.d.ts +222 -106
  78. package/dist/lib/xdg-config.d.ts.map +1 -1
  79. package/dist/lib/xdg-config.js +448 -387
  80. package/dist/lib/xdg-config.js.map +1 -1
  81. package/dist/package.json +16 -13
  82. package/dist/scripts/check-logs.d.ts +12 -0
  83. package/dist/scripts/check-logs.d.ts.map +1 -0
  84. package/dist/{bin → scripts}/check-logs.js +65 -15
  85. package/dist/scripts/check-logs.js.map +1 -0
  86. package/dist/scripts/check-webhook-verification.d.ts +3 -0
  87. package/dist/scripts/check-webhook-verification.d.ts.map +1 -0
  88. package/dist/{bin/test-invalid-signature.js → scripts/check-webhook-verification.js} +1 -1
  89. package/dist/scripts/check-webhook-verification.js.map +1 -0
  90. package/dist/scripts/infer-quilt-config.d.ts +23 -26
  91. package/dist/scripts/infer-quilt-config.d.ts.map +1 -1
  92. package/dist/scripts/infer-quilt-config.js +58 -96
  93. package/dist/scripts/infer-quilt-config.js.map +1 -1
  94. package/dist/scripts/send-event.d.ts.map +1 -0
  95. package/dist/scripts/send-event.js.map +1 -0
  96. package/dist/{bin → scripts}/version.d.ts +3 -1
  97. package/dist/scripts/version.d.ts.map +1 -0
  98. package/dist/{bin → scripts}/version.js +95 -9
  99. package/dist/scripts/version.js.map +1 -0
  100. package/package.json +16 -13
  101. package/dist/bin/check-logs.d.ts +0 -7
  102. package/dist/bin/check-logs.d.ts.map +0 -1
  103. package/dist/bin/check-logs.js.map +0 -1
  104. package/dist/bin/config-profiles.d.ts.map +0 -1
  105. package/dist/bin/config-profiles.js.map +0 -1
  106. package/dist/bin/create-secret.d.ts.map +0 -1
  107. package/dist/bin/create-secret.js.map +0 -1
  108. package/dist/bin/dev-deploy.d.ts +0 -20
  109. package/dist/bin/dev-deploy.d.ts.map +0 -1
  110. package/dist/bin/dev-deploy.js +0 -289
  111. package/dist/bin/dev-deploy.js.map +0 -1
  112. package/dist/bin/get-env.d.ts.map +0 -1
  113. package/dist/bin/get-env.js.map +0 -1
  114. package/dist/bin/publish.d.ts.map +0 -1
  115. package/dist/bin/publish.js.map +0 -1
  116. package/dist/bin/release.d.ts +0 -11
  117. package/dist/bin/release.d.ts.map +0 -1
  118. package/dist/bin/release.js +0 -141
  119. package/dist/bin/release.js.map +0 -1
  120. package/dist/bin/send-event.d.ts.map +0 -1
  121. package/dist/bin/send-event.js.map +0 -1
  122. package/dist/bin/test-invalid-signature.d.ts +0 -3
  123. package/dist/bin/test-invalid-signature.d.ts.map +0 -1
  124. package/dist/bin/test-invalid-signature.js.map +0 -1
  125. package/dist/bin/version.d.ts.map +0 -1
  126. package/dist/bin/version.js.map +0 -1
  127. package/dist/scripts/config-health-check.d.ts +0 -84
  128. package/dist/scripts/config-health-check.d.ts.map +0 -1
  129. package/dist/scripts/config-health-check.js +0 -659
  130. package/dist/scripts/config-health-check.js.map +0 -1
  131. package/dist/scripts/install-wizard.d.ts +0 -34
  132. package/dist/scripts/install-wizard.d.ts.map +0 -1
  133. package/dist/scripts/install-wizard.js +0 -719
  134. package/dist/scripts/install-wizard.js.map +0 -1
  135. package/dist/scripts/sync-secrets.d.ts.map +0 -1
  136. package/dist/scripts/sync-secrets.js.map +0 -1
  137. /package/dist/bin/{create-secret.d.ts → commands/create-secret.d.ts} +0 -0
  138. /package/dist/bin/{create-secret.js → commands/create-secret.js} +0 -0
  139. /package/dist/bin/{publish.d.ts → commands/publish.d.ts} +0 -0
  140. /package/dist/{bin → scripts}/send-event.d.ts +0 -0
  141. /package/dist/{bin → scripts}/send-event.js +0 -0
@@ -1,252 +1,410 @@
1
1
  /**
2
- * Comprehensive Type Definitions for XDG Configuration System
2
+ * Type Definitions for v0.7.0 Configuration Architecture
3
3
  *
4
- * This module defines all TypeScript types and interfaces for the
5
- * XDG-compliant configuration management system.
4
+ * BREAKING CHANGE: Complete rewrite with NO backward compatibility.
5
+ * This module defines the new unified configuration system for multi-environment deployments.
6
6
  *
7
7
  * @module types/config
8
+ * @version 0.7.0
8
9
  */
9
10
  /**
10
11
  * Configuration profile identifier
11
12
  * Profiles allow multiple named configurations (e.g., "default", "dev", "prod")
13
+ *
14
+ * @example "default"
15
+ * @example "dev"
16
+ * @example "prod"
12
17
  */
13
18
  export type ProfileName = string;
14
19
  /**
15
- * Configuration type identifier
16
- */
17
- export type ConfigType = "user" | "derived" | "deploy" | "complete";
18
- /**
19
- * User Configuration
20
+ * Profile Configuration (Single Source of Truth)
21
+ *
22
+ * This is the primary configuration interface for v0.7.0, replacing the previous
23
+ * three-tier system (user/derived/deploy). All configuration is now unified in
24
+ * a single structured format.
20
25
  *
21
- * User-provided settings that define the core configuration.
22
- * This is the primary configuration file edited by users.
26
+ * @example
27
+ * ```json
28
+ * {
29
+ * "quilt": {
30
+ * "stackArn": "arn:aws:cloudformation:...",
31
+ * "catalog": "https://quilt.example.com",
32
+ * "bucket": "my-quilt-bucket",
33
+ * "database": "quilt_catalog",
34
+ * "queueArn": "arn:aws:sqs:...",
35
+ * "region": "us-east-1"
36
+ * },
37
+ * "benchling": {
38
+ * "tenant": "my-tenant",
39
+ * "clientId": "client_123",
40
+ * "secretArn": "arn:aws:secretsmanager:...",
41
+ * "appDefinitionId": "app_456"
42
+ * },
43
+ * "packages": {
44
+ * "bucket": "benchling-packages",
45
+ * "prefix": "benchling",
46
+ * "metadataKey": "experiment_id"
47
+ * },
48
+ * "deployment": {
49
+ * "region": "us-east-1",
50
+ * "imageTag": "latest"
51
+ * },
52
+ * "_metadata": {
53
+ * "version": "0.7.0",
54
+ * "createdAt": "2025-11-04T10:00:00Z",
55
+ * "updatedAt": "2025-11-04T10:00:00Z",
56
+ * "source": "wizard"
57
+ * }
58
+ * }
59
+ * ```
23
60
  */
24
- export interface UserConfig {
25
- /**
26
- * Quilt catalog URL (e.g., "https://quilt.example.com")
27
- */
28
- quiltCatalog?: string;
29
- /**
30
- * Quilt user bucket name for package storage
31
- */
32
- quiltUserBucket?: string;
61
+ export interface ProfileConfig {
33
62
  /**
34
- * Quilt database (Athena/Glue) identifier
63
+ * Quilt catalog and infrastructure configuration
35
64
  */
36
- quiltDatabase?: string;
65
+ quilt: QuiltConfig;
37
66
  /**
38
- * Quilt CloudFormation stack ARN
39
- */
40
- quiltStackArn?: string;
41
- /**
42
- * AWS region for Quilt resources
43
- */
44
- quiltRegion?: string;
45
- /**
46
- * Benchling tenant identifier
67
+ * Benchling tenant and OAuth configuration
47
68
  */
48
- benchlingTenant?: string;
69
+ benchling: BenchlingConfig;
49
70
  /**
50
- * Benchling OAuth client ID
71
+ * Package storage and metadata configuration
51
72
  */
52
- benchlingClientId?: string;
73
+ packages: PackageConfig;
53
74
  /**
54
- * Benchling OAuth client secret (stored in Secrets Manager in production)
75
+ * AWS deployment configuration (CDK)
55
76
  */
56
- benchlingClientSecret?: string;
77
+ deployment: DeploymentConfig;
57
78
  /**
58
- * Benchling app definition ID
79
+ * Optional logging configuration
59
80
  */
60
- benchlingAppDefinitionId?: string;
81
+ logging?: LoggingConfig;
61
82
  /**
62
- * S3 bucket for Benchling package storage
83
+ * Optional security configuration (webhook verification, IP allowlist)
63
84
  */
64
- benchlingPkgBucket?: string;
85
+ security?: SecurityConfig;
65
86
  /**
66
- * Benchling test entry ID (optional, for validation)
87
+ * Configuration metadata (provenance, versioning, timestamps)
67
88
  */
68
- benchlingTestEntry?: string;
89
+ _metadata: ConfigMetadata;
69
90
  /**
70
- * AWS Secrets Manager secret ARN for Benchling credentials
91
+ * Optional profile inheritance (for profile hierarchies)
92
+ *
93
+ * When present, this profile inherits configuration from the specified base profile.
94
+ * Values in this profile override inherited values via deep merge.
95
+ *
96
+ * @example "_inherits": "default"
71
97
  */
72
- benchlingSecretArn?: string;
73
- /**
74
- * AWS account ID for CDK deployment
75
- */
76
- cdkAccount?: string;
98
+ _inherits?: string;
99
+ }
100
+ /**
101
+ * Quilt Catalog Configuration
102
+ *
103
+ * Configuration for Quilt data catalog integration, including S3 bucket,
104
+ * CloudFormation stack, and SQS queue for package creation.
105
+ */
106
+ export interface QuiltConfig {
77
107
  /**
78
- * AWS region for CDK deployment
108
+ * Quilt CloudFormation stack ARN
109
+ *
110
+ * @example "arn:aws:cloudformation:us-east-1:123456789012:stack/quilt-stack/..."
79
111
  */
80
- cdkRegion?: string;
112
+ stackArn: string;
81
113
  /**
82
- * AWS profile to use for deployment operations
114
+ * Quilt catalog domain (without protocol)
115
+ *
116
+ * @example "quilt.example.com"
83
117
  */
84
- awsProfile?: string;
118
+ catalog: string;
85
119
  /**
86
- * SQS queue ARN for package creation
120
+ * S3 bucket for Quilt package storage
121
+ *
122
+ * @example "my-quilt-bucket"
87
123
  */
88
- queueArn?: string;
124
+ bucket: string;
89
125
  /**
90
- * S3 key prefix for Benchling packages
126
+ * Athena/Glue database name for catalog metadata
127
+ *
128
+ * @example "quilt_catalog"
91
129
  */
92
- pkgPrefix?: string;
130
+ database: string;
93
131
  /**
94
- * Package metadata key (e.g., "experiment_id")
132
+ * SQS queue ARN for package creation jobs
133
+ *
134
+ * @example "arn:aws:sqs:us-east-1:123456789012:quilt-package-queue"
95
135
  */
96
- pkgKey?: string;
136
+ queueArn: string;
97
137
  /**
98
- * Logging level (DEBUG, INFO, WARNING, ERROR)
138
+ * AWS region for Quilt resources
139
+ *
140
+ * @example "us-east-1"
99
141
  */
100
- logLevel?: string;
142
+ region: string;
143
+ }
144
+ /**
145
+ * Benchling Configuration
146
+ *
147
+ * OAuth credentials and tenant information for Benchling API integration.
148
+ */
149
+ export interface BenchlingConfig {
101
150
  /**
102
- * Comma-separated IP allowlist for webhook access
151
+ * Benchling tenant identifier (subdomain)
152
+ *
153
+ * @example "my-company"
103
154
  */
104
- webhookAllowList?: string;
155
+ tenant: string;
105
156
  /**
106
- * Enable webhook signature verification
157
+ * OAuth client ID
158
+ *
159
+ * @example "client_abc123"
107
160
  */
108
- enableWebhookVerification?: string;
161
+ clientId: string;
109
162
  /**
110
- * Create ECR repository flag
163
+ * OAuth client secret (optional, for local dev only)
164
+ *
165
+ * For production, use `secretArn` instead to reference AWS Secrets Manager.
166
+ *
167
+ * @example "secret_xyz789"
111
168
  */
112
- createEcrRepository?: string;
169
+ clientSecret?: string;
113
170
  /**
114
- * ECR repository name
171
+ * AWS Secrets Manager ARN for OAuth credentials (production)
172
+ *
173
+ * @example "arn:aws:secretsmanager:us-east-1:123456789012:secret:benchling-..."
115
174
  */
116
- ecrRepositoryName?: string;
175
+ secretArn?: string;
117
176
  /**
118
- * Docker image tag
177
+ * Benchling app definition ID
178
+ *
179
+ * @example "app_def_456"
119
180
  */
120
- imageTag?: string;
181
+ appDefinitionId: string;
121
182
  /**
122
- * Configuration metadata (optional)
183
+ * Test entry ID for validation (optional)
184
+ *
185
+ * @example "etr_abc123"
123
186
  */
124
- _metadata?: ConfigMetadata;
187
+ testEntryId?: string;
125
188
  }
126
189
  /**
127
- * Derived Configuration
190
+ * Package Configuration
128
191
  *
129
- * Configuration values inferred from CLI tools (e.g., quilt3 config)
130
- * or computed from user configuration.
192
+ * S3 storage and metadata settings for Benchling packages.
131
193
  */
132
- export interface DerivedConfig extends UserConfig {
194
+ export interface PackageConfig {
133
195
  /**
134
- * Catalog URL inferred from quilt3 CLI
196
+ * S3 bucket for package storage
197
+ *
198
+ * @example "benchling-packages"
135
199
  */
136
- catalogUrl?: string;
200
+ bucket: string;
137
201
  /**
138
- * Metadata tracking inference source and timestamp
202
+ * S3 key prefix for packages
203
+ *
204
+ * @example "benchling"
205
+ * @default "benchling"
139
206
  */
140
- _metadata?: ConfigMetadata & {
141
- inferredAt?: string;
142
- inferredFrom?: string;
143
- };
207
+ prefix: string;
208
+ /**
209
+ * Metadata key for package organization
210
+ *
211
+ * @example "experiment_id"
212
+ * @default "experiment_id"
213
+ */
214
+ metadataKey: string;
144
215
  }
145
216
  /**
146
217
  * Deployment Configuration
147
218
  *
148
- * Configuration artifacts generated during deployment.
149
- * Contains deployment-specific values like webhook URLs and stack ARNs.
219
+ * AWS infrastructure settings for CDK deployment.
150
220
  */
151
- export interface DeploymentConfig extends DerivedConfig {
221
+ export interface DeploymentConfig {
152
222
  /**
153
- * Deployed webhook endpoint URL
223
+ * AWS region for deployment
224
+ *
225
+ * @example "us-east-1"
154
226
  */
155
- webhookEndpoint?: string;
227
+ region: string;
156
228
  /**
157
- * Deployed webhook URL (alias for webhookEndpoint)
229
+ * AWS account ID (optional, auto-detected if not provided)
230
+ *
231
+ * @example "123456789012"
158
232
  */
159
- webhookUrl?: string;
233
+ account?: string;
160
234
  /**
161
- * CloudFormation stack ARN
235
+ * ECR repository name (optional, default: "benchling-webhook")
236
+ *
237
+ * @example "my-custom-repo"
162
238
  */
163
- stackArn?: string;
239
+ ecrRepository?: string;
164
240
  /**
165
- * Deployment timestamp
241
+ * Docker image tag
242
+ *
243
+ * @example "latest"
244
+ * @example "0.7.0"
245
+ * @default "latest"
166
246
  */
167
- deploymentTimestamp?: string;
247
+ imageTag?: string;
248
+ }
249
+ /**
250
+ * Logging Configuration
251
+ *
252
+ * Python logging level for Flask application.
253
+ */
254
+ export interface LoggingConfig {
168
255
  /**
169
- * ISO timestamp of deployment
256
+ * Python logging level
257
+ *
258
+ * @default "INFO"
170
259
  */
171
- deployedAt?: string;
260
+ level: "DEBUG" | "INFO" | "WARNING" | "ERROR";
261
+ }
262
+ /**
263
+ * Security Configuration
264
+ *
265
+ * Webhook security settings including IP allowlist and signature verification.
266
+ */
267
+ export interface SecurityConfig {
172
268
  /**
173
- * Metadata tracking deployment details
269
+ * Comma-separated list of allowed IP addresses/CIDR blocks
270
+ *
271
+ * Empty string means no IP filtering.
272
+ *
273
+ * @example "192.168.1.0/24,10.0.0.0/8"
274
+ * @default ""
174
275
  */
175
- _metadata?: ConfigMetadata & {
176
- deployedAt?: string;
177
- deployedBy?: string;
178
- stackName?: string;
179
- };
276
+ webhookAllowList?: string;
277
+ /**
278
+ * Enable webhook signature verification
279
+ *
280
+ * @default true
281
+ */
282
+ enableVerification?: boolean;
180
283
  }
181
284
  /**
182
285
  * Configuration Metadata
183
286
  *
184
- * Tracks configuration provenance, timestamps, and versioning.
287
+ * Provenance tracking for configuration files.
185
288
  */
186
289
  export interface ConfigMetadata {
187
290
  /**
188
- * ISO timestamp when configuration was saved
291
+ * Configuration schema version
292
+ *
293
+ * @example "0.7.0"
294
+ */
295
+ version: string;
296
+ /**
297
+ * ISO 8601 timestamp when configuration was created
298
+ *
299
+ * @example "2025-11-04T10:00:00Z"
189
300
  */
190
- savedAt?: string;
301
+ createdAt: string;
191
302
  /**
192
- * Source of configuration (e.g., "cli", "wizard", "manual")
303
+ * ISO 8601 timestamp when configuration was last updated
304
+ *
305
+ * @example "2025-11-04T15:30:00Z"
193
306
  */
194
- source?: string;
307
+ updatedAt: string;
195
308
  /**
196
- * Configuration version
309
+ * Source of configuration
310
+ *
311
+ * - "wizard": Created via interactive setup wizard
312
+ * - "manual": Hand-edited by user
313
+ * - "cli": Created via CLI command
197
314
  */
198
- version?: string;
315
+ source: "wizard" | "manual" | "cli";
199
316
  /**
200
- * Additional metadata fields
317
+ * Additional metadata fields (extensible)
201
318
  */
202
319
  [key: string]: string | undefined;
203
320
  }
204
321
  /**
205
- * Complete Configuration
322
+ * Deployment History
206
323
  *
207
- * Merged configuration from all sources (user + derived + deploy).
324
+ * Tracks all deployments for a profile, with active deployment pointers per stage.
208
325
  */
209
- export type CompleteConfig = DeploymentConfig;
210
- /**
211
- * Configuration Set
212
- *
213
- * Collection of configurations for merging operations.
214
- */
215
- export interface ConfigSet {
216
- user?: UserConfig;
217
- derived?: DerivedConfig;
218
- deploy?: DeploymentConfig;
326
+ export interface DeploymentHistory {
327
+ /**
328
+ * Active deployments by stage name
329
+ *
330
+ * Maps stage name (e.g., "dev", "prod") to the currently active deployment.
331
+ *
332
+ * @example
333
+ * ```json
334
+ * {
335
+ * "dev": { "stage": "dev", "endpoint": "https://...", "imageTag": "latest", ... },
336
+ * "prod": { "stage": "prod", "endpoint": "https://...", "imageTag": "0.7.0", ... }
337
+ * }
338
+ * ```
339
+ */
340
+ active: Record<string, DeploymentRecord>;
341
+ /**
342
+ * Complete deployment history (newest first)
343
+ *
344
+ * All past deployments for this profile, ordered by timestamp descending.
345
+ */
346
+ history: DeploymentRecord[];
219
347
  }
220
348
  /**
221
- * Configuration Profile
349
+ * Deployment Record
222
350
  *
223
- * Named configuration with metadata for profile management.
351
+ * A single deployment event with full metadata for debugging and rollback.
224
352
  */
225
- export interface ConfigProfile {
353
+ export interface DeploymentRecord {
226
354
  /**
227
- * Profile name (e.g., "default", "dev", "prod")
355
+ * API Gateway stage name
356
+ *
357
+ * @example "dev"
358
+ * @example "prod"
228
359
  */
229
- name: ProfileName;
360
+ stage: string;
230
361
  /**
231
- * User configuration for this profile
362
+ * ISO 8601 deployment timestamp
363
+ *
364
+ * @example "2025-11-04T10:30:00Z"
232
365
  */
233
- user?: UserConfig;
366
+ timestamp: string;
234
367
  /**
235
- * Derived configuration for this profile
368
+ * Docker image tag deployed
369
+ *
370
+ * @example "latest"
371
+ * @example "0.7.0"
236
372
  */
237
- derived?: DerivedConfig;
373
+ imageTag: string;
238
374
  /**
239
- * Deployment configuration for this profile
375
+ * Deployed webhook endpoint URL
376
+ *
377
+ * @example "https://abc123.execute-api.us-east-1.amazonaws.com/dev"
240
378
  */
241
- deploy?: DeploymentConfig;
379
+ endpoint: string;
242
380
  /**
243
- * Profile metadata
381
+ * CloudFormation stack name
382
+ *
383
+ * @example "BenchlingWebhookStack"
244
384
  */
245
- metadata?: {
246
- createdAt?: string;
247
- updatedAt?: string;
248
- description?: string;
249
- };
385
+ stackName: string;
386
+ /**
387
+ * AWS region
388
+ *
389
+ * @example "us-east-1"
390
+ */
391
+ region: string;
392
+ /**
393
+ * User who triggered deployment (optional)
394
+ *
395
+ * @example "ernest@example.com"
396
+ */
397
+ deployedBy?: string;
398
+ /**
399
+ * Git commit hash (optional)
400
+ *
401
+ * @example "abc123f"
402
+ */
403
+ commit?: string;
404
+ /**
405
+ * Additional metadata (extensible)
406
+ */
407
+ [key: string]: string | undefined;
250
408
  }
251
409
  /**
252
410
  * Configuration Validation Result
@@ -259,7 +417,7 @@ export interface ValidationResult {
259
417
  */
260
418
  isValid: boolean;
261
419
  /**
262
- * Validation errors (if any)
420
+ * Validation errors (fatal issues that prevent deployment)
263
421
  */
264
422
  errors: string[];
265
423
  /**
@@ -272,23 +430,31 @@ export interface ValidationResult {
272
430
  details?: Record<string, unknown>;
273
431
  }
274
432
  /**
275
- * XDG Configuration Paths
433
+ * Migration Report
276
434
  *
277
- * File paths for XDG-compliant configuration storage.
435
+ * Result of migrating from legacy configuration format.
278
436
  */
279
- export interface XDGConfigPaths {
437
+ export interface MigrationReport {
280
438
  /**
281
- * Path to user configuration file
439
+ * Whether migration completed successfully
282
440
  */
283
- userConfig: string;
441
+ success: boolean;
284
442
  /**
285
- * Path to derived configuration file
443
+ * Profiles that were successfully migrated
286
444
  */
287
- derivedConfig: string;
445
+ profilesMigrated: string[];
288
446
  /**
289
- * Path to deployment configuration file
447
+ * Migration errors
290
448
  */
291
- deployConfig: string;
449
+ errors: string[];
450
+ /**
451
+ * Migration warnings (non-fatal issues)
452
+ */
453
+ warnings?: string[];
454
+ /**
455
+ * Additional migration details
456
+ */
457
+ details?: Record<string, unknown>;
292
458
  }
293
459
  /**
294
460
  * Profile Management Options
@@ -308,91 +474,292 @@ export interface ProfileOptions {
308
474
  createIfMissing?: boolean;
309
475
  }
310
476
  /**
311
- * Configuration Read Options
477
+ * JSON Schema for ProfileConfig validation
478
+ *
479
+ * This schema can be used with ajv or other JSON Schema validators.
312
480
  */
313
- export interface ConfigReadOptions {
314
- /**
315
- * Configuration type to read
316
- */
317
- type: ConfigType;
318
- /**
319
- * Profile name (defaults to "default")
320
- */
321
- profile?: ProfileName;
322
- /**
323
- * Throw error if file doesn't exist
324
- */
325
- throwIfMissing?: boolean;
326
- /**
327
- * Validate schema after reading
328
- */
329
- validate?: boolean;
481
+ export declare const ProfileConfigSchema: {
482
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
483
+ readonly title: "ProfileConfig";
484
+ readonly description: "Benchling Webhook Profile Configuration (v0.7.0)";
485
+ readonly type: "object";
486
+ readonly required: readonly ["quilt", "benchling", "packages", "deployment", "_metadata"];
487
+ readonly properties: {
488
+ readonly quilt: {
489
+ readonly type: "object";
490
+ readonly required: readonly ["stackArn", "catalog", "bucket", "database", "queueArn", "region"];
491
+ readonly properties: {
492
+ readonly stackArn: {
493
+ readonly type: "string";
494
+ readonly pattern: "^arn:aws:cloudformation:";
495
+ };
496
+ readonly catalog: {
497
+ readonly type: "string";
498
+ readonly minLength: 1;
499
+ };
500
+ readonly bucket: {
501
+ readonly type: "string";
502
+ readonly minLength: 3;
503
+ };
504
+ readonly database: {
505
+ readonly type: "string";
506
+ readonly minLength: 1;
507
+ };
508
+ readonly queueArn: {
509
+ readonly type: "string";
510
+ readonly pattern: "^arn:aws:sqs:";
511
+ };
512
+ readonly region: {
513
+ readonly type: "string";
514
+ readonly pattern: "^[a-z]{2}-[a-z]+-[0-9]$";
515
+ };
516
+ };
517
+ };
518
+ readonly benchling: {
519
+ readonly type: "object";
520
+ readonly required: readonly ["tenant", "clientId", "appDefinitionId"];
521
+ readonly properties: {
522
+ readonly tenant: {
523
+ readonly type: "string";
524
+ readonly minLength: 1;
525
+ };
526
+ readonly clientId: {
527
+ readonly type: "string";
528
+ readonly minLength: 1;
529
+ };
530
+ readonly clientSecret: {
531
+ readonly type: "string";
532
+ };
533
+ readonly secretArn: {
534
+ readonly type: "string";
535
+ readonly pattern: "^arn:aws:secretsmanager:";
536
+ };
537
+ readonly appDefinitionId: {
538
+ readonly type: "string";
539
+ readonly minLength: 1;
540
+ };
541
+ readonly testEntryId: {
542
+ readonly type: "string";
543
+ };
544
+ };
545
+ };
546
+ readonly packages: {
547
+ readonly type: "object";
548
+ readonly required: readonly ["bucket", "prefix", "metadataKey"];
549
+ readonly properties: {
550
+ readonly bucket: {
551
+ readonly type: "string";
552
+ readonly minLength: 3;
553
+ };
554
+ readonly prefix: {
555
+ readonly type: "string";
556
+ readonly minLength: 1;
557
+ };
558
+ readonly metadataKey: {
559
+ readonly type: "string";
560
+ readonly minLength: 1;
561
+ };
562
+ };
563
+ };
564
+ readonly deployment: {
565
+ readonly type: "object";
566
+ readonly required: readonly ["region"];
567
+ readonly properties: {
568
+ readonly region: {
569
+ readonly type: "string";
570
+ readonly pattern: "^[a-z]{2}-[a-z]+-[0-9]$";
571
+ };
572
+ readonly account: {
573
+ readonly type: "string";
574
+ readonly pattern: "^[0-9]{12}$";
575
+ };
576
+ readonly ecrRepository: {
577
+ readonly type: "string";
578
+ };
579
+ readonly imageTag: {
580
+ readonly type: "string";
581
+ };
582
+ };
583
+ };
584
+ readonly logging: {
585
+ readonly type: "object";
586
+ readonly properties: {
587
+ readonly level: {
588
+ readonly type: "string";
589
+ readonly enum: readonly ["DEBUG", "INFO", "WARNING", "ERROR"];
590
+ };
591
+ };
592
+ };
593
+ readonly security: {
594
+ readonly type: "object";
595
+ readonly properties: {
596
+ readonly webhookAllowList: {
597
+ readonly type: "string";
598
+ };
599
+ readonly enableVerification: {
600
+ readonly type: "boolean";
601
+ };
602
+ };
603
+ };
604
+ readonly _metadata: {
605
+ readonly type: "object";
606
+ readonly required: readonly ["version", "createdAt", "updatedAt", "source"];
607
+ readonly properties: {
608
+ readonly version: {
609
+ readonly type: "string";
610
+ };
611
+ readonly createdAt: {
612
+ readonly type: "string";
613
+ readonly format: "date-time";
614
+ };
615
+ readonly updatedAt: {
616
+ readonly type: "string";
617
+ readonly format: "date-time";
618
+ };
619
+ readonly source: {
620
+ readonly type: "string";
621
+ readonly enum: readonly ["wizard", "manual", "cli"];
622
+ };
623
+ };
624
+ };
625
+ readonly _inherits: {
626
+ readonly type: "string";
627
+ };
628
+ };
629
+ readonly additionalProperties: false;
630
+ };
631
+ /**
632
+ * JSON Schema for DeploymentHistory validation
633
+ */
634
+ export declare const DeploymentHistorySchema: {
635
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
636
+ readonly title: "DeploymentHistory";
637
+ readonly description: "Deployment tracking for a profile";
638
+ readonly type: "object";
639
+ readonly required: readonly ["active", "history"];
640
+ readonly properties: {
641
+ readonly active: {
642
+ readonly type: "object";
643
+ readonly additionalProperties: {
644
+ readonly type: "object";
645
+ readonly required: readonly ["stage", "timestamp", "imageTag", "endpoint", "stackName", "region"];
646
+ readonly properties: {
647
+ readonly stage: {
648
+ readonly type: "string";
649
+ };
650
+ readonly timestamp: {
651
+ readonly type: "string";
652
+ readonly format: "date-time";
653
+ };
654
+ readonly imageTag: {
655
+ readonly type: "string";
656
+ };
657
+ readonly endpoint: {
658
+ readonly type: "string";
659
+ readonly format: "uri";
660
+ };
661
+ readonly stackName: {
662
+ readonly type: "string";
663
+ };
664
+ readonly region: {
665
+ readonly type: "string";
666
+ };
667
+ readonly deployedBy: {
668
+ readonly type: "string";
669
+ };
670
+ readonly commit: {
671
+ readonly type: "string";
672
+ };
673
+ };
674
+ };
675
+ };
676
+ readonly history: {
677
+ readonly type: "array";
678
+ readonly items: {
679
+ readonly type: "object";
680
+ readonly required: readonly ["stage", "timestamp", "imageTag", "endpoint", "stackName", "region"];
681
+ readonly properties: {
682
+ readonly stage: {
683
+ readonly type: "string";
684
+ };
685
+ readonly timestamp: {
686
+ readonly type: "string";
687
+ readonly format: "date-time";
688
+ };
689
+ readonly imageTag: {
690
+ readonly type: "string";
691
+ };
692
+ readonly endpoint: {
693
+ readonly type: "string";
694
+ readonly format: "uri";
695
+ };
696
+ readonly stackName: {
697
+ readonly type: "string";
698
+ };
699
+ readonly region: {
700
+ readonly type: "string";
701
+ };
702
+ readonly deployedBy: {
703
+ readonly type: "string";
704
+ };
705
+ readonly commit: {
706
+ readonly type: "string";
707
+ };
708
+ };
709
+ };
710
+ };
711
+ };
712
+ readonly additionalProperties: false;
713
+ };
714
+ /**
715
+ * @deprecated Legacy type from v0.6.x - use ProfileConfig instead
716
+ */
717
+ export type ConfigType = "user" | "derived" | "deploy" | "complete";
718
+ /**
719
+ * @deprecated Legacy interface from v0.6.x - use ProfileConfig instead
720
+ */
721
+ export interface UserConfig {
722
+ [key: string]: unknown;
330
723
  }
331
724
  /**
332
- * Configuration Write Options
725
+ * @deprecated Legacy interface from v0.6.x - use ProfileConfig instead
333
726
  */
334
- export interface ConfigWriteOptions {
335
- /**
336
- * Configuration type to write
337
- */
338
- type: ConfigType;
339
- /**
340
- * Profile name (defaults to "default")
341
- */
342
- profile?: ProfileName;
343
- /**
344
- * Create backup before writing
345
- */
346
- backup?: boolean;
347
- /**
348
- * Validate schema before writing
349
- */
350
- validate?: boolean;
351
- /**
352
- * Add metadata to configuration
353
- */
354
- addMetadata?: boolean;
727
+ export interface DerivedConfig extends UserConfig {
728
+ [key: string]: unknown;
355
729
  }
356
730
  /**
357
- * AWS Profile Configuration
358
- *
359
- * Integration with AWS credentials and profiles.
731
+ * @deprecated Legacy interface from v0.6.x - use DeploymentRecord instead
360
732
  */
361
- export interface AWSProfileConfig {
362
- /**
363
- * AWS profile name from ~/.aws/credentials
364
- */
365
- profileName: string;
366
- /**
367
- * AWS region
368
- */
369
- region?: string;
370
- /**
371
- * AWS account ID
372
- */
373
- accountId?: string;
733
+ export interface LegacyDeploymentConfig extends DerivedConfig {
734
+ [key: string]: unknown;
374
735
  }
375
736
  /**
376
- * Quilt CLI Configuration
377
- *
378
- * Configuration inferred from quilt3 CLI.
737
+ * @deprecated Legacy type from v0.6.x - use ProfileConfig instead
379
738
  */
380
- export interface QuiltCLIConfig {
381
- /**
382
- * Catalog URL from quilt3 config
383
- */
384
- catalog?: string;
385
- /**
386
- * Default bucket from quilt3 config
387
- */
388
- defaultBucket?: string;
389
- /**
390
- * AWS region from quilt3 config
391
- */
392
- region?: string;
393
- /**
394
- * Registry URL from quilt3 config
395
- */
396
- registryUrl?: string;
739
+ export type CompleteConfig = LegacyDeploymentConfig;
740
+ /**
741
+ * @deprecated Legacy interface from v0.6.x - no longer used
742
+ */
743
+ export interface ConfigSet {
744
+ user?: UserConfig;
745
+ derived?: DerivedConfig;
746
+ deploy?: LegacyDeploymentConfig;
747
+ }
748
+ /**
749
+ * @deprecated Legacy interface from v0.6.x - no longer used
750
+ */
751
+ export interface ConfigProfile {
752
+ name: ProfileName;
753
+ user?: UserConfig;
754
+ derived?: DerivedConfig;
755
+ deploy?: LegacyDeploymentConfig;
756
+ }
757
+ /**
758
+ * @deprecated Legacy interface from v0.6.x - no longer used
759
+ */
760
+ export interface XDGConfigPaths {
761
+ userConfig: string;
762
+ derivedConfig: string;
763
+ deployConfig: string;
397
764
  }
398
765
  //# sourceMappingURL=config.d.ts.map