From e505a687ae246bc57b9a1a3e60b6b5538a9d7e4e Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 01:28:15 +0000 Subject: [PATCH] Release 0.1.4 --- .mock/definition/__package__.yml | 28 +++++++-------- package.json | 2 +- reference.md | 4 +-- src/api/resources/checkout/client/Client.ts | 10 +++--- .../requests/CheckoutCreateOrderRequest.ts | 4 +-- src/api/types/EvmPayment.ts | 14 ++++++++ ...tZeroCurrency.ts => EvmPaymentCurrency.ts} | 4 +-- src/api/types/EvmPaymentMethods.ts | 28 ++++++++++----- .../{FiatPaymentMethods.ts => FiatPayment.ts} | 4 +-- ...encyCurrency.ts => FiatPaymentCurrency.ts} | 4 +-- src/api/types/Payment.ts | 2 +- src/api/types/PaymentZeroMethod.ts | 24 ------------- ...lanaPaymentMethods.ts => SolanaPayment.ts} | 4 +-- ...neCurrency.ts => SolanaPaymentCurrency.ts} | 4 +-- src/api/types/index.ts | 12 +++---- src/serialization/types/EvmPayment.ts | 26 ++++++++++++++ ...tZeroCurrency.ts => EvmPaymentCurrency.ts} | 8 ++--- src/serialization/types/EvmPaymentMethods.ts | 35 +++++++++++-------- src/serialization/types/FiatPayment.ts | 23 ++++++++++++ ...encyCurrency.ts => FiatPaymentCurrency.ts} | 8 ++--- src/serialization/types/FiatPaymentMethods.ts | 25 ------------- src/serialization/types/Payment.ts | 10 +++--- src/serialization/types/PaymentZeroMethod.ts | 33 ----------------- src/serialization/types/SolanaPayment.ts | 25 +++++++++++++ ...neCurrency.ts => SolanaPaymentCurrency.ts} | 8 ++--- .../types/SolanaPaymentMethods.ts | 27 -------------- src/serialization/types/index.ts | 12 +++---- 27 files changed, 191 insertions(+), 197 deletions(-) create mode 100644 src/api/types/EvmPayment.ts rename src/api/types/{PaymentZeroCurrency.ts => EvmPaymentCurrency.ts} (60%) rename src/api/types/{FiatPaymentMethods.ts => FiatPayment.ts} (72%) rename src/api/types/{PaymentCurrencyCurrency.ts => FiatPaymentCurrency.ts} (60%) delete mode 100644 src/api/types/PaymentZeroMethod.ts rename src/api/types/{SolanaPaymentMethods.ts => SolanaPayment.ts} (76%) rename src/api/types/{PaymentOneCurrency.ts => SolanaPaymentCurrency.ts} (59%) create mode 100644 src/serialization/types/EvmPayment.ts rename src/serialization/types/{PaymentZeroCurrency.ts => EvmPaymentCurrency.ts} (64%) create mode 100644 src/serialization/types/FiatPayment.ts rename src/serialization/types/{PaymentCurrencyCurrency.ts => FiatPaymentCurrency.ts} (66%) delete mode 100644 src/serialization/types/FiatPaymentMethods.ts delete mode 100644 src/serialization/types/PaymentZeroMethod.ts create mode 100644 src/serialization/types/SolanaPayment.ts rename src/serialization/types/{PaymentOneCurrency.ts => SolanaPaymentCurrency.ts} (63%) delete mode 100644 src/serialization/types/SolanaPaymentMethods.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 2558ab5..d8a9a2d 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -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 @@ -105,35 +105,35 @@ types: - bsc - ethereum - optimism - PaymentZeroCurrency: + EvmPaymentCurrency: enum: - eth - usdc - degen - brett - toshi - EvmPaymentMethods: + EvmPayment: properties: receiptEmail: type: optional docs: Email that the receipt will be sent to. validation: format: email - method: PaymentZeroMethod - currency: PaymentZeroCurrency + method: EvmPaymentMethods + currency: EvmPaymentCurrency payerAddress: type: optional 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 @@ -141,13 +141,13 @@ types: validation: format: email method: literal<"solana"> - currency: PaymentOneCurrency + currency: SolanaPaymentCurrency payerAddress: type: optional docs: A Solana public key. validation: pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$ - PaymentCurrencyCurrency: + FiatPaymentCurrency: enum: - usd - eur @@ -159,7 +159,7 @@ types: - krw - inr - vnd - FiatPaymentMethods: + FiatPayment: properties: receiptEmail: type: optional @@ -167,13 +167,13 @@ types: validation: format: email method: literal<"stripe-payment-element"> - currency: optional + currency: optional Payment: discriminated: false union: - - EvmPaymentMethods - - SolanaPaymentMethods - - FiatPaymentMethods + - EvmPayment + - SolanaPayment + - FiatPayment LineItemsCallDataCallData: docs: Information that you pass to your contract mint function. properties: diff --git a/package.json b/package.json index edba519..d00545e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/reference.md b/reference.md index 98b2f47..f5b7041 100644 --- a/reference.md +++ b/reference.md @@ -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:", diff --git a/src/api/resources/checkout/client/Client.ts b/src/api/resources/checkout/client/Client.ts index e73779c..f592ceb 100644 --- a/src/api/resources/checkout/client/Client.ts +++ b/src/api/resources/checkout/client/Client.ts @@ -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:" @@ -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()), @@ -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()), @@ -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()), diff --git a/src/api/resources/checkout/client/requests/CheckoutCreateOrderRequest.ts b/src/api/resources/checkout/client/requests/CheckoutCreateOrderRequest.ts index 049da6b..256c2d3 100644 --- a/src/api/resources/checkout/client/requests/CheckoutCreateOrderRequest.ts +++ b/src/api/resources/checkout/client/requests/CheckoutCreateOrderRequest.ts @@ -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:" diff --git a/src/api/types/EvmPayment.ts b/src/api/types/EvmPayment.ts new file mode 100644 index 0000000..84cc24b --- /dev/null +++ b/src/api/types/EvmPayment.ts @@ -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; +} diff --git a/src/api/types/PaymentZeroCurrency.ts b/src/api/types/EvmPaymentCurrency.ts similarity index 60% rename from src/api/types/PaymentZeroCurrency.ts rename to src/api/types/EvmPaymentCurrency.ts index a13118d..2fdadd2 100644 --- a/src/api/types/PaymentZeroCurrency.ts +++ b/src/api/types/EvmPaymentCurrency.ts @@ -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", diff --git a/src/api/types/EvmPaymentMethods.ts b/src/api/types/EvmPaymentMethods.ts index a7c83d4..1fd6209 100644 --- a/src/api/types/EvmPaymentMethods.ts +++ b/src/api/types/EvmPaymentMethods.ts @@ -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; diff --git a/src/api/types/FiatPaymentMethods.ts b/src/api/types/FiatPayment.ts similarity index 72% rename from src/api/types/FiatPaymentMethods.ts rename to src/api/types/FiatPayment.ts index a365c0e..dd97971 100644 --- a/src/api/types/FiatPaymentMethods.ts +++ b/src/api/types/FiatPayment.ts @@ -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; } diff --git a/src/api/types/PaymentCurrencyCurrency.ts b/src/api/types/FiatPaymentCurrency.ts similarity index 60% rename from src/api/types/PaymentCurrencyCurrency.ts rename to src/api/types/FiatPaymentCurrency.ts index 4600c39..6887bf2 100644 --- a/src/api/types/PaymentCurrencyCurrency.ts +++ b/src/api/types/FiatPaymentCurrency.ts @@ -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", diff --git a/src/api/types/Payment.ts b/src/api/types/Payment.ts index ac53883..0af749d 100644 --- a/src/api/types/Payment.ts +++ b/src/api/types/Payment.ts @@ -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; diff --git a/src/api/types/PaymentZeroMethod.ts b/src/api/types/PaymentZeroMethod.ts deleted file mode 100644 index 6f76e06..0000000 --- a/src/api/types/PaymentZeroMethod.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type PaymentZeroMethod = - | "arbitrum-sepolia" - | "base-sepolia" - | "ethereum-sepolia" - | "optimism-sepolia" - | "arbitrum" - | "bsc" - | "ethereum" - | "optimism"; - -export const PaymentZeroMethod = { - ArbitrumSepolia: "arbitrum-sepolia", - BaseSepolia: "base-sepolia", - EthereumSepolia: "ethereum-sepolia", - OptimismSepolia: "optimism-sepolia", - Arbitrum: "arbitrum", - Bsc: "bsc", - Ethereum: "ethereum", - Optimism: "optimism", -} as const; diff --git a/src/api/types/SolanaPaymentMethods.ts b/src/api/types/SolanaPayment.ts similarity index 76% rename from src/api/types/SolanaPaymentMethods.ts rename to src/api/types/SolanaPayment.ts index b0b05d2..fa3f4e3 100644 --- a/src/api/types/SolanaPaymentMethods.ts +++ b/src/api/types/SolanaPayment.ts @@ -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; } diff --git a/src/api/types/PaymentOneCurrency.ts b/src/api/types/SolanaPaymentCurrency.ts similarity index 59% rename from src/api/types/PaymentOneCurrency.ts rename to src/api/types/SolanaPaymentCurrency.ts index 329e042..3178c69 100644 --- a/src/api/types/PaymentOneCurrency.ts +++ b/src/api/types/SolanaPaymentCurrency.ts @@ -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", diff --git a/src/api/types/index.ts b/src/api/types/index.ts index fc718a7..b648801 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -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"; diff --git a/src/serialization/types/EvmPayment.ts b/src/serialization/types/EvmPayment.ts new file mode 100644 index 0000000..00fb1ff --- /dev/null +++ b/src/serialization/types/EvmPayment.ts @@ -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 = + 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; + } +} diff --git a/src/serialization/types/PaymentZeroCurrency.ts b/src/serialization/types/EvmPaymentCurrency.ts similarity index 64% rename from src/serialization/types/PaymentZeroCurrency.ts rename to src/serialization/types/EvmPaymentCurrency.ts index c6898f6..c768885 100644 --- a/src/serialization/types/PaymentZeroCurrency.ts +++ b/src/serialization/types/EvmPaymentCurrency.ts @@ -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"; } diff --git a/src/serialization/types/EvmPaymentMethods.ts b/src/serialization/types/EvmPaymentMethods.ts index 54fc886..600ff79 100644 --- a/src/serialization/types/EvmPaymentMethods.ts +++ b/src/serialization/types/EvmPaymentMethods.ts @@ -5,24 +5,29 @@ import * as serializers from "../index"; import * as Crossmint from "../../api/index"; import * as core from "../../core"; -import { PaymentZeroMethod } from "./PaymentZeroMethod"; -import { PaymentZeroCurrency } from "./PaymentZeroCurrency"; -export const EvmPaymentMethods: core.serialization.ObjectSchema< +export const EvmPaymentMethods: core.serialization.Schema< serializers.EvmPaymentMethods.Raw, Crossmint.EvmPaymentMethods -> = core.serialization.object({ - receiptEmail: core.serialization.string().optional(), - method: PaymentZeroMethod, - currency: PaymentZeroCurrency, - payerAddress: core.serialization.string().optional(), -}); +> = core.serialization.enum_([ + "arbitrum-sepolia", + "base-sepolia", + "ethereum-sepolia", + "optimism-sepolia", + "arbitrum", + "bsc", + "ethereum", + "optimism", +]); export declare namespace EvmPaymentMethods { - interface Raw { - receiptEmail?: string | null; - method: PaymentZeroMethod.Raw; - currency: PaymentZeroCurrency.Raw; - payerAddress?: string | null; - } + type Raw = + | "arbitrum-sepolia" + | "base-sepolia" + | "ethereum-sepolia" + | "optimism-sepolia" + | "arbitrum" + | "bsc" + | "ethereum" + | "optimism"; } diff --git a/src/serialization/types/FiatPayment.ts b/src/serialization/types/FiatPayment.ts new file mode 100644 index 0000000..2f6789c --- /dev/null +++ b/src/serialization/types/FiatPayment.ts @@ -0,0 +1,23 @@ +/** + * 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 { FiatPaymentCurrency } from "./FiatPaymentCurrency"; + +export const FiatPayment: core.serialization.ObjectSchema = + core.serialization.object({ + receiptEmail: core.serialization.string().optional(), + method: core.serialization.stringLiteral("stripe-payment-element"), + currency: FiatPaymentCurrency.optional(), + }); + +export declare namespace FiatPayment { + interface Raw { + receiptEmail?: string | null; + method: "stripe-payment-element"; + currency?: FiatPaymentCurrency.Raw | null; + } +} diff --git a/src/serialization/types/PaymentCurrencyCurrency.ts b/src/serialization/types/FiatPaymentCurrency.ts similarity index 66% rename from src/serialization/types/PaymentCurrencyCurrency.ts rename to src/serialization/types/FiatPaymentCurrency.ts index caeb43a..1adeeed 100644 --- a/src/serialization/types/PaymentCurrencyCurrency.ts +++ b/src/serialization/types/FiatPaymentCurrency.ts @@ -6,11 +6,11 @@ import * as serializers from "../index"; import * as Crossmint from "../../api/index"; import * as core from "../../core"; -export const PaymentCurrencyCurrency: core.serialization.Schema< - serializers.PaymentCurrencyCurrency.Raw, - Crossmint.PaymentCurrencyCurrency +export const FiatPaymentCurrency: core.serialization.Schema< + serializers.FiatPaymentCurrency.Raw, + Crossmint.FiatPaymentCurrency > = core.serialization.enum_(["usd", "eur", "aud", "gbp", "jpy", "sgd", "hkd", "krw", "inr", "vnd"]); -export declare namespace PaymentCurrencyCurrency { +export declare namespace FiatPaymentCurrency { type Raw = "usd" | "eur" | "aud" | "gbp" | "jpy" | "sgd" | "hkd" | "krw" | "inr" | "vnd"; } diff --git a/src/serialization/types/FiatPaymentMethods.ts b/src/serialization/types/FiatPaymentMethods.ts deleted file mode 100644 index 4741f26..0000000 --- a/src/serialization/types/FiatPaymentMethods.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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 { PaymentCurrencyCurrency } from "./PaymentCurrencyCurrency"; - -export const FiatPaymentMethods: core.serialization.ObjectSchema< - serializers.FiatPaymentMethods.Raw, - Crossmint.FiatPaymentMethods -> = core.serialization.object({ - receiptEmail: core.serialization.string().optional(), - method: core.serialization.stringLiteral("stripe-payment-element"), - currency: PaymentCurrencyCurrency.optional(), -}); - -export declare namespace FiatPaymentMethods { - interface Raw { - receiptEmail?: string | null; - method: "stripe-payment-element"; - currency?: PaymentCurrencyCurrency.Raw | null; - } -} diff --git a/src/serialization/types/Payment.ts b/src/serialization/types/Payment.ts index 0928564..e57e106 100644 --- a/src/serialization/types/Payment.ts +++ b/src/serialization/types/Payment.ts @@ -5,13 +5,13 @@ import * as serializers from "../index"; import * as Crossmint from "../../api/index"; import * as core from "../../core"; -import { EvmPaymentMethods } from "./EvmPaymentMethods"; -import { SolanaPaymentMethods } from "./SolanaPaymentMethods"; -import { FiatPaymentMethods } from "./FiatPaymentMethods"; +import { EvmPayment } from "./EvmPayment"; +import { SolanaPayment } from "./SolanaPayment"; +import { FiatPayment } from "./FiatPayment"; export const Payment: core.serialization.Schema = - core.serialization.undiscriminatedUnion([EvmPaymentMethods, SolanaPaymentMethods, FiatPaymentMethods]); + core.serialization.undiscriminatedUnion([EvmPayment, SolanaPayment, FiatPayment]); export declare namespace Payment { - type Raw = EvmPaymentMethods.Raw | SolanaPaymentMethods.Raw | FiatPaymentMethods.Raw; + type Raw = EvmPayment.Raw | SolanaPayment.Raw | FiatPayment.Raw; } diff --git a/src/serialization/types/PaymentZeroMethod.ts b/src/serialization/types/PaymentZeroMethod.ts deleted file mode 100644 index ca29183..0000000 --- a/src/serialization/types/PaymentZeroMethod.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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"; - -export const PaymentZeroMethod: core.serialization.Schema< - serializers.PaymentZeroMethod.Raw, - Crossmint.PaymentZeroMethod -> = core.serialization.enum_([ - "arbitrum-sepolia", - "base-sepolia", - "ethereum-sepolia", - "optimism-sepolia", - "arbitrum", - "bsc", - "ethereum", - "optimism", -]); - -export declare namespace PaymentZeroMethod { - type Raw = - | "arbitrum-sepolia" - | "base-sepolia" - | "ethereum-sepolia" - | "optimism-sepolia" - | "arbitrum" - | "bsc" - | "ethereum" - | "optimism"; -} diff --git a/src/serialization/types/SolanaPayment.ts b/src/serialization/types/SolanaPayment.ts new file mode 100644 index 0000000..85c4481 --- /dev/null +++ b/src/serialization/types/SolanaPayment.ts @@ -0,0 +1,25 @@ +/** + * 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 { SolanaPaymentCurrency } from "./SolanaPaymentCurrency"; + +export const SolanaPayment: core.serialization.ObjectSchema = + core.serialization.object({ + receiptEmail: core.serialization.string().optional(), + method: core.serialization.stringLiteral("solana"), + currency: SolanaPaymentCurrency, + payerAddress: core.serialization.string().optional(), + }); + +export declare namespace SolanaPayment { + interface Raw { + receiptEmail?: string | null; + method: "solana"; + currency: SolanaPaymentCurrency.Raw; + payerAddress?: string | null; + } +} diff --git a/src/serialization/types/PaymentOneCurrency.ts b/src/serialization/types/SolanaPaymentCurrency.ts similarity index 63% rename from src/serialization/types/PaymentOneCurrency.ts rename to src/serialization/types/SolanaPaymentCurrency.ts index effaa8f..be3f291 100644 --- a/src/serialization/types/PaymentOneCurrency.ts +++ b/src/serialization/types/SolanaPaymentCurrency.ts @@ -6,11 +6,11 @@ import * as serializers from "../index"; import * as Crossmint from "../../api/index"; import * as core from "../../core"; -export const PaymentOneCurrency: core.serialization.Schema< - serializers.PaymentOneCurrency.Raw, - Crossmint.PaymentOneCurrency +export const SolanaPaymentCurrency: core.serialization.Schema< + serializers.SolanaPaymentCurrency.Raw, + Crossmint.SolanaPaymentCurrency > = core.serialization.enum_(["sol", "usdc", "bonk", "wif", "mother"]); -export declare namespace PaymentOneCurrency { +export declare namespace SolanaPaymentCurrency { type Raw = "sol" | "usdc" | "bonk" | "wif" | "mother"; } diff --git a/src/serialization/types/SolanaPaymentMethods.ts b/src/serialization/types/SolanaPaymentMethods.ts deleted file mode 100644 index 7ac2607..0000000 --- a/src/serialization/types/SolanaPaymentMethods.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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 { PaymentOneCurrency } from "./PaymentOneCurrency"; - -export const SolanaPaymentMethods: core.serialization.ObjectSchema< - serializers.SolanaPaymentMethods.Raw, - Crossmint.SolanaPaymentMethods -> = core.serialization.object({ - receiptEmail: core.serialization.string().optional(), - method: core.serialization.stringLiteral("solana"), - currency: PaymentOneCurrency, - payerAddress: core.serialization.string().optional(), -}); - -export declare namespace SolanaPaymentMethods { - interface Raw { - receiptEmail?: string | null; - method: "solana"; - currency: PaymentOneCurrency.Raw; - payerAddress?: string | null; - } -} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index fc718a7..b648801 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -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";