Rocky_Mountain_Vending/.pnpm-store/v10/files/7e/9fd25b724eaa80d351975594ae1850825d3ad6276170b404598ba38b3192b8029072e6026005d248d750996e9478e1883cf7dde264730ae67a00b3afed0e97
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

53 lines
1.8 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClientResponse = exports.HttpClient = void 0;
/**
* Encapsulates the logic for issuing a request to the Stripe API.
*
* A custom HTTP client should should implement:
* 1. A response class which extends HttpClientResponse and wraps around their
* own internal representation of a response.
* 2. A client class which extends HttpClient and implements all methods,
* returning their own response class when making requests.
*/
class HttpClient {
/** The client name used for diagnostics. */
getClientName() {
throw new Error('getClientName not implemented.');
}
makeRequest(host, port, path, method, headers, requestData, protocol, timeout) {
throw new Error('makeRequest not implemented.');
}
/** Helper to make a consistent timeout error across implementations. */
static makeTimeoutError() {
const timeoutErr = new TypeError(HttpClient.TIMEOUT_ERROR_CODE);
timeoutErr.code = HttpClient.TIMEOUT_ERROR_CODE;
return timeoutErr;
}
}
exports.HttpClient = HttpClient;
// Public API accessible via Stripe.HttpClient
HttpClient.CONNECTION_CLOSED_ERROR_CODES = ['ECONNRESET', 'EPIPE'];
HttpClient.TIMEOUT_ERROR_CODE = 'ETIMEDOUT';
class HttpClientResponse {
constructor(statusCode, headers) {
this._statusCode = statusCode;
this._headers = headers;
}
getStatusCode() {
return this._statusCode;
}
getHeaders() {
return this._headers;
}
getRawResponse() {
throw new Error('getRawResponse not implemented.');
}
toStream(streamCompleteCallback) {
throw new Error('toStream not implemented.');
}
toJSON() {
throw new Error('toJSON not implemented.');
}
}
exports.HttpClientResponse = HttpClientResponse;