@octaviaflow/flow-rules 0.13.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ export { EmailConfig, } from "./catalog/communication/email-send/config";
36
36
  export { queryDefinition, } from "./catalog/general/query/index";
37
37
  export { isQueryableConnector, } from "./catalog/general/query/config";
38
38
  export { AggregateFunction, type BuildQueryConfig, type ColumnSchema, type ConnectorSchema, JoinType, LogicalOperator, type QueryExecutionResult, type QueryField, type QueryFilter, type QueryFilterGroup, type QueryJoin, type QuerySort, SortDirection, type VisualQueryConfig, } from "./catalog/general/query/types";
39
- export { DATABASE_CONNECTOR_IDS, type FieldMapping, TRANSFORM_MODES, TRANSFORM_OPERATIONS, TransformConfig, type TransformConfigType, type TransformOperation, } from "./catalog/general/transform/config";
39
+ export { DATABASE_CONNECTOR_IDS, type FieldMapping, TRANSFORM_MODES, TRANSFORM_OPERATIONS, TransformConfig, type TransformConfigType, type TransformGroupBy, type TransformOperation, } from "./catalog/general/transform/config";
40
40
  export { AGGREGATE_FUNCTIONS, AGGREGATE_FUNCTION_DESCRIPTIONS, AggregateConfig, type AggregateConfigType, type AggregateFn, type AggregateMetric, type AggregateSchemaNode, groupKeyName, } from "./catalog/general/aggregate/config";
41
41
  export { detectRecordFields, resolveRecordSchema, type RecordSchemaLike, } from "./catalog/logic/for-each/recordSchema";
42
42
  export { STORAGE_CONNECTOR_IDS, type StorageExtraField, type StoragePathField, getStorageProvider, storageConfigKeys, } from "./catalog/storage/storageCapabilities";
@@ -50,7 +50,6 @@ export { CsvActionConfig, type CsvActionConfigType } from "./catalog/storage/csv
50
50
  export { JsonActionConfig, type JsonActionConfigType } from "./catalog/storage/json-action/config";
51
51
  export { XmlActionConfig, type XmlActionConfigType } from "./catalog/storage/xml-action/config";
52
52
  export { ExcelActionConfig, type ExcelActionConfigType } from "./catalog/storage/excel-action/config";
53
- export { FileActionConfig, FILE_ACTION_MODES, FILE_ACTION_SOURCES, FILE_ACTION_FORMATS, FILE_ACTION_OUTPUT_FORMATS, type FileActionConfigType, } from "./catalog/storage/file-action/config";
54
53
  export { StorageActionConfig, storageOperations, type StorageActionConfigType } from "./catalog/storage/storage-action/config";
55
54
  export { S3ActionConfig, S3_OPERATIONS, type S3ActionConfigType } from "./catalog/storage/s3-action/config";
56
55
  export { FtpActionConfig, FTP_OPERATIONS, type FtpActionConfigType } from "./catalog/storage/ftp-action/config";
package/dist/index.js CHANGED
@@ -24,30 +24,16 @@ var ActionType;
24
24
  ActionType["Schedule"] = "schedule";
25
25
  ActionType["Webhook"] = "webhook";
26
26
  ActionType["Manual"] = "manual";
27
- ActionType["DataChange"] = "data_change";
28
27
  ActionType["Event"] = "event";
29
- ActionType["Read"] = "read";
30
28
  ActionType["Write"] = "write";
31
- ActionType["Update"] = "update";
32
- ActionType["Delete"] = "delete";
33
29
  ActionType["Query"] = "query";
34
30
  ActionType["HTTPRequest"] = "http_request";
35
- ActionType["GraphQLQuery"] = "graphql_query";
36
31
  ActionType["Condition"] = "condition";
37
32
  ActionType["ForEach"] = "for_each";
38
33
  ActionType["Group"] = "group";
39
- ActionType["Format"] = "format";
40
34
  ActionType["AIAgent"] = "ai_agent";
41
- ActionType["Embedding"] = "embedding";
42
- ActionType["VectorSearch"] = "vector_search";
43
- ActionType["ImageGeneration"] = "image_generation";
44
- ActionType["ImageAnalysis"] = "image_analysis";
45
- ActionType["SpeechToText"] = "speech_to_text";
46
- ActionType["TextToSpeech"] = "text_to_speech";
47
35
  ActionType["Transform"] = "transform";
48
36
  ActionType["Aggregate"] = "aggregate";
49
- ActionType["FileOperation"] = "file_operation";
50
- ActionType["FileAction"] = "file_action";
51
37
  ActionType["CsvAction"] = "csv_action";
52
38
  ActionType["JsonAction"] = "json_action";
53
39
  ActionType["XmlAction"] = "xml_action";
@@ -65,12 +51,8 @@ var ActionType;
65
51
  ActionType["GoogleChat"] = "google_chat";
66
52
  ActionType["WebhookCall"] = "webhook_call";
67
53
  ActionType["Delay"] = "delay";
68
- ActionType["Wait"] = "wait";
69
54
  ActionType["Console"] = "console";
70
55
  ActionType["Debug"] = "debug";
71
- ActionType["Error"] = "error";
72
- ActionType["CustomCode"] = "custom_code";
73
- ActionType["CustomAction"] = "custom_action";
74
56
  ActionType["IdpExtract"] = "idp_extract";
75
57
  })(ActionType ||= {});
76
58
  var ActionStatus;
@@ -2423,48 +2405,6 @@ var debugDefinition = {
2423
2405
  testable: false
2424
2406
  };
2425
2407
 
2426
- // src/catalog/utility/error/index.ts
2427
- var errorDefinition = {
2428
- id: "error",
2429
- name: "Error",
2430
- description: "Throw an error to stop workflow execution",
2431
- category: "utility" /* Utility */,
2432
- type: "error" /* Error */,
2433
- tags: ["utility", "error", "control", "built-in"],
2434
- status: "stable" /* Stable */,
2435
- icon: "ErrorFilled",
2436
- color: "#da3742",
2437
- inputSchema: {
2438
- fields: [
2439
- {
2440
- key: "message",
2441
- label: "Error Message",
2442
- type: "string" /* String */,
2443
- description: "Error message to throw",
2444
- validation: { required: true }
2445
- },
2446
- {
2447
- key: "code",
2448
- label: "Error Code",
2449
- type: "string" /* String */,
2450
- description: "Error code",
2451
- validation: { required: false }
2452
- }
2453
- ]
2454
- },
2455
- outputSchema: {
2456
- type: "void",
2457
- properties: [],
2458
- sampleOutput: null
2459
- },
2460
- version: "1.0.0",
2461
- createdAt: "2025-01-01T00:00:00Z",
2462
- updatedAt: "2025-12-15T00:00:00Z",
2463
- createdBy: "system",
2464
- isOfficial: true,
2465
- testable: true
2466
- };
2467
-
2468
2408
  // src/catalog/utility/variables/index.ts
2469
2409
  var variablesDefinition = {
2470
2410
  id: "variables",
@@ -2490,77 +2430,6 @@ var variablesDefinition = {
2490
2430
  testable: false
2491
2431
  };
2492
2432
 
2493
- // src/catalog/api/graphql-query/index.ts
2494
- var graphqlQueryDefinition = {
2495
- id: "graphql_query",
2496
- name: "GraphQL Query",
2497
- description: "Execute GraphQL queries against GraphQL endpoints",
2498
- category: "api" /* API */,
2499
- type: "graphql_query" /* GraphQLQuery */,
2500
- tags: ["api", "graphql", "query", "built-in"],
2501
- status: "stable" /* Stable */,
2502
- icon: "GraphQL",
2503
- color: "#0043ce",
2504
- inputSchema: {
2505
- fields: [
2506
- {
2507
- key: "endpoint",
2508
- label: "GraphQL Endpoint",
2509
- type: "url" /* URL */,
2510
- description: "GraphQL endpoint URL",
2511
- validation: { required: true }
2512
- },
2513
- {
2514
- key: "query",
2515
- label: "Query",
2516
- type: "code" /* Code */,
2517
- description: "GraphQL query",
2518
- language: "json",
2519
- validation: { required: true }
2520
- },
2521
- {
2522
- key: "variables",
2523
- label: "Variables",
2524
- type: "json" /* JSON */,
2525
- description: "Query variables",
2526
- validation: { required: false }
2527
- },
2528
- {
2529
- key: "headers",
2530
- label: "Headers",
2531
- type: "json" /* JSON */,
2532
- description: "HTTP headers",
2533
- validation: { required: false }
2534
- }
2535
- ]
2536
- },
2537
- outputSchema: {
2538
- type: "object",
2539
- properties: [
2540
- {
2541
- key: "data",
2542
- type: "json" /* JSON */,
2543
- description: "Query result data"
2544
- },
2545
- {
2546
- key: "errors",
2547
- type: "array" /* Array */,
2548
- description: "GraphQL errors"
2549
- }
2550
- ],
2551
- sampleOutput: {
2552
- data: { user: { id: "1", name: "John" } },
2553
- errors: []
2554
- }
2555
- },
2556
- version: "1.0.0",
2557
- createdAt: "2025-01-01T00:00:00Z",
2558
- updatedAt: "2025-12-15T00:00:00Z",
2559
- createdBy: "system",
2560
- isOfficial: true,
2561
- testable: true
2562
- };
2563
-
2564
2433
  // src/catalog/ai/ai-agent/index.ts
2565
2434
  var aiAgentDefinition = {
2566
2435
  id: "ai_agent",
@@ -2718,8 +2587,6 @@ var actionsRegistry = {
2718
2587
  for_each: forEachDefinition,
2719
2588
  group: groupDefinition
2720
2589
  },
2721
- ["transform" /* Transform */]: {},
2722
- ["database" /* Database */]: {},
2723
2590
  ["storage" /* Storage */]: {
2724
2591
  csv_action: csvActionDefinition,
2725
2592
  json_action: jsonActionDefinition,
@@ -2744,8 +2611,6 @@ var actionsRegistry = {
2744
2611
  variables: variablesDefinition,
2745
2612
  debug: debugDefinition
2746
2613
  },
2747
- ["ecommerce" /* Ecommerce */]: {},
2748
- ["api" /* API */]: {},
2749
2614
  ["ai" /* AI */]: {
2750
2615
  ai_agent: aiAgentDefinition,
2751
2616
  idp_extract: idpExtractDefinition
@@ -3701,7 +3566,7 @@ var TRANSFORM_OPERATIONS = [
3701
3566
  { id: "delete", label: "Delete" }
3702
3567
  ];
3703
3568
  var TRANSFORM_OPERATION_IDS = TRANSFORM_OPERATIONS.map((o) => o.id);
3704
- var DATABASE_CONNECTOR_IDS = new Set(["mongodb", "postgresql", "mysql", "sqlite", "google_sheets"]);
3569
+ var DATABASE_CONNECTOR_IDS = new Set(["mongodb", "postgresql", "mysql", "google_sheets"]);
3705
3570
  var TransformConfig = {
3706
3571
  defaults: {
3707
3572
  name: "Transform",
@@ -3734,7 +3599,7 @@ var TransformConfig = {
3734
3599
  database: {
3735
3600
  type: "text",
3736
3601
  required: false,
3737
- description: "Database name for MongoDB / PostgreSQL / MySQL / SQLite; the spreadsheet id for Google Sheets"
3602
+ description: "Database name for MongoDB / PostgreSQL / MySQL; the spreadsheet id for Google Sheets"
3738
3603
  },
3739
3604
  objectName: {
3740
3605
  type: "select",
@@ -3748,7 +3613,16 @@ var TransformConfig = {
3748
3613
  options: TRANSFORM_MODES,
3749
3614
  description: "How the mappings are authored: visual (the Field Mapper — the only mode the editor offers) or expression (legacy JavaScript). This is not the write mode; that is `operation`."
3750
3615
  },
3751
- mappings: { type: "array", required: false },
3616
+ mappings: {
3617
+ type: "array",
3618
+ required: false,
3619
+ description: "Field mappings: [{ id, sourceField, targetField, targetType, transform? }]. sourceField is a token like {{orders[].email}}; " + "an index picks one list element ({{products[].variants[0].price}}). With groupBy, set lineField: true on the mappings that make each line."
3620
+ },
3621
+ groupBy: {
3622
+ type: "json",
3623
+ required: false,
3624
+ description: 'One record per key, with line items: { "key": "{{orders[].number}}", "into": "line_items" }. Rows whose key is the same become ONE record ' + "(its fields from the first row); mappings with lineField: true become a list of lines under `into` (Shopify line_items, QuickBooks Line, Odoo order_line). " + "Dotted line fields nest inside each line (SalesItemLineDetail.ItemRef.value)."
3625
+ },
3752
3626
  expression: { type: "code", required: false }
3753
3627
  },
3754
3628
  generateName: (operation, connectorLabel, objectName) => {
@@ -3789,6 +3663,16 @@ var TransformConfig = {
3789
3663
  });
3790
3664
  }
3791
3665
  }
3666
+ const groupBy = config.groupBy;
3667
+ if (groupBy && (groupBy.key || groupBy.into)) {
3668
+ if (!groupBy.key)
3669
+ errors.push("One record per key: choose the key field (groupBy.key)");
3670
+ if (!groupBy.into)
3671
+ errors.push("One record per key: name the field that holds the lines (groupBy.into)");
3672
+ if (groupBy.key && groupBy.into && !(config.mappings ?? []).some((m) => m.lineField)) {
3673
+ errors.push("One record per key: mark at least one mapping as a line field (lineField: true)");
3674
+ }
3675
+ }
3792
3676
  return { valid: errors.length === 0, errors };
3793
3677
  },
3794
3678
  merge: (userConfig) => {
@@ -4379,7 +4263,8 @@ var EVENT_CAPABLE_CONNECTOR_IDS = new Set([
4379
4263
  "hubspot",
4380
4264
  "salesforce",
4381
4265
  "google_sheets",
4382
- "whatsapp"
4266
+ "whatsapp",
4267
+ "dropbox"
4383
4268
  ]);
4384
4269
  var QBO_ENTITIES = [
4385
4270
  { entity: "Invoice", supportedOperations: ["Create", "Update", "Delete", "Void", "Emailed"] },
@@ -4432,13 +4317,17 @@ var GOOGLE_SHEETS_ENTITIES = [
4432
4317
  var WHATSAPP_ENTITIES = [
4433
4318
  { entity: "Message", supportedOperations: ["Received"] }
4434
4319
  ];
4320
+ var DROPBOX_ENTITIES = [
4321
+ { entity: "File", supportedOperations: ["Create", "Update", "Delete"] }
4322
+ ];
4435
4323
  var CONNECTOR_EVENT_ENTITIES = {
4436
4324
  quickbooks_online: QBO_ENTITIES,
4437
4325
  salesforce: SALESFORCE_ENTITIES,
4438
4326
  hubspot: HUBSPOT_ENTITIES,
4439
4327
  shopify: SHOPIFY_ENTITIES,
4440
4328
  google_sheets: GOOGLE_SHEETS_ENTITIES,
4441
- whatsapp: WHATSAPP_ENTITIES
4329
+ whatsapp: WHATSAPP_ENTITIES,
4330
+ dropbox: DROPBOX_ENTITIES
4442
4331
  };
4443
4332
  function getEntitiesForConnector(connectorId) {
4444
4333
  return CONNECTOR_EVENT_ENTITIES[connectorId] ?? [];
@@ -4508,6 +4397,7 @@ var ConnectorTriggerConfig = {
4508
4397
  sheetFileLabel: { type: "string", required: false, description: "Google Sheets: spreadsheet name" },
4509
4398
  sheetName: { type: "string", required: false, description: "Google Sheets: tab name" },
4510
4399
  sheetKeyColumn: { type: "string", required: false, description: "Google Sheets: row key column" },
4400
+ folderPath: { type: "string", required: false, description: "Dropbox: folder watched, recursively, e.g. /Invoices (empty = the whole Dropbox)" },
4511
4401
  description: { type: "string", required: false, description: "Added to the trigger output when set" }
4512
4402
  },
4513
4403
  validate: (config) => {
@@ -4669,50 +4559,6 @@ var ExcelActionConfig = {
4669
4559
  merge: (userConfig) => ({ ...ExcelActionConfig.defaults, ...userConfig }),
4670
4560
  getLabel: (config) => `Excel: ${config.operation || "parse"}`
4671
4561
  };
4672
- // src/catalog/storage/file-action/config.ts
4673
- var FILE_ACTION_MODES = ["parse", "generate", "convert", "edit"];
4674
- var FILE_ACTION_SOURCES = ["inline", "s3", "url", "previous_step", "upload"];
4675
- var FILE_ACTION_FORMATS = ["auto", "csv", "tsv", "json", "jsonl", "xml", "excel"];
4676
- var FILE_ACTION_OUTPUT_FORMATS = ["csv", "json", "excel", "xml", "tsv"];
4677
- var FileActionConfig = {
4678
- defaults: {
4679
- mode: "parse",
4680
- source: "inline",
4681
- format: "auto"
4682
- },
4683
- schema: {
4684
- ...FILE_EDIT_SCHEMA,
4685
- mode: { type: "select", required: true, options: FILE_ACTION_MODES, description: "parse, generate, convert or edit" },
4686
- operation: { type: "select", required: false, options: FILE_ACTION_MODES, description: "Alias of mode; read first when both are set" },
4687
- source: { type: "select", required: false, options: FILE_ACTION_SOURCES, description: "Where the file comes from (inline by default)" },
4688
- format: { type: "select", required: false, options: FILE_ACTION_FORMATS, description: "File format; auto-detected from the name, then the content" },
4689
- inlineContent: { type: "text", required: false, description: 'source "inline": the text (base64 for Excel)' },
4690
- content: { type: "text", required: false, description: "Alias of inlineContent" },
4691
- outputFormat: { type: "select", required: false, options: FILE_ACTION_OUTPUT_FORMATS, description: "generate / convert: format to write" },
4692
- outputFileName: { type: "string", required: false, description: "generate / convert: name of the produced file" },
4693
- fileName: { type: "string", required: false, description: "Name used to detect the format" },
4694
- encoding: { type: "string", required: false },
4695
- delimiter: { type: "string", required: false, description: "CSV / TSV delimiter" },
4696
- headerRow: { type: "number", required: false, min: 1 },
4697
- rowElement: { type: "string", required: false, description: "XML element that holds one record" },
4698
- sheetName: { type: "string", required: false, description: "Excel sheet to read" },
4699
- includeHeader: { type: "boolean", required: false },
4700
- options: { type: "json", required: false, description: "Parser options read ahead of the top-level keys" }
4701
- },
4702
- validate: (config) => {
4703
- const errors = [];
4704
- const mode = config.operation || config.mode;
4705
- if (mode !== undefined && mode !== "" && !FILE_ACTION_MODES.includes(mode)) {
4706
- errors.push(`Unknown mode "${mode}" — use parse, generate, convert or edit`);
4707
- }
4708
- if (config.source === "upload")
4709
- errors.push('source "upload" is not supported at run time');
4710
- errors.push(...fileEditErrors({ ...config, operation: mode, source: undefined }));
4711
- return { valid: errors.length === 0, errors };
4712
- },
4713
- merge: (userConfig) => ({ ...FileActionConfig.defaults, ...userConfig }),
4714
- getLabel: (config) => `File: ${config.operation || config.mode || "parse"}`
4715
- };
4716
4562
  // src/catalog/storage/storage-action/config.ts
4717
4563
  var FIXED_SCHEMA = {
4718
4564
  connector: { type: "connection", required: true, description: "Storage connector instance; its provider decides the operations" },
@@ -5503,36 +5349,6 @@ var HTTPRequestConfig = {
5503
5349
  }
5504
5350
  };
5505
5351
 
5506
- // src/catalog/api/graphql-query/config.ts
5507
- var GraphQLQueryConfig = {
5508
- defaults: {
5509
- endpoint: "",
5510
- query: "",
5511
- variables: {},
5512
- headers: {}
5513
- },
5514
- schema: {
5515
- endpoint: { type: "url", required: true },
5516
- query: { type: "code", required: true },
5517
- variables: { type: "json", required: false },
5518
- headers: { type: "json", required: false }
5519
- },
5520
- validate: (config) => {
5521
- const errors = [];
5522
- if (!config.endpoint)
5523
- errors.push("Endpoint is required");
5524
- if (!config.query)
5525
- errors.push("Query is required");
5526
- return { valid: errors.length === 0, errors };
5527
- },
5528
- merge: (userConfig) => {
5529
- return { ...GraphQLQueryConfig.defaults, ...userConfig };
5530
- },
5531
- getLabel: (config) => {
5532
- return `GraphQL: ${config.endpoint}`;
5533
- }
5534
- };
5535
-
5536
5352
  // src/catalog/communication/google-chat/config.ts
5537
5353
  var GoogleChatConfig = {
5538
5354
  defaults: { connection: "", space: "", spaceName: "", text: "", threadKey: "" },
@@ -5688,68 +5504,6 @@ var WhatsappSendConfig = {
5688
5504
  getLabel: (config) => config.mode === "text" ? `WhatsApp to ${config.to || "—"}` : `WhatsApp template "${config.templateName || "—"}" to ${config.to || "—"}`
5689
5505
  };
5690
5506
 
5691
- // src/catalog/storage/file-operation/config.ts
5692
- var FileOperationConfig = {
5693
- defaults: {
5694
- connection: "",
5695
- operation: "upload",
5696
- sourcePath: "",
5697
- destinationPath: "",
5698
- fileContent: "",
5699
- options: {}
5700
- },
5701
- schema: {
5702
- connection: { type: "connection", required: true },
5703
- operation: { type: "select", required: true, options: ["upload", "download", "delete", "list", "copy", "move", "exists"] },
5704
- sourcePath: { type: "string", required: false },
5705
- destinationPath: { type: "string", required: true },
5706
- fileContent: { type: "string", required: false },
5707
- options: { type: "json", required: false }
5708
- },
5709
- validate: (config) => {
5710
- const errors = [];
5711
- if (!config.connection)
5712
- errors.push("Storage connection is required");
5713
- if (!config.operation)
5714
- errors.push("Operation is required");
5715
- if (!config.destinationPath)
5716
- errors.push("Destination path is required");
5717
- if (config.operation === "upload" || config.operation === "copy" || config.operation === "move") {
5718
- if (!config.sourcePath) {
5719
- errors.push("Source path is required for upload/copy/move operations");
5720
- }
5721
- }
5722
- return { valid: errors.length === 0, errors };
5723
- },
5724
- merge: (userConfig) => {
5725
- return { ...FileOperationConfig.defaults, ...userConfig };
5726
- },
5727
- getLabel: (config) => {
5728
- return `${config.operation.toUpperCase()}: ${config.destinationPath}`;
5729
- }
5730
- };
5731
-
5732
- // src/catalog/transforms/format/config.ts
5733
- var FormatConfig = {
5734
- defaults: { input: "", format: "json" },
5735
- schema: {
5736
- input: { type: "expression", required: true },
5737
- format: { type: "select", required: true, options: ["json", "csv", "xml", "yaml"] }
5738
- },
5739
- validate: (config) => {
5740
- const errors = [];
5741
- if (!config.input)
5742
- errors.push("Input required");
5743
- if (!config.format)
5744
- errors.push("Format required");
5745
- return { valid: errors.length === 0, errors };
5746
- },
5747
- merge: (userConfig) => {
5748
- return { ...FormatConfig.defaults, ...userConfig };
5749
- },
5750
- getLabel: (config) => `Format as ${config.format.toUpperCase()}`
5751
- };
5752
-
5753
5507
  // src/catalog/triggers/schedule-trigger/config.ts
5754
5508
  var ScheduleTriggerConfig = {
5755
5509
  defaults: {
@@ -5817,37 +5571,12 @@ var WebhookTriggerConfig = {
5817
5571
  }
5818
5572
  };
5819
5573
 
5820
- // src/catalog/utility/error/config.ts
5821
- var ErrorConfig = {
5822
- defaults: {
5823
- message: "",
5824
- code: undefined
5825
- },
5826
- schema: {
5827
- message: { type: "string", required: true },
5828
- code: { type: "string", required: false }
5829
- },
5830
- validate: (config) => {
5831
- const errors = [];
5832
- if (!config.message)
5833
- errors.push("Error message is required");
5834
- return { valid: errors.length === 0, errors };
5835
- },
5836
- merge: (userConfig) => {
5837
- return { ...ErrorConfig.defaults, ...userConfig };
5838
- },
5839
- getLabel: (config) => {
5840
- return `Error: ${config.message}`;
5841
- }
5842
- };
5843
-
5844
5574
  // src/rules/configContracts.ts
5845
5575
  var asValidator = (fn) => (config) => fn(config);
5846
5576
  var CONFIG_CONTRACTS = {
5847
5577
  console_log: { schema: ConsoleLogConfig.schema, validate: asValidator(ConsoleLogConfig.validate) },
5848
5578
  delay: { schema: DelayConfig.schema, validate: asValidator(DelayConfig.validate) },
5849
5579
  http_request: { schema: HTTPRequestConfig.schema, validate: asValidator(HTTPRequestConfig.validate) },
5850
- graphql_query: { schema: GraphQLQueryConfig.schema, validate: asValidator(GraphQLQueryConfig.validate) },
5851
5580
  email: { schema: EmailConfig.schema, validate: asValidator(EmailConfig.validate) },
5852
5581
  google_chat: { schema: GoogleChatConfig.schema, validate: asValidator(GoogleChatConfig.validate) },
5853
5582
  slack_message: { schema: SlackMessageConfig.schema, validate: asValidator(SlackMessageConfig.validate) },
@@ -5866,13 +5595,10 @@ var CONFIG_CONTRACTS = {
5866
5595
  aggregate: { schema: AggregateConfig.schema, validate: asValidator(AggregateConfig.validate) },
5867
5596
  condition: { schema: ConditionConfig.schema, validate: asValidator(ConditionConfig.validate) },
5868
5597
  for_each: { schema: ForEachConfig.schema, validate: asValidator(ForEachConfig.validate) },
5869
- file_operation: { schema: FileOperationConfig.schema, validate: asValidator(FileOperationConfig.validate) },
5870
- format: { schema: FormatConfig.schema, validate: asValidator(FormatConfig.validate) },
5871
5598
  manual_trigger: { schema: ManualTriggerConfig.schema, validate: asValidator(ManualTriggerConfig.validate) },
5872
5599
  schedule_trigger: { schema: ScheduleTriggerConfig.schema, validate: asValidator(ScheduleTriggerConfig.validate) },
5873
5600
  webhook_trigger: { schema: WebhookTriggerConfig.schema, validate: asValidator(WebhookTriggerConfig.validate) },
5874
5601
  debug: { schema: DebugConfig.schema, validate: asValidator(DebugConfig.validate) },
5875
- error: { schema: ErrorConfig.schema, validate: asValidator(ErrorConfig.validate) },
5876
5602
  variables: { schema: VariablesConfig.schema, validate: asValidator(VariablesConfig.validate) },
5877
5603
  ai_agent: { schema: AiAgentConfig.schema, validate: asValidator(AiAgentConfig.validate) },
5878
5604
  idp_extract: { schema: IdpExtractConfig.schema, validate: asValidator(IdpExtractConfig.validate) },
@@ -5882,7 +5608,6 @@ var CONFIG_CONTRACTS = {
5882
5608
  json_action: { schema: JsonActionConfig.schema, validate: asValidator(JsonActionConfig.validate) },
5883
5609
  xml_action: { schema: XmlActionConfig.schema, validate: asValidator(XmlActionConfig.validate) },
5884
5610
  excel_action: { schema: ExcelActionConfig.schema, validate: asValidator(ExcelActionConfig.validate) },
5885
- file_action: { schema: FileActionConfig.schema, validate: asValidator(FileActionConfig.validate) },
5886
5611
  storage_action: { schema: StorageActionConfig.schema, validate: asValidator(StorageActionConfig.validate) },
5887
5612
  s3_action: { schema: S3ActionConfig.schema, validate: asValidator(S3ActionConfig.validate) },
5888
5613
  ftp_action: { schema: FtpActionConfig.schema, validate: asValidator(FtpActionConfig.validate) },
@@ -6237,10 +5962,6 @@ export {
6237
5962
  EdgeType,
6238
5963
  EmailConfig,
6239
5964
  ExcelActionConfig,
6240
- FILE_ACTION_FORMATS,
6241
- FILE_ACTION_MODES,
6242
- FILE_ACTION_OUTPUT_FORMATS,
6243
- FILE_ACTION_SOURCES,
6244
5965
  FILE_EDIT_DESTINATIONS,
6245
5966
  FILE_EDIT_MATCH_OPS,
6246
5967
  FILE_EDIT_OPERATIONS,
@@ -6249,7 +5970,6 @@ export {
6249
5970
  FILE_FORMAT_OPERATIONS,
6250
5971
  FTP_OPERATIONS,
6251
5972
  FieldType,
6252
- FileActionConfig,
6253
5973
  ForEachConfig,
6254
5974
  FtpActionConfig,
6255
5975
  GOOGLE_DRIVE_OPERATIONS,
@@ -73,7 +73,9 @@ export interface ConfigContract {
73
73
  * Every action in the catalog, keyed by action id — since 0.11.0 all
74
74
  * definitions carry one (the last fifteen: group, ai_agent, idp_extract,
75
75
  * connector_trigger, the five file-format actions and the six storage
76
- * actions; 0.13.0 added `aggregate`, the 38th). `contractFor` is undefined only for an id the catalog does not
76
+ * actions; 0.13.0 added `aggregate`). 0.14.0 dropped the five that had a
77
+ * definition on disk but were never offered (graphql_query, format, error,
78
+ * file_operation, file_action) — 33 now, one per registered action. `contractFor` is undefined only for an id the catalog does not
77
79
  * know, and then consumers fall back to `inputSchema` alone. A new action is
78
80
  * a `config.ts` plus one line here; the drift test covers it from then on.
79
81
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octaviaflow/flow-rules",
3
- "version": "0.13.2",
3
+ "version": "0.15.0",
4
4
  "description": "The flow action catalog and the rules engine behind Flow Doctor — one definition of what a step accepts and what makes a flow valid, shared by the editor and the server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,36 +0,0 @@
1
- /**
2
- * GraphQL Query Configuration
3
- */
4
- export interface GraphQLQueryConfigType {
5
- endpoint: string;
6
- query: string;
7
- variables?: Record<string, unknown>;
8
- headers?: Record<string, string>;
9
- }
10
- export declare const GraphQLQueryConfig: {
11
- defaults: GraphQLQueryConfigType;
12
- schema: {
13
- endpoint: {
14
- type: string;
15
- required: boolean;
16
- };
17
- query: {
18
- type: string;
19
- required: boolean;
20
- };
21
- variables: {
22
- type: string;
23
- required: boolean;
24
- };
25
- headers: {
26
- type: string;
27
- required: boolean;
28
- };
29
- };
30
- validate: (config: Partial<GraphQLQueryConfigType>) => {
31
- valid: boolean;
32
- errors: string[];
33
- };
34
- merge: (userConfig: Partial<GraphQLQueryConfigType>) => GraphQLQueryConfigType;
35
- getLabel: (config: GraphQLQueryConfigType) => string;
36
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * GraphQL Query Action
3
- *
4
- * Execute GraphQL queries against GraphQL endpoints
5
- */
6
- import { ActionDefinition } from '../../types';
7
- export declare const graphqlQueryDefinition: ActionDefinition;