Add getSubmittedForms method for activities #54
Merged
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
Implements the
getSubmittedForms()method to retrieve submitted forms for activities via the OFS API. This includes service notes, safety checklists, labor reports, and other form submissions.Changes
Core Implementation
getSubmittedForms(activityId, params?)method to OFS classoffsetandlimitparametersscopeparameter with default value"activity"(required for proper API response)OFSSubmittedFormsResponseType Definitions (model.ts)
OFSGetSubmittedFormsParams- Request parameters interfaceOFSFormIdentifier- Form identifier structureOFSSubmittedFormItem- Individual form submission structureOFSSubmittedFormsData- Response data structureOFSSubmittedFormsResponse- Typed response classBug Fixes
console.logthat could expose sensitive header information including authentication tokensTesting
API Endpoint
Example Response Structure
{ "totalResults": 5, "hasMore": false, "offset": 0, "limit": 100, "items": [ { "time": "2025-10-06 14:53:48", "user": "admin", "formIdentifier": { "formSubmitId": "63", "formLabel": "Service Notes" }, "formDetails": { "SITE_NOTE_TITLE": "Turbine working fine", "SITE_NOTE_DETAILS": "Reviewed status..." }, "activityDetails": { ... }, "resourceDetails": { ... } } ] }Version
Documentation
Resolves #53