diff --git a/README.md b/README.md index 628b574d8..9b10c445e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,8 @@ This library supports the following: | [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](/src/services/balancePlatform/index.ts) | | [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](/src/services/dataProtectionApi.ts) | | [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](/src/services/legalEntityManagement/index.ts) | -| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](/src/services/terminalCloudAPI.ts) | +| [Cloud device API](https://docs.adyen.com/api-explorer/cloud-device-api/1/overview) | v1 | Cloud Device point-of-sale integration. | [Cloud device API](/src/services/cloudDevice/cloudDeviceApi.ts) | +| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Terminal API point-of-sale integration. | [TerminalLocalAPI](/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](/src/services/terminalCloudAPI.ts) | | [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](/src/services/management/index.ts) | | [Open Banking API](https://docs.adyen.com/api-explorer/open-banking/1/overview) | v1 | The Open Banking API provides secure endpoints to share financial data and services with third parties. | [Open Banking](/src/services/openbanking/index.ts) | | [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](/src/services/paymentApi.ts) | @@ -344,253 +345,25 @@ client.httpClient = httpClient; // ... more code ``` +## In-person payments integration -### Using the Cloud Terminal API -For In-Person Payments integrations with the [Cloud Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/), you must initialise the Client **setting the closest** [Region](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#cloud): -``` javascript -// Step 1: Require the parts of the module you want to use -const {Client, TerminalCloudAPI} from "@adyen/api-library"; -const { Config, EnvironmentEnum, RegionEnum } = require("@adyen/api-library"); - -// Step 2: Initialize the client object -const config = new Config({ - apiKey: "YOUR_API_KEY", - environment: EnvironmentEnum.LIVE, - region: RegionEnum.US -}); -const client = new Client(config); - -// Step 3: Initialize the API object -const terminalCloudAPI = new TerminalCloudAPI(client); - -// Step 4: Create the request object -const serviceID = "123456789"; -const saleID = "POS-SystemID12345"; -const POIID = "Your Device Name(eg V400m-123456789)"; - -// Use a unique transaction for every transaction you perform -const transactionID = "TransactionID"; -const paymentRequest: SaleToPOIRequest = { - MessageHeader: { - MessageClass: MessageClassType.Service, - MessageCategory: MessageCategoryType.Payment, - MessageType: MessageType.Request, - ProtocolVersion: "3.0", - ServiceID: serviceID, - SaleID: saleID, - POIID: POIID - }, - PaymentRequest: { - SaleData: { - SaleTransactionID: { - TransactionID: transactionID, - TimeStamp: this.GetDate().toISOString() - }, - - SaleToAcquirerData: { - applicationInfo: { - merchantApplication: { - version: "1", - name: "test", - } - } - } - }, - PaymentTransaction: { - AmountsReq: { - Currency: "EUR", - RequestedAmount: 1000 - } - } - } -}; - -// Step 5: Make the request -const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(paymentRequest); -``` - -#### Optional: perform an abort request - -To perform an [abort request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/cancel-a-transaction/) you can use the following example: -``` javascript -const abortRequest: SaleToPOIRequest = { - MessageHeader: { - MessageClass: MessageClassType.Service, - MessageCategory: MessageCategoryType.Abort, - MessageType: MessageType.Request, - ProtocolVersion: "3.0", - // Different serviceID than the one you're aborting - ServiceID: "Different service ID", - SaleID: saleID, - POIID: POIID - }, - AbortRequest: { - AbortReason: "MerchantAbort", - MessageReference: { - MessageCategory: MessageCategoryEnum.Payment, - SaleID: saleID, - // Service ID of the payment you're aborting - ServiceID: serviceID, - POIID: POIID - } - - } -}; -const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(abortRequest); -``` - -#### Optional: perform a status request - -To perform a [status request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/verify-transaction-status/) you can use the following example: -``` javascript -const statusRequest: SaleToPOIRequest = { - MessageHeader: { - MessageClass: MessageClassType.Service, - MessageCategory: MessageCategoryType.TransactionStatus, - MessageType: MessageType.Request, - ProtocolVersion: "3.0", - ServiceID: "Different service ID", - SaleID: saleID, - POIID: POIID - }, - TransactionStatusRequest: { - ReceiptReprintFlag: true, - DocumentQualifier: [DocumentQualifierEnum.CashierReceipt, DocumentQualifierEnum.CustomerReceipt], - MessageReference: { - SaleID: saleID, - // serviceID of the transaction you want the status update for - ServiceID: serviceID, - MessageCategory: MessageCategoryEnum.Payment - } - } -}; -const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(statusRequest); -``` - -### Using the Local Terminal API Integration -The procedure to send In-Person requests using [Terminal API over Local Connection](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/) is similar to the Cloud Terminal API one, however, additional encryption details are required to perform the requests. Make sure to [install the certificate as described here](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/#protect-communications) -```javascript -// Step 1: Require the parts of the module you want to use -const {Client, TerminalLocalAPI} from "@adyen/api-library"; - -// Step 2: Add your Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" -const config: Config = new Config(); -config.certificatePath = "./cert.cer"; -config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; -config.apiKey = "YOUR_API_KEY_HERE"; - -// Step 3: Setup a security password for your terminal in CA, and import the security key object: -const securityKey: SecurityKey = { - AdyenCryptoVersion: 1, - KeyIdentifier: "keyIdentifier", - KeyVersion: 1, - Passphrase: "passphrase", -}; +Build a feature-rich [in-person payments](https://docs.adyen.com/point-of-sale/) integrations that accept payments around the world, with global and local payment methods and create a unique shopping experience for your customers. -// Step 4 Initialize the client and the API objects -client = new Client({ config }); -const terminalLocalAPI = new TerminalLocalAPI(client); +### Using the Cloud Device API -// Step 5: Create the request object -const paymentRequest: SaleToPOIRequest = { -// Similar to the saleToPOIRequest used for Cloud API -} +For In-Person Payments integrations, the recommended solution is the [Cloud Device API](https://docs.adyen.com/api-explorer/cloud-device-api/1/overview). -// Step 6: Make the request -const terminalApiResponse: Types.terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest, securityKey); -``` -## Using the Local Terminal API Integration without Encryption (Only on TEST) -If you wish to develop the Local Terminal API integration parallel to your encryption implementation, you can opt for the unencrypted version. Be sure to remove any encryption details from the CA terminal config page. -```javascript -// Step 1: Require the parts of the module you want to use -const {Client, TerminalLocalAPIUnencrypted} from "@adyen/api-library"; +Check the [Cloud Device API README](CloudDeviceApi.md). -// Step 2: Add your Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" -const config: Config = new Config(); -config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; -config.apiKey = "YOUR_API_KEY_HERE"; +### Using the Terminal API -// Step 3 Initialize the client and the API objects -client = new Client({ config }); -const terminalLocalAPI = new TerminalLocalAPIUnencrypted(client); +With the [Terminal API](https://docs.adyen.com/api-explorer/terminal-api/1/overview) you can send and receive Terminal API messages in the following ways: -// Step 4: Create the request object -const paymentRequest: SaleToPOIRequest = { -// Similar to the saleToPOIRequest used for Cloud API -} +* Local communications: using your local network, your POS system sends the request directly to the IP address of the terminal, and receives the result synchronously. +* Cloud communications: using the internet to access the cloud `/sync` and `/async` endpoints. You should consider adopting the [Cloud Device API](doc/CloudDeviceApi.md) instead. -// Step 5: Make the request -const terminalApiResponse: Types.terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest); -``` -### Using the Cloud Terminal API Integration (async) -If you choose to integrate [Terminal API over Cloud](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) **asynchronously**, you need to follow similar steps to initialize the client and prepare the request object. However the response will be asynchronous: -* a successful request will return `200` status code and `ok` as response body. Make sure to setup the [event notifications](https://docs.adyen.com/point-of-sale/design-your-integration/notifications/event-notifications/) -* a request that fails will return `200` status code and the `TerminalApiResponse` as response body -``` typescript -// Step 1: Require the parts of the module you want to use -const {Client, TerminalCloudAPI, EnvironmentEnum} from "@adyen/api-library"; +Check the [Terminal API README](doc/TerminalApi.md). -// Step 2: Initialize the client object -const client = new Client({apiKey: "YOUR_API_KEY", environment: EnvironmentEnum.TEST}); - - -// Step 3: Initialize the API object -const terminalCloudAPI = new TerminalCloudAPI(client); - -// Step 4: Create the request object -const serviceID = "123456789"; -const saleID = "POS-SystemID12345"; -const POIID = "Your Device Name(eg V400m-123456789)"; - -// Use a unique transaction for every transaction you perform -const transactionID = "TransactionID"; -const paymentRequest: SaleToPOIRequest = { - MessageHeader: { - MessageClass: MessageClassType.Service, - MessageCategory: MessageCategoryType.Payment, - MessageType: MessageType.Request, - ProtocolVersion: "3.0", - ServiceID: serviceID, - SaleID: saleID, - POIID: POIID - }, - PaymentRequest: { - SaleData: { - SaleTransactionID: { - TransactionID: transactionID, - TimeStamp: new Date().toISOString() - }, - - SaleToAcquirerData: { - applicationInfo: { - merchantApplication: { - version: "1", - name: "test", - } - } - } - }, - PaymentTransaction: { - AmountsReq: { - Currency: "EUR", - RequestedAmount: 1000 - } - } - } -}; - -// Step 5: Make the request -const response = await terminalCloudAPI.async(paymentRequest); -// handle both `string` and `TerminalApiResponse` -if (typeof response === "string") { - // request was successful - console.log("response:", response); // should be 'ok' -} else { - // request failed: see details in the EventNotification object - console.log("EventToNotify:", response.SaleToPOIRequest?.EventNotification?.EventToNotify); - console.log("EventDetails:", response.SaleToPOIRequest?.EventNotification?.EventDetails); -} -``` ## Feedback We value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas. diff --git a/doc/CloudDeviceApi.md b/doc/CloudDeviceApi.md new file mode 100644 index 000000000..4ae1605af --- /dev/null +++ b/doc/CloudDeviceApi.md @@ -0,0 +1,194 @@ +# Cloud Device API + +The [Cloud Device API](https://docs.adyen.com/api-explorer/cloud-device-api/1/overview) is our solution to create best-in-class in-person payments integrations. + +With the Cloud device API you can: + +- send Terminal API requests to a cloud endpoint. You can use this communication method when it is not an option to send Terminal API requests over your local network directly to a payment terminal. +- check the cloud connection of a payment terminal or of a device used in a Mobile solution for in-person payments. + +## Benefits of the Cloud Device API + +The Cloud Device API offers the following benefits: +- access to API logs in the Customer Area for troubleshooting errors +- using a version strategy for the API endpoints for controlled and safer rollouts +- improved reliability and security (OAuth support) + +New features and products will be released exclusively on the Cloud Device API + +## Use the Cloud Device API + +### Setup + +First you must initialise the Client **setting the closest** [Region](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#cloud): +``` javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalCloudAPI} from "@adyen/api-library"; +const { Config, EnvironmentEnum, RegionEnum } = require("@adyen/api-library"); + +// Step 2: Initialize the client object +const config = new Config({ + apiKey: "YOUR_API_KEY", + environment: EnvironmentEnum.LIVE, + region: RegionEnum.US +}); +const client = new Client(config); + +// Step 3: Initialize the Cloud Device API service +const cloudDeviceAPI = new CloudDeviceAPI(client); +``` + +### Send a payment SYNC request + +```javascript + +// define the messageHeader +const messageHeader: MessageHeader = { + MessageCategory: MessageCategoryType.Payment, + MessageClass: MessageClassType.Service, + MessageType: MessageType.Request, + POIID: "V400m-123456789", + ProtocolVersion: "3.0", + SaleID: "POS-123", // Your unique ID for the system where you send this request from + ServiceID: "abvc-efgh", // Your unique ID for this request +}; + +// define the paymentRequest +const paymentRequest: PaymentRequest = { + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1, + }, + }, + SaleData: { + SaleTransactionID: { + TimeStamp: "2025-09-11T08:51:30.698Z", + TransactionID: "abc1234567890", + }, + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test" + } + }, + metadata: { + someMetaDataKey1: "YOUR_VALUE", + someMetaDataKey2: "YOUR_VALUE" + }, + } + }, +}; + +// define the request +const cloudDeviceApiRequest: CloudDeviceApiRequest = { + SaleToPOIRequest: { + MessageHeader: messageHeader, + PaymentRequest: paymentRequest, + }, +}; + +// perform the sync call +const response = await cloudDeviceAPI.sendSync( + "YOUR_MERCHANT_ACCOUNT", + "V400m-123456789", + cloudDeviceApiRequest +); +``` + + +### Send a payment ASYNC request + +If you choose to receive the response asynchronously, you only need to use a different method (`sendAsync`). +Don't forget to set up [event notifications](https://docs.adyen.com/point-of-sale/design-your-integration/notifications/event-notifications/) in the CA to be able to receive the Cloud Device API responses. + +```javascript + +// define the request +const cloudDeviceApiRequest: CloudDeviceApiRequest = { + SaleToPOIRequest: { + MessageHeader: messageHeader, + PaymentRequest: paymentRequest, + }, +}; + +// perform the async call +const response = await cloudDeviceAPI.sendAsync( + "YOUR_MERCHANT_ACCOUNT", + "V400m-123456789", + cloudDeviceApiRequest +); + +// handle both `string` and `CloudDeviceApiResponse` +if (typeof response === "string") { + // request was successful + console.log("response:", response); // should be 'ok' +} else { + // request failed: see details in the EventNotification object + console.log("EventToNotify:", response.SaleToPOIRequest?.EventNotification?.EventToNotify); + console.log("EventDetails:", response.SaleToPOIRequest?.EventNotification?.EventDetails); +} +``` + +### Verity the status of the terminals + +The Cloud Device API allows your integration to check the status of the terminals. + +```javascript + +// list of payment terminals or SDK mobile installation IDs +const connectedDevices: ConnectedDevicesResponse = await cloudDeviceAPI.getConnectedDevices("YOUR_MERCHANT_ACCOUNT"); +console.log(connectedDevices.uniqueDeviceIds); + +// check the payment terminal or SDK mobile installation ID +const deviceStatus: DeviceStatusResponse = await cloudDeviceAPI.getDeviceStatus("YOUR_MERCHANT_ACCOUNT", "V400m-123456789"); +console.log(deviceStatus.status); + +``` + +### Error handling + +In case of error, you can try-catch the `CloudDeviceApiError` to understand what went wrong. + +```javascript +try { + const response = await client.sendSync("YOUR_MERCHANT_ACCOUNT", "V400m-123456789", cloudDeviceApiRequest); + console.log("response:", response); + } catch (err) { + if (err instanceof CloudDeviceApiError) { + console.error("CloudDevice API failed:", err.message); + console.error("Cause:", err.cause); + } + } +``` + +### Protect cloud communication + +The Adyen Node.js library supports encrypting request and response payloads, allowing you to secure communication between your integration and the cloud. + +```javascript + +// Encryption credentials from the Terminal configuration on CA +const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 1, + KeyIdentifier: "myKeyIdentifier", + KeyVersion: "myKeyVersion", + Passphrase: "myPassphrase" +}; + +const response: CloudDeviceApiResponse = await cloudDeviceAPI.sendEncryptedSync( + "YOUR_MERCHANT_ACCOUNT", "V400m-123456789", cloudDeviceApiRequest, encryptionCredentialDetails); +console.log("response:", response); +``` + +In case of asynchronous integration, you can decrypt the payload of the event notifications using `decryptNotification()` method. + +```javascript +// JSON with encrypted SaleToPOIResponse (for async responses) or SaleToPOIRequest (for event notifications) +const payload = "..."; + +const response: string = await cloudDeviceAPI.decryptNotification(payload, encryptionCredentialDetails); +console.log("response:", response); + +``` \ No newline at end of file diff --git a/doc/TerminalApi.md b/doc/TerminalApi.md new file mode 100644 index 000000000..7c151a020 --- /dev/null +++ b/doc/TerminalApi.md @@ -0,0 +1,245 @@ +### Using the Terminal API +For In-Person Payments integrations with the [Cloud Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/), you must initialise the Client **setting the closest** [Region](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#cloud): +``` javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalCloudAPI} from "@adyen/api-library"; +const { Config, EnvironmentEnum, RegionEnum } = require("@adyen/api-library"); + +// Step 2: Initialize the client object +const config = new Config({ + apiKey: "YOUR_API_KEY", + environment: EnvironmentEnum.LIVE, + region: RegionEnum.US +}); +const client = new Client(config); + +// Step 3: Initialize the API object +const terminalCloudAPI = new TerminalCloudAPI(client); + +// Step 4: Create the request object +const serviceID = "123456789"; +const saleID = "POS-SystemID12345"; +const POIID = "Your Device Name(eg V400m-123456789)"; + +// Use a unique transaction for every transaction you perform +const transactionID = "TransactionID"; +const paymentRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.Payment, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + ServiceID: serviceID, + SaleID: saleID, + POIID: POIID + }, + PaymentRequest: { + SaleData: { + SaleTransactionID: { + TransactionID: transactionID, + TimeStamp: this.GetDate().toISOString() + }, + + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test", + } + } + } + }, + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1000 + } + } + } +}; + +// Step 5: Make the request +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(paymentRequest); +``` + +#### Optional: perform an abort request + +To perform an [abort request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/cancel-a-transaction/) you can use the following example: +``` javascript +const abortRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.Abort, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + // Different serviceID than the one you're aborting + ServiceID: "Different service ID", + SaleID: saleID, + POIID: POIID + }, + AbortRequest: { + AbortReason: "MerchantAbort", + MessageReference: { + MessageCategory: MessageCategoryEnum.Payment, + SaleID: saleID, + // Service ID of the payment you're aborting + ServiceID: serviceID, + POIID: POIID + } + + } +}; +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(abortRequest); +``` + +#### Optional: perform a status request + +To perform a [status request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/verify-transaction-status/) you can use the following example: +``` javascript +const statusRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.TransactionStatus, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + ServiceID: "Different service ID", + SaleID: saleID, + POIID: POIID + }, + TransactionStatusRequest: { + ReceiptReprintFlag: true, + DocumentQualifier: [DocumentQualifierEnum.CashierReceipt, DocumentQualifierEnum.CustomerReceipt], + MessageReference: { + SaleID: saleID, + // serviceID of the transaction you want the status update for + ServiceID: serviceID, + MessageCategory: MessageCategoryEnum.Payment + } + } +}; +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(statusRequest); +``` + +### Using the Local Terminal API Integration +The procedure to send In-Person requests using [Terminal API over Local Connection](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/) is similar to the Cloud Terminal API one, however, additional encryption details are required to perform the requests. Make sure to [install the certificate as described here](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/#protect-communications) +```javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalLocalAPI} from "@adyen/api-library"; + +// Step 2: Add your Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" +const config: Config = new Config(); +config.certificatePath = "./cert.cer"; +config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; +config.apiKey = "YOUR_API_KEY_HERE"; + +// Step 3: Setup a security password for your terminal in CA, and import the security key object: +const securityKey: SecurityKey = { + AdyenCryptoVersion: 1, + KeyIdentifier: "keyIdentifier", + KeyVersion: 1, + Passphrase: "passphrase", +}; + +// Step 4 Initialize the client and the API objects +client = new Client({ config }); +const terminalLocalAPI = new TerminalLocalAPI(client); + +// Step 5: Create the request object +const paymentRequest: SaleToPOIRequest = { +// Similar to the saleToPOIRequest used for Cloud API +} + +// Step 6: Make the request +const terminalApiResponse: terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest, securityKey); +``` +## Using the Local Terminal API Integration without Encryption (Only on TEST) +If you wish to develop the Local Terminal API integration parallel to your encryption implementation, you can opt for the unencrypted version. Be sure to remove any encryption details from the CA terminal config page. +```javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalLocalAPIUnencrypted} from "@adyen/api-library"; + +// Step 2: Add your Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" +const config: Config = new Config(); +config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; +config.apiKey = "YOUR_API_KEY_HERE"; + +// Step 3 Initialize the client and the API objects +client = new Client({ config }); +const terminalLocalAPI = new TerminalLocalAPIUnencrypted(client); + +// Step 4: Create the request object +const paymentRequest: SaleToPOIRequest = { +// Similar to the saleToPOIRequest used for Cloud API +} + +// Step 5: Make the request +const terminalApiResponse: terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest); +``` +### Using the Cloud Terminal API Integration (async) +If you choose to integrate [Terminal API over Cloud](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) **asynchronously**, you need to follow similar steps to initialize the client and prepare the request object. However the response will be asynchronous: +* a successful request will return `200` status code and `ok` as response body. Make sure to setup the [event notifications](https://docs.adyen.com/point-of-sale/design-your-integration/notifications/event-notifications/) +* a request that fails will return `200` status code and the `TerminalApiResponse` as response body +``` typescript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalCloudAPI} from "@adyen/api-library"; + +// Step 2: Initialize the client object +const client = new Client({apiKey: "YOUR_API_KEY", environment: "TEST"}); + +// Step 3: Initialize the API object +const terminalCloudAPI = new TerminalCloudAPI(client); + +// Step 4: Create the request object +const serviceID = "123456789"; +const saleID = "POS-SystemID12345"; +const POIID = "Your Device Name(eg V400m-123456789)"; + +// Use a unique transaction for every transaction you perform +const transactionID = "TransactionID"; +const paymentRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.Payment, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + ServiceID: serviceID, + SaleID: saleID, + POIID: POIID + }, + PaymentRequest: { + SaleData: { + SaleTransactionID: { + TransactionID: transactionID, + TimeStamp: new Date().toISOString() + }, + + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test", + } + } + } + }, + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1000 + } + } + } +}; + +// Step 5: Make the request +const response = await terminalCloudAPI.async(paymentRequest); +// handle both `string` and `TerminalApiResponse` +if (typeof response === "string") { + // request was successful + console.log("response:", response); // should be 'ok' +} else { + // request failed: see details in the EventNotification object + console.log("EventToNotify:", response.SaleToPOIRequest?.EventNotification?.EventToNotify); + console.log("EventDetails:", response.SaleToPOIRequest?.EventNotification?.EventDetails); +} +``` diff --git a/jest.config.terminal.js b/jest.config.terminal.js new file mode 100644 index 000000000..0b6b8e198 --- /dev/null +++ b/jest.config.terminal.js @@ -0,0 +1,25 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2020 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +module.exports = { + ...require('./jest.config.js'), + testMatch: [ + '**/src/__tests__/**/*.terminal.spec.ts' + ], +}; diff --git a/package.json b/package.json index cda339bef..0eb77b3d1 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "lint:fix": "eslint --fix 'src/**/*.ts'", "test": "jest", "test:watch": "jest --watch", - "test:coverage": "jest --coverage" + "test:coverage": "jest --coverage", + "test:terminal": "jest --config jest.config.terminal.js" }, "author": "Adyen", "license": "MIT", diff --git a/src/__mocks__/base.ts b/src/__mocks__/base.ts index 047aeae13..946e3ef97 100644 --- a/src/__mocks__/base.ts +++ b/src/__mocks__/base.ts @@ -18,28 +18,14 @@ */ import Client from "../client"; -import Config, { EnvironmentEnum } from "../config"; -import { - AmountsReq, - MessageCategoryType, - MessageClassType, - MessageHeader, - MessageType, - PaymentRequest, - PaymentTransaction, - ReversalReasonType, - ReversalRequest, - SaleData, - SaleToPOIRequest, - TerminalApiRequest, - TransactionIdentification -} from "../typings/terminal/models"; +import Config, { EnvironmentEnum, TERMINAL_API_ENDPOINT_TEST, CLOUD_DEVICE_API_ENDPOINT_TEST } from "../config"; export const createClient = (apiKey = process.env.ADYEN_API_KEY): Client => { const config: Config = new Config(); config.environment = EnvironmentEnum.TEST; - config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_TEST; + config.terminalApiCloudEndpoint = TERMINAL_API_ENDPOINT_TEST; config.terminalApiLocalEndpoint = "https://mocked_local_endpoint.com"; + config.cloudDeviceApiEndpoint = CLOUD_DEVICE_API_ENDPOINT_TEST; config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST; config.apiKey = apiKey == null ? "apiKey" : apiKey; return new Client(config); @@ -53,79 +39,3 @@ export const createBasicAuthClient = (): Client => { applicationName: "adyen-node-api-library" }); }; - -const id = Math.floor(Math.random() * Math.floor(10000000)).toString(); -const getMessageHeader = ({ messageCategory = MessageCategoryType.Payment }: { messageCategory?: MessageCategoryType } = {}): MessageHeader => ({ - MessageCategory: messageCategory, - MessageClass: MessageClassType.Service, - MessageType: MessageType.Request, - POIID: process.env.ADYEN_TERMINAL_POIID!, - ProtocolVersion: "3.0", - SaleID: id, - ServiceID: id, -}); - -const timestamp = (): string => new Date().toISOString(); -const transactionIdentification: TransactionIdentification = { - TimeStamp: timestamp(), - TransactionID: id, -}; - -const saleData: SaleData = { - SaleTransactionID: transactionIdentification, - SaleToAcquirerData: { - applicationInfo: { - merchantApplication: { - version: "1", - name: "test" - } - }, - metadata: { - someMetaDataKey1: "YOUR_VALUE", - someMetaDataKey2: "YOUR_VALUE" - }, - } -}; - -const amountsReq: AmountsReq = { - Currency: "EUR", - RequestedAmount: 1, -}; - -const paymentTransaction: PaymentTransaction = { - AmountsReq: amountsReq, -}; - -const paymentRequest: PaymentRequest = { - PaymentTransaction: paymentTransaction, - SaleData: saleData, -}; - -const getReversalRequest = (poiTransaction: TransactionIdentification): ReversalRequest => ({ - OriginalPOITransaction: { - POITransactionID: { - TransactionID: poiTransaction.TransactionID, - TimeStamp: poiTransaction.TimeStamp - }, - }, - ReversalReason: ReversalReasonType.MerchantCancel, - SaleData: saleData -}); - -const getSaleToPOIRequest = (messageHeader: MessageHeader, request: Partial): SaleToPOIRequest => ({ - MessageHeader: messageHeader, - ...request -}); - - -export const createTerminalAPIPaymentRequest = (): TerminalApiRequest => { - const messageHeader = getMessageHeader(); - const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { PaymentRequest: paymentRequest }); - return { SaleToPOIRequest: saleToPOIRequest }; -}; - -export const createTerminalAPIRefundRequest = (transactionIdentification: TransactionIdentification): TerminalApiRequest => { - const messageHeader = getMessageHeader({ messageCategory: MessageCategoryType.Reversal }); - const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { ReversalRequest: getReversalRequest(transactionIdentification) }); - return { SaleToPOIRequest: saleToPOIRequest }; -}; diff --git a/src/__mocks__/cloudDeviceApi/async.ts b/src/__mocks__/cloudDeviceApi/async.ts new file mode 100644 index 000000000..7ff278cdc --- /dev/null +++ b/src/__mocks__/cloudDeviceApi/async.ts @@ -0,0 +1,40 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +export const asyncResponseError = { + SaleToPOIRequest: { + EventNotification: { + EventToNotify: "Reject", + EventDetails: "message=Did+not+receive+a+response+from+the+POI.", + RejectedMessage: "ewoi...0KfQo=", + TimeStamp: "2020-03-31T10:28:39.515Z" + }, + MessageHeader: { + DeviceID: "666568147", + MessageCategory: "Event", + MessageClass: "Event", + MessageType: "Notification", + POIID: "P400Plus-123456789", + ProtocolVersion: "3.0", + SaleID: "saleid-4c32759faaa7", + ServiceID: "31122609" + } + } +}; + diff --git a/src/__mocks__/cloudDeviceApi/baseCloudDeviceApi.ts b/src/__mocks__/cloudDeviceApi/baseCloudDeviceApi.ts new file mode 100644 index 000000000..80577c3b4 --- /dev/null +++ b/src/__mocks__/cloudDeviceApi/baseCloudDeviceApi.ts @@ -0,0 +1,112 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +// base test class for Cloud Device API + +import { + AmountsReq, + MessageCategoryType, + MessageClassType, + MessageHeader, + MessageType, + PaymentRequest, + PaymentTransaction, + SaleData, + SaleToPOIRequest, + CloudDeviceApiRequest, + TransactionIdentification, + ReversalRequest, + ReversalReasonType +} from "../../typings/cloudDevice/models"; + +const id = Math.floor(Math.random() * Math.floor(10000000)).toString(); +const getMessageHeader = ({ messageCategory = MessageCategoryType.Payment }: { messageCategory?: MessageCategoryType } = {}): MessageHeader => ({ + MessageCategory: messageCategory, + MessageClass: MessageClassType.Service, + MessageType: MessageType.Request, + POIID: process.env.ADYEN_TERMINAL_POIID!, + ProtocolVersion: "3.0", + SaleID: id, + ServiceID: id, +}); + +const timestamp = (): string => new Date().toISOString(); +const transactionIdentification: TransactionIdentification = { + TimeStamp: timestamp(), + TransactionID: id, +}; + +const saleData: SaleData = { + SaleTransactionID: transactionIdentification, + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test" + } + }, + metadata: { + someMetaDataKey1: "YOUR_VALUE", + someMetaDataKey2: "YOUR_VALUE" + }, + } +}; + +const amountsReq: AmountsReq = { + Currency: "EUR", + RequestedAmount: 1, +}; + +const paymentTransaction: PaymentTransaction = { + AmountsReq: amountsReq, +}; + +const paymentRequest: PaymentRequest = { + PaymentTransaction: paymentTransaction, + SaleData: saleData, +}; + +const getReversalRequest = (poiTransaction: TransactionIdentification): ReversalRequest => ({ + OriginalPOITransaction: { + POITransactionID: { + TransactionID: poiTransaction.TransactionID, + TimeStamp: poiTransaction.TimeStamp + }, + }, + ReversalReason: ReversalReasonType.MerchantCancel, + SaleData: saleData +}); + +const getSaleToPOIRequest = (messageHeader: MessageHeader, request: Partial): SaleToPOIRequest => ({ + MessageHeader: messageHeader, + ...request +}); + + +export const createCloudDeviceApiRequest = (): CloudDeviceApiRequest => { + const messageHeader = getMessageHeader(); + const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { PaymentRequest: paymentRequest }); + return { SaleToPOIRequest: saleToPOIRequest }; +}; + +export const createCloudDeviceAPIRefundRequest = (transactionIdentification: TransactionIdentification): CloudDeviceApiRequest => { + const messageHeader = getMessageHeader({ messageCategory: MessageCategoryType.Reversal }); + const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { ReversalRequest: getReversalRequest(transactionIdentification) }); + return { SaleToPOIRequest: saleToPOIRequest }; +}; \ No newline at end of file diff --git a/src/__mocks__/cloudDeviceApi/devices.ts b/src/__mocks__/cloudDeviceApi/devices.ts new file mode 100644 index 000000000..1d2eeb7f9 --- /dev/null +++ b/src/__mocks__/cloudDeviceApi/devices.ts @@ -0,0 +1,35 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +export const connectedDevicesResponse = { + "uniqueDeviceIds": [ + "S1F2-000158215131748", + "S1F2-000158215131749", + "S1F2-000158215131750", + "M400-401972710", + "M400-401972715", + "M400-401972720" + ] +}; + +export const deviceStatusResponse = { + "deviceId": "AMS1-000168242800763", + "status": "ONLINE" +}; + diff --git a/src/__mocks__/cloudDeviceApi/sync.ts b/src/__mocks__/cloudDeviceApi/sync.ts new file mode 100644 index 000000000..3644bbfed --- /dev/null +++ b/src/__mocks__/cloudDeviceApi/sync.ts @@ -0,0 +1,451 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +export const syncResponse = { + SaleToPOIResponse: { + MessageHeader: { + MessageCategory: "Payment", + MessageClass: "Service", + MessageType: "Response", + POIID: "P400Plus-123456789", + ProtocolVersion: "3.0", + SaleID: "001", + ServiceID: "001", + }, + PaymentResponse: { + POIData: { + POIReconciliationID: "1000", + POITransactionID: { + TimeStamp: "2019-04-29T00:00:00.000Z", + TransactionID: "4r7i001556529591000.8515565295894301", + }, + }, + + PaymentReceipt: [ + { + DocumentQualifier: "CashierReceipt", + OutputContent: { + OutputFormat: "Text", + OutputText: [ + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "key=header1", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "key=header2", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=MERCHANT%20COPY&key=merchantTitle", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Date&value=29%2f04%2f19&key=txdate", + }, + { + EndOfLineFlag: true, + Text: "name=Time&value=10%3a19%3a51&key=txtime", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a3511&key=pan", + }, + { + EndOfLineFlag: true, + Text: "name=Pref.%20name&value=MCC%20351%20v1%202&key=preferredName", + }, + { + EndOfLineFlag: true, + Text: "name=Card%20type&value=mc&key=cardType", + }, + { + EndOfLineFlag: true, + Text: "name=Payment%20method&value=mc&key=paymentMethod", + }, + { + EndOfLineFlag: true, + Text: "name=Payment%20variant&value=mc&key=paymentMethodVariant", + }, + { + EndOfLineFlag: true, + Text: "name=Entry%20mode&value=Contactless%20swipe&key=posEntryMode", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=AID&value=A0000000041010&key=aid", + }, + { + EndOfLineFlag: true, + Text: "name=MID&value=1000&key=mid", + }, + { + EndOfLineFlag: true, + Text: "name=TID&value=P400Plus-275039202&key=tid", + }, + { + EndOfLineFlag: true, + Text: "name=PTID&value=75039202&key=ptid", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Auth.%20code&value=123456&key=authCode", + }, + { + EndOfLineFlag: true, + Text: "name=Tender&value=4r7i001556529591000&key=txRef", + }, + { + EndOfLineFlag: true, + Text: "name=Reference&value=003&key=mref", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Type&value=GOODS_SERVICES&key=txtype", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=TOTAL&value=%e2%82%ac%c2%a01.00&key=totalAmount", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=APPROVED&key=approved", + }, + ], + }, + RequiredSignatureFlag: false, + }, + { + DocumentQualifier: "CustomerReceipt", + OutputContent: { + OutputFormat: "Text", + OutputText: [ + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "key=header1", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "key=header2", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=CARDHOLDER%20COPY&key=cardholderHeader", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Date&value=29%2f04%2f19&key=txdate", + }, + { + EndOfLineFlag: true, + Text: "name=Time&value=10%3a19%3a51&key=txtime", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a3511&key=pan", + }, + { + EndOfLineFlag: true, + Text: "name=Pref.%20name&value=MCC%20351%20v1%202&key=preferredName", + }, + { + EndOfLineFlag: true, + Text: "name=Card%20type&value=mc&key=cardType", + }, + { + EndOfLineFlag: true, + Text: "name=Payment%20method&value=mc&key=paymentMethod", + }, + { + EndOfLineFlag: true, + Text: "name=Payment%20variant&value=mc&key=paymentMethodVariant", + }, + { + EndOfLineFlag: true, + Text: "name=Entry%20mode&value=Contactless%20swipe&key=posEntryMode", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=AID&value=A0000000041010&key=aid", + }, + { + EndOfLineFlag: true, + Text: "name=MID&value=1000&key=mid", + }, + { + EndOfLineFlag: true, + Text: "name=TID&value=P400Plus-275039202&key=tid", + }, + { + EndOfLineFlag: true, + Text: "name=PTID&value=75039202&key=ptid", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Auth.%20code&value=123456&key=authCode", + }, + { + EndOfLineFlag: true, + Text: "name=Tender&value=4r7i001556529591000&key=txRef", + }, + { + EndOfLineFlag: true, + Text: "name=Reference&value=003&key=mref", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Type&value=GOODS_SERVICES&key=txtype", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=TOTAL&value=%e2%82%ac%c2%a01.00&key=totalAmount", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + CharacterStyle: "Bold", + EndOfLineFlag: true, + Text: "name=APPROVED&key=approved", + }, + { + EndOfLineFlag: true, + Text: "key=filler", + }, + { + EndOfLineFlag: true, + Text: "name=Please%20retain%20for%20your%20records&key=retain", + }, + { + EndOfLineFlag: true, + Text: "name=Thank%20you&key=thanks", + }, + ], + }, + RequiredSignatureFlag: false, + }, + ], + PaymentResult: { + AmountsResp: { + AuthorizedAmount: 1, + Currency: "EUR", + }, + OnlineFlag: true, + PaymentAcquirerData: { + AcquirerPOIID: "P400Plus-123456789", + AcquirerTransactionID: { + TimeStamp: "2019-04-29T09:19:51.000Z", + TransactionID: "8515565295894301", + }, + ApprovalCode: "123456", + MerchantID: "TestMerchant", + }, + PaymentInstrumentData: { + CardData: { + EntryMode: [ + "Tapped", + ], + MaskedPan: "411111 **** 1111", + PaymentBrand: "mc", + SensitiveCardData: { + ExpiryDate: "1225", + }, + }, + PaymentInstrumentType: "Card", + }, + }, + Response: { + AdditionalResponse: `tid=75039202&AID=A0000000041010&transactionType=GOODS_SERVICES&backendGiftcardIndi + cator=false&expiryYear=2025&acquirerAccountCode=TestPmmAcquirerAccount&alias=M900978995070104&posOrigin + alAmountCurrency=EUR&giftcardIndicator=false&authorisedAmountValue=100&pspReference=8515565295894301&pa + ymentMethodVariant=mc&cardHolderName=N%2fA&refusalReasonRaw=APPROVED&authorisationMid=1000&expiryDate=1 + 2%2f2025&applicationPreferredName=MCC%20351%20v1%202&acquirerCode=TestPmmAcquirer&txtime=10%3a19%3a51&i + so8601TxDate=2019-04-29T09%3a19%3a51.0000000%2b0000&cardType=mc&posOriginalAmountValue=100&offline=fals + e&aliasType=Default&txdate=29-04-2019&paymentMethod=mc&cvcResult=0%20Unknown&avsResult=0%20Unknown&mid= + 1000&merchantReference=003&transactionReferenceNumber=8515565295894301&expiryMonth=12&cardSummary=3511& + posTotalAmountValue=100&posAuthAmountCurrency=EUR&cardHolderVerificationMethodResults=3F0300&authCode=1 + 23456&shopperCountry=NL&posEntryMode=CLESS_SWIPE&cardScheme=mc&cardBin=541333&posAuthAmountValue=100`, + Result: "Success", + }, + SaleData: { + SaleTransactionID: { + TimeStamp: "2019-04-29T00:00:00.000Z", + TransactionID: "001", + }, + }, + }, + }, +}; + +export const syncResponseRefund = { + SaleToPOIResponse: { + MessageHeader: { + MessageCategory: "Payment", + MessageClass: "Service", + MessageType: "Response", + POIID: process.env.ADYEN_TERMINAL_POIID, + ProtocolVersion: "3.0", + SaleID: "001", + ServiceID: "001", + }, + ReversalResponse: { + Response: { + Result: "Success" + } + } + } +}; + +export const syncResEventNotification = { + SaleToPOIRequest: { + EventNotification: { + EventToNotify: "Reject", + EventDetails: "message=Did+not+receive+a+response+from+the+POI.", + RejectedMessage: "ewoi...0KfQo=", + TimeStamp: "2020-03-31T10:28:39.515Z" + }, + MessageHeader: { + DeviceID: "666568147", + MessageCategory: "Event", + MessageClass: "Event", + MessageType: "Notification", + POIID: "P400Plus-123456789", + ProtocolVersion: "3.0", + SaleID: "saleid-4c32759faaa7", + ServiceID: "31122609" + } + } +}; + +export const syncResponseEventNotificationWithAdditionalAttributes = { + "SaleToPOIRequest":{ + "EventNotification":{ + "EventDetails":"newstate=IDLE&oldstate=START", + "EventToNotify":"Shutdown", + "TimeStamp":"2019-08-07T10:16:10.000Z", + "AdditionalAttribute": "Something" + }, + "MessageHeader":{ + "SaleID":"POSSystemID12345", + "ProtocolVersion":"3.0", + "MessageType":"Notification", + "POIID":"P400Plus-123456789", + "MessageClass":"Event", + "MessageCategory":"Event", + "DeviceID":"1517998561", + "AdditionalAttribute": "SomethingElse" + } + } +}; + +export const syncResponseEventNotificationWithUnknownEnum = { + "SaleToPOIRequest":{ + "EventNotification":{ + "EventDetails":"newstate=IDLE&oldstate=START", + "EventToNotify":"this is unknown", + "TimeStamp":"2019-08-07T10:16:10.000Z" + }, + "MessageHeader":{ + "SaleID":"POSSystemID12345", + "ProtocolVersion":"3.0", + "MessageType":"Notification", + "POIID":"P400Plus-123456789", + "MessageClass":"Event", + "MessageCategory":"Event", + "DeviceID":"1517998561" + } + } +}; + +export const syncEncryptedResponse = { + "SaleToPOIResponse": { + "SecurityTrailer": { + "AdyenCryptoVersion": 1, + "Nonce": "YIyJBzjWFCAZn31QfAvGLA==", + "KeyIdentifier": "CryptoKeyIdentifier12345", + "Hmac": "hpptt0KfxlALCMSo35tTwtgw6fDNbQEESOTdD0AD9Sg=", + "KeyVersion": 1 + }, + "NexoBlob": "fMtXTcQCbAi3gAwtOANt4tQEz2UUrorGVnDuCeYXTJUoF+NyNCmj+bwILU9io34qbHKr3hyZ9OXNqBc0xomMHLnGDbmETkY/hZ5vYAXkqQHsIN1zj1m8hYxvuma/8gy8dTUQJBBAA4XXwLImcc6v7r4LuJ77hWd8N/IxlvUw9ZG6Z4a4yxxip0Zzx8hm6ZnuVvqiKdicoewngJeNMZR0XjPUMEeS57ENWoqTkjBNBOE3KmAQ2BIV4fxHebCU9efg6EjTFv5i7Xf4Nod3w30CPbuPpWdBhDViHsGhY0uQSja/4EfI/QO4p1kF6LJuNXWCUbaJSSd494/J98KNyRDQT2OmcolCsip3KHgtaKMGuTLKqloXy9oLREjL6xPmqF0rb1HTV/q7+dKm/wZwhi6JQK6d8uUyH7+mY8rcLXb3OW/3aanTr9jPFo1yZg0+53kA1t0OkkCDLbcPoBnJFJKZwhWmy2ombWwNNXS6anqp0B3x9LDpHSekkswAu3ExhWa0cTIkT7eeLtIXzzx8K1UX93Zr54EMYmsDX2061QP8Vv4rfsXYbdX0JUJHZcohNRUamJ/hEKxT4BncGkIL47nxBC73h6Pgp3xQw20ihQ0YA4Tqli/i82yJT9tZ4JG7faITL/wTr/WKcdnKDAWgiNVqqEW6lbcITzvm76gYKGdFTu5DTs3niRB0vEQLJ8sDwUUIzMa/8m+Q5M2R5pqqcoOiLKtf/A5s5/P/MqvofrndeosOJYretNFcd/X1e8KvRQdDRYMOnE6k3bxK+1HpKNfdkDEbLGfXLjJyjHhOryijdIMDZA0kz3xfURfUOz44Sfrpn0kkVNGo3XmzpP/4lBHqMgV7kOXzmNP2ArWyj3JRYJAbwr+Tr3QbnlXo7Wo97cOiQFuZOadMpN+y50N51MKh13C9mvKR2lPaAuT2B8QTRgyiKQrbGrHf36+Tg66DM06oTNJ4w/a316Qrk3WbSponJsQ8UsY7HJpYDOdXjLNcWYf+15Ljoqtb3h+dYzsurJGvKV4Zi4rUvJ/xYfRpMGWmzK72ht+o3xHORgm9ZBoGCSxYO7SWj5N5xALjXWY1/Ys5vYvdpU7d9+6iqkerZVWBNH1hFYUDaCBtJCnqBexOt7biPm2vhxGP/f3VpnWIvSlq+raQ9tx+yIdfaleDwEp5bGIEqzEAFlQMNJQVBrJjG8Jyje8X87F7l6OHZ0XNNq15NBt5LoBv0zDQrikR8d9MBsfKZFygsxI8/y9A2vv7/7qy3kz0P0EnVz8vvgqbrn2PO7fFqrWdBIPkfh+U5qEwo3R9z8LNS3tLLJhjzmsAryIjBF1Zt2m1kZDg/D691npM2wFb1i87KNS+jNXZDWgW+py6xBa44znSQOVViJq2kkeNkE49MNa9LFy5xU/PgoziE4e4I+ikKUtoKmxncUFrW29Coqa+qOivETdIJuS3iASl4f54/dv9/2cSQleWaczl/rB9gVzhVVK5DLO8HUzPeLltK9RDLYzmK3LpG5VN2h6BZ3hw1jWGkqSMPIFNY5QbsBsYWe30FTp/h6JJrzhdxyejJx7Ibw9HBLIU8MPLbHDnKbs2u8wpFHqM4eUIGsCE86iHIJqJT1Icg42mc9UpKSJfSZt1zQiScOvnlm9Zo6GBWpvw46l4/vtHwbjodVcpFRpxZ82rdrHFAvVerl0Vu7qRgO7vNw/46Eg+5mtKxEneLoG/VIriSRzpdvpBzd4owmodeePQdQD/IPBKQNGavKrfU/Agy6Quoo7be7HhIwGH2DvhNG2Q8TVAhc7V3sf4t6nA1d9URyNmygjYmaYe6B0JU2faZXIa+UD2zIyT/j4E78pzl4SzNRRoPBGMD5mJM/kFlqcrDqtjxCPjZ1uxmYnhMlsJimRQrL0/1J+vb7X3qh6DzbQVOfGI/Fd/lnjEEJjJiIIAF+tWpLN0D08ig30nLnIzj4vaUfdyffKwMwL1QKBJgXOF/iACuY5o7H0Fk/yz8beNoPv+iLCm5i0t+a0OIAjsLNSOpVd9upnhVHhuQYu0OEbFaEsDWue4E0v0WeYDFsLkg0VoDzBDGUEGxv4fSYvNIRlr/HhE7NEgjeKa9dUm58UUxUaCAaSmEgdQQ+dPvpM24M4nvC80VXO3sMrvBFVkgAUgrlDqChK0PtgllK0zU2Hvj+xBzIP24osa2Dz/+KSXKezcacSRkWvoEd+z8+1SbY3VVezv1hukX3yZWfVhS5eK7tMnV6ZkewT1ffYMBYL2+qE4mgvP6u9+47BaEk/jmH25PgerfP+6H6M/kvaXXlfdcuAna74dWaYvKoLFrgcB094HC5yYD+6zf6J1vd8AYR7oBN+Z1QtBh4NW3UfgXgNo3mwJcdJgmgKtTM+F7xkb/J6q2F+f5fZywfRRMmNZy2Hq3c6/9CmdO2r9GmoHc6Gn0ZvODMHmEKjKCoRZ86nvMhsluRLT2tHyeC9AVfFa92q8DQ0wRYERdPMHTjOtdxi7Xc9TV0MN1Y/awOJitz3fCxts61IVBbHqsFvx4fRTJhGwGb9FP+zJbNDze9w/WEyUn51FsrUaZsq9I7cfyevu0wVhX76m7Q8o5V61gy2HUytDdWeR8LZ7a+aCRxis6fWTgTL4yj/ulIqN/a4muUTQzEMkktdOGSLUOzjLQOUrUsFOoHmVRuTKShvPMSdOitBXdHxTgGYqGl3DnbymXvC1p9NWQaFSH1BBgAsR1mflfRpdsoBxeJkY/hqHkebphOxmWfbwwsd03u0ucS7URijow6iuECDns+h+mSQi//KeU1xU2dGld5zQgQe9L0KWv5Oh1E02C5PZii/0GUc14nZP3XJxa65LTkH8/U/fCKCqQGJFNvIenb3/kHRTETTx5awFpDSPB87gsUd7S/UNu7t7iO9daId0lXLbaYjO+hXdx/ewrL2N4FSyXFhGh7BQTMEVKCbRE/JZYT1IDE2+NBh6OGJAehKN4quiaL0RE07xv3gx0iWLrqAvGZmFipWGir00akcR8toLWz9NybXQ7xInQq9OBmFFudcO8BBy+/VRyneEygMWS2vO9+Qw6G2qjlQx3RKEG9j73CVv6a4UEhc+LddzW+JrXYWQ4sYUc7RQ//kYOXXowRkTtPnY3VsiLxtTcrFDGtva1PCpjKbEk3oDLGpJbqBkVuDPrzdyzYLqK8pVj8MuvtaTlQTB9Q81R2jAPNEiSA9IV9nQKpqSN7+ez2ZBVApCZJGWRn2e1A9m0S0g9CGu4WM56kQ8eeX3yI0ULmmnOtgl2RYlNmCtJku6z8uyPR8ZR+MLfLMwcH/VJ/uTKfF3JdWLcY+5+P4mxsZ/WEV11FLx8kjBEvTv0dgKrf/l/9+EgA98jeVmbOx2DFQMeyMQS/N2G+QWtiHg9+k7YjWpz3kXo9sm6SmOn4XEfTxLQGUy3v6WOkPy0UIMH07uraozWADjsk0nAbpw6zPM3B7UZT0oJR6fW/J3d9pR1VaQZjgv/8qlpfwPV6MFXxmFIbOgSxNAvWw6Vprk631SiRKjyG1tJmKV+C/wSYu8iO1kvL1XFxkzL4dTfoe3BIv+3to3mdFffq+izegxtFWTPz0OCv9r/8RI249bdrXPj5A4lZJL5PM8iiFnXVAPELYxUAqxk8Dlxx9+khggk8YrSZXcJiIm/r4RzRWPJlkjnQ6W8HNfVEyFgNUczp3fZYCTnlUZ4nsyqTOAos4b28/VhdR0u+EQCi0ZboYrXAVVxGTBLz0izrp0qaymW07uqi6dh1bOu4mJyKjB6ig2vxJhts9r+h+znmgPViOmsjMtKw3eBE97+SZ6R7KSiefFw+eYYI4gjqgApggq1lISsVw5Tn2ELAblfZiu54q+hi7vqB8NVXntCtumnqEO7ZFIK7NWe2DPXdIEDY5W0SZG05qzv0JHG9J7nzzBYUWIHYJkatj6WjNGrUroQIDsGP1iq0ohsUqAZeRx9t9OI2ny7T3uGhpaDhHGj+JIzvOJtHvnuewTmomQ4nykTly//H8qtyDjuRYjzEURIX2oDe6lAdEU9yXeIx92EE2atDTmZrOeQh8QxMe3Kye21hzzjkIlI7mP3+QMGk6Hm7Tsn7c4pF06jlcfm9ogx5oYjOCojgZfVUUpwVsUK3sdhoMKKQUlWU2NciLQVqgzuyj4lmSMp2YuOaa4vRUbXD9gWTvc2v6gFVB0qsi4kLFCqlEI48OMu18n+SPQClk4sIAbVJKzuTxh6dO00bDSt1Ae2VnHDC4mBPStm3ZsbYYIlVwGVd2mCnpZx0xwIuJJ+eZYH5Y9/tqZlBESq/+/PX2F99WtwjrnthUn/DS+gpETqO0VPcxNGhJID9Poyk26OW85U8oeMhguybwNEFL4Eg6ly5IrD5OhJZM2be/LHq6zbERYq7EsB9yOBD1lc+Ac8Ao3BY5iX+Uh0a/vjz0dnV/5BxrLjbwYdA/ziJZn6tKAlSGzCG8OCjH2gL7fEf0orIuHnklR/UP2Fwe2hjs+X6mabS35d/3LBp50O6QD3bpOwvzTZe1yMeAHaYjObY6tzUCjtlYUH1WxOdubshfZPZB1FwDcx/+k64nCBwmEIDGNLx54dIakOo4keBF+b56VKHQ6AWAwr/T9ErBOarF6v0Kp3UZaAy6NIjuTZ50UpaY/u58mpEPNemUIjeNh1GK5YHBIfOS3TX/GK3rI82XlbJP+a+U1QArkpkF/zrDkRDEPGx+j857+5pJ9afRB1y9bzbQ3Hhq/Uk+9L5ReUO+tTXRC6zmvawjKwDj6nvQwGnksrJH0P2O05WVg3ipqB7lLBKOv39sImk6VSsW4ajQo51Zto+Jz29BxGn8Vx/7RJQpykyaRusJbfgCJnV2MamT04cmFrV2IGbUJrU1Nps2FRmmLzr+JB5lu8IiLy5ct4jYYiLtjXnMfJuN62JzZg2+0K+PVOxXlhag2Jfoe2aFCp5K5lhwrP9mHP1gCUoYZsT3Rl6MxM12KC/jXLwWiz73UweYoLznsqvomqshqUzv2YsczGdVrD8hwWIYfmTvwn0rE/aGKmSwJD2HFisf7LtdVHBn5evDydB19uBM5dQA7oHAp0I7GBjShMtRAdycnjnZks9whluN5+JEDkAiHB/EtSaQMcSWB1B+ycsxmsKpZ2rC5HxkdNvYKAfizKQedXjYhEj6j/1oBhnt3Mw2JA5d55F3D62p4sntqNW/XP+bb1thfE3IzJYd022WfarwSPuSFZ8FMZOb1UQyl5qyPy31vQsnXUThQjimw9wwGEg73P0l6bbQYDfIk15RIEIvT3nb5LXaKdW1cx/Iku4r+5etdG3oYq/ZEn3My0Usgl4035ueEerf8HrTWPXa5KQQeChNajONQL0wmrZAXx1MIsVPJLUHauhOX8k9fg0XNtAd2Uus/kDiyr7SK2mvWLcHHGCHbk+T6BaZ1mu67HJPZFGTcKHXLWRtaEOLzmPL6ZroKXPAjhrk4MuT1NIkaR3HEGkTyEk9SPsx/ROD0fKJQskkTkXlK4kDqrZ4Pyc2LaIzzLjZyIEbI4DXlKfoOJ+dbS7X/x8uoy/Co8uoUnmUE9cKP98Mwqv0y40VSyPn+0uJkEGT/k2Ww91Dt3i8j1GWC7iWMFnmJFj0j/PS/GkWOmgN3cMWu7FgW8Cdbv8NJKP7KS7ojI1UsW6rofTW+n5f8pHnp/owVbYy/auplz0fyhUht5WShDi7mjs+KTKjODoqzSdPUKS3e43Ql2z3tP66pkfVIzWw118I15Bu3LDRsumYYhHR2sRxXMEAuNIfSe/cMiJRK899tIZCxhjscfbQITihH9HoUulPjFScIwmtuhxUvpD70BEwqXX6wvcfEFFjkaBYlSlGgveXOPn6lqePJKhcATF5VVrM2NvYYQnx9Qzy4KSC377TtR07KwS5W1KdrW5QYC2ItMUUXJSoEwoOEkHlpG6uMBdzWSUkKqqiGKvWakkKNVms2H4RoBV4qnynZGsOLunQL9oQjC7dBeg4MpBNgXmVK9bhATd9pU87NHKG3fHitGq99/04o9pQ3PSHqskuIeStAV/RZ/0UPSLJZhzHhrn3XqFH+9xPQguMqXEBnVIm2edBhnfPszsdU9k3RGaf9OldiriSMhEWIXTnkVXAlKVJ6F2FcTNCQ/cWG41Msm0HtkPwuV/+Y1mvJBCqvsB1NCLjITjkvGPMCg5DqiNRaLxhDzpXJ5JYX+8l7t+rwV/45dNUci7tnf/wlg0yppld7o3PwJ+L0QNTH8pm5zA0q/1e5++u3ZTf1JLSwQJSnYSPNOJis62OLMpqxuKeKfIXGCpPwfK/+XK1TA4GxbWjz8pbJziG/YrlRWB69O6V7opFv99xV2JbgNIImZ+uEV56M1yLRGvI+HdPvPoX+1DZ5/JywPvmlu+y9uGqLcRS+5wqPr9IYcScfrVM1Fkx4lgPKFHperrb976wYTBTLS2gWaT0co3jnAYs24tP5zZEC+vxUHN0nkYE43hBrQdE7j6KZFRCMPOktGdCW7+wWc/d2YYTG+4KWCuvyICFYL1el1tHQ+ovMGmjP/M5Z0sz+eouw3ik07ICBSNiNOCSXchtsZ2BMnTl70uOrP6htBhpI4FdQ9n+AyDpFSxXndFhLLmY38/vavZgxjyI5RB+bIZa0gLvMJ+ol6LtxnJRK9Vf8HKQyU7w2wWKpp2AYrSJcFNFUYAevTfYoSp2leSmOeWWJxojVFH/T7O593I+8i6ZixkVx8WcdnIJn4g81v5i6sp7v9WKjcTi6SukUhUOFbQdUXANGq7cHJM9VzvN+QDpefUUSNdcE45z6Y5fEKjLJUzfrvCEplGFnim02YQ+LwYYM0qoOAnjh3TzsMUvoaX3OgTkFhsxatOT0zcbXvt3rk7Dt54lGZHY1wjrEJBK8eTH1JApKAk0CDRYEaV3giJ1E2J2t4FY2Axzv/Kz6ncclJMzHMLuQdJHPxfRYDiZmRwJ9DHqZ0dSzOve1861DAW/mn25AhTbgUSsdTc2T7222xkSh1E842oOniduqr+I0uRotHPb4JLyJG6vEB+RnMv1EZxxXUghaVWdzYqfsybsL2r6m7WPJ7Krqa+4o447QUk0yk1QyfWt4WfX/LNt7DAgY4nD4t9rlaiXLaRWcwnaeqmoQi+lmXtjMOS/xGnrITiZzJ1wCuqytToB6Kh0re0TduyLhmXd5tcWoOQ4jmXy6ZB9Z/nnosbugsdUd6gnG5xXn9AaeZ4yIiT9EB0ZgiSyr6u1/dTdWeP2RBeHJo9hHWAbJdfJhsx06j8F0yLwomTl3GlA1GJ09YfLu5eFbERhSaTVLjeNf3Dp7xjjEveVB2wkr6aFGRhSWxPjSe/iPsNY5PnJiVOj8rOJH+weGQz9AtBTBf8iXFp1AyHJoKNlzHooG+AM8RS7d3n6Q3Ob1UOGqKGB2HGf9n7JEz053C0HASHOFgY+tRJofi15Ytqm4+xJLNLzvwSnxKP+8xji8QHzzbsbB/5nFAZsZzE8Gm/XGPzFV4IwIxt5fJYMrXYQltRkQwlcLssroIaPHik1SISThK5lyhlMXYJcoc/0/WMgObmR4ROX5T4nMWTVOCMrty6jXsU0KoY0NuelYjaP9Oc/Y0N+n+kfSe9X54kJz946FfPqLsp8biowstav+ZL5RYkPM0YfOftrtxfFLHmBjq2OTfSokM60/mg2LPmSdhvPs9qJ4obfPf5XuPKr8yjPIvhlaLuQXyXBpJ7knP1m/7yeRiRKGPVWrlOjUbVYFAqrlyoyUxpbFTDGRXiPUkVtoGvQEpWFN/8OusQcIfAi+mxMdmkCRcFWrDNopS4nc9KTTnVWi22zmC8JNM+njxKU6HhYHMXrB0MugFnYUdPDWCLMsAfWV+mIErvpsutlrW//vtAT/CH458b3Yi9ls5fdLwJKuEPNp39o0sRHcdyKIdydD4lQ3oCZWO/9B+BTteVYM7LfMdh6Ag3gixoKI6UuO+tdB5cf1ICfGFiyJyvSOt+N9uiRsTO9uAh4CXz0LOAGtnHlvRIa9Argu9VTQYHb1X5SxI4MSJzZxhsSUVEK98IN+SzuThkWwC97baykYsp3iyypDKRZvDKbIxhpzpYahqoEHe9DZKip1B5hmzUSAKXL+xihaBtyoAxM+eHm+YoN829oqKrwHGtCrywzp7yVOJAmknazztFmTVwcBuMTBnzhpXdUe/ljUzqULHpPueauMEaPJsauYyJUi8bxG0Rspby1bBY9dSLoUMH7oGvSyoUJ7hvL6TAEpiyAUi1goekI8Bi/pzHmmNiiW5j0KctLTK5QQm1nTw1R8Dwn4z85fQU4gSEi38vknuIiWuZlpPMdMwDj7vrfyuvJhrqUwvB7KtQE6jjtX8HTjTeM+pQBOom9oqW2EswBHtpe7YyiMq+Gif/SllVMpLG8xV04m/IaLHCLXAqfL5v2jwpzw5QoJ/t6ESYyw5+46guvpZTjYpr2pjdwD6b7NYlCQdRL2xCU8SogHS0RemSIQd25/WwBqBy09vxmJJBJL9rfQDijgKheG+3OrJ5srgCDZhNNRwhCuvUXwaJbMUE/pgKgx2M/YtTPyUqt0ZOzUID/GKjVvpzTirW25WF9u3tXKEHos4YJ+pJqHhTHCXWid2b9j1qNtY88StBRM9I+tlxnILrXoaxjPzCUgpPE4SwKkAiykoPyZT8N8iiQ8lsAN6ALWVWpXBO/D5Cksi/Mdp4i4iVdF2uYvv/cL9IRnf+w6+sQBKicJQnVE8LxBasR69bENWKF/kq3rYl2AiqLDOmiBIn99O86bxwLjFbIJVMikvaczRygcE3Ou++bLhnFhpaSbu9nUxLdNJw==", + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "John", + "MessageClass": "Service", + "MessageCategory": "Payment", + "ServiceID": "9739", + "POIID": "MX915-284251016", + "MessageType": "Response" + } + } +}; + diff --git a/src/__mocks__/terminalApi/baseTerminalApi.ts b/src/__mocks__/terminalApi/baseTerminalApi.ts new file mode 100644 index 000000000..f044f86c8 --- /dev/null +++ b/src/__mocks__/terminalApi/baseTerminalApi.ts @@ -0,0 +1,112 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2021 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +// base test class for Terminal API + +import { + AmountsReq, + MessageCategoryType, + MessageClassType, + MessageHeader, + MessageType, + PaymentRequest, + PaymentTransaction, + ReversalReasonType, + ReversalRequest, + SaleData, + SaleToPOIRequest, + TerminalApiRequest, + TransactionIdentification +} from "../../typings/terminal/models"; + +const id = Math.floor(Math.random() * Math.floor(10000000)).toString(); +const getMessageHeader = ({ messageCategory = MessageCategoryType.Payment }: { messageCategory?: MessageCategoryType } = {}): MessageHeader => ({ + MessageCategory: messageCategory, + MessageClass: MessageClassType.Service, + MessageType: MessageType.Request, + POIID: process.env.ADYEN_TERMINAL_POIID!, + ProtocolVersion: "3.0", + SaleID: id, + ServiceID: id, +}); + +const timestamp = (): string => new Date().toISOString(); +const transactionIdentification: TransactionIdentification = { + TimeStamp: timestamp(), + TransactionID: id, +}; + +const saleData: SaleData = { + SaleTransactionID: transactionIdentification, + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test" + } + }, + metadata: { + someMetaDataKey1: "YOUR_VALUE", + someMetaDataKey2: "YOUR_VALUE" + }, + } +}; + +const amountsReq: AmountsReq = { + Currency: "EUR", + RequestedAmount: 1, +}; + +const paymentTransaction: PaymentTransaction = { + AmountsReq: amountsReq, +}; + +const paymentRequest: PaymentRequest = { + PaymentTransaction: paymentTransaction, + SaleData: saleData, +}; + +const getReversalRequest = (poiTransaction: TransactionIdentification): ReversalRequest => ({ + OriginalPOITransaction: { + POITransactionID: { + TransactionID: poiTransaction.TransactionID, + TimeStamp: poiTransaction.TimeStamp + }, + }, + ReversalReason: ReversalReasonType.MerchantCancel, + SaleData: saleData +}); + +const getSaleToPOIRequest = (messageHeader: MessageHeader, request: Partial): SaleToPOIRequest => ({ + MessageHeader: messageHeader, + ...request +}); + + +export const createTerminalAPIPaymentRequest = (): TerminalApiRequest => { + const messageHeader = getMessageHeader(); + const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { PaymentRequest: paymentRequest }); + return { SaleToPOIRequest: saleToPOIRequest }; +}; + +export const createTerminalAPIRefundRequest = (transactionIdentification: TransactionIdentification): TerminalApiRequest => { + const messageHeader = getMessageHeader({ messageCategory: MessageCategoryType.Reversal }); + const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { ReversalRequest: getReversalRequest(transactionIdentification) }); + return { SaleToPOIRequest: saleToPOIRequest }; +}; diff --git a/src/__tests__/client.spec.ts b/src/__tests__/client.spec.ts index b02815140..9dc31133b 100644 --- a/src/__tests__/client.spec.ts +++ b/src/__tests__/client.spec.ts @@ -155,4 +155,27 @@ describe("API Client", function (): void { expect(Config.isRegionValid(null)).toBe(false); }); + test("should set Cloud Device Api Endpoint for TEST region", () => { + const config = new Config({ + apiKey: "ADYEN_API_KEY", + environment: EnvironmentEnum.TEST + }); + const client = new Client(config); + expect(client.config.cloudDeviceApiEndpoint).toBeDefined(); + expect(client.config.cloudDeviceApiEndpoint).toBe("https://device-api-test.adyen.com"); + }); + + test("should set Cloud Device Api Endpoint for LIVE region", () => { + const config = new Config({ + apiKey: "ADYEN_API_KEY", + environment: EnvironmentEnum.LIVE, + region: RegionEnum.US, + liveEndpointUrlPrefix: "prefix" + }); + const client = new Client(config); + expect(client.config.cloudDeviceApiEndpoint).toBeDefined(); + expect(client.config.cloudDeviceApiEndpoint).toBe("https://device-api-live-us.adyen.com"); + }); + + }); diff --git a/src/__tests__/cloudDevice/cloudDeviceAPI.spec.ts b/src/__tests__/cloudDevice/cloudDeviceAPI.spec.ts new file mode 100644 index 000000000..4671f71d3 --- /dev/null +++ b/src/__tests__/cloudDevice/cloudDeviceAPI.spec.ts @@ -0,0 +1,385 @@ +import nock from "nock"; +import { createClient } from "../../__mocks__/base"; +import { createCloudDeviceAPIRefundRequest, createCloudDeviceApiRequest } from "../../__mocks__/cloudDeviceApi/baseCloudDeviceApi"; +import { asyncResponseError } from "../../__mocks__/cloudDeviceApi/async"; +import { syncEncryptedResponse, syncResponse, syncResponseEventNotificationWithAdditionalAttributes, syncResponseEventNotificationWithUnknownEnum, syncResponseRefund } from "../../__mocks__/cloudDeviceApi/sync"; +import { connectedDevicesResponse, deviceStatusResponse } from "../../__mocks__/cloudDeviceApi/devices"; + +import Client from "../../client"; +import CloudDeviceAPI, { CLOUD_DEVICE_API_VERSION, CloudDeviceApiError } from "../../services/cloudDevice/cloudDeviceApi"; +import { cloudDevice } from "../../typings"; +import { EncryptionCredentialDetails } from "../../security/encryptionCredentialDetails"; +import { MessageType } from "../../typings/terminal/messageType"; + + +let client: Client; +let cloudDeviceAPI: CloudDeviceAPI; +let scope: nock.Scope; + +beforeEach((): void => { + if (!nock.isActive()) { + nock.activate(); + } + client = createClient(process.env.ADYEN_TERMINAL_APIKEY); + + cloudDeviceAPI = new CloudDeviceAPI(client); + scope = nock(`${client.config.cloudDeviceApiEndpoint}` + "/" + CLOUD_DEVICE_API_VERSION); +}); + +afterEach((): void => { + nock.cleanAll(); +}); + +describe("Cloud device API", (): void => { + test("should make an async payment request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/async").reply(200, "ok"); + + const cloudDeviceApiRequest = createCloudDeviceApiRequest(); + + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendAsync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + // verify response + expect(typeof response).toBe("string"); + expect(response).toEqual("ok"); + + }); + + test("should get an error after async payment request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/async").reply(200, asyncResponseError); + + const cloudDeviceApiRequest = createCloudDeviceApiRequest(); + + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendAsync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + // verify response + if (typeof response === "object") { + expect(response.SaleToPOIRequest?.EventNotification).toBeDefined(); + expect(response.SaleToPOIRequest?.EventNotification?.EventToNotify).toBe("Reject"); + } else { + throw new Error("Expected structured response, but got raw string"); + } + }); + + test("should make a sync payment request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync").reply(200, syncResponse); + + const cloudDeviceApiRequest = createCloudDeviceApiRequest(); + + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendSync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + + expect(response.SaleToPOIResponse).toBeDefined(); + expect(response.SaleToPOIResponse?.PaymentResponse).toBeDefined(); + expect(response.SaleToPOIResponse?.MessageHeader).toBeDefined(); + + }); + + test("should make a sync payment request with additional attributes", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync").reply(200, syncResponseEventNotificationWithAdditionalAttributes); + + const cloudDeviceApiRequest = createCloudDeviceApiRequest(); + + await expect(async () => { + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendSync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + + expect(response.SaleToPOIRequest?.EventNotification).toBeDefined(); + expect(response.SaleToPOIRequest?.MessageHeader).toBeDefined(); + }).not.toThrow(); + + }); + + test("should return event notification with unknown enum", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync").reply(200, syncResponseEventNotificationWithUnknownEnum); + + const cloudDeviceApiRequest = createCloudDeviceApiRequest(); + + await expect(async () => { + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendSync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + + expect(response.SaleToPOIRequest?.EventNotification).toBeDefined(); + // EventToNotify is unknown, so it holds whatever value is found in the payload + expect(response.SaleToPOIRequest?.EventNotification?.EventToNotify).toBe("this is unknown"); + + }).not.toThrow(); + }); + + test("should make a sync refund request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync").reply(200, syncResponseRefund); + + const transactionIdentification = { + TimeStamp: "2019-04-29T00:00:00.000Z", + TransactionID: "4r7i001556529591000.8515565295894301", + }; + + const cloudDeviceApiRequest = createCloudDeviceAPIRefundRequest(transactionIdentification); + + const id = Math.floor(Math.random() * Math.floor(10000000)).toString(); + cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.ServiceID = id; + const saleToAcquirerData: cloudDevice.SaleToAcquirerData = new cloudDevice.SaleToAcquirerData(); + saleToAcquirerData.currency = "EUR"; + cloudDeviceApiRequest.SaleToPOIRequest.ReversalRequest!.SaleData!.SaleToAcquirerData = saleToAcquirerData; + + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + const response = await cloudDeviceAPI.sendSync(merchantAccount, deviceId, cloudDeviceApiRequest); + + // verify deviceId is set on request + expect(cloudDeviceApiRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + + expect(response.SaleToPOIResponse?.ReversalResponse?.Response.Result).toBe("Success"); + }, 20000); + + test("should get connected devices", async (): Promise => { + const merchantAccount = "TestMerchantAccount"; + scope.get(`/merchants/${merchantAccount}/connectedDevices`).reply(200, connectedDevicesResponse); + + const response = await cloudDeviceAPI.getConnectedDevices(merchantAccount); + + expect(response.uniqueDeviceIds).toBeDefined(); + expect(response.uniqueDeviceIds?.length).toBe(6); + }); + + test("should get connected devices for a given store", async (): Promise => { + const merchantAccount = "TestMerchantAccount"; + const store = "TestStore"; + scope.get(`/merchants/${merchantAccount}/connectedDevices?store=${store}`).reply(200, connectedDevicesResponse); + + const response = await cloudDeviceAPI.getConnectedDevices(merchantAccount, store); + + expect(response.uniqueDeviceIds).toBeDefined(); + expect(response.uniqueDeviceIds?.length).toBe(6); + }); + + test("should get device status", async (): Promise => { + const merchantAccount = "TestMerchantAccount"; + const deviceId = "AMS1-000168242800763"; + scope.get(`/merchants/${merchantAccount}/devices/${deviceId}/status`).reply(200, deviceStatusResponse); + + const response = await cloudDeviceAPI.getDeviceStatus(merchantAccount, deviceId); + + expect(response).toBeDefined(); + expect(response.deviceId).toEqual(deviceId); + expect(response.status).toEqual(cloudDevice.DeviceStatusResponse.StatusEnum.ONLINE); + }); + + test("should make an encrypted async request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/async").reply(200, "ok"); + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + + const cloudDeviceApiSecuredRequest = createCloudDeviceApiRequest(); + + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 0, + KeyIdentifier: "CryptoKeyIdentifier12345", + KeyVersion: 0, + Passphrase: "p@ssw0rd123456", + }; + + const response = await cloudDeviceAPI.sendEncryptedAsync(merchantAccount, deviceId, cloudDeviceApiSecuredRequest, encryptionCredentialDetails); + + expect(response).toBeDefined(); + expect(response).toEqual("ok"); + }); + + test("should make an encrypted sync request", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/MX915-284251016/sync").reply(200, syncEncryptedResponse); + const merchantAccount = "TestMerchantAccount"; + const deviceId = "MX915-284251016"; + + const cloudDeviceApiSecuredRequest = createCloudDeviceApiRequest(); + + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 0, + KeyIdentifier: "CryptoKeyIdentifier12345", + KeyVersion: 0, + Passphrase: "p@ssw0rd123456", + }; + + const response = await cloudDeviceAPI.sendEncryptedSync(merchantAccount, deviceId, cloudDeviceApiSecuredRequest, encryptionCredentialDetails); + + expect(response).toBeDefined(); + expect(response.SaleToPOIResponse?.MessageHeader).toBeDefined(); + expect(response.SaleToPOIResponse?.MessageHeader.MessageType).toBe(MessageType.Response); + expect(response.SaleToPOIResponse?.PaymentResponse).toBeDefined(); + expect(response.SaleToPOIResponse?.PaymentResponse?.Response.Result).toBe("Success"); + // verify deviceId is set on request + expect(cloudDeviceApiSecuredRequest.SaleToPOIRequest.MessageHeader.POIID).toBe(deviceId); + + }); + + test("should throw CloudDeviceApiError when request fails", async (): Promise => { + scope.post("/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync").replyWithError("timeout"); + + const merchantAccount = "TestMerchantAccount"; + const deviceId = "P400Plus-123456789"; + + const cloudDeviceApiSecuredRequest = createCloudDeviceApiRequest(); + + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 0, + KeyIdentifier: "CryptoKeyIdentifier12345", + KeyVersion: 0, + Passphrase: "invalid passphrase", + }; + + await expect( + cloudDeviceAPI.sendEncryptedAsync( + merchantAccount, + deviceId, + cloudDeviceApiSecuredRequest, + encryptionCredentialDetails + ) + ).rejects.toThrow(CloudDeviceApiError); + }); + + test("should decrypt event notification", async (): Promise => { + + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 1, + KeyIdentifier: "ncrkey", + KeyVersion: 1, + Passphrase: "ncrpass", + }; + + // encrypted notification (SaleToPOIRequest) sent by the terminal + const encryptedNotification = `{ + "SaleToPOIRequest": { + "SecurityTrailer": { + "AdyenCryptoVersion": 1, + "Nonce": "Be6rAx+vRju2aCHwPh6lrg==", + "KeyIdentifier": "ncrkey", + "Hmac": "LG8A9Re1M8xLMr7rDUk0NwsnvAOX+VLjHv9sPHWTl34=", + "KeyVersion": 1 + }, + "NexoBlob": "x2DY8J2M9ZCyjOZ8Gt7JdLBA/6bT/KXvvAbJf9kzguqO8dWp1I1pPLQpLstpdIiAVqSwG3PR0PrP/lF82UmhmCnUJGCuEXilqvBNF1tF/yEgnFOklNc1myR2IPW/+2oZOWKFXlTo/gX89EbODXOOGUqaJfSdpDhlqjyMz7mGczobTPvPGqCVx2BDHU8VTxI9nicwQv+QV48GqVZzxnP8ZOdQOQ5cac+bcS0Y3l7SmWpIoQsoicnjahTY9ICosLJmN4DvDHsN4Kh2DAetFO5b9I9Lqgm/dvnXUVhb9tPbM7Pn+ratjYpaNbonbO5M+Tm8rDEIyKoUUuFXPWISymrCXtCDVKEb2B5S5pilUmokrXVa9Ldtsv3BKG7rbrglYEuql4WVs6kzr6ybgAKh1Q0LsAXEve3pydt72ay4U3FOJSBxJ3gNqmnG8mVW2HCXQVo1RgVaZmP5TBWYuksCKXYypnMulu1PlRI++oeW/J2qjQU=", + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "null", + "MessageClass": "Event", + "MessageCategory": "Event", + "POIID": "P400Plus-275102806", + "MessageType": "Notification", + "DeviceID": "5" + } + } + }`; + + // expected notification (SaleToPOIRequest) sent by the terminal + const expectedDecryption = `{ + "SaleToPOIRequest": { + "EventNotification": { + "EventDetails": "reference_id=9876", + "TimeStamp": "2020-11-13T09:02:35.697Z", + "EventToNotify": "SaleWakeUp" + }, + "MessageHeader": { + "ProtocolVersion": "3.0", + "SaleID": "null", + "MessageClass": "Event", + "MessageCategory": "Event", + "POIID": "P400Plus-275102806", + "MessageType": "Notification", + "DeviceID": "5" + } + } + }`; + + const decryptedEventNotification = cloudDeviceAPI.decryptNotification(encryptedNotification, encryptionCredentialDetails); + + expect(JSON.parse(decryptedEventNotification)).toEqual(JSON.parse(expectedDecryption)); + + }); + + test("should decrypt an async response", async (): Promise => { + + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 1, + KeyIdentifier: "Key123456789crypt", + KeyVersion: 1, + Passphrase: "P@ssw0rd123456", + }; + + // encrypted async respomse (SaleToPOIResponse) + const payload = `{ + "SaleToPOIResponse": { + "MessageHeader": { + "MessageCategory": "Payment", + "MessageClass": "Service", + "MessageType": "Response", + "POIID": "V400m-347374578", + "ProtocolVersion": "3.0", + "SaleID": "6167012", + "ServiceID": "6167012" + }, + "NexoBlob": "X81EzRCSzeswS8wh8W5+JI3g8xxHSGCizY0jxCZtgLzGnchagyAt25iq66T3UsbeKseU2d6Tj1iOXdPfh3rZJOzCebqLGas141i9ahsYf827+DJxrEZMOxknhsylt2f5LJbdHO7nJH8N0Hc6vYTCZ+jmCN6Sd0DwtPDVDaCyWHHbsqJui0BApomWCd7Br4SSjindfZm5E0utRVswkpmOsPN5rfIONoAzWUZD520ga5dPobPx+dklSyo/KncdgdmXfQQ+VYMLmfad/4X8ZiodMsgLyPz0JjtWmawj2HdCgEfQv2ou+Izw5wUnPPkTyZyG+rIuAeLDaGcHjpXVUMCt/hkRCol8+diE7lSdTTVItJH1CfUbT6SmSaEXRggNasSPB2hUw3ZtZhbnqqL59+ifRyRqz36TcHHn2SzH1JCWzqrhpRLWyI2uj0bljDqOrOVR2LO1A+oCR7Ty5rgEVivBiK3NHFyawbMXoBNOzF2nyjIofusf/2GOgtFJjjeHIugi9Gnvjw7nmsJp+hpxl0NyvpggiFf3ickhnzltOIapIEhhPSWEo7hX2JxFMJrbYc9TySZVlma5XQq6hiWGjZVoLsGA1goRJPP3qTYKlCQAiO/xeNyCJcg7TLQTPtKE0ifidqUqO/pLRZ8L2Yj1hqf7wEtSbLf/H8RQ/nWmKbYgTCIZpcZH7NawdNkLPOQbyEcHkYbODtNmIFCSyWW7orWhJHisF8A31oZrMkqK83ocY5tOQhiWAiBxi088cnLj6zcHS1HmJtTwD+wOtyv/iCV7icBB6mcla8OICGad5Ghfz53HebLOs7GzNaQZI0YWEbFn/ZbcByeQoe/lKyv/GKcpYk6VwOeR9tHw7W2fHj0VmofcY2LCpJ1xxMr2+0tEeToy7vC6OOFVoIlIE8ULaomLeHpwzIkGL4Vzyb9QbkB9Exy6McCOIQpicufv4UYsdhzvbQNa+NsepouBDRKI1ESS8ucf6R+ps10wz5kkXx2Bkrm5mqZqv/B4zJ5JETc+zNKPY9s5OrBi4WYWIPJov73+UawbdUg3b5fWTYueIwtg1o3BYiTcgBDGzHZUMjdPyW1NhyulfEOg5SqAPXwWEjESPfQbIOhn0yj0qsSyI+C5hdEIvJL3nYFX87EAtvV6Wcz//N01OOTzo301KUaAxte6tKFMjFrXya41hGAbSNhNw8ah+2A9SMgBZ9aZP8nOt1TilOCLxUz+xghUMpMiEtDFWtWnHb5OCnXsTd6/HSPkervhMUA/R7QEJoHN/VGdo0fBv6kYorTLlXaZ5cv4wF5SN0K42chD0IAZ2EUpRsbddT2licJZUHkiSSKb9liidrSEDtTmV5CjK9eqEkXcwn4ZWDlLvetJnR4kg9l7pqH6xzdD1LOj654X4JGLL+wsfV1mPzArERzHtXrEdXf7T+OX/mAvn3NyjTTEgDDVKqjIf1I1EM0IDEcZ7ccgEzFNSCIMLPH3PjXFtVYsQjhBqYcaeKENUhUQiHVY/3r31f+G1rghod4IzhF8iki7Kh+Ue0lSnv6xzdtH2lUJfn7XKhVo/D7/Wsk4jDUvtrkY0muNlCoY65UKdLzmrWVwLJIto2OZouAcgEUqnY2bUQgU6KAzFWyQ6KubP2YqndDPLtCaRFxD8BwMunPyy3KEfIu+0pSTmrnsP+vjvhv7sdieOqx+VJQXIdyKmVkS8abPrv7Fd4JuQD+9/RGnv9WPz2jSZPp5ItPVjVK5bl+StWiM18SOB2Wb2rgd+PsPRCNWeG3VjcjgGwzilyuKkAWjK2NW147tz/C0XDVfdiKgvQK9JmA3FRmff2RGpBaES2W4Cl5iaytJ38tEhJnsYnQUEXXcbU1b0zNlicNqgM9C3LVBq12nWYaxJtcdJNnrCkAEQbOeVx7Z1caJ7GSQrJLdAGBJfNXzLeKU9zKRFa98sOfztQICAvLTvdku7OCZwFp/SrTygwFisMZwP1ISWCetm/6PyaKUJ5rSqF/Ab9wieru59REvHRGUalcjzNmoEJ2rtHnXHgK1tYF+zWTe1yYmuWQlvfALmEM8Y41R4NEeJyF6WPMU3PmB8O5yNhIplA/N/zpL+GajgKpAoAbemH62nDgdzVaj7rXIw9+VGmqm4TM4iCWmZtR1nP9qCfUvDyyVRd1t7tvHW1Hkll1tn2CZ5iiYNScbU728lfNvukgz5Xed+arcIovoSxUJhG7mV/aO5ItqEugaCj7zJC8gba6gjh92vT2DVDmck3UNSJXMftSGiXGthEfxjpdseiAb6f7JgHIuSaAEbHqNTUzZq6L290TZUk6r4bS8QPMhhkReKEExmJK+k0E6T5vIbw0t2SkThK+ZSmpLE3YRQkHfFzIm5g7jrQszBgmXuGdER4yPtuVoJrMMgEnm4Rcog8oJRKOD/j4L3R3o2XaGfuRMELeFD1McRpmZwoRflXksWoXqc3cL4oGNxdNV6VZ0+yvYMbSr+6v5MVgNLrxTCRbe3cRPb4NK+K+hl4ciMcx/T9MSoNMWFedAmDbIC6bp0FL0jtpJqyFPnQ4K4W9ZvuIZ3SvlmnOnZgN5VWIWr2kjXJqMQBv4oeXyDLj4XeA8BVjpH+S7axx0Elm7zAHmo2ca1oYK/otVCwbWpfAmUwIscvQZPsmpmAWvnZjLg92fQnvfVpHsBkvc86upZMRPfU02DgtV/DwDJVE/GqYkHJrTIuT5cNKJlpHNCRmzcYUGhedE3eoL3gx3oiTEQnz4GlM2b/MqVvBshYQJvunXxT1qB9i5bXTUdI6cPN+/PQ/SKxjJfypvFYXBHkOy4rOaTtc4yAkDgLzY4qB68sS5+JyBUfvLCf10WH5iOq+CDE5Sifd+JR6vF7fCWPdKxPFH0X/+RcPnzyzZOVUFsRcI9VVpcgrwKGR6dxatpFne4CQhg5+ItR9n7JP+yhRLrghaNNZKJFyRUnzhLl1ygARc2dWoTtEVMUukxoA0lLTlRoMpMaq/4ugzAXjD3Fz0DYTWl9ItkZlBGtEBRQCazR/ktdxOjxNFyHHDYk0t/yNCps9kljUnfiS426b4sbMT5DMCyndPiGFWf4DzDwi5oY5kW4Oh2VAVWFYhX68aCbj6dAJwsINMEelSsi0nji8S9kRBMkzXA2t9lW5YgmX4zGkSZsXHCuCoc4eSBPS/TmhPKlrRSZn9Ku0hs3XydnVWWSAE5o7XtAZb8HYjKQC6Uq3FPt8MEYSwRglZ9rosVcz4ECeveMxlD7lH4WNmsqA6Abih9CTkMAUcsfRoipwcLJBA3yiqUzgqaFW9vWwptKVjJM7+JCUzeCZsk8P1Sf0rTAnk2VsQaqB29xelNLifgN3kNekn1QoUdqRNO8qy/dRM893iivb20qA7F/d6RGlWCfpv2pAzQK1TTPDhX9fl40kG+Y/c4gE+4Zq/Rdai7YS95mNpTQsiefRNa2Iu7QyxHV5u93uObQkQDz5/4ejKDnZvPxOCzIZFYhQMjI9xxO4idjaJHB7jqT+I41lyHUZ/aivPJlXGoimm4PRXIpIJY2/134AApvs4wR+Hq5hwWnbZrRqY+0UgsCribn5W0AAnQsIxZ0iui5+wuMefeEA0soo90OM6wtf3PiSX+TThClX4gZdfItYZzKuv7MwlyMpM4q0POGTd1FbpYsHMEJdwTvzi+AgyYQEkqxx0peMZ3qBBNSE9hgT6jl1IqTgNZ6lRh2krCcWNECEMcUoiF5gt4GEvV0ObRQePowD9CAlU5hnaC8PPu44iWJDBl7kPhnFEmmNegki1fZpZwhLVUF4eNor7oFXxU4CE5YrlizL6qcpsIsKXYeXDtxCaczwEeQUsNH6sgrQGRaV0owmo0krhBzCVN/1uP3R24ziMlIDrH7KhuB5qf58E7Hctr5tZ8N+7jrW52YqNyzjfJJK8ypGNqG9TRI5mv4u7YtjFEMmSeSvD9GXFJpzxya84uYsFCiftK7T73nhVDFDKYyQBpZDHcCHiveW0H7nmJLwoRrqtVaOsQE+aHnZPnYtw413cTUe9pqNO/Lv5E4O0VHF+kVjydvnRu1D1TtjW8LbE3hWpcEpjNE5bVu82hgJo7ywSM5S09fYlx1QDwgIOxPL1DlkCxUkv5qFcznqzjMvOBSHwKrCpZOMtQDLzp8MRQ0yePoMEzgo959n8YkMeo8f7tvuJWLcGY0a5tLVkoDUS+923YiMRv3XTB18njIeWnXouCk2+cSJGFM8iqpg/GK2p9rvZhDzqXIFIy4D4BeWIF3DGYUNIZ/pg0T7d05Jn8umDXn/Nh9+H/F7QySb6WPSyirvbdIKLSUlp6k4mTrx9QBhX6E8sD1OgUM45bsLPvEK1Jzsm4UDuXju1PX53K2WlOyOTFHrr4DYSd6kr/floiSxqT55GUrDOW9SsBkjXpPKLWZuI60e/yBZNTBkFQAd6a54FasPieuMqR7ji3wNwmYSTZus2RZmuHH/0T04gJc/o7LoT3Ob4mwrq3cJGwZMe/dj8nMy9b6toYpGapWhZjcOcwzha34Qea9C0Rqy/AfLBvG4lVC8E86s5mj6mq4PbDC4kCSV+q/7VN0LN6FdG3r36iiwXO3MP+JB9A5OK+bJfHE69fAy1tPa1TPcoTy8UTHfj+arTofhxJ48d2rHmmUOwSIwr7gvOhGcvzQRZXI34Eu25suG+6CCOcMUhk0bGQ0bv3vuEiRAg23kWlCW/H7mcoK9NPI9l7oLi5cV5MHWzvm9iNHUkO+1FEGyJTBJI+OQzMTJUgMHcTLJD7ICCc5BwMp6COA1dkqdPvJOJNpAAbcGMOWbundo7hq5JgPAWCi8FptWua7A3zwxE8g8x5YFMNxjOW5lcfjnqZtVm0sfUKp1PqVZEUs9mwF+IJcOM+a22OwkjbusikguYrMh0tls2hqY8YnPFTXQtoovu0txqr4EccL+tEO/VbHgWMrFB02usK1WPCK/UTY75lp5BXbsqIwU38CVB6fyOnFnRzXkjiM0FZBMzBVEpLcDNkLL05HNJZHN1T7EkPSvhrlBd1NZ1AMrRE4RgIRdUMdyQZgFvLu9SUAGm2uDYGqowBZJuCSH8fvCJgyY0sScIvPXzEWSRQoxkKcKx+lex/vFU9CbAE4KTaVzX+j6X+qQWeN/ripvt27Nvh2f/cwhSkMJU9Q+gqEHmreuBF9NpTLtDYZjBG9qECwgbOOlP9mZWftJmdh12G+FiBw5nWTLVS7kzhPnclkXuKWOVTch3NtHPvBmJ+p+3q/Y5Cr5jjV4rjUCSMtU3MfRaylhHJY/ooySPc4K7Gyhzr03pQahyDDCXH96UgS09oP91iosjWss95+nlviABoF270nubVkceXhi+W21m+mAGSC30mkykEDHuw9P6mfBVddNih5IQ/+Hcg9WbdM2GmxxY6jyB3m3OKCWsrH7pl/ULXxdwDK9XWhbGWD3CGxNg0wHxqYqLXhFdcseyp8W637I8tg1HYeSeROnLsH3BH0FViCO2jK1U0mMp1Al63PSlFCnKRzKfn+1/B+ST8GEgFZkbXyv2lmYj0deWx5EQKBnHoSfpZOh2vp0HcrwOetKmOUP5k3hZr0S+4cjqq+hxFPjC6s65xZX326EoLMAS6Rgqfmxz0n1taPfK2hXS+kCD1lmB2lPk9pSDKqvehtkQEu+h9qtFdZt7la4ke3eksrZzH6WBdXrSDdQvg1iZssqBcTb8KSCGl+h7gZYmDIWRX1e9TdYjXZLoABfuHDm9G+VNUmD5p3JQ2zzMfOGjhZ3M+E6Klmq8HXFWJd7SR4trWBVfWlsTH0RxVMmvutIQJn7USSp/4YrzGzvJubvQxdfyZSsSW7agGhDMVfbO7Lgrs1f8qIodjW3ZudylMG5MIQILPNHQzAHtbb3TspSdNi+V67asgUJ7oF1FVp5vh9B3eL8eB7LwFYp6R1DPYJ/1ZUv66e+SVAoBMK82e/rEyWeOc2Fb/+yaNdSYHB9JcuRqXA4262MdTgGDAgcvlo3j9Uz0D5dmTee3Mj46oJelWHxlu6ZfcdxTArrjym04km2WZHNgbt0xbwiJFOPo0t2CvSC93vCVHnYQ5soVZupDkb1rB8OYHbhFk4fte+4pNi5G14fnGbgvocihuJI9qITkaHW2ge2AzWkL0fMBLjN9o49IAy4aWEguTTz1/pTs79Nu8hRDRKzGwWtJiKfoX/IYd7sOfF08rWiU7naqoCeMAGtrOHv2XoomJXWprRJmh7S/eijRU/x3YJpo3Mb1yad71Z9QOIZ/GFAhIStdV6IeXgPRjzS6WV/xyIBY5VuMauweQJYL1o/krFHFMNfBAmd08G0l8SVBBL3TvElFQlo8hWM704Lo/gtxPPEurjMvbPFII9JrmWdsaugpEuwcgyooeZDQjlOmA1OxWq/tPH0DHnC7lGWGww6Guqh9966OJbW5jsJvbJHP8RVxK+d3rj0OPXHpk7aZH6ppQ31sxPSwOgzM208s1JIt340IFJs6tXmeB/AGrUN+g3pbLokLaStjr4Poxgd0S3HMHmVxXR+iB6P2uvJ2alZ1k2pwFChVaVJW6uCZFH41iH/nNyjZk/PpykEWilj7YWMLsgJxA5SQ1bkxItg2RoS691wf3geM93u9JMjsQz3ajqag+M5vfv4fwAab4euyhU1eLPJaE9w0+vAlN36aMNNFEorWgBHeXWSnONCwW5L8mWUd0eui+w9bs9PgwSsT6LXlX3Uw1mvz/RJzCrOy9s/0fE8LDZMfIH6pBk/FnJYBs57eZgZjAownx0BwsPn5nTAD5vFuxmKflTwXW2SHnYrJs12eYeQF5HkU90HiokfTpfM8+hjF9O7RAwqzf4ybogCWJOOb/WKZ7fuTWJsOCjRH6NYSXJds3Xc+8UJJoPuLm2Kk4GVP1mGlJ+c+ZIlrmcuzt+TbgxWZlVeNR36qlgMuez5jtuAG33FLb4UANsMGQ055UB9mI3wfXHy+DUGbwWabomTBxSYLipHrMaOWkpoGZ9t64frQiLBSyPtHVp6YXDQVZFH7f7cf4tJLh/tleB4RCdNbOAiMlpR+yjteABXBrXPMkvq7wSZK2+Z8IgP8zkVBXGjeL4kVJ7NfnFjdqM1svygEo9zA3Sly5qu6d+WOUDaYE63386w63KbnVgFQ8aWKLRBWM5L/duKbWPJ6pY4eguFZaMtXcfFnR6FiffQFzcB5T/qG3Re8WjikDIrYmE69JbmEdFPkD7dvf7hlD2xfF8DX1X7yrMDstQLIk52Wcg72x6M/CKZBOQdVooUXKIVfqjq+dQFSGZdB5fSDZR3vSsosj9p5DbE5OX/JiO1tihWEpkPLDo15hInlodOtm4AfIvTpXqzUAG1x4Arjlv4Uod6d+a+mZ4XAS9A7sn2E9akPtBFIUT9omiAiCNQdB4IPNXrugGKIFyFHGED2BfKnquU9KI2GVSV4atNEXvCWHfXzek2eNlgsIxDjZwPx7sB+TrnMe3g7hSFYg312rQ9yGcXpRhQ2WKc3VtiU+5BX7C0x5BTN2yTAEXFKU8NU41WEke/uPEEBiegBiaq/OxQx8L1zchyLNgH5fKZMR56TWaA9wzZfD9sap9dFD52I3nOdctb00Q3Qo+Tl9lpbyyBIqdzt99P7oT4NSIovMT+gYLReOk8ZocpfXxXhJli/YATWaYuS79E3kMF23Zl8Ak/JQAw1j6mveZeGgzyv2P47o7QsO5gb/Kb+0KgfAwhBjmcfghbz/kmhtLob9MehT8bgkiRPg+40YMl5A9Xd7QGMX9uVo2AyKNDoWvPf8HkEaFesI+3jz6xCAnrwJEuQD/Tba2RkQ/KI5X5yrANleOPS/OwS14JAI1ap02dyIQIZDY7zh29BSfV+9c7diwomX69auvPtS41im0EaTlJOia/z3vn9d1Pujot1Vm8VA7V9ESZWefDGv1LTkxF46qyxu/WXQAxVgxQD/yGFoIaT5NC06aRQxoWeY0fhm0Vd/Si0yRhiY/vX/V5rrSWpcHSCanlAkg2XYLIZ+iln9e4UPiupzMsRR4b0pHyXOaGdntN/VyCb0Dzy6nNeZHDboIjd/xXvDb2NpnpoFMwqcIpik21WPSYGlrkGDDtKmMSZPbZfAiiXwlkULJR8YqzxVQf2lx1mgv9AgQBHB+OFg5Ue4JWwcvG3fOBqAJlnlX7x17O/1ZTq3L0qF6Lter5lAbTrFDWdcm3AvDnxzr8w5FQitSa6ci5sjYO9wT5FriaCpQlbQ84cVAxN6eHQF+letPItdVWZUGnSFXcR/Gg1TFCg7EicxpOT6rwJgyqTJJVMWB2j+7uFp/wlAfyBWldpTUZW6ZZJQMdNhMEshBGPYpKCxn4khzAzcC5Nm1tcrqxE0RhtWtdvM2t7nnLRa8b6KS+5uIAI0WhlouLnK1R9BUMKDO+d15yJ9xGufUYiyujaK/rmrFNGhxFVSeRZkWBsauzZfAKaaQWecB8A7cjKvRDBR9Xpzo+aZZHpybS6iADr3c4n+qUm8VSLV0qtzt0n0knJXUohVZlVgl9mS0CJnPWknJpa5fUYxQ5gJIZ/i2T+LfoBjv4lbSgPVAW1m2oiyO1FpzLzkcn+UTQVVFo5ON73yoBdtprQJZebhFV0RMswh8N/NYhqOxgmL0exYGRPjuBLkWloferzQRVYkumkkEwUx0zBZxmB1mazU+sGg+PBHzSRAl+0F/C14K/8sNnCorHnEywOvwD0K8c2hqC6XNtU75hQrtGz2EajZsE4DLLWtNnn16h8TClqZhRj1BX/rZEVWA3JSNgJn/Ea2Ufz8HKZy5ZxbQYjLQqYkjqFkiZPdJC99db4zw79hsX5KJu/VJCXlooJ3GXtZ8j0Sh5+6nSC5W9YOpDoTF5vgxTj3r86Tb2rs8JGXSAxwb2PytsJQwKYea5CaNmdeVAEjFcxvIz8ZAW4+yg+bjUgeon9ePeXmbPAH6iF1F0m/wHtSNRMhdi5+TxL4G1pCEitatQXOsQupQa8tZqxnwqPqUA1LkJtVrtlJVm1he4jUyTSXW7/Qpq1j5ZYum44bWsQ7Ou929984BLF9fGaiM+J2cIIyYGIbtJzTe2LC7Gbhwh2LxSrbGZBSxcfCWfOtpU35rMbolx6fYE1bFuRvmaQZwyOcVNvOfo1wBIVFcw1I63PL2B5NKeGwTkTdEwmtjijeea38iLHevlrGwypRalva/fpL37teLn+QYhOjo1f6vw7eaAdcTMPlOVFne3SyIf6da6RRtfUzZneBwjMQLN0nmXVOZ2Su0i5ZIgqYTmRLmEU0HCVvtL1TluM0fba/KxJQtdoSDlIiPPQT7ab/xo2dxqSK1A+mFA3u7DFU32XHSeDbXnxQ+XZQfRugt1fLyE+fh7k86hnb8fzXOv1Va62WEJHZ/xsEYDrcSQb2+Qs1GpUnl1lqAHRwQveLWqt+c9lmAjtobZzj+I3EF7svHT5XqNAdKoJb+siKytaYXUpLoo5bfgTwowIGdYjd6nCDSFsmwOMWTMt1djzPif7/Sy2hFLl4F5F6g0hiZeiD6B+h8RdL2LUdEKwVol7tlTaO697RtyIjveRu3j93EfDixVR6dSr8veI8xvvRNw+2FNStrxLhFuGJ3IOCXZpidECpfp8YXXOJDwGwg2JTPbFvrsvY9Fh8tyK5cVtIJ1MbV6eH68jq2Iywga36bjDRGKvO9nwEocAFLu33EsVQ3Jhz6Wfi4sm/yGnEneymw8/Z49zfBvLe9ycWRoh2r+csLlGYX0rK/qUS6GhjHfmz27be7frw/Fom3xZA2CuyJ/Hw45PG4v1peqkAqJiGZzCCQFhLO1qEhnhKBSwUaji/ZlpxbgfjrRjSOXaxFiHRUeTYUb7ZHihxryRTf/IAX0MZqmGsNRx5N9dRHLRHjQz7xDcHWKZSXViebNPsRMrDMo+vIyzUjlwBHyrzTQjR4X0BaWrxUS5EqSjNa1K/eCtiRL0eDWhIlx3vlLc19bcGKCUOl0E+IeDlVD8l7vUeSpYP2XN16+Z1RscUDFJttwYh0bFmQb6z1wd31z+zccGmx5Jm1nknNH3LOeXAPpmW3ryS2OGDaC/stNsAp0vmyRQ6K8wXLjoHGrYh+wayIj7Ozd7EkPETcDUY2brgeLeOKYTD++ARHoY9g13WNgCmc1kanVaZmvf5S0ehpdj3qX8bU3mez0+6XIMNgzv7m84yq7Z31HnopNkuPVv/1Etevc/V3djCaCD+vTVxLo+F/HrkPyVqfVHMDUwxbgp37t9u3/ip9fXrP8tITo9qoViTdNtvPldcZAwZ+cFfqNYfq05wd2HNX5NVP7ykJ8t5o2xtunMoq0yy+8D9foF+vAyDPeBchMVOWKuqDn2/2FZAV16bIo+cfZPIXeG3bTybypWiKlayrl0D7qR29AhJ2nouEshCHmTpoKmYOdNj76E5ATmwRb8pY+wv4QfiNW/RPlfty48SgoSz+aK5zUau3eojOVgzQ7xRobJe1Z2LYIXMbY6fibHuR9LT1oWWAaSBN9o8jgDeBqgdbW5wlw=", + "SecurityTrailer": { + "AdyenCryptoVersion": 1, + "Hmac": "6B8R+dZyeUFDWAr46hVWb6nB6IbfmKzomAqw1vv8uns=", + "KeyIdentifier": "Key123456789crypt", + "KeyVersion": 1, + "Nonce": "oaOGhOiNdT6qz3pI5afHBg==" + } + } + }`; + + const decryptedEventNotification = cloudDeviceAPI.decryptNotification(payload, encryptionCredentialDetails); + + const res = JSON.parse(decryptedEventNotification); + expect(res.SaleToPOIResponse).toBeDefined(); + expect(res.SaleToPOIResponse.MessageHeader).toBeDefined(); + expect(res.SaleToPOIResponse.MessageHeader.POIID).toBe("V400m-347374578"); + + expect(res.SaleToPOIResponse.PaymentResponse).toBeDefined(); + expect(res.SaleToPOIResponse.PaymentResponse.PaymentResult).toBeDefined(); + expect(res.SaleToPOIResponse.PaymentResponse.PaymentResult.CustomerLanguage).toBe("en"); + + }); + +}); + +describe("should build the expected CloudDeviceAPI endpoints", () => { + + it("should return the sync endpoint", () => { + const endpoint = cloudDeviceAPI.getSyncEndpoint("TestMerchantAccount", "P400Plus-123456789"); + expect(endpoint).toBe("https://device-api-test.adyen.com/v1/merchants/TestMerchantAccount/devices/P400Plus-123456789/sync"); + }); + + it("should return the async endpoint", () => { + const endpoint = cloudDeviceAPI.getAsyncEndpoint("TestMerchantAccount", "P400Plus-123456789"); + expect(endpoint).toBe("https://device-api-test.adyen.com/v1/merchants/TestMerchantAccount/devices/P400Plus-123456789/async"); + }); + + it("should return the connected devices endpoint", () => { + const endpoint = cloudDeviceAPI.getConnectedDevicesEndpoint("TestMerchantAccount"); + expect(endpoint).toBe("https://device-api-test.adyen.com/v1/merchants/TestMerchantAccount/connectedDevices"); + }); + + it("should return the device status endpoint", () => { + const endpoint = cloudDeviceAPI.getDeviceStatusEndpoint("TestMerchantAccount", "P400Plus-123456789"); + expect(endpoint).toBe("https://device-api-test.adyen.com/v1/merchants/TestMerchantAccount/devices/P400Plus-123456789/status"); + }); + +}); diff --git a/src/__tests__/cloudDevice/cloudDeviceApi.terminal.spec.ts b/src/__tests__/cloudDevice/cloudDeviceApi.terminal.spec.ts new file mode 100644 index 000000000..f089a5579 --- /dev/null +++ b/src/__tests__/cloudDevice/cloudDeviceApi.terminal.spec.ts @@ -0,0 +1,241 @@ +import Client from "../../client"; +import CloudDeviceAPI from "../../services/cloudDevice/cloudDeviceApi"; +import { EnvironmentEnum } from "../../config"; +import { CloudDeviceApiRequest, DeviceStatusResponse, ConnectedDevicesResponse, CloudDeviceApiResponse, MessageHeader, MessageCategoryType, MessageClassType, PaymentRequest } from "../../typings/cloudDevice/models"; +import { EncryptionCredentialDetails } from "../../security/encryptionCredentialDetails"; +import { MessageType } from "../../typings/terminal/messageType"; + +/* +Verify Terminal integration: tests to send API requests to the Cloud Device API and test the Terminal responds as expected. + +Don't forget to: +- Enable the terminal +- Set 'enableTerminalTest' to true +- Set required variables (ADYEN_API_KEY, ADYEN_MERCHANT_ACCOUNT, ADYEN_TERMINAL_DEVICE_ID) creating the .env file in root of the repository: + +# Adyen Test Credentials +ADYEN_API_KEY=##### +ADYEN_MERCHANT_ACCOUNT=MyMerchantAccount +ADYEN_TERMINAL_DEVICE_ID=V400m-1234567890 + +# Terminal configuration +ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER==##### +ADYEN_TERMINAL_DEVICE_PASSPHRASE==##### + +- Run one test at the time with npm run test:terminal -t "should make a sync payment request" +- Restore 'enableTerminalTest' value to false + +*/ + +const enableTerminalTest = false; // set to true when you want to test with the Terminal + +// Cloud Device API env settings +const { ADYEN_API_KEY, ADYEN_MERCHANT_ACCOUNT, ADYEN_TERMINAL_DEVICE_ID } = process.env; +// env setting for Terminal encryption +const { ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER, ADYEN_TERMINAL_DEVICE_PASSPHRASE } = process.env; + +const hasEnv = !!(ADYEN_API_KEY && ADYEN_MERCHANT_ACCOUNT && ADYEN_TERMINAL_DEVICE_ID); +(enableTerminalTest && hasEnv ? describe : describe.skip)("Cloud Device API Testing with Terminal", () => { + let client: Client; + let cloudDeviceAPI: CloudDeviceAPI; + + beforeAll(() => { + console.log("*** Testing with Terminal enabled ****"); + + client = new Client({ + apiKey: ADYEN_API_KEY, + environment: EnvironmentEnum.TEST, + }); + cloudDeviceAPI = new CloudDeviceAPI(client); + jest.setTimeout(250000); // Set timeout to 25s + }); + + afterAll((done) => { + // Calling `done()` in `afterAll` helps Jest to gracefully exit after all async operations are complete. + done(); + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should make a sync payment request" + test("should make a sync payment request", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + const deviceId = ADYEN_TERMINAL_DEVICE_ID!; + + const response = await cloudDeviceAPI.sendSync( + merchantAccount, + deviceId, + testCloudDeviceApiRequest(deviceId) + ); + + // Log outcome + if (response.SaleToPOIRequest?.EventNotification) { + console.log("Received EventNotification:", JSON.stringify(response.SaleToPOIRequest.EventNotification, null, 2)); + } else if (response.SaleToPOIResponse) { + console.log("Received SaleToPOIResponse:", JSON.stringify(response.SaleToPOIResponse, null, 2)); + } else { + console.log("Received unexpected response structure:", JSON.stringify(response, null, 2)); + } + + expect(response).toBeDefined(); + + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should make an async payment request" + test("should make an async payment request", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + const deviceId = ADYEN_TERMINAL_DEVICE_ID!; + + const response = await cloudDeviceAPI.sendAsync( + merchantAccount, + deviceId, + testCloudDeviceApiRequest(deviceId) + ); + + // Log outcome + console.log("response:", response); // should be 'ok' + + expect(response).toBeDefined(); + + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should get device status" + test("should get device status", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + const deviceId = ADYEN_TERMINAL_DEVICE_ID!; + + const response: DeviceStatusResponse = await cloudDeviceAPI.getDeviceStatus( + merchantAccount, + deviceId + ); + + console.log("Device status response:", JSON.stringify(response, null, 2)); + + expect(response).toBeDefined(); + expect(response.deviceId).toEqual(deviceId); + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should get connected devices" + test("should get connected devices", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + + const response: ConnectedDevicesResponse = await cloudDeviceAPI.getConnectedDevices( + merchantAccount + ); + + console.log("Connected devices response:", JSON.stringify(response, null, 2)); + + expect(response).toBeDefined(); + expect(response.uniqueDeviceIds).toBeDefined(); + expect(Array.isArray(response.uniqueDeviceIds)).toBe(true); + + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should make an encrypted sync payment request" + test("should make an encrypted sync payment request", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + const deviceId = ADYEN_TERMINAL_DEVICE_ID!; + + // IMPORTANT: Encryption credentials must match the Terminal configuration on CA + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 1, + KeyIdentifier: ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER ?? "n/a", + KeyVersion: 1, + Passphrase: ADYEN_TERMINAL_DEVICE_PASSPHRASE ?? "n/a", + }; + + const response: CloudDeviceApiResponse = await cloudDeviceAPI.sendEncryptedSync( + merchantAccount, + deviceId, + testCloudDeviceApiRequest(deviceId), + encryptionCredentialDetails + ); + + // Log outcome + console.log("response:", response); + + expect(response).toBeDefined(); + // After decryption by the SDK, the response should be a standard CloudDeviceApiResponse + expect(response.SaleToPOIResponse).toBeDefined(); + expect(response.SaleToPOIResponse?.MessageHeader).toBeDefined(); + expect(response.SaleToPOIResponse?.MessageHeader.MessageType).toBe(MessageType.Response); + expect(response.SaleToPOIResponse?.PaymentResponse).toBeDefined(); + }); + + // run with: npx jest cloudDeviceApi.terminal.spec.ts -t "should make an encrypted async payment request" + test("should make an encrypted async payment request", async () => { + const merchantAccount = ADYEN_MERCHANT_ACCOUNT!; + const deviceId = ADYEN_TERMINAL_DEVICE_ID!; + + // IMPORTANT: Encryption credentials must match the Terminal configuration on CA + const encryptionCredentialDetails: EncryptionCredentialDetails = { + AdyenCryptoVersion: 1, + KeyIdentifier: ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER ?? "n/a", + KeyVersion: 1, + Passphrase: ADYEN_TERMINAL_DEVICE_PASSPHRASE ?? "n/a", + }; + + const response = await cloudDeviceAPI.sendEncryptedAsync( + merchantAccount, + deviceId, + testCloudDeviceApiRequest(deviceId), + encryptionCredentialDetails + ); + + // Log outcome + console.log("response:", response); // should be 'ok' + + expect(response).toBeDefined(); + }); + + const testCloudDeviceApiRequest = function (deviceId: string) { + const timestamp = (): string => new Date().toISOString(); + const id = Math.floor(Math.random() * Math.floor(10000000)).toString(); + + const messageHeader: MessageHeader = { + MessageCategory: MessageCategoryType.Payment, + MessageClass: MessageClassType.Service, + MessageType: MessageType.Request, + POIID: deviceId, + ProtocolVersion: "3.0", + SaleID: id, + ServiceID: id, + }; + + const paymentRequest: PaymentRequest = { + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1, + }, + }, + SaleData: { + SaleTransactionID: { + TimeStamp: timestamp(), + TransactionID: id, + }, + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test" + } + }, + metadata: { + someMetaDataKey1: "YOUR_VALUE", + someMetaDataKey2: "YOUR_VALUE" + }, + } + }, + }; + + const cloudDeviceApiRequest: CloudDeviceApiRequest = { + SaleToPOIRequest: { + MessageHeader: messageHeader, + PaymentRequest: paymentRequest, + }, + }; + + return cloudDeviceApiRequest + } + +}); + diff --git a/src/__tests__/security/nexoSecurityManager.spec.ts b/src/__tests__/security/nexoSecurityManager.spec.ts new file mode 100644 index 000000000..cd7633b43 --- /dev/null +++ b/src/__tests__/security/nexoSecurityManager.spec.ts @@ -0,0 +1,163 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +import NexoSecurityManager from "../../security/nexoSecurityManager"; +import { EncryptionCredentialDetails } from "../../security/encryptionCredentialDetails"; +import { MessageHeader, SaleToPOISecuredMessage, MessageCategoryType, MessageClassType, MessageType, CloudDeviceApiRequest, PaymentRequest} from "../../typings/cloudDevice/models"; +import InvalidSecurityKeyException from "../../security/exception/invalidSecurityKeyException"; +import NexoCryptoException from "../../services/exception/nexoCryptoException"; + +describe("NexoSecurityManager", (): void => { + const credentials: EncryptionCredentialDetails = { + KeyIdentifier: "SpecTest", + KeyVersion: 1, + Passphrase: "spec-test-passphrase", + AdyenCryptoVersion: 1, + }; + + const messageHeader: MessageHeader = { + MessageCategory: MessageCategoryType.Payment, + MessageClass: MessageClassType.Service, + MessageType: MessageType.Request, + POIID: "P400Plus-123456789", + ProtocolVersion: "3.0", + SaleID: "001", + ServiceID: "001", + }; + + const paymentRequest: PaymentRequest = { + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1, + }, + }, + SaleData: { + SaleTransactionID: { + TimeStamp: "2025-09-11T08:51:30.698Z", + TransactionID: "123456789", + }, + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test" + } + }, + } + }, + }; + + const cloudDeviceApiRequest: CloudDeviceApiRequest = { + SaleToPOIRequest: { + MessageHeader: messageHeader, + PaymentRequest: paymentRequest, + }, + }; + + const payload: string = JSON.stringify(cloudDeviceApiRequest) + + it("should encrypt and decrypt a message successfully", (): void => { + // Encrypt + const securedMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + messageHeader, + payload, + credentials, + ); + + expect(securedMessage).toBeDefined(); + expect(securedMessage.MessageHeader).toEqual(messageHeader); + expect(securedMessage.NexoBlob).toBeDefined(); + expect(typeof securedMessage.NexoBlob).toBe("string"); + expect(securedMessage.SecurityTrailer).toBeDefined(); + expect(securedMessage.SecurityTrailer.KeyIdentifier).toBe(credentials.KeyIdentifier); + expect(securedMessage.SecurityTrailer.KeyVersion).toBe(credentials.KeyVersion); + expect(securedMessage.SecurityTrailer.AdyenCryptoVersion).toBe(credentials.AdyenCryptoVersion); + expect(typeof securedMessage.SecurityTrailer.Hmac).toBe("string"); + expect(typeof securedMessage.SecurityTrailer.Nonce).toBe("string"); + + // Decrypt + const decryptedJson = NexoSecurityManager.decrypt(securedMessage, credentials); + + expect(decryptedJson).toBe(payload); + }); + + it("should throw InvalidSecurityKeyException on decrypt with invalid credentials", (): void => { + const invalidCredentials: any[] = [ + {}, + { ...credentials, Passphrase: "" }, + { ...credentials, KeyIdentifier: "" }, + { ...credentials, KeyVersion: NaN }, + { ...credentials, AdyenCryptoVersion: NaN }, + null, + undefined, + ]; + + const securedMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + messageHeader, + payload, + credentials, + ); + + invalidCredentials.forEach((cred): void => { + expect((): string => NexoSecurityManager.decrypt(securedMessage, cred)).toThrow( + new InvalidSecurityKeyException("Invalid Encryption Credentials") + ); + }); + + + }); + + it("should throw NexoCryptoException on decrypt with wrong HMAC", (): void => { + const securedMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + messageHeader, + payload, + credentials, + ); + + // Tamper with the HMAC + const tamperedMessage = { + ...securedMessage, + SecurityTrailer: { + ...securedMessage.SecurityTrailer, + Hmac: "dGFtcGVyZWRIbWFj", // "tamperedHmac" in base64 + }, + }; + + expect((): string => NexoSecurityManager.decrypt(tamperedMessage, credentials)) + .toThrow(NexoCryptoException); + }); + + it("should throw NexoCryptoException on decrypt with wrong passphrase", (): void => { + const securedMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + messageHeader, + payload, + credentials, + ); + + const wrongCredentials = { + ...credentials, + Passphrase: "wrong-passphrase", + }; + + expect((): string => NexoSecurityManager.decrypt(securedMessage, wrongCredentials)) + .toThrow(NexoCryptoException); + + }); +}); \ No newline at end of file diff --git a/src/__tests__/terminalCloudAPI.spec.ts b/src/__tests__/terminalCloudAPI.spec.ts index d91d92825..4d0a21698 100644 --- a/src/__tests__/terminalCloudAPI.spec.ts +++ b/src/__tests__/terminalCloudAPI.spec.ts @@ -1,5 +1,6 @@ import nock from "nock"; -import { createClient, createTerminalAPIPaymentRequest, createTerminalAPIRefundRequest } from "../__mocks__/base"; +import { createClient } from "../__mocks__/base"; +import { createTerminalAPIPaymentRequest, createTerminalAPIRefundRequest } from "../__mocks__/terminalApi/baseTerminalApi"; import { asyncRes, asyncErrorRes } from "../__mocks__/terminalApi/async"; import { syncRefund, syncRes, syncResEventNotification, syncResEventNotificationWithAdditionalAttributes, syncResEventNotificationWithUnknownEnum } from "../__mocks__/terminalApi/sync"; import Client from "../client"; diff --git a/src/__tests__/terminalLocalAPI.spec.ts b/src/__tests__/terminalLocalAPI.spec.ts index 7832fc653..deea684d7 100644 --- a/src/__tests__/terminalLocalAPI.spec.ts +++ b/src/__tests__/terminalLocalAPI.spec.ts @@ -1,5 +1,6 @@ import nock from "nock"; -import { createClient, createTerminalAPIPaymentRequest } from "../__mocks__/base"; +import { createClient } from "../__mocks__/base"; +import { createTerminalAPIPaymentRequest } from "../__mocks__/terminalApi/baseTerminalApi"; import { localEncRes, wrongEncRes } from "../__mocks__/terminalApi/local"; import Client from "../client"; import TerminalLocalAPI from "../services/terminalLocalAPI"; diff --git a/src/client.ts b/src/client.ts index 9b2db546e..5034f9f09 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,4 +1,4 @@ -import Config, { EnvironmentEnum } from "./config"; +import Config, { CLOUD_DEVICE_API_ENDPOINT_TEST, EnvironmentEnum } from "./config"; import { TERMINAL_API_ENDPOINT_TEST } from "./config"; import HttpURLConnectionClient from "./httpClient/httpURLConnectionClient"; @@ -54,6 +54,20 @@ class Client { } } + // set Cloud Device API endpoints + if (this.config.environment === EnvironmentEnum.TEST) { + // one TEST endpoint for all regions + this.config.cloudDeviceApiEndpoint = CLOUD_DEVICE_API_ENDPOINT_TEST; + } else if (this.config.environment === EnvironmentEnum.LIVE) { + // region-based LIVE endpoints + if(this.config.region) { + if (!Config.isRegionValid(this.config.region)) { + throw new Error(`Invalid region provided: ${this.config.region}`); + } + this.config.cloudDeviceApiEndpoint = Config.getCloudDeviceApiEndpoint(this.config.region); + } + } + // legacy support for marketPayEndpoint if (this.config.environment === EnvironmentEnum.TEST) { this.config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST; diff --git a/src/config.ts b/src/config.ts index a0d593ed8..c5581ab75 100644 --- a/src/config.ts +++ b/src/config.ts @@ -8,6 +8,15 @@ const TERMINAL_API_ENDPOINT_AU_LIVE = "https://terminal-api-live-au.adyen.com"; const TERMINAL_API_ENDPOINT_US_LIVE = "https://terminal-api-live-us.adyen.com"; const TERMINAL_API_ENDPOINT_APSE_LIVE = "https://terminal-api-live-apse.adyen.com"; +// Test endpoint for Terminal API +export const CLOUD_DEVICE_API_ENDPOINT_TEST = "https://device-api-test.adyen.com"; + +// Live endpoints for Cloud Device API +const CLOUD_DEVICE_API_ENDPOINT_LIVE = "https://device-api-live.adyen.com"; +const CLOUD_DEVICE_API_ENDPOINT_AU_LIVE = "https://device-api-live-au.adyen.com"; +const CLOUD_DEVICE_API_ENDPOINT_US_LIVE = "https://device-api-live-us.adyen.com"; +const CLOUD_DEVICE_API_ENDPOINT_APSE_LIVE = "https://device-api-live-apse.adyen.com"; + /** * Supported environments for the Adyen APIs. @@ -18,7 +27,7 @@ export enum EnvironmentEnum { } /** - * Supported Regions for Terminal API integration. + * Supported Regions for Terminal and Device API integration. */ export enum RegionEnum { EU = "EU", @@ -35,6 +44,14 @@ export const TERMINAL_API_ENDPOINTS_MAP: Record = { [RegionEnum.APSE]: TERMINAL_API_ENDPOINT_APSE_LIVE }; +// Cloud Device API Endpoints Map +export const CLOUD_DEVICE_API_ENDPOINTS_MAP: Record = { + [RegionEnum.EU]: CLOUD_DEVICE_API_ENDPOINT_LIVE, + [RegionEnum.AU]: CLOUD_DEVICE_API_ENDPOINT_AU_LIVE, + [RegionEnum.US]: CLOUD_DEVICE_API_ENDPOINT_US_LIVE, + [RegionEnum.APSE]: CLOUD_DEVICE_API_ENDPOINT_APSE_LIVE +}; + interface ConfigConstructor { username?: string; @@ -47,6 +64,7 @@ interface ConfigConstructor { certificatePath?: string; terminalApiCloudEndpoint?: string; terminalApiLocalEndpoint?: string; + cloudDeviceApiEndpoint?: string; liveEndpointUrlPrefix?: string; // must be provided for LIVE integration region?: RegionEnum; // must be provided for Terminal API integration enable308Redirect?: boolean; // enabling redirect upon 308 response status @@ -66,6 +84,7 @@ class Config { public certificatePath?: string; public terminalApiCloudEndpoint?: string; public terminalApiLocalEndpoint?: string; + public cloudDeviceApiEndpoint?: string; public liveEndpointUrlPrefix?: string; public region?: RegionEnum; public enable308Redirect?: boolean; @@ -83,6 +102,7 @@ class Config { if (options.certificatePath) this.certificatePath = options.certificatePath; if (options.terminalApiCloudEndpoint) this.terminalApiCloudEndpoint = options.terminalApiCloudEndpoint; if (options.terminalApiLocalEndpoint) this.terminalApiLocalEndpoint = options.terminalApiLocalEndpoint; + if (options.cloudDeviceApiEndpoint) this.cloudDeviceApiEndpoint = options.cloudDeviceApiEndpoint; if (options.liveEndpointUrlPrefix) this.liveEndpointUrlPrefix = options.liveEndpointUrlPrefix; if (options.region) this.region = options.region; this.enable308Redirect = options.enable308Redirect ?? true; // enabled by default @@ -117,6 +137,16 @@ class Config { return TERMINAL_API_ENDPOINTS_MAP[region] || TERMINAL_API_ENDPOINTS_MAP[RegionEnum.EU]; } + /** + * Returns the Cloud Device API endpoint for the given region. + * If the region is not valid, returns the EU endpoint. + * @param region - The region to get the endpoint for. + * @returns The Cloud Device API endpoint URL. + */ + public static getCloudDeviceApiEndpoint(region: RegionEnum): string { + return CLOUD_DEVICE_API_ENDPOINTS_MAP[region] || CLOUD_DEVICE_API_ENDPOINTS_MAP[RegionEnum.EU]; + } + } export default Config; diff --git a/src/helpers/getJsonResponse.ts b/src/helpers/getJsonResponse.ts index 1325db0f8..9723bec5e 100644 --- a/src/helpers/getJsonResponse.ts +++ b/src/helpers/getJsonResponse.ts @@ -18,6 +18,7 @@ */ import Resource from "../services/resource"; +import { CloudDeviceApiResponse } from "../typings/cloudDevice/cloudDeviceApiResponse"; import { IRequest } from "../typings/requestOptions"; import { TerminalApiResponse } from "../typings/terminal/models"; @@ -35,6 +36,19 @@ import { TerminalApiResponse } from "../typings/terminal/models"; * const response = await getJsonResponse(terminalApiResource, request); */ async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise; + +/** + * Sends a JSON request and returns a deserialized CloudDeviceApiResponse. + * + * @template T The request type + * @param resource - The API resource. + * @param jsonRequest - The request payload. + * @param requestOptions - Optional HTTP request options. + * @returns A promise resolving to a CloudDeviceApiResponse. + */ +async function getJsonResponse(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options,): Promise; + + /** * Sends a JSON request to the given resource and returns a deserialized response of the expected type. * Used by all APIs and Terminal API sync method diff --git a/src/security/encryptionCredentialDetails.ts b/src/security/encryptionCredentialDetails.ts new file mode 100644 index 000000000..397589a5b --- /dev/null +++ b/src/security/encryptionCredentialDetails.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + + +/** +* Details of the encryption credential used for encrypting the request payload (nexoBlob) +*/ +export class EncryptionCredentialDetails { + /** + * The version of the Adyen-specific crypto implementation. + */ + 'AdyenCryptoVersion': number; + /** + * The unique identifier of the key. + */ + 'KeyIdentifier': string; + /** + * The version of the key. + */ + 'KeyVersion': number; + /** + * The passphrase used to derive the encryption key. + */ + 'Passphrase': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdyenCryptoVersion", + "baseName": "AdyenCryptoVersion", + "type": "number" + }, + { + "name": "KeyIdentifier", + "baseName": "KeyIdentifier", + "type": "string" + }, + { + "name": "KeyVersion", + "baseName": "KeyVersion", + "type": "number" + }, + { + "name": "Passphrase", + "baseName": "Passphrase", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return EncryptionCredentialDetails.attributeTypeMap; + } +} diff --git a/src/security/nexoSecurityManager.ts b/src/security/nexoSecurityManager.ts new file mode 100644 index 000000000..88b117313 --- /dev/null +++ b/src/security/nexoSecurityManager.ts @@ -0,0 +1,202 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes, timingSafeEqual } from "crypto"; +import NexoCryptoException from "../services/exception/nexoCryptoException"; +import { + MessageHeader, + NexoDerivedKey, + SaleToPOISecuredMessage, + SecurityTrailer, +} from "../typings/cloudDevice/models"; +import { EncryptionCredentialDetails } from "./encryptionCredentialDetails"; +import InvalidSecurityKeyException from "./exception/invalidSecurityKeyException"; +import NexoDerivedKeyGenerator from "./nexoDerivedKeyGenerator"; +import { NexoEnum } from "../constants/nexoConstants"; + +enum Modes { + ENCRYPT, + DECRYPT, +} + +/** + * Handles encryption, decryption, and integrity validation + * for Nexo SaleToPOI messages using AES and HMAC. + * + * - Derives keys from {@link EncryptionCredentialDetails} + * - Encrypts and decrypts Nexo messages (AES-256-CBC) + * - Generates and validates HMAC (SHA-256) + * - Constructs and validates {@link SecurityTrailer} + */ +class NexoSecurityManager { + + /** + * Encrypts a SaleToPOI message. + * + * @param messageHeader - The Nexo message header + * @param payload - The payload in JSON string format + * @param credentials - The encryption credentials + * @returns A instance of SaleToPOISecuredMessage with MessageHeader, NexoBlob (the encrypted payload) and SecurityTrailer + */ + public static encrypt( + messageHeader: MessageHeader, + payload: string, + credentials: EncryptionCredentialDetails, + ): SaleToPOISecuredMessage { + + try { + + const derivedKey: NexoDerivedKey = NexoDerivedKeyGenerator.deriveKeyMaterial(credentials.Passphrase); + const saleToPoiMessageByteArray = Buffer.from(payload, "utf-8"); + const ivNonce = NexoSecurityManager.generateRandomIvNonce(); + const encryptedSaleToPoiMessage = NexoSecurityManager.crypt( + saleToPoiMessageByteArray, + derivedKey, + ivNonce, + Modes.ENCRYPT, + ); + const encryptedSaleToPoiMessageHmac = NexoSecurityManager.hmac(saleToPoiMessageByteArray, derivedKey); + + const securityTrailer: SecurityTrailer = { + AdyenCryptoVersion: credentials.AdyenCryptoVersion, + Hmac: encryptedSaleToPoiMessageHmac.toString("base64"), + KeyIdentifier: credentials.KeyIdentifier, + KeyVersion: credentials.KeyVersion, + Nonce: ivNonce.toString("base64"), + }; + + return { + MessageHeader: messageHeader, + NexoBlob: encryptedSaleToPoiMessage.toString("base64"), + SecurityTrailer: securityTrailer, + }; + + } catch (err: any) { + // an error has occurred + console.error(err); + throw new NexoCryptoException(err?.message || "Unknown error during encryption"); + } + + } + + /** + * Decrypts a secured SaleToPOI message and validates its HMAC. + * + * @param saleToPoiSecureMessage - The secured message to decrypt + * @param credentials - The encryption credentials + * @throws {InvalidSecurityKeyException} If the credentials are invalid + * @throws {NexoCryptoException} When an error occurs + * @returns The decrypted SaleToPOI message as a UTF-8 string + */ + public static decrypt( + saleToPoiSecureMessage: SaleToPOISecuredMessage, + credentials: EncryptionCredentialDetails, + ): string { + + try { + NexoSecurityManager.validateEncryptionCredentials(credentials); + + // decrypt content of NexoBlob + const encryptedSaleToPoiMessageByteArray = Buffer.from(saleToPoiSecureMessage.NexoBlob, "base64"); + + const derivedKey = NexoDerivedKeyGenerator.deriveKeyMaterial(credentials.Passphrase); + const ivNonce = Buffer.from(saleToPoiSecureMessage.SecurityTrailer.Nonce, "base64"); + const decryptedSaleToPoiMessageByteArray = NexoSecurityManager.crypt( + encryptedSaleToPoiMessageByteArray, + derivedKey, + ivNonce, + Modes.DECRYPT, + ); + + const receivedHmac = Buffer.from(saleToPoiSecureMessage.SecurityTrailer.Hmac, "base64"); + NexoSecurityManager.validateHmac(receivedHmac, decryptedSaleToPoiMessageByteArray, derivedKey); + + return decryptedSaleToPoiMessageByteArray.toString("utf-8"); + + } catch (err: any) { + // an error has occurred + console.error(err); + throw new NexoCryptoException(err?.message || "Unknown error during decryption"); + } + + } + + private static validateEncryptionCredentials(credentials: EncryptionCredentialDetails): void { + const isValid = + credentials && + credentials.Passphrase && + credentials.KeyIdentifier && + !isNaN(credentials.KeyVersion) && + !isNaN(credentials.AdyenCryptoVersion); + if (!isValid) { + throw new InvalidSecurityKeyException("Invalid Encryption Credentials"); + } + } + + /** + * Performs AES-256-CBC encryption or decryption. + * + * @param bytes The data to be encrypted or decrypted. + * @param dk The derived key containing the cipher key and IV. + * @param ivNonce The random nonce to be XORed with the IV. + * @param mode The operation mode (ENCRYPT or DECRYPT). + * @throws {NexoCryptoException} If an error occurs during the cryptographic operation. + * @returns The resulting encrypted or decrypted data as a Buffer. + */ + private static crypt(bytes: Buffer, dk: NexoDerivedKey, ivNonce: Buffer, mode: Modes): Buffer { + try { + const actualIV = Buffer.alloc(NexoEnum.IV_LENGTH); + for (let i = 0; i < NexoEnum.IV_LENGTH; i++) { + actualIV[i] = dk.iv[i] ^ ivNonce[i]; + } + + const cipher = mode === Modes.ENCRYPT + ? createCipheriv("aes-256-cbc", dk.cipherKey, actualIV) + : createDecipheriv("aes-256-cbc", dk.cipherKey, actualIV); + + let encrypted = (cipher as Cipher).update(bytes); + encrypted = Buffer.concat([encrypted, cipher.final()]); + return encrypted; + + } catch (err: any) { + // an error has occurred + console.error(err); + throw new NexoCryptoException(err?.message || "Unknown error during AES encryption or decryption"); + } + } + + private static hmac(bytes: Buffer, derivedKey: NexoDerivedKey): Buffer { + const mac = createHmac("sha256", derivedKey.hmacKey); + return mac.update(bytes).digest(); + } + + private static generateRandomIvNonce(): Buffer { + return randomBytes(NexoEnum.IV_LENGTH); + } + + private static validateHmac(receivedHmac: Buffer, decryptedMessage: Buffer, derivedKey: NexoDerivedKey): void { + const hmac = NexoSecurityManager.hmac(decryptedMessage, derivedKey); + + if (!timingSafeEqual(hmac, receivedHmac)) { + throw new NexoCryptoException("Hmac validation failed"); + } + } +} + +export default NexoSecurityManager; diff --git a/src/services/cloudDevice/cloudDeviceApi.ts b/src/services/cloudDevice/cloudDeviceApi.ts new file mode 100644 index 000000000..707fa92af --- /dev/null +++ b/src/services/cloudDevice/cloudDeviceApi.ts @@ -0,0 +1,399 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +import Service from "../../service"; +import Client from "../../client"; +import getJsonResponse from "../../helpers/getJsonResponse"; +import mergeDeep from "../../utils/mergeDeep"; +import { ApplicationInfo } from "../../typings/applicationInfo"; +import { ObjectSerializer, CloudDeviceApiRequest, CloudDeviceApiResponse, ConnectedDevicesResponse, DeviceStatusResponse, CloudDeviceApiSecuredRequest, CloudDeviceApiSecuredResponse, SaleToPOISecuredMessage } from "../../typings/cloudDevice/models"; +import Resource from "../resource"; +import { IRequest } from "../../typings/requestOptions"; +import NexoSecurityManager from "../../security/nexoSecurityManager"; +import { EncryptionCredentialDetails } from "../../security/encryptionCredentialDetails"; + +// Cloud Device API version +export const CLOUD_DEVICE_API_VERSION = "v1"; + +/** + * Cloud Device API service + * + * With the Cloud device API you can: + * - send Terminal API requests to the Adyen cloud endpointd. + * - check the cloud connection of a payment terminal or of a device used in a Mobile solution for in-person payments. + */ +class CloudDeviceAPI extends Service { + + private baseUrl: string; + + public constructor(client: Client) { + super(client); + this.baseUrl = this.client.config.cloudDeviceApiEndpoint + "/" + CLOUD_DEVICE_API_VERSION; + this.apiKeyRequired = true; + } + + // Add application information to a CloudDevice API request and sets the device POIID. + private static setApplicationInfo(request: CloudDeviceApiRequest, deviceId: string): CloudDeviceApiRequest { + if (request.SaleToPOIRequest.PaymentRequest) { + const applicationInfo = new ApplicationInfo(); + const saleToAcquirerData = { applicationInfo }; + const saleData = { saleToAcquirerData }; + const paymentRequest = { saleData }; + const saleToPOIRequest = { paymentRequest }; + const reqWithAppInfo = { saleToPOIRequest }; + + mergeDeep(request, reqWithAppInfo); + } + + if (true) { + request.SaleToPOIRequest = { + ...request.SaleToPOIRequest, + MessageHeader: { + ...request.SaleToPOIRequest?.MessageHeader, + POIID: deviceId + } + }; + } + + return ObjectSerializer.serialize(request, "CloudDeviceApiRequest"); + } + + /** + * Send an asynchronous payment request. + * + * @param cloudDeviceApiRequest - The request to send. + * @param merchantAccount - The unique identifier of the merchant account. + * @param deviceId - The unique identifier of the payment device that you send this request to (must match POIID in the MessageHeader). + * @returns A promise that resolves to "ok" if the request was successful, or a CloudDeviceApiResponse if there is an error. + */ + public sendAsync(merchantAccount: string, deviceId: string, cloudDeviceApiRequest: CloudDeviceApiRequest): Promise { + + const resource = new Resource(this, this.getAsyncEndpoint(merchantAccount, deviceId)); + + const request = CloudDeviceAPI.setApplicationInfo(cloudDeviceApiRequest, deviceId); + + return getJsonResponse( + resource, + request + ); + } + + /** + * Send an asynchronous encrypted payment request. + * + * @param merchantAccount - The unique identifier of the merchant account. + * @param deviceId - The unique identifier of the payment device that you send this request to (must match POIID in the MessageHeader). + * @param cloudDeviceApiRequest - The request to send. + * @param encryptionCredentialDetails - The details of the encryption credential used for encrypting the request payload (nexoBlob) + * @returns A promise that resolves to "ok" if the request was successful, or a CloudDeviceApiResponse if there is an error. + * + * @throws {CloudDeviceApiError} If an error occurs + * @example + * try { + * const response = await client.sendEncryptedAsync( + * "TestMerchant", + * "P400Plus-123456789", + * cloudDeviceApiRequest, + * encryptionCredentialDetails + * ); + * console.log("Decrypted response:", response); + * } catch (err) { + * if (err instanceof CloudDeviceApiError) { + * console.error("CloudDevice API failed:", err.message); + * console.error("Cause:", err.cause); + * } + * } + */ + public async sendEncryptedAsync(merchantAccount: string, deviceId: string, cloudDeviceApiRequest: CloudDeviceApiRequest, encryptionCredentialDetails: EncryptionCredentialDetails): Promise { + + try { + + const resource = new Resource(this, this.getAsyncEndpoint(merchantAccount, deviceId)); + const request = CloudDeviceAPI.setApplicationInfo(cloudDeviceApiRequest, deviceId); + + const saleToPoiSecuredMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + request.SaleToPOIRequest?.MessageHeader, // set MessageHeader + JSON.stringify(request), // encrypt entire CloudDeviceApiRequest + encryptionCredentialDetails // set encryption credentials + ); + + const securedPaymentRequest: CloudDeviceApiSecuredRequest = ObjectSerializer.serialize({ + SaleToPOIRequest: saleToPoiSecuredMessage, + }, "CloudDeviceApiSecuredRequest"); + + const jsonResponse = await getJsonResponse( + resource, + securedPaymentRequest + ); + + if (typeof jsonResponse === "string") { + // request was successful + return jsonResponse; + } + + const cloudDeviceApiSecuredResponse: CloudDeviceApiSecuredResponse = + ObjectSerializer.deserialize(jsonResponse, "CloudDeviceApiSecuredResponse"); + + // decrypt SaleToPOISecuredMessage + const decryptedPayload = NexoSecurityManager.decrypt( + cloudDeviceApiSecuredResponse.SaleToPOIResponse, + encryptionCredentialDetails, + ); + + return ObjectSerializer.deserialize(JSON.parse(decryptedPayload), "CloudDeviceApiResponse"); + + } catch (err: any) { + // an error has occurred + console.error(err); + throw new CloudDeviceApiError(err?.message || "Unknown error", err); + } + } + + + /** + * Send a synchronous payment request. + * + * @param cloudDeviceApiRequest - The request to send. + * @param merchantAccount - The unique identifier of the merchant account. + * @param deviceId - The unique identifier of the payment device that you send this request to (must match POIID in the MessageHeader). + * @returns A promise that resolves to a CloudDeviceApiResponse. + */ + public async sendSync(merchantAccount: string, deviceId: string, cloudDeviceApiRequest: CloudDeviceApiRequest): Promise { + + const resource = new Resource(this, this.getSyncEndpoint(merchantAccount, deviceId)); + const request = CloudDeviceAPI.setApplicationInfo(cloudDeviceApiRequest, deviceId); + + const response = await getJsonResponse( + resource, + request + ); + + return ObjectSerializer.deserialize(response, "CloudDeviceApiResponse"); + } + + /** + * Send a synchronous encrypted payment request. + * + * @param merchantAccount - The unique identifier of the merchant account. + * @param deviceId - The unique identifier of the payment device that you send this request to (must match POIID in the MessageHeader). + * @param cloudDeviceApiRequest - The request to send. + * @param encryptionCredentialDetails - The details of the encryption credential used for encrypting the request payload (nexoBlob) + * @returns A promise that resolves to CloudDeviceApiSecuredResponse + * + * @throws {CloudDeviceApiError} If an error occurs + * @example + * try { + * const response = await client.sendEncryptedSync( + * "TestMerchant", + * "P400Plus-123456789", + * cloudDeviceApiRequest, + * encryptionCredentialDetails + * ); + * console.log("Decrypted response:", response); + * } catch (err) { + * if (err instanceof CloudDeviceApiError) { + * console.error("CloudDevice API failed:", err.message); + * console.error("Cause:", err.cause); + * } + * } + */ + public async sendEncryptedSync(merchantAccount: string, deviceId: string, cloudDeviceApiRequest: CloudDeviceApiRequest, encryptionCredentialDetails: EncryptionCredentialDetails): Promise { + + try { + + const resource = new Resource(this, this.getSyncEndpoint(merchantAccount, deviceId)); + const request = CloudDeviceAPI.setApplicationInfo(cloudDeviceApiRequest, deviceId); + + const saleToPoiSecuredMessage: SaleToPOISecuredMessage = NexoSecurityManager.encrypt( + request.SaleToPOIRequest?.MessageHeader, // set MessageHeader + JSON.stringify(request), // encrypt entire CloudDeviceApiRequest + encryptionCredentialDetails // set encryption credentials + ); + + const securedPaymentRequest: CloudDeviceApiSecuredRequest = ObjectSerializer.serialize({ + SaleToPOIRequest: saleToPoiSecuredMessage, + }, "CloudDeviceApiSecuredRequest"); + + const jsonResponse = await getJsonResponse( + resource, + securedPaymentRequest + ); + + const cloudDeviceApiSecuredResponse: CloudDeviceApiSecuredResponse = + ObjectSerializer.deserialize(jsonResponse, "CloudDeviceApiSecuredResponse"); + + // decrypt SaleToPOISecuredMessage + const decryptedPayload = NexoSecurityManager.decrypt( + cloudDeviceApiSecuredResponse.SaleToPOIResponse, + encryptionCredentialDetails, + ); + + return ObjectSerializer.deserialize(JSON.parse(decryptedPayload), "CloudDeviceApiResponse"); + + } catch (err: any) { + // an error has occurred + console.error(err); + throw new CloudDeviceApiError(err?.message || "Unknown error", err); + } + } + + /** + * Get a list of connected devices for a merchant account. + * + * @param merchantAccount - The unique identifier of the merchant account. + * @param store The store ID of the store belonging to the merchant account specified in the path. + * @returns A promise that resolves to a ConnectedDevicesResponse. + */ + public async getConnectedDevices(merchantAccount: string, store?: string): Promise { + + const resource = new Resource(this, this.getConnectedDevicesEndpoint(merchantAccount)); + + let requestOptions: IRequest.Options = {}; + if (store) { + requestOptions.params = { store }; + } + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "ConnectedDevicesResponse"); + } + + /** + * Get the status of a device. + * + * @param merchantAccount - The unique identifier of the merchant account. + * @param deviceId - The unique identifier of the payment device. + * @returns A promise that resolves to a DeviceStatusResponse. + */ + public async getDeviceStatus(merchantAccount: string, deviceId: string): Promise { + + const resource = new Resource(this, this.getDeviceStatusEndpoint(merchantAccount, deviceId)); + + const response = await getJsonResponse( + resource, + "", + { method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "DeviceStatusResponse"); + } + + /** + * Decrypt event notification + * @param payload Event notification in JSON string format: it can be SaleToPOIResponse (async response) or SaleToPOIRequest (event notification) + * @param encryptionCredentialDetails The details of the encryption credential used for decrypting the payload (nexoBlob) + * @returns + */ + public decryptNotification( + payload: string, + encryptionCredentialDetails: EncryptionCredentialDetails + ): string { + const parsed = JSON.parse(payload); + + let decryptedMessage; + + if (parsed.SaleToPOIResponse) { + // includes SaleToPOIResponse (response after /async) + decryptedMessage = ObjectSerializer.deserialize(parsed, "CloudDeviceApiSecuredResponse"); + return NexoSecurityManager.decrypt( + decryptedMessage.SaleToPOIResponse, + encryptionCredentialDetails + ); + } else if (parsed.SaleToPOIRequest) { + // includes SaleToPOIRequest (event notification ) + decryptedMessage = ObjectSerializer.deserialize(parsed, "CloudDeviceApiSecuredRequest"); + return NexoSecurityManager.decrypt( + decryptedMessage.SaleToPOIRequest, + encryptionCredentialDetails + ); + } else { + console.log("Invalid payload: must be CloudDeviceApiSecuredRequest or CloudDeviceApiSecuredResponse"); + return ""; + } + } + + + /** + * Get Device API /sync endpoint + * @param merchantAccount The unique identifier of the merchant account. + * @param deviceId The unique identifier of the payment device. + * @returns + */ + getSyncEndpoint(merchantAccount: string, deviceId: string) { + return this.baseUrl + "/merchants/{merchantAccount}/devices/{deviceId}/sync" + .replace("{" + "merchantAccount" + "}", encodeURIComponent(String(merchantAccount))) + .replace("{" + "deviceId" + "}", encodeURIComponent(String(deviceId))); + } + + /** + * Get Device API /async endpoint + * @param merchantAccount The unique identifier of the merchant account. + * @param deviceId The unique identifier of the payment device. + * @returns + */ + getAsyncEndpoint(merchantAccount: string, deviceId: string) { + return this.baseUrl + "/merchants/{merchantAccount}/devices/{deviceId}/async" + .replace("{" + "merchantAccount" + "}", encodeURIComponent(String(merchantAccount))) + .replace("{" + "deviceId" + "}", encodeURIComponent(String(deviceId))); + } + + /** + * Get Device API connectedDevices endpoint + * @param merchantAccount The unique identifier of the merchant account. + * @returns + */ + getConnectedDevicesEndpoint(merchantAccount: string) { + return this.baseUrl + "/merchants/{merchantAccount}/connectedDevices" + .replace("{" + "merchantAccount" + "}", encodeURIComponent(String(merchantAccount))); + } + + /** + * Get Device API device status endpoint + * @param merchantAccount The unique identifier of the merchant account. + * @param deviceId The unique identifier of the payment device. + * @returns + */ + getDeviceStatusEndpoint(merchantAccount: string, deviceId: string) { + return this.baseUrl + "/merchants/{merchantAccount}/devices/{deviceId}/status" + .replace("{" + "merchantAccount" + "}", encodeURIComponent(String(merchantAccount))) + .replace("{" + "deviceId" + "}", encodeURIComponent(String(deviceId))); + } + +} + + +/** + * CloudDeviceApiError wraps any failure during the processing of Cloud Device API requests + */ +export class CloudDeviceApiError extends Error { + /** + * @param {string} message - A human-readable error message. + * @param {unknown} [cause] - The original error that triggered this failure. + */ + constructor(message: string, public cause?: unknown) { + super(message); + this.name = "CloudDeviceApiError"; + } +} + +export default CloudDeviceAPI; diff --git a/src/typings/cloudDevice/abortRequest.ts b/src/typings/cloudDevice/abortRequest.ts new file mode 100644 index 000000000..09f1c5f7f --- /dev/null +++ b/src/typings/cloudDevice/abortRequest.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; +import { MessageReference } from './messageReference'; + +export class AbortRequest { + 'AbortReason': string; + 'DisplayOutput'?: DisplayOutput; + 'MessageReference': MessageReference; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AbortReason", + "baseName": "AbortReason", + "type": "string" + }, + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "MessageReference", + "baseName": "MessageReference", + "type": "MessageReference" + } ]; + + static getAttributeTypeMap() { + return AbortRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/accountType.ts b/src/typings/cloudDevice/accountType.ts new file mode 100644 index 000000000..7c78759d4 --- /dev/null +++ b/src/typings/cloudDevice/accountType.ts @@ -0,0 +1,36 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum AccountType { + CardTotals = 'CardTotals', + Checking = 'Checking', + CreditCard = 'CreditCard', + Default = 'Default', + EpurseCard = 'EpurseCard', + Investment = 'Investment', + Savings = 'Savings', + Universal = 'Universal' +} diff --git a/src/typings/cloudDevice/adminRequest.ts b/src/typings/cloudDevice/adminRequest.ts new file mode 100644 index 000000000..f297c4b03 --- /dev/null +++ b/src/typings/cloudDevice/adminRequest.ts @@ -0,0 +1,43 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class AdminRequest { + 'ServiceIdentification'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ServiceIdentification", + "baseName": "ServiceIdentification", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdminRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/adminResponse.ts b/src/typings/cloudDevice/adminResponse.ts new file mode 100644 index 000000000..6598b04ac --- /dev/null +++ b/src/typings/cloudDevice/adminResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class AdminResponse { + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return AdminResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/algorithmIdentifier.ts b/src/typings/cloudDevice/algorithmIdentifier.ts new file mode 100644 index 000000000..76afd05df --- /dev/null +++ b/src/typings/cloudDevice/algorithmIdentifier.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmType } from './algorithmType'; +import { Parameter } from './parameter'; + +export class AlgorithmIdentifier { + 'Algorithm': AlgorithmType; + 'Parameter'?: Parameter; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Algorithm", + "baseName": "Algorithm", + "type": "AlgorithmType" + }, + { + "name": "Parameter", + "baseName": "Parameter", + "type": "Parameter" + } ]; + + static getAttributeTypeMap() { + return AlgorithmIdentifier.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/algorithmType.ts b/src/typings/cloudDevice/algorithmType.ts new file mode 100644 index 000000000..5ee65fc25 --- /dev/null +++ b/src/typings/cloudDevice/algorithmType.ts @@ -0,0 +1,37 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum AlgorithmType { + DesEde3Cbc = 'Des-ede3-cbc', + DesEde3Ecb = 'Des-ede3-ecb', + IdDukptWrap = 'Id-dukpt-wrap', + IdRetailCbcMac = 'Id-retail-cbc-MAC', + IdRetailCbcMacSha256 = 'Id-retail-cbc-MAC-sha-256', + IdSha256 = 'Id-sha256', + IdUkptWrap = 'id-ukpt-wrap ', + RsaEncryption = 'RsaEncryption', + Sha256WithRsaEncryption = 'Sha256WithRSAEncryption' +} diff --git a/src/typings/cloudDevice/alignmentType.ts b/src/typings/cloudDevice/alignmentType.ts new file mode 100644 index 000000000..4fde916c9 --- /dev/null +++ b/src/typings/cloudDevice/alignmentType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum AlignmentType { + Centred = 'Centred', + Justified = 'Justified', + Left = 'Left', + Right = 'Right' +} diff --git a/src/typings/cloudDevice/allowedProduct.ts b/src/typings/cloudDevice/allowedProduct.ts new file mode 100644 index 000000000..e5e91cb17 --- /dev/null +++ b/src/typings/cloudDevice/allowedProduct.ts @@ -0,0 +1,61 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class AllowedProduct { + 'AdditionalProductInfo'?: string; + 'EanUpc'?: string; + 'ProductCode': string; + 'ProductLabel'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdditionalProductInfo", + "baseName": "AdditionalProductInfo", + "type": "string" + }, + { + "name": "EanUpc", + "baseName": "EanUpc", + "type": "string" + }, + { + "name": "ProductCode", + "baseName": "ProductCode", + "type": "string" + }, + { + "name": "ProductLabel", + "baseName": "ProductLabel", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AllowedProduct.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/amount.ts b/src/typings/cloudDevice/amount.ts new file mode 100644 index 000000000..2918a49bb --- /dev/null +++ b/src/typings/cloudDevice/amount.ts @@ -0,0 +1,49 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class Amount { + 'Currency'?: string; + 'Value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "Value", + "baseName": "Value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Amount.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/amountsReq.ts b/src/typings/cloudDevice/amountsReq.ts new file mode 100644 index 000000000..849b41a9d --- /dev/null +++ b/src/typings/cloudDevice/amountsReq.ts @@ -0,0 +1,85 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class AmountsReq { + 'CashBackAmount'?: number; + 'Currency': string; + 'MaximumCashBackAmount'?: number; + 'MinimumAmountToDeliver'?: number; + 'MinimumSplitAmount'?: number; + 'PaidAmount'?: number; + 'RequestedAmount'?: number; + 'TipAmount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CashBackAmount", + "baseName": "CashBackAmount", + "type": "number" + }, + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "MaximumCashBackAmount", + "baseName": "MaximumCashBackAmount", + "type": "number" + }, + { + "name": "MinimumAmountToDeliver", + "baseName": "MinimumAmountToDeliver", + "type": "number" + }, + { + "name": "MinimumSplitAmount", + "baseName": "MinimumSplitAmount", + "type": "number" + }, + { + "name": "PaidAmount", + "baseName": "PaidAmount", + "type": "number" + }, + { + "name": "RequestedAmount", + "baseName": "RequestedAmount", + "type": "number" + }, + { + "name": "TipAmount", + "baseName": "TipAmount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AmountsReq.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/amountsResp.ts b/src/typings/cloudDevice/amountsResp.ts new file mode 100644 index 000000000..3e515f723 --- /dev/null +++ b/src/typings/cloudDevice/amountsResp.ts @@ -0,0 +1,73 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class AmountsResp { + 'AuthorizedAmount': number; + 'CashBackAmount'?: number; + 'Currency'?: string; + 'TipAmount'?: number; + 'TotalFeesAmount'?: number; + 'TotalRebatesAmount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AuthorizedAmount", + "baseName": "AuthorizedAmount", + "type": "number" + }, + { + "name": "CashBackAmount", + "baseName": "CashBackAmount", + "type": "number" + }, + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "TipAmount", + "baseName": "TipAmount", + "type": "number" + }, + { + "name": "TotalFeesAmount", + "baseName": "TotalFeesAmount", + "type": "number" + }, + { + "name": "TotalRebatesAmount", + "baseName": "TotalRebatesAmount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AmountsResp.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/anyType.ts b/src/typings/cloudDevice/anyType.ts new file mode 100644 index 000000000..1a636e638 --- /dev/null +++ b/src/typings/cloudDevice/anyType.ts @@ -0,0 +1,27 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export type AnyType = any; diff --git a/src/typings/cloudDevice/applicationInfo.ts b/src/typings/cloudDevice/applicationInfo.ts new file mode 100644 index 000000000..c622e1b4b --- /dev/null +++ b/src/typings/cloudDevice/applicationInfo.ts @@ -0,0 +1,84 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CommonField } from './commonField'; +import { ExternalPlatform } from './externalPlatform'; +import { MerchantDevice } from './merchantDevice'; +import { ShopperInteractionDevice } from './shopperInteractionDevice'; + +export class ApplicationInfo { + 'adyenLibrary'?: CommonField; + 'adyenPaymentSource'?: CommonField; + 'externalPlatform'?: ExternalPlatform; + 'merchantApplication'?: CommonField; + 'merchantDevice'?: MerchantDevice; + 'paymentDetailsSource'?: CommonField; + 'shopperInteractionDevice'?: ShopperInteractionDevice; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "adyenLibrary", + "baseName": "adyenLibrary", + "type": "CommonField" + }, + { + "name": "adyenPaymentSource", + "baseName": "adyenPaymentSource", + "type": "CommonField" + }, + { + "name": "externalPlatform", + "baseName": "externalPlatform", + "type": "ExternalPlatform" + }, + { + "name": "merchantApplication", + "baseName": "merchantApplication", + "type": "CommonField" + }, + { + "name": "merchantDevice", + "baseName": "merchantDevice", + "type": "MerchantDevice" + }, + { + "name": "paymentDetailsSource", + "baseName": "paymentDetailsSource", + "type": "CommonField" + }, + { + "name": "shopperInteractionDevice", + "baseName": "shopperInteractionDevice", + "type": "ShopperInteractionDevice" + } ]; + + static getAttributeTypeMap() { + return ApplicationInfo.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/areaSize.ts b/src/typings/cloudDevice/areaSize.ts new file mode 100644 index 000000000..b49b74043 --- /dev/null +++ b/src/typings/cloudDevice/areaSize.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class AreaSize { + 'X': string; + 'Y': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "X", + "baseName": "X", + "type": "string" + }, + { + "name": "Y", + "baseName": "Y", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AreaSize.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/authenticatedData.ts b/src/typings/cloudDevice/authenticatedData.ts new file mode 100644 index 000000000..46440efc1 --- /dev/null +++ b/src/typings/cloudDevice/authenticatedData.ts @@ -0,0 +1,80 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmIdentifier } from './algorithmIdentifier'; +import { EncapsulatedContent } from './encapsulatedContent'; + +export class AuthenticatedData { + 'EncapsulatedContent': EncapsulatedContent; + 'KeyTransportOrKEK'?: Array; + 'MAC': any | null; + 'MACAlgorithm': AlgorithmIdentifier; + 'Version'?: AuthenticatedData.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EncapsulatedContent", + "baseName": "EncapsulatedContent", + "type": "EncapsulatedContent" + }, + { + "name": "KeyTransportOrKEK", + "baseName": "KeyTransportOrKEK", + "type": "Array" + }, + { + "name": "MAC", + "baseName": "MAC", + "type": "any" + }, + { + "name": "MACAlgorithm", + "baseName": "MACAlgorithm", + "type": "AlgorithmIdentifier" + }, + { + "name": "Version", + "baseName": "Version", + "type": "AuthenticatedData.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return AuthenticatedData.attributeTypeMap; + } +} + +export namespace AuthenticatedData { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/authenticationMethodType.ts b/src/typings/cloudDevice/authenticationMethodType.ts new file mode 100644 index 000000000..d9e751a33 --- /dev/null +++ b/src/typings/cloudDevice/authenticationMethodType.ts @@ -0,0 +1,40 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum AuthenticationMethodType { + Bypass = 'Bypass', + ManualVerification = 'ManualVerification', + MerchantAuthentication = 'MerchantAuthentication', + OfflinePin = 'OfflinePIN', + OnlinePin = 'OnlinePIN', + PaperSignature = 'PaperSignature', + SecureCertificate = 'SecureCertificate', + SecureNoCertificate = 'SecureNoCertificate', + SecuredChannel = 'SecuredChannel', + SignatureCapture = 'SignatureCapture', + UnknownMethod = 'UnknownMethod' +} diff --git a/src/typings/cloudDevice/balanceInquiryRequest.ts b/src/typings/cloudDevice/balanceInquiryRequest.ts new file mode 100644 index 000000000..d266f7e01 --- /dev/null +++ b/src/typings/cloudDevice/balanceInquiryRequest.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountReq } from './loyaltyAccountReq'; +import { PaymentAccountReq } from './paymentAccountReq'; + +export class BalanceInquiryRequest { + 'LoyaltyAccountReq'?: LoyaltyAccountReq; + 'PaymentAccountReq'?: PaymentAccountReq; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyAccountReq", + "baseName": "LoyaltyAccountReq", + "type": "LoyaltyAccountReq" + }, + { + "name": "PaymentAccountReq", + "baseName": "PaymentAccountReq", + "type": "PaymentAccountReq" + } ]; + + static getAttributeTypeMap() { + return BalanceInquiryRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/balanceInquiryResponse.ts b/src/typings/cloudDevice/balanceInquiryResponse.ts new file mode 100644 index 000000000..164e2d25b --- /dev/null +++ b/src/typings/cloudDevice/balanceInquiryResponse.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountStatus } from './loyaltyAccountStatus'; +import { PaymentAccountStatus } from './paymentAccountStatus'; +import { Response } from './response'; + +export class BalanceInquiryResponse { + 'LoyaltyAccountStatus'?: LoyaltyAccountStatus; + 'PaymentAccountStatus'?: PaymentAccountStatus; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyAccountStatus", + "baseName": "LoyaltyAccountStatus", + "type": "LoyaltyAccountStatus" + }, + { + "name": "PaymentAccountStatus", + "baseName": "PaymentAccountStatus", + "type": "PaymentAccountStatus" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return BalanceInquiryResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/barcodeType.ts b/src/typings/cloudDevice/barcodeType.ts new file mode 100644 index 000000000..4b62f6c72 --- /dev/null +++ b/src/typings/cloudDevice/barcodeType.ts @@ -0,0 +1,36 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum BarcodeType { + Code128 = 'Code128', + Code25 = 'Code25', + Ean13 = 'EAN13', + Ean8 = 'EAN8', + Pdf417 = 'PDF417', + Qrcode = 'QRCODE', + Upca = 'UPCA' +} diff --git a/src/typings/cloudDevice/batchRequest.ts b/src/typings/cloudDevice/batchRequest.ts new file mode 100644 index 000000000..8499719bd --- /dev/null +++ b/src/typings/cloudDevice/batchRequest.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionToPerform } from './transactionToPerform'; + +export class BatchRequest { + 'RemoveAllFlag'?: boolean; + 'TransactionToPerform'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "RemoveAllFlag", + "baseName": "RemoveAllFlag", + "type": "boolean" + }, + { + "name": "TransactionToPerform", + "baseName": "TransactionToPerform", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return BatchRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/batchResponse.ts b/src/typings/cloudDevice/batchResponse.ts new file mode 100644 index 000000000..1d6e1a30b --- /dev/null +++ b/src/typings/cloudDevice/batchResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { PerformedTransaction } from './performedTransaction'; +import { Response } from './response'; + +export class BatchResponse { + 'PerformedTransaction'?: Array; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "PerformedTransaction", + "baseName": "PerformedTransaction", + "type": "Array" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return BatchResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/capturedSignature.ts b/src/typings/cloudDevice/capturedSignature.ts new file mode 100644 index 000000000..9cf27fa31 --- /dev/null +++ b/src/typings/cloudDevice/capturedSignature.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AreaSize } from './areaSize'; +import { SignaturePoint } from './signaturePoint'; + +export class CapturedSignature { + 'AreaSize'?: AreaSize; + 'SignaturePoint': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AreaSize", + "baseName": "AreaSize", + "type": "AreaSize" + }, + { + "name": "SignaturePoint", + "baseName": "SignaturePoint", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CapturedSignature.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardAcquisitionRequest.ts b/src/typings/cloudDevice/cardAcquisitionRequest.ts new file mode 100644 index 000000000..723f939d7 --- /dev/null +++ b/src/typings/cloudDevice/cardAcquisitionRequest.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CardAcquisitionTransaction } from './cardAcquisitionTransaction'; +import { SaleData } from './saleData'; + +export class CardAcquisitionRequest { + 'CardAcquisitionTransaction': CardAcquisitionTransaction; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardAcquisitionTransaction", + "baseName": "CardAcquisitionTransaction", + "type": "CardAcquisitionTransaction" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return CardAcquisitionRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardAcquisitionResponse.ts b/src/typings/cloudDevice/cardAcquisitionResponse.ts new file mode 100644 index 000000000..2b617c4bd --- /dev/null +++ b/src/typings/cloudDevice/cardAcquisitionResponse.ts @@ -0,0 +1,86 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CustomerOrder } from './customerOrder'; +import { LoyaltyAccount } from './loyaltyAccount'; +import { POIData } from './pOIData'; +import { PaymentInstrumentData } from './paymentInstrumentData'; +import { Response } from './response'; +import { SaleData } from './saleData'; + +export class CardAcquisitionResponse { + 'CustomerOrder'?: Array; + 'LoyaltyAccount'?: Array; + 'PaymentBrand'?: Array; + 'PaymentInstrumentData'?: PaymentInstrumentData; + 'POIData': POIData; + 'Response': Response; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerOrder", + "baseName": "CustomerOrder", + "type": "Array" + }, + { + "name": "LoyaltyAccount", + "baseName": "LoyaltyAccount", + "type": "Array" + }, + { + "name": "PaymentBrand", + "baseName": "PaymentBrand", + "type": "Array" + }, + { + "name": "PaymentInstrumentData", + "baseName": "PaymentInstrumentData", + "type": "PaymentInstrumentData" + }, + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return CardAcquisitionResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardAcquisitionTransaction.ts b/src/typings/cloudDevice/cardAcquisitionTransaction.ts new file mode 100644 index 000000000..877e6a05b --- /dev/null +++ b/src/typings/cloudDevice/cardAcquisitionTransaction.ts @@ -0,0 +1,128 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class CardAcquisitionTransaction { + 'AllowedLoyaltyBrand'?: Array; + 'AllowedPaymentBrand'?: Array; + 'CashBackFlag'?: boolean; + 'CustomerLanguage'?: string; + 'ForceCustomerSelectionFlag'?: boolean; + 'ForceEntryMode'?: Array; + 'LoyaltyHandling'?: CardAcquisitionTransaction.LoyaltyHandlingEnum; + 'PaymentType'?: CardAcquisitionTransaction.PaymentTypeEnum; + 'TotalAmount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AllowedLoyaltyBrand", + "baseName": "AllowedLoyaltyBrand", + "type": "Array" + }, + { + "name": "AllowedPaymentBrand", + "baseName": "AllowedPaymentBrand", + "type": "Array" + }, + { + "name": "CashBackFlag", + "baseName": "CashBackFlag", + "type": "boolean" + }, + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "ForceCustomerSelectionFlag", + "baseName": "ForceCustomerSelectionFlag", + "type": "boolean" + }, + { + "name": "ForceEntryMode", + "baseName": "ForceEntryMode", + "type": "Array" + }, + { + "name": "LoyaltyHandling", + "baseName": "LoyaltyHandling", + "type": "CardAcquisitionTransaction.LoyaltyHandlingEnum" + }, + { + "name": "PaymentType", + "baseName": "PaymentType", + "type": "CardAcquisitionTransaction.PaymentTypeEnum" + }, + { + "name": "TotalAmount", + "baseName": "TotalAmount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CardAcquisitionTransaction.attributeTypeMap; + } +} + +export namespace CardAcquisitionTransaction { + export enum ForceEntryModeEnum { + CheckReader = 'CheckReader', + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } + export enum LoyaltyHandlingEnum { + Allowed = 'Allowed', + Forbidden = 'Forbidden', + Processed = 'Processed', + Proposed = 'Proposed', + Required = 'Required' + } + export enum PaymentTypeEnum { + CashAdvance = 'CashAdvance', + CashDeposit = 'CashDeposit', + Completion = 'Completion', + FirstReservation = 'FirstReservation', + Instalment = 'Instalment', + IssuerInstalment = 'IssuerInstalment', + Normal = 'Normal', + OneTimeReservation = 'OneTimeReservation', + PaidOut = 'PaidOut', + Recurring = 'Recurring', + Refund = 'Refund', + UpdateReservation = 'UpdateReservation' + } +} diff --git a/src/typings/cloudDevice/cardData.ts b/src/typings/cloudDevice/cardData.ts new file mode 100644 index 000000000..768d05695 --- /dev/null +++ b/src/typings/cloudDevice/cardData.ts @@ -0,0 +1,124 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AllowedProduct } from './allowedProduct'; +import { ContentInformation } from './contentInformation'; +import { CustomerOrder } from './customerOrder'; +import { PaymentToken } from './paymentToken'; +import { SensitiveCardData } from './sensitiveCardData'; + +export class CardData { + 'AllowedProduct'?: Array; + 'AllowedProductCode'?: Array; + 'CardCountryCode'?: string; + 'CustomerOrder'?: Array; + 'EntryMode'?: Array; + 'MaskedPan'?: string; + 'PaymentAccountRef'?: string; + 'PaymentBrand'?: string; + 'PaymentToken'?: PaymentToken; + 'ProtectedCardData'?: ContentInformation; + 'SensitiveCardData'?: SensitiveCardData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AllowedProduct", + "baseName": "AllowedProduct", + "type": "Array" + }, + { + "name": "AllowedProductCode", + "baseName": "AllowedProductCode", + "type": "Array" + }, + { + "name": "CardCountryCode", + "baseName": "CardCountryCode", + "type": "string" + }, + { + "name": "CustomerOrder", + "baseName": "CustomerOrder", + "type": "Array" + }, + { + "name": "EntryMode", + "baseName": "EntryMode", + "type": "Array" + }, + { + "name": "MaskedPan", + "baseName": "MaskedPan", + "type": "string" + }, + { + "name": "PaymentAccountRef", + "baseName": "PaymentAccountRef", + "type": "string" + }, + { + "name": "PaymentBrand", + "baseName": "PaymentBrand", + "type": "string" + }, + { + "name": "PaymentToken", + "baseName": "PaymentToken", + "type": "PaymentToken" + }, + { + "name": "ProtectedCardData", + "baseName": "ProtectedCardData", + "type": "ContentInformation" + }, + { + "name": "SensitiveCardData", + "baseName": "SensitiveCardData", + "type": "SensitiveCardData" + } ]; + + static getAttributeTypeMap() { + return CardData.attributeTypeMap; + } +} + +export namespace CardData { + export enum EntryModeEnum { + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Mobile = 'Mobile', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } +} diff --git a/src/typings/cloudDevice/cardReaderAPDURequest.ts b/src/typings/cloudDevice/cardReaderAPDURequest.ts new file mode 100644 index 000000000..d74b23634 --- /dev/null +++ b/src/typings/cloudDevice/cardReaderAPDURequest.ts @@ -0,0 +1,74 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class CardReaderAPDURequest { + 'APDUClass': any | null; + 'APDUData'?: any | null; + 'APDUExpectedLength'?: any | null; + 'APDUInstruction': any | null; + 'APDUPar1': any | null; + 'APDUPar2': any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "APDUClass", + "baseName": "APDUClass", + "type": "any" + }, + { + "name": "APDUData", + "baseName": "APDUData", + "type": "any" + }, + { + "name": "APDUExpectedLength", + "baseName": "APDUExpectedLength", + "type": "any" + }, + { + "name": "APDUInstruction", + "baseName": "APDUInstruction", + "type": "any" + }, + { + "name": "APDUPar1", + "baseName": "APDUPar1", + "type": "any" + }, + { + "name": "APDUPar2", + "baseName": "APDUPar2", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return CardReaderAPDURequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardReaderAPDUResponse.ts b/src/typings/cloudDevice/cardReaderAPDUResponse.ts new file mode 100644 index 000000000..4f1b33d9d --- /dev/null +++ b/src/typings/cloudDevice/cardReaderAPDUResponse.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class CardReaderAPDUResponse { + 'APDUData'?: any | null; + 'CardStatusWords': any | null; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "APDUData", + "baseName": "APDUData", + "type": "any" + }, + { + "name": "CardStatusWords", + "baseName": "CardStatusWords", + "type": "any" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return CardReaderAPDUResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardReaderInitRequest.ts b/src/typings/cloudDevice/cardReaderInitRequest.ts new file mode 100644 index 000000000..56e526f58 --- /dev/null +++ b/src/typings/cloudDevice/cardReaderInitRequest.ts @@ -0,0 +1,84 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; + +export class CardReaderInitRequest { + 'DisplayOutput'?: DisplayOutput; + 'ForceEntryMode'?: Array; + 'LeaveCardFlag'?: boolean; + 'MaxWaitingTime'?: number; + 'WarmResetFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "ForceEntryMode", + "baseName": "ForceEntryMode", + "type": "Array" + }, + { + "name": "LeaveCardFlag", + "baseName": "LeaveCardFlag", + "type": "boolean" + }, + { + "name": "MaxWaitingTime", + "baseName": "MaxWaitingTime", + "type": "number" + }, + { + "name": "WarmResetFlag", + "baseName": "WarmResetFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return CardReaderInitRequest.attributeTypeMap; + } +} + +export namespace CardReaderInitRequest { + export enum ForceEntryModeEnum { + CheckReader = 'CheckReader', + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } +} diff --git a/src/typings/cloudDevice/cardReaderInitResponse.ts b/src/typings/cloudDevice/cardReaderInitResponse.ts new file mode 100644 index 000000000..dddd4994c --- /dev/null +++ b/src/typings/cloudDevice/cardReaderInitResponse.ts @@ -0,0 +1,80 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ICCResetData } from './iCCResetData'; +import { Response } from './response'; +import { TrackData } from './trackData'; + +export class CardReaderInitResponse { + 'EntryMode'?: Array; + 'ICCResetData'?: ICCResetData; + 'Response': Response; + 'TrackData'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EntryMode", + "baseName": "EntryMode", + "type": "Array" + }, + { + "name": "ICCResetData", + "baseName": "ICCResetData", + "type": "ICCResetData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "TrackData", + "baseName": "TrackData", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CardReaderInitResponse.attributeTypeMap; + } +} + +export namespace CardReaderInitResponse { + export enum EntryModeEnum { + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Mobile = 'Mobile', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } +} diff --git a/src/typings/cloudDevice/cardReaderPowerOffRequest.ts b/src/typings/cloudDevice/cardReaderPowerOffRequest.ts new file mode 100644 index 000000000..3539e0a7c --- /dev/null +++ b/src/typings/cloudDevice/cardReaderPowerOffRequest.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; + +export class CardReaderPowerOffRequest { + 'DisplayOutput'?: DisplayOutput; + 'MaxWaitingTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "MaxWaitingTime", + "baseName": "MaxWaitingTime", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CardReaderPowerOffRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardReaderPowerOffResponse.ts b/src/typings/cloudDevice/cardReaderPowerOffResponse.ts new file mode 100644 index 000000000..f509762f5 --- /dev/null +++ b/src/typings/cloudDevice/cardReaderPowerOffResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class CardReaderPowerOffResponse { + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return CardReaderPowerOffResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cardholderPIN.ts b/src/typings/cloudDevice/cardholderPIN.ts new file mode 100644 index 000000000..dbe7e8621 --- /dev/null +++ b/src/typings/cloudDevice/cardholderPIN.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ContentInformation } from './contentInformation'; +import { PINFormatType } from './pINFormatType'; + +export class CardholderPIN { + 'AdditionalInput'?: string; + 'EncrPINBlock': ContentInformation; + 'PINFormat': PINFormatType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdditionalInput", + "baseName": "AdditionalInput", + "type": "string" + }, + { + "name": "EncrPINBlock", + "baseName": "EncrPINBlock", + "type": "ContentInformation" + }, + { + "name": "PINFormat", + "baseName": "PINFormat", + "type": "PINFormatType" + } ]; + + static getAttributeTypeMap() { + return CardholderPIN.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cashHandlingDevice.ts b/src/typings/cloudDevice/cashHandlingDevice.ts new file mode 100644 index 000000000..269586eba --- /dev/null +++ b/src/typings/cloudDevice/cashHandlingDevice.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CoinsOrBills } from './coinsOrBills'; + +export class CashHandlingDevice { + 'CashHandlingOkFlag': boolean; + 'CoinsOrBills': Array; + 'Currency': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CashHandlingOkFlag", + "baseName": "CashHandlingOkFlag", + "type": "boolean" + }, + { + "name": "CoinsOrBills", + "baseName": "CoinsOrBills", + "type": "Array" + }, + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CashHandlingDevice.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/characterHeightType.ts b/src/typings/cloudDevice/characterHeightType.ts new file mode 100644 index 000000000..a1ce4408d --- /dev/null +++ b/src/typings/cloudDevice/characterHeightType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum CharacterHeightType { + DoubleHeight = 'DoubleHeight', + HalfHeight = 'HalfHeight', + SingleHeight = 'SingleHeight' +} diff --git a/src/typings/cloudDevice/characterStyleType.ts b/src/typings/cloudDevice/characterStyleType.ts new file mode 100644 index 000000000..735be1f1c --- /dev/null +++ b/src/typings/cloudDevice/characterStyleType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum CharacterStyleType { + Bold = 'Bold', + Italic = 'Italic', + Normal = 'Normal', + Underlined = 'Underlined' +} diff --git a/src/typings/cloudDevice/characterWidthType.ts b/src/typings/cloudDevice/characterWidthType.ts new file mode 100644 index 000000000..b1c6c97d2 --- /dev/null +++ b/src/typings/cloudDevice/characterWidthType.ts @@ -0,0 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum CharacterWidthType { + DoubleWidth = 'DoubleWidth', + SingleWidth = 'SingleWidth' +} diff --git a/src/typings/cloudDevice/checkData.ts b/src/typings/cloudDevice/checkData.ts new file mode 100644 index 000000000..dcc061d93 --- /dev/null +++ b/src/typings/cloudDevice/checkData.ts @@ -0,0 +1,87 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TrackData } from './trackData'; + +export class CheckData { + 'AccountNumber'?: string; + 'BankID'?: string; + 'CheckCardNumber'?: string; + 'CheckNumber'?: string; + 'Country'?: string; + 'TrackData'?: TrackData; + 'TypeCode'?: CheckData.TypeCodeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AccountNumber", + "baseName": "AccountNumber", + "type": "string" + }, + { + "name": "BankID", + "baseName": "BankID", + "type": "string" + }, + { + "name": "CheckCardNumber", + "baseName": "CheckCardNumber", + "type": "string" + }, + { + "name": "CheckNumber", + "baseName": "CheckNumber", + "type": "string" + }, + { + "name": "Country", + "baseName": "Country", + "type": "string" + }, + { + "name": "TrackData", + "baseName": "TrackData", + "type": "TrackData" + }, + { + "name": "TypeCode", + "baseName": "TypeCode", + "type": "CheckData.TypeCodeEnum" + } ]; + + static getAttributeTypeMap() { + return CheckData.attributeTypeMap; + } +} + +export namespace CheckData { + export enum TypeCodeEnum { + Company = 'Company', + Personal = 'Personal' + } +} diff --git a/src/typings/cloudDevice/checkTypeCodeType.ts b/src/typings/cloudDevice/checkTypeCodeType.ts new file mode 100644 index 000000000..9f102b70e --- /dev/null +++ b/src/typings/cloudDevice/checkTypeCodeType.ts @@ -0,0 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum CheckTypeCodeType { + Company = 'Company', + Personal = 'Personal' +} diff --git a/src/typings/cloudDevice/cloudDeviceApiRequest.ts b/src/typings/cloudDevice/cloudDeviceApiRequest.ts new file mode 100644 index 000000000..7ffbaccb3 --- /dev/null +++ b/src/typings/cloudDevice/cloudDeviceApiRequest.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleToPOIRequest } from './saleToPOIRequest'; + +export class CloudDeviceApiRequest { + 'SaleToPOIRequest': SaleToPOIRequest; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleToPOIRequest", + "baseName": "SaleToPOIRequest", + "type": "SaleToPOIRequest" + } ]; + + static getAttributeTypeMap() { + return CloudDeviceApiRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cloudDeviceApiResponse.ts b/src/typings/cloudDevice/cloudDeviceApiResponse.ts new file mode 100644 index 000000000..ca49bc8aa --- /dev/null +++ b/src/typings/cloudDevice/cloudDeviceApiResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2022 Adyen N.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Terminal API + * Definition of Terminal API Schema + * + */ + + +import { SaleToPOIResponse } from './saleToPOIResponse'; +import {SaleToPOIRequest} from "./saleToPOIRequest"; + +export class CloudDeviceApiResponse { + 'SaleToPOIResponse'?: SaleToPOIResponse; + 'SaleToPOIRequest'?: SaleToPOIRequest; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleToPOIResponse", + "baseName": "SaleToPOIResponse", + "type": "SaleToPOIResponse" + }, + { + "name": "SaleToPOIRequest", + "baseName": "SaleToPOIRequest", + "type": "SaleToPOIRequest" + }]; + + static getAttributeTypeMap() { + return CloudDeviceApiResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cloudDeviceApiSecuredRequest.ts b/src/typings/cloudDevice/cloudDeviceApiSecuredRequest.ts new file mode 100644 index 000000000..6aed97e17 --- /dev/null +++ b/src/typings/cloudDevice/cloudDeviceApiSecuredRequest.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleToPOISecuredMessage } from './saleToPOISecuredMessage'; + +export class CloudDeviceApiSecuredRequest { + 'SaleToPOIRequest'?: SaleToPOISecuredMessage; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleToPOIRequest", + "baseName": "SaleToPOIRequest", + "type": "SaleToPOISecuredMessage" + } ]; + + static getAttributeTypeMap() { + return CloudDeviceApiSecuredRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/cloudDeviceApiSecuredResponse.ts b/src/typings/cloudDevice/cloudDeviceApiSecuredResponse.ts new file mode 100644 index 000000000..7fca88b49 --- /dev/null +++ b/src/typings/cloudDevice/cloudDeviceApiSecuredResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleToPOISecuredMessage } from './saleToPOISecuredMessage'; + +export class CloudDeviceApiSecuredResponse { + 'SaleToPOIResponse': SaleToPOISecuredMessage; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleToPOIResponse", + "baseName": "SaleToPOIResponse", + "type": "SaleToPOISecuredMessage" + } ]; + + static getAttributeTypeMap() { + return CloudDeviceApiSecuredResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/coinsOrBills.ts b/src/typings/cloudDevice/coinsOrBills.ts new file mode 100644 index 000000000..00ea58cc8 --- /dev/null +++ b/src/typings/cloudDevice/coinsOrBills.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class CoinsOrBills { + 'Number': number; + 'UnitValue': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Number", + "baseName": "Number", + "type": "number" + }, + { + "name": "UnitValue", + "baseName": "UnitValue", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CoinsOrBills.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/colorType.ts b/src/typings/cloudDevice/colorType.ts new file mode 100644 index 000000000..a3f41b682 --- /dev/null +++ b/src/typings/cloudDevice/colorType.ts @@ -0,0 +1,37 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ColorType { + Black = 'Black', + Blue = 'Blue', + Cyan = 'Cyan', + Green = 'Green', + Magenta = 'Magenta', + Red = 'Red', + White = 'White', + Yellow = 'Yellow' +} diff --git a/src/typings/cloudDevice/commonField.ts b/src/typings/cloudDevice/commonField.ts new file mode 100644 index 000000000..cb0671525 --- /dev/null +++ b/src/typings/cloudDevice/commonField.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class CommonField { + 'name'?: string; + 'version'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CommonField.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/connectedDevicesResponse.ts b/src/typings/cloudDevice/connectedDevicesResponse.ts new file mode 100644 index 000000000..34037f239 --- /dev/null +++ b/src/typings/cloudDevice/connectedDevicesResponse.ts @@ -0,0 +1,43 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + +export class ConnectedDevicesResponse { + /** + * The list of connected devices. + */ + 'uniqueDeviceIds'?: string[]; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "uniqueDeviceIds", + "baseName": "uniqueDeviceIds", + "type": "Array" + } + ]; + + static getAttributeTypeMap() { + return ConnectedDevicesResponse.attributeTypeMap; + } +} \ No newline at end of file diff --git a/src/typings/cloudDevice/contentInformation.ts b/src/typings/cloudDevice/contentInformation.ts new file mode 100644 index 000000000..5862b212c --- /dev/null +++ b/src/typings/cloudDevice/contentInformation.ts @@ -0,0 +1,80 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AuthenticatedData } from './authenticatedData'; +import { ContentType } from './contentType'; +import { DigestedData } from './digestedData'; +import { EnvelopedData } from './envelopedData'; +import { NamedKeyEncryptedData } from './namedKeyEncryptedData'; +import { SignedData } from './signedData'; + +export class ContentInformation { + 'AuthenticatedData'?: AuthenticatedData; + 'ContentType': ContentType; + 'DigestedData'?: DigestedData; + 'EnvelopedData'?: EnvelopedData; + 'NamedKeyEncryptedData'?: NamedKeyEncryptedData; + 'SignedData'?: SignedData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AuthenticatedData", + "baseName": "AuthenticatedData", + "type": "AuthenticatedData" + }, + { + "name": "ContentType", + "baseName": "ContentType", + "type": "ContentType" + }, + { + "name": "DigestedData", + "baseName": "DigestedData", + "type": "DigestedData" + }, + { + "name": "EnvelopedData", + "baseName": "EnvelopedData", + "type": "EnvelopedData" + }, + { + "name": "NamedKeyEncryptedData", + "baseName": "NamedKeyEncryptedData", + "type": "NamedKeyEncryptedData" + }, + { + "name": "SignedData", + "baseName": "SignedData", + "type": "SignedData" + } ]; + + static getAttributeTypeMap() { + return ContentInformation.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/contentType.ts b/src/typings/cloudDevice/contentType.ts new file mode 100644 index 000000000..a36194a0f --- /dev/null +++ b/src/typings/cloudDevice/contentType.ts @@ -0,0 +1,35 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ContentType { + CtAuthData = 'Id-ct-authData', + Data = 'Id-data', + DigestedData = 'Id-digestedData', + EncryptedData = 'Id-encryptedData', + EnvelopedData = 'Id-envelopedData', + SignedData = 'Id-signedData' +} diff --git a/src/typings/cloudDevice/currencyConversion.ts b/src/typings/cloudDevice/currencyConversion.ts new file mode 100644 index 000000000..ff26f070e --- /dev/null +++ b/src/typings/cloudDevice/currencyConversion.ts @@ -0,0 +1,75 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Amount } from './amount'; + +export class CurrencyConversion { + 'Commission'?: number; + 'ConvertedAmount': Amount; + 'CustomerApprovedFlag'?: boolean; + 'Declaration'?: string; + 'Markup'?: number; + 'Rate'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Commission", + "baseName": "Commission", + "type": "number" + }, + { + "name": "ConvertedAmount", + "baseName": "ConvertedAmount", + "type": "Amount" + }, + { + "name": "CustomerApprovedFlag", + "baseName": "CustomerApprovedFlag", + "type": "boolean" + }, + { + "name": "Declaration", + "baseName": "Declaration", + "type": "string" + }, + { + "name": "Markup", + "baseName": "Markup", + "type": "number" + }, + { + "name": "Rate", + "baseName": "Rate", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return CurrencyConversion.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/customerOrder.ts b/src/typings/cloudDevice/customerOrder.ts new file mode 100644 index 000000000..6a229e109 --- /dev/null +++ b/src/typings/cloudDevice/customerOrder.ts @@ -0,0 +1,92 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class CustomerOrder { + 'AccessedBy'?: string; + 'AdditionalInformation'?: string; + 'Currency'?: string; + 'CurrentAmount': number; + 'CustomerOrderID': string; + 'EndDate'?: { [key: string]: any; }; + 'ForecastedAmount': number; + 'OpenOrderState'?: boolean; + 'StartDate': { [key: string]: any; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AccessedBy", + "baseName": "AccessedBy", + "type": "string" + }, + { + "name": "AdditionalInformation", + "baseName": "AdditionalInformation", + "type": "string" + }, + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "CurrentAmount", + "baseName": "CurrentAmount", + "type": "number" + }, + { + "name": "CustomerOrderID", + "baseName": "CustomerOrderID", + "type": "string" + }, + { + "name": "EndDate", + "baseName": "EndDate", + "type": "{ [key: string]: any; }" + }, + { + "name": "ForecastedAmount", + "baseName": "ForecastedAmount", + "type": "number" + }, + { + "name": "OpenOrderState", + "baseName": "OpenOrderState", + "type": "boolean" + }, + { + "name": "StartDate", + "baseName": "StartDate", + "type": "{ [key: string]: any; }" + } ]; + + static getAttributeTypeMap() { + return CustomerOrder.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/customerOrderReqType.ts b/src/typings/cloudDevice/customerOrderReqType.ts new file mode 100644 index 000000000..94f556a0e --- /dev/null +++ b/src/typings/cloudDevice/customerOrderReqType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum CustomerOrderReqType { + Both = 'Both', + Closed = 'Closed', + Open = 'Open' +} diff --git a/src/typings/cloudDevice/deviceStatusResponse.ts b/src/typings/cloudDevice/deviceStatusResponse.ts new file mode 100644 index 000000000..04ee9ba8a --- /dev/null +++ b/src/typings/cloudDevice/deviceStatusResponse.ts @@ -0,0 +1,60 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + +export class DeviceStatusResponse { + /** + * The id of the device + */ + 'deviceId'?: string; + + /** + * The status of the device + */ + 'status'?: DeviceStatusResponse.StatusEnum; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "deviceId", + "baseName": "deviceId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "DeviceStatusResponse.StatusEnum" + } + ]; + + static getAttributeTypeMap() { + return DeviceStatusResponse.attributeTypeMap; + } +} + +export namespace DeviceStatusResponse { + export enum StatusEnum { + ONLINE = "ONLINE", + OFFLINE = "OFFLINE" + } +} \ No newline at end of file diff --git a/src/typings/cloudDevice/deviceType.ts b/src/typings/cloudDevice/deviceType.ts new file mode 100644 index 000000000..afae8d7d2 --- /dev/null +++ b/src/typings/cloudDevice/deviceType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum DeviceType { + CashierDisplay = 'CashierDisplay', + CashierInput = 'CashierInput', + CustomerDisplay = 'CustomerDisplay', + CustomerInput = 'CustomerInput' +} diff --git a/src/typings/cloudDevice/diagnosisRequest.ts b/src/typings/cloudDevice/diagnosisRequest.ts new file mode 100644 index 000000000..ed6e4d090 --- /dev/null +++ b/src/typings/cloudDevice/diagnosisRequest.ts @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class DiagnosisRequest { + 'AcquirerID'?: Array; + 'HostDiagnosisFlag'?: boolean; + 'POIID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "Array" + }, + { + "name": "HostDiagnosisFlag", + "baseName": "HostDiagnosisFlag", + "type": "boolean" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DiagnosisRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/diagnosisResponse.ts b/src/typings/cloudDevice/diagnosisResponse.ts new file mode 100644 index 000000000..a4ca7ceab --- /dev/null +++ b/src/typings/cloudDevice/diagnosisResponse.ts @@ -0,0 +1,65 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { HostStatus } from './hostStatus'; +import { POIStatus } from './pOIStatus'; +import { Response } from './response'; + +export class DiagnosisResponse { + 'HostStatus'?: Array; + 'LoggedSaleID'?: Array; + 'POIStatus'?: POIStatus; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "HostStatus", + "baseName": "HostStatus", + "type": "Array" + }, + { + "name": "LoggedSaleID", + "baseName": "LoggedSaleID", + "type": "Array" + }, + { + "name": "POIStatus", + "baseName": "POIStatus", + "type": "POIStatus" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return DiagnosisResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/digestedData.ts b/src/typings/cloudDevice/digestedData.ts new file mode 100644 index 000000000..156b9af97 --- /dev/null +++ b/src/typings/cloudDevice/digestedData.ts @@ -0,0 +1,74 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmIdentifier } from './algorithmIdentifier'; +import { EncapsulatedContent } from './encapsulatedContent'; + +export class DigestedData { + 'Digest': any | null; + 'DigestAlgorithm': AlgorithmIdentifier; + 'EncapsulatedContent': EncapsulatedContent; + 'Version'?: DigestedData.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Digest", + "baseName": "Digest", + "type": "any" + }, + { + "name": "DigestAlgorithm", + "baseName": "DigestAlgorithm", + "type": "AlgorithmIdentifier" + }, + { + "name": "EncapsulatedContent", + "baseName": "EncapsulatedContent", + "type": "EncapsulatedContent" + }, + { + "name": "Version", + "baseName": "Version", + "type": "DigestedData.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return DigestedData.attributeTypeMap; + } +} + +export namespace DigestedData { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/displayOutput.ts b/src/typings/cloudDevice/displayOutput.ts new file mode 100644 index 000000000..eeb16c8ad --- /dev/null +++ b/src/typings/cloudDevice/displayOutput.ts @@ -0,0 +1,84 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DeviceType } from './deviceType'; +import { InfoQualifyType } from './infoQualifyType'; +import { MenuEntry } from './menuEntry'; +import { OutputContent } from './outputContent'; + +export class DisplayOutput { + 'Device': DeviceType; + 'InfoQualify': InfoQualifyType; + 'MenuEntry'?: Array; + 'MinimumDisplayTime'?: number; + 'OutputContent': OutputContent; + 'OutputSignature'?: any | null; + 'ResponseRequiredFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Device", + "baseName": "Device", + "type": "DeviceType" + }, + { + "name": "InfoQualify", + "baseName": "InfoQualify", + "type": "InfoQualifyType" + }, + { + "name": "MenuEntry", + "baseName": "MenuEntry", + "type": "Array" + }, + { + "name": "MinimumDisplayTime", + "baseName": "MinimumDisplayTime", + "type": "number" + }, + { + "name": "OutputContent", + "baseName": "OutputContent", + "type": "OutputContent" + }, + { + "name": "OutputSignature", + "baseName": "OutputSignature", + "type": "any" + }, + { + "name": "ResponseRequiredFlag", + "baseName": "ResponseRequiredFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return DisplayOutput.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/displayRequest.ts b/src/typings/cloudDevice/displayRequest.ts new file mode 100644 index 000000000..18514a457 --- /dev/null +++ b/src/typings/cloudDevice/displayRequest.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; + +export class DisplayRequest { + 'DisplayOutput': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DisplayRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/displayResponse.ts b/src/typings/cloudDevice/displayResponse.ts new file mode 100644 index 000000000..456a77257 --- /dev/null +++ b/src/typings/cloudDevice/displayResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { OutputResult } from './outputResult'; + +export class DisplayResponse { + 'OutputResult': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "OutputResult", + "baseName": "OutputResult", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DisplayResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/documentQualifierType.ts b/src/typings/cloudDevice/documentQualifierType.ts new file mode 100644 index 000000000..800b5fc45 --- /dev/null +++ b/src/typings/cloudDevice/documentQualifierType.ts @@ -0,0 +1,35 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum DocumentQualifierType { + CashierReceipt = 'CashierReceipt', + CustomerReceipt = 'CustomerReceipt', + Document = 'Document', + Journal = 'Journal', + SaleReceipt = 'SaleReceipt', + Voucher = 'Voucher' +} diff --git a/src/typings/cloudDevice/enableServiceRequest.ts b/src/typings/cloudDevice/enableServiceRequest.ts new file mode 100644 index 000000000..462a7293a --- /dev/null +++ b/src/typings/cloudDevice/enableServiceRequest.ts @@ -0,0 +1,65 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; +import { TransactionActionType } from './transactionActionType'; + +export class EnableServiceRequest { + 'DisplayOutput'?: DisplayOutput; + 'ServicesEnabled'?: Array; + 'TransactionAction': TransactionActionType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "ServicesEnabled", + "baseName": "ServicesEnabled", + "type": "Array" + }, + { + "name": "TransactionAction", + "baseName": "TransactionAction", + "type": "TransactionActionType" + } ]; + + static getAttributeTypeMap() { + return EnableServiceRequest.attributeTypeMap; + } +} + +export namespace EnableServiceRequest { + export enum ServicesEnabledEnum { + CardAcquisition = 'CardAcquisition', + Loyalty = 'Loyalty', + Payment = 'Payment' + } +} diff --git a/src/typings/cloudDevice/enableServiceResponse.ts b/src/typings/cloudDevice/enableServiceResponse.ts new file mode 100644 index 000000000..6af694148 --- /dev/null +++ b/src/typings/cloudDevice/enableServiceResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class EnableServiceResponse { + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return EnableServiceResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/encapsulatedContent.ts b/src/typings/cloudDevice/encapsulatedContent.ts new file mode 100644 index 000000000..224ec1ad5 --- /dev/null +++ b/src/typings/cloudDevice/encapsulatedContent.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ContentType } from './contentType'; + +export class EncapsulatedContent { + 'Content'?: any | null; + 'ContentType': ContentType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Content", + "baseName": "Content", + "type": "any" + }, + { + "name": "ContentType", + "baseName": "ContentType", + "type": "ContentType" + } ]; + + static getAttributeTypeMap() { + return EncapsulatedContent.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/encryptedContent.ts b/src/typings/cloudDevice/encryptedContent.ts new file mode 100644 index 000000000..f289544a0 --- /dev/null +++ b/src/typings/cloudDevice/encryptedContent.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmIdentifier } from './algorithmIdentifier'; +import { ContentType } from './contentType'; + +export class EncryptedContent { + 'ContentEncryptionAlgorithm': AlgorithmIdentifier; + 'ContentType': ContentType; + 'EncryptedData': any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ContentEncryptionAlgorithm", + "baseName": "ContentEncryptionAlgorithm", + "type": "AlgorithmIdentifier" + }, + { + "name": "ContentType", + "baseName": "ContentType", + "type": "ContentType" + }, + { + "name": "EncryptedData", + "baseName": "EncryptedData", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return EncryptedContent.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/entryModeType.ts b/src/typings/cloudDevice/entryModeType.ts new file mode 100644 index 000000000..578c60fd2 --- /dev/null +++ b/src/typings/cloudDevice/entryModeType.ts @@ -0,0 +1,40 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum EntryModeType { + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Mobile = 'Mobile', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' +} diff --git a/src/typings/cloudDevice/envelopedData.ts b/src/typings/cloudDevice/envelopedData.ts new file mode 100644 index 000000000..e4a62f0cc --- /dev/null +++ b/src/typings/cloudDevice/envelopedData.ts @@ -0,0 +1,67 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { EncryptedContent } from './encryptedContent'; + +export class EnvelopedData { + 'EncryptedContent': EncryptedContent; + 'KeyTransportOrKEK'?: Array; + 'Version'?: EnvelopedData.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EncryptedContent", + "baseName": "EncryptedContent", + "type": "EncryptedContent" + }, + { + "name": "KeyTransportOrKEK", + "baseName": "KeyTransportOrKEK", + "type": "Array" + }, + { + "name": "Version", + "baseName": "Version", + "type": "EnvelopedData.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return EnvelopedData.attributeTypeMap; + } +} + +export namespace EnvelopedData { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/errorConditionType.ts b/src/typings/cloudDevice/errorConditionType.ts new file mode 100644 index 000000000..a1f9f0242 --- /dev/null +++ b/src/typings/cloudDevice/errorConditionType.ts @@ -0,0 +1,46 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ErrorConditionType { + Aborted = 'Aborted', + Busy = 'Busy', + Cancel = 'Cancel', + DeviceOut = 'DeviceOut', + InProgress = 'InProgress', + InsertedCard = 'InsertedCard', + InvalidCard = 'InvalidCard', + LoggedOut = 'LoggedOut', + MessageFormat = 'MessageFormat', + NotAllowed = 'NotAllowed', + NotFound = 'NotFound', + PaymentRestriction = 'PaymentRestriction', + Refusal = 'Refusal', + UnavailableDevice = 'UnavailableDevice', + UnavailableService = 'UnavailableService', + UnreachableHost = 'UnreachableHost', + WrongPin = 'WrongPIN' +} diff --git a/src/typings/cloudDevice/eventNotification.ts b/src/typings/cloudDevice/eventNotification.ts new file mode 100644 index 000000000..adb9cdd94 --- /dev/null +++ b/src/typings/cloudDevice/eventNotification.ts @@ -0,0 +1,82 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; +import { EventToNotifyType } from './eventToNotifyType'; + +export class EventNotification { + 'CustomerLanguage'?: string; + 'DisplayOutput'?: DisplayOutput; + 'EventDetails'?: string; + 'EventToNotify': EventToNotifyType; + 'MaintenanceRequiredFlag'?: boolean; + 'RejectedMessage'?: any | null; + 'TimeStamp': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "EventDetails", + "baseName": "EventDetails", + "type": "string" + }, + { + "name": "EventToNotify", + "baseName": "EventToNotify", + "type": "EventToNotifyType" + }, + { + "name": "MaintenanceRequiredFlag", + "baseName": "MaintenanceRequiredFlag", + "type": "boolean" + }, + { + "name": "RejectedMessage", + "baseName": "RejectedMessage", + "type": "any" + }, + { + "name": "TimeStamp", + "baseName": "TimeStamp", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return EventNotification.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/eventToNotifyType.ts b/src/typings/cloudDevice/eventToNotifyType.ts new file mode 100644 index 000000000..4905ce911 --- /dev/null +++ b/src/typings/cloudDevice/eventToNotifyType.ts @@ -0,0 +1,46 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + +export enum EventToNotifyType { + Abort = 'Abort', + BeginMaintenance = 'BeginMaintenance', + CardInserted = 'CardInserted', + CardRemoved = 'CardRemoved', + Completed = 'Completed', + CustomerLanguage = 'CustomerLanguage', + EndMaintenance = 'EndMaintenance', + Initialised = 'Initialised', + KeyPressed = 'KeyPressed', + NetworkConnected = 'NetworkConnected', + NetworkDisconnected = 'NetworkDisconnected', + OutOfOrder = 'OutOfOrder', + Reject = 'Reject', + SaleAdmin = 'SaleAdmin', + SaleWakeUp = 'SaleWakeUp', + ScanBarcodeResult = 'ScanBarcodeResult', + SecurityAlarm = 'SecurityAlarm', + Shutdown = 'Shutdown', + StopAssistance = 'StopAssistance' +} diff --git a/src/typings/cloudDevice/externalPlatform.ts b/src/typings/cloudDevice/externalPlatform.ts new file mode 100644 index 000000000..2530ee18c --- /dev/null +++ b/src/typings/cloudDevice/externalPlatform.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class ExternalPlatform { + 'name'?: string; + 'version'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "version", + "baseName": "version", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ExternalPlatform.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/forceEntryModeType.ts b/src/typings/cloudDevice/forceEntryModeType.ts new file mode 100644 index 000000000..42acebe37 --- /dev/null +++ b/src/typings/cloudDevice/forceEntryModeType.ts @@ -0,0 +1,40 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ForceEntryModeType { + CheckReader = 'CheckReader', + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' +} diff --git a/src/typings/cloudDevice/genericProfileType.ts b/src/typings/cloudDevice/genericProfileType.ts new file mode 100644 index 000000000..b4d5a30c4 --- /dev/null +++ b/src/typings/cloudDevice/genericProfileType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum GenericProfileType { + Basic = 'Basic', + Extended = 'Extended', + Standard = 'Standard' +} diff --git a/src/typings/cloudDevice/geographicCoordinates.ts b/src/typings/cloudDevice/geographicCoordinates.ts new file mode 100644 index 000000000..43b7c9312 --- /dev/null +++ b/src/typings/cloudDevice/geographicCoordinates.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class GeographicCoordinates { + 'Latitude': string; + 'Longitude': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Latitude", + "baseName": "Latitude", + "type": "string" + }, + { + "name": "Longitude", + "baseName": "Longitude", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return GeographicCoordinates.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/geolocation.ts b/src/typings/cloudDevice/geolocation.ts new file mode 100644 index 000000000..bd35d3e3e --- /dev/null +++ b/src/typings/cloudDevice/geolocation.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { GeographicCoordinates } from './geographicCoordinates'; +import { UTMCoordinates } from './uTMCoordinates'; + +export class Geolocation { + 'GeographicCoordinates'?: GeographicCoordinates; + 'UTMCoordinates'?: UTMCoordinates; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "GeographicCoordinates", + "baseName": "GeographicCoordinates", + "type": "GeographicCoordinates" + }, + { + "name": "UTMCoordinates", + "baseName": "UTMCoordinates", + "type": "UTMCoordinates" + } ]; + + static getAttributeTypeMap() { + return Geolocation.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/getTotalsRequest.ts b/src/typings/cloudDevice/getTotalsRequest.ts new file mode 100644 index 000000000..9e0d4d185 --- /dev/null +++ b/src/typings/cloudDevice/getTotalsRequest.ts @@ -0,0 +1,60 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TotalFilter } from './totalFilter'; + +export class GetTotalsRequest { + 'TotalDetails'?: Array; + 'TotalFilter'?: TotalFilter; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "TotalDetails", + "baseName": "TotalDetails", + "type": "Array" + }, + { + "name": "TotalFilter", + "baseName": "TotalFilter", + "type": "TotalFilter" + } ]; + + static getAttributeTypeMap() { + return GetTotalsRequest.attributeTypeMap; + } +} + +export namespace GetTotalsRequest { + export enum TotalDetailsEnum { + OperatorId = 'OperatorID', + Poiid = 'POIID', + SaleId = 'SaleID', + ShiftNumber = 'ShiftNumber', + TotalsGroupId = 'TotalsGroupID' + } +} diff --git a/src/typings/cloudDevice/getTotalsResponse.ts b/src/typings/cloudDevice/getTotalsResponse.ts new file mode 100644 index 000000000..883f5440f --- /dev/null +++ b/src/typings/cloudDevice/getTotalsResponse.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; +import { TransactionTotals } from './transactionTotals'; + +export class GetTotalsResponse { + 'POIReconciliationID': string; + 'Response': Response; + 'TransactionTotals'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POIReconciliationID", + "baseName": "POIReconciliationID", + "type": "string" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "TransactionTotals", + "baseName": "TransactionTotals", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return GetTotalsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/globalStatusType.ts b/src/typings/cloudDevice/globalStatusType.ts new file mode 100644 index 000000000..9fd8b0f4a --- /dev/null +++ b/src/typings/cloudDevice/globalStatusType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum GlobalStatusType { + Busy = 'Busy', + Maintenance = 'Maintenance', + Ok = 'OK', + Unreachable = 'Unreachable' +} diff --git a/src/typings/cloudDevice/hostStatus.ts b/src/typings/cloudDevice/hostStatus.ts new file mode 100644 index 000000000..ab9749775 --- /dev/null +++ b/src/typings/cloudDevice/hostStatus.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class HostStatus { + 'AcquirerID': string; + 'IsReachableFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "string" + }, + { + "name": "IsReachableFlag", + "baseName": "IsReachableFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return HostStatus.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/iCCResetData.ts b/src/typings/cloudDevice/iCCResetData.ts new file mode 100644 index 000000000..3be95b197 --- /dev/null +++ b/src/typings/cloudDevice/iCCResetData.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class ICCResetData { + 'AtrValue'?: any | null; + 'CardStatusWords'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AtrValue", + "baseName": "AtrValue", + "type": "any" + }, + { + "name": "CardStatusWords", + "baseName": "CardStatusWords", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return ICCResetData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/identificationSupportType.ts b/src/typings/cloudDevice/identificationSupportType.ts new file mode 100644 index 000000000..45c9a36ab --- /dev/null +++ b/src/typings/cloudDevice/identificationSupportType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum IdentificationSupportType { + HybridCard = 'HybridCard', + LinkedCard = 'LinkedCard', + LoyaltyCard = 'LoyaltyCard', + NoCard = 'NoCard' +} diff --git a/src/typings/cloudDevice/identificationType.ts b/src/typings/cloudDevice/identificationType.ts new file mode 100644 index 000000000..448aa02b4 --- /dev/null +++ b/src/typings/cloudDevice/identificationType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum IdentificationType { + AccountNumber = 'AccountNumber', + BarCode = 'BarCode', + IsoTrack2 = 'ISOTrack2', + Pan = 'PAN', + PhoneNumber = 'PhoneNumber' +} diff --git a/src/typings/cloudDevice/infoQualifyType.ts b/src/typings/cloudDevice/infoQualifyType.ts new file mode 100644 index 000000000..21468e727 --- /dev/null +++ b/src/typings/cloudDevice/infoQualifyType.ts @@ -0,0 +1,39 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum InfoQualifyType { + CustomerAssistance = 'CustomerAssistance', + Display = 'Display', + Document = 'Document', + Error = 'Error', + Input = 'Input', + PoiReplication = 'POIReplication', + Receipt = 'Receipt', + Sound = 'Sound', + Status = 'Status', + Voucher = 'Voucher' +} diff --git a/src/typings/cloudDevice/input.ts b/src/typings/cloudDevice/input.ts new file mode 100644 index 000000000..ddafd50d4 --- /dev/null +++ b/src/typings/cloudDevice/input.ts @@ -0,0 +1,82 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ContentInformation } from './contentInformation'; +import { InputCommandType } from './inputCommandType'; + +export class Input { + 'ConfirmedFlag'?: boolean; + 'DigitInput'?: string; + 'FunctionKey'?: string; + 'InputCommand': InputCommandType; + 'MenuEntryNumber'?: number; + 'Password'?: ContentInformation; + 'TextInput'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ConfirmedFlag", + "baseName": "ConfirmedFlag", + "type": "boolean" + }, + { + "name": "DigitInput", + "baseName": "DigitInput", + "type": "string" + }, + { + "name": "FunctionKey", + "baseName": "FunctionKey", + "type": "string" + }, + { + "name": "InputCommand", + "baseName": "InputCommand", + "type": "InputCommandType" + }, + { + "name": "MenuEntryNumber", + "baseName": "MenuEntryNumber", + "type": "number" + }, + { + "name": "Password", + "baseName": "Password", + "type": "ContentInformation" + }, + { + "name": "TextInput", + "baseName": "TextInput", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Input.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/inputCommandType.ts b/src/typings/cloudDevice/inputCommandType.ts new file mode 100644 index 000000000..b720b33de --- /dev/null +++ b/src/typings/cloudDevice/inputCommandType.ts @@ -0,0 +1,38 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum InputCommandType { + DecimalString = 'DecimalString', + DigitString = 'DigitString', + GetAnyKey = 'GetAnyKey', + GetConfirmation = 'GetConfirmation', + GetFunctionKey = 'GetFunctionKey', + GetMenuEntry = 'GetMenuEntry', + Password = 'Password', + SiteManager = 'SiteManager', + TextString = 'TextString' +} diff --git a/src/typings/cloudDevice/inputData.ts b/src/typings/cloudDevice/inputData.ts new file mode 100644 index 000000000..5122f39fa --- /dev/null +++ b/src/typings/cloudDevice/inputData.ts @@ -0,0 +1,161 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DeviceType } from './deviceType'; +import { InfoQualifyType } from './infoQualifyType'; +import { InputCommandType } from './inputCommandType'; + +export class InputData { + 'BeepKeyFlag'?: boolean; + 'DefaultInputString'?: string; + 'Device': DeviceType; + 'DisableCancelFlag'?: boolean; + 'DisableCorrectFlag'?: boolean; + 'DisableValidFlag'?: boolean; + 'FromRightToLeftFlag'?: boolean; + 'GlobalCorrectionFlag'?: boolean; + 'ImmediateResponseFlag'?: boolean; + 'InfoQualify': InfoQualifyType; + 'InputCommand': InputCommandType; + 'MaskCharactersFlag'?: boolean; + 'MaxDecimalLength'?: number; + 'MaxInputTime'?: number; + 'MaxLength'?: number; + 'MenuBackFlag'?: boolean; + 'MinLength'?: number; + 'NotifyCardInputFlag'?: boolean; + 'StringMask'?: string; + 'WaitUserValidationFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "BeepKeyFlag", + "baseName": "BeepKeyFlag", + "type": "boolean" + }, + { + "name": "DefaultInputString", + "baseName": "DefaultInputString", + "type": "string" + }, + { + "name": "Device", + "baseName": "Device", + "type": "DeviceType" + }, + { + "name": "DisableCancelFlag", + "baseName": "DisableCancelFlag", + "type": "boolean" + }, + { + "name": "DisableCorrectFlag", + "baseName": "DisableCorrectFlag", + "type": "boolean" + }, + { + "name": "DisableValidFlag", + "baseName": "DisableValidFlag", + "type": "boolean" + }, + { + "name": "FromRightToLeftFlag", + "baseName": "FromRightToLeftFlag", + "type": "boolean" + }, + { + "name": "GlobalCorrectionFlag", + "baseName": "GlobalCorrectionFlag", + "type": "boolean" + }, + { + "name": "ImmediateResponseFlag", + "baseName": "ImmediateResponseFlag", + "type": "boolean" + }, + { + "name": "InfoQualify", + "baseName": "InfoQualify", + "type": "InfoQualifyType" + }, + { + "name": "InputCommand", + "baseName": "InputCommand", + "type": "InputCommandType" + }, + { + "name": "MaskCharactersFlag", + "baseName": "MaskCharactersFlag", + "type": "boolean" + }, + { + "name": "MaxDecimalLength", + "baseName": "MaxDecimalLength", + "type": "number" + }, + { + "name": "MaxInputTime", + "baseName": "MaxInputTime", + "type": "number" + }, + { + "name": "MaxLength", + "baseName": "MaxLength", + "type": "number" + }, + { + "name": "MenuBackFlag", + "baseName": "MenuBackFlag", + "type": "boolean" + }, + { + "name": "MinLength", + "baseName": "MinLength", + "type": "number" + }, + { + "name": "NotifyCardInputFlag", + "baseName": "NotifyCardInputFlag", + "type": "boolean" + }, + { + "name": "StringMask", + "baseName": "StringMask", + "type": "string" + }, + { + "name": "WaitUserValidationFlag", + "baseName": "WaitUserValidationFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return InputData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/inputRequest.ts b/src/typings/cloudDevice/inputRequest.ts new file mode 100644 index 000000000..776e9ac7b --- /dev/null +++ b/src/typings/cloudDevice/inputRequest.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DisplayOutput } from './displayOutput'; +import { InputData } from './inputData'; + +export class InputRequest { + 'DisplayOutput'?: DisplayOutput; + 'InputData': InputData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DisplayOutput", + "baseName": "DisplayOutput", + "type": "DisplayOutput" + }, + { + "name": "InputData", + "baseName": "InputData", + "type": "InputData" + } ]; + + static getAttributeTypeMap() { + return InputRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/inputResponse.ts b/src/typings/cloudDevice/inputResponse.ts new file mode 100644 index 000000000..950aee0eb --- /dev/null +++ b/src/typings/cloudDevice/inputResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { InputResult } from './inputResult'; +import { OutputResult } from './outputResult'; + +export class InputResponse { + 'InputResult': InputResult; + 'OutputResult'?: OutputResult; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "InputResult", + "baseName": "InputResult", + "type": "InputResult" + }, + { + "name": "OutputResult", + "baseName": "OutputResult", + "type": "OutputResult" + } ]; + + static getAttributeTypeMap() { + return InputResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/inputResult.ts b/src/typings/cloudDevice/inputResult.ts new file mode 100644 index 000000000..3156f553c --- /dev/null +++ b/src/typings/cloudDevice/inputResult.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DeviceType } from './deviceType'; +import { InfoQualifyType } from './infoQualifyType'; +import { Input } from './input'; +import { Response } from './response'; + +export class InputResult { + 'Device': DeviceType; + 'InfoQualify': InfoQualifyType; + 'Input'?: Input; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Device", + "baseName": "Device", + "type": "DeviceType" + }, + { + "name": "InfoQualify", + "baseName": "InfoQualify", + "type": "InfoQualifyType" + }, + { + "name": "Input", + "baseName": "Input", + "type": "Input" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return InputResult.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/inputUpdate.ts b/src/typings/cloudDevice/inputUpdate.ts new file mode 100644 index 000000000..c22c78215 --- /dev/null +++ b/src/typings/cloudDevice/inputUpdate.ts @@ -0,0 +1,83 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MenuEntry } from './menuEntry'; +import { MessageReference } from './messageReference'; +import { OutputContent } from './outputContent'; + +export class InputUpdate { + 'MaxDecimalLength'?: number; + 'MaxLength'?: number; + 'MenuEntry'?: Array; + 'MessageReference': MessageReference; + 'MinLength'?: number; + 'OutputContent': OutputContent; + 'OutputSignature'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MaxDecimalLength", + "baseName": "MaxDecimalLength", + "type": "number" + }, + { + "name": "MaxLength", + "baseName": "MaxLength", + "type": "number" + }, + { + "name": "MenuEntry", + "baseName": "MenuEntry", + "type": "Array" + }, + { + "name": "MessageReference", + "baseName": "MessageReference", + "type": "MessageReference" + }, + { + "name": "MinLength", + "baseName": "MinLength", + "type": "number" + }, + { + "name": "OutputContent", + "baseName": "OutputContent", + "type": "OutputContent" + }, + { + "name": "OutputSignature", + "baseName": "OutputSignature", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return InputUpdate.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/instalment.ts b/src/typings/cloudDevice/instalment.ts new file mode 100644 index 000000000..7b1522830 --- /dev/null +++ b/src/typings/cloudDevice/instalment.ts @@ -0,0 +1,111 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class Instalment { + 'Charges'?: number; + 'CumulativeAmount'?: number; + 'FirstAmount'?: number; + 'FirstPaymentDate'?: string; + 'InstalmentType'?: Array; + 'Period'?: number; + 'PeriodUnit'?: Instalment.PeriodUnitEnum; + 'PlanID'?: string; + 'SequenceNumber'?: number; + 'TotalNbOfPayments'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Charges", + "baseName": "Charges", + "type": "number" + }, + { + "name": "CumulativeAmount", + "baseName": "CumulativeAmount", + "type": "number" + }, + { + "name": "FirstAmount", + "baseName": "FirstAmount", + "type": "number" + }, + { + "name": "FirstPaymentDate", + "baseName": "FirstPaymentDate", + "type": "string" + }, + { + "name": "InstalmentType", + "baseName": "InstalmentType", + "type": "Array" + }, + { + "name": "Period", + "baseName": "Period", + "type": "number" + }, + { + "name": "PeriodUnit", + "baseName": "PeriodUnit", + "type": "Instalment.PeriodUnitEnum" + }, + { + "name": "PlanID", + "baseName": "PlanID", + "type": "string" + }, + { + "name": "SequenceNumber", + "baseName": "SequenceNumber", + "type": "number" + }, + { + "name": "TotalNbOfPayments", + "baseName": "TotalNbOfPayments", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Instalment.attributeTypeMap; + } +} + +export namespace Instalment { + export enum InstalmentTypeEnum { + DeferredInstalments = 'DeferredInstalments', + EqualInstalments = 'EqualInstalments', + InequalInstalments = 'InequalInstalments' + } + export enum PeriodUnitEnum { + Annual = 'Annual', + Daily = 'Daily', + Monthly = 'Monthly', + Weekly = 'Weekly' + } +} diff --git a/src/typings/cloudDevice/instalmentType.ts b/src/typings/cloudDevice/instalmentType.ts new file mode 100644 index 000000000..856432152 --- /dev/null +++ b/src/typings/cloudDevice/instalmentType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum InstalmentType { + DeferredInstalments = 'DeferredInstalments', + EqualInstalments = 'EqualInstalments', + InequalInstalments = 'InequalInstalments' +} diff --git a/src/typings/cloudDevice/issuer.ts b/src/typings/cloudDevice/issuer.ts new file mode 100644 index 000000000..cdbabe446 --- /dev/null +++ b/src/typings/cloudDevice/issuer.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { RelativeDistinguishedName } from './relativeDistinguishedName'; + +export class Issuer { + 'RelativeDistinguishedName': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "RelativeDistinguishedName", + "baseName": "RelativeDistinguishedName", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return Issuer.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/issuerAndSerialNumber.ts b/src/typings/cloudDevice/issuerAndSerialNumber.ts new file mode 100644 index 000000000..2779aa016 --- /dev/null +++ b/src/typings/cloudDevice/issuerAndSerialNumber.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Issuer } from './issuer'; + +export class IssuerAndSerialNumber { + 'Issuer': Issuer; + 'SerialNumber': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Issuer", + "baseName": "Issuer", + "type": "Issuer" + }, + { + "name": "SerialNumber", + "baseName": "SerialNumber", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return IssuerAndSerialNumber.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loginRequest.ts b/src/typings/cloudDevice/loginRequest.ts new file mode 100644 index 000000000..8ad2ca5f4 --- /dev/null +++ b/src/typings/cloudDevice/loginRequest.ts @@ -0,0 +1,111 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleSoftware } from './saleSoftware'; +import { SaleTerminalData } from './saleTerminalData'; + +export class LoginRequest { + 'CustomerOrderReq'?: Array; + 'DateTime': { [key: string]: any; }; + 'OperatorID'?: string; + 'OperatorLanguage': string; + 'POISerialNumber'?: string; + 'SaleSoftware': SaleSoftware; + 'SaleTerminalData'?: SaleTerminalData; + 'ShiftNumber'?: string; + 'TokenRequestedType'?: LoginRequest.TokenRequestedTypeEnum; + 'TrainingModeFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerOrderReq", + "baseName": "CustomerOrderReq", + "type": "Array" + }, + { + "name": "DateTime", + "baseName": "DateTime", + "type": "{ [key: string]: any; }" + }, + { + "name": "OperatorID", + "baseName": "OperatorID", + "type": "string" + }, + { + "name": "OperatorLanguage", + "baseName": "OperatorLanguage", + "type": "string" + }, + { + "name": "POISerialNumber", + "baseName": "POISerialNumber", + "type": "string" + }, + { + "name": "SaleSoftware", + "baseName": "SaleSoftware", + "type": "SaleSoftware" + }, + { + "name": "SaleTerminalData", + "baseName": "SaleTerminalData", + "type": "SaleTerminalData" + }, + { + "name": "ShiftNumber", + "baseName": "ShiftNumber", + "type": "string" + }, + { + "name": "TokenRequestedType", + "baseName": "TokenRequestedType", + "type": "LoginRequest.TokenRequestedTypeEnum" + }, + { + "name": "TrainingModeFlag", + "baseName": "TrainingModeFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return LoginRequest.attributeTypeMap; + } +} + +export namespace LoginRequest { + export enum CustomerOrderReqEnum { + Both = 'Both', + Closed = 'Closed', + Open = 'Open' + } + export enum TokenRequestedTypeEnum { + Customer = 'Customer', + Transaction = 'Transaction' + } +} diff --git a/src/typings/cloudDevice/loginResponse.ts b/src/typings/cloudDevice/loginResponse.ts new file mode 100644 index 000000000..08ec4e214 --- /dev/null +++ b/src/typings/cloudDevice/loginResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { POISystemData } from './pOISystemData'; +import { Response } from './response'; + +export class LoginResponse { + 'POISystemData'?: POISystemData; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POISystemData", + "baseName": "POISystemData", + "type": "POISystemData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return LoginResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/logoutRequest.ts b/src/typings/cloudDevice/logoutRequest.ts new file mode 100644 index 000000000..5cbd92c8b --- /dev/null +++ b/src/typings/cloudDevice/logoutRequest.ts @@ -0,0 +1,44 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class LogoutRequest { + 'MaintenanceAllowed'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MaintenanceAllowed", + "baseName": "MaintenanceAllowed", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return LogoutRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/logoutResponse.ts b/src/typings/cloudDevice/logoutResponse.ts new file mode 100644 index 000000000..8934eb0f5 --- /dev/null +++ b/src/typings/cloudDevice/logoutResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class LogoutResponse { + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return LogoutResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyAccount.ts b/src/typings/cloudDevice/loyaltyAccount.ts new file mode 100644 index 000000000..c1a7817b9 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAccount.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountId } from './loyaltyAccountId'; + +export class LoyaltyAccount { + 'LoyaltyAccountID': LoyaltyAccountId; + 'LoyaltyBrand'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyAccountID", + "baseName": "LoyaltyAccountID", + "type": "LoyaltyAccountId" + }, + { + "name": "LoyaltyBrand", + "baseName": "LoyaltyBrand", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAccount.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyAccountId.ts b/src/typings/cloudDevice/loyaltyAccountId.ts new file mode 100644 index 000000000..428a55e52 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAccountId.ts @@ -0,0 +1,84 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { IdentificationType } from './identificationType'; + +export class LoyaltyAccountId { + 'EntryMode': Array; + 'IdentificationSupport'?: LoyaltyAccountId.IdentificationSupportEnum; + 'IdentificationType': IdentificationType; + 'LoyaltyID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EntryMode", + "baseName": "EntryMode", + "type": "Array" + }, + { + "name": "IdentificationSupport", + "baseName": "IdentificationSupport", + "type": "LoyaltyAccountId.IdentificationSupportEnum" + }, + { + "name": "IdentificationType", + "baseName": "IdentificationType", + "type": "IdentificationType" + }, + { + "name": "LoyaltyID", + "baseName": "LoyaltyID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAccountId.attributeTypeMap; + } +} + +export namespace LoyaltyAccountId { + export enum EntryModeEnum { + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Mobile = 'Mobile', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } + export enum IdentificationSupportEnum { + HybridCard = 'HybridCard', + LinkedCard = 'LinkedCard', + LoyaltyCard = 'LoyaltyCard', + NoCard = 'NoCard' + } +} diff --git a/src/typings/cloudDevice/loyaltyAccountReq.ts b/src/typings/cloudDevice/loyaltyAccountReq.ts new file mode 100644 index 000000000..826ca16a1 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAccountReq.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountId } from './loyaltyAccountId'; +import { TransactionIdentification } from './transactionIdentification'; + +export class LoyaltyAccountReq { + 'CardAcquisitionReference'?: TransactionIdentification; + 'LoyaltyAccountID'?: LoyaltyAccountId; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardAcquisitionReference", + "baseName": "CardAcquisitionReference", + "type": "TransactionIdentification" + }, + { + "name": "LoyaltyAccountID", + "baseName": "LoyaltyAccountID", + "type": "LoyaltyAccountId" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAccountReq.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyAccountStatus.ts b/src/typings/cloudDevice/loyaltyAccountStatus.ts new file mode 100644 index 000000000..294ff2843 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAccountStatus.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccount } from './loyaltyAccount'; + +export class LoyaltyAccountStatus { + 'Currency'?: string; + 'CurrentBalance'?: number; + 'LoyaltyAccount': LoyaltyAccount; + 'LoyaltyUnit'?: LoyaltyAccountStatus.LoyaltyUnitEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "CurrentBalance", + "baseName": "CurrentBalance", + "type": "number" + }, + { + "name": "LoyaltyAccount", + "baseName": "LoyaltyAccount", + "type": "LoyaltyAccount" + }, + { + "name": "LoyaltyUnit", + "baseName": "LoyaltyUnit", + "type": "LoyaltyAccountStatus.LoyaltyUnitEnum" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAccountStatus.attributeTypeMap; + } +} + +export namespace LoyaltyAccountStatus { + export enum LoyaltyUnitEnum { + Monetary = 'Monetary', + Point = 'Point' + } +} diff --git a/src/typings/cloudDevice/loyaltyAcquirerData.ts b/src/typings/cloudDevice/loyaltyAcquirerData.ts new file mode 100644 index 000000000..1b64c88ce --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAcquirerData.ts @@ -0,0 +1,63 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionIdentification } from './transactionIdentification'; + +export class LoyaltyAcquirerData { + 'ApprovalCode'?: string; + 'HostReconciliationID'?: string; + 'LoyaltyAcquirerID'?: string; + 'LoyaltyTransactionID'?: TransactionIdentification; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ApprovalCode", + "baseName": "ApprovalCode", + "type": "string" + }, + { + "name": "HostReconciliationID", + "baseName": "HostReconciliationID", + "type": "string" + }, + { + "name": "LoyaltyAcquirerID", + "baseName": "LoyaltyAcquirerID", + "type": "string" + }, + { + "name": "LoyaltyTransactionID", + "baseName": "LoyaltyTransactionID", + "type": "TransactionIdentification" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAcquirerData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyAmount.ts b/src/typings/cloudDevice/loyaltyAmount.ts new file mode 100644 index 000000000..14d08dd1f --- /dev/null +++ b/src/typings/cloudDevice/loyaltyAmount.ts @@ -0,0 +1,62 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class LoyaltyAmount { + 'Currency'?: string; + 'LoyaltyUnit'?: LoyaltyAmount.LoyaltyUnitEnum; + 'Value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "LoyaltyUnit", + "baseName": "LoyaltyUnit", + "type": "LoyaltyAmount.LoyaltyUnitEnum" + }, + { + "name": "Value", + "baseName": "Value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return LoyaltyAmount.attributeTypeMap; + } +} + +export namespace LoyaltyAmount { + export enum LoyaltyUnitEnum { + Monetary = 'Monetary', + Point = 'Point' + } +} diff --git a/src/typings/cloudDevice/loyaltyData.ts b/src/typings/cloudDevice/loyaltyData.ts new file mode 100644 index 000000000..4d7a90c87 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyData.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountId } from './loyaltyAccountId'; +import { LoyaltyAmount } from './loyaltyAmount'; +import { TransactionIdentification } from './transactionIdentification'; + +export class LoyaltyData { + 'CardAcquisitionReference'?: TransactionIdentification; + 'LoyaltyAccountID'?: LoyaltyAccountId; + 'LoyaltyAmount'?: LoyaltyAmount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardAcquisitionReference", + "baseName": "CardAcquisitionReference", + "type": "TransactionIdentification" + }, + { + "name": "LoyaltyAccountID", + "baseName": "LoyaltyAccountID", + "type": "LoyaltyAccountId" + }, + { + "name": "LoyaltyAmount", + "baseName": "LoyaltyAmount", + "type": "LoyaltyAmount" + } ]; + + static getAttributeTypeMap() { + return LoyaltyData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyHandlingType.ts b/src/typings/cloudDevice/loyaltyHandlingType.ts new file mode 100644 index 000000000..0d94becdb --- /dev/null +++ b/src/typings/cloudDevice/loyaltyHandlingType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum LoyaltyHandlingType { + Allowed = 'Allowed', + Forbidden = 'Forbidden', + Processed = 'Processed', + Proposed = 'Proposed', + Required = 'Required' +} diff --git a/src/typings/cloudDevice/loyaltyRequest.ts b/src/typings/cloudDevice/loyaltyRequest.ts new file mode 100644 index 000000000..a7e41c18c --- /dev/null +++ b/src/typings/cloudDevice/loyaltyRequest.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyData } from './loyaltyData'; +import { LoyaltyTransaction } from './loyaltyTransaction'; +import { SaleData } from './saleData'; + +export class LoyaltyRequest { + 'LoyaltyData'?: Array; + 'LoyaltyTransaction': LoyaltyTransaction; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyData", + "baseName": "LoyaltyData", + "type": "Array" + }, + { + "name": "LoyaltyTransaction", + "baseName": "LoyaltyTransaction", + "type": "LoyaltyTransaction" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return LoyaltyRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyResponse.ts b/src/typings/cloudDevice/loyaltyResponse.ts new file mode 100644 index 000000000..0e6663f40 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyResponse.ts @@ -0,0 +1,73 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyResult } from './loyaltyResult'; +import { POIData } from './pOIData'; +import { PaymentReceipt } from './paymentReceipt'; +import { Response } from './response'; +import { SaleData } from './saleData'; + +export class LoyaltyResponse { + 'LoyaltyResult'?: Array; + 'PaymentReceipt'?: Array; + 'POIData': POIData; + 'Response': Response; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyResult", + "baseName": "LoyaltyResult", + "type": "Array" + }, + { + "name": "PaymentReceipt", + "baseName": "PaymentReceipt", + "type": "Array" + }, + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return LoyaltyResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyResult.ts b/src/typings/cloudDevice/loyaltyResult.ts new file mode 100644 index 000000000..d6fc54655 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyResult.ts @@ -0,0 +1,72 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccount } from './loyaltyAccount'; +import { LoyaltyAcquirerData } from './loyaltyAcquirerData'; +import { LoyaltyAmount } from './loyaltyAmount'; +import { Rebates } from './rebates'; + +export class LoyaltyResult { + 'CurrentBalance'?: number; + 'LoyaltyAccount': LoyaltyAccount; + 'LoyaltyAcquirerData'?: LoyaltyAcquirerData; + 'LoyaltyAmount'?: LoyaltyAmount; + 'Rebates'?: Rebates; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CurrentBalance", + "baseName": "CurrentBalance", + "type": "number" + }, + { + "name": "LoyaltyAccount", + "baseName": "LoyaltyAccount", + "type": "LoyaltyAccount" + }, + { + "name": "LoyaltyAcquirerData", + "baseName": "LoyaltyAcquirerData", + "type": "LoyaltyAcquirerData" + }, + { + "name": "LoyaltyAmount", + "baseName": "LoyaltyAmount", + "type": "LoyaltyAmount" + }, + { + "name": "Rebates", + "baseName": "Rebates", + "type": "Rebates" + } ]; + + static getAttributeTypeMap() { + return LoyaltyResult.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyTotals.ts b/src/typings/cloudDevice/loyaltyTotals.ts new file mode 100644 index 000000000..575a7fdc7 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyTotals.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionType } from './transactionType'; + +export class LoyaltyTotals { + 'TransactionAmount': number; + 'TransactionCount': number; + 'TransactionType': TransactionType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "TransactionAmount", + "baseName": "TransactionAmount", + "type": "number" + }, + { + "name": "TransactionCount", + "baseName": "TransactionCount", + "type": "number" + }, + { + "name": "TransactionType", + "baseName": "TransactionType", + "type": "TransactionType" + } ]; + + static getAttributeTypeMap() { + return LoyaltyTotals.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyTransaction.ts b/src/typings/cloudDevice/loyaltyTransaction.ts new file mode 100644 index 000000000..48d7c057c --- /dev/null +++ b/src/typings/cloudDevice/loyaltyTransaction.ts @@ -0,0 +1,78 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyTransactionType } from './loyaltyTransactionType'; +import { OriginalPOITransaction } from './originalPOITransaction'; +import { SaleItem } from './saleItem'; +import { TransactionConditions } from './transactionConditions'; + +export class LoyaltyTransaction { + 'Currency'?: string; + 'LoyaltyTransactionType': LoyaltyTransactionType; + 'OriginalPOITransaction'?: OriginalPOITransaction; + 'SaleItem'?: Array; + 'TotalAmount'?: number; + 'TransactionConditions'?: TransactionConditions; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "LoyaltyTransactionType", + "baseName": "LoyaltyTransactionType", + "type": "LoyaltyTransactionType" + }, + { + "name": "OriginalPOITransaction", + "baseName": "OriginalPOITransaction", + "type": "OriginalPOITransaction" + }, + { + "name": "SaleItem", + "baseName": "SaleItem", + "type": "Array" + }, + { + "name": "TotalAmount", + "baseName": "TotalAmount", + "type": "number" + }, + { + "name": "TransactionConditions", + "baseName": "TransactionConditions", + "type": "TransactionConditions" + } ]; + + static getAttributeTypeMap() { + return LoyaltyTransaction.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/loyaltyTransactionType.ts b/src/typings/cloudDevice/loyaltyTransactionType.ts new file mode 100644 index 000000000..9e14e2005 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyTransactionType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum LoyaltyTransactionType { + Award = 'Award', + AwardRefund = 'AwardRefund', + Rebate = 'Rebate', + RebateRefund = 'RebateRefund', + Redemption = 'Redemption', + RedemptionRefund = 'RedemptionRefund' +} diff --git a/src/typings/cloudDevice/loyaltyUnitType.ts b/src/typings/cloudDevice/loyaltyUnitType.ts new file mode 100644 index 000000000..cc65835c4 --- /dev/null +++ b/src/typings/cloudDevice/loyaltyUnitType.ts @@ -0,0 +1,30 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum LoyaltyUnitType { + Monetary = 'Monetary', + Point = 'Point' +} diff --git a/src/typings/cloudDevice/menuEntry.ts b/src/typings/cloudDevice/menuEntry.ts new file mode 100644 index 000000000..83b8d25a1 --- /dev/null +++ b/src/typings/cloudDevice/menuEntry.ts @@ -0,0 +1,85 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { OutputFormatType } from './outputFormatType'; +import { OutputText } from './outputText'; +import { PredefinedContent } from './predefinedContent'; + +export class MenuEntry { + 'DefaultSelectedFlag'?: boolean; + 'MenuEntryTag'?: MenuEntry.MenuEntryTagEnum; + 'OutputFormat': OutputFormatType; + 'OutputText'?: Array; + 'OutputXHTML'?: any | null; + 'PredefinedContent'?: PredefinedContent; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DefaultSelectedFlag", + "baseName": "DefaultSelectedFlag", + "type": "boolean" + }, + { + "name": "MenuEntryTag", + "baseName": "MenuEntryTag", + "type": "MenuEntry.MenuEntryTagEnum" + }, + { + "name": "OutputFormat", + "baseName": "OutputFormat", + "type": "OutputFormatType" + }, + { + "name": "OutputText", + "baseName": "OutputText", + "type": "Array" + }, + { + "name": "OutputXHTML", + "baseName": "OutputXHTML", + "type": "any" + }, + { + "name": "PredefinedContent", + "baseName": "PredefinedContent", + "type": "PredefinedContent" + } ]; + + static getAttributeTypeMap() { + return MenuEntry.attributeTypeMap; + } +} + +export namespace MenuEntry { + export enum MenuEntryTagEnum { + NonSelectable = 'NonSelectable', + NonSelectableSubMenu = 'NonSelectableSubMenu', + Selectable = 'Selectable', + SubMenu = 'SubMenu' + } +} diff --git a/src/typings/cloudDevice/menuEntryTagType.ts b/src/typings/cloudDevice/menuEntryTagType.ts new file mode 100644 index 000000000..2b5c8722f --- /dev/null +++ b/src/typings/cloudDevice/menuEntryTagType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum MenuEntryTagType { + NonSelectable = 'NonSelectable', + NonSelectableSubMenu = 'NonSelectableSubMenu', + Selectable = 'Selectable', + SubMenu = 'SubMenu' +} diff --git a/src/typings/cloudDevice/merchantDevice.ts b/src/typings/cloudDevice/merchantDevice.ts new file mode 100644 index 000000000..4f76ea3ed --- /dev/null +++ b/src/typings/cloudDevice/merchantDevice.ts @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class MerchantDevice { + 'os'?: string; + 'osVersion'?: string; + 'reference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "os", + "baseName": "os", + "type": "string" + }, + { + "name": "osVersion", + "baseName": "osVersion", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MerchantDevice.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/messageCategoryType.ts b/src/typings/cloudDevice/messageCategoryType.ts new file mode 100644 index 000000000..b9f9f58a5 --- /dev/null +++ b/src/typings/cloudDevice/messageCategoryType.ts @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum MessageCategoryType { + Abort = 'Abort', + Admin = 'Admin', + BalanceInquiry = 'BalanceInquiry', + Batch = 'Batch', + CardAcquisition = 'CardAcquisition', + CardReaderApdu = 'CardReaderAPDU', + CardReaderInit = 'CardReaderInit', + CardReaderPowerOff = 'CardReaderPowerOff', + Diagnosis = 'Diagnosis', + Display = 'Display', + EnableService = 'EnableService', + Event = 'Event', + GetTotals = 'GetTotals', + Input = 'Input', + InputUpdate = 'InputUpdate', + Login = 'Login', + Logout = 'Logout', + Loyalty = 'Loyalty', + Pin = 'PIN', + Payment = 'Payment', + Print = 'Print', + Reconciliation = 'Reconciliation', + Reversal = 'Reversal', + Sound = 'Sound', + StoredValue = 'StoredValue', + TransactionStatus = 'TransactionStatus', + Transmit = 'Transmit' +} diff --git a/src/typings/cloudDevice/messageClassType.ts b/src/typings/cloudDevice/messageClassType.ts new file mode 100644 index 000000000..6026edded --- /dev/null +++ b/src/typings/cloudDevice/messageClassType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum MessageClassType { + Device = 'Device', + Event = 'Event', + Service = 'Service' +} diff --git a/src/typings/cloudDevice/messageHeader.ts b/src/typings/cloudDevice/messageHeader.ts new file mode 100644 index 000000000..3836e74ae --- /dev/null +++ b/src/typings/cloudDevice/messageHeader.ts @@ -0,0 +1,89 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MessageCategoryType } from './messageCategoryType'; +import { MessageClassType } from './messageClassType'; +import { MessageType } from './messageType'; + +export class MessageHeader { + 'DeviceID'?: string; + 'MessageCategory': MessageCategoryType; + 'MessageClass': MessageClassType; + 'MessageType': MessageType; + 'POIID': string; + 'ProtocolVersion'?: string; + 'SaleID'?: string; + 'ServiceID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DeviceID", + "baseName": "DeviceID", + "type": "string" + }, + { + "name": "MessageCategory", + "baseName": "MessageCategory", + "type": "MessageCategoryType" + }, + { + "name": "MessageClass", + "baseName": "MessageClass", + "type": "MessageClassType" + }, + { + "name": "MessageType", + "baseName": "MessageType", + "type": "MessageType" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + }, + { + "name": "ProtocolVersion", + "baseName": "ProtocolVersion", + "type": "string" + }, + { + "name": "SaleID", + "baseName": "SaleID", + "type": "string" + }, + { + "name": "ServiceID", + "baseName": "ServiceID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageHeader.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/messageReference.ts b/src/typings/cloudDevice/messageReference.ts new file mode 100644 index 000000000..43e4dc665 --- /dev/null +++ b/src/typings/cloudDevice/messageReference.ts @@ -0,0 +1,98 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class MessageReference { + 'DeviceID'?: string; + 'MessageCategory'?: MessageReference.MessageCategoryEnum; + 'POIID'?: string; + 'SaleID'?: string; + 'ServiceID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DeviceID", + "baseName": "DeviceID", + "type": "string" + }, + { + "name": "MessageCategory", + "baseName": "MessageCategory", + "type": "MessageReference.MessageCategoryEnum" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + }, + { + "name": "SaleID", + "baseName": "SaleID", + "type": "string" + }, + { + "name": "ServiceID", + "baseName": "ServiceID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageReference.attributeTypeMap; + } +} + +export namespace MessageReference { + export enum MessageCategoryEnum { + Abort = 'Abort', + Admin = 'Admin', + BalanceInquiry = 'BalanceInquiry', + Batch = 'Batch', + CardAcquisition = 'CardAcquisition', + CardReaderApdu = 'CardReaderAPDU', + CardReaderInit = 'CardReaderInit', + CardReaderPowerOff = 'CardReaderPowerOff', + Diagnosis = 'Diagnosis', + Display = 'Display', + EnableService = 'EnableService', + Event = 'Event', + GetTotals = 'GetTotals', + Input = 'Input', + InputUpdate = 'InputUpdate', + Login = 'Login', + Logout = 'Logout', + Loyalty = 'Loyalty', + Pin = 'PIN', + Payment = 'Payment', + Print = 'Print', + Reconciliation = 'Reconciliation', + Reversal = 'Reversal', + Sound = 'Sound', + StoredValue = 'StoredValue', + TransactionStatus = 'TransactionStatus', + Transmit = 'Transmit' + } +} diff --git a/src/typings/cloudDevice/messageType.ts b/src/typings/cloudDevice/messageType.ts new file mode 100644 index 000000000..3e22d4904 --- /dev/null +++ b/src/typings/cloudDevice/messageType.ts @@ -0,0 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum MessageType { + Notification = 'Notification', + Request = 'Request', + Response = 'Response' +} diff --git a/src/typings/cloudDevice/mobileData.ts b/src/typings/cloudDevice/mobileData.ts new file mode 100644 index 000000000..f7c905f4b --- /dev/null +++ b/src/typings/cloudDevice/mobileData.ts @@ -0,0 +1,77 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ContentInformation } from './contentInformation'; +import { Geolocation } from './geolocation'; +import { SensitiveMobileData } from './sensitiveMobileData'; + +export class MobileData { + 'Geolocation'?: Geolocation; + 'MaskedMSISDN'?: string; + 'MobileCountryCode'?: string; + 'MobileNetworkCode'?: string; + 'ProtectedMobileData'?: ContentInformation; + 'SensitiveMobileData'?: SensitiveMobileData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Geolocation", + "baseName": "Geolocation", + "type": "Geolocation" + }, + { + "name": "MaskedMSISDN", + "baseName": "MaskedMSISDN", + "type": "string" + }, + { + "name": "MobileCountryCode", + "baseName": "MobileCountryCode", + "type": "string" + }, + { + "name": "MobileNetworkCode", + "baseName": "MobileNetworkCode", + "type": "string" + }, + { + "name": "ProtectedMobileData", + "baseName": "ProtectedMobileData", + "type": "ContentInformation" + }, + { + "name": "SensitiveMobileData", + "baseName": "SensitiveMobileData", + "type": "SensitiveMobileData" + } ]; + + static getAttributeTypeMap() { + return MobileData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/models.ts b/src/typings/cloudDevice/models.ts new file mode 100644 index 000000000..ab2b1d884 --- /dev/null +++ b/src/typings/cloudDevice/models.ts @@ -0,0 +1,914 @@ + /* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +export * from "./abortRequest"; +export * from "./accountType"; +export * from "./adminRequest"; +export * from "./adminResponse"; +export * from "./algorithmIdentifier"; +export * from "./algorithmType"; +export * from "./alignmentType"; +export * from "./allowedProduct"; +export * from "./amount"; +export * from "./amountsReq"; +export * from "./amountsResp"; +export * from "./applicationInfo"; +export * from "./areaSize"; +export * from "./authenticatedData"; +export * from "./authenticationMethodType"; +export * from "./balanceInquiryRequest"; +export * from "./balanceInquiryResponse"; +export * from "./barcodeType"; +export * from "./batchRequest"; +export * from "./batchResponse"; +export * from "./capturedSignature"; +export * from "./cardAcquisitionRequest"; +export * from "./cardAcquisitionResponse"; +export * from "./cardAcquisitionTransaction"; +export * from "./cardData"; +export * from "./cardReaderAPDURequest"; +export * from "./cardReaderAPDUResponse"; +export * from "./cardReaderInitRequest"; +export * from "./cardReaderInitResponse"; +export * from "./cardReaderPowerOffRequest"; +export * from "./cardReaderPowerOffResponse"; +export * from "./cardholderPIN"; +export * from "./cashHandlingDevice"; +export * from "./characterHeightType"; +export * from "./characterStyleType"; +export * from "./characterWidthType"; +export * from "./checkData"; +export * from "./checkTypeCodeType"; +export * from "./cloudDeviceApiRequest"; +export * from "./cloudDeviceApiResponse"; +export * from "./cloudDeviceApiSecuredRequest"; +export * from "./cloudDeviceApiSecuredResponse"; +export * from "./coinsOrBills"; +export * from "./connectedDevicesResponse"; +export * from "./colorType"; +export * from "./commonField"; +export * from "./contentInformation"; +export * from "./contentType"; +export * from "./currencyConversion"; +export * from "./customerOrder"; +export * from "./customerOrderReqType"; +export * from "./deviceStatusResponse"; +export * from "./deviceType"; +export * from "./diagnosisRequest"; +export * from "./diagnosisResponse"; +export * from "./digestedData"; +export * from "./displayOutput"; +export * from "./displayRequest"; +export * from "./displayResponse"; +export * from "./documentQualifierType"; +export * from "./enableServiceRequest"; +export * from "./enableServiceResponse"; +export * from "./encapsulatedContent"; +export * from "./encryptedContent"; +export * from "./entryModeType"; +export * from "./envelopedData"; +export * from "./errorConditionType"; +export * from "./eventNotification"; +export * from "./eventToNotifyType"; +export * from "./externalPlatform"; +export * from "./forceEntryModeType"; +export * from "./genericProfileType"; +export * from "./geographicCoordinates"; +export * from "./geolocation"; +export * from "./getTotalsRequest"; +export * from "./getTotalsResponse"; +export * from "./globalStatusType"; +export * from "./hostStatus"; +export * from "./iCCResetData"; +export * from "./identificationSupportType"; +export * from "./identificationType"; +export * from "./infoQualifyType"; +export * from "./input"; +export * from "./inputCommandType"; +export * from "./inputData"; +export * from "./inputRequest"; +export * from "./inputResponse"; +export * from "./inputResult"; +export * from "./inputUpdate"; +export * from "./instalment"; +export * from "./instalmentType"; +export * from "./issuer"; +export * from "./issuerAndSerialNumber"; +export * from "./loginRequest"; +export * from "./loginResponse"; +export * from "./logoutRequest"; +export * from "./logoutResponse"; +export * from "./loyaltyAccount"; +export * from "./loyaltyAccountId"; +export * from "./loyaltyAccountReq"; +export * from "./loyaltyAccountStatus"; +export * from "./loyaltyAcquirerData"; +export * from "./loyaltyAmount"; +export * from "./loyaltyData"; +export * from "./loyaltyHandlingType"; +export * from "./loyaltyRequest"; +export * from "./loyaltyResponse"; +export * from "./loyaltyResult"; +export * from "./loyaltyTotals"; +export * from "./loyaltyTransaction"; +export * from "./loyaltyTransactionType"; +export * from "./loyaltyUnitType"; +export * from "./menuEntry"; +export * from "./menuEntryTagType"; +export * from "./merchantDevice"; +export * from "./messageCategoryType"; +export * from "./messageClassType"; +export * from "./messageHeader"; +export * from "./messageReference"; +export * from "./messageType"; +export * from "./mobileData"; +export * from "./namedKeyEncryptedData"; +export * from "./nexoDerivedKey"; +export * from "./originalPOITransaction"; +export * from "./outputBarcode"; +export * from "./outputContent"; +export * from "./outputFormatType"; +export * from "./outputResult"; +export * from "./outputText"; +export * from "./pINFormatType"; +export * from "./pINRequest"; +export * from "./pINRequestType"; +export * from "./pINResponse"; +export * from "./pOICapabilitiesType"; +export * from "./pOIData"; +export * from "./pOIProfile"; +export * from "./pOISoftware"; +export * from "./pOIStatus"; +export * from "./pOISystemData"; +export * from "./pOITerminalData"; +export * from "./parameter"; +export * from "./paymentAccountReq"; +export * from "./paymentAccountStatus"; +export * from "./paymentAcquirerData"; +export * from "./paymentData"; +export * from "./paymentInstrumentData"; +export * from "./paymentInstrumentType"; +export * from "./paymentReceipt"; +export * from "./paymentRequest"; +export * from "./paymentResponse"; +export * from "./paymentResult"; +export * from "./paymentToken"; +export * from "./paymentTotals"; +export * from "./paymentTransaction"; +export * from "./paymentType"; +export * from "./performedTransaction"; +export * from "./periodUnitType"; +export * from "./predefinedContent"; +export * from "./printOutput"; +export * from "./printRequest"; +export * from "./printResponse"; +export * from "./printerStatusType"; +export * from "./rebates"; +export * from "./reconciliationRequest"; +export * from "./reconciliationResponse"; +export * from "./reconciliationType"; +export * from "./relativeDistinguishedName"; +export * from "./repeatedMessageResponse"; +export * from "./repeatedResponseMessageBody"; +export * from "./response"; +export * from "./responseModeType"; +export * from "./resultType"; +export * from "./reversalReasonType"; +export * from "./reversalRequest"; +export * from "./reversalResponse"; +export * from "./saleCapabilitiesType"; +export * from "./saleData"; +export * from "./saleItem"; +export * from "./saleItemRebate"; +export * from "./saleProfile"; +export * from "./saleSoftware"; +export * from "./saleTerminalData"; +export * from "./saleToAcquirerData"; +export * from "./saleToIssuerData"; +export * from "./saleToPOIRequest"; +export * from "./saleToPOIResponse"; +export * from "./saleToPOISecuredMessage"; +export * from "./securityTrailer"; +export * from "./sensitiveCardData"; +export * from "./sensitiveMobileData"; +export * from "./serviceProfilesType"; +export * from "./servicesEnabledType"; +export * from "./shopperInteractionDevice"; +export * from "./signaturePoint"; +export * from "./signedData"; +export * from "./signer"; +export * from "./signerIdentifier"; +export * from "./soundActionType"; +export * from "./soundContent"; +export * from "./soundFormatType"; +export * from "./soundRequest"; +export * from "./soundResponse"; +export * from "./sponsoredMerchant"; +export * from "./storedValueAccountId"; +export * from "./storedValueAccountStatus"; +export * from "./storedValueAccountType"; +export * from "./storedValueData"; +export * from "./storedValueRequest"; +export * from "./storedValueResponse"; +export * from "./storedValueResult"; +export * from "./storedValueTransactionType"; +export * from "./terminalEnvironmentType"; +export * from "./tokenRequestedType"; +export * from "./totalDetailsType"; +export * from "./totalFilter"; +export * from "./trackData"; +export * from "./trackFormatType"; +export * from "./transactionActionType"; +export * from "./transactionConditions"; +export * from "./transactionIdentification"; +export * from "./transactionStatusRequest"; +export * from "./transactionStatusResponse"; +export * from "./transactionToPerform"; +export * from "./transactionTotals"; +export * from "./transactionType"; +export * from "./transmitRequest"; +export * from "./transmitResponse"; +export * from "./uTMCoordinates"; +export * from "./unitOfMeasureType"; +export * from "./versionType"; +// helpers +export * from "./predefinedContentHelper"; +// security +export * from "../../security/encryptionCredentialDetails"; + + +import { AbortRequest } from "./abortRequest"; +import { AccountType } from "./accountType"; +import { AdminRequest } from "./adminRequest"; +import { AdminResponse } from "./adminResponse"; +import { AlgorithmIdentifier } from "./algorithmIdentifier"; +import { AlgorithmType } from "./algorithmType"; +import { AlignmentType } from "./alignmentType"; +import { AllowedProduct } from "./allowedProduct"; +import { Amount } from "./amount"; +import { AmountsReq } from "./amountsReq"; +import { AmountsResp } from "./amountsResp"; +import { ApplicationInfo } from "./applicationInfo"; +import { AreaSize } from "./areaSize"; +import { AuthenticatedData } from "./authenticatedData"; +import { AuthenticationMethodType } from "./authenticationMethodType"; +import { BalanceInquiryRequest } from "./balanceInquiryRequest"; +import { BalanceInquiryResponse } from "./balanceInquiryResponse"; +import { BarcodeType } from "./barcodeType"; +import { BatchRequest } from "./batchRequest"; +import { BatchResponse } from "./batchResponse"; +import { CapturedSignature } from "./capturedSignature"; +import { CardAcquisitionRequest } from "./cardAcquisitionRequest"; +import { CardAcquisitionResponse } from "./cardAcquisitionResponse"; +import { CardAcquisitionTransaction } from "./cardAcquisitionTransaction"; +import { CardData } from "./cardData"; +import { CardReaderAPDURequest } from "./cardReaderAPDURequest"; +import { CardReaderAPDUResponse } from "./cardReaderAPDUResponse"; +import { CardReaderInitRequest } from "./cardReaderInitRequest"; +import { CardReaderInitResponse } from "./cardReaderInitResponse"; +import { CardReaderPowerOffRequest } from "./cardReaderPowerOffRequest"; +import { CardReaderPowerOffResponse } from "./cardReaderPowerOffResponse"; +import { CardholderPIN } from "./cardholderPIN"; +import { CashHandlingDevice } from "./cashHandlingDevice"; +import { CharacterHeightType } from "./characterHeightType"; +import { CharacterStyleType } from "./characterStyleType"; +import { CharacterWidthType } from "./characterWidthType"; +import { CheckData } from "./checkData"; +import { CheckTypeCodeType } from "./checkTypeCodeType"; +import { CloudDeviceApiRequest } from "./cloudDeviceApiRequest"; +import { CloudDeviceApiResponse } from "./cloudDeviceApiResponse"; +import { CloudDeviceApiSecuredRequest } from "./cloudDeviceApiSecuredRequest"; +import { CloudDeviceApiSecuredResponse } from "./cloudDeviceApiSecuredResponse"; +import { CoinsOrBills } from "./coinsOrBills"; +import { ConnectedDevicesResponse } from "./connectedDevicesResponse"; +import { ColorType } from "./colorType"; +import { CommonField } from "./commonField"; +import { ContentInformation } from "./contentInformation"; +import { ContentType } from "./contentType"; +import { CurrencyConversion } from "./currencyConversion"; +import { CustomerOrder } from "./customerOrder"; +import { CustomerOrderReqType } from "./customerOrderReqType"; +import { DeviceStatusResponse } from "./deviceStatusResponse"; +import { DeviceType } from "./deviceType"; +import { DiagnosisRequest } from "./diagnosisRequest"; +import { DiagnosisResponse } from "./diagnosisResponse"; +import { DigestedData } from "./digestedData"; +import { DisplayOutput } from "./displayOutput"; +import { DisplayRequest } from "./displayRequest"; +import { DisplayResponse } from "./displayResponse"; +import { DocumentQualifierType } from "./documentQualifierType"; +import { EnableServiceRequest } from "./enableServiceRequest"; +import { EnableServiceResponse } from "./enableServiceResponse"; +import { EncapsulatedContent } from "./encapsulatedContent"; +import { EncryptedContent } from "./encryptedContent"; +import { EntryModeType } from "./entryModeType"; +import { EnvelopedData } from "./envelopedData"; +import { ErrorConditionType } from "./errorConditionType"; +import { EventNotification } from "./eventNotification"; +import { EventToNotifyType } from "./eventToNotifyType"; +import { ExternalPlatform } from "./externalPlatform"; +import { ForceEntryModeType } from "./forceEntryModeType"; +import { GenericProfileType } from "./genericProfileType"; +import { GeographicCoordinates } from "./geographicCoordinates"; +import { Geolocation } from "./geolocation"; +import { GetTotalsRequest } from "./getTotalsRequest"; +import { GetTotalsResponse } from "./getTotalsResponse"; +import { GlobalStatusType } from "./globalStatusType"; +import { HostStatus } from "./hostStatus"; +import { ICCResetData } from "./iCCResetData"; +import { IdentificationSupportType } from "./identificationSupportType"; +import { IdentificationType } from "./identificationType"; +import { InfoQualifyType } from "./infoQualifyType"; +import { Input } from "./input"; +import { InputCommandType } from "./inputCommandType"; +import { InputData } from "./inputData"; +import { InputRequest } from "./inputRequest"; +import { InputResponse } from "./inputResponse"; +import { InputResult } from "./inputResult"; +import { InputUpdate } from "./inputUpdate"; +import { Instalment } from "./instalment"; +import { InstalmentType } from "./instalmentType"; +import { Issuer } from "./issuer"; +import { IssuerAndSerialNumber } from "./issuerAndSerialNumber"; +import { LoginRequest } from "./loginRequest"; +import { LoginResponse } from "./loginResponse"; +import { LogoutRequest } from "./logoutRequest"; +import { LogoutResponse } from "./logoutResponse"; +import { LoyaltyAccount } from "./loyaltyAccount"; +import { LoyaltyAccountId } from "./loyaltyAccountId"; +import { LoyaltyAccountReq } from "./loyaltyAccountReq"; +import { LoyaltyAccountStatus } from "./loyaltyAccountStatus"; +import { LoyaltyAcquirerData } from "./loyaltyAcquirerData"; +import { LoyaltyAmount } from "./loyaltyAmount"; +import { LoyaltyData } from "./loyaltyData"; +import { LoyaltyHandlingType } from "./loyaltyHandlingType"; +import { LoyaltyRequest } from "./loyaltyRequest"; +import { LoyaltyResponse } from "./loyaltyResponse"; +import { LoyaltyResult } from "./loyaltyResult"; +import { LoyaltyTotals } from "./loyaltyTotals"; +import { LoyaltyTransaction } from "./loyaltyTransaction"; +import { LoyaltyTransactionType } from "./loyaltyTransactionType"; +import { LoyaltyUnitType } from "./loyaltyUnitType"; +import { MenuEntry } from "./menuEntry"; +import { MenuEntryTagType } from "./menuEntryTagType"; +import { MerchantDevice } from "./merchantDevice"; +import { MessageCategoryType } from "./messageCategoryType"; +import { MessageClassType } from "./messageClassType"; +import { MessageHeader } from "./messageHeader"; +import { MessageReference } from "./messageReference"; +import { MessageType } from "./messageType"; +import { MobileData } from "./mobileData"; +import { NamedKeyEncryptedData } from "./namedKeyEncryptedData"; +import { NexoDerivedKey } from "./nexoDerivedKey"; +import { OriginalPOITransaction } from "./originalPOITransaction"; +import { OutputBarcode } from "./outputBarcode"; +import { OutputContent } from "./outputContent"; +import { OutputFormatType } from "./outputFormatType"; +import { OutputResult } from "./outputResult"; +import { OutputText } from "./outputText"; +import { PINFormatType } from "./pINFormatType"; +import { PINRequest } from "./pINRequest"; +import { PINRequestType } from "./pINRequestType"; +import { PINResponse } from "./pINResponse"; +import { POICapabilitiesType } from "./pOICapabilitiesType"; +import { POIData } from "./pOIData"; +import { POIProfile } from "./pOIProfile"; +import { POISoftware } from "./pOISoftware"; +import { POIStatus } from "./pOIStatus"; +import { POISystemData } from "./pOISystemData"; +import { POITerminalData } from "./pOITerminalData"; +import { Parameter } from "./parameter"; +import { PaymentAccountReq } from "./paymentAccountReq"; +import { PaymentAccountStatus } from "./paymentAccountStatus"; +import { PaymentAcquirerData } from "./paymentAcquirerData"; +import { PaymentData } from "./paymentData"; +import { PaymentInstrumentData } from "./paymentInstrumentData"; +import { PaymentInstrumentType } from "./paymentInstrumentType"; +import { PaymentReceipt } from "./paymentReceipt"; +import { PaymentRequest } from "./paymentRequest"; +import { PaymentResponse } from "./paymentResponse"; +import { PaymentResult } from "./paymentResult"; +import { PaymentToken } from "./paymentToken"; +import { PaymentTotals } from "./paymentTotals"; +import { PaymentTransaction } from "./paymentTransaction"; +import { PaymentType } from "./paymentType"; +import { PerformedTransaction } from "./performedTransaction"; +import { PeriodUnitType } from "./periodUnitType"; +import { PredefinedContent } from "./predefinedContent"; +import { PrintOutput } from "./printOutput"; +import { PrintRequest } from "./printRequest"; +import { PrintResponse } from "./printResponse"; +import { PrinterStatusType } from "./printerStatusType"; +import { Rebates } from "./rebates"; +import { ReconciliationRequest } from "./reconciliationRequest"; +import { ReconciliationResponse } from "./reconciliationResponse"; +import { ReconciliationType } from "./reconciliationType"; +import { RelativeDistinguishedName } from "./relativeDistinguishedName"; +import { RepeatedMessageResponse } from "./repeatedMessageResponse"; +import { RepeatedResponseMessageBody } from "./repeatedResponseMessageBody"; +import { Response } from "./response"; +import { ResponseModeType } from "./responseModeType"; +import { ResultType } from "./resultType"; +import { ReversalReasonType } from "./reversalReasonType"; +import { ReversalRequest } from "./reversalRequest"; +import { ReversalResponse } from "./reversalResponse"; +import { SaleCapabilitiesType } from "./saleCapabilitiesType"; +import { SaleData } from "./saleData"; +import { SaleItem } from "./saleItem"; +import { SaleItemRebate } from "./saleItemRebate"; +import { SaleProfile } from "./saleProfile"; +import { SaleSoftware } from "./saleSoftware"; +import { SaleTerminalData } from "./saleTerminalData"; +import { SaleToAcquirerData } from "./saleToAcquirerData"; +import { SaleToIssuerData } from "./saleToIssuerData"; +import { SaleToPOIRequest } from "./saleToPOIRequest"; +import { SaleToPOIResponse } from "./saleToPOIResponse"; +import { SaleToPOISecuredMessage } from "./saleToPOISecuredMessage"; +import { SecurityTrailer } from "./securityTrailer"; +import { SensitiveCardData } from "./sensitiveCardData"; +import { SensitiveMobileData } from "./sensitiveMobileData"; +import { ServiceProfilesType } from "./serviceProfilesType"; +import { ServicesEnabledType } from "./servicesEnabledType"; +import { ShopperInteractionDevice } from "./shopperInteractionDevice"; +import { SignaturePoint } from "./signaturePoint"; +import { SignedData } from "./signedData"; +import { Signer } from "./signer"; +import { SignerIdentifier } from "./signerIdentifier"; +import { SoundActionType } from "./soundActionType"; +import { SoundContent } from "./soundContent"; +import { SoundFormatType } from "./soundFormatType"; +import { SoundRequest } from "./soundRequest"; +import { SoundResponse } from "./soundResponse"; +import { SponsoredMerchant } from "./sponsoredMerchant"; +import { StoredValueAccountId } from "./storedValueAccountId"; +import { StoredValueAccountStatus } from "./storedValueAccountStatus"; +import { StoredValueAccountType } from "./storedValueAccountType"; +import { StoredValueData } from "./storedValueData"; +import { StoredValueRequest } from "./storedValueRequest"; +import { StoredValueResponse } from "./storedValueResponse"; +import { StoredValueResult } from "./storedValueResult"; +import { StoredValueTransactionType } from "./storedValueTransactionType"; +import { TerminalEnvironmentType } from "./terminalEnvironmentType"; +import { TokenRequestedType } from "./tokenRequestedType"; +import { TotalDetailsType } from "./totalDetailsType"; +import { TotalFilter } from "./totalFilter"; +import { TrackData } from "./trackData"; +import { TrackFormatType } from "./trackFormatType"; +import { TransactionActionType } from "./transactionActionType"; +import { TransactionConditions } from "./transactionConditions"; +import { TransactionIdentification } from "./transactionIdentification"; +import { TransactionStatusRequest } from "./transactionStatusRequest"; +import { TransactionStatusResponse } from "./transactionStatusResponse"; +import { TransactionToPerform } from "./transactionToPerform"; +import { TransactionTotals } from "./transactionTotals"; +import { TransactionType } from "./transactionType"; +import { TransmitRequest } from "./transmitRequest"; +import { TransmitResponse } from "./transmitResponse"; +import { UTMCoordinates } from "./uTMCoordinates"; +import { UnitOfMeasureType } from "./unitOfMeasureType"; +import { VersionType } from "./versionType"; + +// security +import { EncryptionCredentialDetails } from "../../security/encryptionCredentialDetails"; + + +/* tslint:disable:no-unused-variable */ +const primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +const enumsMap: {[index: string]: any} = { + "AccountType": AccountType, + "AlgorithmType": AlgorithmType, + "AlignmentType": AlignmentType, + "AuthenticatedData.VersionEnum": AuthenticatedData.VersionEnum, + "AuthenticationMethodType": AuthenticationMethodType, + "BarcodeType": BarcodeType, + "CardAcquisitionTransaction.ForceEntryModeEnum": CardAcquisitionTransaction.ForceEntryModeEnum, + "CardAcquisitionTransaction.LoyaltyHandlingEnum": CardAcquisitionTransaction.LoyaltyHandlingEnum, + "CardAcquisitionTransaction.PaymentTypeEnum": CardAcquisitionTransaction.PaymentTypeEnum, + "CardData.EntryModeEnum": CardData.EntryModeEnum, + "CardReaderInitRequest.ForceEntryModeEnum": CardReaderInitRequest.ForceEntryModeEnum, + "CardReaderInitResponse.EntryModeEnum": CardReaderInitResponse.EntryModeEnum, + "CharacterHeightType": CharacterHeightType, + "CharacterStyleType": CharacterStyleType, + "CharacterWidthType": CharacterWidthType, + "CheckData.TypeCodeEnum": CheckData.TypeCodeEnum, + "CheckTypeCodeType": CheckTypeCodeType, + "ColorType": ColorType, + "ContentType": ContentType, + "CustomerOrderReqType": CustomerOrderReqType, + "DeviceType": DeviceType, + "DeviceStatusResponse.StatusEnum": DeviceStatusResponse.StatusEnum, + "DigestedData.VersionEnum": DigestedData.VersionEnum, + "DocumentQualifierType": DocumentQualifierType, + "EnableServiceRequest.ServicesEnabledEnum": EnableServiceRequest.ServicesEnabledEnum, + "EntryModeType": EntryModeType, + "EnvelopedData.VersionEnum": EnvelopedData.VersionEnum, + "ErrorConditionType": ErrorConditionType, + "EventToNotifyType": EventToNotifyType, + "ForceEntryModeType": ForceEntryModeType, + "GenericProfileType": GenericProfileType, + "GetTotalsRequest.TotalDetailsEnum": GetTotalsRequest.TotalDetailsEnum, + "GlobalStatusType": GlobalStatusType, + "IdentificationSupportType": IdentificationSupportType, + "IdentificationType": IdentificationType, + "InfoQualifyType": InfoQualifyType, + "InputCommandType": InputCommandType, + "Instalment.InstalmentTypeEnum": Instalment.InstalmentTypeEnum, + "Instalment.PeriodUnitEnum": Instalment.PeriodUnitEnum, + "InstalmentType": InstalmentType, + "LoginRequest.CustomerOrderReqEnum": LoginRequest.CustomerOrderReqEnum, + "LoginRequest.TokenRequestedTypeEnum": LoginRequest.TokenRequestedTypeEnum, + "LoyaltyAccountId.EntryModeEnum": LoyaltyAccountId.EntryModeEnum, + "LoyaltyAccountId.IdentificationSupportEnum": LoyaltyAccountId.IdentificationSupportEnum, + "LoyaltyAccountStatus.LoyaltyUnitEnum": LoyaltyAccountStatus.LoyaltyUnitEnum, + "LoyaltyAmount.LoyaltyUnitEnum": LoyaltyAmount.LoyaltyUnitEnum, + "LoyaltyHandlingType": LoyaltyHandlingType, + "LoyaltyTransactionType": LoyaltyTransactionType, + "LoyaltyUnitType": LoyaltyUnitType, + "MenuEntry.MenuEntryTagEnum": MenuEntry.MenuEntryTagEnum, + "MenuEntryTagType": MenuEntryTagType, + "MessageCategoryType": MessageCategoryType, + "MessageClassType": MessageClassType, + "MessageReference.MessageCategoryEnum": MessageReference.MessageCategoryEnum, + "MessageType": MessageType, + "NamedKeyEncryptedData.VersionEnum": NamedKeyEncryptedData.VersionEnum, + "OutputBarcode.BarcodeTypeEnum": OutputBarcode.BarcodeTypeEnum, + "OutputFormatType": OutputFormatType, + "OutputText.AlignmentEnum": OutputText.AlignmentEnum, + "OutputText.CharacterHeightEnum": OutputText.CharacterHeightEnum, + "OutputText.CharacterStyleEnum": OutputText.CharacterStyleEnum, + "OutputText.CharacterWidthEnum": OutputText.CharacterWidthEnum, + "OutputText.ColorEnum": OutputText.ColorEnum, + "PINFormatType": PINFormatType, + "PINRequest.PINFormatEnum": PINRequest.PINFormatEnum, + "PINRequestType": PINRequestType, + "POICapabilitiesType": POICapabilitiesType, + "POIProfile.GenericProfileEnum": POIProfile.GenericProfileEnum, + "POIProfile.ServiceProfilesEnum": POIProfile.ServiceProfilesEnum, + "POIStatus.PrinterStatusEnum": POIStatus.PrinterStatusEnum, + "POITerminalData.POICapabilitiesEnum": POITerminalData.POICapabilitiesEnum, + "PaymentAccountReq.AccountTypeEnum": PaymentAccountReq.AccountTypeEnum, + "PaymentData.PaymentTypeEnum": PaymentData.PaymentTypeEnum, + "PaymentInstrumentType": PaymentInstrumentType, + "PaymentResult.AuthenticationMethodEnum": PaymentResult.AuthenticationMethodEnum, + "PaymentResult.PaymentTypeEnum": PaymentResult.PaymentTypeEnum, + "PaymentType": PaymentType, + "PeriodUnitType": PeriodUnitType, + "PrinterStatusType": PrinterStatusType, + "ReconciliationType": ReconciliationType, + "Response.ErrorConditionEnum": Response.ErrorConditionEnum, + "ResponseModeType": ResponseModeType, + "ResultType": ResultType, + "ReversalReasonType": ReversalReasonType, + "SaleCapabilitiesType": SaleCapabilitiesType, + "SaleData.CustomerOrderReqEnum": SaleData.CustomerOrderReqEnum, + "SaleData.TokenRequestedTypeEnum": SaleData.TokenRequestedTypeEnum, + "SaleItem.UnitOfMeasureEnum": SaleItem.UnitOfMeasureEnum, + "SaleItemRebate.UnitOfMeasureEnum": SaleItemRebate.UnitOfMeasureEnum, + "SaleProfile.GenericProfileEnum": SaleProfile.GenericProfileEnum, + "SaleProfile.ServiceProfilesEnum": SaleProfile.ServiceProfilesEnum, + "SaleTerminalData.SaleCapabilitiesEnum": SaleTerminalData.SaleCapabilitiesEnum, + "SaleTerminalData.TerminalEnvironmentEnum": SaleTerminalData.TerminalEnvironmentEnum, + "ServiceProfilesType": ServiceProfilesType, + "ServicesEnabledType": ServicesEnabledType, + "SignedData.VersionEnum": SignedData.VersionEnum, + "Signer.VersionEnum": Signer.VersionEnum, + "SoundActionType": SoundActionType, + "SoundContent.SoundFormatEnum": SoundContent.SoundFormatEnum, + "SoundFormatType": SoundFormatType, + "SoundRequest.ResponseModeEnum": SoundRequest.ResponseModeEnum, + "StoredValueAccountId.EntryModeEnum": StoredValueAccountId.EntryModeEnum, + "StoredValueAccountType": StoredValueAccountType, + "StoredValueTransactionType": StoredValueTransactionType, + "TerminalEnvironmentType": TerminalEnvironmentType, + "TokenRequestedType": TokenRequestedType, + "TotalDetailsType": TotalDetailsType, + "TrackData.TrackFormatEnum": TrackData.TrackFormatEnum, + "TrackFormatType": TrackFormatType, + "TransactionActionType": TransactionActionType, + "TransactionConditions.ForceEntryModeEnum": TransactionConditions.ForceEntryModeEnum, + "TransactionConditions.LoyaltyHandlingEnum": TransactionConditions.LoyaltyHandlingEnum, + "TransactionStatusRequest.DocumentQualifierEnum": TransactionStatusRequest.DocumentQualifierEnum, + "TransactionTotals.ErrorConditionEnum": TransactionTotals.ErrorConditionEnum, + "TransactionTotals.LoyaltyUnitEnum": TransactionTotals.LoyaltyUnitEnum, + "TransactionType": TransactionType, + "UnitOfMeasureType": UnitOfMeasureType, + "VersionType": VersionType, +}; + +const typeMap: {[index: string]: any} = { + "AbortRequest": AbortRequest, + "AdminRequest": AdminRequest, + "AdminResponse": AdminResponse, + "AlgorithmIdentifier": AlgorithmIdentifier, + "AllowedProduct": AllowedProduct, + "Amount": Amount, + "AmountsReq": AmountsReq, + "AmountsResp": AmountsResp, + "ApplicationInfo": ApplicationInfo, + "AreaSize": AreaSize, + "AuthenticatedData": AuthenticatedData, + "BalanceInquiryRequest": BalanceInquiryRequest, + "BalanceInquiryResponse": BalanceInquiryResponse, + "BatchRequest": BatchRequest, + "BatchResponse": BatchResponse, + "CapturedSignature": CapturedSignature, + "CardAcquisitionRequest": CardAcquisitionRequest, + "CardAcquisitionResponse": CardAcquisitionResponse, + "CardAcquisitionTransaction": CardAcquisitionTransaction, + "CardData": CardData, + "CardReaderAPDURequest": CardReaderAPDURequest, + "CardReaderAPDUResponse": CardReaderAPDUResponse, + "CardReaderInitRequest": CardReaderInitRequest, + "CardReaderInitResponse": CardReaderInitResponse, + "CardReaderPowerOffRequest": CardReaderPowerOffRequest, + "CardReaderPowerOffResponse": CardReaderPowerOffResponse, + "CardholderPIN": CardholderPIN, + "CashHandlingDevice": CashHandlingDevice, + "CheckData": CheckData, + "CoinsOrBills": CoinsOrBills, + "CloudDeviceApiRequest": CloudDeviceApiRequest, + "CloudDeviceApiResponse": CloudDeviceApiResponse, + "CloudDeviceApiSecuredRequest": CloudDeviceApiSecuredRequest, + "CloudDeviceApiSecuredResponse": CloudDeviceApiSecuredResponse, + "CommonField": CommonField, + "ConnectedDevicesResponse": ConnectedDevicesResponse, + "ContentInformation": ContentInformation, + "CurrencyConversion": CurrencyConversion, + "CustomerOrder": CustomerOrder, + "DeviceStatusResponse": DeviceStatusResponse, + "DiagnosisRequest": DiagnosisRequest, + "DiagnosisResponse": DiagnosisResponse, + "DigestedData": DigestedData, + "DisplayOutput": DisplayOutput, + "DisplayRequest": DisplayRequest, + "DisplayResponse": DisplayResponse, + "EnableServiceRequest": EnableServiceRequest, + "EnableServiceResponse": EnableServiceResponse, + "EncapsulatedContent": EncapsulatedContent, + "EncryptedContent": EncryptedContent, + "EncryptionCredentialDetails": EncryptionCredentialDetails, + "EnvelopedData": EnvelopedData, + "EventNotification": EventNotification, + "ExternalPlatform": ExternalPlatform, + "GeographicCoordinates": GeographicCoordinates, + "Geolocation": Geolocation, + "GetTotalsRequest": GetTotalsRequest, + "GetTotalsResponse": GetTotalsResponse, + "HostStatus": HostStatus, + "ICCResetData": ICCResetData, + "Input": Input, + "InputData": InputData, + "InputRequest": InputRequest, + "InputResponse": InputResponse, + "InputResult": InputResult, + "InputUpdate": InputUpdate, + "Instalment": Instalment, + "Issuer": Issuer, + "IssuerAndSerialNumber": IssuerAndSerialNumber, + "LoginRequest": LoginRequest, + "LoginResponse": LoginResponse, + "LogoutRequest": LogoutRequest, + "LogoutResponse": LogoutResponse, + "LoyaltyAccount": LoyaltyAccount, + "LoyaltyAccountId": LoyaltyAccountId, + "LoyaltyAccountReq": LoyaltyAccountReq, + "LoyaltyAccountStatus": LoyaltyAccountStatus, + "LoyaltyAcquirerData": LoyaltyAcquirerData, + "LoyaltyAmount": LoyaltyAmount, + "LoyaltyData": LoyaltyData, + "LoyaltyRequest": LoyaltyRequest, + "LoyaltyResponse": LoyaltyResponse, + "LoyaltyResult": LoyaltyResult, + "LoyaltyTotals": LoyaltyTotals, + "LoyaltyTransaction": LoyaltyTransaction, + "MenuEntry": MenuEntry, + "MerchantDevice": MerchantDevice, + "MessageHeader": MessageHeader, + "MessageReference": MessageReference, + "MobileData": MobileData, + "NamedKeyEncryptedData": NamedKeyEncryptedData, + "NexoDerivedKey": NexoDerivedKey, + "OriginalPOITransaction": OriginalPOITransaction, + "OutputBarcode": OutputBarcode, + "OutputContent": OutputContent, + "OutputResult": OutputResult, + "OutputText": OutputText, + "PINRequest": PINRequest, + "PINResponse": PINResponse, + "POIData": POIData, + "POIProfile": POIProfile, + "POISoftware": POISoftware, + "POIStatus": POIStatus, + "POISystemData": POISystemData, + "POITerminalData": POITerminalData, + "Parameter": Parameter, + "PaymentAccountReq": PaymentAccountReq, + "PaymentAccountStatus": PaymentAccountStatus, + "PaymentAcquirerData": PaymentAcquirerData, + "PaymentData": PaymentData, + "PaymentInstrumentData": PaymentInstrumentData, + "PaymentReceipt": PaymentReceipt, + "PaymentRequest": PaymentRequest, + "PaymentResponse": PaymentResponse, + "PaymentResult": PaymentResult, + "PaymentToken": PaymentToken, + "PaymentTotals": PaymentTotals, + "PaymentTransaction": PaymentTransaction, + "PerformedTransaction": PerformedTransaction, + "PredefinedContent": PredefinedContent, + "PrintOutput": PrintOutput, + "PrintRequest": PrintRequest, + "PrintResponse": PrintResponse, + "Rebates": Rebates, + "ReconciliationRequest": ReconciliationRequest, + "ReconciliationResponse": ReconciliationResponse, + "RelativeDistinguishedName": RelativeDistinguishedName, + "RepeatedMessageResponse": RepeatedMessageResponse, + "RepeatedResponseMessageBody": RepeatedResponseMessageBody, + "Response": Response, + "ReversalRequest": ReversalRequest, + "ReversalResponse": ReversalResponse, + "SaleData": SaleData, + "SaleItem": SaleItem, + "SaleItemRebate": SaleItemRebate, + "SaleProfile": SaleProfile, + "SaleSoftware": SaleSoftware, + "SaleTerminalData": SaleTerminalData, + "SaleToAcquirerData": SaleToAcquirerData, + "SaleToIssuerData": SaleToIssuerData, + "SaleToPOIRequest": SaleToPOIRequest, + "SaleToPOIResponse": SaleToPOIResponse, + "SaleToPOISecuredMessage": SaleToPOISecuredMessage, + "SecurityTrailer": SecurityTrailer, + "SensitiveCardData": SensitiveCardData, + "SensitiveMobileData": SensitiveMobileData, + "ShopperInteractionDevice": ShopperInteractionDevice, + "SignaturePoint": SignaturePoint, + "SignedData": SignedData, + "Signer": Signer, + "SignerIdentifier": SignerIdentifier, + "SoundContent": SoundContent, + "SoundRequest": SoundRequest, + "SoundResponse": SoundResponse, + "SponsoredMerchant": SponsoredMerchant, + "StoredValueAccountId": StoredValueAccountId, + "StoredValueAccountStatus": StoredValueAccountStatus, + "StoredValueData": StoredValueData, + "StoredValueRequest": StoredValueRequest, + "StoredValueResponse": StoredValueResponse, + "StoredValueResult": StoredValueResult, + "TotalFilter": TotalFilter, + "TrackData": TrackData, + "TransactionConditions": TransactionConditions, + "TransactionIdentification": TransactionIdentification, + "TransactionStatusRequest": TransactionStatusRequest, + "TransactionStatusResponse": TransactionStatusResponse, + "TransactionToPerform": TransactionToPerform, + "TransactionTotals": TransactionTotals, + "TransmitRequest": TransmitRequest, + "TransmitResponse": TransmitResponse, + "UTMCoordinates": UTMCoordinates, +}; + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + const discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == undefined) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + const discriminatorType = data[discriminatorProperty]; + if (typeMap[discriminatorType]) { + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + const transformedData: any[] = []; + for (const index in data) { + const date = data[index]; + transformedData.push(ObjectSerializer.serialize(date, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else if (type === "SaleToAcquirerData") { + if (typeof data === 'string') { + return data; // splits payment for terminal + } + const dataString = JSON.stringify(data); + return Buffer.from(dataString).toString("base64"); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + const attributeTypes = typeMap[type].getAttributeTypeMap(); + const instance: {[index: string]: any} = {}; + for (const index in attributeTypes) { + const attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + const transformedData: any[] = []; + for (const index in data) { + const date = data[index]; + transformedData.push(ObjectSerializer.deserialize(date, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + const instance = new typeMap[type](); + const attributeTypes = typeMap[type].getAttributeTypeMap(); + for (const index in attributeTypes) { + const attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} diff --git a/src/typings/cloudDevice/namedKeyEncryptedData.ts b/src/typings/cloudDevice/namedKeyEncryptedData.ts new file mode 100644 index 000000000..5ae92103c --- /dev/null +++ b/src/typings/cloudDevice/namedKeyEncryptedData.ts @@ -0,0 +1,67 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { EncryptedContent } from './encryptedContent'; + +export class NamedKeyEncryptedData { + 'EncryptedContent': EncryptedContent; + 'KeyName'?: string; + 'Version'?: NamedKeyEncryptedData.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EncryptedContent", + "baseName": "EncryptedContent", + "type": "EncryptedContent" + }, + { + "name": "KeyName", + "baseName": "KeyName", + "type": "string" + }, + { + "name": "Version", + "baseName": "Version", + "type": "NamedKeyEncryptedData.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return NamedKeyEncryptedData.attributeTypeMap; + } +} + +export namespace NamedKeyEncryptedData { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/nexoDerivedKey.ts b/src/typings/cloudDevice/nexoDerivedKey.ts new file mode 100644 index 000000000..c7f35cf52 --- /dev/null +++ b/src/typings/cloudDevice/nexoDerivedKey.ts @@ -0,0 +1,55 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class NexoDerivedKey { + 'cipherKey'?: any | null; + 'hmacKey'?: any | null; + 'iv'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cipherKey", + "baseName": "cipherKey", + "type": "any" + }, + { + "name": "hmacKey", + "baseName": "hmacKey", + "type": "any" + }, + { + "name": "iv", + "baseName": "iv", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return NexoDerivedKey.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/originalPOITransaction.ts b/src/typings/cloudDevice/originalPOITransaction.ts new file mode 100644 index 000000000..e654b7e1c --- /dev/null +++ b/src/typings/cloudDevice/originalPOITransaction.ts @@ -0,0 +1,87 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionIdentification } from './transactionIdentification'; + +export class OriginalPOITransaction { + 'AcquirerID'?: string; + 'ApprovalCode'?: string; + 'CustomerLanguage'?: string; + 'HostTransactionID'?: TransactionIdentification; + 'POIID'?: string; + 'POITransactionID'?: TransactionIdentification; + 'ReuseCardDataFlag'?: boolean; + 'SaleID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "string" + }, + { + "name": "ApprovalCode", + "baseName": "ApprovalCode", + "type": "string" + }, + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "HostTransactionID", + "baseName": "HostTransactionID", + "type": "TransactionIdentification" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + }, + { + "name": "POITransactionID", + "baseName": "POITransactionID", + "type": "TransactionIdentification" + }, + { + "name": "ReuseCardDataFlag", + "baseName": "ReuseCardDataFlag", + "type": "boolean" + }, + { + "name": "SaleID", + "baseName": "SaleID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return OriginalPOITransaction.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/outputBarcode.ts b/src/typings/cloudDevice/outputBarcode.ts new file mode 100644 index 000000000..3e0292204 --- /dev/null +++ b/src/typings/cloudDevice/outputBarcode.ts @@ -0,0 +1,60 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class OutputBarcode { + 'BarcodeType'?: OutputBarcode.BarcodeTypeEnum; + 'BarcodeValue'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "BarcodeType", + "baseName": "BarcodeType", + "type": "OutputBarcode.BarcodeTypeEnum" + }, + { + "name": "BarcodeValue", + "baseName": "BarcodeValue", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return OutputBarcode.attributeTypeMap; + } +} + +export namespace OutputBarcode { + export enum BarcodeTypeEnum { + Code128 = 'Code128', + Code25 = 'Code25', + Ean13 = 'EAN13', + Ean8 = 'EAN8', + Pdf417 = 'PDF417', + Qrcode = 'QRCode', + Upca = 'UPCA' + } +} diff --git a/src/typings/cloudDevice/outputContent.ts b/src/typings/cloudDevice/outputContent.ts new file mode 100644 index 000000000..98be6c070 --- /dev/null +++ b/src/typings/cloudDevice/outputContent.ts @@ -0,0 +1,72 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { OutputBarcode } from './outputBarcode'; +import { OutputFormatType } from './outputFormatType'; +import { OutputText } from './outputText'; +import { PredefinedContent } from './predefinedContent'; + +export class OutputContent { + 'OutputBarcode'?: OutputBarcode; + 'OutputFormat': OutputFormatType; + 'OutputText'?: Array; + 'OutputXHTML'?: any | null; + 'PredefinedContent'?: PredefinedContent; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "OutputBarcode", + "baseName": "OutputBarcode", + "type": "OutputBarcode" + }, + { + "name": "OutputFormat", + "baseName": "OutputFormat", + "type": "OutputFormatType" + }, + { + "name": "OutputText", + "baseName": "OutputText", + "type": "Array" + }, + { + "name": "OutputXHTML", + "baseName": "OutputXHTML", + "type": "any" + }, + { + "name": "PredefinedContent", + "baseName": "PredefinedContent", + "type": "PredefinedContent" + } ]; + + static getAttributeTypeMap() { + return OutputContent.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/outputFormatType.ts b/src/typings/cloudDevice/outputFormatType.ts new file mode 100644 index 000000000..e6e3b2a01 --- /dev/null +++ b/src/typings/cloudDevice/outputFormatType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum OutputFormatType { + BarCode = 'BarCode', + MessageRef = 'MessageRef', + Text = 'Text', + Xhtml = 'XHTML' +} diff --git a/src/typings/cloudDevice/outputResult.ts b/src/typings/cloudDevice/outputResult.ts new file mode 100644 index 000000000..985ebe79e --- /dev/null +++ b/src/typings/cloudDevice/outputResult.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DeviceType } from './deviceType'; +import { InfoQualifyType } from './infoQualifyType'; +import { Response } from './response'; + +export class OutputResult { + 'Device': DeviceType; + 'InfoQualify': InfoQualifyType; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Device", + "baseName": "Device", + "type": "DeviceType" + }, + { + "name": "InfoQualify", + "baseName": "InfoQualify", + "type": "InfoQualifyType" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return OutputResult.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/outputText.ts b/src/typings/cloudDevice/outputText.ts new file mode 100644 index 000000000..092a972ae --- /dev/null +++ b/src/typings/cloudDevice/outputText.ts @@ -0,0 +1,136 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class OutputText { + 'Alignment'?: OutputText.AlignmentEnum; + 'CharacterHeight'?: OutputText.CharacterHeightEnum; + 'CharacterSet'?: number; + 'CharacterStyle'?: OutputText.CharacterStyleEnum; + 'CharacterWidth'?: OutputText.CharacterWidthEnum; + 'Color'?: OutputText.ColorEnum; + 'EndOfLineFlag'?: boolean; + 'Font'?: string; + 'StartColumn'?: number; + 'StartRow'?: number; + 'Text'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Alignment", + "baseName": "Alignment", + "type": "OutputText.AlignmentEnum" + }, + { + "name": "CharacterHeight", + "baseName": "CharacterHeight", + "type": "OutputText.CharacterHeightEnum" + }, + { + "name": "CharacterSet", + "baseName": "CharacterSet", + "type": "number" + }, + { + "name": "CharacterStyle", + "baseName": "CharacterStyle", + "type": "OutputText.CharacterStyleEnum" + }, + { + "name": "CharacterWidth", + "baseName": "CharacterWidth", + "type": "OutputText.CharacterWidthEnum" + }, + { + "name": "Color", + "baseName": "Color", + "type": "OutputText.ColorEnum" + }, + { + "name": "EndOfLineFlag", + "baseName": "EndOfLineFlag", + "type": "boolean" + }, + { + "name": "Font", + "baseName": "Font", + "type": "string" + }, + { + "name": "StartColumn", + "baseName": "StartColumn", + "type": "number" + }, + { + "name": "StartRow", + "baseName": "StartRow", + "type": "number" + }, + { + "name": "Text", + "baseName": "Text", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return OutputText.attributeTypeMap; + } +} + +export namespace OutputText { + export enum AlignmentEnum { + Centred = 'Centred', + Justified = 'Justified', + Left = 'Left', + Right = 'Right' + } + export enum CharacterHeightEnum { + DoubleHeight = 'DoubleHeight', + HalfHeight = 'HalfHeight', + SingleHeight = 'SingleHeight' + } + export enum CharacterStyleEnum { + Bold = 'Bold', + Italic = 'Italic', + Normal = 'Normal', + Underlined = 'Underlined' + } + export enum CharacterWidthEnum { + DoubleWidth = 'DoubleWidth', + SingleWidth = 'SingleWidth' + } + export enum ColorEnum { + Black = 'Black', + Blue = 'Blue', + Cyan = 'Cyan', + Green = 'Green', + Magenta = 'Magenta', + Red = 'Red', + White = 'White', + Yellow = 'Yellow' + } +} diff --git a/src/typings/cloudDevice/pINFormatType.ts b/src/typings/cloudDevice/pINFormatType.ts new file mode 100644 index 000000000..2777df04a --- /dev/null +++ b/src/typings/cloudDevice/pINFormatType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum PINFormatType { + Iso0 = 'ISO0', + Iso1 = 'ISO1', + Iso2 = 'ISO2', + Iso3 = 'ISO3' +} diff --git a/src/typings/cloudDevice/pINRequest.ts b/src/typings/cloudDevice/pINRequest.ts new file mode 100644 index 000000000..ea4902feb --- /dev/null +++ b/src/typings/cloudDevice/pINRequest.ts @@ -0,0 +1,96 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CardholderPIN } from './cardholderPIN'; +import { PINRequestType } from './pINRequestType'; + +export class PINRequest { + 'AdditionalInput'?: string; + 'CardholderPIN'?: CardholderPIN; + 'KeyReference'?: string; + 'MaxWaitingTime'?: number; + 'PINEncAlgorithm'?: string; + 'PINFormat'?: PINRequest.PINFormatEnum; + 'PINRequestType': PINRequestType; + 'PINVerifMethod'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdditionalInput", + "baseName": "AdditionalInput", + "type": "string" + }, + { + "name": "CardholderPIN", + "baseName": "CardholderPIN", + "type": "CardholderPIN" + }, + { + "name": "KeyReference", + "baseName": "KeyReference", + "type": "string" + }, + { + "name": "MaxWaitingTime", + "baseName": "MaxWaitingTime", + "type": "number" + }, + { + "name": "PINEncAlgorithm", + "baseName": "PINEncAlgorithm", + "type": "string" + }, + { + "name": "PINFormat", + "baseName": "PINFormat", + "type": "PINRequest.PINFormatEnum" + }, + { + "name": "PINRequestType", + "baseName": "PINRequestType", + "type": "PINRequestType" + }, + { + "name": "PINVerifMethod", + "baseName": "PINVerifMethod", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PINRequest.attributeTypeMap; + } +} + +export namespace PINRequest { + export enum PINFormatEnum { + Iso0 = 'ISO0', + Iso1 = 'ISO1', + Iso2 = 'ISO2', + Iso3 = 'ISO3' + } +} diff --git a/src/typings/cloudDevice/pINRequestType.ts b/src/typings/cloudDevice/pINRequestType.ts new file mode 100644 index 000000000..deb5969f5 --- /dev/null +++ b/src/typings/cloudDevice/pINRequestType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum PINRequestType { + PinEnter = 'PINEnter', + PinVerify = 'PINVerify', + PinVerifyOnly = 'PINVerifyOnly' +} diff --git a/src/typings/cloudDevice/pINResponse.ts b/src/typings/cloudDevice/pINResponse.ts new file mode 100644 index 000000000..42a51bda9 --- /dev/null +++ b/src/typings/cloudDevice/pINResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CardholderPIN } from './cardholderPIN'; +import { Response } from './response'; + +export class PINResponse { + 'CardholderPIN'?: CardholderPIN; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardholderPIN", + "baseName": "CardholderPIN", + "type": "CardholderPIN" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return PINResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/pOICapabilitiesType.ts b/src/typings/cloudDevice/pOICapabilitiesType.ts new file mode 100644 index 000000000..80775e4c7 --- /dev/null +++ b/src/typings/cloudDevice/pOICapabilitiesType.ts @@ -0,0 +1,42 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum POICapabilitiesType { + CashHandling = 'CashHandling', + CashierDisplay = 'CashierDisplay', + CashierError = 'CashierError', + CashierInput = 'CashierInput', + CustomerDisplay = 'CustomerDisplay', + CustomerError = 'CustomerError', + CustomerInput = 'CustomerInput', + EmvContactless = 'EMVContactless', + Icc = 'ICC', + MagStripe = 'MagStripe', + PrinterDocument = 'PrinterDocument', + PrinterReceipt = 'PrinterReceipt', + PrinterVoucher = 'PrinterVoucher' +} diff --git a/src/typings/cloudDevice/pOIData.ts b/src/typings/cloudDevice/pOIData.ts new file mode 100644 index 000000000..2acda1245 --- /dev/null +++ b/src/typings/cloudDevice/pOIData.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionIdentification } from './transactionIdentification'; + +export class POIData { + 'POIReconciliationID'?: string; + 'POITransactionID': TransactionIdentification; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POIReconciliationID", + "baseName": "POIReconciliationID", + "type": "string" + }, + { + "name": "POITransactionID", + "baseName": "POITransactionID", + "type": "TransactionIdentification" + } ]; + + static getAttributeTypeMap() { + return POIData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/pOIProfile.ts b/src/typings/cloudDevice/pOIProfile.ts new file mode 100644 index 000000000..1349298d8 --- /dev/null +++ b/src/typings/cloudDevice/pOIProfile.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class POIProfile { + 'GenericProfile'?: POIProfile.GenericProfileEnum; + 'ServiceProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "GenericProfile", + "baseName": "GenericProfile", + "type": "POIProfile.GenericProfileEnum" + }, + { + "name": "ServiceProfiles", + "baseName": "ServiceProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return POIProfile.attributeTypeMap; + } +} + +export namespace POIProfile { + export enum GenericProfileEnum { + Basic = 'Basic', + Extended = 'Extended', + Standard = 'Standard' + } + export enum ServiceProfilesEnum { + Batch = 'Batch', + CardReader = 'CardReader', + Communication = 'Communication', + Loyalty = 'Loyalty', + OneTimeRes = 'OneTimeRes', + Pin = 'PIN', + Reservation = 'Reservation', + Sound = 'Sound', + StoredValue = 'StoredValue', + Synchro = 'Synchro' + } +} diff --git a/src/typings/cloudDevice/pOISoftware.ts b/src/typings/cloudDevice/pOISoftware.ts new file mode 100644 index 000000000..8f8fd77eb --- /dev/null +++ b/src/typings/cloudDevice/pOISoftware.ts @@ -0,0 +1,62 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class POISoftware { + 'ApplicationName': string; + 'CertificationCode': string; + 'ManufacturerID': string; + 'SoftwareVersion': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ApplicationName", + "baseName": "ApplicationName", + "type": "string" + }, + { + "name": "CertificationCode", + "baseName": "CertificationCode", + "type": "string" + }, + { + "name": "ManufacturerID", + "baseName": "ManufacturerID", + "type": "string" + }, + { + "name": "SoftwareVersion", + "baseName": "SoftwareVersion", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return POISoftware.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/pOIStatus.ts b/src/typings/cloudDevice/pOIStatus.ts new file mode 100644 index 000000000..487da57d5 --- /dev/null +++ b/src/typings/cloudDevice/pOIStatus.ts @@ -0,0 +1,103 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2021 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Terminal API + * Definition of Terminal API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { CashHandlingDevice } from './cashHandlingDevice'; +import { GlobalStatusType } from './globalStatusType'; + +export class POIStatus { + 'CardReaderOKFlag'?: boolean; + 'CashHandlingDevice'?: Array; + 'CommunicationOKFlag'?: boolean; + 'FraudPreventionFlag'?: boolean; + 'GlobalStatus': GlobalStatusType; + 'PEDOKFlag'?: boolean; + 'PrinterStatus'?: POIStatus.PrinterStatusEnum; + 'SecurityOKFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardReaderOKFlag", + "baseName": "CardReaderOKFlag", + "type": "boolean" + }, + { + "name": "CashHandlingDevice", + "baseName": "CashHandlingDevice", + "type": "Array" + }, + { + "name": "CommunicationOKFlag", + "baseName": "CommunicationOKFlag", + "type": "boolean" + }, + { + "name": "FraudPreventionFlag", + "baseName": "FraudPreventionFlag", + "type": "boolean" + }, + { + "name": "GlobalStatus", + "baseName": "GlobalStatus", + "type": "GlobalStatusType" + }, + { + "name": "PEDOKFlag", + "baseName": "PEDOKFlag", + "type": "boolean" + }, + { + "name": "PrinterStatus", + "baseName": "PrinterStatus", + "type": "POIStatus.PrinterStatusEnum" + }, + { + "name": "SecurityOKFlag", + "baseName": "SecurityOKFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return POIStatus.attributeTypeMap; + } +} + +export namespace POIStatus { + export enum PrinterStatusEnum { + NoPaper = 'NoPaper', + Ok = 'OK', + OutOfOrder = 'OutOfOrder', + PaperJam = 'PaperJam', + PaperLow = 'PaperLow' + } +} diff --git a/src/typings/cloudDevice/pOISystemData.ts b/src/typings/cloudDevice/pOISystemData.ts new file mode 100644 index 000000000..5a0d96827 --- /dev/null +++ b/src/typings/cloudDevice/pOISystemData.ts @@ -0,0 +1,65 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { POISoftware } from './pOISoftware'; +import { POIStatus } from './pOIStatus'; +import { POITerminalData } from './pOITerminalData'; + +export class POISystemData { + 'DateTime': { [key: string]: any; }; + 'POISoftware': POISoftware; + 'POIStatus'?: POIStatus; + 'POITerminalData'?: POITerminalData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DateTime", + "baseName": "DateTime", + "type": "{ [key: string]: any; }" + }, + { + "name": "POISoftware", + "baseName": "POISoftware", + "type": "POISoftware" + }, + { + "name": "POIStatus", + "baseName": "POIStatus", + "type": "POIStatus" + }, + { + "name": "POITerminalData", + "baseName": "POITerminalData", + "type": "POITerminalData" + } ]; + + static getAttributeTypeMap() { + return POISystemData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/pOITerminalData.ts b/src/typings/cloudDevice/pOITerminalData.ts new file mode 100644 index 000000000..a83eb210c --- /dev/null +++ b/src/typings/cloudDevice/pOITerminalData.ts @@ -0,0 +1,81 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { POIProfile } from './pOIProfile'; +import { TerminalEnvironmentType } from './terminalEnvironmentType'; + +export class POITerminalData { + 'POICapabilities': Array; + 'POIProfile'?: POIProfile; + 'POISerialNumber': string; + 'TerminalEnvironment': TerminalEnvironmentType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POICapabilities", + "baseName": "POICapabilities", + "type": "Array" + }, + { + "name": "POIProfile", + "baseName": "POIProfile", + "type": "POIProfile" + }, + { + "name": "POISerialNumber", + "baseName": "POISerialNumber", + "type": "string" + }, + { + "name": "TerminalEnvironment", + "baseName": "TerminalEnvironment", + "type": "TerminalEnvironmentType" + } ]; + + static getAttributeTypeMap() { + return POITerminalData.attributeTypeMap; + } +} + +export namespace POITerminalData { + export enum POICapabilitiesEnum { + CashHandling = 'CashHandling', + CashierDisplay = 'CashierDisplay', + CashierError = 'CashierError', + CashierInput = 'CashierInput', + CustomerDisplay = 'CustomerDisplay', + CustomerError = 'CustomerError', + CustomerInput = 'CustomerInput', + EmvContactless = 'EMVContactless', + Icc = 'ICC', + MagStripe = 'MagStripe', + PrinterDocument = 'PrinterDocument', + PrinterReceipt = 'PrinterReceipt', + PrinterVoucher = 'PrinterVoucher' + } +} diff --git a/src/typings/cloudDevice/parameter.ts b/src/typings/cloudDevice/parameter.ts new file mode 100644 index 000000000..95766aba6 --- /dev/null +++ b/src/typings/cloudDevice/parameter.ts @@ -0,0 +1,44 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class Parameter { + 'InitialisationVector'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "InitialisationVector", + "baseName": "InitialisationVector", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return Parameter.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentAccountReq.ts b/src/typings/cloudDevice/paymentAccountReq.ts new file mode 100644 index 000000000..05641c5c1 --- /dev/null +++ b/src/typings/cloudDevice/paymentAccountReq.ts @@ -0,0 +1,70 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { PaymentInstrumentData } from './paymentInstrumentData'; +import { TransactionIdentification } from './transactionIdentification'; + +export class PaymentAccountReq { + 'AccountType'?: PaymentAccountReq.AccountTypeEnum; + 'CardAcquisitionReference'?: TransactionIdentification; + 'PaymentInstrumentData'?: PaymentInstrumentData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AccountType", + "baseName": "AccountType", + "type": "PaymentAccountReq.AccountTypeEnum" + }, + { + "name": "CardAcquisitionReference", + "baseName": "CardAcquisitionReference", + "type": "TransactionIdentification" + }, + { + "name": "PaymentInstrumentData", + "baseName": "PaymentInstrumentData", + "type": "PaymentInstrumentData" + } ]; + + static getAttributeTypeMap() { + return PaymentAccountReq.attributeTypeMap; + } +} + +export namespace PaymentAccountReq { + export enum AccountTypeEnum { + CardTotals = 'CardTotals', + Checking = 'Checking', + CreditCard = 'CreditCard', + Default = 'Default', + EpurseCard = 'EpurseCard', + Investment = 'Investment', + Savings = 'Savings', + Universal = 'Universal' + } +} diff --git a/src/typings/cloudDevice/paymentAccountStatus.ts b/src/typings/cloudDevice/paymentAccountStatus.ts new file mode 100644 index 000000000..29de8bde9 --- /dev/null +++ b/src/typings/cloudDevice/paymentAccountStatus.ts @@ -0,0 +1,71 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyAccountStatus } from './loyaltyAccountStatus'; +import { PaymentAcquirerData } from './paymentAcquirerData'; +import { PaymentInstrumentData } from './paymentInstrumentData'; + +export class PaymentAccountStatus { + 'Currency'?: string; + 'CurrentBalance'?: number; + 'LoyaltyAccountStatus'?: LoyaltyAccountStatus; + 'PaymentAcquirerData'?: PaymentAcquirerData; + 'PaymentInstrumentData'?: PaymentInstrumentData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "CurrentBalance", + "baseName": "CurrentBalance", + "type": "number" + }, + { + "name": "LoyaltyAccountStatus", + "baseName": "LoyaltyAccountStatus", + "type": "LoyaltyAccountStatus" + }, + { + "name": "PaymentAcquirerData", + "baseName": "PaymentAcquirerData", + "type": "PaymentAcquirerData" + }, + { + "name": "PaymentInstrumentData", + "baseName": "PaymentInstrumentData", + "type": "PaymentInstrumentData" + } ]; + + static getAttributeTypeMap() { + return PaymentAccountStatus.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentAcquirerData.ts b/src/typings/cloudDevice/paymentAcquirerData.ts new file mode 100644 index 000000000..c85cd4b6b --- /dev/null +++ b/src/typings/cloudDevice/paymentAcquirerData.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionIdentification } from './transactionIdentification'; + +export class PaymentAcquirerData { + 'AcquirerID'?: string; + 'AcquirerPOIID': string; + 'AcquirerTransactionID'?: TransactionIdentification; + 'ApprovalCode'?: string; + 'MerchantID': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "string" + }, + { + "name": "AcquirerPOIID", + "baseName": "AcquirerPOIID", + "type": "string" + }, + { + "name": "AcquirerTransactionID", + "baseName": "AcquirerTransactionID", + "type": "TransactionIdentification" + }, + { + "name": "ApprovalCode", + "baseName": "ApprovalCode", + "type": "string" + }, + { + "name": "MerchantID", + "baseName": "MerchantID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentAcquirerData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentData.ts b/src/typings/cloudDevice/paymentData.ts new file mode 100644 index 000000000..fed7ec8d2 --- /dev/null +++ b/src/typings/cloudDevice/paymentData.ts @@ -0,0 +1,100 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CustomerOrder } from './customerOrder'; +import { Instalment } from './instalment'; +import { PaymentInstrumentData } from './paymentInstrumentData'; +import { TransactionIdentification } from './transactionIdentification'; + +export class PaymentData { + 'CardAcquisitionReference'?: TransactionIdentification; + 'CustomerOrder'?: CustomerOrder; + 'Instalment'?: Instalment; + 'PaymentInstrumentData'?: PaymentInstrumentData; + 'PaymentType'?: PaymentData.PaymentTypeEnum; + 'RequestedValidityDate'?: string; + 'SplitPaymentFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardAcquisitionReference", + "baseName": "CardAcquisitionReference", + "type": "TransactionIdentification" + }, + { + "name": "CustomerOrder", + "baseName": "CustomerOrder", + "type": "CustomerOrder" + }, + { + "name": "Instalment", + "baseName": "Instalment", + "type": "Instalment" + }, + { + "name": "PaymentInstrumentData", + "baseName": "PaymentInstrumentData", + "type": "PaymentInstrumentData" + }, + { + "name": "PaymentType", + "baseName": "PaymentType", + "type": "PaymentData.PaymentTypeEnum" + }, + { + "name": "RequestedValidityDate", + "baseName": "RequestedValidityDate", + "type": "string" + }, + { + "name": "SplitPaymentFlag", + "baseName": "SplitPaymentFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PaymentData.attributeTypeMap; + } +} + +export namespace PaymentData { + export enum PaymentTypeEnum { + CashAdvance = 'CashAdvance', + CashDeposit = 'CashDeposit', + Completion = 'Completion', + FirstReservation = 'FirstReservation', + Instalment = 'Instalment', + IssuerInstalment = 'IssuerInstalment', + Normal = 'Normal', + OneTimeReservation = 'OneTimeReservation', + PaidOut = 'PaidOut', + Recurring = 'Recurring', + Refund = 'Refund', + UpdateReservation = 'UpdateReservation' + } +} diff --git a/src/typings/cloudDevice/paymentInstrumentData.ts b/src/typings/cloudDevice/paymentInstrumentData.ts new file mode 100644 index 000000000..66b37bc47 --- /dev/null +++ b/src/typings/cloudDevice/paymentInstrumentData.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CardData } from './cardData'; +import { CheckData } from './checkData'; +import { MobileData } from './mobileData'; +import { PaymentInstrumentType } from './paymentInstrumentType'; + +export class PaymentInstrumentData { + 'CardData'?: CardData; + 'CheckData'?: CheckData; + 'MobileData'?: MobileData; + 'PaymentInstrumentType': PaymentInstrumentType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardData", + "baseName": "CardData", + "type": "CardData" + }, + { + "name": "CheckData", + "baseName": "CheckData", + "type": "CheckData" + }, + { + "name": "MobileData", + "baseName": "MobileData", + "type": "MobileData" + }, + { + "name": "PaymentInstrumentType", + "baseName": "PaymentInstrumentType", + "type": "PaymentInstrumentType" + } ]; + + static getAttributeTypeMap() { + return PaymentInstrumentData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentInstrumentType.ts b/src/typings/cloudDevice/paymentInstrumentType.ts new file mode 100644 index 000000000..5e35ae9ee --- /dev/null +++ b/src/typings/cloudDevice/paymentInstrumentType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum PaymentInstrumentType { + Card = 'Card', + Cash = 'Cash', + Check = 'Check', + Mobile = 'Mobile', + StoredValue = 'StoredValue' +} diff --git a/src/typings/cloudDevice/paymentReceipt.ts b/src/typings/cloudDevice/paymentReceipt.ts new file mode 100644 index 000000000..5133b7e58 --- /dev/null +++ b/src/typings/cloudDevice/paymentReceipt.ts @@ -0,0 +1,64 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DocumentQualifierType } from './documentQualifierType'; +import { OutputContent } from './outputContent'; + +export class PaymentReceipt { + 'DocumentQualifier': DocumentQualifierType; + 'IntegratedPrintFlag'?: boolean; + 'OutputContent': OutputContent; + 'RequiredSignatureFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DocumentQualifier", + "baseName": "DocumentQualifier", + "type": "DocumentQualifierType" + }, + { + "name": "IntegratedPrintFlag", + "baseName": "IntegratedPrintFlag", + "type": "boolean" + }, + { + "name": "OutputContent", + "baseName": "OutputContent", + "type": "OutputContent" + }, + { + "name": "RequiredSignatureFlag", + "baseName": "RequiredSignatureFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PaymentReceipt.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentRequest.ts b/src/typings/cloudDevice/paymentRequest.ts new file mode 100644 index 000000000..d11d551e5 --- /dev/null +++ b/src/typings/cloudDevice/paymentRequest.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyData } from './loyaltyData'; +import { PaymentData } from './paymentData'; +import { PaymentTransaction } from './paymentTransaction'; +import { SaleData } from './saleData'; + +export class PaymentRequest { + 'LoyaltyData'?: Array; + 'PaymentData'?: PaymentData; + 'PaymentTransaction': PaymentTransaction; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyData", + "baseName": "LoyaltyData", + "type": "Array" + }, + { + "name": "PaymentData", + "baseName": "PaymentData", + "type": "PaymentData" + }, + { + "name": "PaymentTransaction", + "baseName": "PaymentTransaction", + "type": "PaymentTransaction" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return PaymentRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentResponse.ts b/src/typings/cloudDevice/paymentResponse.ts new file mode 100644 index 000000000..a67fd7db9 --- /dev/null +++ b/src/typings/cloudDevice/paymentResponse.ts @@ -0,0 +1,87 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CustomerOrder } from './customerOrder'; +import { LoyaltyResult } from './loyaltyResult'; +import { POIData } from './pOIData'; +import { PaymentReceipt } from './paymentReceipt'; +import { PaymentResult } from './paymentResult'; +import { Response } from './response'; +import { SaleData } from './saleData'; + +export class PaymentResponse { + 'CustomerOrder'?: Array; + 'LoyaltyResult'?: Array; + 'PaymentReceipt'?: Array; + 'PaymentResult'?: PaymentResult; + 'POIData': POIData; + 'Response': Response; + 'SaleData': SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerOrder", + "baseName": "CustomerOrder", + "type": "Array" + }, + { + "name": "LoyaltyResult", + "baseName": "LoyaltyResult", + "type": "Array" + }, + { + "name": "PaymentReceipt", + "baseName": "PaymentReceipt", + "type": "Array" + }, + { + "name": "PaymentResult", + "baseName": "PaymentResult", + "type": "PaymentResult" + }, + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return PaymentResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentResult.ts b/src/typings/cloudDevice/paymentResult.ts new file mode 100644 index 000000000..392a9fc79 --- /dev/null +++ b/src/typings/cloudDevice/paymentResult.ts @@ -0,0 +1,152 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AmountsResp } from './amountsResp'; +import { CapturedSignature } from './capturedSignature'; +import { ContentInformation } from './contentInformation'; +import { CurrencyConversion } from './currencyConversion'; +import { Instalment } from './instalment'; +import { PaymentAcquirerData } from './paymentAcquirerData'; +import { PaymentInstrumentData } from './paymentInstrumentData'; + +export class PaymentResult { + 'AmountsResp'?: AmountsResp; + 'AuthenticationMethod'?: Array; + 'CapturedSignature'?: CapturedSignature; + 'CurrencyConversion'?: Array; + 'CustomerLanguage'?: string; + 'InstalmentType'?: Instalment; + 'MerchantOverrideFlag'?: boolean; + 'OnlineFlag'?: boolean; + 'PaymentAcquirerData'?: PaymentAcquirerData; + 'PaymentInstrumentData'?: PaymentInstrumentData; + 'PaymentType'?: PaymentResult.PaymentTypeEnum; + 'ProtectedSignature'?: ContentInformation; + 'ValidityDate'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AmountsResp", + "baseName": "AmountsResp", + "type": "AmountsResp" + }, + { + "name": "AuthenticationMethod", + "baseName": "AuthenticationMethod", + "type": "Array" + }, + { + "name": "CapturedSignature", + "baseName": "CapturedSignature", + "type": "CapturedSignature" + }, + { + "name": "CurrencyConversion", + "baseName": "CurrencyConversion", + "type": "Array" + }, + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "InstalmentType", + "baseName": "InstalmentType", + "type": "Instalment" + }, + { + "name": "MerchantOverrideFlag", + "baseName": "MerchantOverrideFlag", + "type": "boolean" + }, + { + "name": "OnlineFlag", + "baseName": "OnlineFlag", + "type": "boolean" + }, + { + "name": "PaymentAcquirerData", + "baseName": "PaymentAcquirerData", + "type": "PaymentAcquirerData" + }, + { + "name": "PaymentInstrumentData", + "baseName": "PaymentInstrumentData", + "type": "PaymentInstrumentData" + }, + { + "name": "PaymentType", + "baseName": "PaymentType", + "type": "PaymentResult.PaymentTypeEnum" + }, + { + "name": "ProtectedSignature", + "baseName": "ProtectedSignature", + "type": "ContentInformation" + }, + { + "name": "ValidityDate", + "baseName": "ValidityDate", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentResult.attributeTypeMap; + } +} + +export namespace PaymentResult { + export enum AuthenticationMethodEnum { + Bypass = 'Bypass', + ManualVerification = 'ManualVerification', + MerchantAuthentication = 'MerchantAuthentication', + OfflinePin = 'OfflinePIN', + OnlinePin = 'OnlinePIN', + PaperSignature = 'PaperSignature', + SecureCertificate = 'SecureCertificate', + SecureNoCertificate = 'SecureNoCertificate', + SecuredChannel = 'SecuredChannel', + SignatureCapture = 'SignatureCapture', + UnknownMethod = 'UnknownMethod' + } + export enum PaymentTypeEnum { + CashAdvance = 'CashAdvance', + CashDeposit = 'CashDeposit', + Completion = 'Completion', + FirstReservation = 'FirstReservation', + Instalment = 'Instalment', + IssuerInstalment = 'IssuerInstalment', + Normal = 'Normal', + OneTimeReservation = 'OneTimeReservation', + PaidOut = 'PaidOut', + Recurring = 'Recurring', + Refund = 'Refund', + UpdateReservation = 'UpdateReservation' + } +} diff --git a/src/typings/cloudDevice/paymentToken.ts b/src/typings/cloudDevice/paymentToken.ts new file mode 100644 index 000000000..a1e8632f7 --- /dev/null +++ b/src/typings/cloudDevice/paymentToken.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TokenRequestedType } from './tokenRequestedType'; + +export class PaymentToken { + 'ExpiryDateTime'?: { [key: string]: any; }; + 'TokenRequestedType': TokenRequestedType; + 'TokenValue': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ExpiryDateTime", + "baseName": "ExpiryDateTime", + "type": "{ [key: string]: any; }" + }, + { + "name": "TokenRequestedType", + "baseName": "TokenRequestedType", + "type": "TokenRequestedType" + }, + { + "name": "TokenValue", + "baseName": "TokenValue", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentToken.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentTotals.ts b/src/typings/cloudDevice/paymentTotals.ts new file mode 100644 index 000000000..43f3a4e95 --- /dev/null +++ b/src/typings/cloudDevice/paymentTotals.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TransactionType } from './transactionType'; + +export class PaymentTotals { + 'TransactionAmount': number; + 'TransactionCount': number; + 'TransactionType': TransactionType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "TransactionAmount", + "baseName": "TransactionAmount", + "type": "number" + }, + { + "name": "TransactionCount", + "baseName": "TransactionCount", + "type": "number" + }, + { + "name": "TransactionType", + "baseName": "TransactionType", + "type": "TransactionType" + } ]; + + static getAttributeTypeMap() { + return PaymentTotals.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentTransaction.ts b/src/typings/cloudDevice/paymentTransaction.ts new file mode 100644 index 000000000..021eedbb4 --- /dev/null +++ b/src/typings/cloudDevice/paymentTransaction.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AmountsReq } from './amountsReq'; +import { OriginalPOITransaction } from './originalPOITransaction'; +import { SaleItem } from './saleItem'; +import { TransactionConditions } from './transactionConditions'; + +export class PaymentTransaction { + 'AmountsReq': AmountsReq; + 'OriginalPOITransaction'?: OriginalPOITransaction; + 'SaleItem'?: Array; + 'TransactionConditions'?: TransactionConditions; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AmountsReq", + "baseName": "AmountsReq", + "type": "AmountsReq" + }, + { + "name": "OriginalPOITransaction", + "baseName": "OriginalPOITransaction", + "type": "OriginalPOITransaction" + }, + { + "name": "SaleItem", + "baseName": "SaleItem", + "type": "Array" + }, + { + "name": "TransactionConditions", + "baseName": "TransactionConditions", + "type": "TransactionConditions" + } ]; + + static getAttributeTypeMap() { + return PaymentTransaction.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/paymentType.ts b/src/typings/cloudDevice/paymentType.ts new file mode 100644 index 000000000..05dd57e8c --- /dev/null +++ b/src/typings/cloudDevice/paymentType.ts @@ -0,0 +1,41 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum PaymentType { + CashAdvance = 'CashAdvance', + CashDeposit = 'CashDeposit', + Completion = 'Completion', + FirstReservation = 'FirstReservation', + Instalment = 'Instalment', + IssuerInstalment = 'IssuerInstalment', + Normal = 'Normal', + OneTimeReservation = 'OneTimeReservation', + PaidOut = 'PaidOut', + Recurring = 'Recurring', + Refund = 'Refund', + UpdateReservation = 'UpdateReservation' +} diff --git a/src/typings/cloudDevice/performedTransaction.ts b/src/typings/cloudDevice/performedTransaction.ts new file mode 100644 index 000000000..2554304b2 --- /dev/null +++ b/src/typings/cloudDevice/performedTransaction.ts @@ -0,0 +1,79 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyResult } from './loyaltyResult'; +import { POIData } from './pOIData'; +import { PaymentResult } from './paymentResult'; +import { Response } from './response'; +import { SaleData } from './saleData'; + +export class PerformedTransaction { + 'LoyaltyResult'?: Array; + 'PaymentResult'?: PaymentResult; + 'POIData': POIData; + 'Response': Response; + 'ReversedAmount'?: number; + 'SaleData'?: SaleData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyResult", + "baseName": "LoyaltyResult", + "type": "Array" + }, + { + "name": "PaymentResult", + "baseName": "PaymentResult", + "type": "PaymentResult" + }, + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "ReversedAmount", + "baseName": "ReversedAmount", + "type": "number" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + } ]; + + static getAttributeTypeMap() { + return PerformedTransaction.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/periodUnitType.ts b/src/typings/cloudDevice/periodUnitType.ts new file mode 100644 index 000000000..80d520ba0 --- /dev/null +++ b/src/typings/cloudDevice/periodUnitType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum PeriodUnitType { + Annual = 'Annual', + Daily = 'Daily', + Monthly = 'Monthly', + Weekly = 'Weekly' +} diff --git a/src/typings/cloudDevice/predefinedContent.ts b/src/typings/cloudDevice/predefinedContent.ts new file mode 100644 index 000000000..9ee1a97f1 --- /dev/null +++ b/src/typings/cloudDevice/predefinedContent.ts @@ -0,0 +1,49 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class PredefinedContent { + 'Language'?: string; + 'ReferenceID': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Language", + "baseName": "Language", + "type": "string" + }, + { + "name": "ReferenceID", + "baseName": "ReferenceID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PredefinedContent.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/predefinedContentHelper.ts b/src/typings/cloudDevice/predefinedContentHelper.ts new file mode 100644 index 000000000..4f78405a3 --- /dev/null +++ b/src/typings/cloudDevice/predefinedContentHelper.ts @@ -0,0 +1,74 @@ +/** + * PredefinedContentHelper class to parse and manage predefined content reference IDs. + */ +export class PredefinedContentHelper { + private params: URLSearchParams; + + constructor(referenceId: string) { + this.params = new URLSearchParams(referenceId); + } + + /** + * Extracts and validates the `event` value from the ReferenceID. + * + * @returns A valid `DisplayNotificationEvent`, otherwise `null`. + * + * @example + * const helper = new PredefinedContentHelper("...&event=PIN_ENTERED"); + * const event = helper.getEvent(); // DisplayNotificationEvent.PIN_ENTERED or null + */ + getEvent(): DisplayNotificationEvent | null { + const event = this.params.get("event"); + + if (event && Object.values(DisplayNotificationEvent).includes(event as DisplayNotificationEvent)) { + return event as DisplayNotificationEvent; + } + return null; + } + + getTransactionId(): string | null { + return this.params.get("TransactionID"); + } + + getTimeStamp(): string | null { + return this.params.get("TimeStamp"); + } + + get(key: string): string | null { + return this.params.get(key); + } + + toObject(): Record { + return Object.fromEntries(this.params); + } +} + +// Supported events for display notifications +export enum DisplayNotificationEvent { + TENDER_CREATED = "TENDER_CREATED", + CARD_INSERTED = "CARD_INSERTED", + CARD_PRESENTED = "CARD_PRESENTED", + CARD_SWIPED = "CARD_SWIPED", + WAIT_FOR_APP_SELECTION = "WAIT_FOR_APP_SELECTION", + APPLICATION_SELECTED = "APPLICATION_SELECTED", + ASK_SIGNATURE = "ASK_SIGNATURE", + CHECK_SIGNATURE = "CHECK_SIGNATURE", + SIGNATURE_CHECKED = "SIGNATURE_CHECKED", + WAIT_FOR_PIN = "WAIT_FOR_PIN", + PIN_ENTERED = "PIN_ENTERED", + PRINT_RECEIPT = "PRINT_RECEIPT", + RECEIPT_PRINTED = "RECEIPT_PRINTED", + CARD_REMOVED = "CARD_REMOVED", + TENDER_FINAL = "TENDER_FINAL", + ASK_DCC = "ASK_DCC", + DCC_ACCEPTED = "DCC_ACCEPTED", + DCC_REJECTED = "DCC_REJECTED", + ASK_GRATUITY = "ASK_GRATUITY", + GRATUITY_ENTERED = "GRATUITY_ENTERED", + BALANCE_QUERY_STARTED = "BALANCE_QUERY_STARTED", + BALANCE_QUERY_COMPLETED = "BALANCE_QUERY_COMPLETED", + LOAD_STARTED = "LOAD_STARTED", + LOAD_COMPLETED = "LOAD_COMPLETED", + PROVIDE_CARD_DETAILS = "PROVIDE_CARD_DETAILS", + CARD_DETAILS_PROVIDED = "CARD_DETAILS_PROVIDED", +} diff --git a/src/typings/cloudDevice/printOutput.ts b/src/typings/cloudDevice/printOutput.ts new file mode 100644 index 000000000..e09a2c8e4 --- /dev/null +++ b/src/typings/cloudDevice/printOutput.ts @@ -0,0 +1,77 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DocumentQualifierType } from './documentQualifierType'; +import { OutputContent } from './outputContent'; +import { ResponseModeType } from './responseModeType'; + +export class PrintOutput { + 'DocumentQualifier': DocumentQualifierType; + 'IntegratedPrintFlag'?: boolean; + 'OutputContent': OutputContent; + 'OutputSignature'?: any | null; + 'RequiredSignatureFlag'?: boolean; + 'ResponseMode': ResponseModeType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DocumentQualifier", + "baseName": "DocumentQualifier", + "type": "DocumentQualifierType" + }, + { + "name": "IntegratedPrintFlag", + "baseName": "IntegratedPrintFlag", + "type": "boolean" + }, + { + "name": "OutputContent", + "baseName": "OutputContent", + "type": "OutputContent" + }, + { + "name": "OutputSignature", + "baseName": "OutputSignature", + "type": "any" + }, + { + "name": "RequiredSignatureFlag", + "baseName": "RequiredSignatureFlag", + "type": "boolean" + }, + { + "name": "ResponseMode", + "baseName": "ResponseMode", + "type": "ResponseModeType" + } ]; + + static getAttributeTypeMap() { + return PrintOutput.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/printRequest.ts b/src/typings/cloudDevice/printRequest.ts new file mode 100644 index 000000000..9ece001b5 --- /dev/null +++ b/src/typings/cloudDevice/printRequest.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { PrintOutput } from './printOutput'; + +export class PrintRequest { + 'PrintOutput': PrintOutput; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "PrintOutput", + "baseName": "PrintOutput", + "type": "PrintOutput" + } ]; + + static getAttributeTypeMap() { + return PrintRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/printResponse.ts b/src/typings/cloudDevice/printResponse.ts new file mode 100644 index 000000000..d17e90325 --- /dev/null +++ b/src/typings/cloudDevice/printResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { DocumentQualifierType } from './documentQualifierType'; +import { Response } from './response'; + +export class PrintResponse { + 'DocumentQualifier': DocumentQualifierType; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DocumentQualifier", + "baseName": "DocumentQualifier", + "type": "DocumentQualifierType" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return PrintResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/printerStatusType.ts b/src/typings/cloudDevice/printerStatusType.ts new file mode 100644 index 000000000..dfbdc42ac --- /dev/null +++ b/src/typings/cloudDevice/printerStatusType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum PrinterStatusType { + NoPaper = 'NoPaper', + Ok = 'OK', + OutOfOrder = 'OutOfOrder', + PaperJam = 'PaperJam', + PaperLow = 'PaperLow' +} diff --git a/src/typings/cloudDevice/rebates.ts b/src/typings/cloudDevice/rebates.ts new file mode 100644 index 000000000..1cdc394af --- /dev/null +++ b/src/typings/cloudDevice/rebates.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleItemRebate } from './saleItemRebate'; + +export class Rebates { + 'RebateLabel'?: string; + 'SaleItemRebate'?: Array; + 'TotalRebate'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "RebateLabel", + "baseName": "RebateLabel", + "type": "string" + }, + { + "name": "SaleItemRebate", + "baseName": "SaleItemRebate", + "type": "Array" + }, + { + "name": "TotalRebate", + "baseName": "TotalRebate", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Rebates.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/reconciliationRequest.ts b/src/typings/cloudDevice/reconciliationRequest.ts new file mode 100644 index 000000000..bca36b4e5 --- /dev/null +++ b/src/typings/cloudDevice/reconciliationRequest.ts @@ -0,0 +1,57 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ReconciliationType } from './reconciliationType'; + +export class ReconciliationRequest { + 'AcquirerID'?: Array; + 'POIReconciliationID'?: string; + 'ReconciliationType': ReconciliationType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "Array" + }, + { + "name": "POIReconciliationID", + "baseName": "POIReconciliationID", + "type": "string" + }, + { + "name": "ReconciliationType", + "baseName": "ReconciliationType", + "type": "ReconciliationType" + } ]; + + static getAttributeTypeMap() { + return ReconciliationRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/reconciliationResponse.ts b/src/typings/cloudDevice/reconciliationResponse.ts new file mode 100644 index 000000000..a70f632ec --- /dev/null +++ b/src/typings/cloudDevice/reconciliationResponse.ts @@ -0,0 +1,65 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ReconciliationType } from './reconciliationType'; +import { Response } from './response'; +import { TransactionTotals } from './transactionTotals'; + +export class ReconciliationResponse { + 'POIReconciliationID'?: string; + 'ReconciliationType': ReconciliationType; + 'Response': Response; + 'TransactionTotals'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POIReconciliationID", + "baseName": "POIReconciliationID", + "type": "string" + }, + { + "name": "ReconciliationType", + "baseName": "ReconciliationType", + "type": "ReconciliationType" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "TransactionTotals", + "baseName": "TransactionTotals", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ReconciliationResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/reconciliationType.ts b/src/typings/cloudDevice/reconciliationType.ts new file mode 100644 index 000000000..68e04e76d --- /dev/null +++ b/src/typings/cloudDevice/reconciliationType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ReconciliationType { + AcquirerReconciliation = 'AcquirerReconciliation', + AcquirerSynchronisation = 'AcquirerSynchronisation', + PreviousReconciliation = 'PreviousReconciliation', + SaleReconciliation = 'SaleReconciliation' +} diff --git a/src/typings/cloudDevice/relativeDistinguishedName.ts b/src/typings/cloudDevice/relativeDistinguishedName.ts new file mode 100644 index 000000000..1d07536ff --- /dev/null +++ b/src/typings/cloudDevice/relativeDistinguishedName.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class RelativeDistinguishedName { + 'Attribute': string; + 'AttributeValue': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Attribute", + "baseName": "Attribute", + "type": "string" + }, + { + "name": "AttributeValue", + "baseName": "AttributeValue", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RelativeDistinguishedName.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/repeatedMessageResponse.ts b/src/typings/cloudDevice/repeatedMessageResponse.ts new file mode 100644 index 000000000..c640cb251 --- /dev/null +++ b/src/typings/cloudDevice/repeatedMessageResponse.ts @@ -0,0 +1,52 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MessageHeader } from './messageHeader'; +import { RepeatedResponseMessageBody } from './repeatedResponseMessageBody'; + +export class RepeatedMessageResponse { + 'MessageHeader': MessageHeader; + 'RepeatedResponseMessageBody': RepeatedResponseMessageBody; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MessageHeader", + "baseName": "MessageHeader", + "type": "MessageHeader" + }, + { + "name": "RepeatedResponseMessageBody", + "baseName": "RepeatedResponseMessageBody", + "type": "RepeatedResponseMessageBody" + } ]; + + static getAttributeTypeMap() { + return RepeatedMessageResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/repeatedResponseMessageBody.ts b/src/typings/cloudDevice/repeatedResponseMessageBody.ts new file mode 100644 index 000000000..0ecf0aaed --- /dev/null +++ b/src/typings/cloudDevice/repeatedResponseMessageBody.ts @@ -0,0 +1,80 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CardAcquisitionResponse } from './cardAcquisitionResponse'; +import { CardReaderAPDUResponse } from './cardReaderAPDUResponse'; +import { LoyaltyResponse } from './loyaltyResponse'; +import { PaymentResponse } from './paymentResponse'; +import { ReversalResponse } from './reversalResponse'; +import { StoredValueResponse } from './storedValueResponse'; + +export class RepeatedResponseMessageBody { + 'CardAcquisitionResponse'?: CardAcquisitionResponse; + 'CardReaderAPDUResponse'?: CardReaderAPDUResponse; + 'LoyaltyResponse'?: LoyaltyResponse; + 'PaymentResponse'?: PaymentResponse; + 'ReversalResponse'?: ReversalResponse; + 'StoredValueResponse'?: StoredValueResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardAcquisitionResponse", + "baseName": "CardAcquisitionResponse", + "type": "CardAcquisitionResponse" + }, + { + "name": "CardReaderAPDUResponse", + "baseName": "CardReaderAPDUResponse", + "type": "CardReaderAPDUResponse" + }, + { + "name": "LoyaltyResponse", + "baseName": "LoyaltyResponse", + "type": "LoyaltyResponse" + }, + { + "name": "PaymentResponse", + "baseName": "PaymentResponse", + "type": "PaymentResponse" + }, + { + "name": "ReversalResponse", + "baseName": "ReversalResponse", + "type": "ReversalResponse" + }, + { + "name": "StoredValueResponse", + "baseName": "StoredValueResponse", + "type": "StoredValueResponse" + } ]; + + static getAttributeTypeMap() { + return RepeatedResponseMessageBody.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/response.ts b/src/typings/cloudDevice/response.ts new file mode 100644 index 000000000..42834d2e0 --- /dev/null +++ b/src/typings/cloudDevice/response.ts @@ -0,0 +1,78 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ResultType } from './resultType'; + +export class Response { + 'AdditionalResponse'?: string; + 'ErrorCondition'?: Response.ErrorConditionEnum; + 'Result': ResultType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdditionalResponse", + "baseName": "AdditionalResponse", + "type": "string" + }, + { + "name": "ErrorCondition", + "baseName": "ErrorCondition", + "type": "Response.ErrorConditionEnum" + }, + { + "name": "Result", + "baseName": "Result", + "type": "ResultType" + } ]; + + static getAttributeTypeMap() { + return Response.attributeTypeMap; + } +} + +export namespace Response { + export enum ErrorConditionEnum { + Aborted = 'Aborted', + Busy = 'Busy', + Cancel = 'Cancel', + DeviceOut = 'DeviceOut', + InProgress = 'InProgress', + InsertedCard = 'InsertedCard', + InvalidCard = 'InvalidCard', + LoggedOut = 'LoggedOut', + MessageFormat = 'MessageFormat', + NotAllowed = 'NotAllowed', + NotFound = 'NotFound', + PaymentRestriction = 'PaymentRestriction', + Refusal = 'Refusal', + UnavailableDevice = 'UnavailableDevice', + UnavailableService = 'UnavailableService', + UnreachableHost = 'UnreachableHost', + WrongPin = 'WrongPIN' + } +} diff --git a/src/typings/cloudDevice/responseModeType.ts b/src/typings/cloudDevice/responseModeType.ts new file mode 100644 index 000000000..e51663290 --- /dev/null +++ b/src/typings/cloudDevice/responseModeType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ResponseModeType { + Immediate = 'Immediate', + NotRequired = 'NotRequired', + PrintEnd = 'PrintEnd', + SoundEnd = 'SoundEnd' +} diff --git a/src/typings/cloudDevice/resultType.ts b/src/typings/cloudDevice/resultType.ts new file mode 100644 index 000000000..8adee0cc5 --- /dev/null +++ b/src/typings/cloudDevice/resultType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ResultType { + Failure = 'Failure', + Partial = 'Partial', + Success = 'Success' +} diff --git a/src/typings/cloudDevice/reversalReasonType.ts b/src/typings/cloudDevice/reversalReasonType.ts new file mode 100644 index 000000000..acc1a0be8 --- /dev/null +++ b/src/typings/cloudDevice/reversalReasonType.ts @@ -0,0 +1,33 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ReversalReasonType { + CustCancel = 'CustCancel', + Malfunction = 'Malfunction', + MerchantCancel = 'MerchantCancel', + Unable2Compl = 'Unable2Compl' +} diff --git a/src/typings/cloudDevice/reversalRequest.ts b/src/typings/cloudDevice/reversalRequest.ts new file mode 100644 index 000000000..4715acaf4 --- /dev/null +++ b/src/typings/cloudDevice/reversalRequest.ts @@ -0,0 +1,72 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { CustomerOrder } from './customerOrder'; +import { OriginalPOITransaction } from './originalPOITransaction'; +import { ReversalReasonType } from './reversalReasonType'; +import { SaleData } from './saleData'; + +export class ReversalRequest { + 'SaleData'?: SaleData; + 'OriginalPOITransaction': OriginalPOITransaction; + 'ReversedAmount'?: number; + 'ReversalReason': ReversalReasonType; + 'CustomerOrder'?: CustomerOrder; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData", + }, + { + "name": "OriginalPOITransaction", + "baseName": "OriginalPOITransaction", + "type": "OriginalPOITransaction" + }, + { + "name": "ReversalReason", + "baseName": "ReversalReason", + "type": "ReversalReasonType" + }, + { + "name": "ReversedAmount", + "baseName": "ReversedAmount", + "type": "number" + }, + { + "name": "CustomerOrder", + "baseName": "CustomerOrder", + "type": "CustomerOrder" + } ]; + + static getAttributeTypeMap() { + return ReversalRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/reversalResponse.ts b/src/typings/cloudDevice/reversalResponse.ts new file mode 100644 index 000000000..1099372f9 --- /dev/null +++ b/src/typings/cloudDevice/reversalResponse.ts @@ -0,0 +1,78 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { OriginalPOITransaction } from './originalPOITransaction'; +import { POIData } from './pOIData'; +import { PaymentReceipt } from './paymentReceipt'; +import { Response } from './response'; + +export class ReversalResponse { + 'CustomerOrderID'?: string; + 'OriginalPOITransaction'?: OriginalPOITransaction; + 'PaymentReceipt'?: Array; + 'POIData'?: POIData; + 'Response': Response; + 'ReversedAmount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerOrderID", + "baseName": "CustomerOrderID", + "type": "string" + }, + { + "name": "OriginalPOITransaction", + "baseName": "OriginalPOITransaction", + "type": "OriginalPOITransaction" + }, + { + "name": "PaymentReceipt", + "baseName": "PaymentReceipt", + "type": "Array" + }, + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "ReversedAmount", + "baseName": "ReversedAmount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ReversalResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleCapabilitiesType.ts b/src/typings/cloudDevice/saleCapabilitiesType.ts new file mode 100644 index 000000000..3f6a86670 --- /dev/null +++ b/src/typings/cloudDevice/saleCapabilitiesType.ts @@ -0,0 +1,44 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum SaleCapabilitiesType { + CashierDisplay = 'CashierDisplay', + CashierError = 'CashierError', + CashierInput = 'CashierInput', + CashierStatus = 'CashierStatus', + CustomerAssistance = 'CustomerAssistance', + CustomerDisplay = 'CustomerDisplay', + CustomerError = 'CustomerError', + CustomerInput = 'CustomerInput', + EmvContactless = 'EMVContactless', + Icc = 'ICC', + MagStripe = 'MagStripe', + PoiReplication = 'POIReplication', + PrinterDocument = 'PrinterDocument', + PrinterReceipt = 'PrinterReceipt', + PrinterVoucher = 'PrinterVoucher' +} diff --git a/src/typings/cloudDevice/saleData.ts b/src/typings/cloudDevice/saleData.ts new file mode 100644 index 000000000..217efc362 --- /dev/null +++ b/src/typings/cloudDevice/saleData.ts @@ -0,0 +1,132 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleTerminalData } from './saleTerminalData'; +import { SaleToAcquirerData } from './saleToAcquirerData'; +import { SaleToIssuerData } from './saleToIssuerData'; +import { SponsoredMerchant } from './sponsoredMerchant'; +import { TransactionIdentification } from './transactionIdentification'; + +export class SaleData { + 'CustomerOrderID'?: string; + 'CustomerOrderReq'?: Array; + 'OperatorID'?: string; + 'OperatorLanguage'?: string; + 'SaleReferenceID'?: string; + 'SaleTerminalData'?: SaleTerminalData; + 'SaleToAcquirerData'?: SaleToAcquirerData | string; + 'SaleToIssuerData'?: SaleToIssuerData; + 'SaleToPOIData'?: string; + 'SaleTransactionID': TransactionIdentification; + 'ShiftNumber'?: string; + 'SponsoredMerchant'?: Array; + 'TokenRequestedType'?: SaleData.TokenRequestedTypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerOrderID", + "baseName": "CustomerOrderID", + "type": "string" + }, + { + "name": "CustomerOrderReq", + "baseName": "CustomerOrderReq", + "type": "Array" + }, + { + "name": "OperatorID", + "baseName": "OperatorID", + "type": "string" + }, + { + "name": "OperatorLanguage", + "baseName": "OperatorLanguage", + "type": "string" + }, + { + "name": "SaleReferenceID", + "baseName": "SaleReferenceID", + "type": "string" + }, + { + "name": "SaleTerminalData", + "baseName": "SaleTerminalData", + "type": "SaleTerminalData" + }, + { + "name": "SaleToAcquirerData", + "baseName": "SaleToAcquirerData", + "type": "SaleToAcquirerData" + }, + { + "name": "SaleToIssuerData", + "baseName": "SaleToIssuerData", + "type": "SaleToIssuerData" + }, + { + "name": "SaleToPOIData", + "baseName": "SaleToPOIData", + "type": "string" + }, + { + "name": "SaleTransactionID", + "baseName": "SaleTransactionID", + "type": "TransactionIdentification" + }, + { + "name": "ShiftNumber", + "baseName": "ShiftNumber", + "type": "string" + }, + { + "name": "SponsoredMerchant", + "baseName": "SponsoredMerchant", + "type": "Array" + }, + { + "name": "TokenRequestedType", + "baseName": "TokenRequestedType", + "type": "SaleData.TokenRequestedTypeEnum" + } ]; + + static getAttributeTypeMap() { + return SaleData.attributeTypeMap; + } +} + +export namespace SaleData { + export enum CustomerOrderReqEnum { + Both = 'Both', + Closed = 'Closed', + Open = 'Open' + } + export enum TokenRequestedTypeEnum { + Customer = 'Customer', + Transaction = 'Transaction' + } +} diff --git a/src/typings/cloudDevice/saleItem.ts b/src/typings/cloudDevice/saleItem.ts new file mode 100644 index 000000000..060815c7b --- /dev/null +++ b/src/typings/cloudDevice/saleItem.ts @@ -0,0 +1,127 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SaleItem { + 'AdditionalProductInfo'?: string; + 'EanUpc'?: string; + 'ItemAmount': number; + 'ItemID': number; + 'ProductCode': string; + 'ProductLabel'?: string; + 'Quantity'?: number; + 'SaleChannel'?: string; + 'TaxCode'?: string; + 'UnitOfMeasure'?: SaleItem.UnitOfMeasureEnum; + 'UnitPrice'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdditionalProductInfo", + "baseName": "AdditionalProductInfo", + "type": "string" + }, + { + "name": "EanUpc", + "baseName": "EanUpc", + "type": "string" + }, + { + "name": "ItemAmount", + "baseName": "ItemAmount", + "type": "number" + }, + { + "name": "ItemID", + "baseName": "ItemID", + "type": "number" + }, + { + "name": "ProductCode", + "baseName": "ProductCode", + "type": "string" + }, + { + "name": "ProductLabel", + "baseName": "ProductLabel", + "type": "string" + }, + { + "name": "Quantity", + "baseName": "Quantity", + "type": "number" + }, + { + "name": "SaleChannel", + "baseName": "SaleChannel", + "type": "string" + }, + { + "name": "TaxCode", + "baseName": "TaxCode", + "type": "string" + }, + { + "name": "UnitOfMeasure", + "baseName": "UnitOfMeasure", + "type": "SaleItem.UnitOfMeasureEnum" + }, + { + "name": "UnitPrice", + "baseName": "UnitPrice", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SaleItem.attributeTypeMap; + } +} + +export namespace SaleItem { + export enum UnitOfMeasureEnum { + Case = 'Case', + Centilitre = 'Centilitre', + Centimetre = 'Centimetre', + Foot = 'Foot', + Gram = 'Gram', + Inch = 'Inch', + Kilogram = 'Kilogram', + Kilometre = 'Kilometre', + Litre = 'Litre', + Meter = 'Meter', + Mile = 'Mile', + Other = 'Other', + Ounce = 'Ounce', + Pint = 'Pint', + Pound = 'Pound', + Quart = 'Quart', + UkGallon = 'UKGallon', + UsGallon = 'USGallon', + Yard = 'Yard' + } +} diff --git a/src/typings/cloudDevice/saleItemRebate.ts b/src/typings/cloudDevice/saleItemRebate.ts new file mode 100644 index 000000000..4d45e6865 --- /dev/null +++ b/src/typings/cloudDevice/saleItemRebate.ts @@ -0,0 +1,103 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SaleItemRebate { + 'EanUpc'?: string; + 'ItemAmount'?: number; + 'ItemID': number; + 'ProductCode': string; + 'Quantity'?: number; + 'RebateLabel'?: string; + 'UnitOfMeasure'?: SaleItemRebate.UnitOfMeasureEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EanUpc", + "baseName": "EanUpc", + "type": "string" + }, + { + "name": "ItemAmount", + "baseName": "ItemAmount", + "type": "number" + }, + { + "name": "ItemID", + "baseName": "ItemID", + "type": "number" + }, + { + "name": "ProductCode", + "baseName": "ProductCode", + "type": "string" + }, + { + "name": "Quantity", + "baseName": "Quantity", + "type": "number" + }, + { + "name": "RebateLabel", + "baseName": "RebateLabel", + "type": "string" + }, + { + "name": "UnitOfMeasure", + "baseName": "UnitOfMeasure", + "type": "SaleItemRebate.UnitOfMeasureEnum" + } ]; + + static getAttributeTypeMap() { + return SaleItemRebate.attributeTypeMap; + } +} + +export namespace SaleItemRebate { + export enum UnitOfMeasureEnum { + Case = 'Case', + Centilitre = 'Centilitre', + Centimetre = 'Centimetre', + Foot = 'Foot', + Gram = 'Gram', + Inch = 'Inch', + Kilogram = 'Kilogram', + Kilometre = 'Kilometre', + Litre = 'Litre', + Meter = 'Meter', + Mile = 'Mile', + Other = 'Other', + Ounce = 'Ounce', + Pint = 'Pint', + Pound = 'Pound', + Quart = 'Quart', + UkGallon = 'UKGallon', + UsGallon = 'USGallon', + Yard = 'Yard' + } +} diff --git a/src/typings/cloudDevice/saleProfile.ts b/src/typings/cloudDevice/saleProfile.ts new file mode 100644 index 000000000..f4373c3cc --- /dev/null +++ b/src/typings/cloudDevice/saleProfile.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SaleProfile { + 'GenericProfile'?: SaleProfile.GenericProfileEnum; + 'ServiceProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "GenericProfile", + "baseName": "GenericProfile", + "type": "SaleProfile.GenericProfileEnum" + }, + { + "name": "ServiceProfiles", + "baseName": "ServiceProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SaleProfile.attributeTypeMap; + } +} + +export namespace SaleProfile { + export enum GenericProfileEnum { + Basic = 'Basic', + Extended = 'Extended', + Standard = 'Standard' + } + export enum ServiceProfilesEnum { + Batch = 'Batch', + CardReader = 'CardReader', + Communication = 'Communication', + Loyalty = 'Loyalty', + OneTimeRes = 'OneTimeRes', + Pin = 'PIN', + Reservation = 'Reservation', + Sound = 'Sound', + StoredValue = 'StoredValue', + Synchro = 'Synchro' + } +} diff --git a/src/typings/cloudDevice/saleSoftware.ts b/src/typings/cloudDevice/saleSoftware.ts new file mode 100644 index 000000000..9b256c6c9 --- /dev/null +++ b/src/typings/cloudDevice/saleSoftware.ts @@ -0,0 +1,62 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SaleSoftware { + 'ApplicationName': string; + 'CertificationCode': string; + 'ManufacturerID'?: string; + 'SoftwareVersion': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ApplicationName", + "baseName": "ApplicationName", + "type": "string" + }, + { + "name": "CertificationCode", + "baseName": "CertificationCode", + "type": "string" + }, + { + "name": "ManufacturerID", + "baseName": "ManufacturerID", + "type": "string" + }, + { + "name": "SoftwareVersion", + "baseName": "SoftwareVersion", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SaleSoftware.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleTerminalData.ts b/src/typings/cloudDevice/saleTerminalData.ts new file mode 100644 index 000000000..4ef270b4c --- /dev/null +++ b/src/typings/cloudDevice/saleTerminalData.ts @@ -0,0 +1,87 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleProfile } from './saleProfile'; + +export class SaleTerminalData { + 'SaleCapabilities'?: Array; + 'SaleProfile'?: SaleProfile; + 'TerminalEnvironment'?: SaleTerminalData.TerminalEnvironmentEnum; + 'TotalsGroupID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "SaleCapabilities", + "baseName": "SaleCapabilities", + "type": "Array" + }, + { + "name": "SaleProfile", + "baseName": "SaleProfile", + "type": "SaleProfile" + }, + { + "name": "TerminalEnvironment", + "baseName": "TerminalEnvironment", + "type": "SaleTerminalData.TerminalEnvironmentEnum" + }, + { + "name": "TotalsGroupID", + "baseName": "TotalsGroupID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SaleTerminalData.attributeTypeMap; + } +} + +export namespace SaleTerminalData { + export enum SaleCapabilitiesEnum { + CashierDisplay = 'CashierDisplay', + CashierError = 'CashierError', + CashierInput = 'CashierInput', + CashierStatus = 'CashierStatus', + CustomerAssistance = 'CustomerAssistance', + CustomerDisplay = 'CustomerDisplay', + CustomerError = 'CustomerError', + CustomerInput = 'CustomerInput', + EmvContactless = 'EMVContactless', + Icc = 'ICC', + MagStripe = 'MagStripe', + PoiReplication = 'POIReplication', + PrinterDocument = 'PrinterDocument', + PrinterReceipt = 'PrinterReceipt', + PrinterVoucher = 'PrinterVoucher' + } + export enum TerminalEnvironmentEnum { + Attended = 'Attended', + SemiAttended = 'SemiAttended', + Unattended = 'Unattended' + } +} diff --git a/src/typings/cloudDevice/saleToAcquirerData.ts b/src/typings/cloudDevice/saleToAcquirerData.ts new file mode 100644 index 000000000..34d2c52f0 --- /dev/null +++ b/src/typings/cloudDevice/saleToAcquirerData.ts @@ -0,0 +1,111 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { ApplicationInfo } from './applicationInfo'; + +export class SaleToAcquirerData { + 'applicationInfo'?: ApplicationInfo; + 'shopperEmail'?: string; + 'shopperReference'?: string; + 'recurringContract'?: string; + 'shopperStatement'?: string; + 'recurringDetailName'?: string; + 'store'?: string; + 'merchantAccount'?: string; + 'currency'?: string; + 'tenderOption'?: string; + 'additionalData'?: object; + 'metadata'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "applicationInfo", + "baseName": "applicationInfo", + "type": "ApplicationInfo" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "shopperReference", + "baseName": "shopperReference", + "type": "string" + }, + { + "name": "recurringContract", + "baseName": "recurringContract", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "recurringDetailName", + "baseName": "recurringDetailName", + "type": "string" + }, + { + "name": "store", + "baseName": "store", + "type": "string" + }, + { + "name": "merchantAccount", + "baseName": "merchantAccount", + "type": "string" + }, + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "tenderOption", + "baseName": "tenderOption", + "type": "string" + }, + { + "name": "additionalData", + "baseName": "additionalData", + "type": "object" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }]; + + static getAttributeTypeMap() { + return SaleToAcquirerData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleToIssuerData.ts b/src/typings/cloudDevice/saleToIssuerData.ts new file mode 100644 index 000000000..36b7a7999 --- /dev/null +++ b/src/typings/cloudDevice/saleToIssuerData.ts @@ -0,0 +1,44 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SaleToIssuerData { + 'StatementReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "StatementReference", + "baseName": "StatementReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SaleToIssuerData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleToPOIRequest.ts b/src/typings/cloudDevice/saleToPOIRequest.ts new file mode 100644 index 000000000..b9ddc7a60 --- /dev/null +++ b/src/typings/cloudDevice/saleToPOIRequest.ts @@ -0,0 +1,241 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AbortRequest } from './abortRequest'; +import { AdminRequest } from './adminRequest'; +import { BalanceInquiryRequest } from './balanceInquiryRequest'; +import { BatchRequest } from './batchRequest'; +import { CardAcquisitionRequest } from './cardAcquisitionRequest'; +import { CardReaderAPDURequest } from './cardReaderAPDURequest'; +import { CardReaderInitRequest } from './cardReaderInitRequest'; +import { CardReaderPowerOffRequest } from './cardReaderPowerOffRequest'; +import { ContentInformation } from './contentInformation'; +import { DiagnosisRequest } from './diagnosisRequest'; +import { DisplayRequest } from './displayRequest'; +import { EnableServiceRequest } from './enableServiceRequest'; +import { EventNotification } from './eventNotification'; +import { GetTotalsRequest } from './getTotalsRequest'; +import { InputRequest } from './inputRequest'; +import { InputUpdate } from './inputUpdate'; +import { LoginRequest } from './loginRequest'; +import { LogoutRequest } from './logoutRequest'; +import { LoyaltyRequest } from './loyaltyRequest'; +import { MessageHeader } from './messageHeader'; +import { PINRequest } from './pINRequest'; +import { PaymentRequest } from './paymentRequest'; +import { PrintRequest } from './printRequest'; +import { ReconciliationRequest } from './reconciliationRequest'; +import { ReversalRequest } from './reversalRequest'; +import { SoundRequest } from './soundRequest'; +import { StoredValueRequest } from './storedValueRequest'; +import { TransactionStatusRequest } from './transactionStatusRequest'; +import { TransmitRequest } from './transmitRequest'; + +export class SaleToPOIRequest { + 'AbortRequest'?: AbortRequest; + 'AdminRequest'?: AdminRequest; + 'BalanceInquiryRequest'?: BalanceInquiryRequest; + 'BatchRequest'?: BatchRequest; + 'CardAcquisitionRequest'?: CardAcquisitionRequest; + 'CardReaderAPDURequest'?: CardReaderAPDURequest; + 'CardReaderInitRequest'?: CardReaderInitRequest; + 'CardReaderPowerOffRequest'?: CardReaderPowerOffRequest; + 'DiagnosisRequest'?: DiagnosisRequest; + 'DisplayRequest'?: DisplayRequest; + 'EnableServiceRequest'?: EnableServiceRequest; + 'EventNotification'?: EventNotification; + 'GetTotalsRequest'?: GetTotalsRequest; + 'InputRequest'?: InputRequest; + 'InputUpdate'?: InputUpdate; + 'LoginRequest'?: LoginRequest; + 'LogoutRequest'?: LogoutRequest; + 'LoyaltyRequest'?: LoyaltyRequest; + 'MessageHeader': MessageHeader; + 'PaymentRequest'?: PaymentRequest; + 'PINRequest'?: PINRequest; + 'PrintRequest'?: PrintRequest; + 'ReconciliationRequest'?: ReconciliationRequest; + 'ReversalRequest'?: ReversalRequest; + 'SecurityTrailer'?: ContentInformation; + 'SoundRequest'?: SoundRequest; + 'StoredValueRequest'?: StoredValueRequest; + 'TransactionStatusRequest'?: TransactionStatusRequest; + 'TransmitRequest'?: TransmitRequest; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AbortRequest", + "baseName": "AbortRequest", + "type": "AbortRequest" + }, + { + "name": "AdminRequest", + "baseName": "AdminRequest", + "type": "AdminRequest" + }, + { + "name": "BalanceInquiryRequest", + "baseName": "BalanceInquiryRequest", + "type": "BalanceInquiryRequest" + }, + { + "name": "BatchRequest", + "baseName": "BatchRequest", + "type": "BatchRequest" + }, + { + "name": "CardAcquisitionRequest", + "baseName": "CardAcquisitionRequest", + "type": "CardAcquisitionRequest" + }, + { + "name": "CardReaderAPDURequest", + "baseName": "CardReaderAPDURequest", + "type": "CardReaderAPDURequest" + }, + { + "name": "CardReaderInitRequest", + "baseName": "CardReaderInitRequest", + "type": "CardReaderInitRequest" + }, + { + "name": "CardReaderPowerOffRequest", + "baseName": "CardReaderPowerOffRequest", + "type": "CardReaderPowerOffRequest" + }, + { + "name": "DiagnosisRequest", + "baseName": "DiagnosisRequest", + "type": "DiagnosisRequest" + }, + { + "name": "DisplayRequest", + "baseName": "DisplayRequest", + "type": "DisplayRequest" + }, + { + "name": "EnableServiceRequest", + "baseName": "EnableServiceRequest", + "type": "EnableServiceRequest" + }, + { + "name": "EventNotification", + "baseName": "EventNotification", + "type": "EventNotification" + }, + { + "name": "GetTotalsRequest", + "baseName": "GetTotalsRequest", + "type": "GetTotalsRequest" + }, + { + "name": "InputRequest", + "baseName": "InputRequest", + "type": "InputRequest" + }, + { + "name": "InputUpdate", + "baseName": "InputUpdate", + "type": "InputUpdate" + }, + { + "name": "LoginRequest", + "baseName": "LoginRequest", + "type": "LoginRequest" + }, + { + "name": "LogoutRequest", + "baseName": "LogoutRequest", + "type": "LogoutRequest" + }, + { + "name": "LoyaltyRequest", + "baseName": "LoyaltyRequest", + "type": "LoyaltyRequest" + }, + { + "name": "MessageHeader", + "baseName": "MessageHeader", + "type": "MessageHeader" + }, + { + "name": "PaymentRequest", + "baseName": "PaymentRequest", + "type": "PaymentRequest" + }, + { + "name": "PINRequest", + "baseName": "PINRequest", + "type": "PINRequest" + }, + { + "name": "PrintRequest", + "baseName": "PrintRequest", + "type": "PrintRequest" + }, + { + "name": "ReconciliationRequest", + "baseName": "ReconciliationRequest", + "type": "ReconciliationRequest" + }, + { + "name": "ReversalRequest", + "baseName": "ReversalRequest", + "type": "ReversalRequest" + }, + { + "name": "SecurityTrailer", + "baseName": "SecurityTrailer", + "type": "ContentInformation" + }, + { + "name": "SoundRequest", + "baseName": "SoundRequest", + "type": "SoundRequest" + }, + { + "name": "StoredValueRequest", + "baseName": "StoredValueRequest", + "type": "StoredValueRequest" + }, + { + "name": "TransactionStatusRequest", + "baseName": "TransactionStatusRequest", + "type": "TransactionStatusRequest" + }, + { + "name": "TransmitRequest", + "baseName": "TransmitRequest", + "type": "TransmitRequest" + } ]; + + static getAttributeTypeMap() { + return SaleToPOIRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleToPOIResponse.ts b/src/typings/cloudDevice/saleToPOIResponse.ts new file mode 100644 index 000000000..3045a9905 --- /dev/null +++ b/src/typings/cloudDevice/saleToPOIResponse.ts @@ -0,0 +1,220 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AdminResponse } from './adminResponse'; +import { BalanceInquiryResponse } from './balanceInquiryResponse'; +import { BatchResponse } from './batchResponse'; +import { CardAcquisitionResponse } from './cardAcquisitionResponse'; +import { CardReaderAPDUResponse } from './cardReaderAPDUResponse'; +import { CardReaderInitResponse } from './cardReaderInitResponse'; +import { CardReaderPowerOffResponse } from './cardReaderPowerOffResponse'; +import { ContentInformation } from './contentInformation'; +import { DiagnosisResponse } from './diagnosisResponse'; +import { DisplayResponse } from './displayResponse'; +import { EnableServiceResponse } from './enableServiceResponse'; +import { GetTotalsResponse } from './getTotalsResponse'; +import { InputResponse } from './inputResponse'; +import { LoginResponse } from './loginResponse'; +import { LogoutResponse } from './logoutResponse'; +import { LoyaltyResponse } from './loyaltyResponse'; +import { MessageHeader } from './messageHeader'; +import { PINResponse } from './pINResponse'; +import { PaymentResponse } from './paymentResponse'; +import { PrintResponse } from './printResponse'; +import { ReconciliationResponse } from './reconciliationResponse'; +import { ReversalResponse } from './reversalResponse'; +import { SoundResponse } from './soundResponse'; +import { StoredValueResponse } from './storedValueResponse'; +import { TransactionStatusResponse } from './transactionStatusResponse'; +import { TransmitResponse } from './transmitResponse'; + +export class SaleToPOIResponse { + 'AdminResponse'?: AdminResponse; + 'BalanceInquiryResponse'?: BalanceInquiryResponse; + 'BatchResponse'?: BatchResponse; + 'CardAcquisitionResponse'?: CardAcquisitionResponse; + 'CardReaderAPDUResponse'?: CardReaderAPDUResponse; + 'CardReaderInitResponse'?: CardReaderInitResponse; + 'CardReaderPowerOffResponse'?: CardReaderPowerOffResponse; + 'DiagnosisResponse'?: DiagnosisResponse; + 'DisplayResponse'?: DisplayResponse; + 'EnableServiceResponse'?: EnableServiceResponse; + 'GetTotalsResponse'?: GetTotalsResponse; + 'InputResponse'?: InputResponse; + 'LoginResponse'?: LoginResponse; + 'LogoutResponse'?: LogoutResponse; + 'LoyaltyResponse'?: LoyaltyResponse; + 'MessageHeader': MessageHeader; + 'PaymentResponse'?: PaymentResponse; + 'PINResponse'?: PINResponse; + 'PrintResponse'?: PrintResponse; + 'ReconciliationResponse'?: ReconciliationResponse; + 'ReversalResponse'?: ReversalResponse; + 'SecurityTrailer'?: ContentInformation; + 'SoundResponse'?: SoundResponse; + 'StoredValueResponse'?: StoredValueResponse; + 'TransactionStatusResponse'?: TransactionStatusResponse; + 'TransmitResponse'?: TransmitResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdminResponse", + "baseName": "AdminResponse", + "type": "AdminResponse" + }, + { + "name": "BalanceInquiryResponse", + "baseName": "BalanceInquiryResponse", + "type": "BalanceInquiryResponse" + }, + { + "name": "BatchResponse", + "baseName": "BatchResponse", + "type": "BatchResponse" + }, + { + "name": "CardAcquisitionResponse", + "baseName": "CardAcquisitionResponse", + "type": "CardAcquisitionResponse" + }, + { + "name": "CardReaderAPDUResponse", + "baseName": "CardReaderAPDUResponse", + "type": "CardReaderAPDUResponse" + }, + { + "name": "CardReaderInitResponse", + "baseName": "CardReaderInitResponse", + "type": "CardReaderInitResponse" + }, + { + "name": "CardReaderPowerOffResponse", + "baseName": "CardReaderPowerOffResponse", + "type": "CardReaderPowerOffResponse" + }, + { + "name": "DiagnosisResponse", + "baseName": "DiagnosisResponse", + "type": "DiagnosisResponse" + }, + { + "name": "DisplayResponse", + "baseName": "DisplayResponse", + "type": "DisplayResponse" + }, + { + "name": "EnableServiceResponse", + "baseName": "EnableServiceResponse", + "type": "EnableServiceResponse" + }, + { + "name": "GetTotalsResponse", + "baseName": "GetTotalsResponse", + "type": "GetTotalsResponse" + }, + { + "name": "InputResponse", + "baseName": "InputResponse", + "type": "InputResponse" + }, + { + "name": "LoginResponse", + "baseName": "LoginResponse", + "type": "LoginResponse" + }, + { + "name": "LogoutResponse", + "baseName": "LogoutResponse", + "type": "LogoutResponse" + }, + { + "name": "LoyaltyResponse", + "baseName": "LoyaltyResponse", + "type": "LoyaltyResponse" + }, + { + "name": "MessageHeader", + "baseName": "MessageHeader", + "type": "MessageHeader" + }, + { + "name": "PaymentResponse", + "baseName": "PaymentResponse", + "type": "PaymentResponse" + }, + { + "name": "PINResponse", + "baseName": "PINResponse", + "type": "PINResponse" + }, + { + "name": "PrintResponse", + "baseName": "PrintResponse", + "type": "PrintResponse" + }, + { + "name": "ReconciliationResponse", + "baseName": "ReconciliationResponse", + "type": "ReconciliationResponse" + }, + { + "name": "ReversalResponse", + "baseName": "ReversalResponse", + "type": "ReversalResponse" + }, + { + "name": "SecurityTrailer", + "baseName": "SecurityTrailer", + "type": "ContentInformation" + }, + { + "name": "SoundResponse", + "baseName": "SoundResponse", + "type": "SoundResponse" + }, + { + "name": "StoredValueResponse", + "baseName": "StoredValueResponse", + "type": "StoredValueResponse" + }, + { + "name": "TransactionStatusResponse", + "baseName": "TransactionStatusResponse", + "type": "TransactionStatusResponse" + }, + { + "name": "TransmitResponse", + "baseName": "TransmitResponse", + "type": "TransmitResponse" + } ]; + + static getAttributeTypeMap() { + return SaleToPOIResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/saleToPOISecuredMessage.ts b/src/typings/cloudDevice/saleToPOISecuredMessage.ts new file mode 100644 index 000000000..90e6c3d67 --- /dev/null +++ b/src/typings/cloudDevice/saleToPOISecuredMessage.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MessageHeader } from './messageHeader'; +import { SecurityTrailer } from './securityTrailer'; + +export class SaleToPOISecuredMessage { + 'MessageHeader': MessageHeader; + 'NexoBlob': string; + 'SecurityTrailer': SecurityTrailer; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MessageHeader", + "baseName": "MessageHeader", + "type": "MessageHeader" + }, + { + "name": "NexoBlob", + "baseName": "NexoBlob", + "type": "string" + }, + { + "name": "SecurityTrailer", + "baseName": "SecurityTrailer", + "type": "SecurityTrailer" + } ]; + + static getAttributeTypeMap() { + return SaleToPOISecuredMessage.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/securityTrailer.ts b/src/typings/cloudDevice/securityTrailer.ts new file mode 100644 index 000000000..fb1c8e3a9 --- /dev/null +++ b/src/typings/cloudDevice/securityTrailer.ts @@ -0,0 +1,68 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SecurityTrailer { + 'AdyenCryptoVersion'?: number; + 'Hmac'?: any | null; + 'KeyIdentifier'?: string; + 'KeyVersion'?: number; + 'Nonce'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AdyenCryptoVersion", + "baseName": "AdyenCryptoVersion", + "type": "number" + }, + { + "name": "Hmac", + "baseName": "Hmac", + "type": "any" + }, + { + "name": "KeyIdentifier", + "baseName": "KeyIdentifier", + "type": "string" + }, + { + "name": "KeyVersion", + "baseName": "KeyVersion", + "type": "number" + }, + { + "name": "Nonce", + "baseName": "Nonce", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return SecurityTrailer.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/sensitiveCardData.ts b/src/typings/cloudDevice/sensitiveCardData.ts new file mode 100644 index 000000000..880146e6b --- /dev/null +++ b/src/typings/cloudDevice/sensitiveCardData.ts @@ -0,0 +1,63 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { TrackData } from './trackData'; + +export class SensitiveCardData { + 'CardSeqNumb'?: string; + 'ExpiryDate'?: string; + 'PAN'?: string; + 'TrackData'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CardSeqNumb", + "baseName": "CardSeqNumb", + "type": "string" + }, + { + "name": "ExpiryDate", + "baseName": "ExpiryDate", + "type": "string" + }, + { + "name": "PAN", + "baseName": "PAN", + "type": "string" + }, + { + "name": "TrackData", + "baseName": "TrackData", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SensitiveCardData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/sensitiveMobileData.ts b/src/typings/cloudDevice/sensitiveMobileData.ts new file mode 100644 index 000000000..b8d88a2da --- /dev/null +++ b/src/typings/cloudDevice/sensitiveMobileData.ts @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SensitiveMobileData { + 'IMEI'?: string; + 'IMSI'?: string; + 'MSISDN': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "IMEI", + "baseName": "IMEI", + "type": "string" + }, + { + "name": "IMSI", + "baseName": "IMSI", + "type": "string" + }, + { + "name": "MSISDN", + "baseName": "MSISDN", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SensitiveMobileData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/serviceProfilesType.ts b/src/typings/cloudDevice/serviceProfilesType.ts new file mode 100644 index 000000000..4dc5950b4 --- /dev/null +++ b/src/typings/cloudDevice/serviceProfilesType.ts @@ -0,0 +1,39 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ServiceProfilesType { + Batch = 'Batch', + CardReader = 'CardReader', + Communication = 'Communication', + Loyalty = 'Loyalty', + OneTimeRes = 'OneTimeRes', + Pin = 'PIN', + Reservation = 'Reservation', + Sound = 'Sound', + StoredValue = 'StoredValue', + Synchro = 'Synchro' +} diff --git a/src/typings/cloudDevice/servicesEnabledType.ts b/src/typings/cloudDevice/servicesEnabledType.ts new file mode 100644 index 000000000..671da2858 --- /dev/null +++ b/src/typings/cloudDevice/servicesEnabledType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum ServicesEnabledType { + CardAcquisition = 'CardAcquisition', + Loyalty = 'Loyalty', + Payment = 'Payment' +} diff --git a/src/typings/cloudDevice/shopperInteractionDevice.ts b/src/typings/cloudDevice/shopperInteractionDevice.ts new file mode 100644 index 000000000..0eacae7a9 --- /dev/null +++ b/src/typings/cloudDevice/shopperInteractionDevice.ts @@ -0,0 +1,56 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class ShopperInteractionDevice { + 'os'?: string; + 'osVersion'?: string; + 'locale'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "os", + "baseName": "os", + "type": "string" + }, + { + "name": "osVersion", + "baseName": "osVersion", + "type": "string" + }, + { + "name": "locale", + "baseName": "locale", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ShopperInteractionDevice.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/signaturePoint.ts b/src/typings/cloudDevice/signaturePoint.ts new file mode 100644 index 000000000..8f2753b9c --- /dev/null +++ b/src/typings/cloudDevice/signaturePoint.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SignaturePoint { + 'X': string; + 'Y': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "X", + "baseName": "X", + "type": "string" + }, + { + "name": "Y", + "baseName": "Y", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SignaturePoint.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/signedData.ts b/src/typings/cloudDevice/signedData.ts new file mode 100644 index 000000000..8ad837ec9 --- /dev/null +++ b/src/typings/cloudDevice/signedData.ts @@ -0,0 +1,81 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmIdentifier } from './algorithmIdentifier'; +import { EncapsulatedContent } from './encapsulatedContent'; +import { Signer } from './signer'; + +export class SignedData { + 'Certificate'?: Array; + 'DigestAlgorithm': Array; + 'EncapsulatedContent': EncapsulatedContent; + 'Signer': Array; + 'Version'?: SignedData.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Certificate", + "baseName": "Certificate", + "type": "Array" + }, + { + "name": "DigestAlgorithm", + "baseName": "DigestAlgorithm", + "type": "Array" + }, + { + "name": "EncapsulatedContent", + "baseName": "EncapsulatedContent", + "type": "EncapsulatedContent" + }, + { + "name": "Signer", + "baseName": "Signer", + "type": "Array" + }, + { + "name": "Version", + "baseName": "Version", + "type": "SignedData.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return SignedData.attributeTypeMap; + } +} + +export namespace SignedData { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/signer.ts b/src/typings/cloudDevice/signer.ts new file mode 100644 index 000000000..edb6ba12e --- /dev/null +++ b/src/typings/cloudDevice/signer.ts @@ -0,0 +1,80 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { AlgorithmIdentifier } from './algorithmIdentifier'; +import { SignerIdentifier } from './signerIdentifier'; + +export class Signer { + 'DigestAlgorithm': AlgorithmIdentifier; + 'Signature': any | null; + 'SignatureAlgorithm': AlgorithmIdentifier; + 'SignerIdentifier': SignerIdentifier; + 'Version'?: Signer.VersionEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DigestAlgorithm", + "baseName": "DigestAlgorithm", + "type": "AlgorithmIdentifier" + }, + { + "name": "Signature", + "baseName": "Signature", + "type": "any" + }, + { + "name": "SignatureAlgorithm", + "baseName": "SignatureAlgorithm", + "type": "AlgorithmIdentifier" + }, + { + "name": "SignerIdentifier", + "baseName": "SignerIdentifier", + "type": "SignerIdentifier" + }, + { + "name": "Version", + "baseName": "Version", + "type": "Signer.VersionEnum" + } ]; + + static getAttributeTypeMap() { + return Signer.attributeTypeMap; + } +} + +export namespace Signer { + export enum VersionEnum { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' + } +} diff --git a/src/typings/cloudDevice/signerIdentifier.ts b/src/typings/cloudDevice/signerIdentifier.ts new file mode 100644 index 000000000..d61f571c6 --- /dev/null +++ b/src/typings/cloudDevice/signerIdentifier.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { IssuerAndSerialNumber } from './issuerAndSerialNumber'; + +export class SignerIdentifier { + 'IssuerAndSerialNumber': IssuerAndSerialNumber; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "IssuerAndSerialNumber", + "baseName": "IssuerAndSerialNumber", + "type": "IssuerAndSerialNumber" + } ]; + + static getAttributeTypeMap() { + return SignerIdentifier.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/soundActionType.ts b/src/typings/cloudDevice/soundActionType.ts new file mode 100644 index 000000000..af321e2d4 --- /dev/null +++ b/src/typings/cloudDevice/soundActionType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum SoundActionType { + SetDefaultVolume = 'SetDefaultVolume', + StartSound = 'StartSound', + StopSound = 'StopSound' +} diff --git a/src/typings/cloudDevice/soundContent.ts b/src/typings/cloudDevice/soundContent.ts new file mode 100644 index 000000000..90b45c6ce --- /dev/null +++ b/src/typings/cloudDevice/soundContent.ts @@ -0,0 +1,69 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SoundContent { + 'Language'?: string; + 'ReferenceID'?: string; + 'SoundFormat'?: SoundContent.SoundFormatEnum; + 'Value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Language", + "baseName": "Language", + "type": "string" + }, + { + "name": "ReferenceID", + "baseName": "ReferenceID", + "type": "string" + }, + { + "name": "SoundFormat", + "baseName": "SoundFormat", + "type": "SoundContent.SoundFormatEnum" + }, + { + "name": "Value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SoundContent.attributeTypeMap; + } +} + +export namespace SoundContent { + export enum SoundFormatEnum { + MessageRef = 'MessageRef', + SoundRef = 'SoundRef', + Text = 'Text' + } +} diff --git a/src/typings/cloudDevice/soundFormatType.ts b/src/typings/cloudDevice/soundFormatType.ts new file mode 100644 index 000000000..48059f14d --- /dev/null +++ b/src/typings/cloudDevice/soundFormatType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum SoundFormatType { + MessageRef = 'MessageRef', + SoundRef = 'SoundRef', + Text = 'Text' +} diff --git a/src/typings/cloudDevice/soundRequest.ts b/src/typings/cloudDevice/soundRequest.ts new file mode 100644 index 000000000..6b469a36f --- /dev/null +++ b/src/typings/cloudDevice/soundRequest.ts @@ -0,0 +1,72 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SoundActionType } from './soundActionType'; +import { SoundContent } from './soundContent'; + +export class SoundRequest { + 'ResponseMode'?: SoundRequest.ResponseModeEnum; + 'SoundAction': SoundActionType; + 'SoundContent': SoundContent; + 'SoundVolume'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ResponseMode", + "baseName": "ResponseMode", + "type": "SoundRequest.ResponseModeEnum" + }, + { + "name": "SoundAction", + "baseName": "SoundAction", + "type": "SoundActionType" + }, + { + "name": "SoundContent", + "baseName": "SoundContent", + "type": "SoundContent" + }, + { + "name": "SoundVolume", + "baseName": "SoundVolume", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SoundRequest.attributeTypeMap; + } +} + +export namespace SoundRequest { + export enum ResponseModeEnum { + Immediate = 'Immediate', + NotRequired = 'NotRequired', + PrintEnd = 'PrintEnd', + SoundEnd = 'SoundEnd' + } +} diff --git a/src/typings/cloudDevice/soundResponse.ts b/src/typings/cloudDevice/soundResponse.ts new file mode 100644 index 000000000..b90998ad0 --- /dev/null +++ b/src/typings/cloudDevice/soundResponse.ts @@ -0,0 +1,45 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class SoundResponse { + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return SoundResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/sponsoredMerchant.ts b/src/typings/cloudDevice/sponsoredMerchant.ts new file mode 100644 index 000000000..78fe5ce23 --- /dev/null +++ b/src/typings/cloudDevice/sponsoredMerchant.ts @@ -0,0 +1,68 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class SponsoredMerchant { + 'MerchantAddress'?: string; + 'MerchantCategoryCode': string; + 'MerchantCountry': string; + 'MerchantName': string; + 'RegistrationID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MerchantAddress", + "baseName": "MerchantAddress", + "type": "string" + }, + { + "name": "MerchantCategoryCode", + "baseName": "MerchantCategoryCode", + "type": "string" + }, + { + "name": "MerchantCountry", + "baseName": "MerchantCountry", + "type": "string" + }, + { + "name": "MerchantName", + "baseName": "MerchantName", + "type": "string" + }, + { + "name": "RegistrationID", + "baseName": "RegistrationID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SponsoredMerchant.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueAccountId.ts b/src/typings/cloudDevice/storedValueAccountId.ts new file mode 100644 index 000000000..e122af49e --- /dev/null +++ b/src/typings/cloudDevice/storedValueAccountId.ts @@ -0,0 +1,97 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { IdentificationType } from './identificationType'; +import { StoredValueAccountType } from './storedValueAccountType'; + +export class StoredValueAccountId { + 'EntryMode': Array; + 'ExpiryDate'?: string; + 'IdentificationType': IdentificationType; + 'OwnerName'?: string; + 'StoredValueAccountType': StoredValueAccountType; + 'StoredValueProvider'?: string; + 'Value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "EntryMode", + "baseName": "EntryMode", + "type": "Array" + }, + { + "name": "ExpiryDate", + "baseName": "ExpiryDate", + "type": "string" + }, + { + "name": "IdentificationType", + "baseName": "IdentificationType", + "type": "IdentificationType" + }, + { + "name": "OwnerName", + "baseName": "OwnerName", + "type": "string" + }, + { + "name": "StoredValueAccountType", + "baseName": "StoredValueAccountType", + "type": "StoredValueAccountType" + }, + { + "name": "StoredValueProvider", + "baseName": "StoredValueProvider", + "type": "string" + }, + { + "name": "Value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StoredValueAccountId.attributeTypeMap; + } +} + +export namespace StoredValueAccountId { + export enum EntryModeEnum { + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Mobile = 'Mobile', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } +} diff --git a/src/typings/cloudDevice/storedValueAccountStatus.ts b/src/typings/cloudDevice/storedValueAccountStatus.ts new file mode 100644 index 000000000..a5f110a89 --- /dev/null +++ b/src/typings/cloudDevice/storedValueAccountStatus.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { StoredValueAccountId } from './storedValueAccountId'; + +export class StoredValueAccountStatus { + 'CurrentBalance'?: number; + 'StoredValueAccountID': StoredValueAccountId; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CurrentBalance", + "baseName": "CurrentBalance", + "type": "number" + }, + { + "name": "StoredValueAccountID", + "baseName": "StoredValueAccountID", + "type": "StoredValueAccountId" + } ]; + + static getAttributeTypeMap() { + return StoredValueAccountStatus.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueAccountType.ts b/src/typings/cloudDevice/storedValueAccountType.ts new file mode 100644 index 000000000..fd255b3c9 --- /dev/null +++ b/src/typings/cloudDevice/storedValueAccountType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum StoredValueAccountType { + GiftCard = 'GiftCard', + Other = 'Other', + PhoneCard = 'PhoneCard' +} diff --git a/src/typings/cloudDevice/storedValueData.ts b/src/typings/cloudDevice/storedValueData.ts new file mode 100644 index 000000000..d0a1ea0dc --- /dev/null +++ b/src/typings/cloudDevice/storedValueData.ts @@ -0,0 +1,89 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { OriginalPOITransaction } from './originalPOITransaction'; +import { StoredValueAccountId } from './storedValueAccountId'; +import { StoredValueTransactionType } from './storedValueTransactionType'; + +export class StoredValueData { + 'Currency': string; + 'EanUpc'?: string; + 'ItemAmount': number; + 'OriginalPOITransaction'?: OriginalPOITransaction; + 'ProductCode'?: string; + 'StoredValueAccountID'?: StoredValueAccountId; + 'StoredValueProvider'?: string; + 'StoredValueTransactionType': StoredValueTransactionType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "EanUpc", + "baseName": "EanUpc", + "type": "string" + }, + { + "name": "ItemAmount", + "baseName": "ItemAmount", + "type": "number" + }, + { + "name": "OriginalPOITransaction", + "baseName": "OriginalPOITransaction", + "type": "OriginalPOITransaction" + }, + { + "name": "ProductCode", + "baseName": "ProductCode", + "type": "string" + }, + { + "name": "StoredValueAccountID", + "baseName": "StoredValueAccountID", + "type": "StoredValueAccountId" + }, + { + "name": "StoredValueProvider", + "baseName": "StoredValueProvider", + "type": "string" + }, + { + "name": "StoredValueTransactionType", + "baseName": "StoredValueTransactionType", + "type": "StoredValueTransactionType" + } ]; + + static getAttributeTypeMap() { + return StoredValueData.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueRequest.ts b/src/typings/cloudDevice/storedValueRequest.ts new file mode 100644 index 000000000..252e5ad8a --- /dev/null +++ b/src/typings/cloudDevice/storedValueRequest.ts @@ -0,0 +1,58 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { SaleData } from './saleData'; +import { StoredValueData } from './storedValueData'; + +export class StoredValueRequest { + 'CustomerLanguage'?: string; + 'SaleData': SaleData; + 'StoredValueData': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + }, + { + "name": "StoredValueData", + "baseName": "StoredValueData", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return StoredValueRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueResponse.ts b/src/typings/cloudDevice/storedValueResponse.ts new file mode 100644 index 000000000..1066a0f61 --- /dev/null +++ b/src/typings/cloudDevice/storedValueResponse.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { POIData } from './pOIData'; +import { Response } from './response'; +import { SaleData } from './saleData'; +import { StoredValueResult } from './storedValueResult'; + +export class StoredValueResponse { + 'POIData': POIData; + 'Response': Response; + 'SaleData': SaleData; + 'StoredValueResult'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "POIData", + "baseName": "POIData", + "type": "POIData" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + }, + { + "name": "SaleData", + "baseName": "SaleData", + "type": "SaleData" + }, + { + "name": "StoredValueResult", + "baseName": "StoredValueResult", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return StoredValueResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueResult.ts b/src/typings/cloudDevice/storedValueResult.ts new file mode 100644 index 000000000..a9f78b68c --- /dev/null +++ b/src/typings/cloudDevice/storedValueResult.ts @@ -0,0 +1,83 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { StoredValueAccountStatus } from './storedValueAccountStatus'; +import { StoredValueTransactionType } from './storedValueTransactionType'; +import { TransactionIdentification } from './transactionIdentification'; + +export class StoredValueResult { + 'Currency': string; + 'EanUpc'?: string; + 'HostTransactionID'?: TransactionIdentification; + 'ItemAmount': number; + 'ProductCode': string; + 'StoredValueAccountStatus': StoredValueAccountStatus; + 'StoredValueTransactionType': StoredValueTransactionType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Currency", + "baseName": "Currency", + "type": "string" + }, + { + "name": "EanUpc", + "baseName": "EanUpc", + "type": "string" + }, + { + "name": "HostTransactionID", + "baseName": "HostTransactionID", + "type": "TransactionIdentification" + }, + { + "name": "ItemAmount", + "baseName": "ItemAmount", + "type": "number" + }, + { + "name": "ProductCode", + "baseName": "ProductCode", + "type": "string" + }, + { + "name": "StoredValueAccountStatus", + "baseName": "StoredValueAccountStatus", + "type": "StoredValueAccountStatus" + }, + { + "name": "StoredValueTransactionType", + "baseName": "StoredValueTransactionType", + "type": "StoredValueTransactionType" + } ]; + + static getAttributeTypeMap() { + return StoredValueResult.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/storedValueTransactionType.ts b/src/typings/cloudDevice/storedValueTransactionType.ts new file mode 100644 index 000000000..96dab3a5e --- /dev/null +++ b/src/typings/cloudDevice/storedValueTransactionType.ts @@ -0,0 +1,35 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum StoredValueTransactionType { + Activate = 'Activate', + Duplicate = 'Duplicate', + Load = 'Load', + Reserve = 'Reserve', + Reverse = 'Reverse', + Unload = 'Unload' +} diff --git a/src/typings/cloudDevice/terminalEnvironmentType.ts b/src/typings/cloudDevice/terminalEnvironmentType.ts new file mode 100644 index 000000000..279c3db5d --- /dev/null +++ b/src/typings/cloudDevice/terminalEnvironmentType.ts @@ -0,0 +1,32 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TerminalEnvironmentType { + Attended = 'Attended', + SemiAttended = 'SemiAttended', + Unattended = 'Unattended' +} diff --git a/src/typings/cloudDevice/tokenRequestedType.ts b/src/typings/cloudDevice/tokenRequestedType.ts new file mode 100644 index 000000000..9e53237f8 --- /dev/null +++ b/src/typings/cloudDevice/tokenRequestedType.ts @@ -0,0 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TokenRequestedType { + Customer = 'Customer', + Transaction = 'Transaction' +} diff --git a/src/typings/cloudDevice/totalDetailsType.ts b/src/typings/cloudDevice/totalDetailsType.ts new file mode 100644 index 000000000..8b3320098 --- /dev/null +++ b/src/typings/cloudDevice/totalDetailsType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TotalDetailsType { + OperatorId = 'OperatorID', + Poiid = 'POIID', + SaleId = 'SaleID', + ShiftNumber = 'ShiftNumber', + TotalsGroupId = 'TotalsGroupID' +} diff --git a/src/typings/cloudDevice/totalFilter.ts b/src/typings/cloudDevice/totalFilter.ts new file mode 100644 index 000000000..d19e51a68 --- /dev/null +++ b/src/typings/cloudDevice/totalFilter.ts @@ -0,0 +1,68 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class TotalFilter { + 'OperatorID'?: string; + 'POIID'?: string; + 'SaleID'?: string; + 'ShiftNumber'?: string; + 'TotalsGroupID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "OperatorID", + "baseName": "OperatorID", + "type": "string" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + }, + { + "name": "SaleID", + "baseName": "SaleID", + "type": "string" + }, + { + "name": "ShiftNumber", + "baseName": "ShiftNumber", + "type": "string" + }, + { + "name": "TotalsGroupID", + "baseName": "TotalsGroupID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TotalFilter.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/trackData.ts b/src/typings/cloudDevice/trackData.ts new file mode 100644 index 000000000..834444814 --- /dev/null +++ b/src/typings/cloudDevice/trackData.ts @@ -0,0 +1,66 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class TrackData { + 'TrackFormat'?: TrackData.TrackFormatEnum; + 'TrackNumb'?: number; + 'Value'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "TrackFormat", + "baseName": "TrackFormat", + "type": "TrackData.TrackFormatEnum" + }, + { + "name": "TrackNumb", + "baseName": "TrackNumb", + "type": "number" + }, + { + "name": "Value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TrackData.attributeTypeMap; + } +} + +export namespace TrackData { + export enum TrackFormatEnum { + Aamva = 'AAMVA', + Cmc7 = 'CMC-7', + E13B = 'E-13B', + Iso = 'ISO', + JisI = 'JIS-I', + JisIi = 'JIS-II' + } +} diff --git a/src/typings/cloudDevice/trackFormatType.ts b/src/typings/cloudDevice/trackFormatType.ts new file mode 100644 index 000000000..c2dc61f8a --- /dev/null +++ b/src/typings/cloudDevice/trackFormatType.ts @@ -0,0 +1,35 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TrackFormatType { + Aamva = 'AAMVA', + Cmc7 = 'CMC-7', + E13B = 'E-13B', + Iso = 'ISO', + JisI = 'JIS-I', + JisIi = 'JIS-II' +} diff --git a/src/typings/cloudDevice/transactionActionType.ts b/src/typings/cloudDevice/transactionActionType.ts new file mode 100644 index 000000000..b541f9f00 --- /dev/null +++ b/src/typings/cloudDevice/transactionActionType.ts @@ -0,0 +1,31 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TransactionActionType { + AbortTransaction = 'AbortTransaction', + StartTransaction = 'StartTransaction' +} diff --git a/src/typings/cloudDevice/transactionConditions.ts b/src/typings/cloudDevice/transactionConditions.ts new file mode 100644 index 000000000..14d8efd30 --- /dev/null +++ b/src/typings/cloudDevice/transactionConditions.ts @@ -0,0 +1,114 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class TransactionConditions { + 'AcquirerID'?: Array; + 'AllowedLoyaltyBrand'?: Array; + 'AllowedPaymentBrand'?: Array; + 'CustomerLanguage'?: string; + 'DebitPreferredFlag'?: boolean; + 'ForceEntryMode'?: Array; + 'ForceOnlineFlag'?: boolean; + 'LoyaltyHandling'?: TransactionConditions.LoyaltyHandlingEnum; + 'MerchantCategoryCode'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "Array" + }, + { + "name": "AllowedLoyaltyBrand", + "baseName": "AllowedLoyaltyBrand", + "type": "Array" + }, + { + "name": "AllowedPaymentBrand", + "baseName": "AllowedPaymentBrand", + "type": "Array" + }, + { + "name": "CustomerLanguage", + "baseName": "CustomerLanguage", + "type": "string" + }, + { + "name": "DebitPreferredFlag", + "baseName": "DebitPreferredFlag", + "type": "boolean" + }, + { + "name": "ForceEntryMode", + "baseName": "ForceEntryMode", + "type": "Array" + }, + { + "name": "ForceOnlineFlag", + "baseName": "ForceOnlineFlag", + "type": "boolean" + }, + { + "name": "LoyaltyHandling", + "baseName": "LoyaltyHandling", + "type": "TransactionConditions.LoyaltyHandlingEnum" + }, + { + "name": "MerchantCategoryCode", + "baseName": "MerchantCategoryCode", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransactionConditions.attributeTypeMap; + } +} + +export namespace TransactionConditions { + export enum ForceEntryModeEnum { + CheckReader = 'CheckReader', + Contactless = 'Contactless', + File = 'File', + Icc = 'ICC', + Keyed = 'Keyed', + MagStripe = 'MagStripe', + Manual = 'Manual', + Rfid = 'RFID', + Scanned = 'Scanned', + SynchronousIcc = 'SynchronousICC', + Tapped = 'Tapped' + } + export enum LoyaltyHandlingEnum { + Allowed = 'Allowed', + Forbidden = 'Forbidden', + Processed = 'Processed', + Proposed = 'Proposed', + Required = 'Required' + } +} diff --git a/src/typings/cloudDevice/transactionIdentification.ts b/src/typings/cloudDevice/transactionIdentification.ts new file mode 100644 index 000000000..4f9842a4f --- /dev/null +++ b/src/typings/cloudDevice/transactionIdentification.ts @@ -0,0 +1,50 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export class TransactionIdentification { + 'TimeStamp': string; + 'TransactionID': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "TimeStamp", + "baseName": "TimeStamp", + "type": "string" + }, + { + "name": "TransactionID", + "baseName": "TransactionID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransactionIdentification.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/transactionStatusRequest.ts b/src/typings/cloudDevice/transactionStatusRequest.ts new file mode 100644 index 000000000..3fa3a3bef --- /dev/null +++ b/src/typings/cloudDevice/transactionStatusRequest.ts @@ -0,0 +1,67 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MessageReference } from './messageReference'; + +export class TransactionStatusRequest { + 'DocumentQualifier'?: Array; + 'MessageReference'?: MessageReference; + 'ReceiptReprintFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DocumentQualifier", + "baseName": "DocumentQualifier", + "type": "Array" + }, + { + "name": "MessageReference", + "baseName": "MessageReference", + "type": "MessageReference" + }, + { + "name": "ReceiptReprintFlag", + "baseName": "ReceiptReprintFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return TransactionStatusRequest.attributeTypeMap; + } +} + +export namespace TransactionStatusRequest { + export enum DocumentQualifierEnum { + CashierReceipt = 'CashierReceipt', + CustomerReceipt = 'CustomerReceipt', + Document = 'Document', + Journal = 'Journal', + SaleReceipt = 'SaleReceipt', + Voucher = 'Voucher' + } +} diff --git a/src/typings/cloudDevice/transactionStatusResponse.ts b/src/typings/cloudDevice/transactionStatusResponse.ts new file mode 100644 index 000000000..4ff8fdbab --- /dev/null +++ b/src/typings/cloudDevice/transactionStatusResponse.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { MessageReference } from './messageReference'; +import { RepeatedMessageResponse } from './repeatedMessageResponse'; +import { Response } from './response'; + +export class TransactionStatusResponse { + 'MessageReference'?: MessageReference; + 'RepeatedMessageResponse'?: RepeatedMessageResponse; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "MessageReference", + "baseName": "MessageReference", + "type": "MessageReference" + }, + { + "name": "RepeatedMessageResponse", + "baseName": "RepeatedMessageResponse", + "type": "RepeatedMessageResponse" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return TransactionStatusResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/transactionToPerform.ts b/src/typings/cloudDevice/transactionToPerform.ts new file mode 100644 index 000000000..f8fd7b434 --- /dev/null +++ b/src/typings/cloudDevice/transactionToPerform.ts @@ -0,0 +1,59 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyRequest } from './loyaltyRequest'; +import { PaymentRequest } from './paymentRequest'; +import { ReversalRequest } from './reversalRequest'; + +export class TransactionToPerform { + 'LoyaltyRequest'?: LoyaltyRequest; + 'PaymentRequest'?: PaymentRequest; + 'ReversalRequest'?: ReversalRequest; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "LoyaltyRequest", + "baseName": "LoyaltyRequest", + "type": "LoyaltyRequest" + }, + { + "name": "PaymentRequest", + "baseName": "PaymentRequest", + "type": "PaymentRequest" + }, + { + "name": "ReversalRequest", + "baseName": "ReversalRequest", + "type": "ReversalRequest" + } ]; + + static getAttributeTypeMap() { + return TransactionToPerform.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/transactionTotals.ts b/src/typings/cloudDevice/transactionTotals.ts new file mode 100644 index 000000000..98c0a9c95 --- /dev/null +++ b/src/typings/cloudDevice/transactionTotals.ts @@ -0,0 +1,156 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { LoyaltyTotals } from './loyaltyTotals'; +import { PaymentInstrumentType } from './paymentInstrumentType'; +import { PaymentTotals } from './paymentTotals'; + +export class TransactionTotals { + 'AcquirerID'?: string; + 'CardBrand'?: string; + 'ErrorCondition'?: TransactionTotals.ErrorConditionEnum; + 'HostReconciliationID'?: string; + 'LoyaltyCurrency'?: string; + 'LoyaltyTotals'?: Array; + 'LoyaltyUnit'?: TransactionTotals.LoyaltyUnitEnum; + 'OperatorID'?: string; + 'PaymentCurrency'?: string; + 'PaymentInstrumentType': PaymentInstrumentType; + 'PaymentTotals'?: Array; + 'POIID'?: string; + 'SaleID'?: string; + 'ShiftNumber'?: string; + 'TotalsGroupID'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "AcquirerID", + "baseName": "AcquirerID", + "type": "string" + }, + { + "name": "CardBrand", + "baseName": "CardBrand", + "type": "string" + }, + { + "name": "ErrorCondition", + "baseName": "ErrorCondition", + "type": "TransactionTotals.ErrorConditionEnum" + }, + { + "name": "HostReconciliationID", + "baseName": "HostReconciliationID", + "type": "string" + }, + { + "name": "LoyaltyCurrency", + "baseName": "LoyaltyCurrency", + "type": "string" + }, + { + "name": "LoyaltyTotals", + "baseName": "LoyaltyTotals", + "type": "Array" + }, + { + "name": "LoyaltyUnit", + "baseName": "LoyaltyUnit", + "type": "TransactionTotals.LoyaltyUnitEnum" + }, + { + "name": "OperatorID", + "baseName": "OperatorID", + "type": "string" + }, + { + "name": "PaymentCurrency", + "baseName": "PaymentCurrency", + "type": "string" + }, + { + "name": "PaymentInstrumentType", + "baseName": "PaymentInstrumentType", + "type": "PaymentInstrumentType" + }, + { + "name": "PaymentTotals", + "baseName": "PaymentTotals", + "type": "Array" + }, + { + "name": "POIID", + "baseName": "POIID", + "type": "string" + }, + { + "name": "SaleID", + "baseName": "SaleID", + "type": "string" + }, + { + "name": "ShiftNumber", + "baseName": "ShiftNumber", + "type": "string" + }, + { + "name": "TotalsGroupID", + "baseName": "TotalsGroupID", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransactionTotals.attributeTypeMap; + } +} + +export namespace TransactionTotals { + export enum ErrorConditionEnum { + Aborted = 'Aborted', + Busy = 'Busy', + Cancel = 'Cancel', + DeviceOut = 'DeviceOut', + InProgress = 'InProgress', + InsertedCard = 'InsertedCard', + InvalidCard = 'InvalidCard', + LoggedOut = 'LoggedOut', + MessageFormat = 'MessageFormat', + NotAllowed = 'NotAllowed', + NotFound = 'NotFound', + PaymentRestriction = 'PaymentRestriction', + Refusal = 'Refusal', + UnavailableDevice = 'UnavailableDevice', + UnavailableService = 'UnavailableService', + UnreachableHost = 'UnreachableHost', + WrongPin = 'WrongPIN' + } + export enum LoyaltyUnitEnum { + Monetary = 'Monetary', + Point = 'Point' + } +} diff --git a/src/typings/cloudDevice/transactionType.ts b/src/typings/cloudDevice/transactionType.ts new file mode 100644 index 000000000..47508d68e --- /dev/null +++ b/src/typings/cloudDevice/transactionType.ts @@ -0,0 +1,48 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + + +export enum TransactionType { + Award = 'Award', + CashAdvance = 'CashAdvance', + CompletedDeffered = 'CompletedDeffered', + CompletedReservation = 'CompletedReservation', + Credit = 'Credit', + Debit = 'Debit', + Declined = 'Declined', + Failed = 'Failed', + FirstReservation = 'FirstReservation', + IssuerInstalment = 'IssuerInstalment', + OneTimeReservation = 'OneTimeReservation', + Rebate = 'Rebate', + Redemption = 'Redemption', + ReverseAward = 'ReverseAward', + ReverseCredit = 'ReverseCredit', + ReverseDebit = 'ReverseDebit', + ReverseRebate = 'ReverseRebate', + ReverseRedemption = 'ReverseRedemption', + UpdateReservation = 'UpdateReservation' +} diff --git a/src/typings/cloudDevice/transmitRequest.ts b/src/typings/cloudDevice/transmitRequest.ts new file mode 100644 index 000000000..0af34b4d9 --- /dev/null +++ b/src/typings/cloudDevice/transmitRequest.ts @@ -0,0 +1,61 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class TransmitRequest { + 'DestinationAddress': string; + 'MaximumTransmitTime': number; + 'Message': any | null; + 'WaitResponseFlag'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "DestinationAddress", + "baseName": "DestinationAddress", + "type": "string" + }, + { + "name": "MaximumTransmitTime", + "baseName": "MaximumTransmitTime", + "type": "number" + }, + { + "name": "Message", + "baseName": "Message", + "type": "any" + }, + { + "name": "WaitResponseFlag", + "baseName": "WaitResponseFlag", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return TransmitRequest.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/transmitResponse.ts b/src/typings/cloudDevice/transmitResponse.ts new file mode 100644 index 000000000..3d42accb5 --- /dev/null +++ b/src/typings/cloudDevice/transmitResponse.ts @@ -0,0 +1,51 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +import { Response } from './response'; + +export class TransmitResponse { + 'Message'?: any | null; + 'Response': Response; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "Message", + "baseName": "Message", + "type": "any" + }, + { + "name": "Response", + "baseName": "Response", + "type": "Response" + } ]; + + static getAttributeTypeMap() { + return TransmitResponse.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/uTMCoordinates.ts b/src/typings/cloudDevice/uTMCoordinates.ts new file mode 100644 index 000000000..8e3ee700a --- /dev/null +++ b/src/typings/cloudDevice/uTMCoordinates.ts @@ -0,0 +1,55 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export class UTMCoordinates { + 'UTMEastward': string; + 'UTMNorthward': string; + 'UTMZone': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "UTMEastward", + "baseName": "UTMEastward", + "type": "string" + }, + { + "name": "UTMNorthward", + "baseName": "UTMNorthward", + "type": "string" + }, + { + "name": "UTMZone", + "baseName": "UTMZone", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UTMCoordinates.attributeTypeMap; + } +} + diff --git a/src/typings/cloudDevice/unitOfMeasureType.ts b/src/typings/cloudDevice/unitOfMeasureType.ts new file mode 100644 index 000000000..65023aee1 --- /dev/null +++ b/src/typings/cloudDevice/unitOfMeasureType.ts @@ -0,0 +1,47 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum UnitOfMeasureType { + Case = 'Case', + Centilitre = 'Centilitre', + Centimetre = 'Centimetre', + Foot = 'Foot', + Gram = 'Gram', + Inch = 'Inch', + Kilogram = 'Kilogram', + Kilometre = 'Kilometre', + Litre = 'Litre', + Meter = 'Meter', + Mile = 'Mile', + Other = 'Other', + Ounce = 'Ounce', + Pint = 'Pint', + Pound = 'Pound', + Quart = 'Quart', + UkGallon = 'UKGallon', + UsGallon = 'USGallon', + Yard = 'Yard' +} diff --git a/src/typings/cloudDevice/versionType.ts b/src/typings/cloudDevice/versionType.ts new file mode 100644 index 000000000..4062942b3 --- /dev/null +++ b/src/typings/cloudDevice/versionType.ts @@ -0,0 +1,34 @@ +/* + * ###### + * ###### + * ############ ####( ###### #####. ###### ############ ############ + * ############# #####( ###### #####. ###### ############# ############# + * ###### #####( ###### #####. ###### ##### ###### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### + * ###### ###### #####( ###### #####. ###### ##### ##### ###### + * ############# ############# ############# ############# ##### ###### + * ############ ############ ############# ############ ##### ###### + * ###### + * ############# + * ############ + * Adyen NodeJS API Library + * Copyright (c) 2025 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ + +/** + * Cloud Device API + * Definition of Cloud Device API Schema + * + */ + + +export enum VersionType { + V0 = 'V0', + V1 = 'V1', + V2 = 'V2', + V3 = 'V3', + V4 = 'V4', + V5 = 'V5' +} diff --git a/src/typings/index.ts b/src/typings/index.ts index bbd23b760..c8525cf05 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -13,6 +13,7 @@ export * as balanceControl from "./balanceControl/models"; export * as balancePlatform from "./balancePlatform/models"; export * as binlookup from "./binLookup/models"; export * as checkout from "./checkout/models"; +export * as cloudDevice from "./cloudDevice/models" export * as dataProtection from "./dataProtection/models"; export * as legalEntityManagement from "./legalEntityManagement/models"; export * as management from "./management/models";