mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
Bundle type definitions with package
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@adyen/api-library",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1-rc.0",
|
||||
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
|
||||
"main": "dist/lib/src/index.js",
|
||||
"types": "dist/lib/src/index.d.ts",
|
||||
"types": "dist/lib/src/typings/index.d.ts",
|
||||
"module": "dist/lib-esm/src/index.js",
|
||||
"engines": {
|
||||
"node": ">=8.1.1"
|
||||
@@ -48,7 +48,6 @@
|
||||
"@babel/runtime": "7.8.3",
|
||||
"@types/jest": "24.0.25",
|
||||
"@types/nock": "10.0.3",
|
||||
"@types/node": "13.1.7",
|
||||
"@typescript-eslint/eslint-plugin": "2.16.0",
|
||||
"@typescript-eslint/parser": "2.16.0",
|
||||
"babel-loader": "8.0.6",
|
||||
@@ -64,6 +63,7 @@
|
||||
"webpack-cli": "3.3.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "13.1.7",
|
||||
"https-proxy-agent": "4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import Resource from "../services/resource";
|
||||
import HttpClientException from "../httpClient/httpClientException";
|
||||
import ApiException from "../services/exception/apiException";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
async function getJsonResponse<T>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<string>;
|
||||
async function getJsonResponse<T, R>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<R>;
|
||||
|
||||
@@ -22,6 +22,7 @@ import { AgentOptions } from "https";
|
||||
import HttpClientException from "./httpClientException";
|
||||
import ApiException from "../services/exception/apiException";
|
||||
import {Config} from "../index";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
interface ClientInterface {
|
||||
request(
|
||||
|
||||
@@ -33,6 +33,7 @@ import {ApiError} from "../typings/apiError";
|
||||
import ApiException from "../services/exception/apiException";
|
||||
import ClientInterface from "./clientInterface";
|
||||
import {ApiConstants} from "../constants/apiConstants";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
class HttpURLConnectionClient implements ClientInterface {
|
||||
private static CHARSET = "utf-8";
|
||||
|
||||
@@ -29,6 +29,7 @@ import PaymentSession from "./resource/checkout/paymentSession";
|
||||
import PaymentsResult from "./resource/checkout/paymentsResult";
|
||||
import PaymentLinks from "./resource/checkout/paymentLinks";
|
||||
import setApplicationInfo from "../helpers/setApplicationInfo";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
class Checkout extends ApiKeyAuthenticatedService {
|
||||
private readonly _payments: Payments;
|
||||
|
||||
@@ -29,6 +29,7 @@ import Refund from "./resource/modification/refund";
|
||||
import TechnicalCancel from "./resource/modification/technicalCancel";
|
||||
import setApplicationInfo from "../helpers/setApplicationInfo";
|
||||
import {ApplicationInfo} from "../typings/applicationInfo";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
interface AppInfo { applicationInfo?: ApplicationInfo }
|
||||
type GenericRequest<T> = T & AppInfo;
|
||||
|
||||
@@ -24,6 +24,7 @@ import Service from "../service";
|
||||
import HttpClientException from "../httpClient/httpClientException";
|
||||
import ApiException from "./exception/apiException";
|
||||
import ClientInterface from "../httpClient/clientInterface";
|
||||
import {IRequest} from "../typings/requestOptions";
|
||||
|
||||
abstract class Resource {
|
||||
protected endpoint: string;
|
||||
|
||||
@@ -40,22 +40,22 @@ export class ApplicationInfo {
|
||||
}
|
||||
}
|
||||
|
||||
export interface CommonField {
|
||||
declare interface CommonField {
|
||||
name?: string;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface ExternalPlatform extends CommonField {
|
||||
declare interface ExternalPlatform extends CommonField {
|
||||
integrator?: string;
|
||||
}
|
||||
|
||||
export interface MerchantDevice {
|
||||
declare interface MerchantDevice {
|
||||
os?: string;
|
||||
osVersion?: string;
|
||||
reference?: string;
|
||||
}
|
||||
|
||||
export interface ShopperInteractionDevice {
|
||||
declare interface ShopperInteractionDevice {
|
||||
os?: string;
|
||||
osVersion?: string;
|
||||
locale?: string;
|
||||
|
||||
18
src/typings/index.ts
Normal file
18
src/typings/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/// <reference path="amount.ts" />
|
||||
/// <reference path="apiError.ts" />
|
||||
/// <reference path="applicationInfo.ts" />
|
||||
/// <reference path="binLookup.ts" />
|
||||
/// <reference path="checkout.ts" />
|
||||
/// <reference path="checkoutUtility.ts" />
|
||||
/// <reference path="marketPayAccount.ts" />
|
||||
/// <reference path="marketPayFund.ts" />
|
||||
/// <reference path="marketPayHostedOnboardingPage.ts" />
|
||||
/// <reference path="marketPayNotificationConfiguration.ts" />
|
||||
/// <reference path="marketPayNotifications.ts" />
|
||||
/// <reference path="nexo.ts" />
|
||||
/// <reference path="notification.ts" />
|
||||
/// <reference path="payments.ts" />
|
||||
/// <reference path="payouts.ts" />
|
||||
/// <reference path="recurring.ts" />
|
||||
/// <reference path="requestOptions.ts" />
|
||||
/// <reference path="terminal.ts" />
|
||||
@@ -20,8 +20,13 @@
|
||||
*/
|
||||
|
||||
// Generated using typescript-generator version 2.14.505 on 2019-06-03 16:13:35.
|
||||
declare namespace IRequest {
|
||||
export type Options = HttpsRequestOptions & {
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
import * as https from "https";
|
||||
|
||||
export namespace IRequest {
|
||||
export type Options = https.RequestOptions & {
|
||||
idempotencyKey?: string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user