@getfrontline/cli 1.0.1 → 1.0.3
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 +246 -246
- package/dist/commands/auth/login.d.ts.map +1 -1
- package/dist/commands/auth/login.js +29 -4
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/profiles.d.ts.map +1 -1
- package/dist/commands/auth/profiles.js +7 -11
- package/dist/commands/auth/profiles.js.map +1 -1
- package/dist/commands/object/export.js +3 -3
- package/dist/commands/object/field.js +5 -5
- package/dist/commands/object/index.js +8 -8
- 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/lib/cliVersion.d.ts +8 -0
- package/dist/lib/cliVersion.d.ts.map +1 -0
- package/dist/lib/cliVersion.js +26 -0
- package/dist/lib/cliVersion.js.map +1 -0
- package/dist/lib/config.js +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/errors.d.ts +3 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +10 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/helpEpilog.d.ts.map +1 -1
- package/dist/lib/helpEpilog.js +35 -35
- package/dist/lib/helpEpilog.js.map +1 -1
- package/dist/lib/httpClient.d.ts.map +1 -1
- package/dist/lib/httpClient.js +35 -16
- package/dist/lib/httpClient.js.map +1 -1
- package/dist/lib/output.d.ts +10 -0
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +28 -12
- package/dist/lib/output.js.map +1 -1
- package/dist/max/commands/auth/login.d.ts.map +1 -1
- package/dist/max/commands/auth/login.js +22 -5
- package/dist/max/commands/auth/login.js.map +1 -1
- package/dist/max/commands/chat/repl.d.ts +9 -0
- package/dist/max/commands/chat/repl.d.ts.map +1 -1
- package/dist/max/commands/chat/repl.js +15 -11
- package/dist/max/commands/chat/repl.js.map +1 -1
- package/dist/max/commands/chat/send.d.ts.map +1 -1
- package/dist/max/commands/chat/send.js +17 -0
- package/dist/max/commands/chat/send.js.map +1 -1
- package/dist/max/lib/httpClient.d.ts.map +1 -1
- package/dist/max/lib/httpClient.js +11 -4
- package/dist/max/lib/httpClient.js.map +1 -1
- package/dist/max/ui/banner.d.ts.map +1 -1
- package/dist/max/ui/banner.js +21 -21
- package/dist/max/ui/banner.js.map +1 -1
- package/dist/max.js +15 -3
- package/dist/max.js.map +1 -1
- 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 +58 -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 +209 -0
- package/dist/skills/max-auth/SKILL.md +76 -76
- package/dist/skills/max-chat/SKILL.md +111 -111
- package/dist/skills/notes-and-tasks/SKILL.md +4 -4
- package/dist/skills/pipeline-setup/SKILL.md +13 -13
- package/dist/skills/relations/SKILL.md +20 -15
- package/dist/skills/schema-design/SKILL.md +13 -13
- package/package.json +51 -51
|
@@ -9,7 +9,7 @@ const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
|
9
9
|
.argument("<object>", "Object name (slug)")
|
|
10
10
|
.addHelpText("after", `
|
|
11
11
|
Examples:
|
|
12
|
-
$ frontline object field list
|
|
12
|
+
$ frontline object field list standard__people
|
|
13
13
|
|
|
14
14
|
Output: Array of fields with id, name, type, options, format, mode.`)).action(async (objectName, opts) => {
|
|
15
15
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -22,7 +22,7 @@ const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
|
22
22
|
.option("--data <json>", "Field definition (JSON)")
|
|
23
23
|
.addHelpText("after", `
|
|
24
24
|
Examples:
|
|
25
|
-
$ frontline object field create
|
|
25
|
+
$ frontline object field create standard__people --data '{"name":"LinkedIn","type":"string","metadata":{"format":"url"}}'
|
|
26
26
|
|
|
27
27
|
Output: Created field object.`)).action(async (objectName, opts) => {
|
|
28
28
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -40,8 +40,8 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
40
40
|
.option("--data <json>", "Updated field data (JSON)")
|
|
41
41
|
.addHelpText("after", `
|
|
42
42
|
Examples:
|
|
43
|
-
$ frontline object field update
|
|
44
|
-
$ frontline object field update
|
|
43
|
+
$ frontline object field update standard__people 42 --data '{"name":"New Name"}'
|
|
44
|
+
$ frontline object field update standard__people 42 --data '{"required":true,"unique":true}'
|
|
45
45
|
|
|
46
46
|
Supported keys: name, metadata, required, unique, tags, defaultValue.
|
|
47
47
|
|
|
@@ -60,7 +60,7 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
60
60
|
.argument("<field-id>", "Field ID (number)")
|
|
61
61
|
.addHelpText("after", `
|
|
62
62
|
Examples:
|
|
63
|
-
$ frontline object field delete
|
|
63
|
+
$ frontline object field delete standard__people 42
|
|
64
64
|
|
|
65
65
|
Output: { deleted: true, field_id: 42 }`)).action(async (objectName, fieldId, opts) => {
|
|
66
66
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -42,10 +42,10 @@ Output: Created object with id, name, display_name.`)).action(async (opts) => {
|
|
|
42
42
|
});
|
|
43
43
|
const getCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("get")
|
|
44
44
|
.description("Get detailed info about an object (fields, views, record types)")
|
|
45
|
-
.argument("<name>", "Object name (slug, e.g.
|
|
45
|
+
.argument("<name>", "Object name (slug, e.g. standard__people)")
|
|
46
46
|
.addHelpText("after", `
|
|
47
47
|
Examples:
|
|
48
|
-
$ frontline object get
|
|
48
|
+
$ frontline object get standard__people
|
|
49
49
|
|
|
50
50
|
Output: Object with id, name, display_name, fields, views, record_types.`)).action(async (name, opts) => {
|
|
51
51
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -57,7 +57,7 @@ const schemaCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("schema")
|
|
|
57
57
|
.argument("<name>", "Object name (slug)")
|
|
58
58
|
.addHelpText("after", `
|
|
59
59
|
Examples:
|
|
60
|
-
$ frontline object schema
|
|
60
|
+
$ frontline object schema standard__people
|
|
61
61
|
|
|
62
62
|
Output: Schema with name, type, extensible, fields, relations, record_types.`)).action(async (name, opts) => {
|
|
63
63
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -70,7 +70,7 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
70
70
|
.option("--data <json>", "Update payload (JSON)")
|
|
71
71
|
.addHelpText("after", `
|
|
72
72
|
Examples:
|
|
73
|
-
$ frontline object update
|
|
73
|
+
$ frontline object update standard__deals --data '{"displayName":"Deals v2","emoji":"💰"}'
|
|
74
74
|
|
|
75
75
|
Output: Updated object.`)).action(async (name, opts) => {
|
|
76
76
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -88,8 +88,8 @@ const countCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("count")
|
|
|
88
88
|
.option("--record-type <type>", "Record type filter")
|
|
89
89
|
.addHelpText("after", `
|
|
90
90
|
Examples:
|
|
91
|
-
$ frontline object count
|
|
92
|
-
$ frontline object count
|
|
91
|
+
$ frontline object count standard__deals
|
|
92
|
+
$ frontline object count standard__deals --query '{"path":"[Amount]","operator":"gte","value":10000}'
|
|
93
93
|
|
|
94
94
|
Output: { count: 42 }`)).action(async (name, opts) => {
|
|
95
95
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -106,9 +106,9 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
106
106
|
.argument("<name>", "Object name (slug)")
|
|
107
107
|
.addHelpText("after", `
|
|
108
108
|
Examples:
|
|
109
|
-
$ frontline object delete
|
|
109
|
+
$ frontline object delete standard__custom_object
|
|
110
110
|
|
|
111
|
-
Output: { deleted: true, name: "
|
|
111
|
+
Output: { deleted: true, name: "standard__custom_object" }`)).action(async (name, opts) => {
|
|
112
112
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
113
113
|
const result = await client.delete(`objects/${encodeURIComponent(name)}`);
|
|
114
114
|
(0, output_1.success)(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/object/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA0E;AAC1E,6CAA8D;AAE9D,mCAA6C;AAC7C,qCAA+C;AAC/C,+CAAwD;AACxD,iCAA2C;AAC3C,yCAAmD;AACnD,qCAA+C;AAC/C,qCAA+C;AAC/C,iCAA2C;AAC3C,iCAA2C;AAC3C,iCAA2C;AAC3C,+CAAyD;AAEzD,MAAM,OAAO,GAAG,IAAA,uBAAU,EACtB,IAAI,mBAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAC3D,OAAO,EACP;;;;2EAImE,CACtE,CACJ,CAAC,MAAM,CAAC,KAAK,EAAE,IAAa,EAAE,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAU,SAAS,CAAC,CAAC;IACpD,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAA,uBAAU,EACxB,IAAI,mBAAO,CAAC,QAAQ,CAAC;KAChB,WAAW,CAAC,qBAAqB,CAAC;KAClC,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,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EAAE,EAAE;IAC3C,MAAM,MAAM,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAU,WAAW,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnF,IAAA,gBAAO,EAAC,MAAM,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,IAAI,mBAAO,CAAC,QAAQ,CAAC;KAC7C,WAAW,CAAC,uBAAuB,CAAC;KACpC,UAAU,CAAC,OAAO,CAAC;KACnB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,MAAM,CAAC;KAClB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,UAAU,CAAC,SAAS,CAAC;KACrB,UAAU,CAAC,0BAAkB,CAAC;KAC9B,UAAU,CAAC,4BAAmB,CAAC;KAC/B,UAAU,CAAC,qCAAuB,CAAC;KACnC,UAAU,CAAC,wBAAiB,CAAC;KAC7B,UAAU,CAAC,gCAAqB,CAAC;KACjC,UAAU,CAAC,4BAAmB,CAAC;KAC/B,UAAU,CAAC,4BAAmB,CAAC;KAC/B,UAAU,CAAC,wBAAiB,CAAC;KAC7B,UAAU,CAAC,wBAAiB,CAAC;KAC7B,UAAU,CAAC,wBAAiB,CAAC;KAC7B,UAAU,CAAC,sCAAwB,CAAC,CAAC"}
|
|
@@ -10,7 +10,7 @@ const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
|
10
10
|
.argument("<field-id>", "Field ID (number)")
|
|
11
11
|
.addHelpText("after", `
|
|
12
12
|
Examples:
|
|
13
|
-
$ frontline object option list
|
|
13
|
+
$ frontline object option list standard__deals 48
|
|
14
14
|
|
|
15
15
|
Output: Array of options with id, name, color, order.`)).action(async (objectName, fieldId, opts) => {
|
|
16
16
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -24,7 +24,7 @@ const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
|
24
24
|
.option("--data <json>", "Option definition (JSON)")
|
|
25
25
|
.addHelpText("after", `
|
|
26
26
|
Examples:
|
|
27
|
-
$ frontline object option create
|
|
27
|
+
$ frontline object option create standard__deals 48 --data '{"name":"Negotiation","color":"Amber"}'
|
|
28
28
|
|
|
29
29
|
Colors: Terracotta, Amber, Lime, Emerald, Lavender, Sky, Magenta, Bright Red,
|
|
30
30
|
Teal, Gray, Brown, Orange, Yellow, Green, Blue, Purple, Pink, Red
|
|
@@ -45,7 +45,7 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
45
45
|
.option("--data <json>", "Updated option data (JSON)")
|
|
46
46
|
.addHelpText("after", `
|
|
47
47
|
Examples:
|
|
48
|
-
$ frontline object option update
|
|
48
|
+
$ frontline object option update standard__deals 23 --data '{"name":"Warm Lead","color":"Amber"}'
|
|
49
49
|
|
|
50
50
|
Output: Updated option object.`)).action(async (objectName, optionId, opts) => {
|
|
51
51
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -62,7 +62,7 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
62
62
|
.argument("<option-id>", "Option ID (number)")
|
|
63
63
|
.addHelpText("after", `
|
|
64
64
|
Examples:
|
|
65
|
-
$ frontline object option delete
|
|
65
|
+
$ frontline object option delete standard__deals 23
|
|
66
66
|
|
|
67
67
|
Output: { deleted: true, option_id: 23 }`)).action(async (objectName, optionId, opts) => {
|
|
68
68
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -9,7 +9,7 @@ const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
|
9
9
|
.argument("<object>", "Object name (slug)")
|
|
10
10
|
.addHelpText("after", `
|
|
11
11
|
Examples:
|
|
12
|
-
$ frontline object record-type list
|
|
12
|
+
$ frontline object record-type list standard__people
|
|
13
13
|
|
|
14
14
|
Output: Array of record types with id, name, display_name, is_default.`)).action(async (objectName, opts) => {
|
|
15
15
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -22,7 +22,7 @@ const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
|
22
22
|
.option("--data <json>", "Record type definition (JSON)")
|
|
23
23
|
.addHelpText("after", `
|
|
24
24
|
Examples:
|
|
25
|
-
$ frontline object record-type create
|
|
25
|
+
$ frontline object record-type create standard__deals --data '{"name":"lead","displayName":"Lead","columnIds":[1,2,3]}'
|
|
26
26
|
|
|
27
27
|
Output: Created record type with id, name, display_name, is_default.`)).action(async (objectName, opts) => {
|
|
28
28
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -40,7 +40,7 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
40
40
|
.option("--data <json>", "Updated record type data (JSON)")
|
|
41
41
|
.addHelpText("after", `
|
|
42
42
|
Examples:
|
|
43
|
-
$ frontline object record-type update
|
|
43
|
+
$ frontline object record-type update standard__deals 5 --data '{"displayName":"Qualified Lead"}'
|
|
44
44
|
|
|
45
45
|
Output: Updated record type object.`)).action(async (objectName, recordTypeId, opts) => {
|
|
46
46
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -57,7 +57,7 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
57
57
|
.argument("<record-type-id>", "Record type ID (number)")
|
|
58
58
|
.addHelpText("after", `
|
|
59
59
|
Examples:
|
|
60
|
-
$ frontline object record-type delete
|
|
60
|
+
$ frontline object record-type delete standard__deals 5
|
|
61
61
|
|
|
62
62
|
Output: { deleted: true, record_type_id: 5 }`)).action(async (objectName, recordTypeId, opts) => {
|
|
63
63
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -16,9 +16,9 @@ const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
|
16
16
|
.option("--record-type <name>", "Filter by record type")
|
|
17
17
|
.addHelpText("after", `
|
|
18
18
|
Examples:
|
|
19
|
-
$ frontline object record list
|
|
20
|
-
$ frontline object record list
|
|
21
|
-
$ frontline object record list
|
|
19
|
+
$ frontline object record list standard__people
|
|
20
|
+
$ frontline object record list standard__deals --search "acme"
|
|
21
|
+
$ frontline object record list standard__deals --record-type lead --page-size 20
|
|
22
22
|
|
|
23
23
|
Output: { rows: [...], total_count, total_pages, current_page }`)).action(async (objectName, opts) => {
|
|
24
24
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -44,7 +44,7 @@ const getCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("get")
|
|
|
44
44
|
.argument("<id>", "Record ID (MongoDB ObjectId)")
|
|
45
45
|
.addHelpText("after", `
|
|
46
46
|
Examples:
|
|
47
|
-
$ frontline object record get
|
|
47
|
+
$ frontline object record get standard__people 6625abc123def456
|
|
48
48
|
|
|
49
49
|
Output: Single record with id, auto_id, created_at, updated_at, and all field values.`)).action(async (objectName, id, opts) => {
|
|
50
50
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -57,7 +57,7 @@ const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
|
57
57
|
.option("--data <json>", "Record field values (JSON)")
|
|
58
58
|
.addHelpText("after", `
|
|
59
59
|
Examples:
|
|
60
|
-
$ frontline object record create
|
|
60
|
+
$ frontline object record create standard__people --data '{"First Name":"John","Last Name":"Doe","Email":"john@example.com"}'
|
|
61
61
|
|
|
62
62
|
Output: Created record object.`)).action(async (objectName, opts) => {
|
|
63
63
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -75,7 +75,7 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
75
75
|
.option("--data <json>", "Updated field values (JSON)")
|
|
76
76
|
.addHelpText("after", `
|
|
77
77
|
Examples:
|
|
78
|
-
$ frontline object record update
|
|
78
|
+
$ frontline object record update standard__people 6625abc123def456 --data '{"Email":"new@example.com"}'
|
|
79
79
|
|
|
80
80
|
Output: Updated record object.`)).action(async (objectName, id, opts) => {
|
|
81
81
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -92,7 +92,7 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
92
92
|
.argument("<id>", "Record ID (MongoDB ObjectId)")
|
|
93
93
|
.addHelpText("after", `
|
|
94
94
|
Examples:
|
|
95
|
-
$ frontline object record delete
|
|
95
|
+
$ frontline object record delete standard__people 6625abc123def456
|
|
96
96
|
|
|
97
97
|
Output: { deleted: true, row_id: "6625abc123def456" }`)).action(async (objectName, id, opts) => {
|
|
98
98
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -105,7 +105,7 @@ const bulkCreateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("bulk
|
|
|
105
105
|
.option("--data <json>", "Array of record field values (JSON)")
|
|
106
106
|
.addHelpText("after", `
|
|
107
107
|
Examples:
|
|
108
|
-
$ frontline object record bulk-create
|
|
108
|
+
$ frontline object record bulk-create standard__people --data '[{"First Name":"John","Last Name":"Doe"},{"First Name":"Jane","Last Name":"Smith"}]'
|
|
109
109
|
|
|
110
110
|
Output: Array of created record objects.`)).action(async (objectName, opts) => {
|
|
111
111
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -11,7 +11,7 @@ const getCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("get")
|
|
|
11
11
|
.argument("<relation>", "Relation name (e.g. company, people)")
|
|
12
12
|
.addHelpText("after", `
|
|
13
13
|
Examples:
|
|
14
|
-
$ frontline object relation get
|
|
14
|
+
$ frontline object relation get standard__people 6625abc123def456 company
|
|
15
15
|
|
|
16
16
|
Output: Array of related records.`)).action(async (objectName, id, relation, opts) => {
|
|
17
17
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -27,7 +27,7 @@ const findByCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("find-by"
|
|
|
27
27
|
.option("--page-size <n>", "Rows per page", "50")
|
|
28
28
|
.addHelpText("after", `
|
|
29
29
|
Examples:
|
|
30
|
-
$ frontline object relation find-by
|
|
30
|
+
$ frontline object relation find-by standard__people company 6625abc123def456
|
|
31
31
|
|
|
32
32
|
Output: { rows: [...], total_count, total_pages, current_page }`)).action(async (objectName, relation, targetId, opts) => {
|
|
33
33
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -42,7 +42,7 @@ const linkCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("link")
|
|
|
42
42
|
.argument("<target-id>", "Target record ID to link")
|
|
43
43
|
.addHelpText("after", `
|
|
44
44
|
Examples:
|
|
45
|
-
$ frontline object relation link
|
|
45
|
+
$ frontline object relation link standard__people 6625abc123def456 company 6625def789abc012
|
|
46
46
|
|
|
47
47
|
Output: Updated source record.`)).action(async (objectName, id, relation, targetId, opts) => {
|
|
48
48
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -57,7 +57,7 @@ const unlinkCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("unlink")
|
|
|
57
57
|
.argument("<target-id>", "Target record ID to unlink")
|
|
58
58
|
.addHelpText("after", `
|
|
59
59
|
Examples:
|
|
60
|
-
$ frontline object relation unlink
|
|
60
|
+
$ frontline object relation unlink standard__people 6625abc123def456 company 6625def789abc012
|
|
61
61
|
|
|
62
62
|
Output: Updated source record.`)).action(async (objectName, id, relation, targetId, opts) => {
|
|
63
63
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -9,7 +9,7 @@ const listCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("list")
|
|
|
9
9
|
.argument("<object>", "Object name (slug)")
|
|
10
10
|
.addHelpText("after", `
|
|
11
11
|
Examples:
|
|
12
|
-
$ frontline object view list
|
|
12
|
+
$ frontline object view list standard__people
|
|
13
13
|
|
|
14
14
|
Output: Array of views with id, name, type, is_default, is_private.`)).action(async (objectName, opts) => {
|
|
15
15
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -23,8 +23,8 @@ const createCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("create")
|
|
|
23
23
|
.option("--record-type <id>", "Record type ID (uses default if omitted)")
|
|
24
24
|
.addHelpText("after", `
|
|
25
25
|
Examples:
|
|
26
|
-
$ frontline object view create
|
|
27
|
-
$ frontline object view create
|
|
26
|
+
$ frontline object view create standard__deals --data '{"name":"Kanban","type":"KANBAN","metadata":{"groupingColumnId":42}}'
|
|
27
|
+
$ frontline object view create standard__deals --record-type 10 --data '{"name":"Board","type":"TABLE","metadata":{}}'
|
|
28
28
|
|
|
29
29
|
View types: TABLE, KANBAN, RECORD
|
|
30
30
|
|
|
@@ -54,11 +54,11 @@ const updateCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("update")
|
|
|
54
54
|
.option("--data <json>", "Other updated view data (JSON)")
|
|
55
55
|
.addHelpText("after", `
|
|
56
56
|
Examples:
|
|
57
|
-
$ frontline object view update
|
|
58
|
-
$ frontline object view update
|
|
59
|
-
$ frontline object view update
|
|
60
|
-
$ frontline object view update
|
|
61
|
-
$ frontline object view update
|
|
57
|
+
$ frontline object view update standard__deals 12 --name "My Deals" --column-order "Name, Stage, Amount"
|
|
58
|
+
$ frontline object view update standard__deals 12 --hidden-columns "Created At, Updated At"
|
|
59
|
+
$ frontline object view update standard__deals 12 --dialog-field-order "Name, Stage, Close Date"
|
|
60
|
+
$ frontline object view update standard__deals 12 --sticky-columns "Name, Stage"
|
|
61
|
+
$ frontline object view update standard__deals 12 --option-order "Closed, Won, In Progress, Lead"
|
|
62
62
|
|
|
63
63
|
Output: Updated view object.`)).action(async (objectName, viewId, opts) => {
|
|
64
64
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -102,7 +102,7 @@ const deleteCmd = (0, globalOpts_1.globalOpts)(new commander_1.Command("delete")
|
|
|
102
102
|
.argument("<view-id>", "View ID (number)")
|
|
103
103
|
.addHelpText("after", `
|
|
104
104
|
Examples:
|
|
105
|
-
$ frontline object view delete
|
|
105
|
+
$ frontline object view delete standard__deals 12
|
|
106
106
|
|
|
107
107
|
Output: { deleted: true, view_id: 12 }`)).action(async (objectName, viewId, opts) => {
|
|
108
108
|
const client = (0, globalOpts_1.requireClient)(opts);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Published package version of @getfrontline/cli (from package.json at build time). */
|
|
2
|
+
export declare const CLI_PACKAGE_VERSION: string;
|
|
3
|
+
/**
|
|
4
|
+
* User-Agent and version header for Public API requests.
|
|
5
|
+
* Same package ships `frontline` and `max` bin entries; we distinguish by client name.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildPublicApiCliHeaders(client: "frontline" | "max", base: Record<string, string>): Record<string, string>;
|
|
8
|
+
//# sourceMappingURL=cliVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliVersion.d.ts","sourceRoot":"","sources":["../../src/lib/cliVersion.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,EAAE,MAA4B,CAAC;AAI/D;;;GAGG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,WAAW,GAAG,KAAK,EAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CLI_PACKAGE_VERSION = void 0;
|
|
7
|
+
exports.buildPublicApiCliHeaders = buildPublicApiCliHeaders;
|
|
8
|
+
const package_json_1 = __importDefault(require("../../package.json"));
|
|
9
|
+
/** Published package version of @getfrontline/cli (from package.json at build time). */
|
|
10
|
+
exports.CLI_PACKAGE_VERSION = package_json_1.default.version;
|
|
11
|
+
const VERSION_HEADER = "X-Frontline-CLI-Version";
|
|
12
|
+
/**
|
|
13
|
+
* User-Agent and version header for Public API requests.
|
|
14
|
+
* Same package ships `frontline` and `max` bin entries; we distinguish by client name.
|
|
15
|
+
*/
|
|
16
|
+
function buildPublicApiCliHeaders(client, base) {
|
|
17
|
+
const userAgent = client === "max"
|
|
18
|
+
? `max-cli/${exports.CLI_PACKAGE_VERSION}`
|
|
19
|
+
: `frontline-cli/${exports.CLI_PACKAGE_VERSION}`;
|
|
20
|
+
return {
|
|
21
|
+
...base,
|
|
22
|
+
"User-Agent": userAgent,
|
|
23
|
+
[VERSION_HEADER]: exports.CLI_PACKAGE_VERSION,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=cliVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliVersion.js","sourceRoot":"","sources":["../../src/lib/cliVersion.ts"],"names":[],"mappings":";;;;;;AAWA,4DAaC;AAxBD,sEAA6C;AAE7C,wFAAwF;AAC3E,QAAA,mBAAmB,GAAW,sBAAW,CAAC,OAAO,CAAC;AAE/D,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD;;;GAGG;AACH,SAAgB,wBAAwB,CACpC,MAA2B,EAC3B,IAA4B;IAE5B,MAAM,SAAS,GACX,MAAM,KAAK,KAAK;QACZ,CAAC,CAAC,WAAW,2BAAmB,EAAE;QAClC,CAAC,CAAC,iBAAiB,2BAAmB,EAAE,CAAC;IACjD,OAAO;QACH,GAAG,IAAI;QACP,YAAY,EAAE,SAAS;QACvB,CAAC,cAAc,CAAC,EAAE,2BAAmB;KACxC,CAAC;AACN,CAAC"}
|
package/dist/lib/config.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.getConfigPath = getConfigPath;
|
|
|
14
14
|
exports.resolveApiKey = resolveApiKey;
|
|
15
15
|
exports.resolveBaseUrl = resolveBaseUrl;
|
|
16
16
|
const conf_1 = __importDefault(require("conf"));
|
|
17
|
-
const DEFAULT_BASE_URL = "https://
|
|
17
|
+
const DEFAULT_BASE_URL = "https://prod-api.getfrontline.ai/public/v1";
|
|
18
18
|
const store = new conf_1.default({
|
|
19
19
|
projectName: "frontline-cli",
|
|
20
20
|
defaults: {
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":";;;;;AAsBA,8CAEC;AAED,8CAEC;AAED,gCAIC;AAED,gCAIC;AAED,sCAIC;AAED,wCAEC;AAED,8CAEC;AAED,sCAEC;AAQD,sCAEC;AASD,wCAOC;AApFD,gDAAwB;AAYxB,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":";;;;;AAsBA,8CAEC;AAED,8CAEC;AAED,gCAIC;AAED,gCAIC;AAED,sCAIC;AAED,wCAEC;AAED,8CAEC;AAED,sCAEC;AAQD,sCAEC;AASD,wCAOC;AApFD,gDAAwB;AAYxB,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAEtE,MAAM,KAAK,GAAG,IAAI,cAAI,CAAY;IAC9B,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE;QACN,cAAc,EAAE,SAAS;QACzB,QAAQ,EAAE,EAAE;KACf;CACJ,CAAC,CAAC;AAEH,SAAgB,iBAAiB;IAC7B,OAAO,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACvC,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAY;IAC1C,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,UAAU,CAAC,IAAa;IACpC,MAAM,WAAW,GAAG,IAAI,IAAI,iBAAiB,EAAE,CAAC;IAChD,MAA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
8
8
|
export declare class APIError extends CLIError {
|
|
9
9
|
readonly statusCode: number;
|
|
10
10
|
readonly body?: unknown | undefined;
|
|
11
|
+
/** `error.code` from Public API JSON envelope, when present. */
|
|
12
|
+
readonly apiCode: string | undefined;
|
|
13
|
+
readonly apiSuggestion: string | undefined;
|
|
11
14
|
constructor(message: string, statusCode: number, body?: unknown | undefined);
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;aAGX,IAAI,CAAC,EAAE,MAAM;gBAD7B,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,YAAA;CAKpC;AAED,qBAAa,SAAU,SAAQ,QAAQ;gBACvB,OAAO,EAAE,MAAM;CAI9B;AAED,qBAAa,QAAS,SAAQ,QAAQ;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;aAGX,IAAI,CAAC,EAAE,MAAM;gBAD7B,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,YAAA;CAKpC;AAED,qBAAa,SAAU,SAAQ,QAAQ;gBACvB,OAAO,EAAE,MAAM;CAI9B;AAED,qBAAa,QAAS,SAAQ,QAAQ;aAOd,UAAU,EAAE,MAAM;aAClB,IAAI,CAAC,EAAE,OAAO;IAPlC,gEAAgE;IAChE,SAAgB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,SAAgB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;gBAG9C,OAAO,EAAE,MAAM,EACC,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,OAAO,YAAA;CAYrC"}
|
package/dist/lib/errors.js
CHANGED
|
@@ -20,11 +20,20 @@ exports.AuthError = AuthError;
|
|
|
20
20
|
class APIError extends CLIError {
|
|
21
21
|
statusCode;
|
|
22
22
|
body;
|
|
23
|
+
/** `error.code` from Public API JSON envelope, when present. */
|
|
24
|
+
apiCode;
|
|
25
|
+
apiSuggestion;
|
|
23
26
|
constructor(message, statusCode, body) {
|
|
24
|
-
|
|
27
|
+
const envelope = body?.error;
|
|
28
|
+
const code = envelope?.code;
|
|
29
|
+
const suggestion = envelope?.suggestion;
|
|
30
|
+
const finalMessage = code === "cli_outdated" && suggestion ? `${message}\nHint: ${suggestion}` : message;
|
|
31
|
+
super(finalMessage);
|
|
25
32
|
this.statusCode = statusCode;
|
|
26
33
|
this.body = body;
|
|
27
34
|
this.name = "APIError";
|
|
35
|
+
this.apiCode = code;
|
|
36
|
+
this.apiSuggestion = suggestion;
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
exports.APIError = APIError;
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ,KAAK;IAGX;IAFpB,YACI,OAAe,EACC,IAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,CAAC;CACJ;AARD,4BAQC;AAED,MAAa,SAAU,SAAQ,QAAQ;IACnC,YAAY,OAAe;QACvB,KAAK,CAAC,OAAO,EAAE,6CAA6C,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5B,CAAC;CACJ;AALD,8BAKC;AAED,MAAa,QAAS,SAAQ,QAAQ;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ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wB,wFACoD,CAAC;AAE1F,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"helpEpilog.d.ts","sourceRoot":"","sources":["../../src/lib/helpEpilog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,wBAAwB,wHACoF,CAAC;AAE1H,eAAO,MAAM,wBAAwB,wFACoD,CAAC;AAE1F,eAAO,MAAM,yBAAyB,wDAAwD,CAAC;AAE/F,sCAAsC;AACtC,eAAO,MAAM,oBAAoB,QAMzB,CAAC;AAET,iDAAiD;AACjD,eAAO,MAAM,2BAA2B,QAGhC,CAAC;AAET,eAAO,MAAM,kBAAkB,iKACmI,CAAC;AAEnK,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,wDAA4B,CAAC;AAE7D,gCAAgC;AAChC,eAAO,MAAM,cAAc,QAkBnB,CAAC;AAET,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,QAQ1B,CAAC"}
|
package/dist/lib/helpEpilog.js
CHANGED
|
@@ -8,49 +8,49 @@ exports.FRONTLINE_PROFILE_OPTION = "Credentials profile: uses that profile's sav
|
|
|
8
8
|
exports.FRONTLINE_API_KEY_OPTION = "Override API key for this run (else FRONTLINE_API_KEY env, else stored profile key)";
|
|
9
9
|
exports.FRONTLINE_BASE_URL_OPTION = "Advanced: override Public API base URL for this run";
|
|
10
10
|
/** Shown after `frontline --help`. */
|
|
11
|
-
exports.FRONTLINE_CLI_EPILOG = `
|
|
12
|
-
API key lookup order: --api-key flag > FRONTLINE_API_KEY env > stored profile key.
|
|
13
|
-
|
|
14
|
-
Output format:
|
|
15
|
-
Default: JSON on stdout (scripting-friendly). Errors go to stdout as JSON + a human line on stderr.
|
|
16
|
-
Opt-in: --pretty / --table on commands that support human-readable output.
|
|
11
|
+
exports.FRONTLINE_CLI_EPILOG = `
|
|
12
|
+
API key lookup order: --api-key flag > FRONTLINE_API_KEY env > stored profile key.
|
|
13
|
+
|
|
14
|
+
Output format:
|
|
15
|
+
Default: JSON on stdout (scripting-friendly). Errors go to stdout as JSON + a human line on stderr.
|
|
16
|
+
Opt-in: --pretty / --table on commands that support human-readable output.
|
|
17
17
|
`.trim();
|
|
18
18
|
/** Shown after `frontline auth login --help`. */
|
|
19
|
-
exports.FRONTLINE_AUTH_LOGIN_EPILOG = `
|
|
20
|
-
Examples:
|
|
21
|
-
$ frontline auth login flk_abc123
|
|
19
|
+
exports.FRONTLINE_AUTH_LOGIN_EPILOG = `
|
|
20
|
+
Examples:
|
|
21
|
+
$ frontline auth login flk_abc123
|
|
22
22
|
`.trim();
|
|
23
23
|
exports.MAX_PROFILE_OPTION = "Max profile: uses the per-user API key and Public API base URL from the Frontline CLI profile of the same name (`max config-path` shows the Max-only store).";
|
|
24
24
|
/** Public API root for Max commands (same as `frontline --base-url`, typically …/public/v1). */
|
|
25
25
|
exports.MAX_BASE_URL_OPTION = exports.FRONTLINE_BASE_URL_OPTION;
|
|
26
26
|
/** Shown after `max --help`. */
|
|
27
|
-
exports.MAX_CLI_EPILOG = `
|
|
28
|
-
Authentication:
|
|
29
|
-
Bearer = per-user API key (USER type; same as SoR / Public API). The same key
|
|
30
|
-
is saved to the Max store AND the Frontline CLI store under the same profile
|
|
31
|
-
name, so \`max\` and \`frontline\` commands share credentials.
|
|
32
|
-
|
|
33
|
-
Lookup order: --api-key flag > MAX_API_KEY env > FRONTLINE_API_KEY env >
|
|
34
|
-
Max profile apiKey > Frontline profile apiKey (same name).
|
|
35
|
-
|
|
36
|
-
Chat / send stdout:
|
|
37
|
-
Default: one-line JSON (last API body). \`--pretty\`: assistant text from \`data\`.
|
|
38
|
-
\`--json\`: POST response only, no polling. Interactive \`max chat\` REPL prints
|
|
39
|
-
plain assistant text when possible.
|
|
40
|
-
|
|
41
|
-
NOTE: The hosted browser login (Firebase id token) flow is currently disabled.
|
|
42
|
-
The code is preserved for when SSO is re-enabled.
|
|
43
|
-
|
|
44
|
-
Config file: max config-path
|
|
27
|
+
exports.MAX_CLI_EPILOG = `
|
|
28
|
+
Authentication:
|
|
29
|
+
Bearer = per-user API key (USER type; same as SoR / Public API). The same key
|
|
30
|
+
is saved to the Max store AND the Frontline CLI store under the same profile
|
|
31
|
+
name, so \`max\` and \`frontline\` commands share credentials.
|
|
32
|
+
|
|
33
|
+
Lookup order: --api-key flag > MAX_API_KEY env > FRONTLINE_API_KEY env >
|
|
34
|
+
Max profile apiKey > Frontline profile apiKey (same name).
|
|
35
|
+
|
|
36
|
+
Chat / send stdout:
|
|
37
|
+
Default: one-line JSON (last API body). \`--pretty\`: assistant text from \`data\`.
|
|
38
|
+
\`--json\`: POST response only, no polling. Interactive \`max chat\` REPL prints
|
|
39
|
+
plain assistant text when possible.
|
|
40
|
+
|
|
41
|
+
NOTE: The hosted browser login (Firebase id token) flow is currently disabled.
|
|
42
|
+
The code is preserved for when SSO is re-enabled.
|
|
43
|
+
|
|
44
|
+
Config file: max config-path
|
|
45
45
|
`.trim();
|
|
46
46
|
/** Shown after `max auth login --help` (subcommand help does not include root epilog). */
|
|
47
|
-
exports.MAX_AUTH_LOGIN_EPILOG = `
|
|
48
|
-
Per-user API key:
|
|
49
|
-
Create one in the Frontline web app (Settings -> API keys -> "Create key").
|
|
50
|
-
The CLI stores it in the Max store AND in the Frontline CLI store under the
|
|
51
|
-
same profile name, so \`frontline\` and \`max\` commands can reuse it.
|
|
52
|
-
|
|
53
|
-
Examples:
|
|
54
|
-
$ max auth login flk_abc123
|
|
47
|
+
exports.MAX_AUTH_LOGIN_EPILOG = `
|
|
48
|
+
Per-user API key:
|
|
49
|
+
Create one in the Frontline web app (Settings -> API keys -> "Create key").
|
|
50
|
+
The CLI stores it in the Max store AND in the Frontline CLI store under the
|
|
51
|
+
same profile name, so \`frontline\` and \`max\` commands can reuse it.
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
$ max auth login flk_abc123
|
|
55
55
|
`.trim();
|
|
56
56
|
//# sourceMappingURL=helpEpilog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpEpilog.js","sourceRoot":"","sources":["../../src/lib/helpEpilog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,wBAAwB,GACjC,qHAAqH,CAAC;AAE7G,QAAA,wBAAwB,GACjC,qFAAqF,CAAC;AAE7E,QAAA,yBAAyB,
|
|
1
|
+
{"version":3,"file":"helpEpilog.js","sourceRoot":"","sources":["../../src/lib/helpEpilog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,wBAAwB,GACjC,qHAAqH,CAAC;AAE7G,QAAA,wBAAwB,GACjC,qFAAqF,CAAC;AAE7E,QAAA,yBAAyB,GAAG,qDAAqD,CAAC;AAE/F,sCAAsC;AACzB,QAAA,oBAAoB,GAAG;;;;;;CAMnC,CAAC,IAAI,EAAE,CAAC;AAET,iDAAiD;AACpC,QAAA,2BAA2B,GAAG;;;CAG1C,CAAC,IAAI,EAAE,CAAC;AAEI,QAAA,kBAAkB,GAC3B,8JAA8J,CAAC;AAEnK,gGAAgG;AACnF,QAAA,mBAAmB,GAAG,iCAAyB,CAAC;AAE7D,gCAAgC;AACnB,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;CAkB7B,CAAC,IAAI,EAAE,CAAC;AAET,0FAA0F;AAC7E,QAAA,qBAAqB,GAAG;;;;;;;;CAQpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../src/lib/httpClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../src/lib/httpClient.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,eAAe;IACxB,OAAO,CAAC,QAAQ,CAAC,M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