@epilot/erp-integration-client 0.24.3 → 0.26.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/.claude/settings.local.json +7 -0
- package/dist/openapi.d.ts +97 -46
- package/dist/openapi.json +552 -591
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "ERP Integration API",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.41.0",
|
|
6
6
|
"description": "API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -2526,31 +2526,18 @@
|
|
|
2526
2526
|
}
|
|
2527
2527
|
}
|
|
2528
2528
|
},
|
|
2529
|
-
"
|
|
2529
|
+
"IntegrationEditableFields": {
|
|
2530
2530
|
"type": "object",
|
|
2531
|
-
"required": [
|
|
2532
|
-
"id",
|
|
2533
|
-
"orgId",
|
|
2534
|
-
"name",
|
|
2535
|
-
"created_at",
|
|
2536
|
-
"updated_at"
|
|
2537
|
-
],
|
|
2538
2531
|
"properties": {
|
|
2539
|
-
"id": {
|
|
2540
|
-
"type": "string",
|
|
2541
|
-
"format": "uuid",
|
|
2542
|
-
"description": "Unique identifier for the integration"
|
|
2543
|
-
},
|
|
2544
|
-
"orgId": {
|
|
2545
|
-
"type": "string",
|
|
2546
|
-
"description": "Organization ID"
|
|
2547
|
-
},
|
|
2548
2532
|
"name": {
|
|
2549
2533
|
"type": "string",
|
|
2534
|
+
"minLength": 1,
|
|
2535
|
+
"maxLength": 255,
|
|
2550
2536
|
"description": "Integration name"
|
|
2551
2537
|
},
|
|
2552
2538
|
"description": {
|
|
2553
2539
|
"type": "string",
|
|
2540
|
+
"maxLength": 1000,
|
|
2554
2541
|
"description": "Optional description of the integration"
|
|
2555
2542
|
},
|
|
2556
2543
|
"access_token_ids": {
|
|
@@ -2576,101 +2563,66 @@
|
|
|
2576
2563
|
},
|
|
2577
2564
|
"settings": {
|
|
2578
2565
|
"$ref": "#/components/schemas/IntegrationSettings"
|
|
2579
|
-
},
|
|
2580
|
-
"created_at": {
|
|
2581
|
-
"type": "string",
|
|
2582
|
-
"format": "date-time",
|
|
2583
|
-
"description": "ISO-8601 timestamp when the integration was created"
|
|
2584
|
-
},
|
|
2585
|
-
"updated_at": {
|
|
2586
|
-
"type": "string",
|
|
2587
|
-
"format": "date-time",
|
|
2588
|
-
"description": "ISO-8601 timestamp when the integration was last updated"
|
|
2589
2566
|
}
|
|
2590
2567
|
}
|
|
2591
2568
|
},
|
|
2592
|
-
"
|
|
2593
|
-
"
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2569
|
+
"Integration": {
|
|
2570
|
+
"allOf": [
|
|
2571
|
+
{
|
|
2572
|
+
"type": "object",
|
|
2573
|
+
"required": [
|
|
2574
|
+
"id",
|
|
2575
|
+
"orgId",
|
|
2576
|
+
"name",
|
|
2577
|
+
"created_at",
|
|
2578
|
+
"updated_at"
|
|
2579
|
+
],
|
|
2580
|
+
"properties": {
|
|
2581
|
+
"id": {
|
|
2582
|
+
"type": "string",
|
|
2583
|
+
"format": "uuid",
|
|
2584
|
+
"readOnly": true,
|
|
2585
|
+
"description": "Unique identifier for the integration"
|
|
2586
|
+
},
|
|
2587
|
+
"orgId": {
|
|
2588
|
+
"type": "string",
|
|
2589
|
+
"readOnly": true,
|
|
2590
|
+
"description": "Organization ID"
|
|
2591
|
+
},
|
|
2592
|
+
"created_at": {
|
|
2593
|
+
"type": "string",
|
|
2594
|
+
"format": "date-time",
|
|
2595
|
+
"readOnly": true,
|
|
2596
|
+
"description": "ISO-8601 timestamp when the integration was created"
|
|
2597
|
+
},
|
|
2598
|
+
"updated_at": {
|
|
2599
|
+
"type": "string",
|
|
2600
|
+
"format": "date-time",
|
|
2601
|
+
"readOnly": true,
|
|
2602
|
+
"description": "ISO-8601 timestamp when the integration was last updated"
|
|
2603
|
+
}
|
|
2621
2604
|
}
|
|
2622
2605
|
},
|
|
2623
|
-
|
|
2624
|
-
"
|
|
2625
|
-
"items": {
|
|
2626
|
-
"$ref": "#/components/schemas/EnvironmentFieldConfig"
|
|
2627
|
-
},
|
|
2628
|
-
"description": "Configuration defining environment variables needed by this integration"
|
|
2629
|
-
},
|
|
2630
|
-
"settings": {
|
|
2631
|
-
"$ref": "#/components/schemas/IntegrationSettings"
|
|
2606
|
+
{
|
|
2607
|
+
"$ref": "#/components/schemas/IntegrationEditableFields"
|
|
2632
2608
|
}
|
|
2633
|
-
|
|
2609
|
+
]
|
|
2634
2610
|
},
|
|
2635
|
-
"
|
|
2636
|
-
"
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
"type": "string",
|
|
2640
|
-
"minLength": 1,
|
|
2641
|
-
"maxLength": 255,
|
|
2642
|
-
"description": "Integration name"
|
|
2643
|
-
},
|
|
2644
|
-
"description": {
|
|
2645
|
-
"type": "string",
|
|
2646
|
-
"maxLength": 1000,
|
|
2647
|
-
"description": "Optional description of the integration"
|
|
2648
|
-
},
|
|
2649
|
-
"access_token_ids": {
|
|
2650
|
-
"type": "array",
|
|
2651
|
-
"description": "List of access token IDs to associate with this integration",
|
|
2652
|
-
"items": {
|
|
2653
|
-
"type": "string"
|
|
2654
|
-
}
|
|
2655
|
-
},
|
|
2656
|
-
"app_ids": {
|
|
2657
|
-
"type": "array",
|
|
2658
|
-
"description": "List of app IDs to associate with this integration",
|
|
2659
|
-
"items": {
|
|
2660
|
-
"type": "string"
|
|
2661
|
-
}
|
|
2662
|
-
},
|
|
2663
|
-
"environment_config": {
|
|
2664
|
-
"type": "array",
|
|
2665
|
-
"items": {
|
|
2666
|
-
"$ref": "#/components/schemas/EnvironmentFieldConfig"
|
|
2667
|
-
},
|
|
2668
|
-
"description": "Configuration defining environment variables needed by this integration"
|
|
2611
|
+
"CreateIntegrationRequest": {
|
|
2612
|
+
"allOf": [
|
|
2613
|
+
{
|
|
2614
|
+
"$ref": "#/components/schemas/IntegrationEditableFields"
|
|
2669
2615
|
},
|
|
2670
|
-
|
|
2671
|
-
"
|
|
2616
|
+
{
|
|
2617
|
+
"type": "object",
|
|
2618
|
+
"required": [
|
|
2619
|
+
"name"
|
|
2620
|
+
]
|
|
2672
2621
|
}
|
|
2673
|
-
|
|
2622
|
+
]
|
|
2623
|
+
},
|
|
2624
|
+
"UpdateIntegrationRequest": {
|
|
2625
|
+
"$ref": "#/components/schemas/IntegrationEditableFields"
|
|
2674
2626
|
},
|
|
2675
2627
|
"EnvironmentFieldConfig": {
|
|
2676
2628
|
"type": "object",
|
|
@@ -2738,11 +2690,6 @@
|
|
|
2738
2690
|
"type": "integer",
|
|
2739
2691
|
"minimum": 1,
|
|
2740
2692
|
"description": "Maximum age (in minutes) of data before it is considered stale and eligible for refresh"
|
|
2741
|
-
},
|
|
2742
|
-
"minIntervalBetweenSyncsMinutes": {
|
|
2743
|
-
"type": "integer",
|
|
2744
|
-
"minimum": 1,
|
|
2745
|
-
"description": "Minimum interval (in minutes) between consecutive sync operations to prevent excessive API calls"
|
|
2746
2693
|
}
|
|
2747
2694
|
}
|
|
2748
2695
|
},
|
|
@@ -2800,7 +2747,466 @@
|
|
|
2800
2747
|
"format": "uuid",
|
|
2801
2748
|
"description": "The integration ID this app/component is mapped to"
|
|
2802
2749
|
}
|
|
2803
|
-
}
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
"IntegrationWithUseCases": {
|
|
2753
|
+
"allOf": [
|
|
2754
|
+
{
|
|
2755
|
+
"$ref": "#/components/schemas/Integration"
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
"type": "object",
|
|
2759
|
+
"description": "Integration with embedded use cases for atomic CRUD operations",
|
|
2760
|
+
"required": [
|
|
2761
|
+
"use_cases"
|
|
2762
|
+
],
|
|
2763
|
+
"properties": {
|
|
2764
|
+
"use_cases": {
|
|
2765
|
+
"type": "array",
|
|
2766
|
+
"description": "All use cases belonging to this integration",
|
|
2767
|
+
"items": {
|
|
2768
|
+
"$ref": "#/components/schemas/UseCase"
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
]
|
|
2774
|
+
},
|
|
2775
|
+
"UpsertIntegrationWithUseCasesRequest": {
|
|
2776
|
+
"allOf": [
|
|
2777
|
+
{
|
|
2778
|
+
"$ref": "#/components/schemas/IntegrationEditableFields"
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
"type": "object",
|
|
2782
|
+
"description": "Request to create or update an integration with embedded use cases (upsert).\nThis is a declarative operation - the request represents the desired state.\n",
|
|
2783
|
+
"required": [
|
|
2784
|
+
"name"
|
|
2785
|
+
],
|
|
2786
|
+
"properties": {
|
|
2787
|
+
"use_cases": {
|
|
2788
|
+
"type": "array",
|
|
2789
|
+
"description": "Full list of use cases (declarative). This replaces ALL existing use cases.\n- Use cases with an `id` field matching an existing use case will be updated\n- Use cases without an `id` or with a non-matching `id` will be created\n- Existing use cases not in this list will be deleted\n",
|
|
2790
|
+
"items": {
|
|
2791
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequest"
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
]
|
|
2797
|
+
},
|
|
2798
|
+
"InboundIntegrationEventConfiguration": {
|
|
2799
|
+
"type": "object",
|
|
2800
|
+
"description": "Configuration for inbound use cases (ERP to epilot)",
|
|
2801
|
+
"properties": {
|
|
2802
|
+
"entities": {
|
|
2803
|
+
"type": "array",
|
|
2804
|
+
"description": "Array of entity configurations for this event",
|
|
2805
|
+
"items": {
|
|
2806
|
+
"$ref": "#/components/schemas/IntegrationEntity"
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2809
|
+
"meter_readings": {
|
|
2810
|
+
"type": "array",
|
|
2811
|
+
"description": "Array of meter reading configurations for this event",
|
|
2812
|
+
"items": {
|
|
2813
|
+
"$ref": "#/components/schemas/IntegrationMeterReading"
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
},
|
|
2818
|
+
"OutboundIntegrationEventConfiguration": {
|
|
2819
|
+
"type": "object",
|
|
2820
|
+
"required": [
|
|
2821
|
+
"event_catalog_event",
|
|
2822
|
+
"mappings"
|
|
2823
|
+
],
|
|
2824
|
+
"description": "Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings.",
|
|
2825
|
+
"properties": {
|
|
2826
|
+
"event_catalog_event": {
|
|
2827
|
+
"type": "string",
|
|
2828
|
+
"description": "The Event Catalog event name that triggers this outbound flow",
|
|
2829
|
+
"example": "contract.created"
|
|
2830
|
+
},
|
|
2831
|
+
"mappings": {
|
|
2832
|
+
"type": "array",
|
|
2833
|
+
"minItems": 1,
|
|
2834
|
+
"items": {
|
|
2835
|
+
"$ref": "#/components/schemas/OutboundMapping"
|
|
2836
|
+
},
|
|
2837
|
+
"description": "List of mappings that transform and deliver the event"
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
},
|
|
2841
|
+
"IntegrationEntity": {
|
|
2842
|
+
"type": "object",
|
|
2843
|
+
"required": [
|
|
2844
|
+
"entity_schema",
|
|
2845
|
+
"unique_ids",
|
|
2846
|
+
"fields"
|
|
2847
|
+
],
|
|
2848
|
+
"properties": {
|
|
2849
|
+
"entity_schema": {
|
|
2850
|
+
"type": "string",
|
|
2851
|
+
"description": "Target entity schema (e.g., 'contact', 'contract')"
|
|
2852
|
+
},
|
|
2853
|
+
"unique_ids": {
|
|
2854
|
+
"type": "array",
|
|
2855
|
+
"items": {
|
|
2856
|
+
"type": "string"
|
|
2857
|
+
},
|
|
2858
|
+
"description": "Array of attribute names that uniquely identify this entity.\nThe _type hint for repeatable fields (e.g., email, phone) should be specified\non the corresponding field definition in the fields array.\n"
|
|
2859
|
+
},
|
|
2860
|
+
"jsonataExpression": {
|
|
2861
|
+
"type": "string",
|
|
2862
|
+
"description": "Optional JSONata expression to pre-process the event data before field mapping"
|
|
2863
|
+
},
|
|
2864
|
+
"enabled": {
|
|
2865
|
+
"oneOf": [
|
|
2866
|
+
{
|
|
2867
|
+
"type": "boolean"
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"type": "string"
|
|
2871
|
+
}
|
|
2872
|
+
],
|
|
2873
|
+
"description": "Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean."
|
|
2874
|
+
},
|
|
2875
|
+
"mode": {
|
|
2876
|
+
"type": "string",
|
|
2877
|
+
"enum": [
|
|
2878
|
+
"upsert",
|
|
2879
|
+
"delete",
|
|
2880
|
+
"purge",
|
|
2881
|
+
"upsert-prune-scope-purge",
|
|
2882
|
+
"upsert-prune-scope-delete"
|
|
2883
|
+
],
|
|
2884
|
+
"default": "upsert",
|
|
2885
|
+
"description": "Operation mode for entity mapping:\n- 'upsert': Create or update the entity (default)\n- 'delete': Soft delete the entity (marks as deleted)\n- 'purge': Hard delete the entity (permanent removal)\n- 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted\n- 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted\n"
|
|
2886
|
+
},
|
|
2887
|
+
"scope": {
|
|
2888
|
+
"$ref": "#/components/schemas/PruneScopeConfig"
|
|
2889
|
+
},
|
|
2890
|
+
"fields": {
|
|
2891
|
+
"type": "array",
|
|
2892
|
+
"description": "Field mapping definitions",
|
|
2893
|
+
"items": {
|
|
2894
|
+
"$ref": "#/components/schemas/IntegrationEntityField"
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
},
|
|
2899
|
+
"IntegrationMeterReading": {
|
|
2900
|
+
"type": "object",
|
|
2901
|
+
"required": [
|
|
2902
|
+
"meter",
|
|
2903
|
+
"fields"
|
|
2904
|
+
],
|
|
2905
|
+
"properties": {
|
|
2906
|
+
"jsonataExpression": {
|
|
2907
|
+
"type": "string",
|
|
2908
|
+
"description": "Optional JSONata expression to extract meter reading items from the event data.\nIf not provided, the entire payload is used as the reading data.\nUseful when you need to extract an array of readings from a nested structure (e.g., \"$.readings\").\n"
|
|
2909
|
+
},
|
|
2910
|
+
"reading_matching": {
|
|
2911
|
+
"type": "string",
|
|
2912
|
+
"enum": [
|
|
2913
|
+
"external_id",
|
|
2914
|
+
"strict-date"
|
|
2915
|
+
],
|
|
2916
|
+
"default": "external_id",
|
|
2917
|
+
"description": "Strategy for matching incoming readings against existing readings.\n- 'external_id': Match readings by external_id attribute (default behavior)\n- 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).\n Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.\n"
|
|
2918
|
+
},
|
|
2919
|
+
"mode": {
|
|
2920
|
+
"type": "string",
|
|
2921
|
+
"enum": [
|
|
2922
|
+
"upsert",
|
|
2923
|
+
"delete",
|
|
2924
|
+
"upsert-prune-scope"
|
|
2925
|
+
],
|
|
2926
|
+
"default": "upsert",
|
|
2927
|
+
"description": "Operation mode for meter reading mapping:\n- 'upsert': Create or update meter readings (default)\n- 'delete': Delete the meter reading\n- 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted\n"
|
|
2928
|
+
},
|
|
2929
|
+
"scope": {
|
|
2930
|
+
"$ref": "#/components/schemas/MeterReadingPruneScopeConfig"
|
|
2931
|
+
},
|
|
2932
|
+
"meter": {
|
|
2933
|
+
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
2934
|
+
},
|
|
2935
|
+
"meter_counter": {
|
|
2936
|
+
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
2937
|
+
},
|
|
2938
|
+
"fields": {
|
|
2939
|
+
"type": "array",
|
|
2940
|
+
"description": "Field mapping definitions for meter reading attributes",
|
|
2941
|
+
"items": {
|
|
2942
|
+
"$ref": "#/components/schemas/IntegrationEntityField"
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
},
|
|
2947
|
+
"PruneScopeConfig": {
|
|
2948
|
+
"type": "object",
|
|
2949
|
+
"description": "Scope configuration for upsert-prune-scope modes.\nDefines how to find entities that should be pruned if not in the upsert payload.\nThe scope is resolved against the original event payload (not individual array items).\n",
|
|
2950
|
+
"required": [
|
|
2951
|
+
"scope_mode"
|
|
2952
|
+
],
|
|
2953
|
+
"properties": {
|
|
2954
|
+
"scope_mode": {
|
|
2955
|
+
"type": "string",
|
|
2956
|
+
"enum": [
|
|
2957
|
+
"relations",
|
|
2958
|
+
"query"
|
|
2959
|
+
],
|
|
2960
|
+
"description": "Scope mode for finding entities to prune:\n- 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations)\n- 'query': Find scope entities directly via query parameters\n"
|
|
2961
|
+
},
|
|
2962
|
+
"schema": {
|
|
2963
|
+
"type": "string",
|
|
2964
|
+
"description": "For 'relations' mode: The schema of the entity to find (e.g., 'billing_account').\nNot used for 'query' mode.\n"
|
|
2965
|
+
},
|
|
2966
|
+
"unique_ids": {
|
|
2967
|
+
"type": "array",
|
|
2968
|
+
"description": "For 'relations' mode: How to identify the scope entity from the payload.\nNot used for 'query' mode.\n",
|
|
2969
|
+
"items": {
|
|
2970
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
2971
|
+
}
|
|
2972
|
+
},
|
|
2973
|
+
"query": {
|
|
2974
|
+
"type": "array",
|
|
2975
|
+
"description": "For 'query' mode: Direct query parameters to find scope entities.\nNot used for 'relations' or 'reverse-relations' modes.\n",
|
|
2976
|
+
"items": {
|
|
2977
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
},
|
|
2982
|
+
"MeterReadingPruneScopeConfig": {
|
|
2983
|
+
"type": "object",
|
|
2984
|
+
"description": "Scope configuration for meter reading upsert-prune-scope mode.\nThe scope is all readings for the same meter + counter.\n",
|
|
2985
|
+
"properties": {
|
|
2986
|
+
"source": {
|
|
2987
|
+
"type": "string",
|
|
2988
|
+
"description": "Optional source filter. When set, only readings with this source\nare eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings).\n"
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
"MeterUniqueIdsConfig": {
|
|
2993
|
+
"type": "object",
|
|
2994
|
+
"required": [
|
|
2995
|
+
"unique_ids"
|
|
2996
|
+
],
|
|
2997
|
+
"properties": {
|
|
2998
|
+
"unique_ids": {
|
|
2999
|
+
"type": "array",
|
|
3000
|
+
"minItems": 1,
|
|
3001
|
+
"description": "Array of unique identifier field mappings",
|
|
3002
|
+
"items": {
|
|
3003
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
},
|
|
3008
|
+
"IntegrationEntityField": {
|
|
3009
|
+
"type": "object",
|
|
3010
|
+
"required": [
|
|
3011
|
+
"attribute"
|
|
3012
|
+
],
|
|
3013
|
+
"properties": {
|
|
3014
|
+
"attribute": {
|
|
3015
|
+
"type": "string",
|
|
3016
|
+
"description": "Target attribute name"
|
|
3017
|
+
},
|
|
3018
|
+
"field": {
|
|
3019
|
+
"type": "string",
|
|
3020
|
+
"description": "Source field name or JSONPath expression (if starts with $)"
|
|
3021
|
+
},
|
|
3022
|
+
"jsonataExpression": {
|
|
3023
|
+
"type": "string",
|
|
3024
|
+
"description": "JSONata expression for transformation"
|
|
3025
|
+
},
|
|
3026
|
+
"constant": {
|
|
3027
|
+
"description": "Constant value to assign (any type)"
|
|
3028
|
+
},
|
|
3029
|
+
"_type": {
|
|
3030
|
+
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
3031
|
+
},
|
|
3032
|
+
"enabled": {
|
|
3033
|
+
"oneOf": [
|
|
3034
|
+
{
|
|
3035
|
+
"type": "boolean"
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"type": "string"
|
|
3039
|
+
}
|
|
3040
|
+
],
|
|
3041
|
+
"description": "Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted."
|
|
3042
|
+
},
|
|
3043
|
+
"relations": {
|
|
3044
|
+
"$ref": "#/components/schemas/RelationConfig"
|
|
3045
|
+
},
|
|
3046
|
+
"relation_refs": {
|
|
3047
|
+
"$ref": "#/components/schemas/RelationRefsConfig"
|
|
3048
|
+
},
|
|
3049
|
+
"file_proxy_url": {
|
|
3050
|
+
"$ref": "#/components/schemas/FileProxyUrlConfig"
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
},
|
|
3054
|
+
"FileProxyUrlParam": {
|
|
3055
|
+
"description": "Parameter for file proxy URL. Exactly one of field, constant, or jsonataExpression must be set.",
|
|
3056
|
+
"oneOf": [
|
|
3057
|
+
{
|
|
3058
|
+
"type": "object",
|
|
3059
|
+
"required": [
|
|
3060
|
+
"field"
|
|
3061
|
+
],
|
|
3062
|
+
"properties": {
|
|
3063
|
+
"field": {
|
|
3064
|
+
"type": "string",
|
|
3065
|
+
"description": "Source field name or JSONPath expression (if starts with $)"
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"type": "object",
|
|
3071
|
+
"required": [
|
|
3072
|
+
"constant"
|
|
3073
|
+
],
|
|
3074
|
+
"properties": {
|
|
3075
|
+
"constant": {
|
|
3076
|
+
"description": "Constant value (any type, stringified for URL)"
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"type": "object",
|
|
3082
|
+
"required": [
|
|
3083
|
+
"jsonataExpression"
|
|
3084
|
+
],
|
|
3085
|
+
"properties": {
|
|
3086
|
+
"jsonataExpression": {
|
|
3087
|
+
"type": "string",
|
|
3088
|
+
"description": "JSONata expression for transformation"
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
]
|
|
3093
|
+
},
|
|
3094
|
+
"FileProxyUrlConfig": {
|
|
3095
|
+
"type": "object",
|
|
3096
|
+
"required": [
|
|
3097
|
+
"use_case_id"
|
|
3098
|
+
],
|
|
3099
|
+
"description": "Auto-constructs a file proxy download URL. orgId and integrationId are injected from context.",
|
|
3100
|
+
"properties": {
|
|
3101
|
+
"use_case_id": {
|
|
3102
|
+
"type": "string",
|
|
3103
|
+
"description": "UUID of the file_proxy use case. Maps to useCaseId query parameter."
|
|
3104
|
+
},
|
|
3105
|
+
"params": {
|
|
3106
|
+
"type": "object",
|
|
3107
|
+
"description": "Custom query parameters. Keys become URL param names, values resolved from payload.",
|
|
3108
|
+
"additionalProperties": {
|
|
3109
|
+
"$ref": "#/components/schemas/FileProxyUrlParam"
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
"EmbeddedUseCaseRequest": {
|
|
3115
|
+
"oneOf": [
|
|
3116
|
+
{
|
|
3117
|
+
"$ref": "#/components/schemas/EmbeddedInboundUseCaseRequest"
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
"$ref": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
3121
|
+
}
|
|
3122
|
+
],
|
|
3123
|
+
"discriminator": {
|
|
3124
|
+
"propertyName": "type",
|
|
3125
|
+
"mapping": {
|
|
3126
|
+
"inbound": "#/components/schemas/EmbeddedInboundUseCaseRequest",
|
|
3127
|
+
"outbound": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
},
|
|
3131
|
+
"EmbeddedUseCaseRequestBase": {
|
|
3132
|
+
"type": "object",
|
|
3133
|
+
"required": [
|
|
3134
|
+
"name",
|
|
3135
|
+
"type",
|
|
3136
|
+
"enabled"
|
|
3137
|
+
],
|
|
3138
|
+
"properties": {
|
|
3139
|
+
"id": {
|
|
3140
|
+
"type": "string",
|
|
3141
|
+
"format": "uuid",
|
|
3142
|
+
"description": "Optional use case ID for update matching.\n- If provided and matches an existing use case, that use case is updated\n- If provided but no match, a new use case with this ID is created\n- If omitted, a new use case with auto-generated ID is created\n"
|
|
3143
|
+
},
|
|
3144
|
+
"name": {
|
|
3145
|
+
"type": "string",
|
|
3146
|
+
"minLength": 1,
|
|
3147
|
+
"maxLength": 255,
|
|
3148
|
+
"description": "Use case name"
|
|
3149
|
+
},
|
|
3150
|
+
"enabled": {
|
|
3151
|
+
"type": "boolean",
|
|
3152
|
+
"description": "Whether the use case is enabled"
|
|
3153
|
+
},
|
|
3154
|
+
"change_description": {
|
|
3155
|
+
"type": "string",
|
|
3156
|
+
"maxLength": 2000,
|
|
3157
|
+
"description": "Optional description of this change (like a commit message)"
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
},
|
|
3161
|
+
"EmbeddedInboundUseCaseRequest": {
|
|
3162
|
+
"allOf": [
|
|
3163
|
+
{
|
|
3164
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
3165
|
+
},
|
|
3166
|
+
{
|
|
3167
|
+
"type": "object",
|
|
3168
|
+
"required": [
|
|
3169
|
+
"type"
|
|
3170
|
+
],
|
|
3171
|
+
"properties": {
|
|
3172
|
+
"type": {
|
|
3173
|
+
"type": "string",
|
|
3174
|
+
"enum": [
|
|
3175
|
+
"inbound"
|
|
3176
|
+
],
|
|
3177
|
+
"description": "Use case type"
|
|
3178
|
+
},
|
|
3179
|
+
"configuration": {
|
|
3180
|
+
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
]
|
|
3185
|
+
},
|
|
3186
|
+
"EmbeddedOutboundUseCaseRequest": {
|
|
3187
|
+
"allOf": [
|
|
3188
|
+
{
|
|
3189
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
3190
|
+
},
|
|
3191
|
+
{
|
|
3192
|
+
"type": "object",
|
|
3193
|
+
"required": [
|
|
3194
|
+
"type"
|
|
3195
|
+
],
|
|
3196
|
+
"properties": {
|
|
3197
|
+
"type": {
|
|
3198
|
+
"type": "string",
|
|
3199
|
+
"enum": [
|
|
3200
|
+
"outbound"
|
|
3201
|
+
],
|
|
3202
|
+
"description": "Use case type"
|
|
3203
|
+
},
|
|
3204
|
+
"configuration": {
|
|
3205
|
+
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
]
|
|
2804
3210
|
},
|
|
2805
3211
|
"UseCaseBase": {
|
|
2806
3212
|
"type": "object",
|
|
@@ -3782,49 +4188,6 @@
|
|
|
3782
4188
|
}
|
|
3783
4189
|
}
|
|
3784
4190
|
},
|
|
3785
|
-
"InboundIntegrationEventConfiguration": {
|
|
3786
|
-
"type": "object",
|
|
3787
|
-
"description": "Configuration for inbound use cases (ERP to epilot)",
|
|
3788
|
-
"properties": {
|
|
3789
|
-
"entities": {
|
|
3790
|
-
"type": "array",
|
|
3791
|
-
"description": "Array of entity configurations for this event",
|
|
3792
|
-
"items": {
|
|
3793
|
-
"$ref": "#/components/schemas/IntegrationEntity"
|
|
3794
|
-
}
|
|
3795
|
-
},
|
|
3796
|
-
"meter_readings": {
|
|
3797
|
-
"type": "array",
|
|
3798
|
-
"description": "Array of meter reading configurations for this event",
|
|
3799
|
-
"items": {
|
|
3800
|
-
"$ref": "#/components/schemas/IntegrationMeterReading"
|
|
3801
|
-
}
|
|
3802
|
-
}
|
|
3803
|
-
}
|
|
3804
|
-
},
|
|
3805
|
-
"OutboundIntegrationEventConfiguration": {
|
|
3806
|
-
"type": "object",
|
|
3807
|
-
"required": [
|
|
3808
|
-
"event_catalog_event",
|
|
3809
|
-
"mappings"
|
|
3810
|
-
],
|
|
3811
|
-
"description": "Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings.",
|
|
3812
|
-
"properties": {
|
|
3813
|
-
"event_catalog_event": {
|
|
3814
|
-
"type": "string",
|
|
3815
|
-
"description": "The Event Catalog event name that triggers this outbound flow",
|
|
3816
|
-
"example": "contract.created"
|
|
3817
|
-
},
|
|
3818
|
-
"mappings": {
|
|
3819
|
-
"type": "array",
|
|
3820
|
-
"minItems": 1,
|
|
3821
|
-
"items": {
|
|
3822
|
-
"$ref": "#/components/schemas/OutboundMapping"
|
|
3823
|
-
},
|
|
3824
|
-
"description": "List of mappings that transform and deliver the event"
|
|
3825
|
-
}
|
|
3826
|
-
}
|
|
3827
|
-
},
|
|
3828
4191
|
"OutboundMapping": {
|
|
3829
4192
|
"type": "object",
|
|
3830
4193
|
"required": [
|
|
@@ -3957,274 +4320,64 @@
|
|
|
3957
4320
|
"enum": [
|
|
3958
4321
|
"ok",
|
|
3959
4322
|
"conflict",
|
|
3960
|
-
"disabled"
|
|
3961
|
-
],
|
|
3962
|
-
"description": "Overall status of the use case:\n- 'ok': Use case is enabled and all dependencies are properly configured\n- 'conflict': Use case has configuration issues (disabled events/webhooks while enabled)\n- 'disabled': Use case is disabled\n"
|
|
3963
|
-
},
|
|
3964
|
-
"conflicts": {
|
|
3965
|
-
"type": "array",
|
|
3966
|
-
"items": {
|
|
3967
|
-
"$ref": "#/components/schemas/OutboundConflict"
|
|
3968
|
-
},
|
|
3969
|
-
"description": "List of detected conflicts, if any"
|
|
3970
|
-
}
|
|
3971
|
-
}
|
|
3972
|
-
},
|
|
3973
|
-
"WebhookStatus": {
|
|
3974
|
-
"type": "object",
|
|
3975
|
-
"required": [
|
|
3976
|
-
"webhookId"
|
|
3977
|
-
],
|
|
3978
|
-
"properties": {
|
|
3979
|
-
"webhookId": {
|
|
3980
|
-
"type": "string",
|
|
3981
|
-
"description": "Unique identifier for the webhook"
|
|
3982
|
-
},
|
|
3983
|
-
"webhookName": {
|
|
3984
|
-
"type": "string",
|
|
3985
|
-
"description": "Human-readable name of the webhook"
|
|
3986
|
-
},
|
|
3987
|
-
"enabled": {
|
|
3988
|
-
"type": "boolean",
|
|
3989
|
-
"nullable": true,
|
|
3990
|
-
"description": "Whether the webhook is enabled. Null if the API is unreachable."
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3993
|
-
},
|
|
3994
|
-
"OutboundConflict": {
|
|
3995
|
-
"type": "object",
|
|
3996
|
-
"required": [
|
|
3997
|
-
"type",
|
|
3998
|
-
"message"
|
|
3999
|
-
],
|
|
4000
|
-
"properties": {
|
|
4001
|
-
"type": {
|
|
4002
|
-
"type": "string",
|
|
4003
|
-
"enum": [
|
|
4004
|
-
"event_disabled",
|
|
4005
|
-
"all_webhooks_disabled",
|
|
4006
|
-
"event_enabled_while_disabled",
|
|
4007
|
-
"webhook_enabled_while_disabled"
|
|
4008
|
-
],
|
|
4009
|
-
"description": "Type of conflict:\n- 'event_disabled': Event catalog event is disabled while use case is enabled\n- 'all_webhooks_disabled': All webhooks are disabled while use case is enabled\n- 'event_enabled_while_disabled': Event is enabled while use case is disabled\n- 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled\n"
|
|
4010
|
-
},
|
|
4011
|
-
"webhookId": {
|
|
4012
|
-
"type": "string",
|
|
4013
|
-
"description": "Webhook ID (only present for webhook_enabled_while_disabled conflicts)"
|
|
4014
|
-
},
|
|
4015
|
-
"message": {
|
|
4016
|
-
"type": "string",
|
|
4017
|
-
"description": "Human-readable description of the conflict"
|
|
4018
|
-
}
|
|
4019
|
-
}
|
|
4020
|
-
},
|
|
4021
|
-
"IntegrationEntity": {
|
|
4022
|
-
"type": "object",
|
|
4023
|
-
"required": [
|
|
4024
|
-
"entity_schema",
|
|
4025
|
-
"unique_ids",
|
|
4026
|
-
"fields"
|
|
4027
|
-
],
|
|
4028
|
-
"properties": {
|
|
4029
|
-
"entity_schema": {
|
|
4030
|
-
"type": "string",
|
|
4031
|
-
"description": "Target entity schema (e.g., 'contact', 'contract')"
|
|
4032
|
-
},
|
|
4033
|
-
"unique_ids": {
|
|
4034
|
-
"type": "array",
|
|
4035
|
-
"items": {
|
|
4036
|
-
"type": "string"
|
|
4037
|
-
},
|
|
4038
|
-
"description": "Array of attribute names that uniquely identify this entity.\nThe _type hint for repeatable fields (e.g., email, phone) should be specified\non the corresponding field definition in the fields array.\n"
|
|
4039
|
-
},
|
|
4040
|
-
"jsonataExpression": {
|
|
4041
|
-
"type": "string",
|
|
4042
|
-
"description": "Optional JSONata expression to pre-process the event data before field mapping"
|
|
4043
|
-
},
|
|
4044
|
-
"enabled": {
|
|
4045
|
-
"oneOf": [
|
|
4046
|
-
{
|
|
4047
|
-
"type": "boolean"
|
|
4048
|
-
},
|
|
4049
|
-
{
|
|
4050
|
-
"type": "string"
|
|
4051
|
-
}
|
|
4052
|
-
],
|
|
4053
|
-
"description": "Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean."
|
|
4054
|
-
},
|
|
4055
|
-
"mode": {
|
|
4056
|
-
"type": "string",
|
|
4057
|
-
"enum": [
|
|
4058
|
-
"upsert",
|
|
4059
|
-
"delete",
|
|
4060
|
-
"purge",
|
|
4061
|
-
"upsert-prune-scope-purge",
|
|
4062
|
-
"upsert-prune-scope-delete"
|
|
4063
|
-
],
|
|
4064
|
-
"default": "upsert",
|
|
4065
|
-
"description": "Operation mode for entity mapping:\n- 'upsert': Create or update the entity (default)\n- 'delete': Soft delete the entity (marks as deleted)\n- 'purge': Hard delete the entity (permanent removal)\n- 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted\n- 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted\n"
|
|
4066
|
-
},
|
|
4067
|
-
"scope": {
|
|
4068
|
-
"$ref": "#/components/schemas/PruneScopeConfig"
|
|
4069
|
-
},
|
|
4070
|
-
"fields": {
|
|
4071
|
-
"type": "array",
|
|
4072
|
-
"description": "Field mapping definitions",
|
|
4073
|
-
"items": {
|
|
4074
|
-
"$ref": "#/components/schemas/IntegrationEntityField"
|
|
4075
|
-
}
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
},
|
|
4079
|
-
"PruneScopeConfig": {
|
|
4080
|
-
"type": "object",
|
|
4081
|
-
"description": "Scope configuration for upsert-prune-scope modes.\nDefines how to find entities that should be pruned if not in the upsert payload.\nThe scope is resolved against the original event payload (not individual array items).\n",
|
|
4082
|
-
"required": [
|
|
4083
|
-
"scope_mode"
|
|
4084
|
-
],
|
|
4085
|
-
"properties": {
|
|
4086
|
-
"scope_mode": {
|
|
4087
|
-
"type": "string",
|
|
4088
|
-
"enum": [
|
|
4089
|
-
"relations",
|
|
4090
|
-
"query"
|
|
4091
|
-
],
|
|
4092
|
-
"description": "Scope mode for finding entities to prune:\n- 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations)\n- 'query': Find scope entities directly via query parameters\n"
|
|
4093
|
-
},
|
|
4094
|
-
"schema": {
|
|
4095
|
-
"type": "string",
|
|
4096
|
-
"description": "For 'relations' mode: The schema of the entity to find (e.g., 'billing_account').\nNot used for 'query' mode.\n"
|
|
4097
|
-
},
|
|
4098
|
-
"unique_ids": {
|
|
4099
|
-
"type": "array",
|
|
4100
|
-
"description": "For 'relations' mode: How to identify the scope entity from the payload.\nNot used for 'query' mode.\n",
|
|
4101
|
-
"items": {
|
|
4102
|
-
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
4103
|
-
}
|
|
4104
|
-
},
|
|
4105
|
-
"query": {
|
|
4106
|
-
"type": "array",
|
|
4107
|
-
"description": "For 'query' mode: Direct query parameters to find scope entities.\nNot used for 'relations' or 'reverse-relations' modes.\n",
|
|
4108
|
-
"items": {
|
|
4109
|
-
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
4110
|
-
}
|
|
4111
|
-
}
|
|
4112
|
-
}
|
|
4113
|
-
},
|
|
4114
|
-
"MeterReadingPruneScopeConfig": {
|
|
4115
|
-
"type": "object",
|
|
4116
|
-
"description": "Scope configuration for meter reading upsert-prune-scope mode.\nThe scope is all readings for the same meter + counter.\n",
|
|
4117
|
-
"properties": {
|
|
4118
|
-
"source": {
|
|
4119
|
-
"type": "string",
|
|
4120
|
-
"description": "Optional source filter. When set, only readings with this source\nare eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings).\n"
|
|
4121
|
-
}
|
|
4122
|
-
}
|
|
4123
|
-
},
|
|
4124
|
-
"IntegrationMeterReading": {
|
|
4125
|
-
"type": "object",
|
|
4126
|
-
"required": [
|
|
4127
|
-
"meter",
|
|
4128
|
-
"fields"
|
|
4129
|
-
],
|
|
4130
|
-
"properties": {
|
|
4131
|
-
"jsonataExpression": {
|
|
4132
|
-
"type": "string",
|
|
4133
|
-
"description": "Optional JSONata expression to extract meter reading items from the event data.\nIf not provided, the entire payload is used as the reading data.\nUseful when you need to extract an array of readings from a nested structure (e.g., \"$.readings\").\n"
|
|
4134
|
-
},
|
|
4135
|
-
"reading_matching": {
|
|
4136
|
-
"type": "string",
|
|
4137
|
-
"enum": [
|
|
4138
|
-
"external_id",
|
|
4139
|
-
"strict-date"
|
|
4140
|
-
],
|
|
4141
|
-
"default": "external_id",
|
|
4142
|
-
"description": "Strategy for matching incoming readings against existing readings.\n- 'external_id': Match readings by external_id attribute (default behavior)\n- 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).\n Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.\n"
|
|
4143
|
-
},
|
|
4144
|
-
"mode": {
|
|
4145
|
-
"type": "string",
|
|
4146
|
-
"enum": [
|
|
4147
|
-
"upsert",
|
|
4148
|
-
"delete",
|
|
4149
|
-
"upsert-prune-scope"
|
|
4150
|
-
],
|
|
4151
|
-
"default": "upsert",
|
|
4152
|
-
"description": "Operation mode for meter reading mapping:\n- 'upsert': Create or update meter readings (default)\n- 'delete': Delete the meter reading\n- 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted\n"
|
|
4153
|
-
},
|
|
4154
|
-
"scope": {
|
|
4155
|
-
"$ref": "#/components/schemas/MeterReadingPruneScopeConfig"
|
|
4156
|
-
},
|
|
4157
|
-
"meter": {
|
|
4158
|
-
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
4159
|
-
},
|
|
4160
|
-
"meter_counter": {
|
|
4161
|
-
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
4323
|
+
"disabled"
|
|
4324
|
+
],
|
|
4325
|
+
"description": "Overall status of the use case:\n- 'ok': Use case is enabled and all dependencies are properly configured\n- 'conflict': Use case has configuration issues (disabled events/webhooks while enabled)\n- 'disabled': Use case is disabled\n"
|
|
4162
4326
|
},
|
|
4163
|
-
"
|
|
4327
|
+
"conflicts": {
|
|
4164
4328
|
"type": "array",
|
|
4165
|
-
"description": "Field mapping definitions for meter reading attributes",
|
|
4166
4329
|
"items": {
|
|
4167
|
-
"$ref": "#/components/schemas/
|
|
4168
|
-
}
|
|
4330
|
+
"$ref": "#/components/schemas/OutboundConflict"
|
|
4331
|
+
},
|
|
4332
|
+
"description": "List of detected conflicts, if any"
|
|
4169
4333
|
}
|
|
4170
4334
|
}
|
|
4171
4335
|
},
|
|
4172
|
-
"
|
|
4336
|
+
"WebhookStatus": {
|
|
4173
4337
|
"type": "object",
|
|
4174
4338
|
"required": [
|
|
4175
|
-
"
|
|
4339
|
+
"webhookId"
|
|
4176
4340
|
],
|
|
4177
4341
|
"properties": {
|
|
4178
|
-
"
|
|
4179
|
-
"type": "
|
|
4180
|
-
"
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4342
|
+
"webhookId": {
|
|
4343
|
+
"type": "string",
|
|
4344
|
+
"description": "Unique identifier for the webhook"
|
|
4345
|
+
},
|
|
4346
|
+
"webhookName": {
|
|
4347
|
+
"type": "string",
|
|
4348
|
+
"description": "Human-readable name of the webhook"
|
|
4349
|
+
},
|
|
4350
|
+
"enabled": {
|
|
4351
|
+
"type": "boolean",
|
|
4352
|
+
"nullable": true,
|
|
4353
|
+
"description": "Whether the webhook is enabled. Null if the API is unreachable."
|
|
4185
4354
|
}
|
|
4186
4355
|
}
|
|
4187
4356
|
},
|
|
4188
|
-
"
|
|
4357
|
+
"OutboundConflict": {
|
|
4189
4358
|
"type": "object",
|
|
4190
4359
|
"required": [
|
|
4191
|
-
"
|
|
4360
|
+
"type",
|
|
4361
|
+
"message"
|
|
4192
4362
|
],
|
|
4193
4363
|
"properties": {
|
|
4194
|
-
"
|
|
4364
|
+
"type": {
|
|
4195
4365
|
"type": "string",
|
|
4196
|
-
"
|
|
4366
|
+
"enum": [
|
|
4367
|
+
"event_disabled",
|
|
4368
|
+
"all_webhooks_disabled",
|
|
4369
|
+
"event_enabled_while_disabled",
|
|
4370
|
+
"webhook_enabled_while_disabled"
|
|
4371
|
+
],
|
|
4372
|
+
"description": "Type of conflict:\n- 'event_disabled': Event catalog event is disabled while use case is enabled\n- 'all_webhooks_disabled': All webhooks are disabled while use case is enabled\n- 'event_enabled_while_disabled': Event is enabled while use case is disabled\n- 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled\n"
|
|
4197
4373
|
},
|
|
4198
|
-
"
|
|
4374
|
+
"webhookId": {
|
|
4199
4375
|
"type": "string",
|
|
4200
|
-
"description": "
|
|
4376
|
+
"description": "Webhook ID (only present for webhook_enabled_while_disabled conflicts)"
|
|
4201
4377
|
},
|
|
4202
|
-
"
|
|
4378
|
+
"message": {
|
|
4203
4379
|
"type": "string",
|
|
4204
|
-
"description": "
|
|
4205
|
-
},
|
|
4206
|
-
"constant": {
|
|
4207
|
-
"description": "Constant value to assign (any type)"
|
|
4208
|
-
},
|
|
4209
|
-
"_type": {
|
|
4210
|
-
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
4211
|
-
},
|
|
4212
|
-
"enabled": {
|
|
4213
|
-
"oneOf": [
|
|
4214
|
-
{
|
|
4215
|
-
"type": "boolean"
|
|
4216
|
-
},
|
|
4217
|
-
{
|
|
4218
|
-
"type": "string"
|
|
4219
|
-
}
|
|
4220
|
-
],
|
|
4221
|
-
"description": "Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted."
|
|
4222
|
-
},
|
|
4223
|
-
"relations": {
|
|
4224
|
-
"$ref": "#/components/schemas/RelationConfig"
|
|
4225
|
-
},
|
|
4226
|
-
"relation_refs": {
|
|
4227
|
-
"$ref": "#/components/schemas/RelationRefsConfig"
|
|
4380
|
+
"description": "Human-readable description of the conflict"
|
|
4228
4381
|
}
|
|
4229
4382
|
}
|
|
4230
4383
|
},
|
|
@@ -4409,198 +4562,6 @@
|
|
|
4409
4562
|
],
|
|
4410
4563
|
"description": "Type hint for repeatable fields that require special search handling.\nThese fields are stored as arrays of objects (e.g., email: [{ email: \"value\" }]).\n"
|
|
4411
4564
|
},
|
|
4412
|
-
"IntegrationWithUseCases": {
|
|
4413
|
-
"type": "object",
|
|
4414
|
-
"description": "Integration with embedded use cases for atomic CRUD operations",
|
|
4415
|
-
"required": [
|
|
4416
|
-
"id",
|
|
4417
|
-
"orgId",
|
|
4418
|
-
"name",
|
|
4419
|
-
"use_cases",
|
|
4420
|
-
"created_at",
|
|
4421
|
-
"updated_at"
|
|
4422
|
-
],
|
|
4423
|
-
"properties": {
|
|
4424
|
-
"id": {
|
|
4425
|
-
"type": "string",
|
|
4426
|
-
"format": "uuid",
|
|
4427
|
-
"description": "Unique identifier for the integration"
|
|
4428
|
-
},
|
|
4429
|
-
"orgId": {
|
|
4430
|
-
"type": "string",
|
|
4431
|
-
"description": "Organization ID"
|
|
4432
|
-
},
|
|
4433
|
-
"name": {
|
|
4434
|
-
"type": "string",
|
|
4435
|
-
"description": "Integration name"
|
|
4436
|
-
},
|
|
4437
|
-
"description": {
|
|
4438
|
-
"type": "string",
|
|
4439
|
-
"description": "Optional description of the integration"
|
|
4440
|
-
},
|
|
4441
|
-
"access_token_ids": {
|
|
4442
|
-
"type": "array",
|
|
4443
|
-
"description": "List of access token IDs associated with this integration",
|
|
4444
|
-
"items": {
|
|
4445
|
-
"type": "string"
|
|
4446
|
-
}
|
|
4447
|
-
},
|
|
4448
|
-
"settings": {
|
|
4449
|
-
"$ref": "#/components/schemas/IntegrationSettings"
|
|
4450
|
-
},
|
|
4451
|
-
"use_cases": {
|
|
4452
|
-
"type": "array",
|
|
4453
|
-
"description": "All use cases belonging to this integration",
|
|
4454
|
-
"items": {
|
|
4455
|
-
"$ref": "#/components/schemas/UseCase"
|
|
4456
|
-
}
|
|
4457
|
-
},
|
|
4458
|
-
"created_at": {
|
|
4459
|
-
"type": "string",
|
|
4460
|
-
"format": "date-time",
|
|
4461
|
-
"description": "ISO-8601 timestamp when the integration was created"
|
|
4462
|
-
},
|
|
4463
|
-
"updated_at": {
|
|
4464
|
-
"type": "string",
|
|
4465
|
-
"format": "date-time",
|
|
4466
|
-
"description": "ISO-8601 timestamp when the integration was last updated"
|
|
4467
|
-
}
|
|
4468
|
-
}
|
|
4469
|
-
},
|
|
4470
|
-
"UpsertIntegrationWithUseCasesRequest": {
|
|
4471
|
-
"type": "object",
|
|
4472
|
-
"description": "Request to create or update an integration with embedded use cases (upsert).\nThis is a declarative operation - the request represents the desired state.\n",
|
|
4473
|
-
"required": [
|
|
4474
|
-
"name"
|
|
4475
|
-
],
|
|
4476
|
-
"properties": {
|
|
4477
|
-
"name": {
|
|
4478
|
-
"type": "string",
|
|
4479
|
-
"minLength": 1,
|
|
4480
|
-
"maxLength": 255,
|
|
4481
|
-
"description": "Integration name"
|
|
4482
|
-
},
|
|
4483
|
-
"description": {
|
|
4484
|
-
"type": "string",
|
|
4485
|
-
"maxLength": 1000,
|
|
4486
|
-
"description": "Optional description of the integration"
|
|
4487
|
-
},
|
|
4488
|
-
"access_token_ids": {
|
|
4489
|
-
"type": "array",
|
|
4490
|
-
"description": "List of access token IDs to associate with this integration",
|
|
4491
|
-
"items": {
|
|
4492
|
-
"type": "string"
|
|
4493
|
-
}
|
|
4494
|
-
},
|
|
4495
|
-
"settings": {
|
|
4496
|
-
"$ref": "#/components/schemas/IntegrationSettings"
|
|
4497
|
-
},
|
|
4498
|
-
"use_cases": {
|
|
4499
|
-
"type": "array",
|
|
4500
|
-
"description": "Full list of use cases (declarative). This replaces ALL existing use cases.\n- Use cases with an `id` field matching an existing use case will be updated\n- Use cases without an `id` or with a non-matching `id` will be created\n- Existing use cases not in this list will be deleted\n",
|
|
4501
|
-
"items": {
|
|
4502
|
-
"$ref": "#/components/schemas/EmbeddedUseCaseRequest"
|
|
4503
|
-
}
|
|
4504
|
-
}
|
|
4505
|
-
}
|
|
4506
|
-
},
|
|
4507
|
-
"EmbeddedUseCaseRequest": {
|
|
4508
|
-
"oneOf": [
|
|
4509
|
-
{
|
|
4510
|
-
"$ref": "#/components/schemas/EmbeddedInboundUseCaseRequest"
|
|
4511
|
-
},
|
|
4512
|
-
{
|
|
4513
|
-
"$ref": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
4514
|
-
}
|
|
4515
|
-
],
|
|
4516
|
-
"discriminator": {
|
|
4517
|
-
"propertyName": "type",
|
|
4518
|
-
"mapping": {
|
|
4519
|
-
"inbound": "#/components/schemas/EmbeddedInboundUseCaseRequest",
|
|
4520
|
-
"outbound": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
},
|
|
4524
|
-
"EmbeddedUseCaseRequestBase": {
|
|
4525
|
-
"type": "object",
|
|
4526
|
-
"required": [
|
|
4527
|
-
"name",
|
|
4528
|
-
"type",
|
|
4529
|
-
"enabled"
|
|
4530
|
-
],
|
|
4531
|
-
"properties": {
|
|
4532
|
-
"id": {
|
|
4533
|
-
"type": "string",
|
|
4534
|
-
"format": "uuid",
|
|
4535
|
-
"description": "Optional use case ID for update matching.\n- If provided and matches an existing use case, that use case is updated\n- If provided but no match, a new use case with this ID is created\n- If omitted, a new use case with auto-generated ID is created\n"
|
|
4536
|
-
},
|
|
4537
|
-
"name": {
|
|
4538
|
-
"type": "string",
|
|
4539
|
-
"minLength": 1,
|
|
4540
|
-
"maxLength": 255,
|
|
4541
|
-
"description": "Use case name"
|
|
4542
|
-
},
|
|
4543
|
-
"enabled": {
|
|
4544
|
-
"type": "boolean",
|
|
4545
|
-
"description": "Whether the use case is enabled"
|
|
4546
|
-
},
|
|
4547
|
-
"change_description": {
|
|
4548
|
-
"type": "string",
|
|
4549
|
-
"maxLength": 2000,
|
|
4550
|
-
"description": "Optional description of this change (like a commit message)"
|
|
4551
|
-
}
|
|
4552
|
-
}
|
|
4553
|
-
},
|
|
4554
|
-
"EmbeddedInboundUseCaseRequest": {
|
|
4555
|
-
"allOf": [
|
|
4556
|
-
{
|
|
4557
|
-
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
4558
|
-
},
|
|
4559
|
-
{
|
|
4560
|
-
"type": "object",
|
|
4561
|
-
"required": [
|
|
4562
|
-
"type"
|
|
4563
|
-
],
|
|
4564
|
-
"properties": {
|
|
4565
|
-
"type": {
|
|
4566
|
-
"type": "string",
|
|
4567
|
-
"enum": [
|
|
4568
|
-
"inbound"
|
|
4569
|
-
],
|
|
4570
|
-
"description": "Use case type"
|
|
4571
|
-
},
|
|
4572
|
-
"configuration": {
|
|
4573
|
-
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
4574
|
-
}
|
|
4575
|
-
}
|
|
4576
|
-
}
|
|
4577
|
-
]
|
|
4578
|
-
},
|
|
4579
|
-
"EmbeddedOutboundUseCaseRequest": {
|
|
4580
|
-
"allOf": [
|
|
4581
|
-
{
|
|
4582
|
-
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
4583
|
-
},
|
|
4584
|
-
{
|
|
4585
|
-
"type": "object",
|
|
4586
|
-
"required": [
|
|
4587
|
-
"type"
|
|
4588
|
-
],
|
|
4589
|
-
"properties": {
|
|
4590
|
-
"type": {
|
|
4591
|
-
"type": "string",
|
|
4592
|
-
"enum": [
|
|
4593
|
-
"outbound"
|
|
4594
|
-
],
|
|
4595
|
-
"description": "Use case type"
|
|
4596
|
-
},
|
|
4597
|
-
"configuration": {
|
|
4598
|
-
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
4599
|
-
}
|
|
4600
|
-
}
|
|
4601
|
-
}
|
|
4602
|
-
]
|
|
4603
|
-
},
|
|
4604
4565
|
"ReplayEventsRequest": {
|
|
4605
4566
|
"type": "object",
|
|
4606
4567
|
"required": [
|