Kaizen
Browse modulesPricingpricing/sharedSchemas and constants

Variable: PricingAction

const PricingAction: ZodDiscriminatedUnion<[ZodObject<{
  adjustmentKind: ZodDefault<ZodEnum<{
     fee: "fee";
     platform_fee: "platform_fee";
     tax: "tax";
  }>>;
  glCode: ZodOptional<ZodString>;
  label: ZodString;
  method: ZodEnum<{
     flat: "flat";
     percentage: "percentage";
  }>;
  responsibleParty: ZodOptional<ZodEnum<{
     platform: "platform";
     processor: "processor";
     tax_authority: "tax_authority";
     tenant: "tenant";
  }>>;
  scaling: ZodDefault<ZodEnum<{
     once: "once";
     per_unit: "per_unit";
  }>>;
  type: ZodLiteral<"FEE">;
  value: ZodNumber;
}, $strip>, ZodObject<{
  adjustmentKind: ZodDefault<ZodLiteral<"discount">>;
  glCode: ZodOptional<ZodString>;
  label: ZodString;
  method: ZodEnum<{
     flat: "flat";
     percentage: "percentage";
  }>;
  responsibleParty: ZodOptional<ZodEnum<{
     platform: "platform";
     processor: "processor";
     tax_authority: "tax_authority";
     tenant: "tenant";
  }>>;
  scaling: ZodDefault<ZodEnum<{
     once: "once";
     per_unit: "per_unit";
  }>>;
  type: ZodLiteral<"DISCOUNT">;
  value: ZodNumber;
}, $strip>, ZodObject<{
  adjustmentKind: ZodDefault<ZodLiteral<"base_price">>;
  amount_cents: ZodNumber;
  glCode: ZodOptional<ZodString>;
  label: ZodString;
  per: ZodOptional<ZodEnum<{
     day: "day";
     hour: "hour";
     night: "night";
  }>>;
  responsibleParty: ZodOptional<ZodEnum<{
     platform: "platform";
     processor: "processor";
     tax_authority: "tax_authority";
     tenant: "tenant";
  }>>;
  type: ZodLiteral<"BASE_PRICE">;
  unit: ZodEnum<{
     day: "day";
     flat: "flat";
     hour: "hour";
     month: "month";
     night: "night";
     person: "person";
     unit: "unit";
     year: "year";
  }>;
}, $strip>], "type">;

Defined in: shared/pricing/types/actions.ts:265

Discriminated union over every pricing action shape, regardless of phase. Use this when you need a single type that covers any action a rule might carry; use BasePriceAction or AdjustmentAction directly when the phase is known and per-phase narrowing is wanted.