Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 23, 2024
1 parent 3585dd3 commit 16ba64d
Show file tree
Hide file tree
Showing 49 changed files with 75 additions and 2,077 deletions.
2 changes: 1 addition & 1 deletion .mock/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization" : "crossmint",
"version" : "0.31.24"
"version" : "0.33.5"
}
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ following namespace:
import { Crossmint } from "crossmint";

const request: Crossmint.CheckoutCreateOrderRequest = {
payment: {
method: Crossmint.EvmPaymentMethods.ArbitrumSepolia,
currency: Crossmint.EvmPaymentCurrency.Eth,
},
lineItems: {
collectionLocator: "crossmint:<collectionId>",
}
...
};
```

Expand All @@ -68,15 +62,6 @@ try {
}
```

Error codes are as followed:

| Status Code | Error Type |
| ----------- | -------------------------- |
| 400 | `BadRequestError` |
| 403 | `ForbiddenError` |
| 404 | `NotFoundError` |
| 503 | `ServiceUnavailableError` |

## Advanced

### Retries
Expand Down Expand Up @@ -132,7 +117,6 @@ runtimes:
- Deno v1.25+
- Bun 1.0+
- React Native
- Browser

### Customizing Fetch Client

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossmint",
"version": "0.1.7",
"version": "0.1.8",
"private": false,
"repository": "https://github.com/fern-demo/crossmint-typescript-sdk",
"main": "./index.js",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"url-join": "4.0.1",
"form-data": "4.0.0",
"form-data": "^4.0.0",
"formdata-node": "^6.0.3",
"node-fetch": "2.7.0",
"qs": "6.11.2"
Expand Down
90 changes: 15 additions & 75 deletions reference.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
## Checkout
# Reference

<details><summary> <code>client.checkout.<a href="./src/api/resources/checkout/client/Client.ts">createOrder</a>({ ...params }) -> Crossmint.CreateOrderResponse</code> </summary>
## Checkout

<details><summary><code>client.checkout.<a href="/src/api/resources/checkout/client/Client.ts">createOrder</a>({ ...params }) -> Crossmint.CreateOrderResponse</code></summary>
<dl>

<dd>

#### 📝 Description

<dl>

<dd>

<dl>

<dd>

Creates a new order that can be used to complete a headless checkout.

</dd>

</dl>

</dd>

</dl>

#### 🔌 Usage

<dl>

<dd>

<dl>

<dd>

```ts
```typescript
await client.checkout.createOrder({
payment: {
method: Crossmint.EvmPaymentMethods.ArbitrumSepolia,
Expand All @@ -49,228 +42,175 @@ await client.checkout.createOrder({
```

</dd>

</dl>

</dd>

</dl>

#### ⚙️ Parameters

<dl>

<dd>

<dl>

<dd>

**request: `Crossmint.CheckoutCreateOrderRequest`**
**request:** `Crossmint.CheckoutCreateOrderRequest`

</dd>

</dl>

<dl>

<dd>

**requestOptions: `Checkout.RequestOptions`**
**requestOptions:** `Checkout.RequestOptions`

</dd>

</dl>

</dd>

</dl>

</dd>

</dl>
</details>

<details><summary> <code>client.checkout.<a href="./src/api/resources/checkout/client/Client.ts">getOrder</a>(orderId) -> Crossmint.OrderObject</code> </summary>

<details><summary><code>client.checkout.<a href="/src/api/resources/checkout/client/Client.ts">getOrder</a>(orderId) -> Crossmint.OrderObject</code></summary>
<dl>

<dd>

#### 📝 Description

<dl>

<dd>

<dl>

<dd>

Get specific order by ID

</dd>

</dl>

</dd>

</dl>

#### 🔌 Usage

<dl>

<dd>

<dl>

<dd>

```ts
```typescript
await client.checkout.getOrder("orderId");
```

</dd>

</dl>

</dd>

</dl>

#### ⚙️ Parameters

<dl>

<dd>

<dl>

<dd>

**orderId: `string`**
**orderId:** `string`

This is the identifier for the order with UUID format.

**Example:** `9c82ef99-617f-497d-9abb-fd355291681b`

</dd>

</dl>

<dl>

<dd>

**requestOptions: `Checkout.RequestOptions`**
**requestOptions:** `Checkout.RequestOptions`

</dd>

</dl>

</dd>

</dl>

</dd>

</dl>
</details>

<details><summary> <code>client.checkout.<a href="./src/api/resources/checkout/client/Client.ts">editOrder</a>(orderId, { ...params }) -> Crossmint.OrderObject</code> </summary>

<details><summary><code>client.checkout.<a href="/src/api/resources/checkout/client/Client.ts">editOrder</a>(orderId, { ...params }) -> Crossmint.OrderObject</code></summary>
<dl>

<dd>

#### 📝 Description

<dl>

<dd>

<dl>

<dd>

Edit an existing order. You can update the recipient, the payment method, and/or the locale.

</dd>

</dl>

</dd>

</dl>

#### 🔌 Usage

<dl>

<dd>

<dl>

<dd>

```ts
```typescript
await client.checkout.editOrder("orderId");
```

</dd>

</dl>

</dd>

</dl>

#### ⚙️ Parameters

<dl>

<dd>

<dl>

<dd>

**orderId: `string`**
**orderId:** `string`

This is the identifier for the order with UUID format.

**Example:** `9c82ef99-617f-497d-9abb-fd355291681b`

</dd>

</dl>

<dl>

<dd>

**request: `Crossmint.OrderDto`**
**request:** `Crossmint.OrderDto`

</dd>

</dl>

<dl>

<dd>

**requestOptions: `Checkout.RequestOptions`**
**requestOptions:** `Checkout.RequestOptions`

</dd>

</dl>

</dd>

</dl>

</dd>

</dl>
</details>
9 changes: 6 additions & 3 deletions src/api/resources/checkout/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-SDK-Version": "0.1.8",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
body: serializers.CheckoutCreateOrderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
Expand Down Expand Up @@ -176,12 +177,13 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-SDK-Version": "0.1.8",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
abortSignal: requestOptions?.abortSignal,
Expand Down Expand Up @@ -292,12 +294,13 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.7",
"X-Fern-SDK-Version": "0.1.8",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
body: serializers.OrderDto.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
Expand Down
Loading

0 comments on commit 16ba64d

Please sign in to comment.