@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 CHANGED
@@ -1,8 +1,12 @@
1
1
  # Request Network API Client (TypeScript)
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@marcohefti/request-network-api-client.svg)](https://www.npmjs.com/package/@marcohefti/request-network-api-client)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js CI](https://github.com/marcohefti/request-network-api-client-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/marcohefti/request-network-api-client-ts/actions/workflows/ci.yml)
3
+ [![npm version](https://img.shields.io/npm/v/@marcohefti/request-network-api-client.svg?style=flat-square)](https://www.npmjs.com/package/@marcohefti/request-network-api-client)
4
+ [![Node.js CI](https://img.shields.io/github/actions/workflow/status/marcohefti/request-network-api-client-ts/ci.yml?branch=main&label=tests&style=flat-square)](https://github.com/marcohefti/request-network-api-client-ts/actions/workflows/ci.yml)
5
+ [![Node Version](https://img.shields.io/node/v/@marcohefti/request-network-api-client.svg?style=flat-square)](https://www.npmjs.com/package/@marcohefti/request-network-api-client)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
7
+ [![Total Downloads](https://img.shields.io/npm/dt/@marcohefti/request-network-api-client.svg?style=flat-square)](https://www.npmjs.com/package/@marcohefti/request-network-api-client)
8
+ [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@marcohefti/request-network-api-client?style=flat-square)](https://bundlephobia.com/package/@marcohefti/request-network-api-client)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
6
10
 
7
11
  TypeScript client for the Request Network hosted REST API. Provides typed, ergonomic helpers for requests, payouts, payer/compliance, client IDs, currencies, and payments, with runtime validation and webhook utilities built in.
8
12
 
@@ -32,20 +36,18 @@ yarn add @marcohefti/request-network-api-client
32
36
  ```ts
33
37
  import {
34
38
  createRequestClient,
35
- RequestEnvironment,
36
39
  isRequestApiError,
37
40
  } from '@marcohefti/request-network-api-client';
38
41
 
39
42
  const client = createRequestClient({
40
- baseUrl: RequestEnvironment.production,
41
43
  apiKey: process.env.REQUEST_API_KEY!,
42
44
  });
43
45
 
44
46
  // Create a request
45
47
  const request = await client.requests.create({
46
- amount: '12.5',
47
- invoiceCurrency: 'USD',
48
- paymentCurrency: 'USDC-sepolia',
48
+ amount: '0.01',
49
+ paymentNetwork: 'erc20-sepolia',
50
+ paymentCurrency: 'ETH-sepolia-sepolia',
49
51
  });
50
52
 
51
53
  // List currencies
package/dist/cjs/index.js CHANGED
@@ -2311,14 +2311,6 @@ function createRequestClient(options) {
2311
2311
  };
2312
2312
  }
2313
2313
 
2314
- // src/core/config/request-environment.config.ts
2315
- var RequestEnvironment = {
2316
- production: "https://api.request.network",
2317
- // Legacy placeholder for partner-managed sandboxes; Request does not operate a public staging host.
2318
- staging: "https://api.stage.request.network",
2319
- local: "http://127.0.0.1:8080"
2320
- };
2321
-
2322
2314
  // src/domains/requests/v1/index.ts
2323
2315
  var v1_exports4 = {};
2324
2316
  __export(v1_exports4, {
@@ -3427,7 +3419,6 @@ function assertRequestRecurringEvent(event) {
3427
3419
 
3428
3420
  exports.DEFAULT_RETRY_CONFIG = DEFAULT_RETRY_CONFIG;
3429
3421
  exports.RequestApiError = RequestApiError;
3430
- exports.RequestEnvironment = RequestEnvironment;
3431
3422
  exports.SchemaRegistry = SchemaRegistry;
3432
3423
  exports.ValidationError = ValidationError;
3433
3424
  exports.browserFetchAdapter = browserFetchAdapter;