arc-1 0.9.2 → 0.9.4
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 +4 -4
- package/dist/adt/client.d.ts +12 -1
- package/dist/adt/client.d.ts.map +1 -1
- package/dist/adt/client.js +56 -1
- package/dist/adt/client.js.map +1 -1
- package/dist/adt/devtools.d.ts.map +1 -1
- package/dist/adt/devtools.js +191 -51
- package/dist/adt/devtools.js.map +1 -1
- package/dist/adt/diagnostics.d.ts +21 -1
- package/dist/adt/diagnostics.d.ts.map +1 -1
- package/dist/adt/diagnostics.js +72 -0
- package/dist/adt/diagnostics.js.map +1 -1
- package/dist/adt/fm-signature.d.ts +77 -0
- package/dist/adt/fm-signature.d.ts.map +1 -0
- package/dist/adt/fm-signature.js +343 -0
- package/dist/adt/fm-signature.js.map +1 -0
- package/dist/adt/http.d.ts +9 -1
- package/dist/adt/http.d.ts.map +1 -1
- package/dist/adt/http.js +8 -7
- package/dist/adt/http.js.map +1 -1
- package/dist/adt/rap-generate.d.ts +110 -0
- package/dist/adt/rap-generate.d.ts.map +1 -0
- package/dist/adt/rap-generate.js +262 -0
- package/dist/adt/rap-generate.js.map +1 -0
- package/dist/adt/rap-handlers.d.ts +14 -0
- package/dist/adt/rap-handlers.d.ts.map +1 -1
- package/dist/adt/rap-handlers.js +96 -9
- package/dist/adt/rap-handlers.js.map +1 -1
- package/dist/adt/types.d.ts +73 -1
- package/dist/adt/types.d.ts.map +1 -1
- package/dist/adt/xml-parser.d.ts.map +1 -1
- package/dist/adt/xml-parser.js +14 -0
- package/dist/adt/xml-parser.js.map +1 -1
- package/dist/authz/policy.d.ts.map +1 -1
- package/dist/authz/policy.js +9 -0
- package/dist/authz/policy.js.map +1 -1
- package/dist/context/method-surgery.d.ts +27 -0
- package/dist/context/method-surgery.d.ts.map +1 -1
- package/dist/context/method-surgery.js +104 -7
- package/dist/context/method-surgery.js.map +1 -1
- package/dist/handlers/intent.d.ts +20 -0
- package/dist/handlers/intent.d.ts.map +1 -1
- package/dist/handlers/intent.js +729 -71
- package/dist/handlers/intent.js.map +1 -1
- package/dist/handlers/schemas.d.ts +111 -3
- package/dist/handlers/schemas.d.ts.map +1 -1
- package/dist/handlers/schemas.js +163 -11
- package/dist/handlers/schemas.js.map +1 -1
- package/dist/handlers/tools.d.ts.map +1 -1
- package/dist/handlers/tools.js +152 -33
- package/dist/handlers/tools.js.map +1 -1
- package/dist/server/config.d.ts.map +1 -1
- package/dist/server/config.js +1 -0
- package/dist/server/config.js.map +1 -1
- package/dist/server/server.d.ts +1 -1
- package/dist/server/server.js +1 -1
- package/dist/server/types.d.ts +2 -0
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/types.js.map +1 -1
- package/package.json +1 -2
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* (clients may send "100" as a string).
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
+
export declare const SAPWRITE_CLAS_INCLUDES: readonly ["definitions", "implementations", "macros", "testclasses"];
|
|
13
14
|
export declare const SAPReadSchema: z.ZodObject<{
|
|
14
15
|
type: z.ZodEnum<{
|
|
15
16
|
PROG: "PROG";
|
|
@@ -70,6 +71,7 @@ export declare const SAPReadSchema: z.ZodObject<{
|
|
|
70
71
|
sqlFilter: z.ZodOptional<z.ZodString>;
|
|
71
72
|
objectType: z.ZodOptional<z.ZodString>;
|
|
72
73
|
versionUri: z.ZodOptional<z.ZodString>;
|
|
74
|
+
includeSignature: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
73
75
|
}, z.core.$strip>;
|
|
74
76
|
export declare const SAPReadSchemaBtp: z.ZodObject<{
|
|
75
77
|
type: z.ZodEnum<{
|
|
@@ -117,26 +119,37 @@ export declare const SAPReadSchemaBtp: z.ZodObject<{
|
|
|
117
119
|
sqlFilter: z.ZodOptional<z.ZodString>;
|
|
118
120
|
objectType: z.ZodOptional<z.ZodString>;
|
|
119
121
|
versionUri: z.ZodOptional<z.ZodString>;
|
|
122
|
+
includeSignature: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
120
123
|
}, z.core.$strip>;
|
|
121
124
|
export declare const SAPSearchSchema: z.ZodObject<{
|
|
122
|
-
query: z.ZodString
|
|
125
|
+
query: z.ZodOptional<z.ZodString>;
|
|
123
126
|
maxResults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
124
127
|
searchType: z.ZodOptional<z.ZodEnum<{
|
|
125
128
|
object: "object";
|
|
126
129
|
source_code: "source_code";
|
|
130
|
+
tadir_lookup: "tadir_lookup";
|
|
127
131
|
}>>;
|
|
128
132
|
objectType: z.ZodOptional<z.ZodString>;
|
|
133
|
+
objectTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
134
|
packageName: z.ZodOptional<z.ZodString>;
|
|
135
|
+
names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
136
|
}, z.core.$strip>;
|
|
131
137
|
export declare const SAPSearchSchemaNoSource: z.ZodObject<{
|
|
132
|
-
query: z.ZodString
|
|
138
|
+
query: z.ZodOptional<z.ZodString>;
|
|
133
139
|
maxResults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
140
|
+
searchType: z.ZodOptional<z.ZodEnum<{
|
|
141
|
+
object: "object";
|
|
142
|
+
tadir_lookup: "tadir_lookup";
|
|
143
|
+
}>>;
|
|
144
|
+
objectType: z.ZodOptional<z.ZodString>;
|
|
145
|
+
objectTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
146
|
+
names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
147
|
}, z.core.$strip>;
|
|
135
148
|
export declare const SAPQuerySchema: z.ZodObject<{
|
|
136
149
|
sql: z.ZodString;
|
|
137
150
|
maxRows: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
138
151
|
}, z.core.$strip>;
|
|
139
|
-
export declare const SAPWRITE_TYPES_ONPREM: readonly ["PROG", "CLAS", "INTF", "FUNC", "INCL", "DDLS", "DCLS", "DDLX", "BDEF", "SRVD", "SRVB", "SKTD", "TABL", "DOMA", "DTEL", "MSAG"];
|
|
152
|
+
export declare const SAPWRITE_TYPES_ONPREM: readonly ["PROG", "CLAS", "INTF", "FUNC", "FUGR", "INCL", "DDLS", "DCLS", "DDLX", "BDEF", "SRVD", "SRVB", "SKTD", "TABL", "DOMA", "DTEL", "MSAG"];
|
|
140
153
|
export declare const SAPWRITE_TYPES_BTP: readonly ["CLAS", "INTF", "DDLS", "DCLS", "DDLX", "BDEF", "SRVD", "SRVB", "SKTD", "TABL", "DOMA", "DTEL", "MSAG"];
|
|
141
154
|
export declare const SAPWriteSchema: z.ZodObject<{
|
|
142
155
|
action: z.ZodEnum<{
|
|
@@ -146,6 +159,7 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
146
159
|
edit_method: "edit_method";
|
|
147
160
|
batch_create: "batch_create";
|
|
148
161
|
scaffold_rap_handlers: "scaffold_rap_handlers";
|
|
162
|
+
generate_behavior_implementation: "generate_behavior_implementation";
|
|
149
163
|
}>;
|
|
150
164
|
type: z.ZodOptional<z.ZodEnum<{
|
|
151
165
|
PROG: "PROG";
|
|
@@ -159,6 +173,7 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
159
173
|
SRVD: "SRVD";
|
|
160
174
|
SRVB: "SRVB";
|
|
161
175
|
DDLX: "DDLX";
|
|
176
|
+
FUGR: "FUGR";
|
|
162
177
|
TABL: "TABL";
|
|
163
178
|
SKTD: "SKTD";
|
|
164
179
|
DOMA: "DOMA";
|
|
@@ -167,10 +182,17 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
167
182
|
}>>;
|
|
168
183
|
name: z.ZodOptional<z.ZodString>;
|
|
169
184
|
source: z.ZodOptional<z.ZodString>;
|
|
185
|
+
include: z.ZodOptional<z.ZodEnum<{
|
|
186
|
+
definitions: "definitions";
|
|
187
|
+
implementations: "implementations";
|
|
188
|
+
macros: "macros";
|
|
189
|
+
testclasses: "testclasses";
|
|
190
|
+
}>>;
|
|
170
191
|
method: z.ZodOptional<z.ZodString>;
|
|
171
192
|
description: z.ZodOptional<z.ZodString>;
|
|
172
193
|
package: z.ZodOptional<z.ZodString>;
|
|
173
194
|
transport: z.ZodOptional<z.ZodString>;
|
|
195
|
+
group: z.ZodOptional<z.ZodString>;
|
|
174
196
|
dataType: z.ZodOptional<z.ZodString>;
|
|
175
197
|
length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
176
198
|
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -223,6 +245,23 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
223
245
|
bdefName: z.ZodOptional<z.ZodString>;
|
|
224
246
|
autoApply: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
225
247
|
targetAlias: z.ZodOptional<z.ZodString>;
|
|
248
|
+
activate: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
249
|
+
dryRun: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
250
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
251
|
+
kind: z.ZodEnum<{
|
|
252
|
+
tables: "tables";
|
|
253
|
+
exceptions: "exceptions";
|
|
254
|
+
importing: "importing";
|
|
255
|
+
exporting: "exporting";
|
|
256
|
+
changing: "changing";
|
|
257
|
+
raising: "raising";
|
|
258
|
+
}>;
|
|
259
|
+
name: z.ZodString;
|
|
260
|
+
type: z.ZodOptional<z.ZodString>;
|
|
261
|
+
byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
262
|
+
default: z.ZodOptional<z.ZodString>;
|
|
263
|
+
optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
264
|
+
}, z.core.$strip>>>;
|
|
226
265
|
objects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
227
266
|
type: z.ZodEnum<{
|
|
228
267
|
PROG: "PROG";
|
|
@@ -236,6 +275,7 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
236
275
|
SRVD: "SRVD";
|
|
237
276
|
SRVB: "SRVB";
|
|
238
277
|
DDLX: "DDLX";
|
|
278
|
+
FUGR: "FUGR";
|
|
239
279
|
TABL: "TABL";
|
|
240
280
|
SKTD: "SKTD";
|
|
241
281
|
DOMA: "DOMA";
|
|
@@ -245,6 +285,8 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
245
285
|
name: z.ZodString;
|
|
246
286
|
source: z.ZodOptional<z.ZodString>;
|
|
247
287
|
description: z.ZodOptional<z.ZodString>;
|
|
288
|
+
package: z.ZodOptional<z.ZodString>;
|
|
289
|
+
transport: z.ZodOptional<z.ZodString>;
|
|
248
290
|
dataType: z.ZodOptional<z.ZodString>;
|
|
249
291
|
length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
250
292
|
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -288,6 +330,21 @@ export declare const SAPWriteSchema: z.ZodObject<{
|
|
|
288
330
|
1: "1";
|
|
289
331
|
}>>;
|
|
290
332
|
version: z.ZodOptional<z.ZodString>;
|
|
333
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
|
+
kind: z.ZodEnum<{
|
|
335
|
+
tables: "tables";
|
|
336
|
+
exceptions: "exceptions";
|
|
337
|
+
importing: "importing";
|
|
338
|
+
exporting: "exporting";
|
|
339
|
+
changing: "changing";
|
|
340
|
+
raising: "raising";
|
|
341
|
+
}>;
|
|
342
|
+
name: z.ZodString;
|
|
343
|
+
type: z.ZodOptional<z.ZodString>;
|
|
344
|
+
byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
345
|
+
default: z.ZodOptional<z.ZodString>;
|
|
346
|
+
optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
347
|
+
}, z.core.$strip>>>;
|
|
291
348
|
}, z.core.$strip>>>;
|
|
292
349
|
}, z.core.$strip>;
|
|
293
350
|
export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
@@ -298,6 +355,7 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
|
298
355
|
edit_method: "edit_method";
|
|
299
356
|
batch_create: "batch_create";
|
|
300
357
|
scaffold_rap_handlers: "scaffold_rap_handlers";
|
|
358
|
+
generate_behavior_implementation: "generate_behavior_implementation";
|
|
301
359
|
}>;
|
|
302
360
|
type: z.ZodOptional<z.ZodEnum<{
|
|
303
361
|
CLAS: "CLAS";
|
|
@@ -316,10 +374,17 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
|
316
374
|
}>>;
|
|
317
375
|
name: z.ZodOptional<z.ZodString>;
|
|
318
376
|
source: z.ZodOptional<z.ZodString>;
|
|
377
|
+
include: z.ZodOptional<z.ZodEnum<{
|
|
378
|
+
definitions: "definitions";
|
|
379
|
+
implementations: "implementations";
|
|
380
|
+
macros: "macros";
|
|
381
|
+
testclasses: "testclasses";
|
|
382
|
+
}>>;
|
|
319
383
|
method: z.ZodOptional<z.ZodString>;
|
|
320
384
|
description: z.ZodOptional<z.ZodString>;
|
|
321
385
|
package: z.ZodOptional<z.ZodString>;
|
|
322
386
|
transport: z.ZodOptional<z.ZodString>;
|
|
387
|
+
group: z.ZodOptional<z.ZodString>;
|
|
323
388
|
dataType: z.ZodOptional<z.ZodString>;
|
|
324
389
|
length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
325
390
|
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -372,6 +437,23 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
|
372
437
|
bdefName: z.ZodOptional<z.ZodString>;
|
|
373
438
|
autoApply: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
374
439
|
targetAlias: z.ZodOptional<z.ZodString>;
|
|
440
|
+
activate: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
441
|
+
dryRun: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
442
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
443
|
+
kind: z.ZodEnum<{
|
|
444
|
+
tables: "tables";
|
|
445
|
+
exceptions: "exceptions";
|
|
446
|
+
importing: "importing";
|
|
447
|
+
exporting: "exporting";
|
|
448
|
+
changing: "changing";
|
|
449
|
+
raising: "raising";
|
|
450
|
+
}>;
|
|
451
|
+
name: z.ZodString;
|
|
452
|
+
type: z.ZodOptional<z.ZodString>;
|
|
453
|
+
byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
454
|
+
default: z.ZodOptional<z.ZodString>;
|
|
455
|
+
optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
456
|
+
}, z.core.$strip>>>;
|
|
375
457
|
objects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
376
458
|
type: z.ZodEnum<{
|
|
377
459
|
CLAS: "CLAS";
|
|
@@ -391,6 +473,8 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
|
391
473
|
name: z.ZodString;
|
|
392
474
|
source: z.ZodOptional<z.ZodString>;
|
|
393
475
|
description: z.ZodOptional<z.ZodString>;
|
|
476
|
+
package: z.ZodOptional<z.ZodString>;
|
|
477
|
+
transport: z.ZodOptional<z.ZodString>;
|
|
394
478
|
dataType: z.ZodOptional<z.ZodString>;
|
|
395
479
|
length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
396
480
|
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -434,6 +518,21 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
|
|
|
434
518
|
1: "1";
|
|
435
519
|
}>>;
|
|
436
520
|
version: z.ZodOptional<z.ZodString>;
|
|
521
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
522
|
+
kind: z.ZodEnum<{
|
|
523
|
+
tables: "tables";
|
|
524
|
+
exceptions: "exceptions";
|
|
525
|
+
importing: "importing";
|
|
526
|
+
exporting: "exporting";
|
|
527
|
+
changing: "changing";
|
|
528
|
+
raising: "raising";
|
|
529
|
+
}>;
|
|
530
|
+
name: z.ZodString;
|
|
531
|
+
type: z.ZodOptional<z.ZodString>;
|
|
532
|
+
byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
533
|
+
default: z.ZodOptional<z.ZodString>;
|
|
534
|
+
optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
535
|
+
}, z.core.$strip>>>;
|
|
437
536
|
}, z.core.$strip>>>;
|
|
438
537
|
}, z.core.$strip>;
|
|
439
538
|
export declare const SAPActivateSchema: z.ZodObject<{
|
|
@@ -499,12 +598,14 @@ export declare const SAPDiagnoseSchema: z.ZodObject<{
|
|
|
499
598
|
traces: "traces";
|
|
500
599
|
system_messages: "system_messages";
|
|
501
600
|
gateway_errors: "gateway_errors";
|
|
601
|
+
object_state: "object_state";
|
|
502
602
|
quickfix: "quickfix";
|
|
503
603
|
apply_quickfix: "apply_quickfix";
|
|
504
604
|
}>;
|
|
505
605
|
name: z.ZodOptional<z.ZodString>;
|
|
506
606
|
type: z.ZodOptional<z.ZodString>;
|
|
507
607
|
source: z.ZodOptional<z.ZodString>;
|
|
608
|
+
sourceUri: z.ZodOptional<z.ZodString>;
|
|
508
609
|
line: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
509
610
|
column: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
510
611
|
version: z.ZodOptional<z.ZodEnum<{
|
|
@@ -513,6 +614,13 @@ export declare const SAPDiagnoseSchema: z.ZodObject<{
|
|
|
513
614
|
}>>;
|
|
514
615
|
proposalUri: z.ZodOptional<z.ZodString>;
|
|
515
616
|
proposalUserContent: z.ZodOptional<z.ZodString>;
|
|
617
|
+
proposalAffectedObjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
618
|
+
uri: z.ZodString;
|
|
619
|
+
type: z.ZodOptional<z.ZodString>;
|
|
620
|
+
name: z.ZodOptional<z.ZodString>;
|
|
621
|
+
description: z.ZodOptional<z.ZodString>;
|
|
622
|
+
content: z.ZodOptional<z.ZodString>;
|
|
623
|
+
}, z.core.$strip>>>;
|
|
516
624
|
variant: z.ZodOptional<z.ZodString>;
|
|
517
625
|
id: z.ZodOptional<z.ZodString>;
|
|
518
626
|
detailUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/handlers/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/handlers/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgFxB,eAAO,MAAM,sBAAsB,sEAAuE,CAAC;AA4E3G,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBsC,CAAC;AAEjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBmC,CAAC;AAIjE,eAAO,MAAM,eAAe;;;;;;;;;;;;iBA+BxB,CAAC;AAEL,eAAO,MAAM,uBAAuB;;;;;;;;;;iBA8BhC,CAAC;AAIL,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAMH,eAAO,MAAM,qBAAqB,mJAkBxB,CAAC;AACX,eAAO,MAAM,kBAAkB,mHAcrB,CAAC;AAoIX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmEsC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgEmC,CAAC;AAIlE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAIH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;iBAS5B,CAAC;AAIH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAOxB,CAAC;AAYH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC5B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;iBAW7B,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4CvB,CAAC;AAgBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;iBAW3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;iBAU9B,CAAC;AAeH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmC1B,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAIH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,SAAS,CA+BpH"}
|
package/dist/handlers/schemas.js
CHANGED
|
@@ -85,6 +85,7 @@ const SAPREAD_TYPES_BTP = [
|
|
|
85
85
|
];
|
|
86
86
|
const SAPREAD_CLAS_INCLUDES = ['main', 'testclasses', 'definitions', 'implementations', 'macros'];
|
|
87
87
|
const SAPREAD_DDLS_INCLUDES = ['elements'];
|
|
88
|
+
export const SAPWRITE_CLAS_INCLUDES = ['definitions', 'implementations', 'macros', 'testclasses'];
|
|
88
89
|
function validateSapReadInput(input, ctx) {
|
|
89
90
|
if (input.include) {
|
|
90
91
|
const include = input.include.toLowerCase();
|
|
@@ -164,6 +165,8 @@ export const SAPReadSchema = z
|
|
|
164
165
|
sqlFilter: z.string().optional(),
|
|
165
166
|
objectType: z.string().optional(),
|
|
166
167
|
versionUri: z.string().optional(),
|
|
168
|
+
/** For type=FUNC: when true, response is JSON {source, signature: {importing, exporting, ...}}. */
|
|
169
|
+
includeSignature: z.coerce.boolean().optional(),
|
|
167
170
|
})
|
|
168
171
|
.superRefine((input, ctx) => validateSapReadInput(input, ctx));
|
|
169
172
|
export const SAPReadSchemaBtp = z
|
|
@@ -182,19 +185,73 @@ export const SAPReadSchemaBtp = z
|
|
|
182
185
|
sqlFilter: z.string().optional(),
|
|
183
186
|
objectType: z.string().optional(),
|
|
184
187
|
versionUri: z.string().optional(),
|
|
188
|
+
/** For type=FUNC: when true, response is JSON {source, signature: {importing, exporting, ...}}. */
|
|
189
|
+
includeSignature: z.coerce.boolean().optional(),
|
|
185
190
|
})
|
|
186
191
|
.superRefine((input, ctx) => validateSapReadInput(input, ctx));
|
|
187
192
|
// ─── SAPSearch ──────────────────────────────────────────────────────
|
|
188
|
-
export const SAPSearchSchema = z
|
|
189
|
-
|
|
193
|
+
export const SAPSearchSchema = z
|
|
194
|
+
.object({
|
|
195
|
+
query: z.string().optional(),
|
|
190
196
|
maxResults: z.coerce.number().optional(),
|
|
191
|
-
searchType: z.enum(['object', 'source_code']).optional(),
|
|
197
|
+
searchType: z.enum(['object', 'source_code', 'tadir_lookup']).optional(),
|
|
192
198
|
objectType: z.string().optional(),
|
|
199
|
+
objectTypes: z.array(z.string()).optional(),
|
|
193
200
|
packageName: z.string().optional(),
|
|
201
|
+
names: z.array(z.string()).optional(),
|
|
202
|
+
})
|
|
203
|
+
.superRefine((input, ctx) => {
|
|
204
|
+
const searchType = input.searchType ?? 'object';
|
|
205
|
+
if (searchType === 'tadir_lookup') {
|
|
206
|
+
const hasNames = Array.isArray(input.names) && input.names.some((n) => n.trim());
|
|
207
|
+
const hasQuery = typeof input.query === 'string' && input.query.trim().length > 0;
|
|
208
|
+
if (!hasNames && !hasQuery) {
|
|
209
|
+
ctx.addIssue({
|
|
210
|
+
code: 'custom',
|
|
211
|
+
path: ['names'],
|
|
212
|
+
message: 'tadir_lookup requires either names[] or query.',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (!input.query || input.query.trim().length === 0) {
|
|
218
|
+
ctx.addIssue({
|
|
219
|
+
code: 'custom',
|
|
220
|
+
path: ['query'],
|
|
221
|
+
message: `${searchType} search requires query.`,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
194
224
|
});
|
|
195
|
-
export const SAPSearchSchemaNoSource = z
|
|
196
|
-
|
|
225
|
+
export const SAPSearchSchemaNoSource = z
|
|
226
|
+
.object({
|
|
227
|
+
query: z.string().optional(),
|
|
197
228
|
maxResults: z.coerce.number().optional(),
|
|
229
|
+
searchType: z.enum(['object', 'tadir_lookup']).optional(),
|
|
230
|
+
objectType: z.string().optional(),
|
|
231
|
+
objectTypes: z.array(z.string()).optional(),
|
|
232
|
+
names: z.array(z.string()).optional(),
|
|
233
|
+
})
|
|
234
|
+
.superRefine((input, ctx) => {
|
|
235
|
+
const searchType = input.searchType ?? 'object';
|
|
236
|
+
if (searchType === 'tadir_lookup') {
|
|
237
|
+
const hasNames = Array.isArray(input.names) && input.names.some((n) => n.trim());
|
|
238
|
+
const hasQuery = typeof input.query === 'string' && input.query.trim().length > 0;
|
|
239
|
+
if (!hasNames && !hasQuery) {
|
|
240
|
+
ctx.addIssue({
|
|
241
|
+
code: 'custom',
|
|
242
|
+
path: ['names'],
|
|
243
|
+
message: 'tadir_lookup requires either names[] or query.',
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (!input.query || input.query.trim().length === 0) {
|
|
249
|
+
ctx.addIssue({
|
|
250
|
+
code: 'custom',
|
|
251
|
+
path: ['query'],
|
|
252
|
+
message: 'object search requires query.',
|
|
253
|
+
});
|
|
254
|
+
}
|
|
198
255
|
});
|
|
199
256
|
// ─── SAPQuery ───────────────────────────────────────────────────────
|
|
200
257
|
export const SAPQuerySchema = z.object({
|
|
@@ -209,6 +266,7 @@ export const SAPWRITE_TYPES_ONPREM = [
|
|
|
209
266
|
'CLAS',
|
|
210
267
|
'INTF',
|
|
211
268
|
'FUNC',
|
|
269
|
+
'FUGR',
|
|
212
270
|
'INCL',
|
|
213
271
|
'DDLS',
|
|
214
272
|
'DCLS',
|
|
@@ -246,11 +304,50 @@ const messageClassMessageSchema = z.object({
|
|
|
246
304
|
number: z.string(),
|
|
247
305
|
shortText: z.string(),
|
|
248
306
|
});
|
|
307
|
+
function validateSapWriteInput(input, ctx) {
|
|
308
|
+
if (!input.include)
|
|
309
|
+
return;
|
|
310
|
+
// `edit_method` joins `update` as a valid action for include= so callers can
|
|
311
|
+
// surgically edit a method inside a class-local include (CCDEF/CCIMP/macros/
|
|
312
|
+
// testclasses). The handler in intent.ts also auto-detects the right include
|
|
313
|
+
// from `lhc_*~method` style specifiers, but explicit override remains valid.
|
|
314
|
+
if (input.action !== 'update' && input.action !== 'edit_method') {
|
|
315
|
+
ctx.addIssue({
|
|
316
|
+
code: 'custom',
|
|
317
|
+
path: ['include'],
|
|
318
|
+
message: 'SAPWrite include is only supported for action="update" or action="edit_method".',
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
if (input.type !== 'CLAS') {
|
|
322
|
+
ctx.addIssue({
|
|
323
|
+
code: 'custom',
|
|
324
|
+
path: ['include'],
|
|
325
|
+
message: 'SAPWrite include is only supported for type="CLAS".',
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// FM signature parameter (issue #252). One entry per IMPORTING/EXPORTING/CHANGING/
|
|
330
|
+
// TABLES/EXCEPTIONS/RAISING line in the FUNCTION signature region. ARC-1 builds
|
|
331
|
+
// the ABAP source from this array; SAP's own signature lives inline in /source/main.
|
|
332
|
+
const fmParameterSchema = z.object({
|
|
333
|
+
kind: z.enum(['importing', 'exporting', 'changing', 'tables', 'exceptions', 'raising']),
|
|
334
|
+
name: z.string(),
|
|
335
|
+
/** ABAP type expression. Required for IMPORTING/EXPORTING/CHANGING/TABLES; ignored for EXCEPTIONS/RAISING. */
|
|
336
|
+
type: z.string().optional(),
|
|
337
|
+
/** Emit `VALUE(name)` wrapper. Default false (pass-by-reference). */
|
|
338
|
+
byValue: z.coerce.boolean().optional(),
|
|
339
|
+
/** Raw ABAP literal — IMPORTING/CHANGING only. Emitted verbatim. */
|
|
340
|
+
default: z.string().optional(),
|
|
341
|
+
/** Emit `OPTIONAL` keyword. */
|
|
342
|
+
optional: z.coerce.boolean().optional(),
|
|
343
|
+
});
|
|
249
344
|
const batchObjectSchemaOnprem = z.object({
|
|
250
345
|
type: z.enum(SAPWRITE_TYPES_ONPREM),
|
|
251
346
|
name: z.string(),
|
|
252
347
|
source: z.string().optional(),
|
|
253
348
|
description: z.string().optional(),
|
|
349
|
+
package: z.string().optional(),
|
|
350
|
+
transport: z.string().optional(),
|
|
254
351
|
dataType: z.string().optional(),
|
|
255
352
|
length: z.coerce.number().optional(),
|
|
256
353
|
decimals: z.coerce.number().optional(),
|
|
@@ -278,12 +375,16 @@ const batchObjectSchemaOnprem = z.object({
|
|
|
278
375
|
odataVersion: z.enum(['V2', 'V4']).optional(),
|
|
279
376
|
category: z.enum(['0', '1']).optional(),
|
|
280
377
|
version: z.string().optional(),
|
|
378
|
+
/** FUNC structured signature parameters (issue #252). */
|
|
379
|
+
parameters: z.array(fmParameterSchema).optional(),
|
|
281
380
|
});
|
|
282
381
|
const batchObjectSchemaBtp = z.object({
|
|
283
382
|
type: z.enum(SAPWRITE_TYPES_BTP),
|
|
284
383
|
name: z.string(),
|
|
285
384
|
source: z.string().optional(),
|
|
286
385
|
description: z.string().optional(),
|
|
386
|
+
package: z.string().optional(),
|
|
387
|
+
transport: z.string().optional(),
|
|
287
388
|
dataType: z.string().optional(),
|
|
288
389
|
length: z.coerce.number().optional(),
|
|
289
390
|
decimals: z.coerce.number().optional(),
|
|
@@ -311,16 +412,31 @@ const batchObjectSchemaBtp = z.object({
|
|
|
311
412
|
odataVersion: z.enum(['V2', 'V4']).optional(),
|
|
312
413
|
category: z.enum(['0', '1']).optional(),
|
|
313
414
|
version: z.string().optional(),
|
|
415
|
+
/** FUNC structured signature parameters (issue #252). */
|
|
416
|
+
parameters: z.array(fmParameterSchema).optional(),
|
|
314
417
|
});
|
|
315
|
-
export const SAPWriteSchema = z
|
|
316
|
-
|
|
418
|
+
export const SAPWriteSchema = z
|
|
419
|
+
.object({
|
|
420
|
+
action: z.enum([
|
|
421
|
+
'create',
|
|
422
|
+
'update',
|
|
423
|
+
'delete',
|
|
424
|
+
'edit_method',
|
|
425
|
+
'batch_create',
|
|
426
|
+
'scaffold_rap_handlers',
|
|
427
|
+
'generate_behavior_implementation',
|
|
428
|
+
]),
|
|
317
429
|
type: z.enum(SAPWRITE_TYPES_ONPREM).optional(),
|
|
318
430
|
name: z.string().optional(),
|
|
319
431
|
source: z.string().optional(),
|
|
432
|
+
include: z.enum(SAPWRITE_CLAS_INCLUDES).optional(),
|
|
320
433
|
method: z.string().optional(),
|
|
321
434
|
description: z.string().optional(),
|
|
322
435
|
package: z.string().optional(),
|
|
323
436
|
transport: z.string().optional(),
|
|
437
|
+
// Required for FUNC create (the parent function-group name); optional for FUNC
|
|
438
|
+
// update/delete (auto-resolved via search). Ignored for other types.
|
|
439
|
+
group: z.string().optional(),
|
|
324
440
|
dataType: z.string().optional(),
|
|
325
441
|
length: z.coerce.number().optional(),
|
|
326
442
|
decimals: z.coerce.number().optional(),
|
|
@@ -357,17 +473,37 @@ export const SAPWriteSchema = z.object({
|
|
|
357
473
|
bdefName: z.string().optional(),
|
|
358
474
|
autoApply: z.coerce.boolean().optional(),
|
|
359
475
|
targetAlias: z.string().optional(),
|
|
476
|
+
activate: z.coerce.boolean().optional(),
|
|
477
|
+
dryRun: z.coerce.boolean().optional(),
|
|
478
|
+
/** FUNC structured signature parameters (issue #252). When provided, ARC-1 builds the
|
|
479
|
+
* IMPORTING/EXPORTING/CHANGING/TABLES/EXCEPTIONS/RAISING clause from the array and
|
|
480
|
+
* splices it into the FM source body. Backward-compatible: when omitted, the existing
|
|
481
|
+
* source-only path runs unchanged. */
|
|
482
|
+
parameters: z.array(fmParameterSchema).optional(),
|
|
360
483
|
objects: z.array(batchObjectSchemaOnprem).optional(),
|
|
361
|
-
})
|
|
362
|
-
|
|
363
|
-
|
|
484
|
+
})
|
|
485
|
+
.superRefine((input, ctx) => validateSapWriteInput(input, ctx));
|
|
486
|
+
export const SAPWriteSchemaBtp = z
|
|
487
|
+
.object({
|
|
488
|
+
action: z.enum([
|
|
489
|
+
'create',
|
|
490
|
+
'update',
|
|
491
|
+
'delete',
|
|
492
|
+
'edit_method',
|
|
493
|
+
'batch_create',
|
|
494
|
+
'scaffold_rap_handlers',
|
|
495
|
+
'generate_behavior_implementation',
|
|
496
|
+
]),
|
|
364
497
|
type: z.enum(SAPWRITE_TYPES_BTP).optional(),
|
|
365
498
|
name: z.string().optional(),
|
|
366
499
|
source: z.string().optional(),
|
|
500
|
+
include: z.enum(SAPWRITE_CLAS_INCLUDES).optional(),
|
|
367
501
|
method: z.string().optional(),
|
|
368
502
|
description: z.string().optional(),
|
|
369
503
|
package: z.string().optional(),
|
|
370
504
|
transport: z.string().optional(),
|
|
505
|
+
// Same as on-prem; FUGR/FUNC write is on-prem-only but harmless to expose here.
|
|
506
|
+
group: z.string().optional(),
|
|
371
507
|
dataType: z.string().optional(),
|
|
372
508
|
length: z.coerce.number().optional(),
|
|
373
509
|
decimals: z.coerce.number().optional(),
|
|
@@ -404,8 +540,14 @@ export const SAPWriteSchemaBtp = z.object({
|
|
|
404
540
|
bdefName: z.string().optional(),
|
|
405
541
|
autoApply: z.coerce.boolean().optional(),
|
|
406
542
|
targetAlias: z.string().optional(),
|
|
543
|
+
activate: z.coerce.boolean().optional(),
|
|
544
|
+
dryRun: z.coerce.boolean().optional(),
|
|
545
|
+
/** FUNC structured signature parameters — same shape as on-prem. Harmless on BTP since FUNC write
|
|
546
|
+
* is on-prem-only. */
|
|
547
|
+
parameters: z.array(fmParameterSchema).optional(),
|
|
407
548
|
objects: z.array(batchObjectSchemaBtp).optional(),
|
|
408
|
-
})
|
|
549
|
+
})
|
|
550
|
+
.superRefine((input, ctx) => validateSapWriteInput(input, ctx));
|
|
409
551
|
// ─── SAPActivate ────────────────────────────────────────────────────
|
|
410
552
|
export const SAPActivateSchema = z.object({
|
|
411
553
|
action: z.enum(['activate', 'publish_srvb', 'unpublish_srvb']).optional(),
|
|
@@ -442,6 +584,13 @@ export const SAPLintSchema = z.object({
|
|
|
442
584
|
rules: z.record(z.string(), z.any()).optional(),
|
|
443
585
|
});
|
|
444
586
|
// ─── SAPDiagnose ────────────────────────────────────────────────────
|
|
587
|
+
const QuickfixAffectedObjectSchema = z.object({
|
|
588
|
+
uri: z.string(),
|
|
589
|
+
type: z.string().optional(),
|
|
590
|
+
name: z.string().optional(),
|
|
591
|
+
description: z.string().optional(),
|
|
592
|
+
content: z.string().optional(),
|
|
593
|
+
});
|
|
445
594
|
export const SAPDiagnoseSchema = z.object({
|
|
446
595
|
action: z.enum([
|
|
447
596
|
'syntax',
|
|
@@ -451,17 +600,20 @@ export const SAPDiagnoseSchema = z.object({
|
|
|
451
600
|
'traces',
|
|
452
601
|
'system_messages',
|
|
453
602
|
'gateway_errors',
|
|
603
|
+
'object_state',
|
|
454
604
|
'quickfix',
|
|
455
605
|
'apply_quickfix',
|
|
456
606
|
]),
|
|
457
607
|
name: z.string().optional(),
|
|
458
608
|
type: z.string().optional(),
|
|
459
609
|
source: z.string().optional(),
|
|
610
|
+
sourceUri: z.string().optional(),
|
|
460
611
|
line: z.coerce.number().optional(),
|
|
461
612
|
column: z.coerce.number().optional(),
|
|
462
613
|
version: z.enum(['active', 'inactive']).optional(),
|
|
463
614
|
proposalUri: z.string().optional(),
|
|
464
615
|
proposalUserContent: z.string().optional(),
|
|
616
|
+
proposalAffectedObjects: z.array(QuickfixAffectedObjectSchema).optional(),
|
|
465
617
|
variant: z.string().optional(),
|
|
466
618
|
id: z.string().optional(),
|
|
467
619
|
detailUrl: z.string().optional(),
|