correios-webservice
Version:
Cliente NodeJS para consumir a api nova dos Correios (CWS)
26 lines • 614 B
JavaScript
import { Http } from "./http";
const defaultConfig = {
apiVersion: "v1",
baseUrl: "https://api.correios.com.br",
};
class Endpoint {
http;
config;
constructor(auth, config = {}) {
const mergeConfig = {
...defaultConfig,
...config,
};
this.config = mergeConfig;
this.http = new Http(auth, {
baseURL: this.config.baseUrl,
prefix: this.getPrefix(),
apiVersion: this.config.apiVersion,
});
}
getPrefix() {
return "";
}
}
export { Endpoint };
//# sourceMappingURL=endpoint.js.map