@getfrontline/cli 1.0.0
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 +319 -0
- package/dist/assets/logo3.png +0 -0
- package/dist/commands/agents/analytics.d.ts +3 -0
- package/dist/commands/agents/analytics.d.ts.map +1 -0
- package/dist/commands/agents/analytics.js +67 -0
- package/dist/commands/agents/analytics.js.map +1 -0
- package/dist/commands/agents/flows.d.ts +3 -0
- package/dist/commands/agents/flows.d.ts.map +1 -0
- package/dist/commands/agents/flows.js +47 -0
- package/dist/commands/agents/flows.js.map +1 -0
- package/dist/commands/agents/list.d.ts +3 -0
- package/dist/commands/agents/list.d.ts.map +1 -0
- package/dist/commands/agents/list.js +46 -0
- package/dist/commands/agents/list.js.map +1 -0
- package/dist/commands/api/raw.d.ts +3 -0
- package/dist/commands/api/raw.d.ts.map +1 -0
- package/dist/commands/api/raw.js +54 -0
- package/dist/commands/api/raw.js.map +1 -0
- package/dist/commands/auth/login.d.ts +3 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +39 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +3 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +16 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/profiles.d.ts +3 -0
- package/dist/commands/auth/profiles.d.ts.map +1 -0
- package/dist/commands/auth/profiles.js +72 -0
- package/dist/commands/auth/profiles.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts +3 -0
- package/dist/commands/auth/whoami.d.ts.map +1 -0
- package/dist/commands/auth/whoami.js +46 -0
- package/dist/commands/auth/whoami.js.map +1 -0
- package/dist/commands/billing/get.d.ts +3 -0
- package/dist/commands/billing/get.d.ts.map +1 -0
- package/dist/commands/billing/get.js +42 -0
- package/dist/commands/billing/get.js.map +1 -0
- package/dist/commands/object/aggregation.d.ts +3 -0
- package/dist/commands/object/aggregation.d.ts.map +1 -0
- package/dist/commands/object/aggregation.js +78 -0
- package/dist/commands/object/aggregation.js.map +1 -0
- package/dist/commands/object/export.d.ts +3 -0
- package/dist/commands/object/export.d.ts.map +1 -0
- package/dist/commands/object/export.js +98 -0
- package/dist/commands/object/export.js.map +1 -0
- package/dist/commands/object/field.d.ts +3 -0
- package/dist/commands/object/field.d.ts.map +1 -0
- package/dist/commands/object/field.js +76 -0
- package/dist/commands/object/field.js.map +1 -0
- package/dist/commands/object/file.d.ts +3 -0
- package/dist/commands/object/file.d.ts.map +1 -0
- package/dist/commands/object/file.js +105 -0
- package/dist/commands/object/file.js.map +1 -0
- package/dist/commands/object/index.d.ts +3 -0
- package/dist/commands/object/index.d.ts.map +1 -0
- package/dist/commands/object/index.js +136 -0
- package/dist/commands/object/index.js.map +1 -0
- package/dist/commands/object/note.d.ts +3 -0
- package/dist/commands/object/note.d.ts.map +1 -0
- package/dist/commands/object/note.js +62 -0
- package/dist/commands/object/note.js.map +1 -0
- package/dist/commands/object/option.d.ts +3 -0
- package/dist/commands/object/option.d.ts.map +1 -0
- package/dist/commands/object/option.js +78 -0
- package/dist/commands/object/option.js.map +1 -0
- package/dist/commands/object/record-type.d.ts +3 -0
- package/dist/commands/object/record-type.d.ts.map +1 -0
- package/dist/commands/object/record-type.js +73 -0
- package/dist/commands/object/record-type.js.map +1 -0
- package/dist/commands/object/record.d.ts +3 -0
- package/dist/commands/object/record.d.ts.map +1 -0
- package/dist/commands/object/record.js +128 -0
- package/dist/commands/object/record.js.map +1 -0
- package/dist/commands/object/relation.d.ts +3 -0
- package/dist/commands/object/relation.d.ts.map +1 -0
- package/dist/commands/object/relation.js +73 -0
- package/dist/commands/object/relation.js.map +1 -0
- package/dist/commands/object/task.d.ts +3 -0
- package/dist/commands/object/task.d.ts.map +1 -0
- package/dist/commands/object/task.js +88 -0
- package/dist/commands/object/task.js.map +1 -0
- package/dist/commands/object/view.d.ts +3 -0
- package/dist/commands/object/view.d.ts.map +1 -0
- package/dist/commands/object/view.js +118 -0
- package/dist/commands/object/view.js.map +1 -0
- package/dist/commands/setup/claudeSkills.d.ts +3 -0
- package/dist/commands/setup/claudeSkills.d.ts.map +1 -0
- package/dist/commands/setup/claudeSkills.js +84 -0
- package/dist/commands/setup/claudeSkills.js.map +1 -0
- package/dist/commands/table/aggregation.d.ts +3 -0
- package/dist/commands/table/aggregation.d.ts.map +1 -0
- package/dist/commands/table/aggregation.js +78 -0
- package/dist/commands/table/aggregation.js.map +1 -0
- package/dist/commands/table/export.d.ts +3 -0
- package/dist/commands/table/export.d.ts.map +1 -0
- package/dist/commands/table/export.js +97 -0
- package/dist/commands/table/export.js.map +1 -0
- package/dist/commands/table/field.d.ts +3 -0
- package/dist/commands/table/field.d.ts.map +1 -0
- package/dist/commands/table/field.js +76 -0
- package/dist/commands/table/field.js.map +1 -0
- package/dist/commands/table/file.d.ts +3 -0
- package/dist/commands/table/file.d.ts.map +1 -0
- package/dist/commands/table/file.js +106 -0
- package/dist/commands/table/file.js.map +1 -0
- package/dist/commands/table/index.d.ts +3 -0
- package/dist/commands/table/index.d.ts.map +1 -0
- package/dist/commands/table/index.js +142 -0
- package/dist/commands/table/index.js.map +1 -0
- package/dist/commands/table/note.d.ts +3 -0
- package/dist/commands/table/note.d.ts.map +1 -0
- package/dist/commands/table/note.js +62 -0
- package/dist/commands/table/note.js.map +1 -0
- package/dist/commands/table/option.d.ts +3 -0
- package/dist/commands/table/option.d.ts.map +1 -0
- package/dist/commands/table/option.js +78 -0
- package/dist/commands/table/option.js.map +1 -0
- package/dist/commands/table/relation.d.ts +3 -0
- package/dist/commands/table/relation.d.ts.map +1 -0
- package/dist/commands/table/relation.js +74 -0
- package/dist/commands/table/relation.js.map +1 -0
- package/dist/commands/table/row.d.ts +3 -0
- package/dist/commands/table/row.d.ts.map +1 -0
- package/dist/commands/table/row.js +124 -0
- package/dist/commands/table/row.js.map +1 -0
- package/dist/commands/table/task.d.ts +3 -0
- package/dist/commands/table/task.d.ts.map +1 -0
- package/dist/commands/table/task.js +88 -0
- package/dist/commands/table/task.js.map +1 -0
- package/dist/commands/workflows/analytics.d.ts +3 -0
- package/dist/commands/workflows/analytics.d.ts.map +1 -0
- package/dist/commands/workflows/analytics.js +60 -0
- package/dist/commands/workflows/analytics.js.map +1 -0
- package/dist/commands/workflows/list.d.ts +3 -0
- package/dist/commands/workflows/list.d.ts.map +1 -0
- package/dist/commands/workflows/list.js +47 -0
- package/dist/commands/workflows/list.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/auth.d.ts +13 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +40 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/config.d.ts +28 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +77 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/errors.d.ts +13 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +31 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/globalOpts.d.ts +23 -0
- package/dist/lib/globalOpts.d.ts.map +1 -0
- package/dist/lib/globalOpts.js +40 -0
- package/dist/lib/globalOpts.js.map +1 -0
- package/dist/lib/helpEpilog.d.ts +18 -0
- package/dist/lib/helpEpilog.d.ts.map +1 -0
- package/dist/lib/helpEpilog.js +56 -0
- package/dist/lib/helpEpilog.js.map +1 -0
- package/dist/lib/httpClient.d.ts +50 -0
- package/dist/lib/httpClient.d.ts.map +1 -0
- package/dist/lib/httpClient.js +196 -0
- package/dist/lib/httpClient.js.map +1 -0
- package/dist/lib/output.d.ts +38 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +131 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/max/browserLogin.d.ts +15 -0
- package/dist/max/browserLogin.d.ts.map +1 -0
- package/dist/max/browserLogin.js +164 -0
- package/dist/max/browserLogin.js.map +1 -0
- package/dist/max/commands/auth/login.d.ts +3 -0
- package/dist/max/commands/auth/login.d.ts.map +1 -0
- package/dist/max/commands/auth/login.js +58 -0
- package/dist/max/commands/auth/login.js.map +1 -0
- package/dist/max/commands/auth/logout.d.ts +3 -0
- package/dist/max/commands/auth/logout.d.ts.map +1 -0
- package/dist/max/commands/auth/logout.js +23 -0
- package/dist/max/commands/auth/logout.js.map +1 -0
- package/dist/max/commands/auth/whoami.d.ts +3 -0
- package/dist/max/commands/auth/whoami.d.ts.map +1 -0
- package/dist/max/commands/auth/whoami.js +46 -0
- package/dist/max/commands/auth/whoami.js.map +1 -0
- package/dist/max/commands/chat/repl.d.ts +3 -0
- package/dist/max/commands/chat/repl.d.ts.map +1 -0
- package/dist/max/commands/chat/repl.js +104 -0
- package/dist/max/commands/chat/repl.js.map +1 -0
- package/dist/max/commands/chat/send.d.ts +25 -0
- package/dist/max/commands/chat/send.d.ts.map +1 -0
- package/dist/max/commands/chat/send.js +163 -0
- package/dist/max/commands/chat/send.js.map +1 -0
- package/dist/max/commands/conversations/abort.d.ts +3 -0
- package/dist/max/commands/conversations/abort.d.ts.map +1 -0
- package/dist/max/commands/conversations/abort.js +55 -0
- package/dist/max/commands/conversations/abort.js.map +1 -0
- package/dist/max/commands/conversations/get.d.ts +3 -0
- package/dist/max/commands/conversations/get.d.ts.map +1 -0
- package/dist/max/commands/conversations/get.js +42 -0
- package/dist/max/commands/conversations/get.js.map +1 -0
- package/dist/max/commands/conversations/index.d.ts +3 -0
- package/dist/max/commands/conversations/index.d.ts.map +1 -0
- package/dist/max/commands/conversations/index.js +16 -0
- package/dist/max/commands/conversations/index.js.map +1 -0
- package/dist/max/commands/conversations/list.d.ts +3 -0
- package/dist/max/commands/conversations/list.d.ts.map +1 -0
- package/dist/max/commands/conversations/list.js +35 -0
- package/dist/max/commands/conversations/list.js.map +1 -0
- package/dist/max/commands/conversations/update.d.ts +3 -0
- package/dist/max/commands/conversations/update.d.ts.map +1 -0
- package/dist/max/commands/conversations/update.js +53 -0
- package/dist/max/commands/conversations/update.js.map +1 -0
- package/dist/max/jwtDecode.d.ts +5 -0
- package/dist/max/jwtDecode.d.ts.map +1 -0
- package/dist/max/jwtDecode.js +19 -0
- package/dist/max/jwtDecode.js.map +1 -0
- package/dist/max/lib/auth.d.ts +20 -0
- package/dist/max/lib/auth.d.ts.map +1 -0
- package/dist/max/lib/auth.js +53 -0
- package/dist/max/lib/auth.js.map +1 -0
- package/dist/max/lib/httpClient.d.ts +25 -0
- package/dist/max/lib/httpClient.d.ts.map +1 -0
- package/dist/max/lib/httpClient.js +138 -0
- package/dist/max/lib/httpClient.js.map +1 -0
- package/dist/max/lib/maxResponse.d.ts +30 -0
- package/dist/max/lib/maxResponse.d.ts.map +1 -0
- package/dist/max/lib/maxResponse.js +132 -0
- package/dist/max/lib/maxResponse.js.map +1 -0
- package/dist/max/lib/publicApiPaths.d.ts +12 -0
- package/dist/max/lib/publicApiPaths.d.ts.map +1 -0
- package/dist/max/lib/publicApiPaths.js +15 -0
- package/dist/max/lib/publicApiPaths.js.map +1 -0
- package/dist/max/maxConfig.d.ts +31 -0
- package/dist/max/maxConfig.d.ts.map +1 -0
- package/dist/max/maxConfig.js +50 -0
- package/dist/max/maxConfig.js.map +1 -0
- package/dist/max/ui/banner.d.ts +3 -0
- package/dist/max/ui/banner.d.ts.map +1 -0
- package/dist/max/ui/banner.js +96 -0
- package/dist/max/ui/banner.js.map +1 -0
- package/dist/max.d.ts +3 -0
- package/dist/max.d.ts.map +1 -0
- package/dist/max.js +94 -0
- package/dist/max.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +8 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +149 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/skills/aggregations/SKILL.md +122 -0
- package/dist/skills/auth-and-profiles/SKILL.md +102 -0
- package/dist/skills/crm-setup/SKILL.md +385 -0
- package/dist/skills/crud-operations/SKILL.md +287 -0
- package/dist/skills/export-and-delete/SKILL.md +96 -0
- package/dist/skills/files/SKILL.md +70 -0
- package/dist/skills/filter-and-query/SKILL.md +199 -0
- package/dist/skills/frontline-agents/SKILL.md +99 -0
- package/dist/skills/frontline-api/SKILL.md +59 -0
- package/dist/skills/frontline-billing/SKILL.md +42 -0
- package/dist/skills/frontline-workflows/SKILL.md +72 -0
- package/dist/skills/max-auth/SKILL.md +76 -0
- package/dist/skills/max-chat/SKILL.md +111 -0
- package/dist/skills/notes-and-tasks/SKILL.md +128 -0
- package/dist/skills/pipeline-setup/SKILL.md +233 -0
- package/dist/skills/record-type-management/SKILL.md +104 -0
- package/dist/skills/relations/SKILL.md +153 -0
- package/dist/skills/resource-creation/SKILL.md +86 -0
- package/dist/skills/schema-design/SKILL.md +263 -0
- package/package.json +47 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: schema-design
|
|
3
|
+
description: >
|
|
4
|
+
Complete guide for designing table and object schemas with the Frontline CLI.
|
|
5
|
+
Covers choosing the right field type, metadata configuration, when to use
|
|
6
|
+
select vs relation, naming conventions, and common schema patterns.
|
|
7
|
+
Use as a reference before creating or extending any table or object.
|
|
8
|
+
allowed-tools: Bash(frontline:*)
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Schema Design Guide
|
|
12
|
+
|
|
13
|
+
This skill covers how to think about and build effective schemas using the
|
|
14
|
+
Frontline CLI. Read this before creating or modifying fields on any table or object.
|
|
15
|
+
|
|
16
|
+
## Resource Selection: Table vs Object
|
|
17
|
+
|
|
18
|
+
| Type | Goal | Command |
|
|
19
|
+
| ---------- | --------------------------------------- | --------------- |
|
|
20
|
+
| **Table** | Simple spreadsheets, flat data | `table create` |
|
|
21
|
+
| **Object** | Business entities, record types, pipeln | `object create` |
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Example: Create a new custom object
|
|
25
|
+
frontline object create <name> --data '{
|
|
26
|
+
"displayName": "My Object",
|
|
27
|
+
"columns": [
|
|
28
|
+
{ "name": "Title", "type": "string", "metadata": { "format": "text" } }
|
|
29
|
+
]
|
|
30
|
+
}'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Field Type Decision Tree
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
What kind of data?
|
|
37
|
+
│
|
|
38
|
+
├─ Free text → string
|
|
39
|
+
│ ├─ Email address → metadata: { "format": "email" }
|
|
40
|
+
│ ├─ URL / website → metadata: { "format": "url" }
|
|
41
|
+
│ ├─ Phone number → metadata: { "format": "phone" }
|
|
42
|
+
│ └─ General text → metadata: { "format": "text" }
|
|
43
|
+
│
|
|
44
|
+
├─ Number → number
|
|
45
|
+
│ ├─ Money → metadata: { "format": "currency", "currency": "USD", "decimals": 2 }
|
|
46
|
+
│ ├─ Percentage → metadata: { "format": "percent" }
|
|
47
|
+
│ ├─ Integer count → metadata: { "format": "integer" }
|
|
48
|
+
│ └─ Decimal → metadata: { "format": "decimal", "decimals": 2 }
|
|
49
|
+
│
|
|
50
|
+
├─ Yes/No → boolean
|
|
51
|
+
│ └─ metadata: {}
|
|
52
|
+
│
|
|
53
|
+
├─ Date or time → date / dateOnly
|
|
54
|
+
│ ├─ With time + timezone → date, metadata: { "timezone": "America/New_York" }
|
|
55
|
+
│ └─ Date only (no time) → dateOnly, metadata: {}
|
|
56
|
+
│
|
|
57
|
+
├─ Pick from a fixed list → select
|
|
58
|
+
│ ├─ Pick one → metadata: { "mode": "singleSelect" }
|
|
59
|
+
│ └─ Pick many → metadata: { "mode": "multiSelect" }
|
|
60
|
+
│
|
|
61
|
+
├─ Link to another entity → relation
|
|
62
|
+
│ ├─ One-to-one → metadata: { "mode": "single" }
|
|
63
|
+
│ └─ One-to-many → metadata: { "mode": "multi" }
|
|
64
|
+
│
|
|
65
|
+
└─ File attachment → file
|
|
66
|
+
└─ metadata: { "showPreview": true }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Field Constraints
|
|
70
|
+
|
|
71
|
+
You can set constraints on fields during creation or update:
|
|
72
|
+
|
|
73
|
+
| Constraint | Description | Example |
|
|
74
|
+
| ---------- | --------------------------------------------- | ------------------ |
|
|
75
|
+
| `required` | Field must have a value in every record | `"required": true` |
|
|
76
|
+
| `unique` | Field value must be unique across all records | `"unique": true` |
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Make a field required and unique
|
|
80
|
+
frontline object field update <object> <field-id> --data '{"required": true, "unique": true}'
|
|
81
|
+
|
|
82
|
+
# Remove the required constraint
|
|
83
|
+
frontline object field update <object> <field-id> --data '{"required": false}'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Select vs Relation: When to Use Which
|
|
87
|
+
|
|
88
|
+
| Use **select** when... | Use **relation** when... |
|
|
89
|
+
| -------------------------------------------- | -------------------------------------------- |
|
|
90
|
+
| Options are simple labels (Status, Priority) | Values are full records in another table |
|
|
91
|
+
| List is short and rarely changes | List grows organically (contacts, companies) |
|
|
92
|
+
| No extra data attached to each option | Each value has its own fields and metadata |
|
|
93
|
+
| You want colored badges in the UI | You need to navigate to the linked record |
|
|
94
|
+
| Example: Stage, Lead Source, Priority | Example: Company, Assigned User, Contact |
|
|
95
|
+
|
|
96
|
+
## Complete Field Type Reference
|
|
97
|
+
|
|
98
|
+
### string
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Plain text (default)
|
|
102
|
+
--data '{ "name": "Notes", "type": "string", "metadata": { "format": "text" } }'
|
|
103
|
+
|
|
104
|
+
# Email — enables validation and mailto links
|
|
105
|
+
--data '{ "name": "Email", "type": "string", "metadata": { "format": "email" } }'
|
|
106
|
+
|
|
107
|
+
# URL — renders as clickable link
|
|
108
|
+
--data '{ "name": "Website", "type": "string", "metadata": { "format": "url" } }'
|
|
109
|
+
|
|
110
|
+
# Phone — formats and enables click-to-call
|
|
111
|
+
--data '{ "name": "Phone", "type": "string", "metadata": { "format": "phone_number" } }'
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### number
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Currency — shows $ symbol, 2 decimal places
|
|
118
|
+
--data '{ "name": "Revenue", "type": "number", "metadata": { "format": "currency", "currency": "USD", "decimals": 2 } }'
|
|
119
|
+
|
|
120
|
+
# Percentage — shows % symbol
|
|
121
|
+
--data '{ "name": "Win Rate", "type": "number", "metadata": { "format": "percent" } }'
|
|
122
|
+
|
|
123
|
+
# Integer — no decimals
|
|
124
|
+
--data '{ "name": "Headcount", "type": "number", "metadata": { "format": "integer" } }'
|
|
125
|
+
|
|
126
|
+
# Decimal — custom precision
|
|
127
|
+
--data '{ "name": "Weight", "type": "number", "metadata": { "format": "decimal", "decimals": 3 } }'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### boolean
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
--data '{ "name": "Is Active", "type": "boolean", "metadata": {} }'
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### date / dateOnly
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Full datetime with timezone
|
|
140
|
+
--data '{ "name": "Meeting Time", "type": "date", "metadata": { "timezone": "UTC" } }'
|
|
141
|
+
|
|
142
|
+
# Date only (no time component)
|
|
143
|
+
--data '{ "name": "Start Date", "type": "dateOnly", "metadata": {} }'
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### select (single / multi)
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Single-select (pick one)
|
|
150
|
+
--data '{ "name": "Priority", "type": "select", "metadata": { "mode": "singleSelect" } }'
|
|
151
|
+
|
|
152
|
+
# Multi-select (pick many)
|
|
153
|
+
--data '{ "name": "Tags", "type": "select", "metadata": { "mode": "multiSelect" } }'
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
After creating, add options:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
frontline object option create <obj> <field-id> --data '{ "name": "High", "color": "Magenta" }'
|
|
160
|
+
frontline object option create <obj> <field-id> --data '{ "name": "Medium", "color": "Amber" }'
|
|
161
|
+
frontline object option create <obj> <field-id> --data '{ "name": "Low", "color": "Gray" }'
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Available Option Colors
|
|
165
|
+
|
|
166
|
+
`Terracotta`, `Amber`, `Lime`, `Emerald`, `Lavender`, `Sky`, `Magenta`,
|
|
167
|
+
`Bright Red`, `Teal`, `Gray`, `Brown`, `Orange`, `Yellow`, `Green`,
|
|
168
|
+
`Blue`, `Purple`, `Pink`, `Red`
|
|
169
|
+
|
|
170
|
+
## Common Schema Patterns
|
|
171
|
+
|
|
172
|
+
### 1. Status Pipeline
|
|
173
|
+
|
|
174
|
+
A single-select field with ordered stages:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
frontline object field create sor__deals --data '{
|
|
178
|
+
"name": "Stage",
|
|
179
|
+
"type": "select",
|
|
180
|
+
"metadata": { "mode": "singleSelect" }
|
|
181
|
+
}'
|
|
182
|
+
# Then add stages in order:
|
|
183
|
+
frontline object option create sor__deals <field-id> --data '{"name": "Lead", "color": "Gray"}'
|
|
184
|
+
frontline object option create sor__deals <field-id> --data '{"name": "Qualified", "color": "Sky"}'
|
|
185
|
+
frontline object option create sor__deals <field-id> --data '{"name": "Proposal", "color": "Amber"}'
|
|
186
|
+
frontline object option create sor__deals <field-id> --data '{"name": "Won", "color": "Emerald"}'
|
|
187
|
+
frontline object option create sor__deals <field-id> --data '{"name": "Lost", "color": "Red"}'
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 2. Contact Info Set
|
|
191
|
+
|
|
192
|
+
Standard contact fields for a People-like object:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
frontline object field create <obj> --data '{"name":"Email","type":"string","metadata":{"format":"email"}}'
|
|
196
|
+
frontline object field create <obj> --data '{"name":"Phone","type":"string","metadata":{"format":"phone"}}'
|
|
197
|
+
frontline object field create <obj> --data '{"name":"Website","type":"string","metadata":{"format":"url"}}'
|
|
198
|
+
frontline object field create <obj> --data '{"name":"Address","type":"string","metadata":{"format":"text"}}'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 3. Financial Tracking
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
frontline object field create <obj> --data '{"name":"Amount","type":"number","metadata":{"format":"currency","currency":"USD","decimals":2}}'
|
|
205
|
+
frontline object field create <obj> --data '{"name":"Probability","type":"number","metadata":{"format":"percent"}}'
|
|
206
|
+
frontline object field create <obj> --data '{"name":"Close Date","type":"dateOnly","metadata":{}}'
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 4. Categorization with Multi-Select
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
frontline object field create <obj> --data '{
|
|
213
|
+
"name": "Industries",
|
|
214
|
+
"type": "select",
|
|
215
|
+
"metadata": { "mode": "multiSelect" }
|
|
216
|
+
}'
|
|
217
|
+
frontline object option create <obj> <field-id> --data '{"name":"SaaS","color":"Sky"}'
|
|
218
|
+
frontline object option create <obj> <field-id> --data '{"name":"E-commerce","color":"Purple"}'
|
|
219
|
+
frontline object option create <obj> <field-id> --data '{"name":"Healthcare","color":"Emerald"}'
|
|
220
|
+
frontline object option create <obj> <field-id> --data '{"name":"Fintech","color":"Amber"}'
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Naming Conventions
|
|
224
|
+
|
|
225
|
+
| Do ✅ | Don't ❌ |
|
|
226
|
+
| --------------------------- | ------------------------- |
|
|
227
|
+
| `First Name` | `firstName`, `first_name` |
|
|
228
|
+
| `Email` | `email_address` |
|
|
229
|
+
| `Primary Location` | `primary-location` |
|
|
230
|
+
| `Deal Value` | `dealValue` |
|
|
231
|
+
| Title Case, space-separated | camelCase or snake_case |
|
|
232
|
+
|
|
233
|
+
Field names are **display names** shown in the UI. Use natural, readable names.
|
|
234
|
+
|
|
235
|
+
## Workflow: Extending an Existing Object
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# 1. Check what fields already exist
|
|
239
|
+
frontline object field list sor__companies
|
|
240
|
+
|
|
241
|
+
# 2. Check schema for relations
|
|
242
|
+
frontline object schema sor__companies
|
|
243
|
+
|
|
244
|
+
# 3. Add new fields — only add what's missing
|
|
245
|
+
frontline object field create sor__companies --data '{
|
|
246
|
+
"name": "Annual Revenue",
|
|
247
|
+
"type": "number",
|
|
248
|
+
"metadata": { "format": "currency", "currency": "USD", "decimals": 0 }
|
|
249
|
+
}'
|
|
250
|
+
|
|
251
|
+
# 4. Add a categorization field
|
|
252
|
+
frontline object field create sor__companies --data '{
|
|
253
|
+
"name": "Industry",
|
|
254
|
+
"type": "select",
|
|
255
|
+
"metadata": { "mode": "singleSelect" }
|
|
256
|
+
}'
|
|
257
|
+
# Add options
|
|
258
|
+
frontline object option create sor__companies <field-id> --data '{"name":"Technology","color":"Sky"}'
|
|
259
|
+
frontline object option create sor__companies <field-id> --data '{"name":"Finance","color":"Amber"}'
|
|
260
|
+
|
|
261
|
+
# 5. Verify the final schema
|
|
262
|
+
frontline object field list sor__companies
|
|
263
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@getfrontline/cli",
|
|
3
|
+
"version": "1.0.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
|
+
],
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"chalk": "^4.1.2",
|
|
33
|
+
"commander": "^13.1.0",
|
|
34
|
+
"conf": "^10.2.0",
|
|
35
|
+
"ora": "^5.4.1",
|
|
36
|
+
"terminal-image": "^3.1.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/js-yaml": "^4.0.9",
|
|
40
|
+
"@types/node": "^22.0.0",
|
|
41
|
+
"ts-node": "^10.9.2",
|
|
42
|
+
"typescript": "^5.7.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|