Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

1.1 KB
Raw Blame
/**
 * Copyright (c) 2023-present Plane Software, Inc. and contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 * See the LICENSE file for details.
 */

export enum EProductSubscriptionEnum {
  FREE = "FREE",
  ONE = "ONE",
  PRO = "PRO",
  BUSINESS = "BUSINESS",
  ENTERPRISE = "ENTERPRISE",
}

export type TBillingFrequency = "month" | "year";

export type IPaymentProductPrice = {
  currency: string;
  id: string;
  product: string;
  recurring: TBillingFrequency;
  unit_amount: number;
  workspace_amount: number;
};

export type TProductSubscriptionType = "FREE" | "ONE" | "PRO" | "BUSINESS" | "ENTERPRISE";

export type IPaymentProduct = {
  description: string;
  id: string;
  name: string;
  type: Omit<TProductSubscriptionType, "FREE">;
  payment_quantity: number;
  prices: IPaymentProductPrice[];
  is_active: boolean;
};

export type TSubscriptionPrice = {
  key: string;
  id: string | undefined;
  currency: string;
  price: number;
  recurring: TBillingFrequency;
};

export type TProductBillingFrequency = {
  [key in EProductSubscriptionEnum]: TBillingFrequency | undefined;
};