@mulmoclaude/accounting-plugin 0.3.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.cjs CHANGED
@@ -1938,7 +1938,7 @@ async function handleOpenBook(rest) {
1938
1938
  };
1939
1939
  }
1940
1940
  async function handleGetReport(rest) {
1941
- const kind = String(rest.kind ?? "");
1941
+ const kind = typeof rest.kind === "string" ? rest.kind : "";
1942
1942
  const periodInput = rest.period;
1943
1943
  const bookId = rest.bookId;
1944
1944
  if (kind === "balance") {
@@ -1970,7 +1970,7 @@ var ACTION_HANDLERS = {
1970
1970
  [require_shared.ACCOUNTING_ACTIONS.getBooks]: () => listBooks(),
1971
1971
  [require_shared.ACCOUNTING_ACTIONS.createBook]: async (rest) => {
1972
1972
  const result = await createBook({
1973
- name: String(rest.name ?? ""),
1973
+ name: typeof rest.name === "string" ? rest.name : "",
1974
1974
  currency: typeof rest.currency === "string" ? rest.currency : void 0,
1975
1975
  country: typeof rest.country === "string" ? rest.country : void 0,
1976
1976
  fiscalYearEnd: rest.fiscalYearEnd
@@ -1982,7 +1982,7 @@ var ACTION_HANDLERS = {
1982
1982
  },
1983
1983
  [require_shared.ACCOUNTING_ACTIONS.updateBook]: async (rest) => {
1984
1984
  const result = await updateBook({
1985
- bookId: String(rest.bookId ?? ""),
1985
+ bookId: typeof rest.bookId === "string" ? rest.bookId : "",
1986
1986
  name: typeof rest.name === "string" ? rest.name : void 0,
1987
1987
  country: typeof rest.country === "string" ? rest.country : void 0,
1988
1988
  fiscalYearEnd: rest.fiscalYearEnd
@@ -1993,7 +1993,7 @@ var ACTION_HANDLERS = {
1993
1993
  };
1994
1994
  },
1995
1995
  [require_shared.ACCOUNTING_ACTIONS.deleteBook]: (rest) => deleteBook({
1996
- bookId: String(rest.bookId ?? ""),
1996
+ bookId: typeof rest.bookId === "string" ? rest.bookId : "",
1997
1997
  confirm: rest.confirm === true
1998
1998
  }),
1999
1999
  [require_shared.ACCOUNTING_ACTIONS.getAccounts]: (rest) => listAccounts({ bookId: rest.bookId }),
@@ -2007,7 +2007,7 @@ var ACTION_HANDLERS = {
2007
2007
  }),
2008
2008
  [require_shared.ACCOUNTING_ACTIONS.voidEntry]: (rest) => voidEntry({
2009
2009
  bookId: rest.bookId,
2010
- entryId: String(rest.entryId ?? ""),
2010
+ entryId: typeof rest.entryId === "string" ? rest.entryId : "",
2011
2011
  reason: rest.reason,
2012
2012
  voidDate: rest.voidDate
2013
2013
  }),
@@ -2020,7 +2020,7 @@ var ACTION_HANDLERS = {
2020
2020
  [require_shared.ACCOUNTING_ACTIONS.getOpeningBalances]: (rest) => getOpeningBalances({ bookId: rest.bookId }),
2021
2021
  [require_shared.ACCOUNTING_ACTIONS.setOpeningBalances]: (rest) => setOpeningBalances({
2022
2022
  bookId: rest.bookId,
2023
- asOfDate: String(rest.asOfDate ?? ""),
2023
+ asOfDate: typeof rest.asOfDate === "string" ? rest.asOfDate : "",
2024
2024
  lines: rest.lines ?? [],
2025
2025
  memo: rest.memo
2026
2026
  }),