+2
-0
@@ -314,2 +314,3 @@ import { OAuth as OAuth2 } from "oauth"; | ||
| categoryId: z8.ZodOptional<z8.ZodNumber>; | ||
| placeUid: z8.ZodOptional<z8.ZodString>; | ||
| comment: z8.ZodOptional<z8.ZodString>; | ||
@@ -616,2 +617,3 @@ }>; | ||
| categoryId: z10.ZodOptional<z10.ZodNumber>; | ||
| placeUid: z10.ZodOptional<z10.ZodString>; | ||
| comment: z10.ZodOptional<z10.ZodString>; | ||
@@ -618,0 +620,0 @@ }>; |
+16
-2
@@ -242,2 +242,3 @@ // src/schemas/account.ts | ||
| categoryId: z7.number().positive("categoryId must be a positive number").optional(), | ||
| placeUid: z7.string().optional(), | ||
| comment: z7.string().max(100, "comment must not exceed 100 characters").optional() | ||
@@ -462,2 +463,3 @@ }); | ||
| categoryId: z11.number().positive("categoryId must be a positive number").optional(), | ||
| placeUid: z11.string().optional(), | ||
| comment: z11.string().max(100, "comment must not exceed 100 characters").optional() | ||
@@ -579,3 +581,3 @@ }); | ||
| async update(id, params) { | ||
| const { amount, date, toAccountId, categoryId, comment } = UpdateIncomeParamsSchema.parse(params); | ||
| const { amount, date, toAccountId, categoryId, placeUid, comment } = UpdateIncomeParamsSchema.parse(params); | ||
| const body = { | ||
@@ -590,2 +592,4 @@ mapping: 1, | ||
| body.category_id = categoryId; | ||
| if (placeUid !== undefined) | ||
| body.place_uid = placeUid; | ||
| if (comment) | ||
@@ -688,3 +692,11 @@ body.comment = comment; | ||
| async update(id, params) { | ||
| const { amount, date, fromAccountId, genreId, categoryId, comment } = UpdatePaymentParamsSchema.parse(params); | ||
| const { | ||
| amount, | ||
| date, | ||
| fromAccountId, | ||
| genreId, | ||
| categoryId, | ||
| placeUid, | ||
| comment | ||
| } = UpdatePaymentParamsSchema.parse(params); | ||
| const body = { | ||
@@ -701,2 +713,4 @@ mapping: 1, | ||
| body.category_id = categoryId; | ||
| if (placeUid !== undefined) | ||
| body.place_uid = placeUid; | ||
| if (comment) | ||
@@ -703,0 +717,0 @@ body.comment = comment; |
+1
-1
| { | ||
| "name": "node-zaim", | ||
| "version": "0.1.1", | ||
| "version": "0.2.0", | ||
| "description": "Node.js client library for Zaim API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/ryohidaka/node-zaim#readme", |
+4
-3
@@ -134,2 +134,3 @@ # node-zaim | ||
| categoryId: 101, | ||
| placeUid: 'zm-12345', | ||
| comment: 'test', | ||
@@ -160,3 +161,3 @@ }); | ||
| date: '2026-02-04', | ||
| place: 'test' | ||
| place: 'test', | ||
| comment: 'test', | ||
@@ -176,3 +177,3 @@ }); | ||
| date: '2026-02-04', | ||
| place: 'test' | ||
| placeUid: 'zm-12345', | ||
| comment: 'test', | ||
@@ -203,3 +204,3 @@ }); | ||
| fromAccountId: 1, | ||
| toAccountId: 1 | ||
| toAccountId: 1, | ||
| comment: 'test', | ||
@@ -206,0 +207,0 @@ }); |
71224
0.54%2063
0.78%331
0.3%