Skip to content

Commit

Permalink
Release 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 17, 2024
1 parent ac0c6b8 commit e505a68
Show file tree
Hide file tree
Showing 27 changed files with 191 additions and 197 deletions.
28 changes: 14 additions & 14 deletions .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ types:
Locale for the checkout, in IETF BCP 47. It impacts the email receipt
language. Ensure your UI is set to the same language as specified here.
Throws an error if passed an invalid language.
PaymentZeroMethod:
EvmPaymentMethods:
enum:
- value: arbitrum-sepolia
name: ArbitrumSepolia
Expand All @@ -105,49 +105,49 @@ types:
- bsc
- ethereum
- optimism
PaymentZeroCurrency:
EvmPaymentCurrency:
enum:
- eth
- usdc
- degen
- brett
- toshi
EvmPaymentMethods:
EvmPayment:
properties:
receiptEmail:
type: optional<string>
docs: Email that the receipt will be sent to.
validation:
format: email
method: PaymentZeroMethod
currency: PaymentZeroCurrency
method: EvmPaymentMethods
currency: EvmPaymentCurrency
payerAddress:
type: optional<string>
docs: An EVM wallet address.
validation:
pattern: ^0x[0-9a-fA-F]{40}$
PaymentOneCurrency:
SolanaPaymentCurrency:
enum:
- sol
- usdc
- bonk
- wif
- mother
SolanaPaymentMethods:
SolanaPayment:
properties:
receiptEmail:
type: optional<string>
docs: Email that the receipt will be sent to.
validation:
format: email
method: literal<"solana">
currency: PaymentOneCurrency
currency: SolanaPaymentCurrency
payerAddress:
type: optional<string>
docs: A Solana public key.
validation:
pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
PaymentCurrencyCurrency:
FiatPaymentCurrency:
enum:
- usd
- eur
Expand All @@ -159,21 +159,21 @@ types:
- krw
- inr
- vnd
FiatPaymentMethods:
FiatPayment:
properties:
receiptEmail:
type: optional<string>
docs: Email that the receipt will be sent to.
validation:
format: email
method: literal<"stripe-payment-element">
currency: optional<PaymentCurrencyCurrency>
currency: optional<FiatPaymentCurrency>
Payment:
discriminated: false
union:
- EvmPaymentMethods
- SolanaPaymentMethods
- FiatPaymentMethods
- EvmPayment
- SolanaPayment
- FiatPayment
LineItemsCallDataCallData:
docs: Information that you pass to your contract mint function.
properties:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossmint",
"version": "0.1.3",
"version": "0.1.4",
"private": false,
"repository": "https://github.com/fern-demo/crossmint-typescript-sdk",
"main": "./index.js",
Expand Down
4 changes: 2 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Creates a new order that can be used to complete a headless checkout.
```ts
await client.checkout.createOrder({
payment: {
method: Crossmint.PaymentZeroMethod.ArbitrumSepolia,
currency: Crossmint.PaymentZeroCurrency.Eth,
method: Crossmint.EvmPaymentMethods.ArbitrumSepolia,
currency: Crossmint.EvmPaymentCurrency.Eth,
},
lineItems: {
collectionLocator: "crossmint:<collectionId>",
Expand Down
10 changes: 5 additions & 5 deletions src/api/resources/checkout/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class Checkout {
* @example
* await client.checkout.createOrder({
* payment: {
* method: Crossmint.PaymentZeroMethod.ArbitrumSepolia,
* currency: Crossmint.PaymentZeroCurrency.Eth
* method: Crossmint.EvmPaymentMethods.ArbitrumSepolia,
* currency: Crossmint.EvmPaymentCurrency.Eth
* },
* lineItems: {
* collectionLocator: "crossmint:<collectionId>"
Expand All @@ -64,7 +64,7 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.3",
"X-Fern-SDK-Version": "0.1.4",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -176,7 +176,7 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.3",
"X-Fern-SDK-Version": "0.1.4",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -292,7 +292,7 @@ export class Checkout {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.1.3",
"X-Fern-SDK-Version": "0.1.4",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import * as Crossmint from "../../../../index";
* @example
* {
* payment: {
* method: Crossmint.PaymentZeroMethod.ArbitrumSepolia,
* currency: Crossmint.PaymentZeroCurrency.Eth
* method: Crossmint.EvmPaymentMethods.ArbitrumSepolia,
* currency: Crossmint.EvmPaymentCurrency.Eth
* },
* lineItems: {
* collectionLocator: "crossmint:<collectionId>"
Expand Down
14 changes: 14 additions & 0 deletions src/api/types/EvmPayment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Crossmint from "../index";

export interface EvmPayment {
/** Email that the receipt will be sent to. */
receiptEmail?: string;
method: Crossmint.EvmPaymentMethods;
currency: Crossmint.EvmPaymentCurrency;
/** An EVM wallet address. */
payerAddress?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* This file was auto-generated by Fern from our API Definition.
*/

export type PaymentZeroCurrency = "eth" | "usdc" | "degen" | "brett" | "toshi";
export type EvmPaymentCurrency = "eth" | "usdc" | "degen" | "brett" | "toshi";

export const PaymentZeroCurrency = {
export const EvmPaymentCurrency = {
Eth: "eth",
Usdc: "usdc",
Degen: "degen",
Expand Down
28 changes: 19 additions & 9 deletions src/api/types/EvmPaymentMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Crossmint from "../index";
export type EvmPaymentMethods =
| "arbitrum-sepolia"
| "base-sepolia"
| "ethereum-sepolia"
| "optimism-sepolia"
| "arbitrum"
| "bsc"
| "ethereum"
| "optimism";

export interface EvmPaymentMethods {
/** Email that the receipt will be sent to. */
receiptEmail?: string;
method: Crossmint.PaymentZeroMethod;
currency: Crossmint.PaymentZeroCurrency;
/** An EVM wallet address. */
payerAddress?: string;
}
export const EvmPaymentMethods = {
ArbitrumSepolia: "arbitrum-sepolia",
BaseSepolia: "base-sepolia",
EthereumSepolia: "ethereum-sepolia",
OptimismSepolia: "optimism-sepolia",
Arbitrum: "arbitrum",
Bsc: "bsc",
Ethereum: "ethereum",
Optimism: "optimism",
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import * as Crossmint from "../index";

export interface FiatPaymentMethods {
export interface FiatPayment {
/** Email that the receipt will be sent to. */
receiptEmail?: string;
method: "stripe-payment-element";
currency?: Crossmint.PaymentCurrencyCurrency;
currency?: Crossmint.FiatPaymentCurrency;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* This file was auto-generated by Fern from our API Definition.
*/

export type PaymentCurrencyCurrency = "usd" | "eur" | "aud" | "gbp" | "jpy" | "sgd" | "hkd" | "krw" | "inr" | "vnd";
export type FiatPaymentCurrency = "usd" | "eur" | "aud" | "gbp" | "jpy" | "sgd" | "hkd" | "krw" | "inr" | "vnd";

export const PaymentCurrencyCurrency = {
export const FiatPaymentCurrency = {
Usd: "usd",
Eur: "eur",
Aud: "aud",
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/Payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

import * as Crossmint from "../index";

export type Payment = Crossmint.EvmPaymentMethods | Crossmint.SolanaPaymentMethods | Crossmint.FiatPaymentMethods;
export type Payment = Crossmint.EvmPayment | Crossmint.SolanaPayment | Crossmint.FiatPayment;
24 changes: 0 additions & 24 deletions src/api/types/PaymentZeroMethod.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import * as Crossmint from "../index";

export interface SolanaPaymentMethods {
export interface SolanaPayment {
/** Email that the receipt will be sent to. */
receiptEmail?: string;
method: "solana";
currency: Crossmint.PaymentOneCurrency;
currency: Crossmint.SolanaPaymentCurrency;
/** A Solana public key. */
payerAddress?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* This file was auto-generated by Fern from our API Definition.
*/

export type PaymentOneCurrency = "sol" | "usdc" | "bonk" | "wif" | "mother";
export type SolanaPaymentCurrency = "sol" | "usdc" | "bonk" | "wif" | "mother";

export const PaymentOneCurrency = {
export const SolanaPaymentCurrency = {
Sol: "sol",
Usdc: "usdc",
Bonk: "bonk",
Expand Down
12 changes: 6 additions & 6 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ export * from "./RecipientEmail";
export * from "./RecipientWallet";
export * from "./Recipient";
export * from "./Locale";
export * from "./PaymentZeroMethod";
export * from "./PaymentZeroCurrency";
export * from "./EvmPaymentMethods";
export * from "./PaymentOneCurrency";
export * from "./SolanaPaymentMethods";
export * from "./PaymentCurrencyCurrency";
export * from "./FiatPaymentMethods";
export * from "./EvmPaymentCurrency";
export * from "./EvmPayment";
export * from "./SolanaPaymentCurrency";
export * from "./SolanaPayment";
export * from "./FiatPaymentCurrency";
export * from "./FiatPayment";
export * from "./Payment";
export * from "./LineItemsCallDataCallData";
export * from "./SingleLineItem";
Expand Down
26 changes: 26 additions & 0 deletions src/serialization/types/EvmPayment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as serializers from "../index";
import * as Crossmint from "../../api/index";
import * as core from "../../core";
import { EvmPaymentMethods } from "./EvmPaymentMethods";
import { EvmPaymentCurrency } from "./EvmPaymentCurrency";

export const EvmPayment: core.serialization.ObjectSchema<serializers.EvmPayment.Raw, Crossmint.EvmPayment> =
core.serialization.object({
receiptEmail: core.serialization.string().optional(),
method: EvmPaymentMethods,
currency: EvmPaymentCurrency,
payerAddress: core.serialization.string().optional(),
});

export declare namespace EvmPayment {
interface Raw {
receiptEmail?: string | null;
method: EvmPaymentMethods.Raw;
currency: EvmPaymentCurrency.Raw;
payerAddress?: string | null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import * as serializers from "../index";
import * as Crossmint from "../../api/index";
import * as core from "../../core";

export const PaymentZeroCurrency: core.serialization.Schema<
serializers.PaymentZeroCurrency.Raw,
Crossmint.PaymentZeroCurrency
export const EvmPaymentCurrency: core.serialization.Schema<
serializers.EvmPaymentCurrency.Raw,
Crossmint.EvmPaymentCurrency
> = core.serialization.enum_(["eth", "usdc", "degen", "brett", "toshi"]);

export declare namespace PaymentZeroCurrency {
export declare namespace EvmPaymentCurrency {
type Raw = "eth" | "usdc" | "degen" | "brett" | "toshi";
}
Loading

0 comments on commit e505a68

Please sign in to comment.