@getfrontline/cli 1.0.3 → 1.0.4
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 +5 -5
- package/dist/commands/object/activity.d.ts +3 -0
- package/dist/commands/object/activity.d.ts.map +1 -0
- package/dist/commands/object/{note.js → activity.js} +24 -19
- package/dist/commands/object/activity.js.map +1 -0
- package/dist/commands/object/export.js +3 -3
- package/dist/commands/object/field.js +5 -5
- package/dist/commands/object/index.js +10 -10
- package/dist/commands/object/index.js.map +1 -1
- package/dist/commands/object/option.js +4 -4
- package/dist/commands/object/record-type.js +4 -4
- package/dist/commands/object/record.js +8 -8
- package/dist/commands/object/relation.js +4 -4
- package/dist/commands/object/view.js +9 -9
- package/dist/commands/table/index.d.ts.map +1 -1
- package/dist/commands/table/index.js +0 -4
- package/dist/commands/table/index.js.map +1 -1
- package/dist/max/ui/banner.js +15 -15
- package/dist/skills/aggregations/SKILL.md +7 -7
- package/dist/skills/auth-and-profiles/SKILL.md +1 -1
- package/dist/skills/crm-setup/SKILL.md +66 -48
- package/dist/skills/crud-operations/SKILL.md +2 -2
- package/dist/skills/export-and-delete/SKILL.md +5 -5
- package/dist/skills/files/SKILL.md +4 -4
- package/dist/skills/filter-and-query/SKILL.md +7 -7
- package/dist/skills/frontline-internals/SKILL.md +7 -7
- package/dist/skills/notes-and-tasks/SKILL.md +29 -29
- package/dist/skills/pipeline-setup/SKILL.md +13 -13
- package/dist/skills/relations/SKILL.md +15 -15
- package/dist/skills/resource-creation/SKILL.md +70 -1
- package/dist/skills/schema-design/SKILL.md +21 -14
- package/package.json +51 -51
- package/dist/commands/object/note.d.ts +0 -3
- package/dist/commands/object/note.d.ts.map +0 -1
- package/dist/commands/object/note.js.map +0 -1
- package/dist/commands/table/note.d.ts +0 -3
- package/dist/commands/table/note.d.ts.map +0 -1
- package/dist/commands/table/note.js +0 -62
- package/dist/commands/table/note.js.map +0 -1
- package/dist/commands/table/task.d.ts +0 -3
- package/dist/commands/table/task.d.ts.map +0 -1
- package/dist/commands/table/task.js +0 -88
- package/dist/commands/table/task.js.map +0 -1
|
@@ -34,7 +34,7 @@ frontline object field create <source-obj> --data '{
|
|
|
34
34
|
Before working with relations, inspect the object schema to find relation names:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
frontline object schema
|
|
37
|
+
frontline object schema people
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The output includes a `relations` array:
|
|
@@ -44,11 +44,11 @@ The output includes a `relations` array:
|
|
|
44
44
|
"relations": [
|
|
45
45
|
{
|
|
46
46
|
"name": "company",
|
|
47
|
-
"target": "
|
|
47
|
+
"target": "companies",
|
|
48
48
|
"mode": "multi",
|
|
49
49
|
"display_field": "Name"
|
|
50
50
|
},
|
|
51
|
-
{ "name": "deals", "target": "
|
|
51
|
+
{ "name": "deals", "target": "deals", "mode": "multi", "display_field": "Name" }
|
|
52
52
|
]
|
|
53
53
|
}
|
|
54
54
|
```
|
|
@@ -65,7 +65,7 @@ frontline object relation link <object> <source-id> <relation> <target-id>
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
# Link a person to a company
|
|
68
|
-
frontline object relation link
|
|
68
|
+
frontline object relation link people 6625abc123def456 Companies 6625def789abc012
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
- **Idempotent**: linking the same target twice won't create duplicates.
|
|
@@ -81,7 +81,7 @@ frontline object relation unlink <object> <source-id> <relation> <target-id>
|
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
83
|
# Remove person from company
|
|
84
|
-
frontline object relation unlink
|
|
84
|
+
frontline object relation unlink people 6625abc123def456 Companies 6625def789abc012
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
## Get Related Records (Forward Lookup)
|
|
@@ -94,7 +94,7 @@ frontline object relation get <object> <source-id> <relation>
|
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
96
|
# Get all companies linked to this person
|
|
97
|
-
frontline object relation get
|
|
97
|
+
frontline object relation get people 6625abc123def456 Companies
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Returns an array of related records with their full data.
|
|
@@ -109,10 +109,10 @@ frontline object relation find-by <object> <relation> <target-id> [--page N] [--
|
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
# Find all people linked to a specific company
|
|
112
|
-
frontline object relation find-by
|
|
112
|
+
frontline object relation find-by people Companies 6625def789abc012
|
|
113
113
|
|
|
114
114
|
# With pagination
|
|
115
|
-
frontline object relation find-by
|
|
115
|
+
frontline object relation find-by people Companies 6625def789abc012 --page 1 --page-size 20
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Returns a paginated result: `{ rows, total_count, total_pages, current_page }`.
|
|
@@ -121,23 +121,23 @@ Returns a paginated result: `{ rows, total_count, total_pages, current_page }`.
|
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
123
|
# 1. Show current company links
|
|
124
|
-
frontline object relation get
|
|
124
|
+
frontline object relation get people <person-id> Companies
|
|
125
125
|
|
|
126
126
|
# 2. Unlink from old company
|
|
127
|
-
frontline object relation unlink
|
|
127
|
+
frontline object relation unlink people <person-id> Companies <old-company-id>
|
|
128
128
|
|
|
129
129
|
# 3. Link to new company
|
|
130
|
-
frontline object relation link
|
|
130
|
+
frontline object relation link people <person-id> Companies <new-company-id>
|
|
131
131
|
|
|
132
132
|
# 4. Verify
|
|
133
|
-
frontline object relation get
|
|
133
|
+
frontline object relation get people <person-id> Companies
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
## Workflow: Find All Deals for a Company
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
139
|
# Find deals linked to a company (reverse: deals that point to this company)
|
|
140
|
-
frontline object relation find-by
|
|
140
|
+
frontline object relation find-by deals Company <company-id>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
## Filtering by Relation
|
|
@@ -147,10 +147,10 @@ You can also filter records by relations using the query system
|
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
149
|
# Find people with no company
|
|
150
|
-
frontline object record list
|
|
150
|
+
frontline object record list people --query '{"path": "[Company]", "operator": "isNull"}'
|
|
151
151
|
|
|
152
152
|
# Find people linked to specific companies
|
|
153
|
-
frontline object record list
|
|
153
|
+
frontline object record list people --query '{
|
|
154
154
|
"path": "[Company]",
|
|
155
155
|
"operator": "containsAny",
|
|
156
156
|
"value": ["6625def789abc012", "6625def789abc999"]
|
|
@@ -20,11 +20,13 @@ This skill covers the creation of top-level entities: **Tables** and **Objects**
|
|
|
20
20
|
## Creating a Table
|
|
21
21
|
|
|
22
22
|
To create a new data table, use `frontline table create`. You MUST provide at least one column in the `--data` payload.
|
|
23
|
+
Tables use **emoji characters** for their icon.
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
26
|
frontline table create <name> --data '{
|
|
26
27
|
"displayName": "Display Name",
|
|
27
28
|
"emoji": "📁",
|
|
29
|
+
"icon_color": "blue",
|
|
28
30
|
"columns": [
|
|
29
31
|
{ "name": "Name", "type": "string", "metadata": { "format": "text" } }
|
|
30
32
|
]
|
|
@@ -36,6 +38,8 @@ frontline table create <name> --data '{
|
|
|
36
38
|
```bash
|
|
37
39
|
frontline table create shipments --data '{
|
|
38
40
|
"displayName": "Shipments",
|
|
41
|
+
"emoji": "🚚",
|
|
42
|
+
"icon_color": "orange",
|
|
39
43
|
"columns": [
|
|
40
44
|
{ "name": "Cargo", "type": "string", "metadata": { "format": "text" } },
|
|
41
45
|
{ "name": "Weight", "type": "number", "metadata": { "format": "decimal", "decimals": 2 } }
|
|
@@ -46,11 +50,13 @@ frontline table create shipments --data '{
|
|
|
46
50
|
## Creating a Custom Object
|
|
47
51
|
|
|
48
52
|
To create a new custom object, use `frontline object create`. This creates a more robust entity that supports multiple record types.
|
|
53
|
+
Objects use **icon keys** (not emoji characters) for their icon — see the Available Icons section below.
|
|
49
54
|
|
|
50
55
|
```bash
|
|
51
56
|
frontline object create <name> --data '{
|
|
52
57
|
"displayName": "Display Name",
|
|
53
|
-
"emoji": "
|
|
58
|
+
"emoji": "ticket",
|
|
59
|
+
"icon_color": "amber",
|
|
54
60
|
"columns": [
|
|
55
61
|
{ "name": "Subject", "type": "string", "metadata": { "format": "text" } }
|
|
56
62
|
]
|
|
@@ -62,6 +68,8 @@ frontline object create <name> --data '{
|
|
|
62
68
|
```bash
|
|
63
69
|
frontline object create tickets --data '{
|
|
64
70
|
"displayName": "Support Tickets",
|
|
71
|
+
"emoji": "life-buoy",
|
|
72
|
+
"icon_color": "amber",
|
|
65
73
|
"columns": [
|
|
66
74
|
{ "name": "Title", "type": "string", "metadata": { "format": "text" } },
|
|
67
75
|
{ "name": "Priority", "type": "select", "metadata": { "mode": "singleSelect" } }
|
|
@@ -74,6 +82,67 @@ frontline object create tickets --data '{
|
|
|
74
82
|
1. **Name (slug)**: Lowercase, alphanumeric, and underscores only. E.g., `sales_leads`, `shipments_v2`.
|
|
75
83
|
2. **Display Name**: Readable text with spaces. E.g., `Sales Leads`, `Shipments V2`.
|
|
76
84
|
|
|
85
|
+
## Available Icons (Objects only)
|
|
86
|
+
|
|
87
|
+
Objects use the `emoji` field with a validated icon key. Tables use regular emoji characters instead.
|
|
88
|
+
|
|
89
|
+
Use the `emoji` field to set an object's icon. The value must be one of the valid icon keys:
|
|
90
|
+
|
|
91
|
+
`home`, `user`, `users`, `contact-book`, `building`, `building-2`, `briefcase`, `agreement`,
|
|
92
|
+
`handshake`, `legal-doc`, `legal-hammer`, `shopping`, `cart`, `store`, `invoice`, `credit-card`,
|
|
93
|
+
`coins`, `wallet`, `money-bag`, `ticket`, `life-buoy`, `support`, `headset`, `task`, `clipboard`,
|
|
94
|
+
`file`, `folder`, `book`, `book-open`, `bookmark`, `mail`, `call`, `chat`, `calendar`, `clock`,
|
|
95
|
+
`timer`, `hourglass`, `location`, `maps`, `globe`, `earth`, `link`, `tag`, `flag`, `chart`,
|
|
96
|
+
`pie-chart`, `target`, `megaphone`, `rocket`, `idea`, `magnet`, `star`, `award`, `medal`,
|
|
97
|
+
`badge`, `certificate`, `crown`, `diamond`, `gift`, `percent`, `heart`, `hospital`, `stethoscope`,
|
|
98
|
+
`shield`, `lock`, `key`, `fingerprint`, `umbrella`, `settings`, `edit`, `wrench`, `code`, `puzzle`,
|
|
99
|
+
`database`, `layers`, `hierarchy`, `pipeline`, `package`, `truck`, `car`, `bicycle`, `bus`,
|
|
100
|
+
`property`, `school`, `graduate`, `plant`, `leaf`, `fire`, `sun`, `moon`, `image`, `video`,
|
|
101
|
+
`music`, `mic`, `camera`, `paint`, `compass`, `anchor`, `zap`, `flash`, `notification`, `user-add`,
|
|
102
|
+
`repeat`, `cloud`, `wifi`, `printer`, `airplane`, `restaurant`, `coffee`, `phone`, `analytics`,
|
|
103
|
+
`pulse`, `contracts`, `delivery`, `receipt`, `qr-code`, `barcode`, `calculator`, `download`, `upload`,
|
|
104
|
+
`filter`, `search`, `view`, `share`, `archive`, `dumbbell`, `brain`, `atom`, `chip`, `robot`,
|
|
105
|
+
`satellite`, `factory`, `warehouse`, `mountain`, `tree`, `flower`, `drone`, `gamepad`, `safe`,
|
|
106
|
+
`label`, `stamp`, `thumbs-up`, `smile`, `recycle`, `laptop`, `tv`, `headphones`, `speaker`,
|
|
107
|
+
`alarm`, `glasses`, `flashlight`, `feather`, `id-card`, `loyalty`, `coupon`, `presentation`,
|
|
108
|
+
`ruler`, `highlighter`, `passport`, `bitcoin`, `fuel`, `luggage`, `bone`, `whistle`, `sofa`
|
|
109
|
+
|
|
110
|
+
## Available Icon Colors
|
|
111
|
+
|
|
112
|
+
Use the `icon_color` field to set the icon color. You can use a **color name** (case-insensitive) or a **hex code**:
|
|
113
|
+
|
|
114
|
+
| Name | Hex |
|
|
115
|
+
| ------- | --------- |
|
|
116
|
+
| red | `#f87171` |
|
|
117
|
+
| orange | `#fb923c` |
|
|
118
|
+
| amber | `#fbbf24` |
|
|
119
|
+
| yellow | `#facc15` |
|
|
120
|
+
| lime | `#a3e635` |
|
|
121
|
+
| green | `#4ade80` |
|
|
122
|
+
| emerald | `#34d399` |
|
|
123
|
+
| teal | `#2dd4bf` |
|
|
124
|
+
| cyan | `#22d3ee` |
|
|
125
|
+
| sky | `#38bdf8` |
|
|
126
|
+
| blue | `#60a5fa` |
|
|
127
|
+
| indigo | `#818cf8` |
|
|
128
|
+
| violet | `#a78bfa` |
|
|
129
|
+
| purple | `#c084fc` |
|
|
130
|
+
| pink | `#f472b6` |
|
|
131
|
+
| rose | `#fb7185` |
|
|
132
|
+
|
|
133
|
+
## Record Type Icons
|
|
134
|
+
|
|
135
|
+
Record types on objects also support `emoji` and `icon_color`. If omitted, they inherit from the default record type or the parent object.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
frontline object record-type create deals --data '{
|
|
139
|
+
"name": "renewal",
|
|
140
|
+
"displayName": "Renewal",
|
|
141
|
+
"emoji": "repeat",
|
|
142
|
+
"icon_color": "teal"
|
|
143
|
+
}'
|
|
144
|
+
```
|
|
145
|
+
|
|
77
146
|
## Adding More Fields
|
|
78
147
|
|
|
79
148
|
Once the entity is created, you can add more fields using the `field create` subcommand:
|
|
@@ -21,15 +21,22 @@ Frontline CLI. Read this before creating or modifying fields on any table or obj
|
|
|
21
21
|
| **Object** | Business entities, record types, pipeln | `object create` |
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
# Example: Create a new custom object
|
|
24
|
+
# Example: Create a new custom object (with icon and color)
|
|
25
25
|
frontline object create <name> --data '{
|
|
26
26
|
"displayName": "My Object",
|
|
27
|
+
"emoji": "briefcase",
|
|
28
|
+
"icon_color": "blue",
|
|
27
29
|
"columns": [
|
|
28
30
|
{ "name": "Title", "type": "string", "metadata": { "format": "text" } }
|
|
29
31
|
]
|
|
30
32
|
}'
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
> **Note:** Objects use icon keys (e.g. `briefcase`, `rocket`, `chart`) for the `emoji` field.
|
|
36
|
+
> Tables use regular emoji characters (e.g. `📁`, `🚚`) instead.
|
|
37
|
+
> Both support `icon_color` with a color name.
|
|
38
|
+
> See the `resource-creation` skill for the full icon and color reference.
|
|
39
|
+
|
|
33
40
|
## Field Type Decision Tree
|
|
34
41
|
|
|
35
42
|
```
|
|
@@ -174,17 +181,17 @@ frontline object option create <obj> <field-id> --data '{ "name": "Low", "color"
|
|
|
174
181
|
A single-select field with ordered stages:
|
|
175
182
|
|
|
176
183
|
```bash
|
|
177
|
-
frontline object field create
|
|
184
|
+
frontline object field create deals --data '{
|
|
178
185
|
"name": "Stage",
|
|
179
186
|
"type": "select",
|
|
180
187
|
"metadata": { "mode": "singleSelect" }
|
|
181
188
|
}'
|
|
182
189
|
# Then add stages in order:
|
|
183
|
-
frontline object option create
|
|
184
|
-
frontline object option create
|
|
185
|
-
frontline object option create
|
|
186
|
-
frontline object option create
|
|
187
|
-
frontline object option create
|
|
190
|
+
frontline object option create deals <field-id> --data '{"name": "Lead", "color": "Gray"}'
|
|
191
|
+
frontline object option create deals <field-id> --data '{"name": "Qualified", "color": "Sky"}'
|
|
192
|
+
frontline object option create deals <field-id> --data '{"name": "Proposal", "color": "Amber"}'
|
|
193
|
+
frontline object option create deals <field-id> --data '{"name": "Won", "color": "Emerald"}'
|
|
194
|
+
frontline object option create deals <field-id> --data '{"name": "Lost", "color": "Red"}'
|
|
188
195
|
```
|
|
189
196
|
|
|
190
197
|
### 2. Contact Info Set
|
|
@@ -236,28 +243,28 @@ Field names are **display names** shown in the UI. Use natural, readable names.
|
|
|
236
243
|
|
|
237
244
|
```bash
|
|
238
245
|
# 1. Check what fields already exist
|
|
239
|
-
frontline object field list
|
|
246
|
+
frontline object field list companies
|
|
240
247
|
|
|
241
248
|
# 2. Check schema for relations
|
|
242
|
-
frontline object schema
|
|
249
|
+
frontline object schema companies
|
|
243
250
|
|
|
244
251
|
# 3. Add new fields — only add what's missing
|
|
245
|
-
frontline object field create
|
|
252
|
+
frontline object field create companies --data '{
|
|
246
253
|
"name": "Annual Revenue",
|
|
247
254
|
"type": "number",
|
|
248
255
|
"metadata": { "format": "currency", "currency": "USD", "decimals": 0 }
|
|
249
256
|
}'
|
|
250
257
|
|
|
251
258
|
# 4. Add a categorization field
|
|
252
|
-
frontline object field create
|
|
259
|
+
frontline object field create companies --data '{
|
|
253
260
|
"name": "Industry",
|
|
254
261
|
"type": "select",
|
|
255
262
|
"metadata": { "mode": "singleSelect" }
|
|
256
263
|
}'
|
|
257
264
|
# Add options
|
|
258
|
-
frontline object option create
|
|
259
|
-
frontline object option create
|
|
265
|
+
frontline object option create companies <field-id> --data '{"name":"Technology","color":"Sky"}'
|
|
266
|
+
frontline object option create companies <field-id> --data '{"name":"Finance","color":"Amber"}'
|
|
260
267
|
|
|
261
268
|
# 5. Verify the final schema
|
|
262
|
-
frontline object field list
|
|
269
|
+
frontline object field list companies
|
|
263
270
|
```
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@getfrontline/cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal",
|
|
5
|
-
"private": false,
|
|
6
|
-
"type": "commonjs",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"bin": {
|
|
10
|
-
"frontline": "dist/index.js",
|
|
11
|
-
"max": "dist/max.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "node ./scripts/clean.mjs && tsc -p tsconfig.json && node ./scripts/addShebang.mjs && node ./scripts/copyStatic.mjs",
|
|
18
|
-
"dev:frontline": "ts-node src/index.ts",
|
|
19
|
-
"dev:max": "ts-node src/max.ts",
|
|
20
|
-
"postinstall": "node dist/scripts/postinstall.js || true",
|
|
21
|
-
"pack": "npm pack --dry-run",
|
|
22
|
-
"prepublishOnly": "npm run build"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"frontline",
|
|
26
|
-
"cli",
|
|
27
|
-
"api",
|
|
28
|
-
"max",
|
|
29
|
-
"agents",
|
|
30
|
-
"getfrontline",
|
|
31
|
-
"workflows",
|
|
32
|
-
"crm"
|
|
33
|
-
],
|
|
34
|
-
"license": "MIT",
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"chalk": "^4.1.2",
|
|
37
|
-
"commander": "^13.1.0",
|
|
38
|
-
"conf": "^10.2.0",
|
|
39
|
-
"ora": "^5.4.1",
|
|
40
|
-
"terminal-image": "^3.1.1"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@types/js-yaml": "^4.0.9",
|
|
44
|
-
"@types/node": "^22.0.0",
|
|
45
|
-
"ts-node": "^10.9.2",
|
|
46
|
-
"typescript": "^5.7.0"
|
|
47
|
-
},
|
|
48
|
-
"engines": {
|
|
49
|
-
"node": ">=18.0.0"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@getfrontline/cli",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"frontline": "dist/index.js",
|
|
11
|
+
"max": "dist/max.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "node ./scripts/clean.mjs && tsc -p tsconfig.json && node ./scripts/addShebang.mjs && node ./scripts/copyStatic.mjs",
|
|
18
|
+
"dev:frontline": "ts-node src/index.ts",
|
|
19
|
+
"dev:max": "ts-node src/max.ts",
|
|
20
|
+
"postinstall": "node dist/scripts/postinstall.js || true",
|
|
21
|
+
"pack": "npm pack --dry-run",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"frontline",
|
|
26
|
+
"cli",
|
|
27
|
+
"api",
|
|
28
|
+
"max",
|
|
29
|
+
"agents",
|
|
30
|
+
"getfrontline",
|
|
31
|
+
"workflows",
|
|
32
|
+
"crm"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"chalk": "^4.1.2",
|
|
37
|
+
"commander": "^13.1.0",
|
|
38
|
+
"conf": "^10.2.0",
|
|
39
|
+
"ora": "^5.4.1",
|
|
40
|
+
"terminal-image": "^3.1.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/js-yaml": "^4.0.9",
|
|
44
|
+
"@types/node": "^22.0.0",
|
|
45
|
+
"ts-node": "^10.9.2",
|
|
46
|
+
"typescript": "^5.7.0"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/commands/object/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,eAAO,MAAM,iBAAiB,SAMJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../src/commands/object/note.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAA8D;AAE9D,MAAM,OAAO,GAAG,IAAA,uBAAU,EACtB,IAAI,mBAAO,CAAC,MAAM,CAAC;KACd,WAAW,CAAC,sBAAsB,CAAC;KACnC,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;KAC1C,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC,CACzD,CAA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I,mBAAO,CAAC,QAAQ,CAAC;KAChB,WAAW,CAAC,eAAe,CAAC;KAC5B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;KAC1C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC,CACjD,CAAC,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,IAAa,EAAE,EAAE;IACjE,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAC9B,WAAW,kBAAkB,CAAC,UAAU,CAAC,UAAU,MAAM,EAAE,CAC9D,CAAC;IACF,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KAC/C,WAAW,CAAC,6BAA6B,CAAC;KAC1C,UAAU,CAAC,OAAO,CAAC;KACnB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,MAAM,CAAC;KAClB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/commands/table/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,eAAO,MAAM,gBAAgB,SAMH,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tableNoteCommand = void 0;
|
|
4
|
-
const commander_1 = require("commander");
|
|
5
|
-
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
-
const output_1 = require("../../lib/output");
|
|
7
|
-
const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
8
|
-
.description("List notes for a row")
|
|
9
|
-
.argument("<table>", "Table name (slug)")
|
|
10
|
-
.argument("<row-id>", "Row ID")).action(async (tableName, rowId, opts) => {
|
|
11
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
12
|
-
const result = await client.get(`tables/${encodeURIComponent(tableName)}/rows/${encodeURIComponent(rowId)}/notes`);
|
|
13
|
-
(0, output_1.success)(result);
|
|
14
|
-
});
|
|
15
|
-
const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
16
|
-
.description("Create a note on a row")
|
|
17
|
-
.argument("<table>", "Table name (slug)")
|
|
18
|
-
.argument("<row-id>", "Row ID")
|
|
19
|
-
.option("--content <text>", "Note content (required)")).action(async (tableName, rowId, opts) => {
|
|
20
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
21
|
-
if (!opts.content) {
|
|
22
|
-
(0, output_1.error)("missing_content", "--content is required", output_1.EXIT_CODES.BAD_INPUT);
|
|
23
|
-
}
|
|
24
|
-
const result = await client.post(`tables/${encodeURIComponent(tableName)}/rows/${encodeURIComponent(rowId)}/notes`, { content: opts.content });
|
|
25
|
-
(0, output_1.success)(result);
|
|
26
|
-
});
|
|
27
|
-
const getCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("get")
|
|
28
|
-
.description("Get a specific note by ID")
|
|
29
|
-
.argument("<table>", "Table name (slug)")
|
|
30
|
-
.argument("<note-id>", "Note ID (number)")).action(async (tableName, noteId, opts) => {
|
|
31
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
32
|
-
const result = await client.get(`tables/${encodeURIComponent(tableName)}/notes/${noteId}`);
|
|
33
|
-
(0, output_1.success)(result);
|
|
34
|
-
});
|
|
35
|
-
const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
36
|
-
.description("Update a note")
|
|
37
|
-
.argument("<table>", "Table name (slug)")
|
|
38
|
-
.argument("<note-id>", "Note ID (number)")
|
|
39
|
-
.option("--content <text>", "New content")).action(async (tableName, noteId, opts) => {
|
|
40
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
41
|
-
if (!opts.content) {
|
|
42
|
-
(0, output_1.error)("missing_content", "--content is required", output_1.EXIT_CODES.BAD_INPUT);
|
|
43
|
-
}
|
|
44
|
-
const result = await client.patch(`tables/${encodeURIComponent(tableName)}/notes/${noteId}`, { content: opts.content });
|
|
45
|
-
(0, output_1.success)(result);
|
|
46
|
-
});
|
|
47
|
-
const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
48
|
-
.description("Delete a note")
|
|
49
|
-
.argument("<table>", "Table name (slug)")
|
|
50
|
-
.argument("<note-id>", "Note ID (number)")).action(async (tableName, noteId, opts) => {
|
|
51
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
52
|
-
const result = await client.delete(`tables/${encodeURIComponent(tableName)}/notes/${noteId}`);
|
|
53
|
-
(0, output_1.success)(result);
|
|
54
|
-
});
|
|
55
|
-
exports.tableNoteCommand = new commander_1.Command("note")
|
|
56
|
-
.description("Manage notes on table rows")
|
|
57
|
-
.addCommand(listCmd)
|
|
58
|
-
.addCommand(createCmd)
|
|
59
|
-
.addCommand(getCmd)
|
|
60
|
-
.addCommand(updateCmd)
|
|
61
|
-
.addCommand(deleteCmd);
|
|
62
|
-
//# sourceMappingURL=note.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../src/commands/table/note.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAA8D;AAE9D,MAAM,OAAO,GAAG,IAAA,uBAAU,EACtB,IAAI,mBAAO,CAAC,MAAM,CAAC;KACd,WAAW,CAAC,sBAAsB,CAAC;KACnC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;KACxC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CACtC,CAAC,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,KAAa,EAAE,IAAa,EAAE,EA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Q,CAAC,SAAS,EAAE,mBAAmB,CAAC;KACxC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC,CACjD,CAAC,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,MAAc,EAAE,IAAa,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAC9B,UAAU,kBAAkB,CAAC,SAAS,CAAC,UAAU,MAAM,EAAE,CAC5D,CAAC;IACF,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KAC9C,WAAW,CAAC,4BAA4B,CAAC;KACzC,UAAU,CAAC,OAAO,CAAC;KACnB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,MAAM,CAAC;KAClB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/commands/table/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqHpC,eAAO,MAAM,gBAAgB,SAQH,CAAC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tableTaskCommand = void 0;
|
|
4
|
-
const commander_1 = require("commander");
|
|
5
|
-
const globalOpts_1 = require("../../lib/globalOpts");
|
|
6
|
-
const output_1 = require("../../lib/output");
|
|
7
|
-
const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
8
|
-
.description("List tasks for a row")
|
|
9
|
-
.argument("<table>", "Table name (slug)")
|
|
10
|
-
.argument("<row-id>", "Row ID")).action(async (tableName, rowId, opts) => {
|
|
11
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
12
|
-
const result = await client.get(`tables/${encodeURIComponent(tableName)}/rows/${encodeURIComponent(rowId)}/tasks`);
|
|
13
|
-
(0, output_1.success)(result);
|
|
14
|
-
});
|
|
15
|
-
const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
16
|
-
.description("Create a task on a row")
|
|
17
|
-
.argument("<table>", "Table name (slug)")
|
|
18
|
-
.argument("<row-id>", "Row ID")
|
|
19
|
-
.option("--content <text>", "Task content (required)")
|
|
20
|
-
.option("--due-date <date>", "Due date (ISO 8601)")
|
|
21
|
-
.option("--assignees <ids>", "Comma-separated user IDs")).action(async (tableName, rowId, opts) => {
|
|
22
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
23
|
-
if (!opts.content) {
|
|
24
|
-
(0, output_1.error)("missing_content", "--content is required", output_1.EXIT_CODES.BAD_INPUT);
|
|
25
|
-
}
|
|
26
|
-
const body = { content: opts.content };
|
|
27
|
-
if (opts.dueDate)
|
|
28
|
-
body.dueDate = opts.dueDate;
|
|
29
|
-
if (opts.assignees)
|
|
30
|
-
body.assigneeIds = opts.assignees.split(",").map(Number);
|
|
31
|
-
const result = await client.post(`tables/${encodeURIComponent(tableName)}/rows/${encodeURIComponent(rowId)}/tasks`, body);
|
|
32
|
-
(0, output_1.success)(result);
|
|
33
|
-
});
|
|
34
|
-
const getCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("get")
|
|
35
|
-
.description("Get a specific task by ID")
|
|
36
|
-
.argument("<table>", "Table name (slug)")
|
|
37
|
-
.argument("<task-id>", "Task ID (number)")).action(async (tableName, taskId, opts) => {
|
|
38
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
39
|
-
const result = await client.get(`tables/${encodeURIComponent(tableName)}/tasks/${taskId}`);
|
|
40
|
-
(0, output_1.success)(result);
|
|
41
|
-
});
|
|
42
|
-
const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
43
|
-
.description("Update a task")
|
|
44
|
-
.argument("<table>", "Table name (slug)")
|
|
45
|
-
.argument("<task-id>", "Task ID (number)")
|
|
46
|
-
.option("--data <json>", "Updated task data (JSON)")).action(async (tableName, taskId, opts) => {
|
|
47
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
48
|
-
if (!opts.data) {
|
|
49
|
-
(0, output_1.error)("missing_data", "--data is required", output_1.EXIT_CODES.BAD_INPUT);
|
|
50
|
-
}
|
|
51
|
-
const body = JSON.parse(opts.data);
|
|
52
|
-
const result = await client.patch(`tables/${encodeURIComponent(tableName)}/tasks/${taskId}`, body);
|
|
53
|
-
(0, output_1.success)(result);
|
|
54
|
-
});
|
|
55
|
-
const completeCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("complete")
|
|
56
|
-
.description("Mark a task as completed")
|
|
57
|
-
.argument("<table>", "Table name (slug)")
|
|
58
|
-
.argument("<task-id>", "Task ID (number)")).action(async (tableName, taskId, opts) => {
|
|
59
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
60
|
-
const result = await client.post(`tables/${encodeURIComponent(tableName)}/tasks/${taskId}/complete`);
|
|
61
|
-
(0, output_1.success)(result);
|
|
62
|
-
});
|
|
63
|
-
const uncompleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("uncomplete")
|
|
64
|
-
.description("Mark a task as uncompleted")
|
|
65
|
-
.argument("<table>", "Table name (slug)")
|
|
66
|
-
.argument("<task-id>", "Task ID (number)")).action(async (tableName, taskId, opts) => {
|
|
67
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
68
|
-
const result = await client.post(`tables/${encodeURIComponent(tableName)}/tasks/${taskId}/uncomplete`);
|
|
69
|
-
(0, output_1.success)(result);
|
|
70
|
-
});
|
|
71
|
-
const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
72
|
-
.description("Delete a task")
|
|
73
|
-
.argument("<table>", "Table name (slug)")
|
|
74
|
-
.argument("<task-id>", "Task ID (number)")).action(async (tableName, taskId, opts) => {
|
|
75
|
-
const client = (0, globalOpts_1.requireClient)(opts);
|
|
76
|
-
const result = await client.delete(`tables/${encodeURIComponent(tableName)}/tasks/${taskId}`);
|
|
77
|
-
(0, output_1.success)(result);
|
|
78
|
-
});
|
|
79
|
-
exports.tableTaskCommand = new commander_1.Command("task")
|
|
80
|
-
.description("Manage tasks on table rows")
|
|
81
|
-
.addCommand(listCmd)
|
|
82
|
-
.addCommand(createCmd)
|
|
83
|
-
.addCommand(getCmd)
|
|
84
|
-
.addCommand(updateCmd)
|
|
85
|
-
.addCommand(completeCmd)
|
|
86
|
-
.addCommand(uncompleteCmd)
|
|
87
|
-
.addCommand(deleteCmd);
|
|
88
|
-
//# sourceMappingURL=task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../src/commands/table/task.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAA8D;AAE9D,MAAM,OAAO,GAAG,IAAA,uBAAU,EACtB,IAAI,mBAAO,CAAC,MAAM,CAAC;KACd,WAAW,CAAC,sBAAsB,CAAC;KACnC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;KACxC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CACtC,CAAC,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,KAAa,EAAE,IAAa,EAAE,EAAE;IAC/D,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,UAAU,kBAAkB,CAAC,SAAS,CAAC,SAAS,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CACpF,CAAC;IACF,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAA,uBAAU,EACxB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