Update partner packages, copy, and demo switcher
This commit is contained in:
@@ -433,6 +433,8 @@ export type TenantPackageSummary = {
|
||||
id: number;
|
||||
package_id: number;
|
||||
package_name: string;
|
||||
package_type: string | null;
|
||||
included_package_slug: string | null;
|
||||
active: boolean;
|
||||
used_events: number;
|
||||
remaining_events: number | null;
|
||||
@@ -743,6 +745,7 @@ type EventSavePayload = {
|
||||
status?: 'draft' | 'published' | 'archived';
|
||||
is_active?: boolean;
|
||||
package_id?: number;
|
||||
service_package_slug?: string;
|
||||
accepted_waiver?: boolean;
|
||||
settings?: Record<string, unknown> & {
|
||||
live_show?: LiveShowSettings;
|
||||
@@ -1008,6 +1011,18 @@ function normalizeTenantPackage(pkg: JsonValue): TenantPackageSummary {
|
||||
id: Number(pkg.id ?? 0),
|
||||
package_id: Number(pkg.package_id ?? packageData.id ?? 0),
|
||||
package_name: String(packageData.name ?? pkg.package_name ?? 'Unbekanntes Package'),
|
||||
package_type:
|
||||
typeof (packageData as any).type === 'string'
|
||||
? String((packageData as any).type)
|
||||
: typeof (pkg as any).package_type === 'string'
|
||||
? String((pkg as any).package_type)
|
||||
: null,
|
||||
included_package_slug:
|
||||
typeof (packageData as any).included_package_slug === 'string'
|
||||
? String((packageData as any).included_package_slug)
|
||||
: typeof (pkg as any).included_package_slug === 'string'
|
||||
? String((pkg as any).included_package_slug)
|
||||
: null,
|
||||
active: Boolean(pkg.active ?? false),
|
||||
used_events: Number(pkg.used_events ?? 0),
|
||||
remaining_events: pkg.remaining_events !== undefined ? Number(pkg.remaining_events) : null,
|
||||
@@ -2099,11 +2114,19 @@ export async function submitTenantFeedback(payload: {
|
||||
export type Package = {
|
||||
id: number;
|
||||
name: string;
|
||||
slug?: string;
|
||||
type?: 'endcustomer' | 'reseller';
|
||||
price: number;
|
||||
max_photos: number | null;
|
||||
max_guests: number | null;
|
||||
gallery_days: number | null;
|
||||
features: Record<string, boolean>;
|
||||
max_events_per_year?: number | null;
|
||||
included_package_slug?: string | null;
|
||||
paddle_price_id?: string | null;
|
||||
paddle_product_id?: string | null;
|
||||
branding_allowed?: boolean | null;
|
||||
watermark_allowed?: boolean | null;
|
||||
features: string[] | Record<string, boolean> | null;
|
||||
};
|
||||
|
||||
export async function getPackages(type: 'endcustomer' | 'reseller' = 'endcustomer'): Promise<Package[]> {
|
||||
|
||||
Reference in New Issue
Block a user