@constructorfleet/sketchforge-engine 1.31.0 → 1.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 (87) hide show
  1. package/README.md +120 -1
  2. package/dist/apiErrors.d.ts +84 -0
  3. package/dist/apiErrors.d.ts.map +1 -0
  4. package/dist/apiErrors.js +292 -0
  5. package/dist/apiErrors.js.map +1 -0
  6. package/dist/apiParameters.d.ts +426 -0
  7. package/dist/apiParameters.d.ts.map +1 -0
  8. package/dist/apiParameters.js +144 -0
  9. package/dist/apiParameters.js.map +1 -0
  10. package/dist/apiShapeSummary.d.ts +128 -0
  11. package/dist/apiShapeSummary.d.ts.map +1 -0
  12. package/dist/apiShapeSummary.js +96 -0
  13. package/dist/apiShapeSummary.js.map +1 -0
  14. package/dist/apiSketchConstraints.d.ts +80 -0
  15. package/dist/apiSketchConstraints.d.ts.map +1 -0
  16. package/dist/apiSketchConstraints.js +59 -0
  17. package/dist/apiSketchConstraints.js.map +1 -0
  18. package/dist/domain/sketchforge.d.ts +31 -0
  19. package/dist/domain/sketchforge.d.ts.map +1 -1
  20. package/dist/editorHistory.d.ts +25 -4
  21. package/dist/editorHistory.d.ts.map +1 -1
  22. package/dist/editorHistory.js +75 -14
  23. package/dist/editorHistory.js.map +1 -1
  24. package/dist/engine.d.ts +105 -3
  25. package/dist/engine.d.ts.map +1 -1
  26. package/dist/engine.js +1281 -655
  27. package/dist/engine.js.map +1 -1
  28. package/dist/expressionBindings.d.ts +113 -0
  29. package/dist/expressionBindings.d.ts.map +1 -0
  30. package/dist/expressionBindings.js +353 -0
  31. package/dist/expressionBindings.js.map +1 -0
  32. package/dist/index.d.ts +11 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +9 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/parameterBindingPlan.d.ts +64 -0
  37. package/dist/parameterBindingPlan.d.ts.map +1 -0
  38. package/dist/parameterBindingPlan.js +138 -0
  39. package/dist/parameterBindingPlan.js.map +1 -0
  40. package/dist/parameterExpressions.d.ts +128 -0
  41. package/dist/parameterExpressions.d.ts.map +1 -0
  42. package/dist/parameterExpressions.js +666 -0
  43. package/dist/parameterExpressions.js.map +1 -0
  44. package/dist/parametricRecompute.d.ts.map +1 -1
  45. package/dist/parametricRecompute.js +25 -2
  46. package/dist/parametricRecompute.js.map +1 -1
  47. package/dist/projectParameters.d.ts +126 -0
  48. package/dist/projectParameters.d.ts.map +1 -0
  49. package/dist/projectParameters.js +534 -0
  50. package/dist/projectParameters.js.map +1 -0
  51. package/dist/revolveRequests.d.ts +1 -0
  52. package/dist/revolveRequests.d.ts.map +1 -1
  53. package/dist/revolveRequests.js +1 -0
  54. package/dist/revolveRequests.js.map +1 -1
  55. package/dist/sceneExport.d.ts.map +1 -1
  56. package/dist/sceneExport.js +3 -0
  57. package/dist/sceneExport.js.map +1 -1
  58. package/dist/serverProjectDocument.d.ts +7 -2
  59. package/dist/serverProjectDocument.d.ts.map +1 -1
  60. package/dist/serverProjectDocument.js +16 -1
  61. package/dist/serverProjectDocument.js.map +1 -1
  62. package/dist/serverShapeGroups.d.ts +5 -0
  63. package/dist/serverShapeGroups.d.ts.map +1 -1
  64. package/dist/serverShapeGroups.js +45 -0
  65. package/dist/serverShapeGroups.js.map +1 -1
  66. package/dist/shapeRequestExpressions.d.ts +31 -0
  67. package/dist/shapeRequestExpressions.d.ts.map +1 -0
  68. package/dist/shapeRequestExpressions.js +64 -0
  69. package/dist/shapeRequestExpressions.js.map +1 -0
  70. package/dist/shapeRequests.d.ts +1 -1
  71. package/dist/shapeRequests.d.ts.map +1 -1
  72. package/dist/shapeRequests.js +3 -1
  73. package/dist/shapeRequests.js.map +1 -1
  74. package/dist/sketchConstraintBindings.d.ts +131 -0
  75. package/dist/sketchConstraintBindings.d.ts.map +1 -0
  76. package/dist/sketchConstraintBindings.js +353 -0
  77. package/dist/sketchConstraintBindings.js.map +1 -0
  78. package/dist/sketchConstraints.d.ts +34 -0
  79. package/dist/sketchConstraints.d.ts.map +1 -0
  80. package/dist/sketchConstraints.js +919 -0
  81. package/dist/sketchConstraints.js.map +1 -0
  82. package/dist/skfProject.d.ts +41 -4
  83. package/dist/skfProject.d.ts.map +1 -1
  84. package/dist/skfProject.js +154 -16
  85. package/dist/skfProject.js.map +1 -1
  86. package/dist/support/lib/operator-configuration.json +3 -3
  87. package/package.json +1 -1
@@ -0,0 +1,426 @@
1
+ /**
2
+ * Reads and replies for the REST v1 parameter routes.
3
+ *
4
+ * Shared with MCP local mode, so a request REST refuses is refused there with
5
+ * the same sentence, and a reply has the same fields.
6
+ */
7
+ import type { ProjectConfiguration, ProjectParameter, ProjectParameterDimension, WorkplaneShape } from "./domain/sketchforge.js";
8
+ import type { ParametersWritten } from "./engine.js";
9
+ export declare const API_PARAMETER_NAME_MAX_LENGTH = 64;
10
+ export declare const API_PARAMETER_EXPRESSION_MAX_LENGTH = 10000;
11
+ /** The limit as refusals word it. */
12
+ export declare const API_PARAMETER_EXPRESSION_LIMIT: string;
13
+ /** Matches the engine's configuration name limit. */
14
+ export declare const API_CONFIGURATION_NAME_MAX_LENGTH = 100;
15
+ export declare const API_PARAMETER_DIMENSIONS: readonly ProjectParameterDimension[];
16
+ export declare const API_PARAMETER_MESSAGES: {
17
+ readonly create: `A parameter needs a name, an expression of at most ${string}, and a dimension of length, angle, or unitless.`;
18
+ readonly change: `Send name alone to rename, or expression (at most ${string}) and dimension to change the value.`;
19
+ readonly nameRequired: "A parameter name is required.";
20
+ };
21
+ export declare const API_CONFIGURATION_MESSAGES: {
22
+ readonly create: "A configuration needs a name, and overrides that map parameter names to expressions.";
23
+ readonly change: "Send name alone to rename, or parameter and expression (null to clear) to change an override.";
24
+ readonly activate: "Send the configuration name to activate, or null for the base table.";
25
+ readonly nameRequired: "A configuration name of 1 to 100 characters is required.";
26
+ };
27
+ /** Accepts `{ name, expression, dimension }` and nothing else. */
28
+ export declare function isApiParameterCreateRequest(body: unknown): body is {
29
+ name: string;
30
+ expression: string;
31
+ dimension: ProjectParameterDimension;
32
+ };
33
+ /** A rename carries `name` and nothing else. */
34
+ export type ApiParameterChange = {
35
+ name?: string;
36
+ expression?: string;
37
+ dimension?: ProjectParameterDimension;
38
+ };
39
+ /** Accepts `{ name }` alone, or `expression`, `dimension` or both. */
40
+ export declare function isApiParameterChangeRequest(body: unknown): body is ApiParameterChange;
41
+ /** Accepts `{ name, overrides? }`, where overrides maps names to expressions. */
42
+ export declare function isApiConfigurationCreateRequest(body: unknown): body is {
43
+ name: string;
44
+ overrides?: Record<string, string>;
45
+ };
46
+ /** A rename carries `name` alone; an override change carries `parameter` and `expression`, null to clear. */
47
+ export type ApiConfigurationChange = {
48
+ name: string;
49
+ } | {
50
+ parameter: string;
51
+ expression: string | null;
52
+ };
53
+ export declare function isApiConfigurationChangeRequest(body: unknown): body is ApiConfigurationChange;
54
+ /** Accepts `{ name }`, where null names the base table. */
55
+ export declare function isApiConfigurationActivateRequest(body: unknown): body is {
56
+ name: string | null;
57
+ };
58
+ /** Returns the trimmed `?name=` value, or undefined when it is missing or out of bounds. */
59
+ export declare function apiParameterName(value: unknown): string | undefined;
60
+ /** Returns a configuration `?name=` value as the contract reads it: not trimmed, 1 to 100 characters. */
61
+ export declare function apiConfigurationName(value: unknown): string | undefined;
62
+ /** Serializes one table entry. A stale entry's NaN becomes null, which JSON would write anyway. */
63
+ export declare function apiParameter(parameter: ProjectParameter): {
64
+ name: string;
65
+ expression: string;
66
+ dimension: ProjectParameterDimension;
67
+ value: number | null;
68
+ error?: {
69
+ code: string;
70
+ message: string;
71
+ expressionError?: {
72
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
73
+ message: string;
74
+ span: {
75
+ start: number;
76
+ end: number;
77
+ };
78
+ cycle?: string[] | undefined;
79
+ } | undefined;
80
+ } | undefined;
81
+ };
82
+ /** The `GET /parameters` reply. */
83
+ export declare function apiParameterList(project: {
84
+ parameters: readonly ProjectParameter[];
85
+ activeConfiguration?: string | null;
86
+ shapes: readonly WorkplaneShape[];
87
+ revision: number;
88
+ }): {
89
+ parameters: {
90
+ name: string;
91
+ expression: string;
92
+ dimension: ProjectParameterDimension;
93
+ value: number | null;
94
+ error?: {
95
+ code: string;
96
+ message: string;
97
+ expressionError?: {
98
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
99
+ message: string;
100
+ span: {
101
+ start: number;
102
+ end: number;
103
+ };
104
+ cycle?: string[] | undefined;
105
+ } | undefined;
106
+ } | undefined;
107
+ }[];
108
+ activeConfiguration: string | null;
109
+ bindingIssues: {
110
+ code: string;
111
+ message: string;
112
+ expressionError?: {
113
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
114
+ message: string;
115
+ span: {
116
+ start: number;
117
+ end: number;
118
+ };
119
+ cycle?: string[] | undefined;
120
+ } | undefined;
121
+ shapeId: string;
122
+ field: string;
123
+ }[];
124
+ constraintBindingIssues: {
125
+ code: string;
126
+ message: string;
127
+ expressionError?: {
128
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
129
+ message: string;
130
+ span: {
131
+ start: number;
132
+ end: number;
133
+ };
134
+ cycle?: string[] | undefined;
135
+ } | undefined;
136
+ shapeId: string;
137
+ constraintId: string;
138
+ fields?: string[] | undefined;
139
+ }[];
140
+ revision: number;
141
+ };
142
+ /** A parameter write's reply; `parameter` is the entry now called `name`. */
143
+ export declare function apiParametersWritten(value: ParametersWritten, name: string): {
144
+ parameter?: {
145
+ name: string;
146
+ expression: string;
147
+ dimension: ProjectParameterDimension;
148
+ value: number | null;
149
+ error?: {
150
+ code: string;
151
+ message: string;
152
+ expressionError?: {
153
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
154
+ message: string;
155
+ span: {
156
+ start: number;
157
+ end: number;
158
+ };
159
+ cycle?: string[] | undefined;
160
+ } | undefined;
161
+ } | undefined;
162
+ } | undefined;
163
+ parameters: {
164
+ name: string;
165
+ expression: string;
166
+ dimension: ProjectParameterDimension;
167
+ value: number | null;
168
+ error?: {
169
+ code: string;
170
+ message: string;
171
+ expressionError?: {
172
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
173
+ message: string;
174
+ span: {
175
+ start: number;
176
+ end: number;
177
+ };
178
+ cycle?: string[] | undefined;
179
+ } | undefined;
180
+ } | undefined;
181
+ }[];
182
+ shapes: {
183
+ id: string;
184
+ name: string;
185
+ kind: import("./domain/sketchforge.js").ShapeKind;
186
+ requestKind?: string | undefined;
187
+ sketchOperation?: import("./domain/sketchforge.js").SketchOperation | undefined;
188
+ sketchSourceId?: string | undefined;
189
+ draftPrismAngle?: number | undefined;
190
+ faceDraft?: import("./domain/sketchforge.js").SketchFaceDraft | undefined;
191
+ sketchProfile?: import("./domain/sketchforge.js").SketchProfile | undefined;
192
+ color: string;
193
+ faceIds?: string[] | undefined;
194
+ faceColors?: Record<string, string> | undefined;
195
+ stepAssembly?: import("./domain/sketchforge.js").StepAssemblyNode[] | undefined;
196
+ stepComponent?: import("./domain/sketchforge.js").StepComponent | undefined;
197
+ hole: boolean;
198
+ locked: boolean;
199
+ hidden: boolean;
200
+ x: number;
201
+ z: number;
202
+ elevation: number;
203
+ width: number;
204
+ depth: number;
205
+ height: number;
206
+ rotation: number;
207
+ rotationX: number;
208
+ rotationZ: number;
209
+ expressions?: {
210
+ [x: string]: string;
211
+ } | undefined;
212
+ sketchConstraints?: import("./sketchConstraintBindings.js").SketchConstraintSummary[] | undefined;
213
+ revolve?: {
214
+ startAngle: number;
215
+ sweepAngle: number;
216
+ sides: number;
217
+ quality: number;
218
+ pitch: number;
219
+ turns: number;
220
+ coreRadius: number;
221
+ axis?: import("./revolveRequests.js").RevolveAxis | undefined;
222
+ } | undefined;
223
+ profile?: import("./revolveRequests.js").RevolveRequestPoint[] | undefined;
224
+ groupedCount?: number | undefined;
225
+ }[];
226
+ revision: number;
227
+ };
228
+ export declare function apiConfiguration({ name, overrides }: ProjectConfiguration): {
229
+ name: string;
230
+ overrides: {
231
+ [x: string]: string;
232
+ };
233
+ };
234
+ type ConfiguredProject = {
235
+ parameters: readonly ProjectParameter[];
236
+ configurations: readonly ProjectConfiguration[];
237
+ activeConfiguration: string | null;
238
+ };
239
+ /** The configurations, the active name, the resolved table, and overrides that no longer resolve. */
240
+ export declare function apiConfigurationState(project: ConfiguredProject): {
241
+ configurations: {
242
+ name: string;
243
+ overrides: {
244
+ [x: string]: string;
245
+ };
246
+ }[];
247
+ activeConfiguration: string | null;
248
+ parameters: {
249
+ name: string;
250
+ expression: string;
251
+ dimension: ProjectParameterDimension;
252
+ value: number | null;
253
+ error?: {
254
+ code: string;
255
+ message: string;
256
+ expressionError?: {
257
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
258
+ message: string;
259
+ span: {
260
+ start: number;
261
+ end: number;
262
+ };
263
+ cycle?: string[] | undefined;
264
+ } | undefined;
265
+ } | undefined;
266
+ }[];
267
+ issues: {
268
+ code: string;
269
+ message: string;
270
+ expressionError?: {
271
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
272
+ message: string;
273
+ span: {
274
+ start: number;
275
+ end: number;
276
+ };
277
+ cycle?: string[] | undefined;
278
+ } | undefined;
279
+ configuration: string;
280
+ parameter: string;
281
+ }[];
282
+ };
283
+ /** The `GET /parameter-configurations` reply. */
284
+ export declare function apiConfigurationList(project: ConfiguredProject & {
285
+ revision: number;
286
+ }): {
287
+ configurations: {
288
+ name: string;
289
+ overrides: {
290
+ [x: string]: string;
291
+ };
292
+ }[];
293
+ activeConfiguration: string | null;
294
+ parameters: {
295
+ name: string;
296
+ expression: string;
297
+ dimension: ProjectParameterDimension;
298
+ value: number | null;
299
+ error?: {
300
+ code: string;
301
+ message: string;
302
+ expressionError?: {
303
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
304
+ message: string;
305
+ span: {
306
+ start: number;
307
+ end: number;
308
+ };
309
+ cycle?: string[] | undefined;
310
+ } | undefined;
311
+ } | undefined;
312
+ }[];
313
+ issues: {
314
+ code: string;
315
+ message: string;
316
+ expressionError?: {
317
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
318
+ message: string;
319
+ span: {
320
+ start: number;
321
+ end: number;
322
+ };
323
+ cycle?: string[] | undefined;
324
+ } | undefined;
325
+ configuration: string;
326
+ parameter: string;
327
+ }[];
328
+ revision: number;
329
+ };
330
+ /** A configuration write's reply; `configuration` is the one now called `name`, when given and still present. */
331
+ export declare function apiConfigurationsWritten(value: ParametersWritten, name?: string): {
332
+ configurations: {
333
+ name: string;
334
+ overrides: {
335
+ [x: string]: string;
336
+ };
337
+ }[];
338
+ activeConfiguration: string | null;
339
+ parameters: {
340
+ name: string;
341
+ expression: string;
342
+ dimension: ProjectParameterDimension;
343
+ value: number | null;
344
+ error?: {
345
+ code: string;
346
+ message: string;
347
+ expressionError?: {
348
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
349
+ message: string;
350
+ span: {
351
+ start: number;
352
+ end: number;
353
+ };
354
+ cycle?: string[] | undefined;
355
+ } | undefined;
356
+ } | undefined;
357
+ }[];
358
+ issues: {
359
+ code: string;
360
+ message: string;
361
+ expressionError?: {
362
+ code: import("./parameterExpressions.js").ExpressionErrorCode;
363
+ message: string;
364
+ span: {
365
+ start: number;
366
+ end: number;
367
+ };
368
+ cycle?: string[] | undefined;
369
+ } | undefined;
370
+ configuration: string;
371
+ parameter: string;
372
+ }[];
373
+ configuration?: {
374
+ name: string;
375
+ overrides: {
376
+ [x: string]: string;
377
+ };
378
+ } | undefined;
379
+ shapes: {
380
+ id: string;
381
+ name: string;
382
+ kind: import("./domain/sketchforge.js").ShapeKind;
383
+ requestKind?: string | undefined;
384
+ sketchOperation?: import("./domain/sketchforge.js").SketchOperation | undefined;
385
+ sketchSourceId?: string | undefined;
386
+ draftPrismAngle?: number | undefined;
387
+ faceDraft?: import("./domain/sketchforge.js").SketchFaceDraft | undefined;
388
+ sketchProfile?: import("./domain/sketchforge.js").SketchProfile | undefined;
389
+ color: string;
390
+ faceIds?: string[] | undefined;
391
+ faceColors?: Record<string, string> | undefined;
392
+ stepAssembly?: import("./domain/sketchforge.js").StepAssemblyNode[] | undefined;
393
+ stepComponent?: import("./domain/sketchforge.js").StepComponent | undefined;
394
+ hole: boolean;
395
+ locked: boolean;
396
+ hidden: boolean;
397
+ x: number;
398
+ z: number;
399
+ elevation: number;
400
+ width: number;
401
+ depth: number;
402
+ height: number;
403
+ rotation: number;
404
+ rotationX: number;
405
+ rotationZ: number;
406
+ expressions?: {
407
+ [x: string]: string;
408
+ } | undefined;
409
+ sketchConstraints?: import("./sketchConstraintBindings.js").SketchConstraintSummary[] | undefined;
410
+ revolve?: {
411
+ startAngle: number;
412
+ sweepAngle: number;
413
+ sides: number;
414
+ quality: number;
415
+ pitch: number;
416
+ turns: number;
417
+ coreRadius: number;
418
+ axis?: import("./revolveRequests.js").RevolveAxis | undefined;
419
+ } | undefined;
420
+ profile?: import("./revolveRequests.js").RevolveRequestPoint[] | undefined;
421
+ groupedCount?: number | undefined;
422
+ }[];
423
+ revision: number;
424
+ };
425
+ export {};
426
+ //# sourceMappingURL=apiParameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiParameters.d.ts","sourceRoot":"","sources":["../src/apiParameters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACjI,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAMrD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,mCAAmC,QAAS,CAAC;AAC1D,qCAAqC;AACrC,eAAO,MAAM,8BAA8B,QAA8E,CAAC;AAC1H,qDAAqD;AACrD,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,wBAAwB,EAAE,SAAS,yBAAyB,EAAoC,CAAC;AAE9G,eAAO,MAAM,sBAAsB;aACjC,MAAM;aACN,MAAM;aACN,YAAY,EAAE,+BAA+B;CACrC,CAAC;A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GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErF;AAED,iHAAiH;AACjH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ/E"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Reads and replies for the REST v1 parameter routes.
3
+ *
4
+ * Shared with MCP local mode, so a request REST refuses is refused there with
5
+ * the same sentence, and a reply has the same fields.
6
+ */
7
+ import { apiShapeSummary } from "./apiShapeSummary.js";
8
+ import { wireExpressionError } from "./apiErrors.js";
9
+ import { shapeBindingIssues } from "./expressionBindings.js";
10
+ import { sketchConstraintBindingIssues } from "./sketchConstraintBindings.js";
11
+ import { configurationIssues } from "./projectParameters.js";
12
+ export const API_PARAMETER_NAME_MAX_LENGTH = 64;
13
+ export const API_PARAMETER_EXPRESSION_MAX_LENGTH = 10_000;
14
+ /** The limit as refusals word it. */
15
+ export const API_PARAMETER_EXPRESSION_LIMIT = `${API_PARAMETER_EXPRESSION_MAX_LENGTH.toLocaleString("en-US")} characters`;
16
+ /** Matches the engine's configuration name limit. */
17
+ export const API_CONFIGURATION_NAME_MAX_LENGTH = 100;
18
+ export const API_PARAMETER_DIMENSIONS = ["length", "angle", "unitless"];
19
+ export const API_PARAMETER_MESSAGES = {
20
+ create: `A parameter needs a name, an expression of at most ${API_PARAMETER_EXPRESSION_LIMIT}, and a dimension of length, angle, or unitless.`,
21
+ change: `Send name alone to rename, or expression (at most ${API_PARAMETER_EXPRESSION_LIMIT}) and dimension to change the value.`,
22
+ nameRequired: "A parameter name is required.",
23
+ };
24
+ export const API_CONFIGURATION_MESSAGES = {
25
+ create: "A configuration needs a name, and overrides that map parameter names to expressions.",
26
+ change: "Send name alone to rename, or parameter and expression (null to clear) to change an override.",
27
+ activate: "Send the configuration name to activate, or null for the base table.",
28
+ nameRequired: `A configuration name of 1 to ${API_CONFIGURATION_NAME_MAX_LENGTH} characters is required.`,
29
+ };
30
+ const isObject = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
31
+ const onlyKeys = (body, allowed) => Object.keys(body).every((key) => allowed.includes(key));
32
+ const isName = (value) => typeof value === "string" && value.length >= 1 && value.length <= API_PARAMETER_NAME_MAX_LENGTH;
33
+ const isExpression = (value) => typeof value === "string" && /\S/.test(value) && value.length <= API_PARAMETER_EXPRESSION_MAX_LENGTH;
34
+ const isDimension = (value) => API_PARAMETER_DIMENSIONS.includes(value);
35
+ /** Accepts `{ name, expression, dimension }` and nothing else. */
36
+ export function isApiParameterCreateRequest(body) {
37
+ return isObject(body) && onlyKeys(body, ["name", "expression", "dimension"])
38
+ && isName(body.name) && isExpression(body.expression) && isDimension(body.dimension);
39
+ }
40
+ /** Accepts `{ name }` alone, or `expression`, `dimension` or both. */
41
+ export function isApiParameterChangeRequest(body) {
42
+ if (!isObject(body))
43
+ return false;
44
+ if ("name" in body)
45
+ return onlyKeys(body, ["name"]) && isName(body.name);
46
+ return onlyKeys(body, ["expression", "dimension"]) && ("expression" in body || "dimension" in body)
47
+ && (!("expression" in body) || isExpression(body.expression))
48
+ && (!("dimension" in body) || isDimension(body.dimension));
49
+ }
50
+ const isConfigurationName = (value) => typeof value === "string" && value.length >= 1 && value.length <= API_CONFIGURATION_NAME_MAX_LENGTH;
51
+ /** Accepts `{ name, overrides? }`, where overrides maps names to expressions. */
52
+ export function isApiConfigurationCreateRequest(body) {
53
+ return isObject(body) && onlyKeys(body, ["name", "overrides"]) && isConfigurationName(body.name)
54
+ && (!("overrides" in body) || (isObject(body.overrides) && Object.values(body.overrides).every(isExpression)));
55
+ }
56
+ export function isApiConfigurationChangeRequest(body) {
57
+ if (!isObject(body))
58
+ return false;
59
+ if ("name" in body)
60
+ return onlyKeys(body, ["name"]) && isConfigurationName(body.name);
61
+ return onlyKeys(body, ["parameter", "expression"]) && isName(body.parameter)
62
+ && "expression" in body && (body.expression === null || isExpression(body.expression));
63
+ }
64
+ /** Accepts `{ name }`, where null names the base table. */
65
+ export function isApiConfigurationActivateRequest(body) {
66
+ return isObject(body) && onlyKeys(body, ["name"]) && "name" in body && (body.name === null || isConfigurationName(body.name));
67
+ }
68
+ /** Returns the trimmed `?name=` value, or undefined when it is missing or out of bounds. */
69
+ export function apiParameterName(value) {
70
+ if (typeof value !== "string")
71
+ return undefined;
72
+ const trimmed = value.trim();
73
+ return trimmed.length >= 1 && trimmed.length <= API_PARAMETER_NAME_MAX_LENGTH ? trimmed : undefined;
74
+ }
75
+ /** Returns a configuration `?name=` value as the contract reads it: not trimmed, 1 to 100 characters. */
76
+ export function apiConfigurationName(value) {
77
+ return typeof value === "string" && value.length >= 1 && value.length <= API_CONFIGURATION_NAME_MAX_LENGTH ? value : undefined;
78
+ }
79
+ function apiIssue({ code, message, expressionError }) {
80
+ return { code, message, ...(expressionError ? { expressionError: wireExpressionError(expressionError) } : {}) };
81
+ }
82
+ /** Serializes one table entry. A stale entry's NaN becomes null, which JSON would write anyway. */
83
+ export function apiParameter(parameter) {
84
+ return {
85
+ name: parameter.name,
86
+ expression: parameter.expression,
87
+ dimension: parameter.dimension,
88
+ value: Number.isFinite(parameter.value) ? parameter.value : null,
89
+ ...(parameter.error ? { error: apiIssue(parameter.error) } : {}),
90
+ };
91
+ }
92
+ /** The `GET /parameters` reply. */
93
+ export function apiParameterList(project) {
94
+ return {
95
+ parameters: project.parameters.map(apiParameter),
96
+ activeConfiguration: project.activeConfiguration ?? null,
97
+ bindingIssues: shapeBindingIssues(project.shapes, project.parameters)
98
+ .map((issue) => ({ shapeId: issue.shapeId, field: issue.field, ...apiIssue(issue) })),
99
+ constraintBindingIssues: sketchConstraintBindingIssues(project.shapes, project.parameters).map((issue) => ({
100
+ shapeId: issue.shapeId,
101
+ constraintId: issue.constraintId,
102
+ ...apiIssue(issue),
103
+ ...(issue.fields ? { fields: [...issue.fields] } : {}),
104
+ })),
105
+ revision: project.revision,
106
+ };
107
+ }
108
+ /** A parameter write's reply; `parameter` is the entry now called `name`. */
109
+ export function apiParametersWritten(value, name) {
110
+ const parameter = value.parameters.find((entry) => entry.name === name);
111
+ return {
112
+ ...(parameter ? { parameter: apiParameter(parameter) } : {}),
113
+ parameters: value.parameters.map(apiParameter),
114
+ shapes: value.shapes.map(apiShapeSummary),
115
+ revision: value.revision,
116
+ };
117
+ }
118
+ export function apiConfiguration({ name, overrides }) {
119
+ return { name, overrides: { ...overrides } };
120
+ }
121
+ /** The configurations, the active name, the resolved table, and overrides that no longer resolve. */
122
+ export function apiConfigurationState(project) {
123
+ return {
124
+ configurations: project.configurations.map(apiConfiguration),
125
+ activeConfiguration: project.activeConfiguration,
126
+ parameters: project.parameters.map(apiParameter),
127
+ issues: configurationIssues(project).map(({ configuration, parameter, error }) => ({ configuration, parameter, ...apiIssue(error) })),
128
+ };
129
+ }
130
+ /** The `GET /parameter-configurations` reply. */
131
+ export function apiConfigurationList(project) {
132
+ return { ...apiConfigurationState(project), revision: project.revision };
133
+ }
134
+ /** A configuration write's reply; `configuration` is the one now called `name`, when given and still present. */
135
+ export function apiConfigurationsWritten(value, name) {
136
+ const configuration = name === undefined ? undefined : value.configurations.find((entry) => entry.name === name);
137
+ return {
138
+ ...(configuration ? { configuration: apiConfiguration(configuration) } : {}),
139
+ ...apiConfigurationState(value),
140
+ shapes: value.shapes.map(apiShapeSummary),
141
+ revision: value.revision,
142
+ };
143
+ }
144
+ //# sourceMappingURL=apiParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiParameters.js","sourceRoot":"","sources":["../src/apiParameters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OA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