docs: document validateResponses, withConfig, env precedence, and docs index (#419) - #556
Merged
David-patrick-chuks-02 merged 11 commits intoSep 6, 2026
Conversation
…col#487 Lilly-Protocol#485 — client ID validation, non-2xx JSON errors, shared defaults, baseUrl fallback - agent/wallet/payment clients: reject empty/whitespace IDs via validateNonEmptyString (Closes Lilly-Protocol#443, bounty Lilly-Protocol#489 ) - fetch-http-client: read body once as text then JSON.parse; throw LilyApiError (not ValidationError) on non-2xx JSON parse failures (Closes Lilly-Protocol#445, bounty Lilly-Protocol#488 ) - src/config/defaults.ts: new file with DEFAULT_TIMEOUT_MS, DEFAULT_RETRY_POLICY, DEFAULT_RETRYABLE_STATUS_CODES (bounty Lilly-Protocol#487 ) - resolve-config.ts: import from defaults; support LILY_BASE_URL env fallback alongside LILY_API_URL (Closes Lilly-Protocol#444, bounty Lilly-Protocol#485 ) - config.ts: export shared defaults - Add tests: client-id-validation, shared-defaults, updated fetch-non-json tests
…-Protocol#446) - Add validation block in createFetchHttpClient to reject negative, NaN, and Infinity timeoutMs values before the request loop starts - Import LilyConfigError from sdk-error - Add 4 test cases: negative, NaN, Infinity rejection + valid value pass - Fixes Lilly-Protocol#446 (Bounty: ) Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
- Add a new 'docs' job that builds typedoc API docs on every PR - Fails CI if docs/api/ has uncommitted changes - Closes Lilly-Protocol#435 (Bounty: ) Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…R_CODES (Lilly-Protocol#447) - Add CANCELLED and RESPONSE_VALIDATION_ERROR entries to LILY_ERROR_CODES - Replace literal string codes in fetch-http-client.ts with constant references - Add tests verifying constant usage for abort and JSON parse failures - Updates error-tojson test to assert new constants exist Closes Lilly-Protocol#447 (Bounty: ) Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…Protocol#442) - Pass this.httpClient to new LilySdk instance in withConfig - Adds test verifying custom HttpClient is shared between parent and child Closes Lilly-Protocol#442 (Bounty: ) Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…lly-Protocol#403) - Change fetchPage signature to return CursorPage<T> instead of readonly T[] - Feed nextCursor from response back through buildPaginationQuery - Stop when hasMore is false or cursor is null instead of relying on item count - Add tests for cursor advancement and no-duplicate-pages behavior - Fix unused vi import in shared-defaults.test.ts Closes Lilly-Protocol#403
…nt (Lilly-Protocol#439) - Change slice(0,2) to slice(0,7) to respect Stellar's 7-digit precision - Update tests to verify sub-cent amounts like 0.0000001 are preserved - Prevents silent precision loss that could zero out real payment values Closes Lilly-Protocol#439
…rotocol#441) - Remove dead if (!baseUrl) throw since DEFAULT_API_URL always provides fallback - Update JSDoc to document actual precedence: options > LILY_API_URL > LILY_BASE_URL > DEFAULT_API_URL - Add test verifying create() never throws for missing baseUrl - Add test for LILY_API_URL precedence over LILY_BASE_URL Closes Lilly-Protocol#441
…-Protocol#424) - Test verifies ./config, ./errors, ./http, ./models subpaths export expected symbols - Test verifies root dist/index.cjs exposes all major runtime symbols - Requires npm run build first (runs against built dist files) Closes Lilly-Protocol#424
…s index (Lilly-Protocol#419) - Add validateResponses row to config table - Add withConfig multi-tenant example section - Document create() env-var precedence chain - Add documentation index linking all docs/ guides Closes Lilly-Protocol#419
3 tasks
# Conflicts: # src/errors/sdk-error.ts # src/models/common.ts # tests/error-tojson.test.ts # tests/fetch-http-client.test.ts # tests/money-amount.test.ts # tests/sdk-create-factory.test.ts # tests/sdk-with-config.test.ts
David-patrick-chuks-02
merged commit Sep 6, 2026
7acafa4
into
Lilly-Protocol:main
0 of 4 checks passed
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.
README updates per bounty #419: add validateResponses to config table, add withConfig multi-tenant example, document create() env-var precedence, add docs/ index linking all guides.