// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
import { DEFAULT_TENANT_ID } from '@citrineos/base';
import { Subscription } from '@citrineos/core';
import { faker } from '@faker-js/faker';

export function aSubscription(override?: Partial<Subscription>): Subscription {
  return {
    tenantId: DEFAULT_TENANT_ID,
    ocppConnectionName: faker.string.uuid(),
    onConnect: true,
    onClose: true,
    onMessage: true,
    sentMessage: true,
    messageRegexFilter: 'CostUpdated',
    url: faker.internet.url(),
    ...override,
  } as Subscription;
}
