@marcohefti/request-network-api-client 0.5.7 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -8
- package/dist/cjs/index.js +0 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.mts +8 -13
- package/dist/esm/index.js +1 -9
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.d.mts
CHANGED
|
@@ -3631,7 +3631,7 @@ interface RequestClient {
|
|
|
3631
3631
|
* Creates a Request Network API client with typed domain facades.
|
|
3632
3632
|
*
|
|
3633
3633
|
* @param options - Client configuration options
|
|
3634
|
-
* @param options.baseUrl - API base URL (defaults to
|
|
3634
|
+
* @param options.baseUrl - API base URL (defaults to https://api.request.network)
|
|
3635
3635
|
* @param options.apiKey - API key for server-side authentication
|
|
3636
3636
|
* @param options.clientId - Client ID for browser/frontend authentication
|
|
3637
3637
|
* @param options.runtimeValidation - Enable/disable runtime validation (default: true)
|
|
@@ -3644,26 +3644,21 @@ interface RequestClient {
|
|
|
3644
3644
|
*
|
|
3645
3645
|
* @example
|
|
3646
3646
|
* ```ts
|
|
3647
|
-
* import { createRequestClient
|
|
3647
|
+
* import { createRequestClient } from '@marcohefti/request-network-api-client';
|
|
3648
3648
|
*
|
|
3649
3649
|
* const client = createRequestClient({
|
|
3650
|
-
* baseUrl: RequestEnvironment.production,
|
|
3651
3650
|
* apiKey: process.env.REQUEST_API_KEY,
|
|
3652
|
-
* logLevel: 'info',
|
|
3653
3651
|
* });
|
|
3654
3652
|
*
|
|
3655
|
-
* const
|
|
3653
|
+
* const request = await client.requests.create({
|
|
3654
|
+
* amount: '0.01',
|
|
3655
|
+
* paymentNetwork: 'erc20-sepolia',
|
|
3656
|
+
* paymentCurrency: 'ETH-sepolia-sepolia',
|
|
3657
|
+
* });
|
|
3656
3658
|
* ```
|
|
3657
3659
|
*/
|
|
3658
3660
|
declare function createRequestClient(options?: CreateClientOptions): RequestClient;
|
|
3659
3661
|
|
|
3660
|
-
declare const RequestEnvironment: {
|
|
3661
|
-
readonly production: "https://api.request.network";
|
|
3662
|
-
readonly staging: "https://api.stage.request.network";
|
|
3663
|
-
readonly local: "http://127.0.0.1:8080";
|
|
3664
|
-
};
|
|
3665
|
-
type RequestEnvironmentName = keyof typeof RequestEnvironment;
|
|
3666
|
-
|
|
3667
3662
|
declare const OP_CREATE: "RequestControllerV1_createRequest_v1";
|
|
3668
3663
|
declare const OP_PAYMENT_ROUTES: "RequestControllerV1_getRequestPaymentRoutes_v1";
|
|
3669
3664
|
declare const OP_PAYMENT_CALLDATA: "RequestControllerV1_getPaymentCalldata_v1";
|
|
@@ -5499,4 +5494,4 @@ declare namespace index {
|
|
|
5499
5494
|
export { type index_CreateWebhookMiddlewareOptions as CreateWebhookMiddlewareOptions, index_DEFAULT_SIGNATURE_ALGORITHM as DEFAULT_SIGNATURE_ALGORITHM, index_DEFAULT_SIGNATURE_HEADER as DEFAULT_SIGNATURE_HEADER, type index_GetRawBody as GetRawBody, type index_InferDispatcherPayload as InferDispatcherPayload, type NormalisedHeaders as NormalizedWebhookHeaders, type index_ParseWebhookEventOptions as ParseWebhookEventOptions, type index_ParsedWebhookEvent as ParsedWebhookEvent, index_RequestWebhookSignatureError as RequestWebhookSignatureError, type index_ShouldSkipVerification as ShouldSkipVerification, type index_VerifyWebhookSignatureOptions as VerifyWebhookSignatureOptions, type index_VerifyWebhookSignatureResult as VerifyWebhookSignatureResult, index_WEBHOOK_EVENT_NAMES as WEBHOOK_EVENT_NAMES, type index_WebhookDispatchContext as WebhookDispatchContext, index_WebhookDispatcher as WebhookDispatcher, type index_WebhookEventName as WebhookEventName, type index_WebhookHandler as WebhookHandler, type index_WebhookHeaders as WebhookHeaders, type index_WebhookLogger as WebhookLogger, type index_WebhookPayload as WebhookPayload, type index_WebhookPayloadMap as WebhookPayloadMap, type index_WebhookRequest as WebhookRequest, type index_WebhookSignatureErrorReason as WebhookSignatureErrorReason, index_createWebhookDispatcher as createWebhookDispatcher, index_createWebhookMiddleware as createWebhookMiddleware, index$1 as events, index_getWebhookSchema as getWebhookSchema, index_isRequestWebhookSignatureError as isRequestWebhookSignatureError, index_parseWebhookEvent as parseWebhookEvent, testing_webhook as testing, index_verifyWebhookSignature as verifyWebhookSignature };
|
|
5500
5495
|
}
|
|
5501
5496
|
|
|
5502
|
-
export { type BuildRequestApiErrorOptions, type CreateClientOptions, HttpAdapter, HttpClient, Interceptor, type ParseRegistryOptions, type ParseResult, type ParseWithSchemaOptions, RequestApiError, type RequestClient,
|
|
5497
|
+
export { type BuildRequestApiErrorOptions, type CreateClientOptions, HttpAdapter, HttpClient, Interceptor, type ParseRegistryOptions, type ParseResult, type ParseWithSchemaOptions, RequestApiError, type RequestClient, type RequestErrorDetail, type RequestErrorMetadata, RequestOptions, RetryConfig, RuntimeValidationOption, type SchemaKey, type SchemaKind, type SchemaOutput, SchemaRegistry, ValidationError, browserFetchAdapter, buildRequestApiError, createHttpClient, createRequestClient, index$8 as currenciesV1, isRequestApiError, nodeFetchAdapter, parseWithRegistry, parseWithSchema, index$6 as pay, index$7 as payV1, index$5 as payerV1, index$4 as payerV2, index$3 as payments, index$2 as requestsV1, schemaRegistry, index as webhooks };
|
package/dist/esm/index.js
CHANGED
|
@@ -2309,14 +2309,6 @@ function createRequestClient(options) {
|
|
|
2309
2309
|
};
|
|
2310
2310
|
}
|
|
2311
2311
|
|
|
2312
|
-
// src/core/config/request-environment.config.ts
|
|
2313
|
-
var RequestEnvironment = {
|
|
2314
|
-
production: "https://api.request.network",
|
|
2315
|
-
// Legacy placeholder for partner-managed sandboxes; Request does not operate a public staging host.
|
|
2316
|
-
staging: "https://api.stage.request.network",
|
|
2317
|
-
local: "http://127.0.0.1:8080"
|
|
2318
|
-
};
|
|
2319
|
-
|
|
2320
2312
|
// src/domains/requests/v1/index.ts
|
|
2321
2313
|
var v1_exports4 = {};
|
|
2322
2314
|
__export(v1_exports4, {
|
|
@@ -3423,6 +3415,6 @@ function assertRequestRecurringEvent(event) {
|
|
|
3423
3415
|
}
|
|
3424
3416
|
}
|
|
3425
3417
|
|
|
3426
|
-
export { DEFAULT_RETRY_CONFIG, RequestApiError,
|
|
3418
|
+
export { DEFAULT_RETRY_CONFIG, RequestApiError, SchemaRegistry, ValidationError, browserFetchAdapter, buildRequestApiError, client_ids_exports as clientIds, computeRetryDelay, createHttpClient, createRequestClient, currencies_exports as currencies, v1_exports as currenciesV1, isRequestApiError, nodeFetchAdapter, parseWithRegistry, parseWithSchema, pay_exports as pay, v1_exports2 as payV1, payer_exports as payer, v1_exports3 as payerV1, v2_exports as payerV2, payments_exports as payments, payouts_exports as payouts, requests_exports as requests, v1_exports4 as requestsV1, schemaRegistry, shouldRetryRequest, webhooks_exports as webhooks };
|
|
3427
3419
|
//# sourceMappingURL=index.js.map
|
|
3428
3420
|
//# sourceMappingURL=index.js.map
|