Skip to content

chore(sync): sdk from monorepo - #27

Open
Codimow wants to merge 53 commits into
mainfrom
sync/sdk-20260308-115310-149bc70
Open

chore(sync): sdk from monorepo#27
Codimow wants to merge 53 commits into
mainfrom
sync/sdk-20260308-115310-149bc70

Conversation

@Codimow

@Codimow Codimow commented Mar 8, 2026

Copy link
Copy Markdown
Member

Automated subtree sync from monorepo.

  • Source prefix: packages/sdk
  • Source commit: 149bc70
  • Split commit: 4a014b286072a75b4c4a553f9345970169d3cb7d
  • Generated at (UTC): 2026-03-08T11:53:26Z

Codimow and others added 30 commits February 15, 2026 16:36
- Added PayArkEffectError for Effect-compatible error handling
- Implemented EffectHttpClient using @effect/platform
- Added Effect schemas for checkout sessions
- Exposed effect namespace in PayArk client
- Added initial unit tests for Effect API
- Completed implementation of Checkout, Payments, and Projects for Effect API
- Added comprehensive Schema validation for all responses
- Integrated PayArkConfigService for automatic config injection
- Fixed circular imports and type mismatches
- Added robust integration tests for all Effect resources
… methods

Task 1: DELETE /v1/customers/:id
- Ownership verification for API Key and PAT auth
- FK constraint handling: 409 when customer has active subscriptions
- Returns 204 No Content on success

Task 2: SDK CustomersResource update
- Added update(id, params) using PATCH
- Added delete(id) using DELETE
- New UpdateCustomerParams type exported from public API

Closes: CUST-02, CUST-03
API Integration Tests (12 tests):
- POST: create success, duplicate 409
- PATCH: update success, updated_at verification, empty body 400,
  cross-project 404, non-existent 404, duplicate email 409
- DELETE: success 204, FK violation 409, non-existent 404, cross-project 404

SDK Unit Tests (11 tests):
- create: POST verb + body
- retrieve: GET verb + URL encoding
- update: PATCH verb + body + URL encoding + 409 conflict
- delete: DELETE verb + URL encoding + 409/404 errors

Mock factory extended with delete/update-select chains.

Closes: Phase 8 verification (08-03)
New: createAutoPaginatingList() in packages/sdk/src/pagination.ts
- for await (const item of payark.payments.list()) { ... }
- Backward-compatible: .data/.meta still accessible
- Applied to payments, customers, subscriptions list() methods
- AutoPaginatingList type exported from public API

5 new unit tests for pagination logic.
Every public method now has:
- Descriptive summary explaining behavior
- @PARAM with type examples
- @returns with specifics
- @throws with error codes
- @example with copy-pasteable code snippets
The `verify` method on `WebhooksResource` was deprecated in favor of `constructEvent`. This patch:
- Removes the deprecated `verify` method from `packages/sdk/src/resources/webhooks.ts`.
- Updates all references to `verify()` in SDK documentation and JSDoc comments to `constructEvent()`.
- Updates markdown guides and LLM prompt/context files to utilize `constructEvent` where `verify` was previously demonstrated.
- Runs and passes all SDK tests to ensure no regressions are introduced.

Co-authored-by: Codimow <178092576+Codimow@users.noreply.github.com>
- Added effect, @effect/platform, and @effect/schema to dependencies.
- Rewrote HttpClient internals using Effect for retries and timeouts.
- Maintained Promise-based public API for zero-friction migration.
- Improved reliability with exponential backoff + jitter.
- Created security-effects.ts for higher-order security logic.
- Refactored payments and customers routes to use Effect-TS pipelines.
- Standardized error handling and ownership verification.
- Integrated DbService and runSecure into API handlers.
- Fixed SDK HttpClient lint warning.
Codimow added 23 commits March 2, 2026 13:58
This reverts commit 322362f8bf6969939fd7760580e13ff950d586c4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant