@terros-inc/cli 1.0.4 → 1.0.5

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +121 -0
  3. package/package.json +1 -1
  4. package/terros.yml +22 -22
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Terros Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # Terros CLI
2
+
3
+ Command-line interface for the Terros Sales platform.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js 24 or newer
8
+ - A Terros account with access to the platform
9
+
10
+ ## Install
11
+
12
+ Install the CLI globally with your package manager:
13
+
14
+ ```sh
15
+ npm install -g @terros-inc/cli
16
+ ```
17
+
18
+ After installation, verify that the `terros` command is available:
19
+
20
+ ```sh
21
+ terros help
22
+ ```
23
+
24
+ ## Sign In
25
+
26
+ Authenticate before running Terros API commands:
27
+
28
+ ```sh
29
+ terros auth login
30
+ ```
31
+
32
+ The CLI opens a browser-based device login flow. Confirm that the code shown in
33
+ your browser matches the code printed in the terminal, then finish signing in.
34
+
35
+ To print the current API access token (for usage in scripts):
36
+
37
+ ```sh
38
+ terros auth token
39
+ ```
40
+
41
+ ## Find Commands
42
+
43
+ Terros CLI uses the pattern:
44
+
45
+ ```sh
46
+ terros <command> <subcommand> [parameters]
47
+ ```
48
+
49
+ List available commands:
50
+
51
+ ```sh
52
+ terros help
53
+ ```
54
+
55
+ List subcommands for a command:
56
+
57
+ ```sh
58
+ terros <command> help
59
+ ```
60
+
61
+ Show parameters for a subcommand:
62
+
63
+ ```sh
64
+ terros <command> <subcommand> help
65
+ ```
66
+
67
+ ## Run a Command
68
+
69
+ Pass parameters as flags:
70
+
71
+ ```sh
72
+ terros <command> <subcommand> --name "Acme Inc." --active true
73
+ ```
74
+
75
+ Parameter values are validated based on the Terros API schema. Supported values
76
+ include strings, numbers, booleans, arrays, and JSON objects.
77
+
78
+ Examples:
79
+
80
+ ```sh
81
+ terros <command> <subcommand> --count 10
82
+ terros <command> <subcommand> --active true
83
+ terros <command> <subcommand> --ids id_1,id_2,id_3
84
+ terros <command> <subcommand> --metadata '{"source":"cli"}'
85
+ ```
86
+
87
+ Responses are printed as formatted JSON.
88
+
89
+ ## Local Development
90
+
91
+ Install dependencies:
92
+
93
+ ```sh
94
+ pnpm install
95
+ ```
96
+
97
+ Build the CLI:
98
+
99
+ ```sh
100
+ pnpm build
101
+ ```
102
+
103
+ Run the CLI locally:
104
+
105
+ ```sh
106
+ node dist/index.js help
107
+ ```
108
+
109
+ The published `terros` executable loads the compiled code from `dist/index.js`,
110
+ so run `pnpm build` after changing TypeScript files.
111
+
112
+ ## Troubleshooting
113
+
114
+ If a command says the CLI is not authorized, sign in again:
115
+
116
+ ```sh
117
+ terros auth login
118
+ ```
119
+
120
+ If a token cannot be refreshed, the saved login may have expired. Run
121
+ `terros auth login` to create a new session.
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  "url": "git+https://github.com/terros-inc/cli.git"
45
45
  },
46
46
  "type": "module",
47
- "version": "1.0.4",
47
+ "version": "1.0.5",
48
48
  "scripts": {
49
49
  "fetch-openapi": "wget https://docs.terros.com/openapi/terros.yml",
50
50
  "build": "tsc",
package/terros.yml CHANGED
@@ -2922,9 +2922,9 @@ paths:
2922
2922
  evalDate: 9007199254740991
2923
2923
  teamId: Team.123
2924
2924
  categories: []
2925
- createdAt: 1781639069347
2925
+ createdAt: 1781654399759
2926
2926
  createdBy: U:123
2927
- updatedAt: 1781639069347
2927
+ updatedAt: 1781654399760
2928
2928
  updatedBy: U:123
2929
2929
  user:
2930
2930
  userId: U:123
@@ -2990,9 +2990,9 @@ paths:
2990
2990
  evalDate: 9007199254740991
2991
2991
  teamId: Team.123
2992
2992
  categories: []
2993
- createdAt: 1781639069347
2993
+ createdAt: 1781654399759
2994
2994
  createdBy: U:123
2995
- updatedAt: 1781639069347
2995
+ updatedAt: 1781654399760
2996
2996
  updatedBy: U:123
2997
2997
  user:
2998
2998
  userId: U:123
@@ -3199,9 +3199,9 @@ paths:
3199
3199
  evalDate: 9007199254740991
3200
3200
  teamId: Team.123
3201
3201
  categories: []
3202
- createdAt: 1781639069347
3202
+ createdAt: 1781654399759
3203
3203
  createdBy: U:123
3204
- updatedAt: 1781639069347
3204
+ updatedAt: 1781654399760
3205
3205
  updatedBy: U:123
3206
3206
  user:
3207
3207
  userId: U:123
@@ -4699,7 +4699,7 @@ paths:
4699
4699
  task:
4700
4700
  taskId: Task.123
4701
4701
  status: Completed
4702
- completedAt: 1781639069347
4702
+ completedAt: 1781654399759
4703
4703
  schema:
4704
4704
  type: object
4705
4705
  properties:
@@ -5667,6 +5667,8 @@ paths:
5667
5667
  $ref: "#/components/schemas/__schema961"
5668
5668
  kind:
5669
5669
  $ref: "#/components/schemas/__schema848"
5670
+ accessStatus:
5671
+ $ref: "#/components/schemas/__schema850"
5670
5672
  internalOwnerId:
5671
5673
  $ref: "#/components/schemas/__schema962"
5672
5674
  billingEmail:
@@ -5695,8 +5697,6 @@ paths:
5695
5697
  $ref: "#/components/schemas/companyId"
5696
5698
  stripeCustomerId:
5697
5699
  $ref: "#/components/schemas/__schema971"
5698
- accessStatus:
5699
- $ref: "#/components/schemas/__schema850"
5700
5700
  accessOverride:
5701
5701
  $ref: "#/components/schemas/__schema972"
5702
5702
  highestTeamLevel:
@@ -6842,8 +6842,8 @@ webhooks:
6842
6842
  email: jdoe@example.com
6843
6843
  evalState: Pending
6844
6844
  possible: 10
6845
- createdAt: "1781639069347"
6846
- updatedAt: "1781639069347"
6845
+ createdAt: "1781654399760"
6846
+ updatedAt: "1781654399760"
6847
6847
  Evaluation Updated:
6848
6848
  value:
6849
6849
  entity: Evaluation
@@ -6858,8 +6858,8 @@ webhooks:
6858
6858
  email: jdoe@example.com
6859
6859
  evalState: Pending
6860
6860
  possible: 10
6861
- createdAt: "1781639069347"
6862
- updatedAt: "1781639069347"
6861
+ createdAt: "1781654399760"
6862
+ updatedAt: "1781654399760"
6863
6863
  Evaluation Removed:
6864
6864
  value:
6865
6865
  entity: Evaluation
@@ -6974,8 +6974,8 @@ webhooks:
6974
6974
  longitude: -104.9942
6975
6975
  parentId: Team.AFCWest
6976
6976
  description: Professional American football team based in Denver, Colorado.
6977
- createdAt: 2026-06-16T19:44:29.344Z
6978
- updatedAt: 2026-06-16T19:44:29.344Z
6977
+ createdAt: 2026-06-16T23:59:59.756Z
6978
+ updatedAt: 2026-06-16T23:59:59.756Z
6979
6979
  members: []
6980
6980
  Team Updated:
6981
6981
  value:
@@ -6991,8 +6991,8 @@ webhooks:
6991
6991
  longitude: -104.9942
6992
6992
  parentId: Team.AFCWest
6993
6993
  description: Professional American football team based in Denver, Colorado.
6994
- createdAt: 2026-06-16T19:44:29.344Z
6995
- updatedAt: 2026-06-16T19:44:29.344Z
6994
+ createdAt: 2026-06-16T23:59:59.756Z
6995
+ updatedAt: 2026-06-16T23:59:59.756Z
6996
6996
  members:
6997
6997
  - userId: U:user123
6998
6998
  lastName: Smith
@@ -7102,8 +7102,8 @@ webhooks:
7102
7102
  email: john.smith@company.com
7103
7103
  firstName: John
7104
7104
  lastName: Smith
7105
- createdAt: "1781639069344"
7106
- updatedAt: "1781639069344"
7105
+ createdAt: "1781654399756"
7106
+ updatedAt: "1781654399756"
7107
7107
  User Updated:
7108
7108
  value:
7109
7109
  entity: User
@@ -7113,8 +7113,8 @@ webhooks:
7113
7113
  email: john.smith@company.com
7114
7114
  firstName: John
7115
7115
  lastName: Smith
7116
- createdAt: "1781639069344"
7117
- updatedAt: "1781639069344"
7116
+ createdAt: "1781654399756"
7117
+ updatedAt: "1781654399756"
7118
7118
  User Removed:
7119
7119
  value:
7120
7120
  entity: User
@@ -7187,7 +7187,7 @@ components:
7187
7187
  maximum: 8640000000000000
7188
7188
  title: Timestamp
7189
7189
  description: A timestamp in UTC milliseconds
7190
- example: 1781639069126
7190
+ example: 1781654399510
7191
7191
  latlng:
7192
7192
  type: object
7193
7193
  properties: