Hubbi connector#1134
Draft
petrolivka wants to merge 20 commits into
Draft
Conversation
Add appmixer.hubbi connector with Bearer token + clientKey auth and 5 components: ListHubs, StartHub, StartHubWithData, GetSourceFields, GetTargetFields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove redundant clientKey from ListHubs output, rename conversionKey to key - Rename field key to fieldId in GetSourceFields and GetTargetFields schemas - Use HubsList endpoint for auth validation instead of Index Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change inspector type from "text" to "select" for conversionKey field - Fix "message" typo to "messages" in source data config - Fix toSelectArray to use hub.key (matching API response) instead of hub.conversionKey Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- StartHubWithData: replace static JSON textarea with dynamic source fields loaded from the hub's field definitions via generateInspector - Add NewHubEvent webhook trigger with hub selector and webhook URL display - Mark ListHubs, GetSourceFields, GetTargetFields as private components - Add labels to all components - Bump version to 1.1.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove strict JSON schema required constraint for conversionKey to fix persistent validation error in inspector after hub selection. - Add runtime validation in start() instead. - Add value property alongside defaultValue to fix webhook URL not rendering in the text field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…getFields Also fix source data key from 'message' to 'messages'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The webhook trigger receives data from Hubbi, so its output port options should reflect target (outgoing) fields rather than source (incoming) fields. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lpers - Add ListSourceHubsWithoutPostData (used by StartHub), ListSourceHubsWithPostData (used by StartHubWithData), and ListTargetHubs (used by NewHubEvent) private helper components. - Repoint GetSourceFields/GetTargetFields hub dropdowns to the matching new helpers. - Switch auth profile/validate calls to ListTargetHubs (HubsList endpoint was removed). - Remove old ListHubs helper and bump bundle to 1.2.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add lib.mapFieldType helper that translates .NET type names from /SourceFields and /TargetFields (Int16/32/64, Double, Decimal, DateTime, Date, Boolean, Guid, String, ...) into matching Appmixer inspector input types and JSON schema types. Applied in StartHubWithData generateInspector (number/date-time/toggle inputs with proper schemas instead of all-text/all-string) and in NewHubEvent generateOutputPortOptions (typed schemas on output port options so downstream components consume integers/numbers/booleans/date-time as proper types). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a whole array is mapped from a previous step into the "Records
array" input, Appmixer may serialize it into an object keyed by index
("0", "1", "2", ...). toRecordsArray() then saw a plain object instead
of an array and wrapped it as a single record, so only one malformed
record reached the hub ("OUTPUT [out] 1 item").
Detect index-keyed objects and restore them to an array of records, and
route the parsed-string branch through the same normalization.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When a hub event webhook carried a bulk array of records, `...data`
spread the array into the output as an object with numeric keys
("0", "1", "2", ...), breaking the flat output schema (conversionKey +
field columns).
Emit one event per record instead: arrays fire the trigger once per
record, a single object fires once as before.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace per-record emission with a single output message carrying the whole batch as an array under 'result' (plus 'count'), so a bulk hub event is preserved as an array instead of being spread into an object with numeric keys. A single-record payload becomes an array of one. Update the output port options to an array schema (conversionKey + result[] + count) built from the hub TargetFields. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add an "Output Type" option (First record / All records at once / One record at a time) and route the output through the shared lib helpers (sendArrayOutput / getOutputPortOptions). In the per-record modes the individual hub fields are now exposed directly on the output port instead of being nested under the "result" array. - Make the TargetFields lookup for output port options fault-tolerant: a failed request no longer blanks out the whole option list; the generic record options are still offered and the error is logged. This fixes the case where no output fields (not even the base ones) appeared because the field lookup threw before any options were sent. - BREAKING: the standalone "conversionKey" output field was removed; events are already filtered to the configured hub. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a shared lib.rethrowHubbiError helper and wrap the HubsStart / HubsStartWithData API calls in try/catch so Hubbi HTTP errors get the retry behaviour the integration needs (the opposite of the engine defaults): - 409 (Conflict): rethrown as a plain Error with no HTTP status, so the engine classifies it as unknown and retries it (it would otherwise be dropped as a permanent client error). Relies on the default RETRY_UNKNOWN_ERRORS=true. - 423 (Locked): converted to context.CancelError so the engine does NOT retry (an unclassified 423 would otherwise be retried as unknown). - All other errors are rethrown untouched for the engine's default classification. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Offline unit tests (mocha + assert + sinon, stubbed httpRequest via createMockContext) covering lib.js and all 7 components plus auth: - lib: mapFieldType, rethrowHubbiError (409->retry, 423->CancelError), sendArrayOutput (array/first/object/file), getOutputPortOptions - List*/Get* components: endpoint URL, clientKey encoding, output shapes - StartHub / StartHubWithData: retry classification, recordsArray normalization, generateInspector - NewHubEvent: webhook single vs. bulk payload, conversionKey mismatch, output port options with fallback - auth: validate + masked client key 71 tests, all passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
In progress