@trycourier/courier
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -1,7 +0,2 @@ | ||
import { ICourierClientConfiguration, ICourierProfileGetParameters, ICourierProfileGetResponse, ICourierProfilePostParameters, ICourierProfilePostResponse, ICourierProfilePutParameters, ICourierProfilePutResponse, ICourierSendParameters, ICourierSendResponse } from "./types"; | ||
export declare const client: (options: ICourierClientConfiguration) => { | ||
getProfile: (params: ICourierProfileGetParameters) => Promise<ICourierProfileGetResponse>; | ||
mergeProfile: (params: ICourierProfilePostParameters) => Promise<ICourierProfilePostResponse>; | ||
replaceProfile: (params: ICourierProfilePutParameters) => Promise<ICourierProfilePutResponse>; | ||
send: (params: ICourierSendParameters) => Promise<ICourierSendResponse>; | ||
}; | ||
import { ICourierClient, ICourierClientConfiguration } from "./types"; | ||
export declare const client: (options: ICourierClientConfiguration) => ICourierClient; |
import { ICourierClientOptions } from "./types"; | ||
declare const _default: (options: ICourierClientOptions) => { | ||
getProfile: (params: import("./types").ICourierProfileGetParameters) => Promise<import("./types").ICourierProfileGetResponse>; | ||
mergeProfile: (params: import("./types").ICourierProfilePostParameters) => Promise<import("./types").ICourierProfilePostResponse>; | ||
replaceProfile: (params: import("./types").ICourierProfilePutParameters) => Promise<import("./types").ICourierProfilePutResponse>; | ||
send: (params: import("./types").ICourierSendParameters) => Promise<import("./types").ICourierSendResponse>; | ||
}; | ||
export default _default; | ||
export declare const CourierClient: (options: ICourierClientOptions) => import("./types").ICourierClient; |
@@ -8,3 +8,3 @@ "use strict"; | ||
}; | ||
exports.default = (function (options) { | ||
exports.CourierClient = function (options) { | ||
var axiosInstance = axios_1.default.create({ | ||
@@ -20,2 +20,2 @@ baseURL: options.baseUrl || DEFAULTS.BASE_URL, | ||
return courier; | ||
}); | ||
}; |
@@ -46,1 +46,7 @@ export declare type HttpMethodClient = <T>(url: string, body?: object) => Promise<{ | ||
} | ||
export interface ICourierClient { | ||
send: (params: ICourierSendParameters) => Promise<ICourierSendResponse>; | ||
replaceProfile: (params: ICourierProfilePutParameters) => Promise<ICourierProfilePutResponse>; | ||
mergeProfile: (params: ICourierProfilePostParameters) => Promise<ICourierProfilePostResponse>; | ||
getProfile: (params: ICourierProfileGetParameters) => Promise<ICourierProfileGetResponse>; | ||
} |
{ | ||
"name": "@trycourier/courier", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A node.js module for communicating with the Courier REST API.", | ||
@@ -10,6 +10,6 @@ "main": "lib/index.js", | ||
], | ||
"homepage": "https://github.com/trycourier/courier-node", | ||
"repository": "git@github.com:trycourier/courier-node.git", | ||
"author": "Courier <support@trycourier.com>", | ||
"license": "MIT", | ||
"private": false, | ||
"devDependencies": { | ||
@@ -16,0 +16,0 @@ "@types/jest": "^24.0.15", |
@@ -14,5 +14,4 @@ # `@trycourier/courier` | ||
```javascript | ||
import CourierClient from "@trycourier/courier"; | ||
// or, if not using import syntax (IMPORTANT: note the .default!): | ||
// const CourierClient = require("@trycourier/courier).default; | ||
import { CourierClient } from "@trycourier/courier"; | ||
// const { CourierClient } = require("@trycourier/courier); | ||
@@ -19,0 +18,0 @@ const courier = CourierClient({ authorizationToken: "<AUTH_TOKEN>" }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
11015
183
66