@adyen/api-library
Version:
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
166 lines (140 loc) • 7.55 kB
Markdown
# tapi/ vs terminal/ Typings Comparison
Generated by comparing `src/typings/tapi/` (generated from `TerminalAPI-v1.yaml`) against `src/typings/terminal/` (existing).
---
## 1. Files missing from `tapi/` (exist in `terminal/`)
### Security / crypto types (all removed)
- `algorithmIdentifier`, `algorithmType`, `authenticatedData`, `contentInformation`, `contentType`
- `digestedData`, `encapsulatedContent`, `encryptedContent`, `envelopedData`
- `issuer`, `issuerAndSerialNumber`, `namedKeyEncryptedData`, `nexoDerivedKey`
- `relativeDistinguishedName`, `securityKey`, `signedData`, `signer`, `signerIdentifier`
### Message request/response types (removed)
- `batchRequest`, `batchResponse`
- `cardReaderInitRequest`, `cardReaderInitResponse`
- `cardReaderPowerOffRequest`, `cardReaderPowerOffResponse`
- `pINRequest`, `pINResponse`
- `soundRequest`, `soundResponse`
- `transmitRequest`, `transmitResponse`
- `loyaltyRequest`
### Model types (removed)
- `allowedProduct`, `amount`, `anyType`, `applicationInfo`
- `cashHandlingDevice`, `coinsOrBills`, `colorType`, `commonField`
- `customerOrder`, `externalPlatform`
- `loyaltyAccountStatus`, `loyaltyAmount`, `loyaltyTotals`, `loyaltyTransaction`
- `merchantDevice`, `parameter`
- `pOICapabilitiesType`, `pOIProfile`, `pOITerminalData`
- `rebates`, `saleCapabilitiesType`, `saleItem`, `saleItemRebate`, `saleProfile`
- `saleToAcquirerData`, `saleToPOISecuredMessage`
- `shopperInteractionDevice`, `sponsoredMerchant`
- `terminalApiSecuredRequest`, `terminalApiSecuredResponse`
- `transactionToPerform`, `unitOfMeasureType`, `versionType`
---
## 2. Renamed classes (`terminal/` → `tapi/`)
The dominant pattern is dropping the `Type` suffix from enum names.
| terminal/ | tapi/ | Note |
|-----------|-------|------|
| `AlignmentType` | `Alignment` | Dropped `Type` |
| `CharacterHeightType` | `CharacterHeight` | Dropped `Type` |
| `CharacterStyleType` | `CharacterStyle` | Dropped `Type` |
| `CharacterWidthType` | `CharacterWidth` | Dropped `Type` |
| `DeviceType` | `Device` | Dropped `Type` |
| `DocumentQualifierType` | `DocumentQualifier` | Dropped `Type` |
| `ErrorConditionType` | `ErrorCondition` | Dropped `Type` |
| `EventToNotifyType` | `EventToNotify` | Dropped `Type` |
| `GlobalStatusType` | `GlobalStatus` | Dropped `Type` |
| `IdentificationSupportType` | `IdentificationSupport` | Dropped `Type` |
| `InfoQualifyType` | `InfoQualify` | Dropped `Type` |
| `InputCommandType` | `InputCommand` | Dropped `Type` |
| `LoyaltyHandlingType` | `LoyaltyHandling` | Dropped `Type` |
| `MenuEntryTagType` | `MenuEntryTag` | Dropped `Type` |
| `MessageCategoryType` | `MessageCategory` | Dropped `Type` |
| `MessageClassType` | `MessageClass` | Dropped `Type` |
| `OutputFormatType` | `OutputFormat` | Dropped `Type` |
| `PeriodUnitType` | `PeriodUnit` | Dropped `Type` |
| `PINFormatType` | `PINFormat` | Dropped `Type` |
| `PrinterStatusType` | `PrinterStatus` | Dropped `Type` |
| `ResponseModeType` | `ResponseMode` | Dropped `Type` |
| `ResultType` | `Result` | Dropped `Type` |
| `ReversalReasonType` | `ReversalReason` | Dropped `Type` |
| `SoundActionType` | `SoundAction` | Dropped `Type` |
| `SoundFormatType` | `SoundFormat` | Dropped `Type` |
| `TrackFormatType` | `TrackFormat` | Dropped `Type` |
| `TransactionActionType` | `TransactionAction` | Dropped `Type` |
| `CheckTypeCodeType` | `TypeCode` | Major rename |
| `LoyaltyAccountId` | `LoyaltyAccountID` | `Id` → `ID` |
| `StoredValueAccountId` | `StoredValueAccountID` | `Id` → `ID` |
| `TerminalApiRequest` | `TerminalAPIRequest` | `Api` → `API` |
| `TerminalApiResponse` | `TerminalAPIResponse` | `Api` → `API` |
| `TransactionIdentification` | `TransactionIDType` | Major rename |
| `CardholderPIN` | `CardHolderPIN` | `H` capitalized |
| `SignaturePoint` | `Point` | Renamed |
---
## 3. Removed properties (in `tapi/` vs `terminal/`)
| File | Removed properties |
|------|--------------------|
| `balanceInquiryResponse` | `LoyaltyAccountStatus` |
| `cardAcquisitionResponse` | `CustomerOrder` |
| `cardData` | `AllowedProduct`, `AllowedProductCode`, `CustomerOrder` |
| `diagnosisResponse` | `LoggedSaleID` |
| `eventNotification` | `CustomerLanguage` |
| `loyaltyData` | `LoyaltyAmount` |
| `loyaltyResult` | `LoyaltyAmount`, `Rebates` |
| `outputBarcode` | `BarcodeType` |
| `outputText` | `Color`, `Font` |
| `paymentAccountStatus` | `LoyaltyAccountStatus` |
| `paymentData` | `CustomerOrder` |
| `paymentResponse` | `CustomerOrder` |
| `paymentTransaction` | `SaleItem` |
| `pOIStatus` | `CashHandlingDevice` |
| `pOISystemData` | `POITerminalData` |
| `printOutput` | `OutputSignature` |
| `reversalRequest` | `CustomerOrder` |
| `reversalResponse` | `CustomerOrderID` |
| `saleData` | `SponsoredMerchant` |
| `saleTerminalData` | `SaleCapabilities`, `SaleProfile`, `TerminalEnvironment` |
| `saleToPOIRequest` | `BatchRequest`, `CardReaderInitRequest`, `CardReaderPowerOffRequest`, `LoyaltyRequest`, `PINRequest`, `SecurityTrailer`, `SoundRequest`, `TransmitRequest` |
| `saleToPOIResponse` | `BatchResponse`, `CardReaderInitResponse`, `CardReaderPowerOffResponse`, `PINResponse`, `SecurityTrailer`, `SoundResponse`, `TransmitResponse` |
| `storedValueRequest` | `CustomerLanguage` |
| `terminalAPIResponse` | `SaleToPOIRequest` |
| `transactionTotals` | `ErrorCondition`, `LoyaltyCurrency`, `LoyaltyTotals`, `LoyaltyUnit` |
---
## 4. Added properties (new in `tapi/`)
| File | Added properties |
|------|-----------------|
| `balanceInquiryResponse` | `PaymentReceipt` |
| `inputData` | `DefaultLayoutString` |
| `loginResponse` | `TokenRequestStatus` |
| `originalPOITransaction` | `AmountValue` |
| `paymentAcquirerData` | `HostReconciliationID` |
| `paymentInstrumentData` | `ProtectedCardData`, `StoredValueAccountID` |
| `paymentResult` | `Instalment` |
| `storedValueAccountID` | `StoredValueID` |
| `storedValueResponse` | `PaymentReceipt` |
---
## 5. Property renames
| File | terminal/ name | tapi/ name |
|------|---------------|-----------|
| `iCCResetData` | `AtrValue` | `ATRValue` |
| `soundContent` | `Value` | `Text` |
| `storedValueAccountID` | `Value` | `StoredValueID` |
| `trackData` | `Value` | `TrackValue` |
| `paymentResult` | `InstalmentType` | `Instalment` |
---
## 6. Type changes (notable)
| Change | Affected fields / files |
|--------|------------------------|
| Inline enums → standalone enum classes | 43+ properties across many files (e.g. `Response.ErrorConditionEnum` → `ErrorCondition`) |
| `string` → `number` | `AcquirerID`, `POIReconciliationID`, `CardCountryCode`, `PAN`, `IMEI`, and others (16+ files) |
| `ContentInformation` (class) → `string` | `ProtectedCardData`, `ProtectedSignature`, `Password`, `ProtectedMobileData` |
| `SaleToAcquirerData` (class) → `string` | `saleData` |
| `Amount` → `ConvertedAmount` | `currencyConversion` |
| `{ [key: string]: any }` → `Date` | `DateTime`, `ExpiryDateTime`, `TimeStamp` fields |
| Array → single value | `ForceEntryMode`, `ServicesEnabled`, `AuthenticationMethod` |
| `| null` added | Optional complex-type properties throughout (35+ files) |
---
## 7. Enum value differences
| Enum | Removed values | Added values |
|------|---------------|-------------|
| `CharacterStyle` | `Underlined` | `Underline` |
| `EventToNotify` | `NetworkConnected`, `NetworkDisconnected` | `UseAnotherCardForPreauth` |
| `MessageCategory` | `Batch`, `CardReaderAPDU`, `CardReaderInit`, `CardReaderPowerOff`, `PIN`, `Sound`, `Transmit` | `None` |
| `TrackFormat` | `JisI`, `JisIi` | (none) |