flowbase-cli 0.1.7__tar.gz → 0.1.8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowbase-cli
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Command line client for the FlowBase OpenAPI
5
5
  Author: DeepFlowAI
6
6
  License: Apache-2.0
@@ -114,6 +114,7 @@ flowbase docs catalogs field-types # field type names + allowed constrain
114
114
  flowbase docs catalogs workflow-nodes # node types with in/out edge rules
115
115
  flowbase docs catalogs permissions # function permission points + data scopes
116
116
  flowbase docs catalogs dashboard-filters # filter types + date-range presets
117
+ flowbase docs catalogs page-components # page region component kinds (field / relatedList)
117
118
  flowbase docs catalogs id-prefixes # resource ID prefix meanings
118
119
  flowbase docs catalogs icons # icon guidance + examples
119
120
  ```
@@ -140,7 +141,7 @@ flowbase fields create obj_xxx --json '{"label":"Name","key":"name","description
140
141
  flowbase records create obj_xxx --json '{"values":{"name":"Acme Corp"}}'
141
142
  ```
142
143
 
143
- Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`-prefixed; see `docs catalogs id-prefixes`.
144
+ Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`/`reg_`/`cmp_`-prefixed; see `docs catalogs id-prefixes`.
144
145
 
145
146
  ### 6.2 Edit and publish configuration on a test environment
146
147
 
@@ -177,9 +178,15 @@ flowbase workflows create obj_xxx --json '{"label":"Set owner","enabled":true,"t
177
178
  flowbase workflows update obj_xxx wfl_xxx --json-file workflow.json
178
179
  flowbase workflows executions obj_xxx wfl_xxx --result failure
179
180
 
180
- flowbase docs example pages.create --output page.json # authoritative layout template
181
+ flowbase docs catalogs page-components # field + relatedList keys
182
+ flowbase docs example pages.create --output page.json # create-page layout template
181
183
  flowbase pages create --json-file page.json
182
184
  flowbase pages set-default pag_xxx --base-revision 4 --yes
185
+
186
+ # Detail pages may embed relatedList components (reverse lookup lists).
187
+ flowbase pages get pag_xxx > page.json # prefer get → edit → update
188
+ # or: flowbase docs example pages.update --output page.json
189
+ flowbase pages update pag_xxx --json-file page.json
183
190
  ```
184
191
 
185
192
  ### 6.5 Records and attachments
@@ -1,12 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: flowbase-cli
3
- Version: 0.1.7
4
- Summary: Command line client for the FlowBase OpenAPI
5
- Author: DeepFlowAI
6
- License: Apache-2.0
7
- Requires-Python: >=3.11
8
- Description-Content-Type: text/markdown
9
-
10
1
  # FlowBase CLI
11
2
 
12
3
  `flowbase` is the official command line client for the FlowBase OpenAPI. It manages apps, objects, fields, views, custom pages, workflows, dashboards, business records, roles, and configuration versions across the three FlowBase environments.
@@ -114,6 +105,7 @@ flowbase docs catalogs field-types # field type names + allowed constrain
114
105
  flowbase docs catalogs workflow-nodes # node types with in/out edge rules
115
106
  flowbase docs catalogs permissions # function permission points + data scopes
116
107
  flowbase docs catalogs dashboard-filters # filter types + date-range presets
108
+ flowbase docs catalogs page-components # page region component kinds (field / relatedList)
117
109
  flowbase docs catalogs id-prefixes # resource ID prefix meanings
118
110
  flowbase docs catalogs icons # icon guidance + examples
119
111
  ```
@@ -140,7 +132,7 @@ flowbase fields create obj_xxx --json '{"label":"Name","key":"name","description
140
132
  flowbase records create obj_xxx --json '{"values":{"name":"Acme Corp"}}'
141
133
  ```
142
134
 
143
- Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`-prefixed; see `docs catalogs id-prefixes`.
135
+ Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`/`reg_`/`cmp_`-prefixed; see `docs catalogs id-prefixes`.
144
136
 
145
137
  ### 6.2 Edit and publish configuration on a test environment
146
138
 
@@ -177,9 +169,15 @@ flowbase workflows create obj_xxx --json '{"label":"Set owner","enabled":true,"t
177
169
  flowbase workflows update obj_xxx wfl_xxx --json-file workflow.json
178
170
  flowbase workflows executions obj_xxx wfl_xxx --result failure
179
171
 
180
- flowbase docs example pages.create --output page.json # authoritative layout template
172
+ flowbase docs catalogs page-components # field + relatedList keys
173
+ flowbase docs example pages.create --output page.json # create-page layout template
181
174
  flowbase pages create --json-file page.json
182
175
  flowbase pages set-default pag_xxx --base-revision 4 --yes
176
+
177
+ # Detail pages may embed relatedList components (reverse lookup lists).
178
+ flowbase pages get pag_xxx > page.json # prefer get → edit → update
179
+ # or: flowbase docs example pages.update --output page.json
180
+ flowbase pages update pag_xxx --json-file page.json
183
181
  ```
184
182
 
185
183
  ### 6.5 Records and attachments
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "flowbase-cli"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "Command line client for the FlowBase OpenAPI"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,3 +1,3 @@
1
1
  """FlowBase OpenAPI CLI."""
2
2
 
3
- __version__ = "0.1.7"
3
+ __version__ = "0.1.8"
@@ -233,9 +233,16 @@ ENDPOINTS = (
233
233
  )),
234
234
  Endpoint("pages.update", "flowbase_pages_update", "PUT", "/pages/{page_id}", "metadata:write", "Update a custom Page draft.", "flowbase pages update pag_xxx --json-file page.json",
235
235
  request_body=(
236
- '{"baseRevision":4,"page":{"id":"pag_xxx","key":"customer_create","label":"Create customer",'
237
- '"description":"","objectId":"obj_xxx","type":"create",'
238
- '"regions":[{"id":"reg_xxx","label":"Main","hideLabel":true,"columnRatios":[1],"columns":[[]]}],"rules":[]}}'
236
+ '{"baseRevision":4,"page":{"id":"pag_xxx","key":"customer_detail","label":"Customer detail",'
237
+ '"description":"","objectId":"obj_customer","type":"detail",'
238
+ '"regions":[{"id":"reg_xxx","label":"Related","hideLabel":false,"columnRatios":[1],'
239
+ '"columns":[[{"kind":"relatedList","label":"Tickets","hideLabel":false,'
240
+ '"objectId":"obj_ticket","relationFieldId":"fld_customer",'
241
+ '"filters":[{"fieldId":"fld_status","operator":"neq","value":"done"}],'
242
+ '"columnFieldIds":["fld_title","fld_status","fld_created_at"],'
243
+ '"sort":{"fieldId":"fld_created_at","direction":"desc"},"limit":5,"showViewAll":true,'
244
+ '"createAction":{"enabled":true,"label":"New ticket"},'
245
+ '"carryIns":[{"fieldId":"fld_customer","source":"currentRecord"}]}]]}],"rules":[]}}'
239
246
  )),
240
247
  Endpoint("pages.set-default", "flowbase_pages_set_default", "POST", "/pages/{page_id}/set-default", "metadata:write", "Set a default custom Page.", "flowbase pages set-default pag_xxx --base-revision 4 --yes", True,
241
248
  request_body='{"baseRevision":4}'),
@@ -385,8 +392,8 @@ ENDPOINT_BY_KEY = {endpoint.key: endpoint for endpoint in ENDPOINTS}
385
392
 
386
393
  # Closed-domain catalogs for offline authoring of complex request bodies.
387
394
  # Keep in sync with server registries (field types, workflow node kinds,
388
- # permission points, dashboard filter presets). Icons intentionally reference
389
- # the server file because the full Tabler set is large.
395
+ # permission points, dashboard filter presets, page component kinds).
396
+ # Icons intentionally reference the server file because the full Tabler set is large.
390
397
  FIELD_TYPES = (
391
398
  {"type": "text.singleLine", "constraints": ["maxLength"], "writable": True},
392
399
  {"type": "text.multiLine", "constraints": ["maxLength"], "writable": True},
@@ -432,9 +439,63 @@ DASHBOARD_DATE_RANGE_PRESETS = (
432
439
  "this_week", "this_month", "this_quarter", "this_year",
433
440
  )
434
441
 
442
+ # Page region column components (1.8 relatedList + field components).
443
+ # Field components omit `kind` (legacy snapshot shape); related lists set kind.
444
+ PAGE_COMPONENTS = {
445
+ "note": (
446
+ "Region columns hold field components and/or relatedList components. "
447
+ "relatedList is allowed only on detail pages. Prefer pages.get → edit → "
448
+ "pages.update; use pages.options to resolve candidate objects/fields."
449
+ ),
450
+ "kinds": (
451
+ {
452
+ "kind": None,
453
+ "name": "field",
454
+ "note": "Omit kind. Places fields of sourceObjectId on a grid.",
455
+ "requiredKeys": (
456
+ "label", "hideLabel", "sourceObjectId", "grid",
457
+ "alignment", "labelPosition", "labelWidth", "fields",
458
+ ),
459
+ },
460
+ {
461
+ "kind": "relatedList",
462
+ "name": "related record list",
463
+ "pageTypes": ("detail",),
464
+ "requiredKeys": (
465
+ "kind", "label", "hideLabel", "objectId", "relationFieldId",
466
+ "columnFieldIds", "sort", "limit", "showViewAll", "createAction",
467
+ ),
468
+ "optionalKeys": ("id", "filters", "carryIns"),
469
+ "limit": (5, 10, 20),
470
+ "sortDirections": ("asc", "desc"),
471
+ "carryInSources": (
472
+ {
473
+ "source": "currentRecord",
474
+ "note": "Value is the current record id; target field must be "
475
+ "lookup.record pointing at the page object. When create "
476
+ "is enabled, relationFieldId must appear exactly once "
477
+ "with this source.",
478
+ },
479
+ {
480
+ "source": "currentRecordField",
481
+ "requires": "sourceFieldId",
482
+ "note": "Copy an active field from the current record; source "
483
+ "and target field types must match.",
484
+ },
485
+ ),
486
+ "filters": {
487
+ "shape": {"fieldId": "fld_...", "operator": "...", "value": "..."},
488
+ "note": "Same filter protocol as object views; AND-merged with the "
489
+ "implicit relationFieldId eq currentRecord condition.",
490
+ },
491
+ },
492
+ ),
493
+ }
494
+
435
495
  RESOURCE_ID_PREFIXES = {
436
496
  "app_": "app", "grp_": "app group", "obj_": "object", "fld_": "field",
437
497
  "viw_": "view", "wfl_": "workflow", "pag_": "custom page",
498
+ "reg_": "page region", "cmp_": "page component",
438
499
  "dsh_": "dashboard", "dcm_": "dashboard component", "rol_": "role",
439
500
  "rec_": "record", "att_": "attachment", "emp_": "employee", "dep_": "department",
440
501
  }
@@ -447,6 +508,7 @@ CATALOGS = {
447
508
  "types": DASHBOARD_FILTER_TYPES,
448
509
  "dateRangePresets": DASHBOARD_DATE_RANGE_PRESETS,
449
510
  },
511
+ "page-components": PAGE_COMPONENTS,
450
512
  "id-prefixes": RESOURCE_ID_PREFIXES,
451
513
  "icons": {
452
514
  "note": "6146 Tabler icon names are supported; any Icon* name from the "
@@ -906,7 +906,7 @@ def build_parser() -> argparse.ArgumentParser:
906
906
  docs_actions.add_parser("operations")
907
907
  docs_catalogs = docs_actions.add_parser(
908
908
  "catalogs",
909
- help="List closed-domain catalogs, or dump one (field-types, workflow-nodes, permissions, dashboard-filters, id-prefixes, icons).",
909
+ help="List closed-domain catalogs, or dump one (field-types, workflow-nodes, permissions, dashboard-filters, page-components, id-prefixes, icons).",
910
910
  )
911
911
  docs_catalogs.add_argument("name", nargs="?", default=None)
912
912
  docs_show = docs_actions.add_parser("show")
@@ -1,3 +1,12 @@
1
+ Metadata-Version: 2.4
2
+ Name: flowbase-cli
3
+ Version: 0.1.8
4
+ Summary: Command line client for the FlowBase OpenAPI
5
+ Author: DeepFlowAI
6
+ License: Apache-2.0
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+
1
10
  # FlowBase CLI
2
11
 
3
12
  `flowbase` is the official command line client for the FlowBase OpenAPI. It manages apps, objects, fields, views, custom pages, workflows, dashboards, business records, roles, and configuration versions across the three FlowBase environments.
@@ -105,6 +114,7 @@ flowbase docs catalogs field-types # field type names + allowed constrain
105
114
  flowbase docs catalogs workflow-nodes # node types with in/out edge rules
106
115
  flowbase docs catalogs permissions # function permission points + data scopes
107
116
  flowbase docs catalogs dashboard-filters # filter types + date-range presets
117
+ flowbase docs catalogs page-components # page region component kinds (field / relatedList)
108
118
  flowbase docs catalogs id-prefixes # resource ID prefix meanings
109
119
  flowbase docs catalogs icons # icon guidance + examples
110
120
  ```
@@ -131,7 +141,7 @@ flowbase fields create obj_xxx --json '{"label":"Name","key":"name","description
131
141
  flowbase records create obj_xxx --json '{"values":{"name":"Acme Corp"}}'
132
142
  ```
133
143
 
134
- Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`-prefixed; see `docs catalogs id-prefixes`.
144
+ Record `values` keys are **field keys** (`name`), not internal IDs (`fld_...`). IDs are `obj_`/`fld_`/`dsh_`/`wfl_`/`pag_`/`reg_`/`cmp_`-prefixed; see `docs catalogs id-prefixes`.
135
145
 
136
146
  ### 6.2 Edit and publish configuration on a test environment
137
147
 
@@ -168,9 +178,15 @@ flowbase workflows create obj_xxx --json '{"label":"Set owner","enabled":true,"t
168
178
  flowbase workflows update obj_xxx wfl_xxx --json-file workflow.json
169
179
  flowbase workflows executions obj_xxx wfl_xxx --result failure
170
180
 
171
- flowbase docs example pages.create --output page.json # authoritative layout template
181
+ flowbase docs catalogs page-components # field + relatedList keys
182
+ flowbase docs example pages.create --output page.json # create-page layout template
172
183
  flowbase pages create --json-file page.json
173
184
  flowbase pages set-default pag_xxx --base-revision 4 --yes
185
+
186
+ # Detail pages may embed relatedList components (reverse lookup lists).
187
+ flowbase pages get pag_xxx > page.json # prefer get → edit → update
188
+ # or: flowbase docs example pages.update --output page.json
189
+ flowbase pages update pag_xxx --json-file page.json
174
190
  ```
175
191
 
176
192
  ### 6.5 Records and attachments
@@ -110,6 +110,18 @@ class FlowBaseCliTest(unittest.TestCase):
110
110
  payload = json.loads(stdout.getvalue())
111
111
  self.assertIn("regions", payload["requestBody"])
112
112
 
113
+ stdout = io.StringIO()
114
+ with patch("sys.stdout", stdout):
115
+ code = main(["docs", "show", "pages.update"])
116
+ self.assertEqual(code, 0)
117
+ payload = json.loads(stdout.getvalue())
118
+ body = json.loads(payload["requestBody"])
119
+ self.assertEqual(body["page"]["type"], "detail")
120
+ component = body["page"]["regions"][0]["columns"][0][0]
121
+ self.assertEqual(component["kind"], "relatedList")
122
+ self.assertIn("relationFieldId", component)
123
+ self.assertIn("carryIns", component)
124
+
113
125
  def test_docs_catalogs_lists_and_dumps_domains(self):
114
126
  stdout = io.StringIO()
115
127
  with patch("sys.stdout", stdout):
@@ -119,6 +131,7 @@ class FlowBaseCliTest(unittest.TestCase):
119
131
  self.assertIn("field-types", names)
120
132
  self.assertIn("workflow-nodes", names)
121
133
  self.assertIn("permissions", names)
134
+ self.assertIn("page-components", names)
122
135
 
123
136
  stdout = io.StringIO()
124
137
  with patch("sys.stdout", stdout):
@@ -136,6 +149,23 @@ class FlowBaseCliTest(unittest.TestCase):
136
149
  nodes = json.loads(stdout.getvalue())
137
150
  self.assertIn("trigger", {item["type"] for item in nodes})
138
151
 
152
+ stdout = io.StringIO()
153
+ with patch("sys.stdout", stdout):
154
+ code = main(["docs", "catalogs", "page-components"])
155
+ self.assertEqual(code, 0)
156
+ page_components = json.loads(stdout.getvalue())
157
+ kinds = {item.get("kind") for item in page_components["kinds"]}
158
+ self.assertIn(None, kinds)
159
+ self.assertIn("relatedList", kinds)
160
+
161
+ stdout = io.StringIO()
162
+ with patch("sys.stdout", stdout):
163
+ code = main(["docs", "catalogs", "id-prefixes"])
164
+ self.assertEqual(code, 0)
165
+ prefixes = json.loads(stdout.getvalue())
166
+ self.assertEqual(prefixes["reg_"], "page region")
167
+ self.assertEqual(prefixes["cmp_"], "page component")
168
+
139
169
  def test_docs_list_marks_body_and_confirmation(self):
140
170
  stdout = io.StringIO()
141
171
  with patch("sys.stdout", stdout):
File without changes