[MIT-3611] Fix incorrect types and improve TypeScript examples#225
Merged
[MIT-3611] Fix incorrect types and improve TypeScript examples#225
Conversation
e91b1b8 to
ce67c68
Compare
ce67c68 to
6589aa1
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR prepares the omise-node library for version 1.0.0 release with several improvements including dependency updates, type definition enhancements, and reorganized TypeScript examples.
- Updated mocha from 10.2.0 to 11.7.5 and removed deprecated tslint package
- Enhanced TypeScript definitions to make card fields optional and add capture method overload
- Reorganized TypeScript examples into a proper package structure with updated imports
Reviewed Changes
Copilot reviewed 32 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| types/index.d.ts | Added capture method overload and made ICard fields (security_code, city, postal_code) optional for better API flexibility |
| package.json | Updated mocha to 11.7.5, removed deprecated tslint, bumped version to 1.0.0 |
| package-lock.json | Updated lock file with new dependency versions including mocha 11.7.5 and transitive dependencies |
| tslint.json | Removed deprecated tslint configuration file |
| tsconfig.json | Cleaned up formatting by removing trailing whitespace |
| test/test_omise_host.js | Improved test readability by renaming host from 'api.xxxxx.co' to 'api.wrong-host.co' |
| README.md | Updated branding from "Opn Payment" to "Omise" and fixed contact email references throughout documentation |
| .github/workflows/coverage.yml | Updated SonarCloud action reference and removed GITHUB_TOKEN environment variable |
| examples/typescript/tsconfig.json | Added new TypeScript configuration for examples package |
| examples/typescript/package.json | Created new package.json for TypeScript examples with proper dependencies |
| examples/typescript/package-lock.json | Added lock file for TypeScript examples package |
| examples/typescript/.env.example | Added environment variable template file |
| examples/typescript/src/*.ts | Updated all example imports to use 'omise' package instead of relative paths |
| examples/typescript/src/create_customer.ts | Fixed return type from ICustomerList to ICustomer |
| examples/typescript/src/capture_charge.ts | Moved and updated capture charge example with proper imports |
| examples/typescript/capture_charge.ts | Removed old file location |
Files not reviewed (1)
- examples/typescript/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
FhanOmise
approved these changes
Nov 10, 2025
AnasNaouchi
approved these changes
Nov 10, 2025
new4762
approved these changes
Nov 10, 2025
Merged
rosle
added a commit
that referenced
this pull request
Nov 24, 2025
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.
Description
ICardandIChargesAPI.capture.serialize-javascriptwhich is the dependency onmochalib by upgrading mocha to latest version.README.mdrenaming OPN to Omise.Related links:
Rollback procedure
default rollback procedure