docs(Order Configs): correct flow projection + align example with fleetops#8
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The actual
/v1/order-configs/{id}response returnsflowas 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
flowshape is wrong — documented as anarray of objects; actually returned as anobjectmap keyed by activity code.code, status, details, color, complete, pod_method, require_pod. The real response also includeskey,logic,events,actions,options,entities,sequence,activities(child codes — the graph edge list), andinternalId.pod_methodvalid values weren't enumerated (scan | signature | photo | nullperconfig/fleetops.php).idprefix wrong —HasPublicIdbuilds{publicIdType}_{hashid}andOrderConfig::$publicIdType = 'order_config', so the real prefix isorder_config_, notordercfg_.versiontyped as integer — DB column isstring(varchar), andFleetOps::createTransportConfigseeds'0.0.1'.statusdescription sayse.g. \active`but newly created configs default toprivateperOrderConfig::boot()`.details,nullpod_method, and emptytags— none of which matchFleetOps::createTransportConfig's default seed.What this PR changes
flowis typedobjectand 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'sactivitiesarray for traversal.<Param>:key,code,status,details,color,sequence,complete,activities,pod_method,require_pod,logic,events,actions,options,entities,internalId.logiccarries the gate shape (type+conditions) and supported operators (exists,in/has,notIn/doesntHave,contains,beginsWith,endsWith, plus standard comparisons), sourced fromFlow/Logic.phpandFlow/Condition.php.pod_methodenumeratesscan | signature | photo | null(fromconfig/fleetops.php).idprefix →order_config_,version→ string semver,statusdefault →private.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 nestedlogicdescription block to render.🤖 Generated with Claude Code