Conversation
feat: add vitest feat: add more examples feat: add CHANGELOG
Major features: - Add Report API for payment/fee report generation (CSV, PDF, XLSX) - Add Session API for POS integration with fund lock payments - Extend Payment API with meal voucher and fringe benefits parameters - Support euro-to-cent amount conversion in Payment.create() and Payment.update() - Accept Date objects in Payment.all() for starting_after_timestamp parameter API classes: - Report: create(), all(), get() for merchant-level reports - Session: open(), get(), update(), createEvent() for POS sessions - Enhanced Payment types with meal_voucher_max_amount_unit and meal_voucher_max_quantity TypeScript: - Add ReportType, ReportFormatType, ReportStatus types - Add SessionStatus, SessionEventType types - Extend PaymentCreateBody and PaymentUpdateBody with meal voucher support - Make amount/amount_unit mutually exclusive in payment types Testing: - Add 23 new unit tests for Report and Session classes (163 total passing) - Add E2E test suite for staging environment integration testing - Add setup helper functions for E2E test configuration - Improve test coverage with edge cases and error handling Documentation: - Update CHANGELOG.md with comprehensive feature list - Add examples for reports (reports.ts) and POS sessions (pos-session.ts) - Update README with Reports, Sessions, and Meal Voucher sections Fixes: - Change Environment type from 'test' to 'staging' for consistency - Fix Payment.all() return type from 'list' to 'data' (API compliance) - Add proper SSL verification disable for staging environment
Feature/enhanced payment features
WalkthroughThis PR establishes the complete initial release (v0.0.1) of the Satispay GBusiness Node.js SDK, including core API clients (Payment, Consumer, Report, Session, etc.), RSA-based request signing, token-based authentication, comprehensive utilities, TypeScript definitions, 163+ unit/E2E tests, CLI tooling, build/test infrastructure, and detailed documentation. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Api
participant Request
participant RSAService as RSAServiceFactory
participant Crypto as RSA Crypto
participant HttpClient as Fetch
Note over Client,HttpClient: Initialization: Token-Based Authentication
Client->>Api: authenticateWithToken(token)
Api->>RSAService: RSAServiceFactory.get()
RSAService->>Crypto: generateKeys()
Crypto-->>RSAService: {privateKey, publicKey}
RSAService-->>Api: RSAService instance
Api->>Crypto: RSA keys generated
Api->>Request: POST /authentication_keys<br/>(publicKey, token)
Request->>HttpClient: POST with headers
HttpClient-->>Request: {privateKey, keyId}
Request-->>Api: authentication response
Api->>Api: Store keys + keyId<br/>Return ApiAuthentication
Note over Client,HttpClient: Signed Request: Payment Creation
Client->>Request: Payment.create({amount, flow})
Request->>Request: Build request payload
Request->>Request: signRequest()
Request->>Crypto: sign(privateKey, message)
Crypto-->>Request: signature (Buffer)
Request->>Request: Assemble Authorization header<br/>(date, digest, signature)
Request->>HttpClient: POST /payments<br/>with Authorization
HttpClient-->>Request: {id, amount_unit, status}
Request-->>Client: PaymentResponse
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (66)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
Release Notes
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.