import { r as __exportAll } from "./chunk-olfrzTEO.js";
import { B as lazy, H as number, I as _enum, J as datetime, L as any, R as array, U as object, V as literal, W as string, f as createAction } from "./dist-uUUuTqM0.js";
//#region document-models/account-transactions/v1/gen/schema/zod.ts
const isDefinedNonNullAny = (v) => v !== void 0 && v !== null;
const definedNonNullAnySchema = any().refine((v) => isDefinedNonNullAny(v));
const TransactionDirectionSchema = _enum(["INFLOW", "OUTFLOW"]);
const TransactionDirectionInputSchema = _enum(["INFLOW", "OUTFLOW"]);
function AccountSchema() {
	return object({
		__typename: literal("Account").optional(),
		KycAmlStatus: string().nullish(),
		account: string(),
		accountTransactionsId: string().nullish(),
		budgetPath: string().nullish(),
		chain: array(string()).nullish(),
		id: string(),
		name: string(),
		owners: array(string()).nullish(),
		type: string().nullish()
	});
}
function AccountTransactionsStateSchema() {
	return object({
		__typename: literal("AccountTransactionsState").optional(),
		account: lazy(() => AccountSchema()),
		budgets: array(lazy(() => BudgetSchema())),
		transactions: array(lazy(() => TransactionEntrySchema()))
	});
}
function AddBudgetInputSchema() {
	return object({
		id: string(),
		name: string().nullish()
	});
}
function AddTransactionInputSchema() {
	return object({
		accountingPeriod: string(),
		amount: object({
			unit: string(),
			value: string()
		}),
		blockNumber: number().nullish(),
		budget: string().nullish(),
		counterParty: string().regex(/^0x[a-fA-F0-9]{40}$/, { message: "Invalid Ethereum address format" }).nullish(),
		datetime: datetime(),
		direction: TransactionDirectionInputSchema,
		id: string(),
		token: string(),
		txHash: string(),
		uniqueId: string().nullish()
	});
}
function BudgetSchema() {
	return object({
		__typename: literal("Budget").optional(),
		id: string(),
		name: string().nullish()
	});
}
function DeleteBudgetInputSchema() {
	return object({ id: string() });
}
function DeleteTransactionInputSchema() {
	return object({ id: string() });
}
function SetAccountInputSchema() {
	return object({
		KycAmlStatus: string().nullish(),
		account: string(),
		accountTransactionsId: string().nullish(),
		budgetPath: string().nullish(),
		chain: array(string()).nullish(),
		id: string(),
		name: string(),
		owners: array(string()).nullish(),
		type: string().nullish()
	});
}
function TransactionDetailsSchema() {
	return object({
		__typename: literal("TransactionDetails").optional(),
		blockNumber: number().nullish(),
		token: string(),
		txHash: string(),
		uniqueId: string().nullish()
	});
}
function TransactionEntrySchema() {
	return object({
		__typename: literal("TransactionEntry").optional(),
		accountingPeriod: string(),
		amount: object({
			unit: string(),
			value: string()
		}),
		budget: string().nullish(),
		counterParty: string().regex(/^0x[a-fA-F0-9]{40}$/, { message: "Invalid Ethereum address format" }).nullish(),
		datetime: datetime(),
		details: lazy(() => TransactionDetailsSchema()),
		direction: TransactionDirectionSchema,
		id: string()
	});
}
function UpdateBudgetInputSchema() {
	return object({
		id: string(),
		name: string().nullish()
	});
}
function UpdateTransactionInputSchema() {
	return object({
		accountingPeriod: string().nullish(),
		amount: object({
			unit: string(),
			value: string()
		}).nullish(),
		blockNumber: number().nullish(),
		budget: string().nullish(),
		counterParty: string().regex(/^0x[a-fA-F0-9]{40}$/, { message: "Invalid Ethereum address format" }).nullish(),
		datetime: datetime().nullish(),
		direction: TransactionDirectionInputSchema.nullish(),
		id: string(),
		token: string().nullish(),
		txHash: string().nullish(),
		uniqueId: string().nullish()
	});
}
function UpdateTransactionPeriodInputSchema() {
	return object({
		accountingPeriod: string(),
		id: string()
	});
}
//#endregion
//#region document-models/account-transactions/v1/gen/account/creators.ts
var creators_exports$2 = /* @__PURE__ */ __exportAll({ setAccount: () => setAccount });
const setAccount = (input) => createAction("SET_ACCOUNT", { ...input }, void 0, SetAccountInputSchema, "global");
//#endregion
//#region document-models/account-transactions/v1/gen/transactions/creators.ts
var creators_exports$1 = /* @__PURE__ */ __exportAll({
	addTransaction: () => addTransaction,
	deleteTransaction: () => deleteTransaction,
	updateTransaction: () => updateTransaction,
	updateTransactionPeriod: () => updateTransactionPeriod
});
const addTransaction = (input) => createAction("ADD_TRANSACTION", { ...input }, void 0, AddTransactionInputSchema, "global");
const updateTransaction = (input) => createAction("UPDATE_TRANSACTION", { ...input }, void 0, UpdateTransactionInputSchema, "global");
const deleteTransaction = (input) => createAction("DELETE_TRANSACTION", { ...input }, void 0, DeleteTransactionInputSchema, "global");
const updateTransactionPeriod = (input) => createAction("UPDATE_TRANSACTION_PERIOD", { ...input }, void 0, UpdateTransactionPeriodInputSchema, "global");
//#endregion
//#region document-models/account-transactions/v1/gen/budgets/creators.ts
var creators_exports = /* @__PURE__ */ __exportAll({
	addBudget: () => addBudget,
	deleteBudget: () => deleteBudget,
	updateBudget: () => updateBudget
});
const addBudget = (input) => createAction("ADD_BUDGET", { ...input }, void 0, AddBudgetInputSchema, "global");
const updateBudget = (input) => createAction("UPDATE_BUDGET", { ...input }, void 0, UpdateBudgetInputSchema, "global");
const deleteBudget = (input) => createAction("DELETE_BUDGET", { ...input }, void 0, DeleteBudgetInputSchema, "global");
//#endregion
export { TransactionEntrySchema as C, definedNonNullAnySchema as D, UpdateTransactionPeriodInputSchema as E, isDefinedNonNullAny as O, TransactionDirectionSchema as S, UpdateTransactionInputSchema as T, DeleteBudgetInputSchema as _, addTransaction as a, TransactionDetailsSchema as b, updateTransaction as c, setAccount as d, AccountSchema as f, BudgetSchema as g, AddTransactionInputSchema as h, updateBudget as i, updateTransactionPeriod as l, AddBudgetInputSchema as m, creators_exports as n, creators_exports$1 as o, AccountTransactionsStateSchema as p, deleteBudget as r, deleteTransaction as s, addBudget as t, creators_exports$2 as u, DeleteTransactionInputSchema as v, UpdateBudgetInputSchema as w, TransactionDirectionInputSchema as x, SetAccountInputSchema as y };

//# sourceMappingURL=creators-1UUtt16O.js.map