- Added 3-step deploy dialog (Connect Stripe, Copy Products, Create API Key) - Implemented backend endpoints for copying products/features between environments - Added localStorage caching for organization data and deploy button visibility - Created useShowDeployButton hook to conditionally show deploy button - Hide environment switch in CommandBar when organization not deployed - Abstracted feature and product creation/update logic into reusable actions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { ProductSchema } from "@models/productModels/productModels.js";
|
|
import { z } from "zod/v4";
|
|
import {
|
|
CusProductSchema,
|
|
type FullCusProduct,
|
|
} from "../cusProductModels/cusProductModels.js";
|
|
import type { Event } from "../eventModels/eventTable.js";
|
|
import type { Subscription } from "../subModels/subModels.js";
|
|
import { type Customer, CustomerSchema } from "./cusModels.js";
|
|
import type { Entity } from "./entityModels/entityModels.js";
|
|
import type { Invoice } from "./invoiceModels/invoiceModels.js";
|
|
|
|
export type FullCustomer = Customer & {
|
|
customer_products: FullCusProduct[];
|
|
entities: Entity[];
|
|
entity?: Entity;
|
|
trials_used?: {
|
|
product_id: string;
|
|
customer_id: string;
|
|
fingerprint: string;
|
|
}[];
|
|
invoices?: Invoice[];
|
|
subscriptions?: Subscription[];
|
|
events?: Event[];
|
|
};
|
|
|
|
export const CustomerWithProductsSchema = CustomerSchema.extend({
|
|
customer_products: z.array(
|
|
CusProductSchema.extend({ product: ProductSchema }),
|
|
),
|
|
});
|
|
|
|
export type CustomerWithProducts = z.infer<typeof CustomerWithProductsSchema>;
|