Skip to content

docs(Order Configs): correct flow projection + align example with fleetops#8

Merged
roncodes merged 2 commits into
mainfrom
fix/order-config-flow-docs
May 27, 2026
Merged

docs(Order Configs): correct flow projection + align example with fleetops#8
roncodes merged 2 commits into
mainfrom
fix/order-config-flow-docs

Conversation

@roncodes
Copy link
Copy Markdown
Member

@roncodes roncodes commented May 27, 2026

Summary

The actual /v1/order-configs/{id} response returns flow as an object keyed by activity code, with each Activity carrying its full editable shape (key, code, color, logic, events, actions, options, entities, sequence, activities, internalId, pod_method, require_pod, etc.). The previous docs framed it as a projected array and omitted the graph-link (activities) and editor wiring — exactly the fields integrators need to walk the workflow.

What's wrong today

  1. flow shape is wrong — documented as an array of objects; actually returned as an object map keyed by activity code.
  2. Missing fields — the previous doc only listed code, status, details, color, complete, pod_method, require_pod. The real response also includes key, logic, events, actions, options, entities, sequence, activities (child codes — the graph edge list), and internalId.
  3. pod_method valid values weren't enumerated (scan | signature | photo | null per config/fleetops.php).
  4. id prefix wrongHasPublicId builds {publicIdType}_{hashid} and OrderConfig::$publicIdType = 'order_config', so the real prefix is order_config_, not ordercfg_.
  5. version typed as integer — DB column is string (varchar), and FleetOps::createTransportConfig seeds '0.0.1'.
  6. status description says e.g. \active`but newly created configs default toprivateperOrderConfig::boot()`.
  7. Example payload uses fake colors, empty details, null pod_method, and empty tags — none of which match FleetOps::createTransportConfig's default seed.

What this PR changes

  • flow is typed object and described as the activity graph keyed by canonical activity code. Lists the well-known codes (created, dispatched, started, enroute, completed, canceled), notes that map order is insertion order — not graph progression — and points consumers at each activity's activities array for traversal.
  • Every activity field is now documented as a nested <Param>: key, code, status, details, color, sequence, complete, activities, pod_method, require_pod, logic, events, actions, options, entities, internalId.
  • logic carries the gate shape (type + conditions) and supported operators (exists, in/has, notIn/doesntHave, contains, beginsWith, endsWith, plus standard comparisons), sourced from Flow/Logic.php and Flow/Condition.php.
  • pod_method enumerates scan | signature | photo | null (from config/fleetops.php).
  • Corrects id prefix → order_config_, version → string semver, status default → private.
  • Example replaced with the actual default-seeded Fleet-Ops transport config response.

Validation

node scripts/validate-collections.js
# Validated 5 Postman Native Git collections and 3 environments.

The fleetbase.io doc generator also produces clean MDX from this YAML (verified end-to-end with pnpm run build). The multi-line <Param> indent fix landing in fleetbase.io#25 is required for the new nested logic description block to render.

🤖 Generated with Claude Code

roncodes added 2 commits May 27, 2026 14:40
…etops

The OrderConfig public projection (Http/Resources/v1/OrderConfig.php)
exposes a flattened, public-safe view of an activity graph. The previous
doc described `flow` as a simple ordered list and the example used
aspirational values that don't match the seeded default transport config
in fleetops.

This commit:

- Documents `flow` as a graph projection. Explains that the editable
  wiring (logic, events, options, activities/child links, sequence,
  key, internalId) is filtered out, that consumers should drive UI from
  each row's `code` (with the canonical codes: created, dispatched,
  started, enroute, completed, canceled), and that array order is
  insertion-order — not graph progression.
- Enumerates `pod_method` values: `scan`, `signature`, `photo`, or null
  (per config/fleetops.php).
- Fixes the `id` prefix to `order_config_` (HasPublicId trait builds the
  prefix from `publicIdType` directly).
- Corrects `version` type to string (semver — DB column is varchar,
  defaults to `0.0.1`).
- Clarifies `status` default (`private` for newly created configs).
- Replaces the example values with the actual default Fleet-Ops
  transport config seeded by FleetOps::createTransportConfig — real
  colors (#1f2937), real details, pod_method "scan", tags, and the
  insertion-order activity list.
The actual API response returns `flow` as an object/map keyed by
activity code, with each Activity carrying the full editable shape
(key, code, color, logic, events, status, actions, details, options,
complete, entities, sequence, activities, internalId, pod_method,
require_pod). The previous doc framed `flow` as a projected array and
omitted the graph-link (`activities`) and editor wiring (logic, events,
actions, options, entities, sequence, internalId), which are exactly
what integrators need to read the workflow.

This commit replaces that with the full shape:

- `flow` is typed `object` and described as the activity graph keyed by
  canonical activity code. Documents the well-known codes (created,
  dispatched, started, enroute, completed, canceled), notes that map
  order is insertion order rather than graph progression, and points
  consumers at the per-activity `activities` field for traversal.
- Each activity field is documented as a nested `<Param>` so the docs
  surface every key in the response.
- `logic` documents the gate shape (`type` + `conditions`) and the
  supported operators (exists, in/has, notIn/doesntHave, contains,
  beginsWith, endsWith, and standard comparisons) sourced from
  Flow/Logic.php and Flow/Condition.php.
- `pod_method` enumerates `scan | signature | photo | null` (from
  config/fleetops.php).
- Example replaced with the actual default-seeded transport config
  response from fleetops.
@roncodes roncodes merged commit eaeba80 into main May 27, 2026
1 check passed
@roncodes roncodes deleted the fix/order-config-flow-docs branch May 27, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant