Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- August 7, 2024 #12

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,3 @@ jobs:

- name: Compile
run: yarn && yarn test

publish:
needs: [ compile, test ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build

- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
if [[ ${GITHUB_REF} == *alpha* ]]; then
npm publish --access public --tag alpha
elif [[ ${GITHUB_REF} == *beta* ]]; then
npm publish --access public --tag beta
else
npm publish --access public
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Crossmint TypeScript Library

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
[![npm shield](https://img.shields.io/npm/v/crossmint)](https://www.npmjs.com/package/crossmint)
[![npm shield](https://img.shields.io/npm/v/@crossmint/autogen-sdk-ts)](https://www.npmjs.com/package/@crossmint/autogen-sdk-ts)

The Crossmint TypeScript library provides convenient access to the Crossmint API from TypeScript.

## Installation

```sh
npm i -s crossmint
npm i -s @crossmint/autogen-sdk-ts
```

## Usage

Instantiate and use the client with the following:

```typescript
import { CrossmintClient, Crossmint } from "crossmint";
import { CrossmintClient, Crossmint } from "@crossmint/autogen-sdk-ts";

const client = new CrossmintClient({ apiKey: "YOUR_API_KEY", clientSecret: "YOUR_CLIENT_SECRET" });
await client.wallets({});
Expand All @@ -28,7 +28,7 @@ The SDK exports all request and response types as TypeScript interfaces. Simply
following namespace:

```typescript
import { Crossmint } from "crossmint";
import { Crossmint } from "@crossmint/autogen-sdk-ts";

const request: Crossmint.CreateOrderRequest = {
...
Expand All @@ -41,7 +41,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
will be thrown.

```typescript
import { CrossmintError } from "crossmint";
import { CrossmintError } from "@crossmint/autogen-sdk-ts";

try {
await client.wallets(...);
Expand Down Expand Up @@ -116,7 +116,7 @@ The SDK provides a way for your to customize the underlying HTTP client / Fetch
unsupported environment, this provides a way for you to break glass and ensure the SDK works.

```typescript
import { CrossmintClient } from "crossmint";
import { CrossmintClient } from "@crossmint/autogen-sdk-ts";

const client = new CrossmintClient({
...
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "crossmint",
"version": "0.2.2",
"name": "@crossmint/autogen-sdk-ts",
"version": "0.2.3",
"private": false,
"repository": "https://github.com/Paella-Labs/typescript-sdk",
"repository": "https://github.com/Crossmint/autogen-sdk-ts",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export class CrossmintClient {
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -164,8 +164,8 @@ export class CrossmintClient {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -244,8 +244,8 @@ export class CrossmintClient {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class Actions {
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/checkout/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class Checkout {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/headless/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export class Headless {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -148,8 +148,8 @@ export class Headless {
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -233,8 +233,8 @@ export class Headless {
method: "PATCH",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
40 changes: 20 additions & 20 deletions src/api/resources/nfTs/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export class NfTs {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -170,8 +170,8 @@ export class NfTs {
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -268,8 +268,8 @@ export class NfTs {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -364,8 +364,8 @@ export class NfTs {
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
"x-idempotency-key": idempotencyKey != null ? idempotencyKey : undefined,
Expand Down Expand Up @@ -457,8 +457,8 @@ export class NfTs {
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -558,8 +558,8 @@ export class NfTs {
method: "PUT",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -650,8 +650,8 @@ export class NfTs {
method: "DELETE",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -751,8 +751,8 @@ export class NfTs {
method: "PATCH",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -836,8 +836,8 @@ export class NfTs {
method: "DELETE",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -939,8 +939,8 @@ export class NfTs {
method: "PATCH",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.2.2",
"X-Fern-SDK-Name": "@crossmint/autogen-sdk-ts",
"X-Fern-SDK-Version": "0.2.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Loading
Loading