Skip to content

Refresh integration examples to the current API #1341

Description

@greatest0fallt1me

Summary

examples/client-usage.ts, examples/billing-api-integration.ts and examples/complete-integration.ts are referenced in README, but they are not type-checked or executed in CI, and src/tests/complete-integration.test.ts covers only part of them.

Why this matters

Out-of-date examples mislead integrators about request bodies, headers and error envelopes.

Scope

Add examples/ to a tsconfig used by npm run typecheck, update code to current request/response shapes (success envelope, Idempotency-Key usage), and extend the integration test to execute each example against createApp.

Relevant code in CalloraOrg/Callora-Backend:

  • examples/client-usage.ts
  • examples/billing-api-integration.ts
  • examples/README.md
  • src/__tests__/complete-integration.test.ts

Priority

Low

Acceptance criteria

  • Examples compile under typecheck
  • Each example runs against createApp in a test
  • examples/README.md lists prerequisites
  • Examples use the documented envelope fields

Validation

Run npm run typecheck and npm test -- src/__tests__/complete-integration.test.ts.

Non-goals

  • Typo-only, formatting-only, or cosmetic changes.
  • Unrelated refactors, dependency upgrades, or broad rewrites.
  • Removing safeguards or weakening validation to make tests pass.

Contributor application

Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.

PR requirements

Use a feature branch and include Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.

Quality review

A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveStellar Wave Program issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions