@epilot/cli 0.1.158 → 0.1.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.158 — CLI for epilot APIs
32
+ epilot v0.1.160 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -79,15 +79,6 @@
79
79
  "example": "wfABCDEFGH"
80
80
  }
81
81
  },
82
- {
83
- "name": "trigger_event_name",
84
- "in": "query",
85
- "description": "Filter by Event Catalog event name. Returns only automations that have an event_catalog trigger for this event.",
86
- "schema": {
87
- "type": "string",
88
- "example": "CustomerRequestSubmitted"
89
- }
90
- },
91
82
  {
92
83
  "name": "include_flows",
93
84
  "in": "query",
@@ -1258,9 +1249,6 @@
1258
1249
  },
1259
1250
  {
1260
1251
  "$ref": "#/components/schemas/FlowsTrigger"
1261
- },
1262
- {
1263
- "$ref": "#/components/schemas/EventCatalogTrigger"
1264
1252
  }
1265
1253
  ]
1266
1254
  },
@@ -2021,6 +2009,10 @@
2021
2009
  "items": {
2022
2010
  "$ref": "#/components/schemas/GraphNodeFilter"
2023
2011
  }
2012
+ },
2013
+ "optional": {
2014
+ "type": "boolean",
2015
+ "description": "Only meaningful for a node expected to resolve to a single entity (the seed node, or\n\"cardinality: one\"). When true, finding zero matching entities is not an error - the\nmapping proceeds without this node's data instead of failing. Finding more than one\nmatch still fails regardless of this flag; ambiguity is never silently accepted.\n"
2024
2016
  }
2025
2017
  }
2026
2018
  },
@@ -2408,7 +2400,7 @@
2408
2400
  },
2409
2401
  "assignment_type": {
2410
2402
  "type": "string",
2411
- "description": "How assignees in `add` are resolved.\n- direct: assign exactly the users in `add` (default).\n- even_distribution: treat `add` as a candidate pool (users and/or groups)\n and assign the least-loaded available agent.\n- sequential: reserved for future use.\n",
2403
+ "description": "How assignees in `add` are resolved.\n- direct: assign exactly the users in `add` (default).\n- even_distribution: treat `add` as a candidate pool (users and/or groups)\n and assign the least-loaded available agent.\n- sequential: treat `add` as a candidate pool and assign the next\n user in a stable round-robin rotation.\n",
2412
2404
  "enum": [
2413
2405
  "direct",
2414
2406
  "even_distribution",
@@ -2471,7 +2463,7 @@
2471
2463
  "properties": {
2472
2464
  "type": {
2473
2465
  "type": "string",
2474
- "description": "Which kind of principal this assignee is. Required: it selects which\nof the identifier properties below applies, and forms part of the\nappend-mode de-duplication key.\n",
2466
+ "description": "Which kind of principal this assignee is. Required: it selects which\nof the identifier properties below applies, and forms part of the\nappend-mode de-duplication key.\nPartner types cannot participate in a rotation; they stay valid in\n`assignees` and `fallback_assignees`.\n",
2475
2467
  "enum": [
2476
2468
  "user",
2477
2469
  "partner_user",
@@ -2523,7 +2515,7 @@
2523
2515
  },
2524
2516
  "write_mode": {
2525
2517
  "type": "string",
2526
- "description": "How `assignees` combine with the attribute's current value.\n- replace: overwrite the attribute with `assignees` (default).\n- append: union with the existing assignees, de-duplicated, existing\n entries first. Two assignees are duplicates when their `type` and\n `org_id` both match and the identifier for that type matches:\n `user_id` for user and partner_user, `group_id` for group,\n `partner_id` for partner_organization. Scoping by `org_id` keeps\n assignees from different organizations distinct even when their\n identifiers coincide.\n",
2518
+ "description": "How `assignees` combine with the attribute's current value.\n- replace: overwrite the attribute with `assignees` (default).\n- append: union with the existing assignees, de-duplicated, existing\n entries first. Two assignees are duplicates when their `type` and\n `org_id` both match and the identifier for that type matches:\n `user_id` for user and partner_user, `group_id` for group,\n `partner_id` for partner_organization. Scoping by `org_id` keeps\n assignees from different organizations distinct even when their\n identifiers coincide.\nHonoured in `direct` only; `sequential` always forces `replace`.\n",
2527
2519
  "enum": [
2528
2520
  "replace",
2529
2521
  "append"
@@ -2532,12 +2524,66 @@
2532
2524
  },
2533
2525
  "assignment_type": {
2534
2526
  "type": "string",
2535
- "description": "How assignees are resolved.\n- direct: assign exactly the assignees listed (default, and the only\n accepted value).\nReserved for a future routing strategy; widening this enum later is\nbackwards compatible and needs no migration of existing flows.\n",
2527
+ "description": "How assignees are resolved. Omitted means `direct`.\n- direct: assign exactly the assignees listed in `assignees`.\n- sequential: round-robin over the members of `candidate_group`,\n selecting one user per execution. `assignees` is ignored and\n `write_mode` is forced to `replace`.\n- even_distribution: like sequential, but the member with the fewest\n matching entities wins; ties are resolved by the rotation.\n `workload_filter` narrows what counts as load.\n",
2536
2528
  "enum": [
2537
- "direct"
2529
+ "direct",
2530
+ "sequential",
2531
+ "even_distribution"
2538
2532
  ],
2539
2533
  "default": "direct"
2540
2534
  },
2535
+ "candidate_group": {
2536
+ "allOf": [
2537
+ {
2538
+ "$ref": "#/components/schemas/EntityAssignee"
2539
+ }
2540
+ ],
2541
+ "description": "The group whose members form the rotation. Must be `type: group`;\nignored in `direct`.\n"
2542
+ },
2543
+ "reset_interval": {
2544
+ "type": "string",
2545
+ "description": "When the rotation restarts at the first member instead of continuing\nwhere the last execution left off. `never` wraps around continuously.\nBoundaries are evaluated in UTC. Applies to `sequential` only.\n",
2546
+ "enum": [
2547
+ "daily",
2548
+ "weekly",
2549
+ "monthly",
2550
+ "never"
2551
+ ],
2552
+ "default": "never"
2553
+ },
2554
+ "workload_filter": {
2555
+ "type": "object",
2556
+ "description": "Narrows what counts as workload for `even_distribution`: only entities\nwhose `attribute` (a status-type attribute on the target schema) holds\none of `values` are counted. Absent means every non-deleted entity\nholding the assignee counts. Ignored by the other assignment types.\n",
2557
+ "properties": {
2558
+ "attribute": {
2559
+ "type": "string",
2560
+ "description": "Name of a `status`-type attribute on the target schema."
2561
+ },
2562
+ "values": {
2563
+ "type": "array",
2564
+ "description": "Attribute values that count as load.",
2565
+ "items": {
2566
+ "type": "string"
2567
+ }
2568
+ }
2569
+ }
2570
+ },
2571
+ "fallback": {
2572
+ "type": "string",
2573
+ "description": "What to do when no assignable principal resolves, e.g. an empty or\nfully ineligible `candidate_group`.\n- leave_unassigned: write nothing at all, leaving the attribute as it\n was. Not the same as writing an empty array, which would clear an\n existing assignment.\n- assign_to_fallback: write `fallback_assignees` instead.\n",
2574
+ "enum": [
2575
+ "leave_unassigned",
2576
+ "assign_to_fallback"
2577
+ ],
2578
+ "default": "leave_unassigned"
2579
+ },
2580
+ "fallback_assignees": {
2581
+ "type": "array",
2582
+ "description": "Assignees to write when `fallback` is `assign_to_fallback`; required\nin that case and ignored otherwise. Any `EntityAssignee` type is\nallowed, partner principals included.\n",
2583
+ "items": {
2584
+ "$ref": "#/components/schemas/EntityAssignee"
2585
+ }
2586
+ },
2541
2587
  "source": {
2542
2588
  "type": "object",
2543
2589
  "description": "Which entity to assign to. Omit for the triggering entity (the\ndefault, and the behaviour of every flow saved before this field\nexisted).\n- trigger: the entity that started the flow.\n- action: the entity produced by an earlier action, identified by\n that action's `flow_action_id`.\n",
@@ -3665,12 +3711,10 @@
3665
3711
  },
3666
3712
  "originType": {
3667
3713
  "type": "string",
3668
- "description": "`event` reads the operand from the trigger's Event Catalog payload instead of an entity: `attribute` is then a dot path into the payload (e.g. `ticket.subject`). Only valid with `origin: trigger` on flows started by an EventCatalogTrigger.\n",
3669
3714
  "enum": [
3670
3715
  "entity",
3671
3716
  "workflow",
3672
- "journey_block",
3673
- "event"
3717
+ "journey_block"
3674
3718
  ]
3675
3719
  },
3676
3720
  "schema": {
@@ -3960,9 +4004,6 @@
3960
4004
  },
3961
4005
  {
3962
4006
  "$ref": "#/components/schemas/TriggerEventMessaging"
3963
- },
3964
- {
3965
- "$ref": "#/components/schemas/TriggerEventEventCatalog"
3966
4007
  }
3967
4008
  ]
3968
4009
  },
@@ -4259,92 +4300,6 @@
4259
4300
  "operation_type"
4260
4301
  ]
4261
4302
  },
4262
- "TriggerEventEventCatalog": {
4263
- "type": "object",
4264
- "description": "Set on executions started by an Event Catalog event (see EventCatalogTrigger). The full event payload is not stored inline (it may be up to 256 KB) but by reference in `payload_ref`; automation workers hydrate it before every action.\n",
4265
- "properties": {
4266
- "type": {
4267
- "type": "string",
4268
- "enum": [
4269
- "event_catalog"
4270
- ]
4271
- },
4272
- "org_id": {
4273
- "type": "string",
4274
- "example": "123"
4275
- },
4276
- "entity_id": {
4277
- "$ref": "#/components/schemas/EntityId"
4278
- },
4279
- "entity_node_id": {
4280
- "type": "string",
4281
- "description": "Node id of the event's entity graph that was resolved to `entity_id`",
4282
- "example": "ticket"
4283
- },
4284
- "event_id": {
4285
- "type": "string",
4286
- "description": "Event Catalog event id (ULID) of the published event",
4287
- "example": "01K3ZK8QZ7Y7Q2M8W1V3N4X5P6"
4288
- },
4289
- "event_name": {
4290
- "type": "string",
4291
- "example": "CustomerRequestSubmitted"
4292
- },
4293
- "event_version": {
4294
- "type": "string",
4295
- "description": "Version the payload was delivered in (the version pinned on the trigger)",
4296
- "example": "1.1"
4297
- },
4298
- "published_version": {
4299
- "type": "string",
4300
- "description": "Version the event was originally published with, before downgrading to `event_version`",
4301
- "example": "1.2"
4302
- },
4303
- "event_time": {
4304
- "type": "string",
4305
- "format": "date-time"
4306
- },
4307
- "trigger_source_type": {
4308
- "type": "string",
4309
- "description": "How the event was triggered in the catalog (api | automation | operation | portal_user)",
4310
- "example": "operation"
4311
- },
4312
- "trigger_source": {
4313
- "type": "string",
4314
- "description": "Opaque source reference from the catalog (e.g. activity id, automation execution id)"
4315
- },
4316
- "payload_ref": {
4317
- "$ref": "#/components/schemas/TriggerEventPayloadRef"
4318
- }
4319
- },
4320
- "required": [
4321
- "type",
4322
- "org_id",
4323
- "entity_id",
4324
- "entity_node_id",
4325
- "event_id",
4326
- "event_name",
4327
- "event_version"
4328
- ]
4329
- },
4330
- "TriggerEventPayloadRef": {
4331
- "type": "object",
4332
- "description": "S3 reference to the stored trigger event payload (`_downgrades` stripped, downgraded to the pinned version)",
4333
- "properties": {
4334
- "bucket": {
4335
- "type": "string",
4336
- "example": "automation-trigger-payloads-prod"
4337
- },
4338
- "key": {
4339
- "type": "string",
4340
- "example": "trigger-payloads/123/6c8e5d9a-7f1b-4c2e-9d3a-0b1c2d3e4f5a.json"
4341
- }
4342
- },
4343
- "required": [
4344
- "bucket",
4345
- "key"
4346
- ]
4347
- },
4348
4303
  "ApiCallerContext": {
4349
4304
  "type": "object",
4350
4305
  "additionalProperties": true,
@@ -5467,76 +5422,6 @@
5467
5422
  }
5468
5423
  ]
5469
5424
  },
5470
- "EventCatalogTrigger": {
5471
- "description": "Starts the flow when an Event Catalog event is published for the organization. The execution runs in the context of one entity from the event's entity graph (`entity_node_id`), and the event payload is available to conditions and actions as the `event` variable context.\n",
5472
- "allOf": [
5473
- {
5474
- "$ref": "#/components/schemas/AutomationTrigger"
5475
- },
5476
- {
5477
- "type": "object",
5478
- "properties": {
5479
- "type": {
5480
- "type": "string",
5481
- "enum": [
5482
- "event_catalog"
5483
- ]
5484
- },
5485
- "configuration": {
5486
- "type": "object",
5487
- "properties": {
5488
- "event_name": {
5489
- "type": "string",
5490
- "description": "Name of the Event Catalog event that starts this flow",
5491
- "example": "CustomerRequestSubmitted"
5492
- },
5493
- "event_version": {
5494
- "type": "string",
5495
- "description": "Event version (MAJOR.MINOR) this trigger is pinned to. Payloads published in a newer version are downgraded to this version before the flow runs, so field references in conditions and actions stay stable.\n",
5496
- "example": "1.1"
5497
- },
5498
- "entity_node_id": {
5499
- "type": "string",
5500
- "description": "Id of the cardinality-one node in the event's entity graph whose entity becomes the execution's main entity (the entity actions operate on).\n",
5501
- "example": "ticket"
5502
- },
5503
- "entity_schema": {
5504
- "type": "string",
5505
- "description": "Schema of the entity behind `entity_node_id`, denormalized from the event definition at configuration time",
5506
- "example": "ticket"
5507
- },
5508
- "ignore_automation_triggered": {
5509
- "type": "boolean",
5510
- "default": true,
5511
- "description": "When true (default), events that were emitted by an automation (`_trigger_source_type: automation`) do not start this flow. This prevents automation → event → automation chains unless explicitly enabled.\n"
5512
- }
5513
- },
5514
- "required": [
5515
- "event_name",
5516
- "event_version",
5517
- "entity_node_id",
5518
- "entity_schema"
5519
- ]
5520
- }
5521
- },
5522
- "required": [
5523
- "type",
5524
- "configuration"
5525
- ]
5526
- }
5527
- ],
5528
- "example": {
5529
- "id": "12d4f45a-1883-4841-a94c-5928cb338a94",
5530
- "type": "event_catalog",
5531
- "configuration": {
5532
- "event_name": "CustomerRequestSubmitted",
5533
- "event_version": "1.1",
5534
- "entity_node_id": "ticket",
5535
- "entity_schema": "ticket",
5536
- "ignore_automation_triggered": true
5537
- }
5538
- }
5539
- },
5540
5425
  "TriggerCondition": {
5541
5426
  "type": "object",
5542
5427
  "properties": {
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Journey API",
5
5
  "description": "API to configure journeys",
6
- "version": "1.5.0"
6
+ "version": "1.6.0"
7
7
  },
8
8
  "security": [
9
9
  {
@@ -124,6 +124,16 @@
124
124
  "default": 0
125
125
  }
126
126
  },
127
+ {
128
+ "name": "revision_id",
129
+ "in": "query",
130
+ "description": "Serve the named revision instead of the published version, so a save-and-continue session can stay on the revision it started on. Only revisions that have been published at least once are served on the public and portal routes; an unpublished revision is served to `EpilotAuth` callers with the edit permission and is otherwise unknown. Cannot be combined with the legacy `version` parameter.\n",
131
+ "required": false,
132
+ "schema": {
133
+ "type": "string",
134
+ "example": "42"
135
+ }
136
+ },
127
137
  {
128
138
  "name": "source",
129
139
  "in": "query",
@@ -155,6 +165,9 @@
155
165
  },
156
166
  {
157
167
  "$ref": "#/components/schemas/JourneyActivationGuarantee"
168
+ },
169
+ {
170
+ "$ref": "#/components/schemas/JourneyServedRevision"
158
171
  }
159
172
  ]
160
173
  }
@@ -2815,6 +2828,16 @@
2815
2828
  }
2816
2829
  ]
2817
2830
  },
2831
+ "JourneyServedRevision": {
2832
+ "description": "Which revision the runtime read served: the requested one, or the published version when no revision was requested. Absent while the journey has not adopted versioning and on legacy `version` reads.\n",
2833
+ "type": "object",
2834
+ "properties": {
2835
+ "revision_id": {
2836
+ "type": "string",
2837
+ "example": "42"
2838
+ }
2839
+ }
2840
+ },
2818
2841
  "JourneyActivationGuarantee": {
2819
2842
  "description": "Journeys read from the API always carry an explicit `settings.isActive`. The flag remains optional in request bodies.\n",
2820
2843
  "type": "object",
@@ -2896,6 +2919,11 @@
2896
2919
  "type": "number",
2897
2920
  "description": "Version of the entity-mapping config stored alongside this revision. Publishing the revision points the journey's automation at it.\n",
2898
2921
  "example": 12
2922
+ },
2923
+ "revision_name": {
2924
+ "type": "string",
2925
+ "description": "What this save changed, for the revision history to list. Distinct from `name`, which is the journey's own name. A publish replaces it with the version name.\n",
2926
+ "example": "Changes to Steps and Logic"
2899
2927
  }
2900
2928
  }
2901
2929
  }
@@ -3553,9 +3581,6 @@
3553
3581
  "servers": [
3554
3582
  {
3555
3583
  "url": "https://journey-config.sls.epilot.io"
3556
- },
3557
- {
3558
- "url": "https://journey-config.dev.sls.epilot.io"
3559
3584
  }
3560
3585
  ]
3561
3586
  }
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.158",
14
+ version: "0.1.160",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
@@ -31,7 +31,7 @@ var main = defineCommand({
31
31
  profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
32
  config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
33
33
  completion: () => import("../completion-6CAE47TY.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-6ENFMVHU.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-B6ZDZ7ZL.js").then((m) => m.default),
35
35
  "access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
36
36
  address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
37
37
  "address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
@@ -134,7 +134,7 @@ process.stderr.on("error", (err) => {
134
134
  if (err.code === "EPIPE") process.exit(0);
135
135
  throw err;
136
136
  });
137
- var VERSION = true ? "0.1.158" : (await null).default.version;
137
+ var VERSION = true ? "0.1.160" : (await null).default.version;
138
138
  var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
139
139
  process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
140
140
  var args = process.argv.slice(2);
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
72
72
  }
73
73
  });
74
74
  var getCurrentVersion = () => {
75
- if (true) return "0.1.158";
75
+ if (true) return "0.1.160";
76
76
  try {
77
77
  const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
78
78
  encoding: "utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/cli",
3
- "version": "0.1.158",
3
+ "version": "0.1.160",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {