type SalesSheetTemplate {
    id: ID!
}

"""
Vendor type represents a Vendor (Account).
If you are adding a new field to this type, please make sure to consult with the
Accounts & Identities and Permissions Platform teams.
Slack channel: #accounts-team-public
"""
type Vendor implements Label @key(fields: "vendorId") @key(fields: "uuid") {
    activeVendorContract: VendorContract
    allowAlwReleaseBuilder: String
    """
    List of full OrchAdminUser objects representing the OA users who closed the deal for this label.
    """
    closerUsers: [OrchAdminUser!]!
    """
    companyBrand returns the CompanyBrand associated with the Vendor.
    `showOnDemand` is deprecated and has no effect. Please remove any usage of this argument.
    This datapoint is considered public and has no access restrictions.
    """
    companyBrand(showOnDemand: Boolean = false): CompanyBrand!
        @override(from: "graphql-knowledge")
    contactEmail: String
    contactName: String
    country: String @shareable
    countryCode: String
    countryId: Int
    dateCreated: String
    defaultSalesSheetTemplate: SalesSheetTemplate!
    estReleases: Int
    estTracks: Int
    firstStatementPeriod: AbacusStatementPeriod!
    genre: String
    isOwned: String
    labelIdentifier: String
    labelSummary: String
    lastUpdate: String
    """
    masterContact returns the identity of the assigned master contact for the given Vendor.
    """
    masterContact: Identity
    """
    name is the name of the Vendor.
    """
    name: String!
    owner: String
    parentCompany: String
    priority: Int
    productManager: Int @deprecated(reason: "Use `productManagerUser` instead")
    """
    Full OrchAdminUser object representing the OA user who is the product manager for this label.
    Resolves by ID so inactive users are included.
    """
    productManagerUser: OrchAdminUser
    projectedFirstYearRevenue: String
    quarterbackLabelManager: Int
    region: String
    relationshipNotes: String
    sapVendorId: String
    sonyFinancialMetadata: SonyFinancialMetadata
    soundScanCodeCA: String
    soundScanCodeUSA: String
    source: String
    status: VendorStatus! @override(from: "graphql-knowledge")
    subaccounts(limit: Int, offset: Int): SubaccountsResults!
    supportContactEmail: String
    transferPricingCountry: String
    uuid: ID! @shareable
    """
    vendorFeatures returns the feature controls that are enabled for a given Vendor.

    This is backed by the art_relations.vendor_restricted_features table, not split.io feature flags.

    Please refer to https://www.notion.so/Feature-Controls-14894b40547c43468ff40d063afafd53 for more details.
    """
    vendorFeatures: [VendorFeature!]!
    vendorId: Int! @shareable
    """
    vendorRestrictedFeatures returns a list for all the Feature that have been
    enabled for this Vendor.

    This refers to Feature Controls defined in OA, not feature flags from Split.

    For feature flags used during feature development and rollout, see `Vendor.features`.
    This field should be removed in favor of `vendorFeatures`.
    """
    vendorRestrictedFeatures: [VendorRestrictedFeatures!]!
        @override(from: "graphql-user")
        @deprecated(reason: "Use vendorFeatures instead.")
    website: String
    welcomeEmailDate: Date
}

interface AccountSearchItem {
    companyBrandUUID: ID!
    isDeleted: Boolean!
    """
    labelType is Subaccount or Vendor.
    """
    labelType: LabelType!
    name: String!
    uuid: ID!
}

type VendorSearchItem implements AccountSearchItem {
    companyBrandUUID: ID!
    isDeleted: Boolean!
    isDistributor: String!
    """
    labelType is Subaccount or Vendor.
    """
    labelType: LabelType!
    name: String!
    uuid: ID!
    vendorId: Int!
    """
    vendorStatus is the current status of the vendor (eg. signed, deletion, pending, approved, etc.)
    """
    vendorStatus: String!
    """
    vendorType is the label identifier for vendors (Eg. Frontline, Client Services, D3, Catalog, etc)
    """
    vendorType: String
}

type SubaccountSearchItem implements AccountSearchItem {
    companyBrandUUID: ID!
    isDeleted: Boolean!
    """
    labelType is Subaccount or Vendor.
    """
    labelType: LabelType!
    name: String!
    parentVendor: VendorSearchItem!
    subaccountId: Int!
    uuid: ID!
    vendor: Vendor!
    vendorId: Int!
    vendorUUID: ID!
}

type AccountSearchResultScoredItem {
    item: AccountSearchItem!
    score: Float!
}

type AccountSearchResult {
    items: [AccountSearchResultScoredItem!]!
    """
    Total count of items in the search result, regardless of pagination.
    """
    totalCount: Int!
}

enum LabelType {
    ALL
    SUBACCOUNT
    VENDOR
}

enum PaymentInterval {
    MONTH
    QUARTER
}

enum ContractType {
    ABACUS
    LEGACY
}

type VendorContract {
    active: Boolean!
    contractType: ContractType!
    endDate: Date
    id: ID!
    """
    How often the payment is due.
    """
    paymentInterval: PaymentInterval!
    royaltyCollection: VendorRoyaltyCollection!
    serviceType: ServiceType
    startDate: Date!
}

type VendorRoyaltyCollection {
    commission: Float
    territories: [String!]
}

enum VendorStatus {
    APPROVED
    DELETION
    INACTIVE
    PASSED
    PENDING
    PITCHED
    SIGNED
    VERBAL
    WAITING_FOR_APPROVAL
}
