102 lines
3.3 KiB
JavaScript
102 lines
3.3 KiB
JavaScript
// @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<number> & { cancel(): void }}
|
|
*/
|
|
export function Count() {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(3225397984));
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* @param {$models.Comment} item
|
|
* @returns {Promise<$models.Comment> & { cancel(): void }}
|
|
*/
|
|
export function Create(item) {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(4239106089, item));
|
|
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
return $$createType0($result);
|
|
}));
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* @param {number} id
|
|
* @returns {Promise<void> & { cancel(): void }}
|
|
*/
|
|
export function Delete(id) {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(2553503582, id));
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* @returns {Promise<($models.Comment | null)[]> & { cancel(): void }}
|
|
*/
|
|
export function GetAll() {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(1805763390));
|
|
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
return $$createType2($result);
|
|
}));
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* @param {number} id
|
|
* @returns {Promise<$models.Comment | null> & { cancel(): void }}
|
|
*/
|
|
export function GetById(id) {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(3217823099, 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.Comment | null)[]> & { cancel(): void }}
|
|
*/
|
|
export function SortedByOrder(fieldsSortOrder) {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(4244533291, fieldsSortOrder));
|
|
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
return $$createType2($result);
|
|
}));
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* @param {$models.Comment} item
|
|
* @returns {Promise<$models.Comment> & { cancel(): void }}
|
|
*/
|
|
export function Update(item) {
|
|
let $resultPromise = /** @type {any} */($Call.ByID(3080970936, 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.Comment.createFrom;
|
|
const $$createType1 = $Create.Nullable($$createType0);
|
|
const $$createType2 = $Create.Array($$createType1);
|