@keystrokehq/splitwise 0.1.2 → 0.1.4
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/actions/add-friend.cjs +5 -5
- package/dist/actions/add-friend.cjs.map +1 -1
- package/dist/actions/add-friend.d.cts +19 -7
- package/dist/actions/add-friend.d.mts +19 -7
- package/dist/actions/add-friend.mjs +5 -5
- package/dist/actions/add-friend.mjs.map +1 -1
- package/dist/actions/add-user-to-group.cjs +4 -4
- package/dist/actions/add-user-to-group.cjs.map +1 -1
- package/dist/actions/add-user-to-group.d.cts +17 -5
- package/dist/actions/add-user-to-group.d.mts +17 -5
- package/dist/actions/add-user-to-group.mjs +4 -4
- package/dist/actions/add-user-to-group.mjs.map +1 -1
- package/dist/actions/create-comment.cjs +3 -3
- package/dist/actions/create-comment.cjs.map +1 -1
- package/dist/actions/create-comment.d.cts +16 -4
- package/dist/actions/create-comment.d.mts +16 -4
- package/dist/actions/create-comment.mjs +3 -3
- package/dist/actions/create-comment.mjs.map +1 -1
- package/dist/actions/create-expense.cjs +10 -10
- package/dist/actions/create-expense.cjs.map +1 -1
- package/dist/actions/create-expense.d.cts +30 -17
- package/dist/actions/create-expense.d.mts +30 -17
- package/dist/actions/create-expense.mjs +10 -10
- package/dist/actions/create-expense.mjs.map +1 -1
- package/dist/actions/create-friends.cjs +6 -6
- package/dist/actions/create-friends.cjs.map +1 -1
- package/dist/actions/create-friends.d.cts +21 -8
- package/dist/actions/create-friends.d.mts +21 -8
- package/dist/actions/create-friends.mjs +6 -6
- package/dist/actions/create-friends.mjs.map +1 -1
- package/dist/actions/create-group.cjs +8 -8
- package/dist/actions/create-group.cjs.map +1 -1
- package/dist/actions/create-group.d.cts +22 -9
- package/dist/actions/create-group.d.mts +22 -9
- package/dist/actions/create-group.mjs +8 -8
- package/dist/actions/create-group.mjs.map +1 -1
- package/dist/actions/delete-comment.cjs +4 -4
- package/dist/actions/delete-comment.cjs.map +1 -1
- package/dist/actions/delete-comment.d.cts +17 -5
- package/dist/actions/delete-comment.d.mts +17 -5
- package/dist/actions/delete-comment.mjs +4 -4
- package/dist/actions/delete-comment.mjs.map +1 -1
- package/dist/actions/delete-expense.cjs +1 -1
- package/dist/actions/delete-expense.cjs.map +1 -1
- package/dist/actions/delete-expense.d.cts +14 -2
- package/dist/actions/delete-expense.d.mts +14 -2
- package/dist/actions/delete-expense.mjs +1 -1
- package/dist/actions/delete-expense.mjs.map +1 -1
- package/dist/actions/delete-friend.cjs +1 -1
- package/dist/actions/delete-friend.cjs.map +1 -1
- package/dist/actions/delete-friend.d.cts +14 -2
- package/dist/actions/delete-friend.d.mts +14 -2
- package/dist/actions/delete-friend.mjs +1 -1
- package/dist/actions/delete-friend.mjs.map +1 -1
- package/dist/actions/delete-group.cjs +1 -1
- package/dist/actions/delete-group.cjs.map +1 -1
- package/dist/actions/delete-group.d.cts +14 -2
- package/dist/actions/delete-group.d.mts +14 -2
- package/dist/actions/delete-group.mjs +1 -1
- package/dist/actions/delete-group.mjs.map +1 -1
- package/dist/actions/get-categories.cjs +3 -3
- package/dist/actions/get-categories.cjs.map +1 -1
- package/dist/actions/get-categories.d.cts +16 -4
- package/dist/actions/get-categories.d.cts.map +1 -1
- package/dist/actions/get-categories.d.mts +16 -4
- package/dist/actions/get-categories.d.mts.map +1 -1
- package/dist/actions/get-categories.mjs +3 -3
- package/dist/actions/get-categories.mjs.map +1 -1
- package/dist/actions/get-comments.cjs +4 -4
- package/dist/actions/get-comments.cjs.map +1 -1
- package/dist/actions/get-comments.d.cts +17 -5
- package/dist/actions/get-comments.d.mts +17 -5
- package/dist/actions/get-comments.mjs +4 -4
- package/dist/actions/get-comments.mjs.map +1 -1
- package/dist/actions/get-currencies.cjs +2 -2
- package/dist/actions/get-currencies.cjs.map +1 -1
- package/dist/actions/get-currencies.d.cts +15 -3
- package/dist/actions/get-currencies.d.cts.map +1 -1
- package/dist/actions/get-currencies.d.mts +15 -3
- package/dist/actions/get-currencies.d.mts.map +1 -1
- package/dist/actions/get-currencies.mjs +2 -2
- package/dist/actions/get-currencies.mjs.map +1 -1
- package/dist/actions/get-current-user.cjs +4 -4
- package/dist/actions/get-current-user.cjs.map +1 -1
- package/dist/actions/get-current-user.d.cts +17 -5
- package/dist/actions/get-current-user.d.cts.map +1 -1
- package/dist/actions/get-current-user.d.mts +17 -5
- package/dist/actions/get-current-user.d.mts.map +1 -1
- package/dist/actions/get-current-user.mjs +4 -4
- package/dist/actions/get-current-user.mjs.map +1 -1
- package/dist/actions/get-expense.cjs +9 -9
- package/dist/actions/get-expense.cjs.map +1 -1
- package/dist/actions/get-expense.d.cts +30 -18
- package/dist/actions/get-expense.d.mts +30 -18
- package/dist/actions/get-expense.mjs +9 -9
- package/dist/actions/get-expense.mjs.map +1 -1
- package/dist/actions/get-expenses.cjs +9 -9
- package/dist/actions/get-expenses.cjs.map +1 -1
- package/dist/actions/get-expenses.d.cts +30 -18
- package/dist/actions/get-expenses.d.mts +30 -18
- package/dist/actions/get-expenses.mjs +9 -9
- package/dist/actions/get-expenses.mjs.map +1 -1
- package/dist/actions/get-friend.cjs +5 -5
- package/dist/actions/get-friend.cjs.map +1 -1
- package/dist/actions/get-friend.d.cts +19 -7
- package/dist/actions/get-friend.d.mts +19 -7
- package/dist/actions/get-friend.mjs +5 -5
- package/dist/actions/get-friend.mjs.map +1 -1
- package/dist/actions/get-friends.cjs +5 -5
- package/dist/actions/get-friends.cjs.map +1 -1
- package/dist/actions/get-friends.d.cts +19 -7
- package/dist/actions/get-friends.d.cts.map +1 -1
- package/dist/actions/get-friends.d.mts +19 -7
- package/dist/actions/get-friends.d.mts.map +1 -1
- package/dist/actions/get-friends.mjs +5 -5
- package/dist/actions/get-friends.mjs.map +1 -1
- package/dist/actions/get-group.cjs +9 -9
- package/dist/actions/get-group.cjs.map +1 -1
- package/dist/actions/get-group.d.cts +23 -11
- package/dist/actions/get-group.d.mts +23 -11
- package/dist/actions/get-group.mjs +9 -9
- package/dist/actions/get-group.mjs.map +1 -1
- package/dist/actions/get-groups.cjs +9 -9
- package/dist/actions/get-groups.cjs.map +1 -1
- package/dist/actions/get-groups.d.cts +23 -11
- package/dist/actions/get-groups.d.cts.map +1 -1
- package/dist/actions/get-groups.d.mts +23 -11
- package/dist/actions/get-groups.d.mts.map +1 -1
- package/dist/actions/get-groups.mjs +9 -9
- package/dist/actions/get-groups.mjs.map +1 -1
- package/dist/actions/get-notifications.cjs +3 -3
- package/dist/actions/get-notifications.cjs.map +1 -1
- package/dist/actions/get-notifications.d.cts +16 -4
- package/dist/actions/get-notifications.d.mts +16 -4
- package/dist/actions/get-notifications.mjs +3 -3
- package/dist/actions/get-notifications.mjs.map +1 -1
- package/dist/actions/get-user.cjs +3 -3
- package/dist/actions/get-user.cjs.map +1 -1
- package/dist/actions/get-user.d.cts +16 -4
- package/dist/actions/get-user.d.mts +16 -4
- package/dist/actions/get-user.mjs +3 -3
- package/dist/actions/get-user.mjs.map +1 -1
- package/dist/actions/remove-user-from-group.cjs +1 -1
- package/dist/actions/remove-user-from-group.cjs.map +1 -1
- package/dist/actions/remove-user-from-group.d.cts +14 -2
- package/dist/actions/remove-user-from-group.d.mts +14 -2
- package/dist/actions/remove-user-from-group.mjs +1 -1
- package/dist/actions/remove-user-from-group.mjs.map +1 -1
- package/dist/actions/undelete-expense.cjs +1 -1
- package/dist/actions/undelete-expense.cjs.map +1 -1
- package/dist/actions/undelete-expense.d.cts +14 -2
- package/dist/actions/undelete-expense.d.mts +14 -2
- package/dist/actions/undelete-expense.mjs +1 -1
- package/dist/actions/undelete-expense.mjs.map +1 -1
- package/dist/actions/undelete-group.cjs +1 -1
- package/dist/actions/undelete-group.cjs.map +1 -1
- package/dist/actions/undelete-group.d.cts +14 -2
- package/dist/actions/undelete-group.d.mts +14 -2
- package/dist/actions/undelete-group.mjs +1 -1
- package/dist/actions/undelete-group.mjs.map +1 -1
- package/dist/actions/update-expense.cjs +2 -2
- package/dist/actions/update-expense.cjs.map +1 -1
- package/dist/actions/update-expense.d.cts +16 -3
- package/dist/actions/update-expense.d.mts +16 -3
- package/dist/actions/update-expense.mjs +2 -2
- package/dist/actions/update-expense.mjs.map +1 -1
- package/dist/actions/update-user.cjs +4 -4
- package/dist/actions/update-user.cjs.map +1 -1
- package/dist/actions/update-user.d.cts +17 -5
- package/dist/actions/update-user.d.mts +17 -5
- package/dist/actions/update-user.mjs +4 -4
- package/dist/actions/update-user.mjs.map +1 -1
- package/dist/app.cjs +5 -2
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +9 -1
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +9 -1
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +3 -1
- package/dist/app.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ const SplitwiseCreateExpenseInput = zod.z.object({
|
|
|
11
11
|
first_name: zod.z.string().describe("First name (required when adding new users without user_id)").optional(),
|
|
12
12
|
owed_share: zod.z.string().describe("Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)"),
|
|
13
13
|
paid_share: zod.z.string().describe("Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)")
|
|
14
|
-
}).describe("Represents a participant's share in an expense, specifying what they paid and what they owe.\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).")).describe("List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').").optional(),
|
|
14
|
+
}).passthrough().describe("Represents a participant's share in an expense, specifying what they paid and what they owe.\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).")).describe("List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').").optional(),
|
|
15
15
|
details: zod.z.string().describe("Additional notes or details about the expense").optional(),
|
|
16
16
|
group_id: zod.z.number().int().describe("ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)"),
|
|
17
17
|
category_id: zod.z.number().int().describe("Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'").optional(),
|
|
@@ -26,34 +26,34 @@ const SplitwiseCreateExpenseInput = zod.z.object({
|
|
|
26
26
|
"yearly"
|
|
27
27
|
]).describe("How often this expense repeats. Use 'never' or omit for one-time expenses").optional()
|
|
28
28
|
}).describe("Request model for creating a new expense.\nExactly one of split_equally or users must be provided.");
|
|
29
|
-
const SplitwiseCreateExpense_PictureSchema = zod.z.object({ medium: zod.z.string().describe("Medium-sized profile picture URL").nullable().optional() }).describe("Profile picture URLs.");
|
|
29
|
+
const SplitwiseCreateExpense_PictureSchema = zod.z.object({ medium: zod.z.string().describe("Medium-sized profile picture URL").nullable().optional() }).passthrough().describe("Profile picture URLs.");
|
|
30
30
|
const SplitwiseCreateExpense_UserInfoSchema = zod.z.object({
|
|
31
31
|
id: zod.z.number().int().describe("User ID").nullable(),
|
|
32
32
|
picture: SplitwiseCreateExpense_PictureSchema.nullable(),
|
|
33
33
|
last_name: zod.z.string().describe("User's last name").nullable().optional(),
|
|
34
34
|
first_name: zod.z.string().describe("User's first name").nullable(),
|
|
35
35
|
custom_picture: zod.z.boolean().describe("Whether the user has a custom picture").nullable().optional()
|
|
36
|
-
}).describe("Basic user information within an expense.");
|
|
36
|
+
}).passthrough().describe("Basic user information within an expense.");
|
|
37
37
|
const SplitwiseCreateExpense_ExpenseUserSchema = zod.z.object({
|
|
38
38
|
user: SplitwiseCreateExpense_UserInfoSchema.nullable(),
|
|
39
39
|
user_id: zod.z.number().int().describe("User ID").nullable(),
|
|
40
40
|
owed_share: zod.z.string().describe("Amount this user owes").nullable(),
|
|
41
41
|
paid_share: zod.z.string().describe("Amount this user paid").nullable(),
|
|
42
42
|
net_balance: zod.z.string().describe("Net balance for this user in the expense").nullable()
|
|
43
|
-
}).describe("User's share details in an expense.");
|
|
43
|
+
}).passthrough().describe("User's share details in an expense.");
|
|
44
44
|
const SplitwiseCreateExpense_ReceiptSchema = zod.z.object({
|
|
45
45
|
large: zod.z.string().describe("Large receipt image URL").nullable().optional(),
|
|
46
46
|
original: zod.z.string().describe("Original receipt image URL").nullable().optional()
|
|
47
|
-
}).describe("Receipt image URLs.");
|
|
47
|
+
}).passthrough().describe("Receipt image URLs.");
|
|
48
48
|
const SplitwiseCreateExpense_CategorySchema = zod.z.object({
|
|
49
49
|
id: zod.z.number().int().describe("Category ID").nullable(),
|
|
50
50
|
name: zod.z.string().describe("Category name").nullable()
|
|
51
|
-
}).describe("Expense category information.");
|
|
51
|
+
}).passthrough().describe("Expense category information.");
|
|
52
52
|
const SplitwiseCreateExpense_RepaymentSchema = zod.z.object({
|
|
53
53
|
to: zod.z.number().int().describe("User ID who is owed money").nullable(),
|
|
54
54
|
from: zod.z.number().int().describe("User ID who owes money").nullable(),
|
|
55
55
|
amount: zod.z.string().describe("Amount to be repaid").nullable()
|
|
56
|
-
}).describe("Repayment information showing who owes whom.");
|
|
56
|
+
}).passthrough().describe("Repayment information showing who owes whom.");
|
|
57
57
|
const SplitwiseCreateExpense_ExpenseSchema = zod.z.object({
|
|
58
58
|
id: zod.z.number().int().describe("Unique expense ID").nullable(),
|
|
59
59
|
cost: zod.z.string().describe("Total cost of the expense").nullable(),
|
|
@@ -85,11 +85,11 @@ const SplitwiseCreateExpense_ExpenseSchema = zod.z.object({
|
|
|
85
85
|
transaction_status: zod.z.string().describe("Transaction status").nullable().optional(),
|
|
86
86
|
transaction_confirmed: zod.z.boolean().describe("Whether the transaction is confirmed").nullable(),
|
|
87
87
|
email_reminder_in_advance: zod.z.number().int().describe("Days in advance for email reminder").nullable()
|
|
88
|
-
}).describe("Complete expense object with all details.");
|
|
88
|
+
}).passthrough().describe("Complete expense object with all details.");
|
|
89
89
|
const SplitwiseCreateExpenseOutput = zod.z.object({
|
|
90
|
-
errors: zod.z.
|
|
90
|
+
errors: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Errors returned by the API; empty if none"),
|
|
91
91
|
expenses: zod.z.array(SplitwiseCreateExpense_ExpenseSchema).describe("List of created expense objects")
|
|
92
|
-
}).describe("Response model for create_expense action.");
|
|
92
|
+
}).passthrough().describe("Response model for create_expense action.");
|
|
93
93
|
const splitwiseCreateExpense = require_action.action("SPLITWISE_CREATE_EXPENSE", {
|
|
94
94
|
slug: "splitwise-create-expense",
|
|
95
95
|
name: "Create Expense",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-expense.cjs","names":["z","action"],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateExpenseInput = z.object({\n cost: z.string().describe(\"Total cost as string decimal (up to 2 decimal places)\"),\n date: z.string().describe(\"Date when the expense occurred (ISO 8601 format). Defaults to current time if omitted\").optional(),\n users: z.array(z.object({\n email: z.string().describe(\"Email address (required when adding new users without user_id)\").optional(),\n user_id: z.number().int().describe(\"Splitwise user ID of an existing friend or group member\").optional(),\n last_name: z.string().describe(\"Last name (required when adding new users without user_id)\").optional(),\n first_name: z.string().describe(\"First name (required when adding new users without user_id)\").optional(),\n owed_share: z.string().describe(\"Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)\"),\n paid_share: z.string().describe(\"Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)\"),\n}).describe(\"Represents a participant's share in an expense, specifying what they paid and what they owe.\\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).\")).describe(\"List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').\").optional(),\n details: z.string().describe(\"Additional notes or details about the expense\").optional(),\n group_id: z.number().int().describe(\"ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)\"),\n category_id: z.number().int().describe(\"Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'\").optional(),\n description: z.string().describe(\"Brief description of what the expense is for\"),\n currency_code: z.string().describe(\"3-letter ISO currency code (e.g., USD, EUR, GBP). Defaults to user's default currency\").optional(),\n split_equally: z.boolean().describe(\"Set to true to split cost equally. When group_id=0, you must also provide users list to specify participants\").optional(),\n repeat_interval: z.enum([\"never\", \"weekly\", \"fortnightly\", \"monthly\", \"yearly\"]).describe(\"How often this expense repeats. Use 'never' or omit for one-time expenses\").optional(),\n}).describe(\"Request model for creating a new expense.\\nExactly one of split_equally or users must be provided.\");\nconst SplitwiseCreateExpense_PictureSchema = z.object({\n medium: z.string().describe(\"Medium-sized profile picture URL\").nullable().optional(),\n}).describe(\"Profile picture URLs.\");\nconst SplitwiseCreateExpense_UserInfoSchema = z.object({\n id: z.number().int().describe(\"User ID\").nullable(),\n picture: SplitwiseCreateExpense_PictureSchema.nullable(),\n last_name: z.string().describe(\"User's last name\").nullable().optional(),\n first_name: z.string().describe(\"User's first name\").nullable(),\n custom_picture: z.boolean().describe(\"Whether the user has a custom picture\").nullable().optional(),\n}).describe(\"Basic user information within an expense.\");\nconst SplitwiseCreateExpense_ExpenseUserSchema = z.object({\n user: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n user_id: z.number().int().describe(\"User ID\").nullable(),\n owed_share: z.string().describe(\"Amount this user owes\").nullable(),\n paid_share: z.string().describe(\"Amount this user paid\").nullable(),\n net_balance: z.string().describe(\"Net balance for this user in the expense\").nullable(),\n}).describe(\"User's share details in an expense.\");\nconst SplitwiseCreateExpense_ReceiptSchema = z.object({\n large: z.string().describe(\"Large receipt image URL\").nullable().optional(),\n original: z.string().describe(\"Original receipt image URL\").nullable().optional(),\n}).describe(\"Receipt image URLs.\");\nconst SplitwiseCreateExpense_CategorySchema = z.object({\n id: z.number().int().describe(\"Category ID\").nullable(),\n name: z.string().describe(\"Category name\").nullable(),\n}).describe(\"Expense category information.\");\nconst SplitwiseCreateExpense_RepaymentSchema = z.object({\n to: z.number().int().describe(\"User ID who is owed money\").nullable(),\n from: z.number().int().describe(\"User ID who owes money\").nullable(),\n amount: z.string().describe(\"Amount to be repaid\").nullable(),\n}).describe(\"Repayment information showing who owes whom.\");\nconst SplitwiseCreateExpense_ExpenseSchema = z.object({\n id: z.number().int().describe(\"Unique expense ID\").nullable(),\n cost: z.string().describe(\"Total cost of the expense\").nullable(),\n date: z.string().describe(\"Date the expense occurred (ISO 8601)\").nullable(),\n users: z.array(SplitwiseCreateExpense_ExpenseUserSchema).describe(\"List of users involved in this expense with their shares\"),\n details: z.string().describe(\"Additional details or notes\").nullable().optional(),\n payment: z.boolean().describe(\"Whether this is a payment (vs. an expense)\").nullable(),\n receipt: SplitwiseCreateExpense_ReceiptSchema.nullable(),\n repeats: z.boolean().describe(\"Whether this expense repeats\").nullable(),\n category: SplitwiseCreateExpense_CategorySchema.nullable(),\n group_id: z.number().int().describe(\"Group ID, null if not in a group\").nullable().optional(),\n created_at: z.string().describe(\"Date the expense was created (ISO 8601)\").nullable(),\n created_by: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n deleted_at: z.string().describe(\"Date the expense was deleted\").nullable().optional(),\n deleted_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n repayments: z.array(SplitwiseCreateExpense_RepaymentSchema).describe(\"List of repayments required to settle this expense\"),\n updated_at: z.string().describe(\"Date the expense was last updated (ISO 8601)\").nullable(),\n updated_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n description: z.string().describe(\"Expense description\").nullable(),\n next_repeat: z.string().describe(\"Date of next repeat\").nullable().optional(),\n currency_code: z.string().describe(\"Currency code (e.g., 'USD')\").nullable(),\n comments_count: z.number().int().describe(\"Number of comments on this expense\").nullable(),\n email_reminder: z.boolean().describe(\"Whether email reminders are enabled\").nullable(),\n transaction_id: z.string().describe(\"External transaction ID\").nullable().optional(),\n creation_method: z.string().describe(\"How the expense was created\").nullable().optional(),\n repeat_interval: z.string().describe(\"Repeat interval if applicable\").nullable().optional(),\n expense_bundle_id: z.number().int().describe(\"Bundle ID if part of a recurring expense\").nullable().optional(),\n transaction_method: z.string().describe(\"Transaction method (e.g., 'offline')\").nullable(),\n transaction_status: z.string().describe(\"Transaction status\").nullable().optional(),\n transaction_confirmed: z.boolean().describe(\"Whether the transaction is confirmed\").nullable(),\n email_reminder_in_advance: z.number().int().describe(\"Days in advance for email reminder\").nullable(),\n}).describe(\"Complete expense object with all details.\");\nexport const SplitwiseCreateExpenseOutput = z.object({\n errors: z.object({}).describe(\"Errors returned by the API; empty if none\"),\n expenses: z.array(SplitwiseCreateExpense_ExpenseSchema).describe(\"List of created expense objects\"),\n}).describe(\"Response model for create_expense action.\");\n\nexport const splitwiseCreateExpense = action(\"SPLITWISE_CREATE_EXPENSE\", {\n slug: \"splitwise-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new Splitwise expense. Use when you need to record a payment or bill in a group or between users. Provide exactly one of split_equally or users for shares — supplying both or neither causes a validation error and no expense is created.\",\n input: SplitwiseCreateExpenseInput,\n output: SplitwiseCreateExpenseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACjF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS;CAC5H,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EACtG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EACvG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;EACtG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EACxG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wGAAwG;EACxI,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS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CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC7F,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;AACtG,CAAC,CAAC,CAAC,SAAS,2CAA2C;AACvD,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,2CAA2C;CACzE,UAAUA,IAAAA,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,iCAAiC;AACpG,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-expense.cjs","names":["z","action"],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateExpenseInput = z.object({\n cost: z.string().describe(\"Total cost as string decimal (up to 2 decimal places)\"),\n date: z.string().describe(\"Date when the expense occurred (ISO 8601 format). Defaults to current time if omitted\").optional(),\n users: z.array(z.object({\n email: z.string().describe(\"Email address (required when adding new users without user_id)\").optional(),\n user_id: z.number().int().describe(\"Splitwise user ID of an existing friend or group member\").optional(),\n last_name: z.string().describe(\"Last name (required when adding new users without user_id)\").optional(),\n first_name: z.string().describe(\"First name (required when adding new users without user_id)\").optional(),\n owed_share: z.string().describe(\"Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)\"),\n paid_share: z.string().describe(\"Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)\"),\n}).passthrough().describe(\"Represents a participant's share in an expense, specifying what they paid and what they owe.\\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).\")).describe(\"List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').\").optional(),\n details: z.string().describe(\"Additional notes or details about the expense\").optional(),\n group_id: z.number().int().describe(\"ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)\"),\n category_id: z.number().int().describe(\"Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'\").optional(),\n description: z.string().describe(\"Brief description of what the expense is for\"),\n currency_code: z.string().describe(\"3-letter ISO currency code (e.g., USD, EUR, GBP). Defaults to user's default currency\").optional(),\n split_equally: z.boolean().describe(\"Set to true to split cost equally. When group_id=0, you must also provide users list to specify participants\").optional(),\n repeat_interval: z.enum([\"never\", \"weekly\", \"fortnightly\", \"monthly\", \"yearly\"]).describe(\"How often this expense repeats. Use 'never' or omit for one-time expenses\").optional(),\n}).describe(\"Request model for creating a new expense.\\nExactly one of split_equally or users must be provided.\");\nconst SplitwiseCreateExpense_PictureSchema = z.object({\n medium: z.string().describe(\"Medium-sized profile picture URL\").nullable().optional(),\n}).passthrough().describe(\"Profile picture URLs.\");\nconst SplitwiseCreateExpense_UserInfoSchema = z.object({\n id: z.number().int().describe(\"User ID\").nullable(),\n picture: SplitwiseCreateExpense_PictureSchema.nullable(),\n last_name: z.string().describe(\"User's last name\").nullable().optional(),\n first_name: z.string().describe(\"User's first name\").nullable(),\n custom_picture: z.boolean().describe(\"Whether the user has a custom picture\").nullable().optional(),\n}).passthrough().describe(\"Basic user information within an expense.\");\nconst SplitwiseCreateExpense_ExpenseUserSchema = z.object({\n user: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n user_id: z.number().int().describe(\"User ID\").nullable(),\n owed_share: z.string().describe(\"Amount this user owes\").nullable(),\n paid_share: z.string().describe(\"Amount this user paid\").nullable(),\n net_balance: z.string().describe(\"Net balance for this user in the expense\").nullable(),\n}).passthrough().describe(\"User's share details in an expense.\");\nconst SplitwiseCreateExpense_ReceiptSchema = z.object({\n large: z.string().describe(\"Large receipt image URL\").nullable().optional(),\n original: z.string().describe(\"Original receipt image URL\").nullable().optional(),\n}).passthrough().describe(\"Receipt image URLs.\");\nconst SplitwiseCreateExpense_CategorySchema = z.object({\n id: z.number().int().describe(\"Category ID\").nullable(),\n name: z.string().describe(\"Category name\").nullable(),\n}).passthrough().describe(\"Expense category information.\");\nconst SplitwiseCreateExpense_RepaymentSchema = z.object({\n to: z.number().int().describe(\"User ID who is owed money\").nullable(),\n from: z.number().int().describe(\"User ID who owes money\").nullable(),\n amount: z.string().describe(\"Amount to be repaid\").nullable(),\n}).passthrough().describe(\"Repayment information showing who owes whom.\");\nconst SplitwiseCreateExpense_ExpenseSchema = z.object({\n id: z.number().int().describe(\"Unique expense ID\").nullable(),\n cost: z.string().describe(\"Total cost of the expense\").nullable(),\n date: z.string().describe(\"Date the expense occurred (ISO 8601)\").nullable(),\n users: z.array(SplitwiseCreateExpense_ExpenseUserSchema).describe(\"List of users involved in this expense with their shares\"),\n details: z.string().describe(\"Additional details or notes\").nullable().optional(),\n payment: z.boolean().describe(\"Whether this is a payment (vs. an expense)\").nullable(),\n receipt: SplitwiseCreateExpense_ReceiptSchema.nullable(),\n repeats: z.boolean().describe(\"Whether this expense repeats\").nullable(),\n category: SplitwiseCreateExpense_CategorySchema.nullable(),\n group_id: z.number().int().describe(\"Group ID, null if not in a group\").nullable().optional(),\n created_at: z.string().describe(\"Date the expense was created (ISO 8601)\").nullable(),\n created_by: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n deleted_at: z.string().describe(\"Date the expense was deleted\").nullable().optional(),\n deleted_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n repayments: z.array(SplitwiseCreateExpense_RepaymentSchema).describe(\"List of repayments required to settle this expense\"),\n updated_at: z.string().describe(\"Date the expense was last updated (ISO 8601)\").nullable(),\n updated_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n description: z.string().describe(\"Expense description\").nullable(),\n next_repeat: z.string().describe(\"Date of next repeat\").nullable().optional(),\n currency_code: z.string().describe(\"Currency code (e.g., 'USD')\").nullable(),\n comments_count: z.number().int().describe(\"Number of comments on this expense\").nullable(),\n email_reminder: z.boolean().describe(\"Whether email reminders are enabled\").nullable(),\n transaction_id: z.string().describe(\"External transaction ID\").nullable().optional(),\n creation_method: z.string().describe(\"How the expense was created\").nullable().optional(),\n repeat_interval: z.string().describe(\"Repeat interval if applicable\").nullable().optional(),\n expense_bundle_id: z.number().int().describe(\"Bundle ID if part of a recurring expense\").nullable().optional(),\n transaction_method: z.string().describe(\"Transaction method (e.g., 'offline')\").nullable(),\n transaction_status: z.string().describe(\"Transaction status\").nullable().optional(),\n transaction_confirmed: z.boolean().describe(\"Whether the transaction is confirmed\").nullable(),\n email_reminder_in_advance: z.number().int().describe(\"Days in advance for email reminder\").nullable(),\n}).passthrough().describe(\"Complete expense object with all details.\");\nexport const SplitwiseCreateExpenseOutput = z.object({\n errors: z.record(z.string(), z.unknown()).describe(\"Errors returned by the API; empty if none\"),\n expenses: z.array(SplitwiseCreateExpense_ExpenseSchema).describe(\"List of created expense objects\"),\n}).passthrough().describe(\"Response model for create_expense action.\");\n\nexport const splitwiseCreateExpense = action(\"SPLITWISE_CREATE_EXPENSE\", {\n slug: \"splitwise-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new Splitwise expense. Use when you need to record a payment or bill in a group or between users. Provide exactly one of split_equally or users for shares — supplying both or neither causes a validation error and no expense is created.\",\n input: SplitwiseCreateExpenseInput,\n output: SplitwiseCreateExpenseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACjF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS;CAC5H,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EACtG,SAASA,IAAA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.$
|
|
14
|
+
}, z.core.$loose>>>;
|
|
15
15
|
details: z.ZodOptional<z.ZodString>;
|
|
16
16
|
group_id: z.ZodNumber;
|
|
17
17
|
category_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -27,7 +27,7 @@ declare const SplitwiseCreateExpenseInput: z.ZodObject<{
|
|
|
27
27
|
}>>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
30
|
-
errors: z.
|
|
30
|
+
errors: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
31
31
|
expenses: z.ZodArray<z.ZodObject<{
|
|
32
32
|
id: z.ZodNullable<z.ZodNumber>;
|
|
33
33
|
cost: z.ZodNullable<z.ZodString>;
|
|
@@ -37,63 +37,63 @@ declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
|
37
37
|
id: z.ZodNullable<z.ZodNumber>;
|
|
38
38
|
picture: z.ZodNullable<z.ZodObject<{
|
|
39
39
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
-
}, z.core.$
|
|
40
|
+
}, z.core.$loose>>;
|
|
41
41
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
42
|
first_name: z.ZodNullable<z.ZodString>;
|
|
43
43
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
44
|
-
}, z.core.$
|
|
44
|
+
}, z.core.$loose>>;
|
|
45
45
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
46
46
|
owed_share: z.ZodNullable<z.ZodString>;
|
|
47
47
|
paid_share: z.ZodNullable<z.ZodString>;
|
|
48
48
|
net_balance: z.ZodNullable<z.ZodString>;
|
|
49
|
-
}, z.core.$
|
|
49
|
+
}, z.core.$loose>>;
|
|
50
50
|
details: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
51
|
payment: z.ZodNullable<z.ZodBoolean>;
|
|
52
52
|
receipt: z.ZodNullable<z.ZodObject<{
|
|
53
53
|
large: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
54
|
original: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
repeats: z.ZodNullable<z.ZodBoolean>;
|
|
57
57
|
category: z.ZodNullable<z.ZodObject<{
|
|
58
58
|
id: z.ZodNullable<z.ZodNumber>;
|
|
59
59
|
name: z.ZodNullable<z.ZodString>;
|
|
60
|
-
}, z.core.$
|
|
60
|
+
}, z.core.$loose>>;
|
|
61
61
|
group_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
62
62
|
created_at: z.ZodNullable<z.ZodString>;
|
|
63
63
|
created_by: z.ZodNullable<z.ZodObject<{
|
|
64
64
|
id: z.ZodNullable<z.ZodNumber>;
|
|
65
65
|
picture: z.ZodNullable<z.ZodObject<{
|
|
66
66
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
}, z.core.$
|
|
67
|
+
}, z.core.$loose>>;
|
|
68
68
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
69
|
first_name: z.ZodNullable<z.ZodString>;
|
|
70
70
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
71
|
-
}, z.core.$
|
|
71
|
+
}, z.core.$loose>>;
|
|
72
72
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
73
|
deleted_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
74
|
id: z.ZodNullable<z.ZodNumber>;
|
|
75
75
|
picture: z.ZodNullable<z.ZodObject<{
|
|
76
76
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
-
}, z.core.$
|
|
77
|
+
}, z.core.$loose>>;
|
|
78
78
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
79
|
first_name: z.ZodNullable<z.ZodString>;
|
|
80
80
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
81
|
-
}, z.core.$
|
|
81
|
+
}, z.core.$loose>>>;
|
|
82
82
|
repayments: z.ZodArray<z.ZodObject<{
|
|
83
83
|
to: z.ZodNullable<z.ZodNumber>;
|
|
84
84
|
from: z.ZodNullable<z.ZodNumber>;
|
|
85
85
|
amount: z.ZodNullable<z.ZodString>;
|
|
86
|
-
}, z.core.$
|
|
86
|
+
}, z.core.$loose>>;
|
|
87
87
|
updated_at: z.ZodNullable<z.ZodString>;
|
|
88
88
|
updated_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
89
89
|
id: z.ZodNullable<z.ZodNumber>;
|
|
90
90
|
picture: z.ZodNullable<z.ZodObject<{
|
|
91
91
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
}, z.core.$
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
93
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
94
|
first_name: z.ZodNullable<z.ZodString>;
|
|
95
95
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
96
|
-
}, z.core.$
|
|
96
|
+
}, z.core.$loose>>>;
|
|
97
97
|
description: z.ZodNullable<z.ZodString>;
|
|
98
98
|
next_repeat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
99
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -107,14 +107,15 @@ declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
|
107
107
|
transaction_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
108
|
transaction_confirmed: z.ZodNullable<z.ZodBoolean>;
|
|
109
109
|
email_reminder_in_advance: z.ZodNullable<z.ZodNumber>;
|
|
110
|
-
}, z.core.$
|
|
111
|
-
}, z.core.$
|
|
110
|
+
}, z.core.$loose>>;
|
|
111
|
+
}, z.core.$loose>;
|
|
112
112
|
declare const splitwiseCreateExpense: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
113
113
|
cost: string;
|
|
114
114
|
group_id: number;
|
|
115
115
|
description: string;
|
|
116
116
|
date?: string | undefined;
|
|
117
117
|
users?: {
|
|
118
|
+
[x: string]: unknown;
|
|
118
119
|
owed_share: string;
|
|
119
120
|
paid_share: string;
|
|
120
121
|
email?: string | undefined;
|
|
@@ -127,7 +128,19 @@ declare const splitwiseCreateExpense: import("@keystrokehq/action").WorkflowActi
|
|
|
127
128
|
currency_code?: string | undefined;
|
|
128
129
|
split_equally?: boolean | undefined;
|
|
129
130
|
repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly" | undefined;
|
|
130
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential
|
|
131
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"splitwise", z.ZodObject<{
|
|
132
|
+
connectionId: z.ZodString;
|
|
133
|
+
entityId: z.ZodString;
|
|
134
|
+
instanceId: z.ZodString;
|
|
135
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
+
accessToken: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"splitwise", z.ZodObject<{
|
|
138
|
+
connectionId: z.ZodString;
|
|
139
|
+
entityId: z.ZodString;
|
|
140
|
+
instanceId: z.ZodString;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
accessToken: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>]>;
|
|
131
144
|
//#endregion
|
|
132
145
|
export { splitwiseCreateExpense };
|
|
133
146
|
//# sourceMappingURL=create-expense.d.cts.map
|
|
@@ -11,7 +11,7 @@ declare const SplitwiseCreateExpenseInput: z.ZodObject<{
|
|
|
11
11
|
first_name: z.ZodOptional<z.ZodString>;
|
|
12
12
|
owed_share: z.ZodString;
|
|
13
13
|
paid_share: z.ZodString;
|
|
14
|
-
}, z.core.$
|
|
14
|
+
}, z.core.$loose>>>;
|
|
15
15
|
details: z.ZodOptional<z.ZodString>;
|
|
16
16
|
group_id: z.ZodNumber;
|
|
17
17
|
category_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -27,7 +27,7 @@ declare const SplitwiseCreateExpenseInput: z.ZodObject<{
|
|
|
27
27
|
}>>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
30
|
-
errors: z.
|
|
30
|
+
errors: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
31
31
|
expenses: z.ZodArray<z.ZodObject<{
|
|
32
32
|
id: z.ZodNullable<z.ZodNumber>;
|
|
33
33
|
cost: z.ZodNullable<z.ZodString>;
|
|
@@ -37,63 +37,63 @@ declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
|
37
37
|
id: z.ZodNullable<z.ZodNumber>;
|
|
38
38
|
picture: z.ZodNullable<z.ZodObject<{
|
|
39
39
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
-
}, z.core.$
|
|
40
|
+
}, z.core.$loose>>;
|
|
41
41
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
42
|
first_name: z.ZodNullable<z.ZodString>;
|
|
43
43
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
44
|
-
}, z.core.$
|
|
44
|
+
}, z.core.$loose>>;
|
|
45
45
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
46
46
|
owed_share: z.ZodNullable<z.ZodString>;
|
|
47
47
|
paid_share: z.ZodNullable<z.ZodString>;
|
|
48
48
|
net_balance: z.ZodNullable<z.ZodString>;
|
|
49
|
-
}, z.core.$
|
|
49
|
+
}, z.core.$loose>>;
|
|
50
50
|
details: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
51
|
payment: z.ZodNullable<z.ZodBoolean>;
|
|
52
52
|
receipt: z.ZodNullable<z.ZodObject<{
|
|
53
53
|
large: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
54
|
original: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
repeats: z.ZodNullable<z.ZodBoolean>;
|
|
57
57
|
category: z.ZodNullable<z.ZodObject<{
|
|
58
58
|
id: z.ZodNullable<z.ZodNumber>;
|
|
59
59
|
name: z.ZodNullable<z.ZodString>;
|
|
60
|
-
}, z.core.$
|
|
60
|
+
}, z.core.$loose>>;
|
|
61
61
|
group_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
62
62
|
created_at: z.ZodNullable<z.ZodString>;
|
|
63
63
|
created_by: z.ZodNullable<z.ZodObject<{
|
|
64
64
|
id: z.ZodNullable<z.ZodNumber>;
|
|
65
65
|
picture: z.ZodNullable<z.ZodObject<{
|
|
66
66
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
}, z.core.$
|
|
67
|
+
}, z.core.$loose>>;
|
|
68
68
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
69
|
first_name: z.ZodNullable<z.ZodString>;
|
|
70
70
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
71
|
-
}, z.core.$
|
|
71
|
+
}, z.core.$loose>>;
|
|
72
72
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
73
|
deleted_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
74
|
id: z.ZodNullable<z.ZodNumber>;
|
|
75
75
|
picture: z.ZodNullable<z.ZodObject<{
|
|
76
76
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
-
}, z.core.$
|
|
77
|
+
}, z.core.$loose>>;
|
|
78
78
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
79
|
first_name: z.ZodNullable<z.ZodString>;
|
|
80
80
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
81
|
-
}, z.core.$
|
|
81
|
+
}, z.core.$loose>>>;
|
|
82
82
|
repayments: z.ZodArray<z.ZodObject<{
|
|
83
83
|
to: z.ZodNullable<z.ZodNumber>;
|
|
84
84
|
from: z.ZodNullable<z.ZodNumber>;
|
|
85
85
|
amount: z.ZodNullable<z.ZodString>;
|
|
86
|
-
}, z.core.$
|
|
86
|
+
}, z.core.$loose>>;
|
|
87
87
|
updated_at: z.ZodNullable<z.ZodString>;
|
|
88
88
|
updated_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
89
89
|
id: z.ZodNullable<z.ZodNumber>;
|
|
90
90
|
picture: z.ZodNullable<z.ZodObject<{
|
|
91
91
|
medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
}, z.core.$
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
93
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
94
|
first_name: z.ZodNullable<z.ZodString>;
|
|
95
95
|
custom_picture: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
96
|
-
}, z.core.$
|
|
96
|
+
}, z.core.$loose>>>;
|
|
97
97
|
description: z.ZodNullable<z.ZodString>;
|
|
98
98
|
next_repeat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
99
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -107,14 +107,15 @@ declare const SplitwiseCreateExpenseOutput: z.ZodObject<{
|
|
|
107
107
|
transaction_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
108
|
transaction_confirmed: z.ZodNullable<z.ZodBoolean>;
|
|
109
109
|
email_reminder_in_advance: z.ZodNullable<z.ZodNumber>;
|
|
110
|
-
}, z.core.$
|
|
111
|
-
}, z.core.$
|
|
110
|
+
}, z.core.$loose>>;
|
|
111
|
+
}, z.core.$loose>;
|
|
112
112
|
declare const splitwiseCreateExpense: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
113
113
|
cost: string;
|
|
114
114
|
group_id: number;
|
|
115
115
|
description: string;
|
|
116
116
|
date?: string | undefined;
|
|
117
117
|
users?: {
|
|
118
|
+
[x: string]: unknown;
|
|
118
119
|
owed_share: string;
|
|
119
120
|
paid_share: string;
|
|
120
121
|
email?: string | undefined;
|
|
@@ -127,7 +128,19 @@ declare const splitwiseCreateExpense: import("@keystrokehq/action").WorkflowActi
|
|
|
127
128
|
currency_code?: string | undefined;
|
|
128
129
|
split_equally?: boolean | undefined;
|
|
129
130
|
repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly" | undefined;
|
|
130
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential
|
|
131
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"splitwise", z.ZodObject<{
|
|
132
|
+
connectionId: z.ZodString;
|
|
133
|
+
entityId: z.ZodString;
|
|
134
|
+
instanceId: z.ZodString;
|
|
135
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
+
accessToken: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"splitwise", z.ZodObject<{
|
|
138
|
+
connectionId: z.ZodString;
|
|
139
|
+
entityId: z.ZodString;
|
|
140
|
+
instanceId: z.ZodString;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
accessToken: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>]>;
|
|
131
144
|
//#endregion
|
|
132
145
|
export { splitwiseCreateExpense };
|
|
133
146
|
//# sourceMappingURL=create-expense.d.mts.map
|
|
@@ -11,7 +11,7 @@ const SplitwiseCreateExpenseInput = z.object({
|
|
|
11
11
|
first_name: z.string().describe("First name (required when adding new users without user_id)").optional(),
|
|
12
12
|
owed_share: z.string().describe("Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)"),
|
|
13
13
|
paid_share: z.string().describe("Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)")
|
|
14
|
-
}).describe("Represents a participant's share in an expense, specifying what they paid and what they owe.\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).")).describe("List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').").optional(),
|
|
14
|
+
}).passthrough().describe("Represents a participant's share in an expense, specifying what they paid and what they owe.\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).")).describe("List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').").optional(),
|
|
15
15
|
details: z.string().describe("Additional notes or details about the expense").optional(),
|
|
16
16
|
group_id: z.number().int().describe("ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)"),
|
|
17
17
|
category_id: z.number().int().describe("Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'").optional(),
|
|
@@ -26,34 +26,34 @@ const SplitwiseCreateExpenseInput = z.object({
|
|
|
26
26
|
"yearly"
|
|
27
27
|
]).describe("How often this expense repeats. Use 'never' or omit for one-time expenses").optional()
|
|
28
28
|
}).describe("Request model for creating a new expense.\nExactly one of split_equally or users must be provided.");
|
|
29
|
-
const SplitwiseCreateExpense_PictureSchema = z.object({ medium: z.string().describe("Medium-sized profile picture URL").nullable().optional() }).describe("Profile picture URLs.");
|
|
29
|
+
const SplitwiseCreateExpense_PictureSchema = z.object({ medium: z.string().describe("Medium-sized profile picture URL").nullable().optional() }).passthrough().describe("Profile picture URLs.");
|
|
30
30
|
const SplitwiseCreateExpense_UserInfoSchema = z.object({
|
|
31
31
|
id: z.number().int().describe("User ID").nullable(),
|
|
32
32
|
picture: SplitwiseCreateExpense_PictureSchema.nullable(),
|
|
33
33
|
last_name: z.string().describe("User's last name").nullable().optional(),
|
|
34
34
|
first_name: z.string().describe("User's first name").nullable(),
|
|
35
35
|
custom_picture: z.boolean().describe("Whether the user has a custom picture").nullable().optional()
|
|
36
|
-
}).describe("Basic user information within an expense.");
|
|
36
|
+
}).passthrough().describe("Basic user information within an expense.");
|
|
37
37
|
const SplitwiseCreateExpense_ExpenseUserSchema = z.object({
|
|
38
38
|
user: SplitwiseCreateExpense_UserInfoSchema.nullable(),
|
|
39
39
|
user_id: z.number().int().describe("User ID").nullable(),
|
|
40
40
|
owed_share: z.string().describe("Amount this user owes").nullable(),
|
|
41
41
|
paid_share: z.string().describe("Amount this user paid").nullable(),
|
|
42
42
|
net_balance: z.string().describe("Net balance for this user in the expense").nullable()
|
|
43
|
-
}).describe("User's share details in an expense.");
|
|
43
|
+
}).passthrough().describe("User's share details in an expense.");
|
|
44
44
|
const SplitwiseCreateExpense_ReceiptSchema = z.object({
|
|
45
45
|
large: z.string().describe("Large receipt image URL").nullable().optional(),
|
|
46
46
|
original: z.string().describe("Original receipt image URL").nullable().optional()
|
|
47
|
-
}).describe("Receipt image URLs.");
|
|
47
|
+
}).passthrough().describe("Receipt image URLs.");
|
|
48
48
|
const SplitwiseCreateExpense_CategorySchema = z.object({
|
|
49
49
|
id: z.number().int().describe("Category ID").nullable(),
|
|
50
50
|
name: z.string().describe("Category name").nullable()
|
|
51
|
-
}).describe("Expense category information.");
|
|
51
|
+
}).passthrough().describe("Expense category information.");
|
|
52
52
|
const SplitwiseCreateExpense_RepaymentSchema = z.object({
|
|
53
53
|
to: z.number().int().describe("User ID who is owed money").nullable(),
|
|
54
54
|
from: z.number().int().describe("User ID who owes money").nullable(),
|
|
55
55
|
amount: z.string().describe("Amount to be repaid").nullable()
|
|
56
|
-
}).describe("Repayment information showing who owes whom.");
|
|
56
|
+
}).passthrough().describe("Repayment information showing who owes whom.");
|
|
57
57
|
const SplitwiseCreateExpense_ExpenseSchema = z.object({
|
|
58
58
|
id: z.number().int().describe("Unique expense ID").nullable(),
|
|
59
59
|
cost: z.string().describe("Total cost of the expense").nullable(),
|
|
@@ -85,16 +85,16 @@ const SplitwiseCreateExpense_ExpenseSchema = z.object({
|
|
|
85
85
|
transaction_status: z.string().describe("Transaction status").nullable().optional(),
|
|
86
86
|
transaction_confirmed: z.boolean().describe("Whether the transaction is confirmed").nullable(),
|
|
87
87
|
email_reminder_in_advance: z.number().int().describe("Days in advance for email reminder").nullable()
|
|
88
|
-
}).describe("Complete expense object with all details.");
|
|
88
|
+
}).passthrough().describe("Complete expense object with all details.");
|
|
89
89
|
const splitwiseCreateExpense = action("SPLITWISE_CREATE_EXPENSE", {
|
|
90
90
|
slug: "splitwise-create-expense",
|
|
91
91
|
name: "Create Expense",
|
|
92
92
|
description: "Tool to create a new Splitwise expense. Use when you need to record a payment or bill in a group or between users. Provide exactly one of split_equally or users for shares — supplying both or neither causes a validation error and no expense is created.",
|
|
93
93
|
input: SplitwiseCreateExpenseInput,
|
|
94
94
|
output: z.object({
|
|
95
|
-
errors: z.
|
|
95
|
+
errors: z.record(z.string(), z.unknown()).describe("Errors returned by the API; empty if none"),
|
|
96
96
|
expenses: z.array(SplitwiseCreateExpense_ExpenseSchema).describe("List of created expense objects")
|
|
97
|
-
}).describe("Response model for create_expense action.")
|
|
97
|
+
}).passthrough().describe("Response model for create_expense action.")
|
|
98
98
|
});
|
|
99
99
|
//#endregion
|
|
100
100
|
export { splitwiseCreateExpense };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-expense.mjs","names":[],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateExpenseInput = z.object({\n cost: z.string().describe(\"Total cost as string decimal (up to 2 decimal places)\"),\n date: z.string().describe(\"Date when the expense occurred (ISO 8601 format). Defaults to current time if omitted\").optional(),\n users: z.array(z.object({\n email: z.string().describe(\"Email address (required when adding new users without user_id)\").optional(),\n user_id: z.number().int().describe(\"Splitwise user ID of an existing friend or group member\").optional(),\n last_name: z.string().describe(\"Last name (required when adding new users without user_id)\").optional(),\n first_name: z.string().describe(\"First name (required when adding new users without user_id)\").optional(),\n owed_share: z.string().describe(\"Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)\"),\n paid_share: z.string().describe(\"Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)\"),\n}).describe(\"Represents a participant's share in an expense, specifying what they paid and what they owe.\\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).\")).describe(\"List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').\").optional(),\n details: z.string().describe(\"Additional notes or details about the expense\").optional(),\n group_id: z.number().int().describe(\"ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)\"),\n category_id: z.number().int().describe(\"Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'\").optional(),\n description: z.string().describe(\"Brief description of what the expense is for\"),\n currency_code: z.string().describe(\"3-letter ISO currency code (e.g., USD, EUR, GBP). Defaults to user's default currency\").optional(),\n split_equally: z.boolean().describe(\"Set to true to split cost equally. When group_id=0, you must also provide users list to specify participants\").optional(),\n repeat_interval: z.enum([\"never\", \"weekly\", \"fortnightly\", \"monthly\", \"yearly\"]).describe(\"How often this expense repeats. Use 'never' or omit for one-time expenses\").optional(),\n}).describe(\"Request model for creating a new expense.\\nExactly one of split_equally or users must be provided.\");\nconst SplitwiseCreateExpense_PictureSchema = z.object({\n medium: z.string().describe(\"Medium-sized profile picture URL\").nullable().optional(),\n}).describe(\"Profile picture URLs.\");\nconst SplitwiseCreateExpense_UserInfoSchema = z.object({\n id: z.number().int().describe(\"User ID\").nullable(),\n picture: SplitwiseCreateExpense_PictureSchema.nullable(),\n last_name: z.string().describe(\"User's last name\").nullable().optional(),\n first_name: z.string().describe(\"User's first name\").nullable(),\n custom_picture: z.boolean().describe(\"Whether the user has a custom picture\").nullable().optional(),\n}).describe(\"Basic user information within an expense.\");\nconst SplitwiseCreateExpense_ExpenseUserSchema = z.object({\n user: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n user_id: z.number().int().describe(\"User ID\").nullable(),\n owed_share: z.string().describe(\"Amount this user owes\").nullable(),\n paid_share: z.string().describe(\"Amount this user paid\").nullable(),\n net_balance: z.string().describe(\"Net balance for this user in the expense\").nullable(),\n}).describe(\"User's share details in an expense.\");\nconst SplitwiseCreateExpense_ReceiptSchema = z.object({\n large: z.string().describe(\"Large receipt image URL\").nullable().optional(),\n original: z.string().describe(\"Original receipt image URL\").nullable().optional(),\n}).describe(\"Receipt image URLs.\");\nconst SplitwiseCreateExpense_CategorySchema = z.object({\n id: z.number().int().describe(\"Category ID\").nullable(),\n name: z.string().describe(\"Category name\").nullable(),\n}).describe(\"Expense category information.\");\nconst SplitwiseCreateExpense_RepaymentSchema = z.object({\n to: z.number().int().describe(\"User ID who is owed money\").nullable(),\n from: z.number().int().describe(\"User ID who owes money\").nullable(),\n amount: z.string().describe(\"Amount to be repaid\").nullable(),\n}).describe(\"Repayment information showing who owes whom.\");\nconst SplitwiseCreateExpense_ExpenseSchema = z.object({\n id: z.number().int().describe(\"Unique expense ID\").nullable(),\n cost: z.string().describe(\"Total cost of the expense\").nullable(),\n date: z.string().describe(\"Date the expense occurred (ISO 8601)\").nullable(),\n users: z.array(SplitwiseCreateExpense_ExpenseUserSchema).describe(\"List of users involved in this expense with their shares\"),\n details: z.string().describe(\"Additional details or notes\").nullable().optional(),\n payment: z.boolean().describe(\"Whether this is a payment (vs. an expense)\").nullable(),\n receipt: SplitwiseCreateExpense_ReceiptSchema.nullable(),\n repeats: z.boolean().describe(\"Whether this expense repeats\").nullable(),\n category: SplitwiseCreateExpense_CategorySchema.nullable(),\n group_id: z.number().int().describe(\"Group ID, null if not in a group\").nullable().optional(),\n created_at: z.string().describe(\"Date the expense was created (ISO 8601)\").nullable(),\n created_by: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n deleted_at: z.string().describe(\"Date the expense was deleted\").nullable().optional(),\n deleted_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n repayments: z.array(SplitwiseCreateExpense_RepaymentSchema).describe(\"List of repayments required to settle this expense\"),\n updated_at: z.string().describe(\"Date the expense was last updated (ISO 8601)\").nullable(),\n updated_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n description: z.string().describe(\"Expense description\").nullable(),\n next_repeat: z.string().describe(\"Date of next repeat\").nullable().optional(),\n currency_code: z.string().describe(\"Currency code (e.g., 'USD')\").nullable(),\n comments_count: z.number().int().describe(\"Number of comments on this expense\").nullable(),\n email_reminder: z.boolean().describe(\"Whether email reminders are enabled\").nullable(),\n transaction_id: z.string().describe(\"External transaction ID\").nullable().optional(),\n creation_method: z.string().describe(\"How the expense was created\").nullable().optional(),\n repeat_interval: z.string().describe(\"Repeat interval if applicable\").nullable().optional(),\n expense_bundle_id: z.number().int().describe(\"Bundle ID if part of a recurring expense\").nullable().optional(),\n transaction_method: z.string().describe(\"Transaction method (e.g., 'offline')\").nullable(),\n transaction_status: z.string().describe(\"Transaction status\").nullable().optional(),\n transaction_confirmed: z.boolean().describe(\"Whether the transaction is confirmed\").nullable(),\n email_reminder_in_advance: z.number().int().describe(\"Days in advance for email reminder\").nullable(),\n}).describe(\"Complete expense object with all details.\");\nexport const SplitwiseCreateExpenseOutput = z.object({\n errors: z.object({}).describe(\"Errors returned by the API; empty if none\"),\n expenses: z.array(SplitwiseCreateExpense_ExpenseSchema).describe(\"List of created expense objects\"),\n}).describe(\"Response model for create_expense action.\");\n\nexport const splitwiseCreateExpense = action(\"SPLITWISE_CREATE_EXPENSE\", {\n slug: \"splitwise-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new Splitwise expense. Use when you need to record a payment or bill in a group or between users. Provide exactly one of split_equally or users for shares — supplying both or neither causes a validation error and no expense is created.\",\n input: SplitwiseCreateExpenseInput,\n output: SplitwiseCreateExpenseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EA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,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC7F,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;AACtG,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAMvD,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV0C,EAAE,OAAO;EACnD,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,2CAA2C;EACzE,UAAU,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,iCAAiC;CACpG,CAAC,CAAC,CAAC,SAAS,2CAOF;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-expense.mjs","names":[],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateExpenseInput = z.object({\n cost: z.string().describe(\"Total cost as string decimal (up to 2 decimal places)\"),\n date: z.string().describe(\"Date when the expense occurred (ISO 8601 format). Defaults to current time if omitted\").optional(),\n users: z.array(z.object({\n email: z.string().describe(\"Email address (required when adding new users without user_id)\").optional(),\n user_id: z.number().int().describe(\"Splitwise user ID of an existing friend or group member\").optional(),\n last_name: z.string().describe(\"Last name (required when adding new users without user_id)\").optional(),\n first_name: z.string().describe(\"First name (required when adding new users without user_id)\").optional(),\n owed_share: z.string().describe(\"Amount this participant owes for their portion of the expense (decimal string, up to 2 decimal places)\"),\n paid_share: z.string().describe(\"Amount this participant actually paid towards the expense (decimal string, up to 2 decimal places)\"),\n}).passthrough().describe(\"Represents a participant's share in an expense, specifying what they paid and what they owe.\\nMust include either user_id (for existing users) or all three fields: email, first_name, and last_name (for new users).\")).describe(\"List of participants with custom share amounts. Required when using custom splits instead of split_equally Each user object must include `paid_share` and `owed_share` as decimal strings with up to 2 decimal places (e.g., '25.00').\").optional(),\n details: z.string().describe(\"Additional notes or details about the expense\").optional(),\n group_id: z.number().int().describe(\"ID of the group to add this expense to. Use 0 for expenses between friends (not in a group)\"),\n category_id: z.number().int().describe(\"Expense category ID (use get_categories action to retrieve valid IDs). Defaults to 'General'\").optional(),\n description: z.string().describe(\"Brief description of what the expense is for\"),\n currency_code: z.string().describe(\"3-letter ISO currency code (e.g., USD, EUR, GBP). Defaults to user's default currency\").optional(),\n split_equally: z.boolean().describe(\"Set to true to split cost equally. When group_id=0, you must also provide users list to specify participants\").optional(),\n repeat_interval: z.enum([\"never\", \"weekly\", \"fortnightly\", \"monthly\", \"yearly\"]).describe(\"How often this expense repeats. Use 'never' or omit for one-time expenses\").optional(),\n}).describe(\"Request model for creating a new expense.\\nExactly one of split_equally or users must be provided.\");\nconst SplitwiseCreateExpense_PictureSchema = z.object({\n medium: z.string().describe(\"Medium-sized profile picture URL\").nullable().optional(),\n}).passthrough().describe(\"Profile picture URLs.\");\nconst SplitwiseCreateExpense_UserInfoSchema = z.object({\n id: z.number().int().describe(\"User ID\").nullable(),\n picture: SplitwiseCreateExpense_PictureSchema.nullable(),\n last_name: z.string().describe(\"User's last name\").nullable().optional(),\n first_name: z.string().describe(\"User's first name\").nullable(),\n custom_picture: z.boolean().describe(\"Whether the user has a custom picture\").nullable().optional(),\n}).passthrough().describe(\"Basic user information within an expense.\");\nconst SplitwiseCreateExpense_ExpenseUserSchema = z.object({\n user: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n user_id: z.number().int().describe(\"User ID\").nullable(),\n owed_share: z.string().describe(\"Amount this user owes\").nullable(),\n paid_share: z.string().describe(\"Amount this user paid\").nullable(),\n net_balance: z.string().describe(\"Net balance for this user in the expense\").nullable(),\n}).passthrough().describe(\"User's share details in an expense.\");\nconst SplitwiseCreateExpense_ReceiptSchema = z.object({\n large: z.string().describe(\"Large receipt image URL\").nullable().optional(),\n original: z.string().describe(\"Original receipt image URL\").nullable().optional(),\n}).passthrough().describe(\"Receipt image URLs.\");\nconst SplitwiseCreateExpense_CategorySchema = z.object({\n id: z.number().int().describe(\"Category ID\").nullable(),\n name: z.string().describe(\"Category name\").nullable(),\n}).passthrough().describe(\"Expense category information.\");\nconst SplitwiseCreateExpense_RepaymentSchema = z.object({\n to: z.number().int().describe(\"User ID who is owed money\").nullable(),\n from: z.number().int().describe(\"User ID who owes money\").nullable(),\n amount: z.string().describe(\"Amount to be repaid\").nullable(),\n}).passthrough().describe(\"Repayment information showing who owes whom.\");\nconst SplitwiseCreateExpense_ExpenseSchema = z.object({\n id: z.number().int().describe(\"Unique expense ID\").nullable(),\n cost: z.string().describe(\"Total cost of the expense\").nullable(),\n date: z.string().describe(\"Date the expense occurred (ISO 8601)\").nullable(),\n users: z.array(SplitwiseCreateExpense_ExpenseUserSchema).describe(\"List of users involved in this expense with their shares\"),\n details: z.string().describe(\"Additional details or notes\").nullable().optional(),\n payment: z.boolean().describe(\"Whether this is a payment (vs. an expense)\").nullable(),\n receipt: SplitwiseCreateExpense_ReceiptSchema.nullable(),\n repeats: z.boolean().describe(\"Whether this expense repeats\").nullable(),\n category: SplitwiseCreateExpense_CategorySchema.nullable(),\n group_id: z.number().int().describe(\"Group ID, null if not in a group\").nullable().optional(),\n created_at: z.string().describe(\"Date the expense was created (ISO 8601)\").nullable(),\n created_by: SplitwiseCreateExpense_UserInfoSchema.nullable(),\n deleted_at: z.string().describe(\"Date the expense was deleted\").nullable().optional(),\n deleted_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n repayments: z.array(SplitwiseCreateExpense_RepaymentSchema).describe(\"List of repayments required to settle this expense\"),\n updated_at: z.string().describe(\"Date the expense was last updated (ISO 8601)\").nullable(),\n updated_by: SplitwiseCreateExpense_UserInfoSchema.nullable().optional(),\n description: z.string().describe(\"Expense description\").nullable(),\n next_repeat: z.string().describe(\"Date of next repeat\").nullable().optional(),\n currency_code: z.string().describe(\"Currency code (e.g., 'USD')\").nullable(),\n comments_count: z.number().int().describe(\"Number of comments on this expense\").nullable(),\n email_reminder: z.boolean().describe(\"Whether email reminders are enabled\").nullable(),\n transaction_id: z.string().describe(\"External transaction ID\").nullable().optional(),\n creation_method: z.string().describe(\"How the expense was created\").nullable().optional(),\n repeat_interval: z.string().describe(\"Repeat interval if applicable\").nullable().optional(),\n expense_bundle_id: z.number().int().describe(\"Bundle ID if part of a recurring expense\").nullable().optional(),\n transaction_method: z.string().describe(\"Transaction method (e.g., 'offline')\").nullable(),\n transaction_status: z.string().describe(\"Transaction status\").nullable().optional(),\n transaction_confirmed: z.boolean().describe(\"Whether the transaction is confirmed\").nullable(),\n email_reminder_in_advance: z.number().int().describe(\"Days in advance for email reminder\").nullable(),\n}).passthrough().describe(\"Complete expense object with all details.\");\nexport const SplitwiseCreateExpenseOutput = z.object({\n errors: z.record(z.string(), z.unknown()).describe(\"Errors returned by the API; empty if none\"),\n expenses: z.array(SplitwiseCreateExpense_ExpenseSchema).describe(\"List of created expense objects\"),\n}).passthrough().describe(\"Response model for create_expense action.\");\n\nexport const splitwiseCreateExpense = action(\"SPLITWISE_CREATE_EXPENSE\", {\n slug: \"splitwise-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new Splitwise expense. Use when you need to record a payment or bill in a group or between users. Provide exactly one of split_equally or users for shares — supplying both or neither causes a validation error and no expense is created.\",\n input: SplitwiseCreateExpenseInput,\n output: SplitwiseCreateExpenseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO;CAClD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACjF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS;CAC5H,OAAO,EAAE,MAAM,EAAE,OAAO;EACxB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EACtG,SAAS,EAAE,OAAO,CAAC,C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AC,SAAS;CAC7F,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;AACtG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAA2C;AAMrE,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV0C,EAAE,OAAO;EACnD,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,2CAA2C;EAC9F,UAAU,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,iCAAiC;CACpG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAOhB;AACV,CAAC"}
|
|
@@ -5,20 +5,20 @@ const SplitwiseCreateFriendsInput = zod.z.object({ users: zod.z.array(zod.z.obje
|
|
|
5
5
|
email: zod.z.string().describe("Email address of the user (required)"),
|
|
6
6
|
last_name: zod.z.string().describe("Last name of the user (optional)").optional(),
|
|
7
7
|
first_name: zod.z.string().describe("First name of the user (required for new users)")
|
|
8
|
-
}).describe("A single user to add as a friend.")).describe("List of users to add as friends. Each user must have an email and first_name.") }).describe("Request parameters for adding multiple friends at once.");
|
|
8
|
+
}).passthrough().describe("A single user to add as a friend.")).describe("List of users to add as friends. Each user must have an email and first_name.") }).describe("Request parameters for adding multiple friends at once.");
|
|
9
9
|
const SplitwiseCreateFriends_BalanceItemSchema = zod.z.object({
|
|
10
10
|
amount: zod.z.string().describe("Balance amount as string").nullable(),
|
|
11
11
|
currency_code: zod.z.string().describe("Currency code, e.g., 'USD'").nullable()
|
|
12
|
-
}).describe("A balance amount in a given currency.");
|
|
12
|
+
}).passthrough().describe("A balance amount in a given currency.");
|
|
13
13
|
const SplitwiseCreateFriends_GroupItemSchema = zod.z.object({
|
|
14
14
|
balance: zod.z.array(SplitwiseCreateFriends_BalanceItemSchema).describe("List of balances within this group"),
|
|
15
15
|
group_id: zod.z.number().int().describe("Unique ID of the group").nullable()
|
|
16
|
-
}).describe("Group membership and balances for the friend.");
|
|
16
|
+
}).passthrough().describe("Group membership and balances for the friend.");
|
|
17
17
|
const SplitwiseCreateFriends_PictureSchema = zod.z.object({
|
|
18
18
|
large: zod.z.string().describe("URL for large profile picture").nullable().optional(),
|
|
19
19
|
small: zod.z.string().describe("URL for small profile picture").nullable().optional(),
|
|
20
20
|
medium: zod.z.string().describe("URL for medium profile picture").nullable().optional()
|
|
21
|
-
}).describe("URLs for different sizes of the user's profile picture.");
|
|
21
|
+
}).passthrough().describe("URLs for different sizes of the user's profile picture.");
|
|
22
22
|
const SplitwiseCreateFriends_FriendUserSchema = zod.z.object({
|
|
23
23
|
id: zod.z.number().int().describe("Unique user ID").nullable(),
|
|
24
24
|
email: zod.z.string().describe("Email address of the user").nullable().optional(),
|
|
@@ -30,11 +30,11 @@ const SplitwiseCreateFriends_FriendUserSchema = zod.z.object({
|
|
|
30
30
|
updated_at: zod.z.string().describe("ISO 8601 timestamp of last update").nullable().optional(),
|
|
31
31
|
custom_picture: zod.z.boolean().describe("Whether they have a custom profile picture").nullable().optional(),
|
|
32
32
|
registration_status: zod.z.string().describe("Registration status, e.g., 'confirmed'").nullable().optional()
|
|
33
|
-
}).describe("Friend user object returned by Splitwise.");
|
|
33
|
+
}).passthrough().describe("Friend user object returned by Splitwise.");
|
|
34
34
|
const SplitwiseCreateFriendsOutput = zod.z.object({
|
|
35
35
|
users: zod.z.array(SplitwiseCreateFriends_FriendUserSchema).describe("Array of user objects that were created or already existed"),
|
|
36
36
|
errors: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Key-value pairs mapping property names to validation failure messages").nullable().optional()
|
|
37
|
-
}).describe("Response for creating multiple friends.");
|
|
37
|
+
}).passthrough().describe("Response for creating multiple friends.");
|
|
38
38
|
const splitwiseCreateFriends = require_action.action("SPLITWISE_CREATE_FRIENDS", {
|
|
39
39
|
slug: "splitwise-create-friends",
|
|
40
40
|
name: "Create Friends",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-friends.cjs","names":["z","action"],"sources":["../../src/actions/create-friends.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateFriendsInput = z.object({\n users: z.array(z.object({\n email: z.string().describe(\"Email address of the user (required)\"),\n last_name: z.string().describe(\"Last name of the user (optional)\").optional(),\n first_name: z.string().describe(\"First name of the user (required for new users)\"),\n}).describe(\"A single user to add as a friend.\")).describe(\"List of users to add as friends. Each user must have an email and first_name.\"),\n}).describe(\"Request parameters for adding multiple friends at once.\");\nconst SplitwiseCreateFriends_BalanceItemSchema = z.object({\n amount: z.string().describe(\"Balance amount as string\").nullable(),\n currency_code: z.string().describe(\"Currency code, e.g., 'USD'\").nullable(),\n}).describe(\"A balance amount in a given currency.\");\nconst SplitwiseCreateFriends_GroupItemSchema = z.object({\n balance: z.array(SplitwiseCreateFriends_BalanceItemSchema).describe(\"List of balances within this group\"),\n group_id: z.number().int().describe(\"Unique ID of the group\").nullable(),\n}).describe(\"Group membership and balances for the friend.\");\nconst SplitwiseCreateFriends_PictureSchema = z.object({\n large: z.string().describe(\"URL for large profile picture\").nullable().optional(),\n small: z.string().describe(\"URL for small profile picture\").nullable().optional(),\n medium: z.string().describe(\"URL for medium profile picture\").nullable().optional(),\n}).describe(\"URLs for different sizes of the user's profile picture.\");\nconst SplitwiseCreateFriends_FriendUserSchema = z.object({\n id: z.number().int().describe(\"Unique user ID\").nullable(),\n email: z.string().describe(\"Email address of the user\").nullable().optional(),\n groups: z.array(SplitwiseCreateFriends_GroupItemSchema).describe(\"Groups the user belongs to\").nullable().optional(),\n balance: z.array(SplitwiseCreateFriends_BalanceItemSchema).describe(\"Overall balances with this user\").nullable().optional(),\n picture: SplitwiseCreateFriends_PictureSchema.nullable().optional(),\n last_name: z.string().describe(\"Last name of the user\").nullable().optional(),\n first_name: z.string().describe(\"First name of the user\").nullable().optional(),\n updated_at: z.string().describe(\"ISO 8601 timestamp of last update\").nullable().optional(),\n custom_picture: z.boolean().describe(\"Whether they have a custom profile picture\").nullable().optional(),\n registration_status: z.string().describe(\"Registration status, e.g., 'confirmed'\").nullable().optional(),\n}).describe(\"Friend user object returned by Splitwise.\");\nexport const SplitwiseCreateFriendsOutput = z.object({\n users: z.array(SplitwiseCreateFriends_FriendUserSchema).describe(\"Array of user objects that were created or already existed\"),\n errors: z.record(z.string(), z.unknown()).describe(\"Key-value pairs mapping property names to validation failure messages\").nullable().optional(),\n}).describe(\"Response for creating multiple friends.\");\n\nexport const splitwiseCreateFriends = action(\"SPLITWISE_CREATE_FRIENDS\", {\n slug: \"splitwise-create-friends\",\n name: \"Create Friends\",\n description: \"Tool to add multiple friends at once to Splitwise. Use when you need to add several friends in a single operation.\",\n input: SplitwiseCreateFriendsInput,\n output: SplitwiseCreateFriendsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CACxB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC5E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;AACnF,CAAC,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,CAAC,SAAS,+EAA+E,
|
|
1
|
+
{"version":3,"file":"create-friends.cjs","names":["z","action"],"sources":["../../src/actions/create-friends.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SplitwiseCreateFriendsInput = z.object({\n users: z.array(z.object({\n email: z.string().describe(\"Email address of the user (required)\"),\n last_name: z.string().describe(\"Last name of the user (optional)\").optional(),\n first_name: z.string().describe(\"First name of the user (required for new users)\"),\n}).passthrough().describe(\"A single user to add as a friend.\")).describe(\"List of users to add as friends. Each user must have an email and first_name.\"),\n}).describe(\"Request parameters for adding multiple friends at once.\");\nconst SplitwiseCreateFriends_BalanceItemSchema = z.object({\n amount: z.string().describe(\"Balance amount as string\").nullable(),\n currency_code: z.string().describe(\"Currency code, e.g., 'USD'\").nullable(),\n}).passthrough().describe(\"A balance amount in a given currency.\");\nconst SplitwiseCreateFriends_GroupItemSchema = z.object({\n balance: z.array(SplitwiseCreateFriends_BalanceItemSchema).describe(\"List of balances within this group\"),\n group_id: z.number().int().describe(\"Unique ID of the group\").nullable(),\n}).passthrough().describe(\"Group membership and balances for the friend.\");\nconst SplitwiseCreateFriends_PictureSchema = z.object({\n large: z.string().describe(\"URL for large profile picture\").nullable().optional(),\n small: z.string().describe(\"URL for small profile picture\").nullable().optional(),\n medium: z.string().describe(\"URL for medium profile picture\").nullable().optional(),\n}).passthrough().describe(\"URLs for different sizes of the user's profile picture.\");\nconst SplitwiseCreateFriends_FriendUserSchema = z.object({\n id: z.number().int().describe(\"Unique user ID\").nullable(),\n email: z.string().describe(\"Email address of the user\").nullable().optional(),\n groups: z.array(SplitwiseCreateFriends_GroupItemSchema).describe(\"Groups the user belongs to\").nullable().optional(),\n balance: z.array(SplitwiseCreateFriends_BalanceItemSchema).describe(\"Overall balances with this user\").nullable().optional(),\n picture: SplitwiseCreateFriends_PictureSchema.nullable().optional(),\n last_name: z.string().describe(\"Last name of the user\").nullable().optional(),\n first_name: z.string().describe(\"First name of the user\").nullable().optional(),\n updated_at: z.string().describe(\"ISO 8601 timestamp of last update\").nullable().optional(),\n custom_picture: z.boolean().describe(\"Whether they have a custom profile picture\").nullable().optional(),\n registration_status: z.string().describe(\"Registration status, e.g., 'confirmed'\").nullable().optional(),\n}).passthrough().describe(\"Friend user object returned by Splitwise.\");\nexport const SplitwiseCreateFriendsOutput = z.object({\n users: z.array(SplitwiseCreateFriends_FriendUserSchema).describe(\"Array of user objects that were created or already existed\"),\n errors: z.record(z.string(), z.unknown()).describe(\"Key-value pairs mapping property names to validation failure messages\").nullable().optional(),\n}).passthrough().describe(\"Response for creating multiple friends.\");\n\nexport const splitwiseCreateFriends = action(\"SPLITWISE_CREATE_FRIENDS\", {\n slug: \"splitwise-create-friends\",\n name: \"Create Friends\",\n description: \"Tool to add multiple friends at once to Splitwise. Use when you need to add several friends in a single operation.\",\n input: SplitwiseCreateFriendsInput,\n output: SplitwiseCreateFriendsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CACxB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC5E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;AACnF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,CAAC,SAAS,+EAA+E,EACxJ,CAAC,CAAC,CAAC,SAAS,yDAAyD;AACrE,MAAM,2CAA2CA,IAAAA,EAAE,OAAO;CACxD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACjE,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;AAC5E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uCAAuC;AACjE,MAAM,yCAAyCA,IAAAA,EAAE,OAAO;CACtD,SAASA,IAAAA,EAAE,MAAM,wCAAwC,CAAC,CAAC,SAAS,oCAAoC;CACxG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AACzE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+CAA+C;AACzE,MAAM,uCAAuCA,IAAAA,EAAE,OAAO;CACpD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