v1 prep#6
Conversation
…configuration files, client implementation, and CI/CD workflows. Added .gitignore, README, changelog, and basic error handling. Implemented request methods with retry logic and pagination support.
…ode.js version requirement, and improve error handling. Introduced methods for concepts and domains, updated changelog, and refined query building logic. Added synthetic error handling for client-side validation and improved retry logic for API requests.
… type definitions. Ensure positional `query` argument takes precedence over options, and streamline `GetConceptByCodeOptions` to inherit from `GetConceptOptions`. Update `list` method in domains to return non-paginated results. Add tests to validate new behavior.
Initial project setup with TypeScript SDK for OMOPHub API
…esources. Introduce methods for fetching concept hierarchy, ancestors, descendants, and mappings. Implement pagination utilities and normalize search response shapes. Update changelog to reflect new features and improvements.
…esponse handling. Update `ConceptRelationshipsOptions` to include pagination options, enhance error messages for empty input arrays, and normalize search response structures. Add tests to ensure proper error handling for invalid inputs.
Enhance SDK with new hierarchy, mappings, and relationships
…ting processes. Enhance README with usage examples and configuration details. Add comprehensive e2e test suite covering various API interactions, including error handling and response validation. Introduce new TypeScript configuration for e2e tests and implement minimal environment variable loading for test execution.
…ng and comment handling. Update softThrottle implementation for better API rate limiting across test files. Modify error handling in tests to account for rate limit exceeded scenarios. Introduce common options interface for FHIR resolver methods to reduce redundancy. Add tests for setApiKey to ensure proper error handling for read-only environment scenarios.
…nsive features including a new FHIR resolver, enhanced error handling, and improved API interactions. Updated documentation and examples for better user guidance. Updated dependencies and TypeScript configurations for improved performance and compatibility.
…d add CHANGELOG.md to files list.
…accept top-level and nested display fields for semantic fallback, and refine mapping interface documentation. Add tests for new FHIR resolver functionality.
Examples
There was a problem hiding this comment.
5 issues found across 147 files
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
…ata processing. Trim whitespace in setApiKey before persisting, enhance parseRetryAfter to strictly validate input formats, and update pagination functions to correctly handle outer envelope responses. Add tests for new behaviors and edge cases.
There was a problem hiding this comment.
1 issue found across 8 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…mats by implementing full regex checks for `IMF-fixdate`, `rfc850-date`, and `asctime-date`. Update tests to cover rejection of malformed dates and acceptance of valid formats, ensuring compliance with RFC 9110 specifications.
…ucing a new integration job for end-to-end tests. The integration job runs on pushes to main and develop branches, ensuring secure testing against the live API while avoiding exposure of sensitive keys in pull requests.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
…, ensuring it only runs on pushes or manual dispatches to main and develop branches. This change enhances security by preventing exposure of sensitive API keys during pull request workflows.
…ucing `isNoSideEffectStatus` function. Update `isRetryableRequest` to allow retries for non-idempotent requests when the server declines without processing. Enhance tests to verify behavior for 429 responses.
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/client.ts">
<violation number="1" location="src/client.ts:200">
P1: This retry condition now allows POST/PATCH retries without an `Idempotency-Key` on 429 responses, which breaks the SDK’s documented retry contract for non-idempotent requests.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| if ( | ||
| isRetryableStatus(response.status) && | ||
| attempt < this.maxRetries && | ||
| (isNoSideEffectStatus(response.status) || isRetryableRequest(method, headers)) |
There was a problem hiding this comment.
P1: This retry condition now allows POST/PATCH retries without an Idempotency-Key on 429 responses, which breaks the SDK’s documented retry contract for non-idempotent requests.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/client.ts, line 200:
<comment>This retry condition now allows POST/PATCH retries without an `Idempotency-Key` on 429 responses, which breaks the SDK’s documented retry contract for non-idempotent requests.</comment>
<file context>
@@ -197,7 +197,7 @@ export class OMOPHub {
isRetryableStatus(response.status) &&
attempt < this.maxRetries &&
- isRetryableRequest(method, headers)
+ (isNoSideEffectStatus(response.status) || isRetryableRequest(method, headers))
) {
const retryAfter = response.headers.get('retry-after');
</file context>
Summary by cubic
Prepares the v1.0.0 release of
@omophub/omophub-nodewith a typed OMOPHub client (concepts, search, mappings, relationships, hierarchy, domains, vocabularies) and a FHIR resolver. Adds docs, examples, tests, and improved CI/publish workflows; hardens auth, retry/backoff (RFC 9110Retry-After), and pagination.New Features
OMOPHubclient: concepts, search (basic/advanced/autocomplete), mappings, relationships, hierarchy, domains, vocabularies, and FHIR resolve (single, batch, CodeableConcept) withomophubFhirUrl.Retry-After. POSTs are safely retried on 429 even without an idempotency key because the server declines without side effects.{ data, error, meta, headers }; misuse throwsOMOPHubError; async iterators throwOMOPHubIteratorError. Async pagination helpers and fetch‑all; request keys auto snake_cased; normalized search responses.main/develop(branch‑gated to protect API keys).setApiKey; strict RFC 9110Retry-Afterparsing; pagination helpers handle outer envelopes and bare arrays.Migration
OMOPHUB_API_KEYor pass the key tonew OMOPHub('oh_...').Written for commit f040834. Summary will update on new commits.