UNPKG

@godaddy/react

Version:

The `createCheckoutSession` function creates a new checkout session with GoDaddy's commerce API.

545 lines (543 loc) • 16.3 kB
import * as gql_tada0 from "gql.tada"; //#region src/lib/godaddy/checkout-queries.d.ts declare const GetEnabledStoreUiExtensionsQuery: gql_tada0.TadaDocumentNode<{ enabledStoreUiExtensions: { id: string; applicationId: string | null; releaseId: string | null; name: string | null; handle: string | null; type: string; target: string | null; }[]; }, { target: string; storeId: string; }, void>; declare const DraftOrderQuery: gql_tada0.TadaDocumentNode<{ checkoutSession: { id: string; draftOrder: { id: string | null; statuses: { fulfillmentStatus: string | null; paymentStatus: string | null; status: string | null; } | null; shippingLines: { id: string | null; name: string | null; requestedProvider: string | null; requestedService: string | null; amount: { currencyCode: string | null; value: number | null; } | null; discounts: { id: string | null; name: string | null; amount: { value: number | null; currencyCode: string | null; } | null; code: string | null; ratePercentage: string | null; appliedBeforeTax: boolean | null; metafields: { key: string | null; value: string | null; }[] | null; }[] | null; }[] | null; lineItems: { externalId: string | null; fulfillmentMode: string | null; id: string; name: string | null; productId: string | null; quantity: number | null; status: string | null; tags: string[] | null; type: string | null; metafields: { key: string | null; type: string | null; value: string | null; }[] | null; details: { productAssetUrl: string | null; selectedAddons: { attribute: string | null; sku: string | null; values: { costAdjustment: { currencyCode: string | null; value: number | null; } | null; name: string | null; }[] | null; }[] | null; selectedOptions: { attribute: string | null; values: string[] | null; }[] | null; sku: string | null; unitOfMeasure: string | null; } | null; discounts: { amount: { currencyCode: string | null; value: number | null; } | null; appliedBeforeTax: boolean | null; code: string | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; fees: { appliedBeforeTax: boolean | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; notes: { authorType: string | null; content: string | null; id: string | null; }[] | null; taxes: { exempted: boolean | null; id: string | null; included: boolean | null; name: string | null; ratePercentage: string | null; }[] | null; totals: { discountTotal: { currencyCode: string | null; value: number | null; } | null; feeTotal: { currencyCode: string | null; value: number | null; } | null; subTotal: { currencyCode: string | null; value: number | null; } | null; taxTotal: { currencyCode: string | null; value: number | null; } | null; } | null; unitAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; shipping: { firstName: string | null; lastName: string | null; email: string | null; phone: string | null; address: { addressLine1: string | null; addressLine2: string | null; addressLine3: string | null; adminArea1: string | null; adminArea2: string | null; adminArea3: string | null; adminArea4: string | null; countryCode: string | null; postalCode: string | null; } | null; } | null; billing: { firstName: string | null; lastName: string | null; email: string | null; phone: string | null; address: { addressLine1: string | null; addressLine2: string | null; addressLine3: string | null; adminArea1: string | null; adminArea2: string | null; adminArea3: string | null; adminArea4: string | null; countryCode: string | null; postalCode: string | null; } | null; } | null; notes: { authorType: string | null; content: string | null; id: string | null; }[] | null; discounts: { amount: { currencyCode: string | null; value: number | null; } | null; appliedBeforeTax: boolean | null; code: string | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; taxes: { amount: { value: number | null; } | null; included: boolean | null; }[] | null; totals: { discountTotal: { currencyCode: string | null; value: number | null; } | null; feeTotal: { currencyCode: string | null; value: number | null; } | null; shippingTotal: { currencyCode: string | null; value: number | null; } | null; subTotal: { currencyCode: string | null; value: number | null; } | null; taxTotal: { currencyCode: string | null; value: number | null; } | null; total: { currencyCode: string | null; value: number | null; } | null; } | null; } | null; } | null; }, {}, void>; declare const DraftOrderSkusQuery: gql_tada0.TadaDocumentNode<{ checkoutSession: { id: string; skus: { edges: ({ node: { id: string; code: string; name: string; label: string | null; description: string | null; status: string | null; weight: number | null; unitOfWeight: string | null; disableShipping: boolean | null; htmlDescription: string | null; prices: { currencyCode: string; value: number; }[]; attributes: { id: string; name: string; label: string | null; values: { id: string; name: string; label: string | null; }[]; }[]; attributeValues: { id: string; name: string; label: string | null; }[]; } | null; } | null)[] | null; pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string | null; endCursor: string | null; }; }; } | null; }, {}, void>; declare const DraftOrderTaxesQuery: gql_tada0.TadaDocumentNode<{ checkoutSession: { id: string; storeId: string; draftOrder: { id: string | null; calculatedTaxes: { totalTaxAmount: { currencyCode: string | null; value: number | null; } | null; taxAmounts: { rate: { id: string | null; name: string | null; label: string | null; calculationMethod: string | null; value: { appliedPercentage: number | null; appliedAmount: { currencyCode: string | null; value: number | null; } | null; amount: { currencyCode: string | null; value: number | null; } | null; percentage: string | null; } | null; } | null; totalTaxAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; lines: { calculationLine: { id: string | null; } | null; totalTaxAmount: { currencyCode: string | null; value: number | null; } | null; taxAmounts: { rate: { id: string | null; name: string | null; calculationMethod: string | null; } | null; totalTaxAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; }[] | null; } | null; } | null; } | null; }, { discountAdjustments?: { totalFeeAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; totalDiscountAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; lines?: { totalFeeAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; totalDiscountAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; calculationLine?: { type?: string | null | undefined; id?: string | null | undefined; } | null | undefined; adjustments?: { totalAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; adjustment?: { name?: string | null | undefined; label?: string | null | undefined; id?: string | null | undefined; description?: string | null | undefined; } | null | undefined; }[] | null | undefined; }[] | null | undefined; adjustments?: { totalAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; adjustment?: { name?: string | null | undefined; label?: string | null | undefined; id?: string | null | undefined; description?: string | null | undefined; } | null | undefined; }[] | null | undefined; } | null | undefined; lines?: { unitPrice?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; type?: "SKU" | "FEE" | "SHIPPING" | null | undefined; subtotalPrice: { value: number; currencyCode: string; }; quantity?: number | null | undefined; origin?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; id?: string | null | undefined; destination?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; classification?: string | null | undefined; }[] | null | undefined; destination?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; }, void>; declare const DraftOrderShippingRatesQuery: gql_tada0.TadaDocumentNode<{ checkoutSession: { id: string; storeId: string; draftOrder: { id: string | null; calculatedShippingRates: { rates: { carrierCode: string | null; cost: { value: number | null; currencyCode: string | null; } | null; description: string | null; displayName: string | null; features: string[] | null; maxDeliveryDate: string | null; minDeliveryDate: string | null; serviceCode: string | null; }[] | null; } | null; } | null; } | null; }, { destination?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; }, void>; declare const DraftOrderPriceAdjustmentsQuery: gql_tada0.TadaDocumentNode<{ checkoutSession: { id: string; storeId: string; draftOrder: { id: string | null; calculatedAdjustments: { adjustments: { adjustment: { __typename?: "CalculatedDiscount" | undefined; description: string | null; id: string | null; label: string | null; name: string | null; } | { __typename?: "CalculatedFee" | undefined; description: string | null; id: string | null; label: string | null; name: string | null; } | null; totalAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; lines: { calculationLine: { id: string | null; type: string | null; } | null; adjustments: { adjustment: { __typename?: "CalculatedDiscount" | undefined; description: string | null; id: string | null; label: string | null; name: string | null; } | { __typename?: "CalculatedFee" | undefined; description: string | null; id: string | null; label: string | null; name: string | null; } | null; totalAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; totalDiscountAmount: { currencyCode: string | null; value: number | null; } | null; totalFeeAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; totalDiscountAmount: { currencyCode: string | null; value: number | null; } | null; totalFeeAmount: { currencyCode: string | null; value: number | null; } | null; } | null; } | null; } | null; }, { shippingLines?: { subTotal: { value: number; currencyCode: string; }; name?: string | null | undefined; id?: string | null | undefined; }[] | null | undefined; discountCodes?: string[] | null | undefined; }, void>; //#endregion export { DraftOrderTaxesQuery as a, DraftOrderSkusQuery as i, DraftOrderQuery as n, GetEnabledStoreUiExtensionsQuery as o, DraftOrderShippingRatesQuery as r, DraftOrderPriceAdjustmentsQuery as t };