Skip to content

The open alternative to Salesforce, designed for AI.

680 B
Raw Blame
export type ApplicationRegistrationRow = {
  id: string;
  name: string;
  sourcePackage: string | null;
  latestAvailableVersion: string | null;
  isListed: boolean;
  logoFileId: string | null;
};

export const findApplicationRegistrationByUniversalIdentifier = async ({
  universalIdentifier,
}: {
  universalIdentifier: string;
}): Promise<ApplicationRegistrationRow | null> => {
  const [row] = await globalThis.testDataSource.query(
    `SELECT id, name, "sourcePackage", "latestAvailableVersion", "isListed",
            "logoFileId"
     FROM core."applicationRegistration"
     WHERE "universalIdentifier" = $1`,
    [universalIdentifier],
  );

  return row ?? null;
};