Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

1.1 KB
Raw Blame
// This file is auto-generated. Do not edit directly.
import { z } from 'zod';
import { AddressSchema } from './Address';
import { CustomFieldSchema } from './CustomField';
import { CustomerGroupSchema } from './CustomerGroup';
import { NewsletterSubscriberSchema } from './NewsletterSubscriber';

export const CustomerSchema = z.object({
  id: z.string(),
  email: z.string(),
  first_name: z.string().nullable(),
  last_name: z.string().nullable(),
  phone: z.string().nullable(),
  accepts_email_marketing: z.boolean(),
  email_marketing_consent_updated_at: z.string().nullable(),
  full_name: z.string(),
  available_store_credit_total: z.string(),
  display_available_store_credit_total: z.string(),
  addresses: z.array(AddressSchema),
  default_billing_address: AddressSchema.nullable(),
  default_shipping_address: AddressSchema.nullable(),
  newsletter_subscriber: NewsletterSubscriberSchema.nullable(),
  customer_groups: z.array(CustomerGroupSchema),
  custom_fields: z.array(CustomFieldSchema).optional(),
});

export type Customer = z.infer<typeof CustomerSchema>;