@epilot/cli 0.1.78 → 0.1.79

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.78 — CLI for epilot APIs
32
+ epilot v0.1.79 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -4252,7 +4252,7 @@
4252
4252
  },
4253
4253
  "password": {
4254
4254
  "type": "string",
4255
- "description": "Password of the portal user for confirmation.\nRequired unless a `changeEmail` portal extension hook with `require_password_confirmation` disabled is configured for the portal.\nAlso required by a `changeEmail` hook with `change_mode` set to `synchronous`, except for portal users whose identity is managed by an identity provider - an SSO login has no password to confirm.\n"
4255
+ "description": "Password of the portal user for confirmation.\nRequired unless a `changeEmail` portal extension hook with `require_password_confirmation` disabled is configured for the portal,\nor the portal user's identity is managed by an identity provider - an SSO login has no password to confirm.\n"
4256
4256
  }
4257
4257
  }
4258
4258
  }
@@ -7977,6 +7977,75 @@
7977
7977
  }
7978
7978
  }
7979
7979
  },
7980
+ "/v2/portal/entity/{slug}/{id}/workflows/linearized": {
7981
+ "get": {
7982
+ "operationId": "getEntityPortalWorkflows",
7983
+ "summary": "Get linearized workflows for an entity",
7984
+ "description": "Get all portal-relevant workflows associated with an entity (requires access to the entity),\nlinearized by the Workflows API into a flat, ordered list of portal-visible tasks.\n\nUnlike `getEntityWorkflows`, this endpoint returns a single uniform shape for both legacy\n(V1) workflow executions and graph-based (V2) flow executions — the execution graph is\nalready resolved server-side (active path, task reachability, chronological ordering), so\nclients can render a timeline without any graph traversal logic.\n\nTasks carry the config of both portal audiences (`ecp` and `installer`); clients filter\nper their configured audience, so one response serves every block on a page.\n",
7985
+ "tags": [
7986
+ "ECP"
7987
+ ],
7988
+ "security": [
7989
+ {
7990
+ "PortalAuth": []
7991
+ }
7992
+ ],
7993
+ "parameters": [
7994
+ {
7995
+ "in": "path",
7996
+ "name": "slug",
7997
+ "required": true,
7998
+ "schema": {
7999
+ "type": "string",
8000
+ "description": "Schema slug of the entity",
8001
+ "example": "opportunity"
8002
+ }
8003
+ },
8004
+ {
8005
+ "in": "path",
8006
+ "name": "id",
8007
+ "required": true,
8008
+ "schema": {
8009
+ "type": "string",
8010
+ "description": "ID of the entity",
8011
+ "example": "abc123"
8012
+ }
8013
+ }
8014
+ ],
8015
+ "responses": {
8016
+ "200": {
8017
+ "description": "Portal-relevant workflows for the entity, each with linearized tasks",
8018
+ "content": {
8019
+ "application/json": {
8020
+ "schema": {
8021
+ "type": "object",
8022
+ "properties": {
8023
+ "portal_workflows": {
8024
+ "type": "array",
8025
+ "items": {
8026
+ "$ref": "#/components/schemas/PortalWorkflow"
8027
+ }
8028
+ }
8029
+ }
8030
+ }
8031
+ }
8032
+ }
8033
+ },
8034
+ "401": {
8035
+ "$ref": "#/components/responses/Unauthorized"
8036
+ },
8037
+ "403": {
8038
+ "$ref": "#/components/responses/Forbidden"
8039
+ },
8040
+ "404": {
8041
+ "$ref": "#/components/responses/NotFound"
8042
+ },
8043
+ "500": {
8044
+ "$ref": "#/components/responses/InternalServerError"
8045
+ }
8046
+ }
8047
+ }
8048
+ },
7980
8049
  "/v2/portal/metering/reading/photo": {
7981
8050
  "post": {
7982
8051
  "operationId": "uploadMeterReadingPhoto",
@@ -14623,6 +14692,214 @@
14623
14692
  "completedTime": "2024-01-13T05:18:43.827Z"
14624
14693
  }
14625
14694
  },
14695
+ "PortalWorkflow": {
14696
+ "type": "object",
14697
+ "description": "A portal-facing projection of a workflow execution (V1 or V2), with the execution\ngraph already linearized by the Workflows API into a flat, ordered list of\nportal-visible tasks.\n",
14698
+ "properties": {
14699
+ "id": {
14700
+ "type": "string",
14701
+ "description": "Id of the workflow / flow execution"
14702
+ },
14703
+ "definition_id": {
14704
+ "type": "string",
14705
+ "description": "Id of the workflow definition / flow template this execution was created from"
14706
+ },
14707
+ "name": {
14708
+ "type": "string"
14709
+ },
14710
+ "status": {
14711
+ "type": "string",
14712
+ "enum": [
14713
+ "STARTED",
14714
+ "DONE",
14715
+ "CLOSED"
14716
+ ]
14717
+ },
14718
+ "version": {
14719
+ "type": "integer",
14720
+ "description": "2 = legacy V1 workflow execution (linear model), 3 = V2 flow execution (graph model)",
14721
+ "enum": [
14722
+ 2,
14723
+ 3
14724
+ ]
14725
+ },
14726
+ "created_at": {
14727
+ "type": "string",
14728
+ "description": "Creation timestamp, doubles as started time"
14729
+ },
14730
+ "updated_at": {
14731
+ "type": "string",
14732
+ "description": "Last update timestamp"
14733
+ },
14734
+ "completed_at": {
14735
+ "type": "string",
14736
+ "description": "Timestamp when the execution was completed, if it is"
14737
+ },
14738
+ "due_date": {
14739
+ "type": "string"
14740
+ },
14741
+ "assigned_to": {
14742
+ "type": "array",
14743
+ "items": {
14744
+ "type": "string"
14745
+ }
14746
+ },
14747
+ "contexts": {
14748
+ "type": "array",
14749
+ "items": {
14750
+ "type": "object",
14751
+ "properties": {
14752
+ "entity_id": {
14753
+ "type": "string"
14754
+ },
14755
+ "entity_schema": {
14756
+ "type": "string"
14757
+ },
14758
+ "is_primary": {
14759
+ "type": "boolean"
14760
+ }
14761
+ }
14762
+ }
14763
+ },
14764
+ "is_path_complete": {
14765
+ "type": "boolean",
14766
+ "description": "True when the linearized path reached the end of the execution graph. False when an\nunevaluated decision task was encountered, meaning additional tasks may appear once\nthe decision is resolved (the returned tasks are still the guaranteed active path).\nAlways true for V1 executions.\n"
14767
+ },
14768
+ "tasks": {
14769
+ "type": "array",
14770
+ "description": "Portal-visible tasks in linear (timeline) order",
14771
+ "items": {
14772
+ "$ref": "#/components/schemas/PortalWorkflowTask"
14773
+ }
14774
+ }
14775
+ },
14776
+ "required": [
14777
+ "id",
14778
+ "name",
14779
+ "status",
14780
+ "version",
14781
+ "is_path_complete",
14782
+ "tasks"
14783
+ ]
14784
+ },
14785
+ "PortalWorkflowTask": {
14786
+ "type": "object",
14787
+ "description": "A single portal-visible task of a linearized workflow execution",
14788
+ "properties": {
14789
+ "id": {
14790
+ "type": "string",
14791
+ "description": "Id of the underlying task (V2) or step (V1)"
14792
+ },
14793
+ "name": {
14794
+ "type": "string",
14795
+ "description": "Internal task/step name (fallback label when the portal config has none)"
14796
+ },
14797
+ "order": {
14798
+ "type": "integer",
14799
+ "description": "Zero-based position of the task in the linearized timeline"
14800
+ },
14801
+ "status": {
14802
+ "type": "string",
14803
+ "enum": [
14804
+ "COMPLETED",
14805
+ "SKIPPED",
14806
+ "IN_PROGRESS",
14807
+ "PENDING"
14808
+ ],
14809
+ "description": "Normalized task status:\n- COMPLETED / SKIPPED: the task is done (skipped tasks count as done for progress)\n- IN_PROGRESS: the task has been reached and work has started\n- PENDING: the task has not been completed yet\n"
14810
+ },
14811
+ "is_active": {
14812
+ "type": "boolean",
14813
+ "description": "True when the task has been reached in the execution — all predecessor tasks on its\npath are completed/skipped — so the portal user can act on it (e.g. start its journey).\nTasks that are only part of the projected future path are returned with is_active false.\n"
14814
+ },
14815
+ "ecp": {
14816
+ "$ref": "#/components/schemas/PortalTaskConfig"
14817
+ },
14818
+ "installer": {
14819
+ "$ref": "#/components/schemas/PortalTaskConfig"
14820
+ },
14821
+ "journey": {
14822
+ "type": "object",
14823
+ "description": "Journey linked to the task, if any",
14824
+ "properties": {
14825
+ "id": {
14826
+ "type": "string"
14827
+ },
14828
+ "journeyId": {
14829
+ "type": "string"
14830
+ },
14831
+ "name": {
14832
+ "type": "string"
14833
+ },
14834
+ "complete_task_automatically": {
14835
+ "type": "boolean",
14836
+ "description": "If true, the task is auto completed when the journey is completed"
14837
+ }
14838
+ }
14839
+ },
14840
+ "assigned_to": {
14841
+ "type": "array",
14842
+ "items": {
14843
+ "type": "string"
14844
+ }
14845
+ },
14846
+ "phase_id": {
14847
+ "type": "string",
14848
+ "description": "Id of the phase the underlying task belongs to, if any (V2 only)"
14849
+ },
14850
+ "phase_name": {
14851
+ "type": "string",
14852
+ "description": "Name of the phase the underlying task belongs to, if any (V2 only)"
14853
+ },
14854
+ "completed_at": {
14855
+ "type": "string",
14856
+ "description": "Timestamp when the task was completed or skipped"
14857
+ },
14858
+ "updated_at": {
14859
+ "type": "string",
14860
+ "description": "Last update timestamp of the underlying task/step"
14861
+ }
14862
+ },
14863
+ "required": [
14864
+ "id",
14865
+ "name",
14866
+ "order",
14867
+ "status",
14868
+ "is_active"
14869
+ ]
14870
+ },
14871
+ "PortalTaskConfig": {
14872
+ "type": "object",
14873
+ "description": "Portal-specific (ECP / installer) display config of a workflow task",
14874
+ "properties": {
14875
+ "enabled": {
14876
+ "type": "boolean"
14877
+ },
14878
+ "label": {
14879
+ "type": "string"
14880
+ },
14881
+ "description": {
14882
+ "type": "string"
14883
+ },
14884
+ "journey": {
14885
+ "type": "object",
14886
+ "properties": {
14887
+ "id": {
14888
+ "type": "string"
14889
+ },
14890
+ "journeyId": {
14891
+ "type": "string"
14892
+ },
14893
+ "name": {
14894
+ "type": "string"
14895
+ },
14896
+ "complete_task_automatically": {
14897
+ "type": "boolean"
14898
+ }
14899
+ }
14900
+ }
14901
+ }
14902
+ },
14626
14903
  "BaseBillingEvent": {
14627
14904
  "allOf": [
14628
14905
  {
@@ -15492,7 +15769,7 @@
15492
15769
  },
15493
15770
  "require_password_confirmation": {
15494
15771
  "type": "boolean",
15495
- "description": "Whether the portal user must confirm their current password before the email change is handed over to the third-party system.\nAlso required when `change_mode` is `synchronous`, except for portal users whose identity is managed by an identity provider - an SSO login has no password to confirm.\n",
15772
+ "description": "Whether the portal user must confirm their current password before the email change is handed over to the third-party system.\nNot required for portal users whose identity is managed by an identity provider - an SSO login has no password to confirm.\n",
15496
15773
  "default": true
15497
15774
  },
15498
15775
  "explanation": {
@@ -16832,7 +17109,7 @@
16832
17109
  },
16833
17110
  "require_password_confirmation": {
16834
17111
  "type": "boolean",
16835
- "description": "Whether the portal user must confirm their current password before the change email request is handed over to the third-party system. When true, the portal collects and verifies the current password before calling the hook. Treated as true when `change_mode` is `synchronous`, since the portal re-creates the login with the confirmed password. Skipped either way for portal users whose identity is managed by an identity provider: an SSO login has no password to confirm.\n",
17112
+ "description": "Whether the portal user must confirm their current password before the change email request is handed over to the third-party system. When true, the portal collects and verifies the current password before calling the hook. Skipped for portal users whose identity is managed by an identity provider: an SSO login has no password to confirm. When no password is confirmed and `change_mode` is `synchronous`, the re-created login gets a random password and the portal user signs in through their identity provider, or sets a new password via the email code flow.\n",
16836
17113
  "default": true
16837
17114
  },
16838
17115
  "explanation": {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "../chunk-P2TAWLHV.js";
4
+ } from "../chunk-VQGZE3VB.js";
5
5
 
6
6
  // bin/epilot.ts
7
7
  import { runMain } from "citty";
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.78",
14
+ version: "0.1.79",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
@@ -30,8 +30,8 @@ var main = defineCommand({
30
30
  auth: () => import("../auth-4HG7B2GC.js").then((m) => m.default),
31
31
  profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
32
  config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
33
- completion: () => import("../completion-FAY7S3QS.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-33QB7A5M.js").then((m) => m.default),
33
+ completion: () => import("../completion-QRRDVEAW.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-I3C24CLS.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,13 +134,13 @@ 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.78" : (await null).default.version;
137
+ var VERSION = true ? "0.1.79" : (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);
141
141
  var completionsIdx = args.indexOf("--_completions");
142
142
  if (completionsIdx >= 0) {
143
- const { handleCompletions } = await import("../completion-FAY7S3QS.js");
143
+ const { handleCompletions } = await import("../completion-QRRDVEAW.js");
144
144
  handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
145
145
  process.exit(0);
146
146
  }
@@ -280,7 +280,7 @@ var API_LIST = [
280
280
  kebabName: "customer-portal",
281
281
  title: "Portal API",
282
282
  serverUrl: "https://customer-portal-api.sls.epilot.io",
283
- operationCount: 159,
283
+ operationCount: 160,
284
284
  operationIds: [
285
285
  "upsertPortal",
286
286
  "createUser",
@@ -396,6 +396,7 @@ var API_LIST = [
396
396
  "getAutomationContext",
397
397
  "updateWorkflowStepAsDone",
398
398
  "getEntityWorkflows",
399
+ "getEntityPortalWorkflows",
399
400
  "uploadMeterReadingPhoto",
400
401
  "createMeterReading",
401
402
  "getAllowedMeterReadingRange",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "./chunk-P2TAWLHV.js";
4
+ } from "./chunk-VQGZE3VB.js";
5
5
  import {
6
6
  DIM,
7
7
  GREEN,
@@ -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.78";
75
+ if (true) return "0.1.79";
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.78",
3
+ "version": "0.1.79",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {