Files
expo-popcore-app/lib/plugins/loomart.d.ts
2025-12-25 16:25:55 +08:00

7334 lines
304 KiB
TypeScript

import * as zod from 'zod';
import { z } from 'zod';
import * as better_call from 'better-call';
import * as better_auth from 'better-auth';
import { Workflow } from '@cloudflare/workers-types';
import * as better_auth_plugins_access from 'better-auth/plugins/access';
declare const getSchema: () => {
readonly project: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly sourceTemplateId: {
readonly type: "string";
};
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly resultUrl: {
readonly type: "string";
readonly required: false;
readonly defaultValue: "";
};
readonly content: {
readonly type: "json";
readonly required: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly category: {
readonly fields: {
readonly ownerId: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly nameEn: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly isActive: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly template: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly ownerId: {
readonly type: "string";
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly coverImageUrl: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "";
};
readonly previewUrl: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "";
};
readonly content: {
readonly type: "json";
readonly required: true;
};
readonly formSchema: {
readonly type: "json";
};
readonly uploadSapecifications: {
readonly type: "string";
};
readonly uploadSapecificationsEn: {
readonly type: "string";
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly costPrice: {
readonly type: "number";
};
readonly price: {
readonly type: "number";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
readonly aspectRatio: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "9:16";
};
readonly status: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "AUDITING";
};
readonly isDeleted: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: false;
};
readonly deletedAt: {
readonly type: "date";
};
};
};
readonly recommendedTemplate: {
readonly fields: {
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly unique: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly isActive: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly tag: {
readonly fields: {
readonly ownerId: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly nameEn: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly description: {
readonly type: "string";
readonly defaultValue: "";
};
readonly descriptionEn: {
readonly type: "string";
readonly defaultValue: "";
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly categoryTag: {
readonly fields: {
readonly categoryId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "category";
readonly field: "id";
};
};
readonly tagId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "tag";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly categoryTagTemplate: {
readonly fields: {
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly categoryTagId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "categoryTag";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly activity: {
readonly fields: {
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly desc: {
readonly type: "string";
readonly required: true;
};
readonly descEn: {
readonly type: "string";
readonly required: true;
};
readonly coverUrl: {
readonly type: "string";
readonly required: true;
};
readonly videoUrl: {
readonly type: "string";
};
readonly ownerId: {
readonly type: "string";
};
readonly link: {
readonly type: "string";
readonly required: true;
};
readonly isActive: {
readonly type: "boolean";
readonly defaultValue: true;
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly aigcBilling: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly taskId: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly taskType: {
readonly type: "string";
readonly required: true;
};
readonly modelName: {
readonly type: "string";
};
readonly status: {
readonly type: "string";
readonly defaultValue: "pending";
};
readonly input: {
readonly type: "json";
};
readonly output: {
readonly type: "json";
};
readonly price: {
readonly type: "number";
};
readonly usage: {
readonly type: "json";
};
readonly rating: {
readonly type: "number";
};
readonly errorMessage: {
readonly type: "string";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly templateGeneration: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly type: {
readonly type: "string";
readonly required: true;
};
readonly resultUrl: {
readonly type: "json";
readonly required: true;
};
readonly originalUrl: {
readonly type: "string";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
readonly status: {
readonly type: "string";
readonly defaultValue: "pending";
};
readonly creditsCost: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly creditsTransactionId: {
readonly type: "string";
};
};
};
};
type SchemaDef = ReturnType<typeof getSchema>;
type GetZodType<T> = T extends {
type: 'string';
} ? z.ZodString : T extends {
type: 'number';
} ? z.ZodNumber : T extends {
type: 'boolean';
} ? z.ZodBoolean : T extends {
type: 'date';
} ? z.ZodDate : T extends {
type: 'json';
} ? z.ZodAny : z.ZodAny;
type ZodFieldType<T> = T extends {
required: true;
} ? GetZodType<T> : z.ZodNullable<z.ZodOptional<GetZodType<T>>>;
type ModelShape<M extends keyof SchemaDef> = {
[F in keyof SchemaDef[M]['fields']]: ZodFieldType<SchemaDef[M]['fields'][F]>;
} & {
id: z.ZodString;
};
type InferZodSchema<M extends keyof SchemaDef> = z.infer<z.ZodObject<ModelShape<M>>>;
declare const getZodSchemaFromModel: <M extends keyof SchemaDef>(modelName: M) => z.ZodObject<ModelShape<M>>;
declare function getLoomartOptions(context: any): LoomartOptions;
declare const defaultStatements: {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
};
type Statements = typeof defaultStatements;
declare const ac: {
newRole<K extends "activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "selfFile" | "tag" | "wallet" | "user">(statements: better_auth_plugins_access.Subset<K, {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>): {
authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: better_auth_plugins_access.Subset<K, {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<K, {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<K, {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
statements: {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
};
};
/**
* 角色 - 权限
* 组织
* 用户 superadmin 没有组织 user/editor 没有组织 contentAdmin有组织
*/
declare const user: {
authorize<K_1 extends "template" | "selfFile">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
declare const editor: {
authorize<K_1 extends "project" | "template" | "category" | "tag">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
declare const contentadmin: {
authorize<K_1 extends "template" | "recommendedTemplate" | "category" | "file" | "tag" | "user">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
declare const superadmin: {
authorize<K_1 extends "activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
declare const roles: {
user: {
authorize<K_1 extends "template" | "selfFile">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"template" | "selfFile", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
editor: {
authorize<K_1 extends "project" | "template" | "category" | "tag">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"project" | "template" | "category" | "tag", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
contentadmin: {
authorize<K_1 extends "template" | "recommendedTemplate" | "category" | "file" | "tag" | "user">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"template" | "recommendedTemplate" | "category" | "file" | "tag" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
superadmin: {
authorize<K_1 extends "activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key] | {
actions: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>[key];
connector: "OR" | "AND";
} | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
statements: better_auth_plugins_access.Subset<"activity" | "project" | "template" | "recommendedTemplate" | "category" | "file" | "tag" | "wallet" | "user", {
readonly activity: readonly ["create", "read", "update", "delete"];
readonly project: readonly ["create", "read", "list", "update", "delete", "run"];
readonly template: readonly ["create", "read", "list", "update", "delete", "run"];
readonly recommendedTemplate: readonly ["create", "read", "list", "update", "delete"];
readonly category: readonly ["create", "read", "list", "update", "delete"];
readonly file: readonly ["upload", "list", "update", "delete"];
readonly selfFile: readonly ["upload", "list", "update", "delete"];
readonly tag: readonly ["create", "list", "read", "update", "delete"];
readonly wallet: readonly ["grantCredit", "revokeCredit"];
readonly user: readonly ["create", "read", "list", "update", "delete"];
}>;
};
};
interface FileUploadResponse {
status: boolean;
msg: string;
data: string;
usage?: {
price: number;
price_desc: string;
};
}
interface VideoCompressRequest {
url: string;
compress: 'low' | 'medium' | 'high';
}
interface VideoCompressResponse {
status: boolean;
msg: string;
data: string;
}
interface AigcModelInfo {
model_name: string;
description: string;
supported_ar: string[];
supported_count: number[];
mode: string;
model_provider: string;
extra: {
img_count: {
min: number;
max: number;
};
other_params: Record<string, {
description: string;
value: (string | number)[];
}>;
};
tags: string[];
provider: string;
display_name: string;
}
interface AigcTaskResponse {
status: boolean;
msg: string;
data: string;
}
interface AigcTaskStatus {
status: boolean | string;
msg: string | {
message: string;
};
data?: string[] | null;
extra?: string;
usage?: Record<string, any>;
}
interface GeneratedUser {
name: string;
email: string;
username: string;
displayUsername: string;
}
interface LoomartOptions {
query: <T>(sql: string, params: any[]) => Promise<T>;
workflow?: Workflow;
prisma: any;
}
declare const loomart: (options: LoomartOptions) => {
id: "loomart";
schema: {
readonly project: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly sourceTemplateId: {
readonly type: "string";
};
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly resultUrl: {
readonly type: "string";
readonly required: false;
readonly defaultValue: "";
};
readonly content: {
readonly type: "json";
readonly required: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly category: {
readonly fields: {
readonly ownerId: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly nameEn: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly isActive: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly template: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly ownerId: {
readonly type: "string";
};
readonly description: {
readonly type: "string";
readonly required: true;
};
readonly descriptionEn: {
readonly type: "string";
readonly required: true;
};
readonly coverImageUrl: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "";
};
readonly previewUrl: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "";
};
readonly content: {
readonly type: "json";
readonly required: true;
};
readonly formSchema: {
readonly type: "json";
};
readonly uploadSapecifications: {
readonly type: "string";
};
readonly uploadSapecificationsEn: {
readonly type: "string";
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly costPrice: {
readonly type: "number";
};
readonly price: {
readonly type: "number";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
readonly aspectRatio: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "9:16";
};
readonly status: {
readonly type: "string";
readonly required: true;
readonly defaultValue: "AUDITING";
};
readonly isDeleted: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: false;
};
readonly deletedAt: {
readonly type: "date";
};
};
};
readonly recommendedTemplate: {
readonly fields: {
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly unique: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly isActive: {
readonly type: "boolean";
readonly required: true;
readonly defaultValue: true;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly tag: {
readonly fields: {
readonly ownerId: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly nameEn: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly description: {
readonly type: "string";
readonly defaultValue: "";
};
readonly descriptionEn: {
readonly type: "string";
readonly defaultValue: "";
};
readonly sortOrder: {
readonly type: "number";
readonly required: true;
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly categoryTag: {
readonly fields: {
readonly categoryId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "category";
readonly field: "id";
};
};
readonly tagId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "tag";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly categoryTagTemplate: {
readonly fields: {
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly categoryTagId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "categoryTag";
readonly field: "id";
};
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly activity: {
readonly fields: {
readonly title: {
readonly type: "string";
readonly required: true;
};
readonly titleEn: {
readonly type: "string";
readonly required: true;
};
readonly desc: {
readonly type: "string";
readonly required: true;
};
readonly descEn: {
readonly type: "string";
readonly required: true;
};
readonly coverUrl: {
readonly type: "string";
readonly required: true;
};
readonly videoUrl: {
readonly type: "string";
};
readonly ownerId: {
readonly type: "string";
};
readonly link: {
readonly type: "string";
readonly required: true;
};
readonly isActive: {
readonly type: "boolean";
readonly defaultValue: true;
};
readonly sortOrder: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly aigcBilling: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly taskId: {
readonly type: "string";
readonly required: true;
readonly unique: true;
};
readonly taskType: {
readonly type: "string";
readonly required: true;
};
readonly modelName: {
readonly type: "string";
};
readonly status: {
readonly type: "string";
readonly defaultValue: "pending";
};
readonly input: {
readonly type: "json";
};
readonly output: {
readonly type: "json";
};
readonly price: {
readonly type: "number";
};
readonly usage: {
readonly type: "json";
};
readonly rating: {
readonly type: "number";
};
readonly errorMessage: {
readonly type: "string";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
};
};
readonly templateGeneration: {
readonly fields: {
readonly userId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "user";
readonly field: "id";
};
};
readonly templateId: {
readonly type: "string";
readonly required: true;
readonly references: {
readonly model: "template";
readonly field: "id";
};
};
readonly type: {
readonly type: "string";
readonly required: true;
};
readonly resultUrl: {
readonly type: "json";
readonly required: true;
};
readonly originalUrl: {
readonly type: "string";
};
readonly createdAt: {
readonly type: "date";
readonly required: true;
};
readonly updatedAt: {
readonly type: "date";
readonly required: true;
};
readonly status: {
readonly type: "string";
readonly defaultValue: "pending";
};
readonly creditsCost: {
readonly type: "number";
readonly defaultValue: 0;
};
readonly creditsTransactionId: {
readonly type: "string";
};
};
};
};
init(ctx: better_auth.AuthContext): {
options: {
databaseHooks: {};
};
};
endpoints: {
generateRandomUsers: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
count: number;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
users: GeneratedUser[];
};
} : {
users: GeneratedUser[];
}>;
options: {
method: "POST";
body: zod.ZodObject<{
count: zod.ZodNumber;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/random-users/generate";
};
createRandomUsers: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
users: {
name: string;
email: string;
username: string;
displayUsername: string;
}[];
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
success: boolean;
created: number;
users: Array<{
id: string;
name: string;
email: string;
}>;
errors: string[];
};
} : {
success: boolean;
created: number;
users: Array<{
id: string;
name: string;
email: string;
}>;
errors: string[];
}>;
options: {
method: "POST";
body: zod.ZodObject<{
users: zod.ZodArray<zod.ZodObject<{
name: zod.ZodString;
email: zod.ZodString;
username: zod.ZodString;
displayUsername: zod.ZodString;
}, better_auth.$strip>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/random-users/create";
};
addUserBalance: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
userId: string;
amount: number;
reason?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
success: boolean;
balance: {
userId: string;
customerId: any;
amount: number;
currentBalance: number;
};
message: string;
};
} : {
success: boolean;
balance: {
userId: string;
customerId: any;
amount: number;
currentBalance: number;
};
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
userId: zod.ZodString;
amount: zod.ZodNumber;
reason: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
SERVER_ONLY: true;
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: {
type: "object";
properties: {
success: {
type: string;
};
balance: {
type: string;
properties: {
userId: {
type: string;
};
customerId: {
type: string;
};
amount: {
type: string;
};
currentBalance: {
type: string;
};
};
};
message: {
type: string;
};
};
};
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/admin-balance/add-user-balance";
};
deductUserBalance: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
userId: string;
amount: number;
reason?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
success: boolean;
balance: {
userId: string;
customerId: any;
amount: number;
currentBalance: number;
};
message: string;
};
} : {
success: boolean;
balance: {
userId: string;
customerId: any;
amount: number;
currentBalance: number;
};
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
userId: zod.ZodString;
amount: zod.ZodNumber;
reason: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
SERVER_ONLY: true;
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: {
type: "object";
properties: {
success: {
type: string;
};
balance: {
type: string;
properties: {
userId: {
type: string;
};
customerId: {
type: string;
};
amount: {
type: string;
};
currentBalance: {
type: string;
};
};
};
message: {
type: string;
};
};
};
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/admin-balance/deduct-user-balance";
};
getUserBalance: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
userId: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
success: boolean;
balance: {
userId: string;
customerId: any;
currentBalance: number;
currency: string;
};
};
} : {
success: boolean;
balance: {
userId: string;
customerId: any;
currentBalance: number;
currency: string;
};
}>;
options: {
method: "POST";
body: zod.ZodObject<{
userId: zod.ZodString;
}, better_auth.$strip>;
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
SERVER_ONLY: true;
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: {
type: "object";
properties: {
success: {
type: string;
};
balance: {
type: string;
properties: {
userId: {
type: string;
};
customerId: {
type: string;
};
currentBalance: {
type: string;
};
currency: {
type: string;
};
};
};
};
};
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/admin-balance/get-user-balance";
};
listAigcBillings: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
userId?: string | undefined;
taskType?: string | undefined;
status?: string | undefined;
modelName?: string | undefined;
startDate?: string | undefined;
endDate?: string | undefined;
orderBy?: string | undefined;
order?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
billings: {
userId: string;
taskId: string;
taskType: string;
createdAt: Date;
updatedAt: Date;
id: string;
modelName?: string | null | undefined;
status?: string | null | undefined;
input?: any;
output?: any;
price?: number | null | undefined;
usage?: any;
rating?: number | null | undefined;
errorMessage?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
billings: {
userId: string;
taskId: string;
taskType: string;
createdAt: Date;
updatedAt: Date;
id: string;
modelName?: string | null | undefined;
status?: string | null | undefined;
input?: any;
output?: any;
price?: number | null | undefined;
usage?: any;
rating?: number | null | undefined;
errorMessage?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
userId: zod.ZodOptional<zod.ZodString>;
taskType: zod.ZodOptional<zod.ZodString>;
status: zod.ZodOptional<zod.ZodString>;
modelName: zod.ZodOptional<zod.ZodString>;
startDate: zod.ZodOptional<zod.ZodString>;
endDate: zod.ZodOptional<zod.ZodString>;
orderBy: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
order: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
}, better_auth.$strip>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/aigc-billings/list";
};
uploadS3: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
body?: any;
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: FileUploadResponse;
} : FileUploadResponse>;
options: {
method: "POST";
body: zod.ZodAny;
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
tags: string[];
requestBody: any;
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/file/upload-s3";
};
compressVideo: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
videoUrl: string;
quality?: "low" | "medium" | "high" | undefined;
format?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: VideoCompressResponse;
} : VideoCompressResponse>;
options: {
method: "POST";
body: zod.ZodObject<{
videoUrl: zod.ZodString;
quality: zod.ZodDefault<zod.ZodEnum<{
low: "low";
medium: "medium";
high: "high";
}>>;
format: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/file/compress-video";
};
getAigcModels: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
category?: "image" | "video" | undefined;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
status: boolean;
data: AigcModelInfo[];
msg: string;
};
} : {
status: boolean;
data: AigcModelInfo[];
msg: string;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
category: zod.ZodDefault<zod.ZodOptional<zod.ZodEnum<{
image: "image";
video: "video";
}>>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/aigc/models";
};
getAigcTaskStatus: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
taskId: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: AigcTaskStatus;
} : AigcTaskStatus>;
options: {
method: "GET";
query: zod.ZodObject<{
taskId: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/aigc/task/get";
};
submitTask: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
model_name: string;
prompt: string;
mode?: string | undefined;
aspect_ratio?: string | undefined;
webhook_flag?: boolean | undefined;
watermark?: boolean | undefined;
extra?: string | undefined;
img_url?: string | undefined;
img_list?: any[] | undefined;
duration?: string | undefined;
resolution?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: AigcTaskResponse;
} : AigcTaskResponse>;
options: {
method: "POST";
body: zod.ZodObject<{
mode: zod.ZodOptional<zod.ZodString>;
model_name: zod.ZodString;
prompt: zod.ZodString;
aspect_ratio: zod.ZodOptional<zod.ZodString>;
webhook_flag: zod.ZodOptional<zod.ZodBoolean>;
watermark: zod.ZodOptional<zod.ZodBoolean>;
extra: zod.ZodOptional<zod.ZodString>;
img_url: zod.ZodOptional<zod.ZodString>;
img_list: zod.ZodOptional<zod.ZodArray<zod.ZodAny>>;
duration: zod.ZodOptional<zod.ZodString>;
resolution: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/aigc/task/submit";
};
concatVideos: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
inputs: string[];
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
status: boolean;
data: {
taskId: string;
};
msg: string;
};
} : {
status: boolean;
data: {
taskId: string;
};
msg: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
inputs: zod.ZodArray<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/ffmpeg/task/concat";
};
getFfmpegTaskStatus: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
taskId: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
status: boolean;
data: {
taskId: string;
status: string;
error: string;
code: number;
task_type: string;
results: any;
};
msg: string;
};
} : {
status: boolean;
data: {
taskId: string;
status: string;
error: string;
code: number;
task_type: string;
results: any;
};
msg: string;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
taskId: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/ffmpeg/task/get";
};
chat: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
prompt: string;
model_name: string;
img_list?: string[] | undefined;
stream?: boolean | undefined;
tools?: string | undefined;
tool_choice?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: Response | {
status: boolean;
msg: string;
data: string;
usage: {
[key: string]: unknown;
};
};
} : Response | {
status: boolean;
msg: string;
data: string;
usage: {
[key: string]: unknown;
};
}>;
options: {
method: "POST";
body: zod.ZodObject<{
prompt: zod.ZodString;
model_name: zod.ZodString;
img_list: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
stream: zod.ZodOptional<zod.ZodBoolean>;
tools: zod.ZodOptional<zod.ZodString>;
tool_choice: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
'text/event-stream': {
schema: {
type: string;
};
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/chat";
};
listChatModels: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
data: {
model_name: string;
desc: string;
extra: {
input_supported: string[];
base_url: string;
};
}[];
status: boolean;
msg: string;
};
} : {
data: {
model_name: string;
desc: string;
extra: {
input_supported: string[];
base_url: string;
};
}[];
status: boolean;
msg: string;
}>;
options: {
method: "GET";
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/chat/models";
};
createTemplateGeneration: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
templateId: string;
type: string;
resultUrl?: string[] | undefined;
originalUrl?: string | undefined;
status?: string | undefined;
creditsCost?: number | undefined;
creditsTransactionId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
};
} : {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
templateId: zod.ZodString;
type: zod.ZodString;
resultUrl: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
originalUrl: zod.ZodOptional<zod.ZodString>;
status: zod.ZodDefault<zod.ZodString>;
creditsCost: zod.ZodDefault<zod.ZodNumber>;
creditsTransactionId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/create";
};
deleteTemplateGeneration: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/delete";
};
getTemplateGeneration: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
};
} : {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/get";
};
listTemplateGenerations: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
userId?: string | undefined;
templateId?: string | undefined;
status?: string | undefined;
search?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
data: {
user: {
id: string;
name: string;
email: string;
} | undefined;
template: {
id: string;
title: string;
titleEn: string;
coverImageUrl: string;
} | undefined;
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
data: {
user: {
id: string;
name: string;
email: string;
} | undefined;
template: {
id: string;
title: string;
titleEn: string;
coverImageUrl: string;
} | undefined;
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
userId: zod.ZodOptional<zod.ZodString>;
templateId: zod.ZodOptional<zod.ZodString>;
status: zod.ZodOptional<zod.ZodString>;
search: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/list";
};
updateTemplateGeneration: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
resultUrl?: any;
status?: string | null | undefined;
type?: string | undefined;
originalUrl?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
} | null;
} : {
userId: string;
templateId: string;
type: string;
resultUrl: any;
createdAt: Date;
updatedAt: Date;
id: string;
originalUrl?: string | null | undefined;
status?: string | null | undefined;
creditsCost?: number | null | undefined;
creditsTransactionId?: string | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly resultUrl: zod.ZodOptional<zod.ZodAny>;
readonly status: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly type: zod.ZodOptional<zod.ZodString>;
readonly originalUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly creditsCost: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>>;
readonly creditsTransactionId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/update";
};
batchDeleteTemplateGeneration: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
ids: string[];
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
ids: zod.ZodArray<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template-generation/batch-delete";
};
createRecommendedTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
templateId: string;
sortOrder?: number | undefined;
isActive?: boolean | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
};
} : {
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
templateId: zod.ZodString;
sortOrder: zod.ZodDefault<zod.ZodNumber>;
isActive: zod.ZodDefault<zod.ZodBoolean>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/recommended/create";
};
deleteRecommendedTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/recommended/delete";
};
listRecommendedTemplates: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
isActive?: boolean | undefined;
orderBy?: string | undefined;
order?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
recommendedTemplates: {
template: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
} | undefined;
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
recommendedTemplates: {
template: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
} | undefined;
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
isActive: zod.ZodOptional<zod.ZodBoolean>;
orderBy: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
order: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/recommended/list";
};
listPublicRecommendedTemplates: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
limit?: number | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
templates: any[];
};
} : {
templates: any[];
}>;
options: {
method: "POST";
body: zod.ZodObject<{
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
}, better_auth.$strip>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/recommended/list/public/";
};
updateRecommendedTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
sortOrder?: number | undefined;
isActive?: boolean | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
} | null;
} : {
templateId: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly sortOrder: zod.ZodOptional<zod.ZodNumber>;
readonly isActive: zod.ZodOptional<zod.ZodBoolean>;
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/recommended/update";
};
createActivity: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
videoUrl?: string | undefined;
isActive?: boolean | undefined;
sortOrder?: number | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
};
} : {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
title: zod.ZodString;
titleEn: zod.ZodString;
desc: zod.ZodString;
descEn: zod.ZodString;
coverUrl: zod.ZodString;
videoUrl: zod.ZodOptional<zod.ZodString>;
link: zod.ZodString;
isActive: zod.ZodDefault<zod.ZodBoolean>;
sortOrder: zod.ZodDefault<zod.ZodNumber>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/activity/create";
};
deleteActivity: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/activity/delete";
};
getActivity: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
};
} : {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/activity/get";
};
listActivities: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
isActive?: boolean | undefined;
orderBy?: string | undefined;
order?: string | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
activities: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
activities: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
isActive: zod.ZodOptional<zod.ZodBoolean>;
orderBy: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
order: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/activities/list";
};
updateActivity: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
title?: string | undefined;
titleEn?: string | undefined;
ownerId?: string | null | undefined;
sortOrder?: number | null | undefined;
isActive?: boolean | null | undefined;
desc?: string | undefined;
descEn?: string | undefined;
coverUrl?: string | undefined;
videoUrl?: string | null | undefined;
link?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
} | null;
} : {
title: string;
titleEn: string;
desc: string;
descEn: string;
coverUrl: string;
link: string;
createdAt: Date;
updatedAt: Date;
id: string;
videoUrl?: string | null | undefined;
ownerId?: string | null | undefined;
isActive?: boolean | null | undefined;
sortOrder?: number | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly title: zod.ZodOptional<zod.ZodString>;
readonly titleEn: zod.ZodOptional<zod.ZodString>;
readonly ownerId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly sortOrder: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>>;
readonly isActive: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodBoolean>>>;
readonly desc: zod.ZodOptional<zod.ZodString>;
readonly descEn: zod.ZodOptional<zod.ZodString>;
readonly coverUrl: zod.ZodOptional<zod.ZodString>;
readonly videoUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly link: zod.ZodOptional<zod.ZodString>;
id: zod.ZodString;
}, better_auth.$strip>;
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/activity/update";
};
createTag: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
name: string;
nameEn: string;
description?: string | undefined;
descriptionEn?: string | undefined;
sortOrder?: number | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
};
} : {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
name: zod.ZodString;
nameEn: zod.ZodString;
description: zod.ZodOptional<zod.ZodString>;
descriptionEn: zod.ZodOptional<zod.ZodString>;
sortOrder: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/create";
};
deleteTag: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/delete";
};
getTag: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
categories: ({
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
} | null)[];
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
};
} : {
categories: ({
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
} | null)[];
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/get";
};
getTagByName: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
name: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
templates: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}[];
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
};
} : {
templates: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}[];
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
name: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/get-by-name";
};
listTags: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
search?: string | undefined;
orderBy?: string | undefined;
order?: string | undefined;
ownerId?: string | undefined;
categoryIds?: string[] | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
tags: any[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
tags: any[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
search: zod.ZodOptional<zod.ZodString>;
orderBy: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
order: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
ownerId: zod.ZodOptional<zod.ZodString>;
categoryIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/list";
};
updateTag: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
ownerId?: string | null | undefined;
name?: string | undefined;
nameEn?: string | undefined;
sortOrder?: number | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
} | null;
} : {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly description: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly descriptionEn: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly ownerId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly name: zod.ZodOptional<zod.ZodString>;
readonly nameEn: zod.ZodOptional<zod.ZodString>;
readonly sortOrder: zod.ZodOptional<zod.ZodNumber>;
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/tags/update";
};
updateCategoryTag: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
sortOrder: number;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: any;
} : any>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
sortOrder: zod.ZodNumber;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
};
};
} & {
use: any[];
};
path: "/loomart/tags/update-category-tag";
};
createCategory: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
name: string;
nameEn: string;
description?: string | undefined;
descriptionEn?: string | undefined;
sortOrder?: number | undefined;
isActive?: boolean | undefined;
tagIds?: string[] | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
};
} : {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
name: zod.ZodString;
nameEn: zod.ZodString;
description: zod.ZodDefault<zod.ZodString>;
descriptionEn: zod.ZodDefault<zod.ZodString>;
sortOrder: zod.ZodDefault<zod.ZodNumber>;
isActive: zod.ZodDefault<zod.ZodBoolean>;
tagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/create";
};
deleteCategory: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/delete";
};
getCategory: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
};
} : {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/get";
};
getCategoryByName: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
name: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
templates: any[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
};
} : {
tags: {
name: string;
nameEn: string;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
description?: string | null | undefined;
descriptionEn?: string | null | undefined;
}[];
templates: any[];
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
name: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/get-by-name";
};
listCategories: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
isActive?: boolean | undefined;
orderBy?: string | undefined;
order?: string | undefined;
search?: string | undefined;
categoryIds?: string[] | undefined;
withChildren?: boolean | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
categories: any[];
total: number;
page: number;
limit: number;
};
} : {
categories: any[];
total: number;
page: number;
limit: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
isActive: zod.ZodOptional<zod.ZodBoolean>;
orderBy: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
order: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
search: zod.ZodOptional<zod.ZodString>;
categoryIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
withChildren: zod.ZodOptional<zod.ZodBoolean>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/list";
};
updateCategory: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
description?: string | undefined;
descriptionEn?: string | undefined;
ownerId?: string | null | undefined;
name?: string | undefined;
nameEn?: string | undefined;
sortOrder?: number | undefined;
isActive?: boolean | undefined;
tagIds?: string[] | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
} | null;
} : {
name: string;
nameEn: string;
description: string;
descriptionEn: string;
sortOrder: number;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
id: string;
ownerId?: string | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly description: zod.ZodOptional<zod.ZodString>;
readonly descriptionEn: zod.ZodOptional<zod.ZodString>;
readonly ownerId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly name: zod.ZodOptional<zod.ZodString>;
readonly nameEn: zod.ZodOptional<zod.ZodString>;
readonly sortOrder: zod.ZodOptional<zod.ZodNumber>;
readonly isActive: zod.ZodOptional<zod.ZodBoolean>;
id: zod.ZodString;
tagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/category/update";
};
createTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
sortOrder: number;
coverImageUrl: string;
previewUrl: string;
aspectRatio: string;
status: string;
categoryTagSortOrders: {
categoryId: string;
tagId: string;
sortOrder: number;
}[];
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
};
} : {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly title: zod.ZodString;
readonly titleEn: zod.ZodString;
readonly description: zod.ZodString;
readonly descriptionEn: zod.ZodString;
readonly content: zod.ZodAny;
readonly ownerId: zod.ZodNullable<zod.ZodOptional<zod.ZodString>>;
readonly sortOrder: zod.ZodNumber;
readonly coverImageUrl: zod.ZodString;
readonly previewUrl: zod.ZodString;
readonly formSchema: zod.ZodNullable<zod.ZodOptional<zod.ZodAny>>;
readonly uploadSapecifications: zod.ZodNullable<zod.ZodOptional<zod.ZodString>>;
readonly uploadSapecificationsEn: zod.ZodNullable<zod.ZodOptional<zod.ZodString>>;
readonly costPrice: zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>;
readonly price: zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>;
readonly aspectRatio: zod.ZodString;
readonly status: zod.ZodString;
categoryTagSortOrders: zod.ZodArray<zod.ZodObject<{
categoryId: zod.ZodString;
tagId: zod.ZodString;
sortOrder: zod.ZodNumber;
}, better_auth.$strip>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/create";
};
deleteTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/delete";
};
getTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
category: undefined;
tags: any[];
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
};
} : {
category: undefined;
tags: any[];
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/get";
};
listTemplates: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
search?: string | undefined;
categoryId?: string | undefined;
status?: string | undefined;
ownerId?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
templates: {
categoryTags: any[];
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
};
} : {
templates: {
categoryTags: any[];
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
}[];
total: number;
page: number;
limit: number;
totalPages: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
search: zod.ZodOptional<zod.ZodString>;
categoryId: zod.ZodOptional<zod.ZodString>;
status: zod.ZodOptional<zod.ZodString>;
ownerId: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/list";
};
updateTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
title?: string | undefined;
titleEn?: string | undefined;
description?: string | undefined;
descriptionEn?: string | undefined;
content?: any;
sortOrder?: number | undefined;
coverImageUrl?: string | undefined;
previewUrl?: string | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
aspectRatio?: string | undefined;
status?: string | undefined;
categoryTagSortOrders?: {
categoryId: string;
tagId: string;
sortOrder: number;
}[] | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
} | null;
} : {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
coverImageUrl: string;
previewUrl: string;
content: any;
sortOrder: number;
createdAt: Date;
updatedAt: Date;
aspectRatio: string;
status: string;
isDeleted: boolean;
id: string;
ownerId?: string | null | undefined;
formSchema?: any;
uploadSapecifications?: string | null | undefined;
uploadSapecificationsEn?: string | null | undefined;
costPrice?: number | null | undefined;
price?: number | null | undefined;
deletedAt?: Date | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly title: zod.ZodOptional<zod.ZodString>;
readonly titleEn: zod.ZodOptional<zod.ZodString>;
readonly description: zod.ZodOptional<zod.ZodString>;
readonly descriptionEn: zod.ZodOptional<zod.ZodString>;
readonly content: zod.ZodOptional<zod.ZodAny>;
readonly sortOrder: zod.ZodOptional<zod.ZodNumber>;
readonly coverImageUrl: zod.ZodOptional<zod.ZodString>;
readonly previewUrl: zod.ZodOptional<zod.ZodString>;
readonly formSchema: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodAny>>>;
readonly uploadSapecifications: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly uploadSapecificationsEn: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly costPrice: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>>;
readonly price: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodNumber>>>;
readonly aspectRatio: zod.ZodOptional<zod.ZodString>;
readonly status: zod.ZodOptional<zod.ZodString>;
id: zod.ZodString;
categoryTagSortOrders: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
categoryId: zod.ZodString;
tagId: zod.ZodString;
sortOrder: zod.ZodNumber;
}, better_auth.$strip>>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/update";
};
runTemplate: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
templateId: string;
data: any;
identifier?: string | undefined;
originalUrl?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
generationId: string;
};
} : {
generationId: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
templateId: zod.ZodString;
data: zod.ZodAny;
identifier: zod.ZodOptional<zod.ZodString>;
originalUrl: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/template/run";
};
getProjects: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
page?: number | undefined;
limit?: number | undefined;
search?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
projects: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
};
} : {
projects: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
}[];
total: number;
page: number;
limit: number;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
page: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
limit: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
search: zod.ZodOptional<zod.ZodString>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/list";
};
createProject: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
title: string;
content: any;
sourceTemplateId?: string | null | undefined;
titleEn?: string | undefined;
description?: string | undefined;
descriptionEn?: string | undefined;
resultUrl?: string | null | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
};
} : {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly title: zod.ZodString;
readonly content: zod.ZodAny;
readonly sourceTemplateId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly titleEn: zod.ZodOptional<zod.ZodString>;
readonly description: zod.ZodOptional<zod.ZodString>;
readonly descriptionEn: zod.ZodOptional<zod.ZodString>;
readonly resultUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
201: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/create";
};
getProject: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body?: undefined;
} & {
method?: "GET" | undefined;
} & {
query: {
id: string;
};
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
};
} : {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
}>;
options: {
method: "GET";
query: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/get";
};
updateProject: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
sourceTemplateId?: string | null | undefined;
title?: string | undefined;
titleEn?: string | undefined;
description?: string | undefined;
descriptionEn?: string | undefined;
resultUrl?: string | null | undefined;
content?: any;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
} | null;
} : {
userId: string;
title: string;
titleEn: string;
description: string;
descriptionEn: string;
content: any;
createdAt: Date;
updatedAt: Date;
id: string;
sourceTemplateId?: string | null | undefined;
resultUrl?: string | null | undefined;
} | null>;
options: {
method: "POST";
body: zod.ZodObject<{
readonly sourceTemplateId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly title: zod.ZodOptional<zod.ZodString>;
readonly titleEn: zod.ZodOptional<zod.ZodString>;
readonly description: zod.ZodOptional<zod.ZodString>;
readonly descriptionEn: zod.ZodOptional<zod.ZodString>;
readonly resultUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
readonly content: zod.ZodOptional<zod.ZodAny>;
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/update";
};
deleteProject: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
id: string;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
};
} : {
message: string;
}>;
options: {
method: "POST";
body: zod.ZodObject<{
id: zod.ZodString;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/delete";
};
transferProject: {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
targetUserEmail: string;
projectIds: string[];
mode?: "copy" | "transfer" | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: better_call.Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
message: string;
targetUserId: string;
targetUserEmail: string;
mode: "copy" | "transfer";
processedCount: number;
projectIds: string[];
};
} : {
message: string;
targetUserId: string;
targetUserEmail: string;
mode: "copy" | "transfer";
processedCount: number;
projectIds: string[];
}>;
options: {
method: "POST";
body: zod.ZodObject<{
targetUserEmail: zod.ZodEmail;
projectIds: zod.ZodArray<zod.ZodString>;
mode: zod.ZodDefault<zod.ZodOptional<zod.ZodEnum<{
copy: "copy";
transfer: "transfer";
}>>>;
}, better_auth.$strip>;
use: (((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
session: {
session: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record<string, any> & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>) | (<InputCtx extends better_call.MiddlewareInputContext<better_call.MiddlewareOptions>>(inputContext: InputCtx) => Promise<void>))[];
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
'application/json': {
schema: any;
};
};
};
};
};
};
} & {
use: any[];
};
path: "/loomart/project/transfer";
};
};
$Infer: {};
};
type LoomartType = ReturnType<typeof loomart>;
declare module 'better-auth' {
interface Context {
loomart?: LoomartOptions;
}
}
export { ac, contentadmin, defaultStatements, editor, getLoomartOptions, getZodSchemaFromModel, loomart, roles, superadmin, user };
export type { AigcModelInfo, AigcTaskResponse, AigcTaskStatus, FileUploadResponse, GeneratedUser, InferZodSchema, LoomartOptions, LoomartType, Statements, VideoCompressRequest, VideoCompressResponse };