@epilot/sdk 2.8.6 → 2.8.7

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.
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Integration Toolkit API",
5
- "version": "1.2.0",
5
+ "version": "1.0.11",
6
6
  "description": "API for integrating with external systems in a standardised way."
7
7
  },
8
8
  "tags": [
@@ -2378,337 +2378,6 @@
2378
2378
  }
2379
2379
  }
2380
2380
  },
2381
- "/v1/integrations/{integrationId}/outbound/messages/poll": {
2382
- "post": {
2383
- "operationId": "pollOutboundMessages",
2384
- "summary": "pollOutboundMessages",
2385
- "description": "Poll outbound messages for an integration's poll-mode use cases.\nTakes a lease on the head-of-line batch of the integration's FIFO stream:\nthe returned messages stay invisible to subsequent polls until they are\nacknowledged or the visibility timeout elapses. POST because taking a\nlease mutates server state — auto-retrying middleware must not burn\nleases. One in-flight batch per stream: while a lease is active (or\nanother poll wins the race), the response is an empty batch\n(`messages: []`), not an error. Requires the `integration:consume` grant.\n",
2386
- "tags": [
2387
- "integrations"
2388
- ],
2389
- "security": [
2390
- {
2391
- "EpilotAuth": []
2392
- }
2393
- ],
2394
- "parameters": [
2395
- {
2396
- "name": "integrationId",
2397
- "in": "path",
2398
- "required": true,
2399
- "description": "The integration ID",
2400
- "schema": {
2401
- "type": "string",
2402
- "format": "uuid"
2403
- }
2404
- }
2405
- ],
2406
- "requestBody": {
2407
- "required": false,
2408
- "content": {
2409
- "application/json": {
2410
- "schema": {
2411
- "$ref": "#/components/schemas/PollOutboundMessagesRequest"
2412
- }
2413
- }
2414
- }
2415
- },
2416
- "responses": {
2417
- "200": {
2418
- "description": "Leased batch of outbound messages (possibly empty)",
2419
- "content": {
2420
- "application/json": {
2421
- "schema": {
2422
- "$ref": "#/components/schemas/PollOutboundMessagesResponse"
2423
- }
2424
- }
2425
- }
2426
- },
2427
- "400": {
2428
- "$ref": "#/components/responses/BadRequest"
2429
- },
2430
- "401": {
2431
- "$ref": "#/components/responses/Unauthorized"
2432
- },
2433
- "403": {
2434
- "$ref": "#/components/responses/Forbidden"
2435
- },
2436
- "404": {
2437
- "$ref": "#/components/responses/NotFound"
2438
- },
2439
- "500": {
2440
- "$ref": "#/components/responses/InternalServerError"
2441
- }
2442
- }
2443
- }
2444
- },
2445
- "/v1/integrations/{integrationId}/outbound/messages/ack": {
2446
- "post": {
2447
- "operationId": "ackOutboundMessages",
2448
- "summary": "ackOutboundMessages",
2449
- "description": "Acknowledge polled outbound messages. Acks are validated against the\nactive lease and committed as a prefix-contiguous cursor advance:\nmessages must be acknowledged in stream order. Out-of-order acks past\nthe first gap are rejected per id (`out_of_order`), acks with an\noutdated lease token are rejected (`stale_lease`), and unknown ids are\nrejected (`not_found`). Acknowledged messages are never delivered\nagain. Requires the `integration:consume` grant.\n",
2450
- "tags": [
2451
- "integrations"
2452
- ],
2453
- "security": [
2454
- {
2455
- "EpilotAuth": []
2456
- }
2457
- ],
2458
- "parameters": [
2459
- {
2460
- "name": "integrationId",
2461
- "in": "path",
2462
- "required": true,
2463
- "description": "The integration ID",
2464
- "schema": {
2465
- "type": "string",
2466
- "format": "uuid"
2467
- }
2468
- }
2469
- ],
2470
- "requestBody": {
2471
- "required": true,
2472
- "content": {
2473
- "application/json": {
2474
- "schema": {
2475
- "$ref": "#/components/schemas/AckOutboundMessagesRequest"
2476
- }
2477
- }
2478
- }
2479
- },
2480
- "responses": {
2481
- "200": {
2482
- "description": "Per-id acknowledgement results",
2483
- "content": {
2484
- "application/json": {
2485
- "schema": {
2486
- "$ref": "#/components/schemas/AckOutboundMessagesResponse"
2487
- }
2488
- }
2489
- }
2490
- },
2491
- "400": {
2492
- "$ref": "#/components/responses/BadRequest"
2493
- },
2494
- "401": {
2495
- "$ref": "#/components/responses/Unauthorized"
2496
- },
2497
- "403": {
2498
- "$ref": "#/components/responses/Forbidden"
2499
- },
2500
- "404": {
2501
- "$ref": "#/components/responses/NotFound"
2502
- },
2503
- "500": {
2504
- "$ref": "#/components/responses/InternalServerError"
2505
- }
2506
- }
2507
- }
2508
- },
2509
- "/v1/integrations/{integrationId}/outbound/messages/dlq": {
2510
- "get": {
2511
- "operationId": "listOutboundDlqMessages",
2512
- "summary": "listOutboundDlqMessages",
2513
- "description": "List an integration's dead-lettered outbound queue messages\n(poison_policy enforcement and operator skips move messages here).\nOperator endpoint — requires the `integration:manage` grant. Message\npayloads are NOT included in listings: entries are keyed by the\nopaque message id and carry delivery metadata only. Paginated via an\nopaque `next_token`.\n",
2514
- "tags": [
2515
- "integrations"
2516
- ],
2517
- "security": [
2518
- {
2519
- "EpilotAuth": []
2520
- }
2521
- ],
2522
- "parameters": [
2523
- {
2524
- "name": "integrationId",
2525
- "in": "path",
2526
- "required": true,
2527
- "description": "The integration ID",
2528
- "schema": {
2529
- "type": "string",
2530
- "format": "uuid"
2531
- }
2532
- },
2533
- {
2534
- "name": "limit",
2535
- "in": "query",
2536
- "required": false,
2537
- "description": "Maximum number of DLQ entries to return",
2538
- "schema": {
2539
- "type": "integer",
2540
- "minimum": 1,
2541
- "maximum": 100,
2542
- "default": 25
2543
- }
2544
- },
2545
- {
2546
- "name": "next_token",
2547
- "in": "query",
2548
- "required": false,
2549
- "description": "Opaque pagination token from a previous response",
2550
- "schema": {
2551
- "type": "string"
2552
- }
2553
- }
2554
- ],
2555
- "responses": {
2556
- "200": {
2557
- "description": "Page of dead-lettered messages",
2558
- "content": {
2559
- "application/json": {
2560
- "schema": {
2561
- "$ref": "#/components/schemas/OutboundDlqListResponse"
2562
- }
2563
- }
2564
- }
2565
- },
2566
- "400": {
2567
- "$ref": "#/components/responses/BadRequest"
2568
- },
2569
- "401": {
2570
- "$ref": "#/components/responses/Unauthorized"
2571
- },
2572
- "403": {
2573
- "$ref": "#/components/responses/Forbidden"
2574
- },
2575
- "404": {
2576
- "$ref": "#/components/responses/NotFound"
2577
- },
2578
- "500": {
2579
- "$ref": "#/components/responses/InternalServerError"
2580
- }
2581
- }
2582
- }
2583
- },
2584
- "/v1/integrations/{integrationId}/outbound/messages/dlq/redrive": {
2585
- "post": {
2586
- "operationId": "redriveOutboundDlqMessages",
2587
- "summary": "redriveOutboundDlqMessages",
2588
- "description": "Redrive selected dead-lettered messages back into the live stream.\nOperator endpoint — requires the `integration:manage` grant.\nA redriven message is re-enqueued at the tail with a new id and\nsequence — it is delivered out of its original per-entity order (the\nstream has moved on); this is inherent to redrive and matches SQS DLQ\nsemantics. The redriven copy starts with zero delivery attempts and a\nfresh retention window; the original DLQ entry is removed. Per-id\nresults report `redriven` or `not_found` (unknown ids, or entries\nconcurrently redriven/expired).\n",
2589
- "tags": [
2590
- "integrations"
2591
- ],
2592
- "security": [
2593
- {
2594
- "EpilotAuth": []
2595
- }
2596
- ],
2597
- "parameters": [
2598
- {
2599
- "name": "integrationId",
2600
- "in": "path",
2601
- "required": true,
2602
- "description": "The integration ID",
2603
- "schema": {
2604
- "type": "string",
2605
- "format": "uuid"
2606
- }
2607
- }
2608
- ],
2609
- "requestBody": {
2610
- "required": true,
2611
- "content": {
2612
- "application/json": {
2613
- "schema": {
2614
- "$ref": "#/components/schemas/RedriveOutboundDlqRequest"
2615
- }
2616
- }
2617
- }
2618
- },
2619
- "responses": {
2620
- "200": {
2621
- "description": "Per-id redrive results",
2622
- "content": {
2623
- "application/json": {
2624
- "schema": {
2625
- "$ref": "#/components/schemas/RedriveOutboundDlqResponse"
2626
- }
2627
- }
2628
- }
2629
- },
2630
- "400": {
2631
- "$ref": "#/components/responses/BadRequest"
2632
- },
2633
- "401": {
2634
- "$ref": "#/components/responses/Unauthorized"
2635
- },
2636
- "403": {
2637
- "$ref": "#/components/responses/Forbidden"
2638
- },
2639
- "404": {
2640
- "$ref": "#/components/responses/NotFound"
2641
- },
2642
- "500": {
2643
- "$ref": "#/components/responses/InternalServerError"
2644
- }
2645
- }
2646
- }
2647
- },
2648
- "/v1/integrations/{integrationId}/outbound/messages/unblock": {
2649
- "post": {
2650
- "operationId": "unblockOutboundStream",
2651
- "summary": "unblockOutboundStream",
2652
- "description": "Unblock an integration's outbound stream halted by the `block`\npoison policy: skips (dead-letters) the current blocked head message,\nemitting MSG_DEAD_LETTERED and letting the next message become the\nhead. Operator endpoint — requires the `integration:manage` grant.\nReturns `unblocked: false` as a no-op when the stream is not\ncurrently blocked (or the state moved concurrently) — safe to retry.\n",
2653
- "tags": [
2654
- "integrations"
2655
- ],
2656
- "security": [
2657
- {
2658
- "EpilotAuth": []
2659
- }
2660
- ],
2661
- "parameters": [
2662
- {
2663
- "name": "integrationId",
2664
- "in": "path",
2665
- "required": true,
2666
- "description": "The integration ID",
2667
- "schema": {
2668
- "type": "string",
2669
- "format": "uuid"
2670
- }
2671
- }
2672
- ],
2673
- "requestBody": {
2674
- "required": false,
2675
- "content": {
2676
- "application/json": {
2677
- "schema": {
2678
- "$ref": "#/components/schemas/UnblockOutboundStreamRequest"
2679
- }
2680
- }
2681
- }
2682
- },
2683
- "responses": {
2684
- "200": {
2685
- "description": "Unblock outcome",
2686
- "content": {
2687
- "application/json": {
2688
- "schema": {
2689
- "$ref": "#/components/schemas/UnblockOutboundStreamResponse"
2690
- }
2691
- }
2692
- }
2693
- },
2694
- "400": {
2695
- "$ref": "#/components/responses/BadRequest"
2696
- },
2697
- "401": {
2698
- "$ref": "#/components/responses/Unauthorized"
2699
- },
2700
- "403": {
2701
- "$ref": "#/components/responses/Forbidden"
2702
- },
2703
- "404": {
2704
- "$ref": "#/components/responses/NotFound"
2705
- },
2706
- "500": {
2707
- "$ref": "#/components/responses/InternalServerError"
2708
- }
2709
- }
2710
- }
2711
- },
2712
2381
  "/v1/integrations/{integrationId}/monitoring/access-logs": {
2713
2382
  "post": {
2714
2383
  "operationId": "queryAccessLogs",
@@ -3475,12 +3144,6 @@
3475
3144
  "maxLength": 255,
3476
3145
  "description": "Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.\n",
3477
3146
  "example": "evt-2025-05-01-12345-create-bp"
3478
- },
3479
- "use_case_id": {
3480
- "type": "string",
3481
- "nullable": true,
3482
- "readOnly": true,
3483
- "description": "Resolved use case ID for the inbound event. Null when no use case matched or for events ingested before this field was introduced. Server-populated only — ignored if supplied on inbound requests.\n"
3484
3147
  }
3485
3148
  }
3486
3149
  },
@@ -6793,10 +6456,11 @@
6793
6456
  "type": "object",
6794
6457
  "required": [
6795
6458
  "name",
6459
+ "jsonata_expression",
6796
6460
  "enabled",
6797
6461
  "delivery"
6798
6462
  ],
6799
- "description": "A mapping that delivers an event to an external system — either pushed to a webhook (with a JSONata payload transformation) or made available on the pull-based poll queue (raw event payload, no transformation)",
6463
+ "description": "A mapping that transforms an event and delivers it to a webhook",
6800
6464
  "properties": {
6801
6465
  "id": {
6802
6466
  "type": "string",
@@ -6810,7 +6474,7 @@
6810
6474
  },
6811
6475
  "jsonata_expression": {
6812
6476
  "type": "string",
6813
- "description": "JSONata expression to transform the event payload. Required for webhook delivery; ignored for poll delivery.",
6477
+ "description": "JSONata expression to transform the event payload",
6814
6478
  "example": "{ \"id\": entity._id, \"customer\": entity.customer_name }"
6815
6479
  },
6816
6480
  "enabled": {
@@ -6834,88 +6498,31 @@
6834
6498
  }
6835
6499
  },
6836
6500
  "DeliveryConfig": {
6837
- "description": "Configuration for how the event should be delivered. webhook = push delivery via svc-webhooks (JSONata-transformed payload); poll = pull-based queue delivery where the consumer fetches items via the poll API (raw event payload)",
6838
- "oneOf": [
6839
- {
6840
- "$ref": "#/components/schemas/WebhookDeliveryConfig"
6841
- },
6842
- {
6843
- "$ref": "#/components/schemas/PollDeliveryConfig"
6844
- }
6845
- ],
6846
- "discriminator": {
6847
- "propertyName": "type",
6848
- "mapping": {
6849
- "webhook": "#/components/schemas/WebhookDeliveryConfig",
6850
- "poll": "#/components/schemas/PollDeliveryConfig"
6851
- }
6852
- }
6853
- },
6854
- "WebhookDeliveryConfig": {
6855
6501
  "type": "object",
6856
6502
  "required": [
6857
6503
  "type",
6858
6504
  "webhook_id"
6859
6505
  ],
6860
- "description": "Push delivery of the transformed event to a webhook via svc-webhooks",
6506
+ "description": "Configuration for how the transformed event should be delivered",
6861
6507
  "properties": {
6862
6508
  "type": {
6863
6509
  "type": "string",
6864
6510
  "enum": [
6865
6511
  "webhook"
6866
6512
  ],
6867
- "description": "Delivery mechanism type"
6868
- },
6869
- "webhook_id": {
6870
- "type": "string",
6871
- "description": "Reference to the webhook configuration in svc-webhooks"
6513
+ "description": "Delivery mechanism type (currently only webhook is supported)"
6872
6514
  },
6873
- "webhook_name": {
6874
- "type": "string",
6875
- "description": "Cached webhook name for display purposes"
6876
- },
6877
- "webhook_url": {
6878
- "type": "string",
6879
- "description": "Cached webhook URL for display purposes"
6880
- }
6881
- }
6882
- },
6883
- "PollDeliveryConfig": {
6884
- "type": "object",
6885
- "required": [
6886
- "type"
6887
- ],
6888
- "description": "Pull-based queue delivery. Items carry the raw standardized event-catalog payload; no JSONata mapping is applied in poll mode. Consumers fetch and acknowledge items via the poll API.",
6889
- "properties": {
6890
- "type": {
6891
- "type": "string",
6892
- "enum": [
6893
- "poll"
6894
- ],
6895
- "description": "Delivery mechanism type"
6896
- },
6897
- "retention_days": {
6898
- "type": "integer",
6899
- "minimum": 1,
6900
- "maximum": 90,
6901
- "default": 30,
6902
- "description": "How long undelivered queue items are retained before expiry"
6515
+ "webhook_id": {
6516
+ "type": "string",
6517
+ "description": "Reference to the webhook configuration in svc-webhooks"
6903
6518
  },
6904
- "poison_policy": {
6519
+ "webhook_name": {
6905
6520
  "type": "string",
6906
- "enum": [
6907
- "dead_letter",
6908
- "block"
6909
- ],
6910
- "default": "dead_letter",
6911
- "description": "What happens when an item exhausts max_delivery_attempts: dead_letter routes the exhausted item to the dead-letter queue; block halts the queue until operator/consumer action. Enforcement lands with the queue consumer (Phase 10) — this field defines the contract."
6521
+ "description": "Cached webhook name for display purposes"
6912
6522
  },
6913
- "max_delivery_attempts": {
6914
- "type": "integer",
6915
- "minimum": 1,
6916
- "maximum": 100,
6917
- "default": 5,
6918
- "description": "Maximum delivery attempts before the poison_policy is applied"
6523
+ "webhook_url": {
6524
+ "type": "string",
6525
+ "description": "Cached webhook URL for display purposes"
6919
6526
  }
6920
6527
  }
6921
6528
  },
@@ -6986,52 +6593,6 @@
6986
6593
  "$ref": "#/components/schemas/OutboundConflict"
6987
6594
  },
6988
6595
  "description": "List of detected conflicts, if any"
6989
- },
6990
- "poll": {
6991
- "$ref": "#/components/schemas/OutboundPollStatus"
6992
- }
6993
- }
6994
- },
6995
- "OutboundPollStatus": {
6996
- "type": "object",
6997
- "description": "Queue/consumer health for a poll-mode use case. Present only on use\ncases with a poll delivery mapping — webhook-only use cases are\nunaffected. Depth/age/DLQ numbers are first-page approximations.\n",
6998
- "required": [
6999
- "queue_depth",
7000
- "oldest_unconsumed_age_seconds",
7001
- "last_poll_at",
7002
- "last_ack_at",
7003
- "blocked",
7004
- "dlq_count"
7005
- ],
7006
- "properties": {
7007
- "queue_depth": {
7008
- "type": "integer",
7009
- "description": "Unconsumed messages attributable to this use case (first-page approximation)"
7010
- },
7011
- "oldest_unconsumed_age_seconds": {
7012
- "type": "integer",
7013
- "nullable": true,
7014
- "description": "Age of the oldest unconsumed message in seconds — null when the queue is empty"
7015
- },
7016
- "last_poll_at": {
7017
- "type": "string",
7018
- "format": "date-time",
7019
- "nullable": true,
7020
- "description": "Timestamp of the last successful poll lease — null before the first poll"
7021
- },
7022
- "last_ack_at": {
7023
- "type": "string",
7024
- "format": "date-time",
7025
- "nullable": true,
7026
- "description": "Timestamp of the last committed acknowledgment — null before the first ack"
7027
- },
7028
- "blocked": {
7029
- "type": "boolean",
7030
- "description": "Whether the integration's outbound stream is currently halted by a\nblocked head message (poison_policy 'block'). Stream-level flag —\nthe same value is reported on every poll use case of the\nintegration, because the stream spans them.\n"
7031
- },
7032
- "dlq_count": {
7033
- "type": "integer",
7034
- "description": "Dead-lettered messages of this use case awaiting redrive or expiry (first-page approximation)"
7035
6596
  }
7036
6597
  }
7037
6598
  },
@@ -7069,11 +6630,9 @@
7069
6630
  "event_disabled",
7070
6631
  "all_webhooks_disabled",
7071
6632
  "event_enabled_while_disabled",
7072
- "webhook_enabled_while_disabled",
7073
- "stream_blocked",
7074
- "dlq_items_present"
6633
+ "webhook_enabled_while_disabled"
7075
6634
  ],
7076
- "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- 'stream_blocked': The outbound stream is halted by a poison message awaiting operator action or consumer ack (poll mode)\n- 'dlq_items_present': Dead-lettered messages await redrive or expiry (poll mode)\n"
6635
+ "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"
7077
6636
  },
7078
6637
  "webhookId": {
7079
6638
  "type": "string",
@@ -7085,320 +6644,6 @@
7085
6644
  }
7086
6645
  }
7087
6646
  },
7088
- "PollOutboundMessagesRequest": {
7089
- "type": "object",
7090
- "additionalProperties": false,
7091
- "properties": {
7092
- "limit": {
7093
- "type": "integer",
7094
- "maximum": 100,
7095
- "minimum": 1,
7096
- "default": 10,
7097
- "description": "Maximum number of messages to lease in this batch. The ~5.5 MB\nresponse cap may truncate the batch earlier when payloads are\nlarge — the leased run shrinks accordingly.\n"
7098
- }
7099
- }
7100
- },
7101
- "OutboundMessage": {
7102
- "type": "object",
7103
- "required": [
7104
- "id",
7105
- "lease_token",
7106
- "use_case_id",
7107
- "event_name",
7108
- "event_id",
7109
- "group",
7110
- "payload",
7111
- "enqueued_at"
7112
- ],
7113
- "properties": {
7114
- "id": {
7115
- "type": "string",
7116
- "description": "Opaque message id (msg_…) — stable per message across leases"
7117
- },
7118
- "lease_token": {
7119
- "type": "string",
7120
- "description": "Opaque lease token (lt_…) — echo back on ack"
7121
- },
7122
- "use_case_id": {
7123
- "type": "string",
7124
- "description": "The poll-mode use case that produced this message"
7125
- },
7126
- "event_name": {
7127
- "type": "string",
7128
- "description": "Standardized event name (e.g. contract.updated)"
7129
- },
7130
- "event_id": {
7131
- "type": "string",
7132
- "description": "Unique id of the originating event"
7133
- },
7134
- "group": {
7135
- "type": "string",
7136
- "description": "Ordering group — messages sharing a group are strictly ordered,\ndistinct groups are independent. Constant \"0\" in v1.\n"
7137
- },
7138
- "payload": {
7139
- "type": "object",
7140
- "additionalProperties": true,
7141
- "description": "The raw standardized event-catalog event, always inlined as-is"
7142
- },
7143
- "enqueued_at": {
7144
- "type": "string",
7145
- "format": "date-time",
7146
- "description": "When the message was enqueued"
7147
- }
7148
- }
7149
- },
7150
- "PollOutboundMessagesResponse": {
7151
- "type": "object",
7152
- "required": [
7153
- "messages",
7154
- "visibility_timeout_seconds",
7155
- "has_more"
7156
- ],
7157
- "properties": {
7158
- "messages": {
7159
- "type": "array",
7160
- "items": {
7161
- "$ref": "#/components/schemas/OutboundMessage"
7162
- },
7163
- "description": "The leased batch in strict stream order (empty when contended or drained)"
7164
- },
7165
- "visibility_timeout_seconds": {
7166
- "type": "integer",
7167
- "description": "Effective visibility timeout for this lease — a per-integration\nserver-side setting (default 300 seconds)\n"
7168
- },
7169
- "has_more": {
7170
- "type": "boolean",
7171
- "description": "Whether more messages are available beyond this batch"
7172
- }
7173
- }
7174
- },
7175
- "AckOutboundMessagesRequest": {
7176
- "type": "object",
7177
- "required": [
7178
- "acks"
7179
- ],
7180
- "properties": {
7181
- "acks": {
7182
- "type": "array",
7183
- "minItems": 1,
7184
- "maxItems": 100,
7185
- "items": {
7186
- "type": "object",
7187
- "additionalProperties": false,
7188
- "required": [
7189
- "id",
7190
- "lease_token"
7191
- ],
7192
- "properties": {
7193
- "id": {
7194
- "type": "string",
7195
- "description": "The message id (msg_…) to acknowledge"
7196
- },
7197
- "lease_token": {
7198
- "type": "string",
7199
- "description": "The lease token (lt_…) returned by the poll that leased this message"
7200
- }
7201
- }
7202
- }
7203
- }
7204
- }
7205
- },
7206
- "AckResult": {
7207
- "type": "object",
7208
- "required": [
7209
- "id",
7210
- "status"
7211
- ],
7212
- "properties": {
7213
- "id": {
7214
- "type": "string",
7215
- "description": "The acknowledged message id"
7216
- },
7217
- "status": {
7218
- "type": "string",
7219
- "enum": [
7220
- "accepted",
7221
- "rejected"
7222
- ]
7223
- },
7224
- "reason": {
7225
- "type": "string",
7226
- "enum": [
7227
- "stale_lease",
7228
- "out_of_order",
7229
- "not_found"
7230
- ],
7231
- "description": "Rejection reason — present only when status is rejected"
7232
- }
7233
- }
7234
- },
7235
- "AckOutboundMessagesResponse": {
7236
- "type": "object",
7237
- "required": [
7238
- "results"
7239
- ],
7240
- "properties": {
7241
- "results": {
7242
- "type": "array",
7243
- "items": {
7244
- "$ref": "#/components/schemas/AckResult"
7245
- },
7246
- "description": "Per-id acknowledgement outcome"
7247
- }
7248
- }
7249
- },
7250
- "OutboundDlqMessage": {
7251
- "type": "object",
7252
- "required": [
7253
- "id",
7254
- "use_case_id",
7255
- "event_name",
7256
- "event_id",
7257
- "dead_lettered_at",
7258
- "delivery_attempts"
7259
- ],
7260
- "properties": {
7261
- "id": {
7262
- "type": "string",
7263
- "description": "Opaque message id (msg_…) of the dead-lettered message"
7264
- },
7265
- "use_case_id": {
7266
- "type": "string",
7267
- "description": "The poll-mode use case that produced this message"
7268
- },
7269
- "event_name": {
7270
- "type": "string",
7271
- "description": "Standardized event name (e.g. contract.updated)"
7272
- },
7273
- "event_id": {
7274
- "type": "string",
7275
- "description": "Unique id of the originating event"
7276
- },
7277
- "enqueued_at": {
7278
- "type": "string",
7279
- "format": "date-time",
7280
- "description": "When the message was originally enqueued"
7281
- },
7282
- "dead_lettered_at": {
7283
- "type": "string",
7284
- "format": "date-time",
7285
- "description": "When the message was dead-lettered"
7286
- },
7287
- "delivery_attempts": {
7288
- "type": "integer",
7289
- "description": "Delivery attempts at the moment the message was dead-lettered"
7290
- },
7291
- "reason": {
7292
- "type": "string",
7293
- "description": "Why the message was dead-lettered (policy or operator reason)"
7294
- },
7295
- "expires_at": {
7296
- "type": "string",
7297
- "format": "date-time",
7298
- "description": "When the DLQ entry expires (retention window re-armed at dead-letter time)"
7299
- }
7300
- }
7301
- },
7302
- "OutboundDlqListResponse": {
7303
- "type": "object",
7304
- "required": [
7305
- "items"
7306
- ],
7307
- "properties": {
7308
- "items": {
7309
- "type": "array",
7310
- "items": {
7311
- "$ref": "#/components/schemas/OutboundDlqMessage"
7312
- },
7313
- "description": "Dead-lettered messages, oldest first"
7314
- },
7315
- "next_token": {
7316
- "type": "string",
7317
- "description": "Opaque pagination token — present when more entries exist"
7318
- }
7319
- }
7320
- },
7321
- "RedriveOutboundDlqRequest": {
7322
- "type": "object",
7323
- "additionalProperties": false,
7324
- "required": [
7325
- "ids"
7326
- ],
7327
- "properties": {
7328
- "ids": {
7329
- "type": "array",
7330
- "minItems": 1,
7331
- "maxItems": 100,
7332
- "items": {
7333
- "type": "string"
7334
- },
7335
- "description": "Message ids (msg_…) of the DLQ entries to redrive"
7336
- }
7337
- }
7338
- },
7339
- "RedriveOutboundDlqResult": {
7340
- "type": "object",
7341
- "required": [
7342
- "id",
7343
- "status"
7344
- ],
7345
- "properties": {
7346
- "id": {
7347
- "type": "string",
7348
- "description": "The requested message id"
7349
- },
7350
- "status": {
7351
- "type": "string",
7352
- "enum": [
7353
- "redriven",
7354
- "not_found"
7355
- ],
7356
- "description": "Outcome — `redriven` re-enqueued at the tail; `not_found` for\nunknown ids or entries concurrently redriven/expired\n"
7357
- }
7358
- }
7359
- },
7360
- "RedriveOutboundDlqResponse": {
7361
- "type": "object",
7362
- "required": [
7363
- "results"
7364
- ],
7365
- "properties": {
7366
- "results": {
7367
- "type": "array",
7368
- "items": {
7369
- "$ref": "#/components/schemas/RedriveOutboundDlqResult"
7370
- },
7371
- "description": "Per-id redrive outcome, input order preserved"
7372
- }
7373
- }
7374
- },
7375
- "UnblockOutboundStreamRequest": {
7376
- "type": "object",
7377
- "additionalProperties": false,
7378
- "properties": {
7379
- "reason": {
7380
- "type": "string",
7381
- "maxLength": 500,
7382
- "description": "Operator reason recorded on the dead-lettered head"
7383
- }
7384
- }
7385
- },
7386
- "UnblockOutboundStreamResponse": {
7387
- "type": "object",
7388
- "required": [
7389
- "unblocked"
7390
- ],
7391
- "properties": {
7392
- "unblocked": {
7393
- "type": "boolean",
7394
- "description": "Whether a blocked head was skipped (false = no-op, stream was not blocked)"
7395
- },
7396
- "dead_lettered_id": {
7397
- "type": "string",
7398
- "description": "Message id of the skipped head — present only when unblocked is true"
7399
- }
7400
- }
7401
- },
7402
6647
  "RelationConfig": {
7403
6648
  "type": "object",
7404
6649
  "required": [
@@ -7625,11 +6870,6 @@
7625
6870
  "type": "string",
7626
6871
  "description": "Filter by event name (alias for object_type)"
7627
6872
  },
7628
- "use_case_id": {
7629
- "type": "string",
7630
- "minLength": 1,
7631
- "description": "Filter by use case ID"
7632
- },
7633
6873
  "limit": {
7634
6874
  "type": "integer",
7635
6875
  "description": "Maximum number of results to return",
@@ -8586,15 +7826,6 @@
8586
7826
  "date"
8587
7827
  ],
8588
7828
  "description": "Field to group the breakdown by"
8589
- },
8590
- "source": {
8591
- "type": "string",
8592
- "enum": [
8593
- "monitoring",
8594
- "incoming"
8595
- ],
8596
- "default": "monitoring",
8597
- "description": "Data source for the stats. \"monitoring\" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). \"incoming\" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0).\n"
8598
7829
  }
8599
7830
  }
8600
7831
  },