// @ts-check // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // This file is automatically generated. DO NOT EDIT // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import {Call as $Call, Create as $Create} from "@wailsio/runtime"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import * as models$0 from "../models/models.js"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import * as $models from "./models.js"; /** * @returns {Promise & { cancel(): void }} */ export function Count() { let $resultPromise = /** @type {any} */($Call.ByID(3969879864)); return $resultPromise; } /** * @param {$models.Author} item * @returns {Promise<$models.Author> & { cancel(): void }} */ export function Create(item) { let $resultPromise = /** @type {any} */($Call.ByID(3684602449, item)); let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { return $$createType0($result); })); $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); return $typingPromise; } /** * @param {number} id * @returns {Promise & { cancel(): void }} */ export function Delete(id) { let $resultPromise = /** @type {any} */($Call.ByID(2096845974, id)); return $resultPromise; } /** * @returns {Promise<($models.Author | null)[]> & { cancel(): void }} */ export function GetAll() { let $resultPromise = /** @type {any} */($Call.ByID(3248293926)); let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { return $$createType2($result); })); $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); return $typingPromise; } /** * @param {number} id * @returns {Promise<$models.Author | null> & { cancel(): void }} */ export function GetById(id) { let $resultPromise = /** @type {any} */($Call.ByID(1703016211, id)); let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { return $$createType1($result); })); $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); return $typingPromise; } /** * @param {{ [_: string]: string }} fieldsSortOrder * @returns {Promise<($models.Author | null)[]> & { cancel(): void }} */ export function SortedByOrder(fieldsSortOrder) { let $resultPromise = /** @type {any} */($Call.ByID(3046628691, fieldsSortOrder)); let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { return $$createType2($result); })); $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); return $typingPromise; } /** * @param {$models.Author} item * @returns {Promise<$models.Author> & { cancel(): void }} */ export function Update(item) { let $resultPromise = /** @type {any} */($Call.ByID(2240704960, item)); let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { return $$createType0($result); })); $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); return $typingPromise; } // Private type creation functions const $$createType0 = models$0.Author.createFrom; const $$createType1 = $Create.Nullable($$createType0); const $$createType2 = $Create.Array($$createType1);