basePath: /v1beta1/partners
definitions:
  billing_errors.BaseError:
    properties:
      code:
        type: string
      error: {}
      msgPrefix:
        type: string
      status:
        type: integer
    type: object
  forms.BillingProfileForOpenAPI:
    properties:
      billingEmail:
        description: Email address to receive invoices (valid only for credit card
          payments).
        example: example@tidbcloud.com
        type: string
      city:
        description: The city full name of billing address.
        type: string
      companyName:
        description: The company name that needs to be shown on the invoice (valid
          only for credit card payments).
        example: PingCAP Inc.
        type: string
      countryCode:
        description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
        example: US
        type: string
      line1:
        description: The detailed billing address.
        type: string
      line2:
        description: The detailed billing address.
        type: string
      postalCode:
        description: The postal code of the billing address.
        example: "000000"
        type: string
      state:
        description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US),
          without country prefix. For example, "NY" for New York, United States.'
        example: CA
        type: string
      taxId:
        description: 'The tax id of billing entity (reference: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).'
        type: string
      taxIdType:
        allOf:
        - $ref: '#/definitions/forms.TaxIDType'
        description: 'The tax id type of billing entity (reference: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).'
    type: object
  forms.BillsOtherName:
    properties:
      chargeName:
        example: Support Plan
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsOverview:
    properties:
      billedMonth:
        description: The month in which this bill is generated for the specified organization.
        example: 2023-09
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsProjects:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      projectName:
        description: The name of a project in the specified organization.
        example: prod-project
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsServiceCosts:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      serviceCosts:
        items:
          $ref: '#/definitions/forms.BillsServiceCosts'
        type: array
      serviceName:
        description: The name of services provided by TiDB Cloud.
        example: TiDB Dedicated
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BudgetCostType:
    enum:
    - total
    - invoice
    type: string
    x-enum-varnames:
    - BudgetCostType_Total
    - BudgetCostType_Invoice
  forms.BudgetForOpenAPI:
    properties:
      applyCredits:
        description: Whether to deduct credits when calculating cost(valid for CostType=`total`
          only)/
        type: boolean
      applyDiscounts:
        description: Whether to deduct discounts when calculating cost(valid for CostType=`total`
          only).
        type: boolean
      bizType:
        description: The business type of the budget. Note: You can only create `"budget_alert"` type budgets using the API.
        type: string
      budgetId:
        description: An ID refer a specific budget
        example: "0"
        type: string
      budgetInterval:
        allOf:
        - $ref: '#/definitions/forms.BudgetInterval'
        description: The budget interval.
      cost:
        description: The Cost of the budget.
        type: string
      costType:
        allOf:
        - $ref: '#/definitions/forms.BudgetCostType'
        description: The budget cost, `total` stands the total cost and `invoice`
          stands the bills you need pay.
      enableEmailNotification:
        description: Whether to send an email notification when the threshold is reached.
        type: boolean
      limit:
        description: The Limit of the budget.
        type: string
      name:
        description: The Budget Name
        type: string
      rangId:
        description: The ID of the entity you specified.
        example: "0"
        type: string
      rangeType:
        allOf:
        - $ref: '#/definitions/forms.BudgetRangeType'
        description: The Budget Range Type, You can specify an organization (tenant),
          a project or a customer (only for partners), but you cannot specify a cluster.
      thresholds:
        description: The Budget Thresholds, must specify one and can specify up to
          five
        items:
          $ref: '#/definitions/forms.BudgetThreshold'
        type: array
    type: object
  forms.BudgetInterval:
    enum:
    - monthly
    type: string
    x-enum-varnames:
    - BudgetInterval_Monthly
  forms.BudgetRangeType:
    enum:
    - tenant
    - project
    - cluster
    - customer
    type: string
    x-enum-varnames:
    - BudgetRangeType_Tenant
    - BudgetRangeType_Project
    - BudgetRangeType_Cluster
    - BudgetRangeType_Customer
  forms.BudgetThreshold:
    properties:
      proportion:
        description: The Budget Threshold, 0.3 means that the cost reached 30% of
          Limit, we will trigger the action you specified, such as email notification
        example: "0.3"
        type: string
    type: object
  forms.ClusterOpenAPI:
    properties:
      ProjectID:
        example: "0"
        type: string
      id:
        example: "0"
        type: string
      name:
        type: string
      regionName:
        type: string
      status:
        type: string
    type: object
  forms.CostExplorerProvider:
    properties:
      name:
        description: Name of Cloud provider.
        type: string
      regions:
        description: Name of region.
        items:
          type: string
        type: array
    type: object
  forms.CostExplorerService:
    properties:
      category:
        description: 2nd level of service.
        type: string
      component:
        description: 3rd level of service.
        type: string
      product:
        description: 1st level of service.
        type: string
      service:
        type: string
    type: object
  forms.CostExplorerTrendsBreakdownKey:
    enum:
    - service
    - product
    - project
    - cluster
    - provider
    - region
    - customer
    type: string
    x-enum-varnames:
    - CostExploreTrendsBreakdownKeyService
    - CostExploreTrendsBreakdownKeyProduct
    - CostExploreTrendsBreakdownKeyProject
    - CostExploreTrendsBreakdownKeyCluster
    - CostExploreTrendsBreakdownKeyProvider
    - CostExploreTrendsBreakdownKeyRegion
    - CostExploreTrendsBreakdownKeyCustomer
  forms.CostExplorerTrendsTimeGroup:
    enum:
    - day
    - month
    - total
    type: string
    x-enum-varnames:
    - CostExploreTrendsTimeGroupDay
    - CostExploreTrendsTimeGroupMonth
    - CostExploreTrendsTimeGroupTotal
  forms.CreditsForOpenAPI:
    properties:
      credit:
        description: The total amount of credit.
        example: "1000.00"
        type: string
      creditCode:
        example: 498c7f44-656f-4944-b455-0695faa5d4f9
        type: string
      expiryDate:
        description: Expired date of a credit.
        example: "2023-12-01T00:00:00Z"
        type: string
      remainingCredit:
        description: The remaining amount of a credit.
        example: "1000.00"
        type: string
      services:
        description: The service to which a credit is applicable.
        example: General Product
        type: string
      startDate:
        description: Effective start date of a credit.
        example: "2023-11-01T00:00:00Z"
        type: string
      status:
        allOf:
        - $ref: '#/definitions/forms.CreditsState'
        description: The status of a credit.
        example: active
    type: object
  forms.CreditsState:
    enum:
    - active
    - inactive
    - before_active
    type: string
    x-enum-varnames:
    - CreditsState_Active
    - CreditsState_Inactive
    - CreditsState_BeforeActive
  forms.Customer:
    properties:
      id:
        description: The customer id.
        type: string
      name:
        description: The customer name.
        example: PingCAP
        type: string
    type: object
  forms.CustomerBills:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      customerName:
        description: The customer name.
        example: PingCAP
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.DiscountForOpenAPI:
    properties:
      description:
        description: The description of a discount.
        type: string
      discountCode:
        description: The code of a discount.
        example: 498c7f44-656f-4944-b455-0695faa5d4f9
        type: string
      expiryDate:
        description: Expired date of a credit.
        example: "2023-12-01T00:00:00Z"
        type: string
      percentageDiscount:
        description: The percentage is deducted from the original price. For example,
          a 20% discount on a $100 item would result in a discounted price of $80.
        example: 20%
        type: string
      services:
        description: The service to which a discount is applicable.
        example: Node Compute, Changefeed,
        type: string
      startDate:
        description: Effective start date of a credit.
        example: "2023-11-01T00:00:00Z"
        type: string
      status:
        allOf:
        - $ref: '#/definitions/forms.DiscountState'
        description: The status of a discount.
        example: valid
    type: object
  forms.DiscountState:
    enum:
    - valid
    - expired
    - reclaimed
    - invalid
    type: string
    x-enum-varnames:
    - DiscountState_Valid
    - DiscountState_Expired
    - DiscountState_Reclaimed
    - DiscountState_Invalid
  forms.Groups:
    properties:
      groupBy:
        description: |-
          Group cost explorer query results by category. The category includes:
           1. "service": Group query results by service type
           2. "product": Group query results by product type (TiDB Dedicated, TiDB Serverless, or Support Plan)
           3. "project": Group query results by Project IDs
           4. "cluster": Group query results by Cluster IDs
           5. "provider": Group query results by Cloud Provider
           6. "region": Group query results by cloud provider region
        items:
          $ref: '#/definitions/forms.CostExplorerTrendsBreakdownKey'
        type: array
      timeGranularity:
        allOf:
        - $ref: '#/definitions/forms.CostExplorerTrendsTimeGroup'
        description: |-
          Time Granularity determines how the cost explorer query results are organized daily, monthly, or in total.
           1. "day": Query results are organized daily
           2. "month": Query results are organized monthly
           3. "total": Query results are organized in total
    type: object
  forms.OKType:
    properties:
      status:
        example: ok
        type: string
    type: object
  forms.OrgSupportPlanForOpenAPI:
    properties:
      activeDate:
        description: Effective start date of support plan for an org.
        example: "2023-12-01T00:00:00Z"
        type: string
      expiredDate:
        description: Expired date of a support plan for an org.
        example: "2023-12-01T00:00:00Z"
        type: string
      fixedChargePrice:
        description: Fixed Fee, if support plan is charged on a pro rata basis(percentage_price),
          it means the minimum fee
        type: string
      level:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanLevel'
        description: Support Plan Level, By default, the Basic free plan is selected.
      public:
        description: Indicates whether the support plan is public. A non-public support
          plan may be subject to special contract terms and cannot be upgraded or
          downgraded.
        type: boolean
      supportPricePercentage:
        description: Prorated fee ratio.
        type: string
      type:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanType'
        description: Indicates whether the support plan is charged on a pro rata basis(percentage_price)
          or a fixed fee(fixed_price).
    type: object
  forms.PartnerBillsCostExplorer:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      elements:
        items:
          $ref: '#/definitions/forms.PartnerBillsCostExplorerElements'
        type: array
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsCostExplorerBreakdown:
    properties:
      billedDate:
        example: "2023-01-01"
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      detailKey:
        example: "122"
        type: string
      detailName:
        example: customer01
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsCostExplorerElements:
    properties:
      billedDate:
        example: "2023-01-01"
        type: string
      breakdown:
        items:
          $ref: '#/definitions/forms.PartnerBillsCostExplorerBreakdown'
        type: array
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsDetail:
    properties:
      billedDate:
        description: The date when this bill happens.
        type: string
      clusterName:
        description: Name of the cluster.
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      customerName:
        example: PingCAP
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      projectName:
        description: Name of the project.
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      servicePathName:
        description: Name of the service.
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsDetails:
    properties:
      details:
        items:
          $ref: '#/definitions/forms.PartnerBillsDetail'
        type: array
    type: object
  forms.PartnerBillsExplorer:
    properties:
      overview:
        allOf:
        - $ref: '#/definitions/forms.BillsOverview'
        description: The overall information for a bill in the specified organization.
      summaryByCustomer:
        allOf:
        - $ref: '#/definitions/forms.SummaryBillsByCustomer'
        description: A breakdown of the bill by customers.
      summaryByProject:
        allOf:
        - $ref: '#/definitions/forms.SummaryByProject'
        description: A breakdown of the bill by project.
      summaryByService:
        description: A breakdown of the bill by services.
        items:
          $ref: '#/definitions/forms.PartnerBillsServiceCosts'
        type: array
    type: object
  forms.PartnerBillsServiceCosts:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      serviceCosts:
        description: A breakdown of the bill by service.
        items:
          $ref: '#/definitions/forms.PartnerBillsServiceCosts'
        type: array
      serviceName:
        description: The name of services provided by TiDB Cloud.
        example: TiDB Dedicated
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerConfigs:
    properties:
      enableBillsView:
        description: whether customers can view their bills by list prices on tidb
          cloud console
        example: true
        type: boolean
    type: object
  forms.PartnerTrendsArgs:
    properties:
      clusters:
        items:
          $ref: '#/definitions/forms.ClusterOpenAPI'
        type: array
      customers:
        items:
          $ref: '#/definitions/forms.Customer'
        type: array
      projects:
        items:
          $ref: '#/definitions/forms.ProjectOpenAPI'
        type: array
      providers:
        items:
          $ref: '#/definitions/forms.Provider'
        type: array
      services:
        description: 'The Identifier of TiDB Cloud services consists of 3 levels.
          For example, "service": "TiDB Dedicated - Node Compute - TiFlash" consists
          of the following 3 levels.'
        items:
          $ref: '#/definitions/forms.CostExplorerService'
        type: array
    type: object
  forms.PartnerTrendsFilter:
    properties:
      clusters:
        items:
          type: string
        type: array
      customers:
        items:
          type: string
        type: array
      projects:
        items:
          type: string
        type: array
      providers:
        items:
          $ref: '#/definitions/forms.CostExplorerProvider'
        type: array
      services:
        items:
          $ref: '#/definitions/forms.CostExplorerService'
        type: array
      timeRange:
        $ref: '#/definitions/forms.TimeRange'
    type: object
  forms.PartnerTrendsInput:
    properties:
      filter:
        $ref: '#/definitions/forms.PartnerTrendsFilter'
      groups:
        $ref: '#/definitions/forms.Groups'
    type: object
  forms.PaymentForOpenAPI:
    properties:
      payable:
        type: boolean
      type:
        $ref: '#/definitions/forms.PaymentType'
    type: object
  forms.PaymentType:
    enum:
    - none
    - aws
    - aws_cppo
    - gcp
    - credit_card
    - wire_transfer
    type: string
    x-enum-varnames:
    - PaymentType_None
    - PaymentType_AWS
    - PaymentType_AWSCPPO
    - PaymentType_GCP
    - PaymentType_CreditCard
    - PaymentType_WireTransfer
  forms.ProjectOpenAPI:
    properties:
      id:
        example: "0"
        type: string
      name:
        type: string
      status:
        type: string
    type: object
  forms.Provider:
    properties:
      name:
        description: Name of the cloud provider
        type: string
      regions:
        description: Name of the region
        items:
          type: string
        type: array
    type: object
  forms.SummaryBillsByCustomer:
    properties:
      customers:
        description: The breakdown of bills by customers of a partner.
        items:
          $ref: '#/definitions/forms.CustomerBills'
        type: array
      otherCharges:
        description: Costs not incurred by the customer but by the partner, such as
          support plan for a MSP.
        items:
          $ref: '#/definitions/forms.BillsOtherName'
        type: array
    type: object
  forms.SummaryByProject:
    properties:
      otherCharges:
        description: These charges occur not only within a project but also across
          the entire organization.
        items:
          $ref: '#/definitions/forms.BillsOtherName'
        type: array
      projects:
        description: The projects in the specified organization.
        items:
          $ref: '#/definitions/forms.BillsProjects'
        type: array
    type: object
  forms.SupportPlanForOpenAPI:
    properties:
      fixedChargePrice:
        description: Fixed Fee, if support plan is charged on a pro rata basis(percentage_price),
          it means the minimum fee
        type: string
      level:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanLevel'
        description: Support Plan Level, By default, the Basic free plan is selected.
      public:
        description: Indicates whether the support plan is public. A non-public support
          plan may be subject to special contract terms and cannot be upgraded or
          downgraded.
        type: boolean
      supportPricePercentage:
        description: Prorated fee ratio.
        type: string
      type:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanType'
        description: Indicates whether the support plan is charged on a pro rata basis(percentage_price)
          or a fixed fee(fixed_price).
    type: object
  forms.SupportPlanLevel:
    enum:
    - Basic
    - Standard
    - Enterprise
    - Premium
    type: string
    x-enum-varnames:
    - SupportPlanLevel_Basic
    - SupportPlanLevel_Standard
    - SupportPlanLevel_Enterprise
    - SupportPlanLevel_Premium
  forms.SupportPlanType:
    enum:
    - fixed_price
    - percentage_price
    type: string
    x-enum-varnames:
    - SupportPlanType_FixedPrice
    - SupportPlanType_PercentagePrice
  forms.TaxIDType:
    enum:
    - ad_nrt
    - ae_trn
    - ar_cuit
    - au_abn
    - au_arn
    - bg_uic
    - bo_tin
    - br_cnpj
    - br_cpf
    - ca_bn
    - ca_gst_hst
    - ca_pst_bc
    - ca_pst_mb
    - ca_pst_sk
    - ca_qst
    - ch_vat
    - cl_tin
    - cn_tin
    - co_nit
    - cr_tin
    - do_rcn
    - ec_ruc
    - eg_tin
    - es_cif
    - eu_oss_vat
    - eu_vat
    - gb_vat
    - ge_vat
    - hk_br
    - hu_tin
    - id_npwp
    - il_vat
    - in_gst
    - is_vat
    - jp_cn
    - jp_rn
    - jp_trn
    - ke_pin
    - kr_brn
    - li_uid
    - mx_rfc
    - my_frp
    - my_itn
    - my_sst
    - no_vat
    - nz_gst
    - pe_ruc
    - ph_tin
    - ro_tin
    - rs_pib
    - ru_inn
    - ru_kpp
    - sa_vat
    - sg_gst
    - sg_uen
    - si_tin
    - sv_nit
    - th_vat
    - tr_tin
    - tw_vat
    - ua_vat
    - us_ein
    - uy_ruc
    - ve_rif
    - vn_tin
    - za_vat
    type: string
    x-enum-varnames:
    - TaxIdType_AdNrt
    - TaxIdType_AeTrn
    - TaxIdType_ArCuit
    - TaxIdType_AuAbn
    - TaxIdType_AuArn
    - TaxIdType_BgUic
    - TaxIdType_BoTin
    - TaxIdType_BrCnpj
    - TaxIdType_BrCpf
    - TaxIdType_CaBn
    - TaxIdType_CaGstHst
    - TaxIdType_CaPstBc
    - TaxIdType_CaPstMb
    - TaxIdType_CaPstSk
    - TaxIdType_CaQst
    - TaxIdType_ChVat
    - TaxIdType_ClTin
    - TaxIdType_CnTin
    - TaxIdType_CoNit
    - TaxIdType_CrTin
    - TaxIdType_DoRcn
    - TaxIdType_EcRuc
    - TaxIdType_EgTin
    - TaxIdType_EsCif
    - TaxIdType_EuOssVat
    - TaxIdType_EuVat
    - TaxIdType_GbVat
    - TaxIdType_GeVat
    - TaxIdType_HkBr
    - TaxIdType_HuTin
    - TaxIdType_IdNpwp
    - TaxIdType_IlVat
    - TaxIdType_InGst
    - TaxIdType_IsVat
    - TaxIdType_JpCn
    - TaxIdType_JpRn
    - TaxIdType_JpTrn
    - TaxIdType_KePin
    - TaxIdType_KrBrn
    - TaxIdType_LiUid
    - TaxIdType_MxRfc
    - TaxIdType_MyFrp
    - TaxIdType_MyItn
    - TaxIdType_MySst
    - TaxIdType_NoVat
    - TaxIdType_NzGst
    - TaxIdType_PeRuc
    - TaxIdType_PhTin
    - TaxIdType_RoTin
    - TaxIdType_RsPib
    - TaxIdType_RuInn
    - TaxIdType_RuKpp
    - TaxIdType_SaVat
    - TaxIdType_SgGst
    - TaxIdType_SgUen
    - TaxIdType_SiTin
    - TaxIdType_SvNit
    - TaxIdType_ThVat
    - TaxIdType_TrTin
    - TaxIdType_TwVat
    - TaxIdType_UaVat
    - TaxIdType_UsEin
    - TaxIdType_UyRuc
    - TaxIdType_VeRif
    - TaxIdType_VnTin
    - TaxIdType_ZaVat
  forms.TimeRange:
    properties:
      endDate:
        description: End date of the time range.
        type: string
      startDate:
        description: Start date of the time range.
        type: string
    type: object
host: tcpn.tidbapi.com
info:
  contact: {}
  description: This is a billing system server for TiDB Cloud Partners.
  title: Partner OPENAPI
  version: v1beta1
paths:
  /billingProfile:
    get:
      description: Get Org Billing Profile
      operationId: Billing_GetOrgBillingProfile
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      summary: Get Org Billing Profile
      tags:
      - Partners
    patch:
      description: Update Org Billing Profile
      operationId: Billing_UpdateOrgBillingProfile
      parameters:
      - description: billing profile
        in: body
        name: billingProfile
        required: true
        schema:
          $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      summary: Update Org Billing Profile
      tags:
      - Partners
  /bills/{billedMonth}:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the bill for the given month of a specific
        organization. You can query a bill up to 6 months prior to the current month.
        The bill is returned in JSON format.To use this resource, the requesting API
        Key must have the Organization Billing Admin or Organization Owner role.
      operationId: Billing_GetPartnerBills
      parameters:
      - description: The month of this bill happens for the specified organization,
          format is YYYY-MM, for example '2023-08'.
        in: path
        name: billedMonth
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsExplorer'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Return organization monthly bills
      tags:
      - Partners
  /billsCostExplorer:
    post:
      consumes:
      - application/json
      description: 'This endpoint executes a cost explorer query and returns the usage
        details. Cost Explorer query:'
      operationId: Billing_PartnerTrendsOpenAPI
      parameters:
      - description: args
        in: body
        name: args
        required: true
        schema:
          $ref: '#/definitions/forms.PartnerTrendsInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsCostExplorer'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get the usage details according to a cost explorer query
      tags:
      - Partners
  /billsCostExplorerArgs:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the basic info for a specific organization,
        including service info, cloud provider info, project info, and cluster info.
      operationId: Billing_GetPartnerTrendsArgs
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerTrendsArgs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Return basic info of a specific organization, which contains the key
        info to execute a cost explorer query
      tags:
      - Partners
  /billsDetails/{billedMonth}:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the bill for the given month of a specific
        organization with daily usage details. You can query a bill up to 6 months
        prior to the current month. The bill is returned in JSON format. To use this
        resource, the requesting API Key must have the Organization Billing Admin
        or Organization Owner role.
      operationId: Billing_GetPartnerBillsDetails
      parameters:
      - description: The month of this bill happens for the specified organization.
          The format is `YYYY-MM`, for example '2024-05'.
        in: path
        name: billedMonth
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsDetails'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get the monthly bill of the organization with daily usage details
      tags:
      - Partners
  /boundSupportPlans:
    get:
      consumes:
      - application/json
      operationId: Billing_GetOrgActiveSupportPlanForOpenAPI
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.OrgSupportPlanForOpenAPI'
      summary: Get Org Active Support Plan
      tags:
      - Partners
  /budgets:
    get:
      consumes:
      - application/json
      operationId: Billing_ListOrgBudgets
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.BudgetForOpenAPI'
            type: array
      summary: List Org Budgets
      tags:
      - Partners
    post:
      consumes:
      - application/json
      operationId: Billing_CreateBudget
      parameters:
      - description: budget
        in: body
        name: budget
        required: true
        schema:
          $ref: '#/definitions/forms.BudgetForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BudgetForOpenAPI'
      summary: Create Budget
      tags:
      - Partners
  /budgets/{budgetId}:
    delete:
      consumes:
      - application/json
      operationId: Billing_DeleteBudget
      parameters:
      - description: budget id
        in: path
        name: budgetId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.OKType'
      summary: Delete Budget
      tags:
      - Partners
    patch:
      consumes:
      - application/json
      operationId: Billing_UpdateBudget
      parameters:
      - description: budget id
        in: path
        name: budgetId
        required: true
        type: string
      - description: budget
        in: body
        name: budget
        required: true
        schema:
          $ref: '#/definitions/forms.BudgetForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BudgetForOpenAPI'
      summary: Update Budget
      tags:
      - Partners
  /credits:
    get:
      consumes:
      - application/json
      description: List Credits
      operationId: Billing_ListCredits
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.CreditsForOpenAPI'
            type: array
      summary: List Credits
      tags:
      - Partners
  /discounts:
    get:
      description: List Discounts
      operationId: Billing_ListDiscounts
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.DiscountForOpenAPI'
            type: array
      summary: List Discounts
      tags:
      - Partners
  /partnerConfigs:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the partner configuration for a specific Partner.
      operationId: Billing_GetPartnerConfigs
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerConfigs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Return Partner Configs for a Partner
      tags:
      - Partners
    patch:
      consumes:
      - application/json
      description: This endpoint retrieves the partner configuration for a specific Partner.
      operationId: Billing_UpdatePartnerConfigs
      parameters:
      - description: partner_configs
        in: body
        name: partnerConfigs
        required: true
        schema:
          $ref: '#/definitions/forms.PartnerConfigs'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerConfigs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Return Partner Configs for a Partner
      tags:
      - Partners
  /payments:
    get:
      consumes:
      - application/json
      operationId: Billing_GetPartnerPayment
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PaymentForOpenAPI'
      summary: Get Active PaymentMethod
      tags:
      - Partners
  /publicSupportPlans:
    get:
      consumes:
      - application/json
      operationId: Billing_ListPublicSupportPlans
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.SupportPlanForOpenAPI'
            type: array
      summary: List Public Support Plans
      tags:
      - Partners
swagger: "2.0"
