@centry-digital/bukku-mcp 1.1.1 → 2.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.
Files changed (107) hide show
  1. package/build/config/env.d.ts +1 -0
  2. package/build/config/env.d.ts.map +1 -0
  3. package/build/config/env.js +2 -1
  4. package/build/index.d.ts +1 -0
  5. package/build/index.d.ts.map +1 -0
  6. package/build/index.js +1813 -44
  7. package/build/tools/custom/account-tools.d.ts +2 -1
  8. package/build/tools/custom/account-tools.d.ts.map +1 -0
  9. package/build/tools/custom/account-tools.js +2 -2
  10. package/build/tools/custom/contact-archive.d.ts +2 -1
  11. package/build/tools/custom/contact-archive.d.ts.map +1 -0
  12. package/build/tools/custom/contact-archive.js +2 -2
  13. package/build/tools/custom/control-panel-archive.d.ts +2 -1
  14. package/build/tools/custom/control-panel-archive.d.ts.map +1 -0
  15. package/build/tools/custom/control-panel-archive.js +2 -2
  16. package/build/tools/custom/file-upload.d.ts +2 -1
  17. package/build/tools/custom/file-upload.d.ts.map +1 -0
  18. package/build/tools/custom/file-upload.js +2 -2
  19. package/build/tools/custom/journal-entry-tools.d.ts +2 -1
  20. package/build/tools/custom/journal-entry-tools.d.ts.map +1 -0
  21. package/build/tools/custom/journal-entry-tools.js +2 -3
  22. package/build/tools/custom/location-tools.d.ts +2 -1
  23. package/build/tools/custom/location-tools.d.ts.map +1 -0
  24. package/build/tools/custom/location-tools.js +2 -2
  25. package/build/tools/custom/product-archive.d.ts +2 -1
  26. package/build/tools/custom/product-archive.d.ts.map +1 -0
  27. package/build/tools/custom/product-archive.js +2 -2
  28. package/build/tools/custom/reference-data.d.ts +3 -2
  29. package/build/tools/custom/reference-data.d.ts.map +1 -0
  30. package/build/tools/custom/reference-data.js +2 -2
  31. package/build/tools/factory.d.ts +2 -2
  32. package/build/tools/factory.d.ts.map +1 -0
  33. package/build/tools/factory.js +2 -2
  34. package/build/tools/registry.d.ts +2 -1
  35. package/build/tools/registry.d.ts.map +1 -0
  36. package/build/tools/registry.js +3 -41
  37. package/package.json +9 -22
  38. package/LICENSE +0 -21
  39. package/README.md +0 -269
  40. package/build/client/bukku-client.d.ts +0 -62
  41. package/build/client/bukku-client.js +0 -195
  42. package/build/errors/transform.d.ts +0 -14
  43. package/build/errors/transform.js +0 -141
  44. package/build/tools/cache/reference-cache.d.ts +0 -42
  45. package/build/tools/cache/reference-cache.js +0 -63
  46. package/build/tools/configs/account.d.ts +0 -17
  47. package/build/tools/configs/account.js +0 -28
  48. package/build/tools/configs/bank-money-in.d.ts +0 -10
  49. package/build/tools/configs/bank-money-in.js +0 -22
  50. package/build/tools/configs/bank-money-out.d.ts +0 -10
  51. package/build/tools/configs/bank-money-out.js +0 -22
  52. package/build/tools/configs/bank-transfer.d.ts +0 -11
  53. package/build/tools/configs/bank-transfer.js +0 -23
  54. package/build/tools/configs/contact-group.d.ts +0 -11
  55. package/build/tools/configs/contact-group.js +0 -19
  56. package/build/tools/configs/contact.d.ts +0 -14
  57. package/build/tools/configs/contact.js +0 -25
  58. package/build/tools/configs/delivery-order.d.ts +0 -8
  59. package/build/tools/configs/delivery-order.js +0 -20
  60. package/build/tools/configs/file.d.ts +0 -18
  61. package/build/tools/configs/file.js +0 -26
  62. package/build/tools/configs/goods-received-note.d.ts +0 -8
  63. package/build/tools/configs/goods-received-note.js +0 -20
  64. package/build/tools/configs/journal-entry.d.ts +0 -14
  65. package/build/tools/configs/journal-entry.js +0 -26
  66. package/build/tools/configs/location.d.ts +0 -20
  67. package/build/tools/configs/location.js +0 -28
  68. package/build/tools/configs/product-bundle.d.ts +0 -18
  69. package/build/tools/configs/product-bundle.js +0 -29
  70. package/build/tools/configs/product-group.d.ts +0 -14
  71. package/build/tools/configs/product-group.js +0 -22
  72. package/build/tools/configs/product.d.ts +0 -24
  73. package/build/tools/configs/product.js +0 -35
  74. package/build/tools/configs/purchase-bill.d.ts +0 -9
  75. package/build/tools/configs/purchase-bill.js +0 -21
  76. package/build/tools/configs/purchase-credit-note.d.ts +0 -8
  77. package/build/tools/configs/purchase-credit-note.js +0 -20
  78. package/build/tools/configs/purchase-order.d.ts +0 -8
  79. package/build/tools/configs/purchase-order.js +0 -20
  80. package/build/tools/configs/purchase-payment.d.ts +0 -8
  81. package/build/tools/configs/purchase-payment.js +0 -20
  82. package/build/tools/configs/purchase-refund.d.ts +0 -8
  83. package/build/tools/configs/purchase-refund.js +0 -20
  84. package/build/tools/configs/sales-credit-note.d.ts +0 -8
  85. package/build/tools/configs/sales-credit-note.js +0 -20
  86. package/build/tools/configs/sales-invoice.d.ts +0 -8
  87. package/build/tools/configs/sales-invoice.js +0 -20
  88. package/build/tools/configs/sales-order.d.ts +0 -8
  89. package/build/tools/configs/sales-order.js +0 -20
  90. package/build/tools/configs/sales-payment.d.ts +0 -8
  91. package/build/tools/configs/sales-payment.js +0 -20
  92. package/build/tools/configs/sales-quote.d.ts +0 -8
  93. package/build/tools/configs/sales-quote.js +0 -20
  94. package/build/tools/configs/sales-refund.d.ts +0 -8
  95. package/build/tools/configs/sales-refund.js +0 -20
  96. package/build/tools/configs/tag-group.d.ts +0 -11
  97. package/build/tools/configs/tag-group.js +0 -22
  98. package/build/tools/configs/tag.d.ts +0 -11
  99. package/build/tools/configs/tag.js +0 -22
  100. package/build/tools/validation/double-entry.d.ts +0 -46
  101. package/build/tools/validation/double-entry.js +0 -66
  102. package/build/types/api-responses.d.ts +0 -21
  103. package/build/types/api-responses.js +0 -6
  104. package/build/types/bukku.d.ts +0 -93
  105. package/build/types/bukku.js +0 -11
  106. package/build/utils/logger.d.ts +0 -6
  107. package/build/utils/logger.js +0 -8
@@ -1,42 +0,0 @@
1
- /**
2
- * Reference Data Cache
3
- *
4
- * Transparent in-memory cache for Bukku reference data (tax codes, currencies, etc.)
5
- * with 5-minute TTL per roadmap requirement LIST-02.
6
- *
7
- * Features:
8
- * - In-memory Map-based storage
9
- * - 5-minute TTL (configurable for testing)
10
- * - Lazy deletion: expired entries removed on access
11
- * - Cache key = reference data type name (e.g., "tax_codes", "currencies")
12
- */
13
- export declare class ReferenceDataCache {
14
- private cache;
15
- private readonly ttlMs;
16
- /**
17
- * Create a new reference data cache
18
- * @param ttlMs Time-to-live in milliseconds (default: 5 minutes)
19
- */
20
- constructor(ttlMs?: number);
21
- /**
22
- * Get cached data by key
23
- * @param key Cache key (reference data type name)
24
- * @returns Cached data or undefined if not found or expired
25
- */
26
- get<T>(key: string): T | undefined;
27
- /**
28
- * Store data in cache with TTL
29
- * @param key Cache key (reference data type name)
30
- * @param data Data to cache
31
- */
32
- set<T>(key: string, data: T): void;
33
- /**
34
- * Invalidate a specific cache entry
35
- * @param key Cache key to invalidate
36
- */
37
- invalidate(key: string): void;
38
- /**
39
- * Clear all cached entries
40
- */
41
- clear(): void;
42
- }
@@ -1,63 +0,0 @@
1
- /**
2
- * Reference Data Cache
3
- *
4
- * Transparent in-memory cache for Bukku reference data (tax codes, currencies, etc.)
5
- * with 5-minute TTL per roadmap requirement LIST-02.
6
- *
7
- * Features:
8
- * - In-memory Map-based storage
9
- * - 5-minute TTL (configurable for testing)
10
- * - Lazy deletion: expired entries removed on access
11
- * - Cache key = reference data type name (e.g., "tax_codes", "currencies")
12
- */
13
- export class ReferenceDataCache {
14
- cache = new Map();
15
- ttlMs;
16
- /**
17
- * Create a new reference data cache
18
- * @param ttlMs Time-to-live in milliseconds (default: 5 minutes)
19
- */
20
- constructor(ttlMs = 5 * 60 * 1000) {
21
- this.ttlMs = ttlMs;
22
- }
23
- /**
24
- * Get cached data by key
25
- * @param key Cache key (reference data type name)
26
- * @returns Cached data or undefined if not found or expired
27
- */
28
- get(key) {
29
- const entry = this.cache.get(key);
30
- if (!entry)
31
- return undefined;
32
- // Check expiration (lazy deletion)
33
- if (Date.now() > entry.expiresAt) {
34
- this.cache.delete(key);
35
- return undefined;
36
- }
37
- return entry.data;
38
- }
39
- /**
40
- * Store data in cache with TTL
41
- * @param key Cache key (reference data type name)
42
- * @param data Data to cache
43
- */
44
- set(key, data) {
45
- this.cache.set(key, {
46
- data,
47
- expiresAt: Date.now() + this.ttlMs,
48
- });
49
- }
50
- /**
51
- * Invalidate a specific cache entry
52
- * @param key Cache key to invalidate
53
- */
54
- invalidate(key) {
55
- this.cache.delete(key);
56
- }
57
- /**
58
- * Clear all cached entries
59
- */
60
- clear() {
61
- this.cache.clear();
62
- }
63
- }
@@ -1,17 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Account Entity Configuration
4
- *
5
- * API: /accounts
6
- * Response keys: account (singular), accounts (plural)
7
- * Operations: get, create, update, delete ONLY — NO list operation
8
- * - List omitted because Phase 5's list-accounts reference data tool already
9
- * occupies that tool name (provides cached quick lookup)
10
- * - Use search-accounts (custom tool in account-tools.ts) for filtered search
11
- * of the chart of accounts
12
- * - Archive/unarchive handled by custom tools (account-tools.ts), not status
13
- * update, because API expects { is_archived: boolean }
14
- * Delete constraint: Only accounts with no children, not in locked system type,
15
- * and not used in transactions can be deleted
16
- */
17
- export declare const accountConfig: CrudEntityConfig;
@@ -1,28 +0,0 @@
1
- /**
2
- * Account Entity Configuration
3
- *
4
- * API: /accounts
5
- * Response keys: account (singular), accounts (plural)
6
- * Operations: get, create, update, delete ONLY — NO list operation
7
- * - List omitted because Phase 5's list-accounts reference data tool already
8
- * occupies that tool name (provides cached quick lookup)
9
- * - Use search-accounts (custom tool in account-tools.ts) for filtered search
10
- * of the chart of accounts
11
- * - Archive/unarchive handled by custom tools (account-tools.ts), not status
12
- * update, because API expects { is_archived: boolean }
13
- * Delete constraint: Only accounts with no children, not in locked system type,
14
- * and not used in transactions can be deleted
15
- */
16
- export const accountConfig = {
17
- entity: "account",
18
- apiBasePath: "/accounts",
19
- singularKey: "account",
20
- pluralKey: "accounts",
21
- description: "account",
22
- operations: ["get", "create", "update", "delete"],
23
- hasStatusUpdate: false,
24
- listFilters: [],
25
- businessRules: {
26
- delete: "Only accounts that are not assigned to locked system type, have no children, and are not used in transactions can be deleted. Use archive-account instead if the account has transaction history.",
27
- },
28
- };
@@ -1,10 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Bank Money In Entity Configuration
4
- *
5
- * API: /banking/incomes
6
- * Response keys: transaction (singular), transactions (plural)
7
- * Money In represents incoming cash transactions (deposits, receipts, etc.)
8
- * Shares the same status lifecycle as sales/purchase transactions.
9
- */
10
- export declare const bankMoneyInConfig: CrudEntityConfig;
@@ -1,22 +0,0 @@
1
- /**
2
- * Bank Money In Entity Configuration
3
- *
4
- * API: /banking/incomes
5
- * Response keys: transaction (singular), transactions (plural)
6
- * Money In represents incoming cash transactions (deposits, receipts, etc.)
7
- * Shares the same status lifecycle as sales/purchase transactions.
8
- */
9
- export const bankMoneyInConfig = {
10
- entity: "bank-money-in",
11
- apiBasePath: "/banking/incomes",
12
- singularKey: "transaction",
13
- pluralKey: "transactions",
14
- description: "bank money in transaction",
15
- operations: ["list", "get", "create", "update", "delete"],
16
- hasStatusUpdate: true,
17
- listFilters: ["contact_id", "account_id", "email_status"],
18
- businessRules: {
19
- delete: "Only draft and void money in transactions can be deleted. Ready or pending approval transactions cannot be deleted — use update-bank-money-in-status to void a ready transaction instead.",
20
- statusTransitions: "Valid transitions: draft -> pending_approval, draft -> ready, pending_approval -> ready, ready -> void. A void transaction is final and cannot be changed. There is no way to revert from ready, pending_approval, or void back to draft.",
21
- },
22
- };
@@ -1,10 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Bank Money Out Entity Configuration
4
- *
5
- * API: /banking/expenses
6
- * Response keys: transaction (singular), transactions (plural)
7
- * Money Out represents outgoing cash transactions (payments, disbursements, etc.)
8
- * Shares the same status lifecycle as sales/purchase transactions.
9
- */
10
- export declare const bankMoneyOutConfig: CrudEntityConfig;
@@ -1,22 +0,0 @@
1
- /**
2
- * Bank Money Out Entity Configuration
3
- *
4
- * API: /banking/expenses
5
- * Response keys: transaction (singular), transactions (plural)
6
- * Money Out represents outgoing cash transactions (payments, disbursements, etc.)
7
- * Shares the same status lifecycle as sales/purchase transactions.
8
- */
9
- export const bankMoneyOutConfig = {
10
- entity: "bank-money-out",
11
- apiBasePath: "/banking/expenses",
12
- singularKey: "transaction",
13
- pluralKey: "transactions",
14
- description: "bank money out transaction",
15
- operations: ["list", "get", "create", "update", "delete"],
16
- hasStatusUpdate: true,
17
- listFilters: ["contact_id", "account_id", "email_status"],
18
- businessRules: {
19
- delete: "Only draft and void money out transactions can be deleted. Ready or pending approval transactions cannot be deleted — use update-bank-money-out-status to void a ready transaction instead.",
20
- statusTransitions: "Valid transitions: draft -> pending_approval, draft -> ready, pending_approval -> ready, ready -> void. A void transaction is final and cannot be changed. There is no way to revert from ready, pending_approval, or void back to draft.",
21
- },
22
- };
@@ -1,11 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Bank Transfer Entity Configuration
4
- *
5
- * API: /banking/transfers
6
- * Response keys: transaction (singular), transactions (plural)
7
- * Transfers are account-to-account movements (no contact involved).
8
- * Has fewer list filters than money in/out — only account_id (no contact_id, no email_status).
9
- * Shares the same status lifecycle as other banking/sales/purchase transactions.
10
- */
11
- export declare const bankTransferConfig: CrudEntityConfig;
@@ -1,23 +0,0 @@
1
- /**
2
- * Bank Transfer Entity Configuration
3
- *
4
- * API: /banking/transfers
5
- * Response keys: transaction (singular), transactions (plural)
6
- * Transfers are account-to-account movements (no contact involved).
7
- * Has fewer list filters than money in/out — only account_id (no contact_id, no email_status).
8
- * Shares the same status lifecycle as other banking/sales/purchase transactions.
9
- */
10
- export const bankTransferConfig = {
11
- entity: "bank-transfer",
12
- apiBasePath: "/banking/transfers",
13
- singularKey: "transaction",
14
- pluralKey: "transactions",
15
- description: "bank transfer",
16
- operations: ["list", "get", "create", "update", "delete"],
17
- hasStatusUpdate: true,
18
- listFilters: ["account_id"],
19
- businessRules: {
20
- delete: "Only draft and void transfers can be deleted. Ready or pending approval transfers cannot be deleted — use update-bank-transfer-status to void a ready transfer instead.",
21
- statusTransitions: "Valid transitions: draft -> pending_approval, draft -> ready, pending_approval -> ready, ready -> void. A void transfer is final and cannot be changed. There is no way to revert from ready, pending_approval, or void back to draft.",
22
- },
23
- };
@@ -1,11 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Contact Group Entity Configuration
4
- *
5
- * API: /contacts/groups
6
- * Response keys: group (singular), groups (plural)
7
- * Groups organize contacts into categories.
8
- * Simplest entity config — no status operations, no entity-specific filters,
9
- * no business rules. Factory provides base pagination parameters.
10
- */
11
- export declare const contactGroupConfig: CrudEntityConfig;
@@ -1,19 +0,0 @@
1
- /**
2
- * Contact Group Entity Configuration
3
- *
4
- * API: /contacts/groups
5
- * Response keys: group (singular), groups (plural)
6
- * Groups organize contacts into categories.
7
- * Simplest entity config — no status operations, no entity-specific filters,
8
- * no business rules. Factory provides base pagination parameters.
9
- */
10
- export const contactGroupConfig = {
11
- entity: "contact-group",
12
- apiBasePath: "/contacts/groups",
13
- singularKey: "group",
14
- pluralKey: "groups",
15
- description: "contact group",
16
- operations: ["list", "get", "create", "update", "delete"],
17
- hasStatusUpdate: false,
18
- listFilters: [],
19
- };
@@ -1,14 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Contact Entity Configuration
4
- *
5
- * API: /contacts
6
- * Response keys: contact (singular), contacts (plural) — NOT transaction/transactions
7
- * This is the first non-transaction entity; uses custom wrapper keys.
8
- * Archive/unarchive is handled by separate custom tools (contact-archive.ts),
9
- * NOT the factory status tool, because the API expects { is_archived: boolean }
10
- * instead of { status: string }.
11
- * List filter: status accepts ALL, ACTIVE, or INACTIVE values.
12
- * List filter: type accepts customer, supplier, or employee values.
13
- */
14
- export declare const contactConfig: CrudEntityConfig;
@@ -1,25 +0,0 @@
1
- /**
2
- * Contact Entity Configuration
3
- *
4
- * API: /contacts
5
- * Response keys: contact (singular), contacts (plural) — NOT transaction/transactions
6
- * This is the first non-transaction entity; uses custom wrapper keys.
7
- * Archive/unarchive is handled by separate custom tools (contact-archive.ts),
8
- * NOT the factory status tool, because the API expects { is_archived: boolean }
9
- * instead of { status: string }.
10
- * List filter: status accepts ALL, ACTIVE, or INACTIVE values.
11
- * List filter: type accepts customer, supplier, or employee values.
12
- */
13
- export const contactConfig = {
14
- entity: "contact",
15
- apiBasePath: "/contacts",
16
- singularKey: "contact",
17
- pluralKey: "contacts",
18
- description: "contact",
19
- operations: ["list", "get", "create", "update", "delete"],
20
- hasStatusUpdate: false,
21
- listFilters: ["group_id", "status", "type", "is_myinvois_ready"],
22
- businessRules: {
23
- delete: "Only contacts with no linked transactions can be deleted. Archive instead if the contact has transaction history.",
24
- },
25
- };
@@ -1,8 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Delivery Order Entity Configuration
4
- *
5
- * API: /sales/delivery_orders
6
- * Response keys: transaction (singular), transactions (plural)
7
- */
8
- export declare const deliveryOrderConfig: CrudEntityConfig;
@@ -1,20 +0,0 @@
1
- /**
2
- * Delivery Order Entity Configuration
3
- *
4
- * API: /sales/delivery_orders
5
- * Response keys: transaction (singular), transactions (plural)
6
- */
7
- export const deliveryOrderConfig = {
8
- entity: "delivery-order",
9
- apiBasePath: "/sales/delivery_orders",
10
- singularKey: "transaction",
11
- pluralKey: "transactions",
12
- description: "delivery order",
13
- operations: ["list", "get", "create", "update", "delete"],
14
- hasStatusUpdate: true,
15
- listFilters: ["contact_id", "email_status", "transfer_status"],
16
- businessRules: {
17
- delete: "Only draft and void delivery orders can be deleted. Ready or pending approval delivery orders cannot be deleted — use update-delivery-order-status to void a ready delivery order instead.",
18
- statusTransitions: "Valid transitions: draft -> pending_approval, draft -> ready, pending_approval -> ready, ready -> void. A void delivery order is final and cannot be changed. There is no way to revert from ready, pending_approval, or void back to draft.",
19
- },
20
- };
@@ -1,18 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * File Entity Configuration
4
- *
5
- * API: /files
6
- * Response keys: file (singular), files (plural)
7
- *
8
- * Files are typically attached to sales and purchase transactions using file_ids arrays.
9
- * The create operation is handled by a custom upload-file tool (not the factory create tool)
10
- * because file upload requires multipart/form-data, not JSON.
11
- *
12
- * API limitations:
13
- * - No delete endpoint (files are permanent once uploaded)
14
- * - No update endpoint (files are immutable)
15
- * - No pagination support for list (returns ALL files)
16
- * - No list filters (API spec shows no query parameters)
17
- */
18
- export declare const fileConfig: CrudEntityConfig;
@@ -1,26 +0,0 @@
1
- /**
2
- * File Entity Configuration
3
- *
4
- * API: /files
5
- * Response keys: file (singular), files (plural)
6
- *
7
- * Files are typically attached to sales and purchase transactions using file_ids arrays.
8
- * The create operation is handled by a custom upload-file tool (not the factory create tool)
9
- * because file upload requires multipart/form-data, not JSON.
10
- *
11
- * API limitations:
12
- * - No delete endpoint (files are permanent once uploaded)
13
- * - No update endpoint (files are immutable)
14
- * - No pagination support for list (returns ALL files)
15
- * - No list filters (API spec shows no query parameters)
16
- */
17
- export const fileConfig = {
18
- entity: "file",
19
- apiBasePath: "/files",
20
- singularKey: "file",
21
- pluralKey: "files",
22
- description: "file. Files are typically attached to sales and purchase transactions using file_ids arrays. Use upload-file to add new files.",
23
- operations: ["list", "get"],
24
- hasStatusUpdate: false,
25
- listFilters: [],
26
- };
@@ -1,8 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Goods Received Note Entity Configuration
4
- *
5
- * API: /purchases/goods_received_notes
6
- * Response keys: transaction (singular), transactions (plural)
7
- */
8
- export declare const goodsReceivedNoteConfig: CrudEntityConfig;
@@ -1,20 +0,0 @@
1
- /**
2
- * Goods Received Note Entity Configuration
3
- *
4
- * API: /purchases/goods_received_notes
5
- * Response keys: transaction (singular), transactions (plural)
6
- */
7
- export const goodsReceivedNoteConfig = {
8
- entity: "goods-received-note",
9
- apiBasePath: "/purchases/goods_received_notes",
10
- singularKey: "transaction",
11
- pluralKey: "transactions",
12
- description: "goods received note",
13
- operations: ["list", "get", "create", "update", "delete"],
14
- hasStatusUpdate: true,
15
- listFilters: ["contact_id", "email_status", "transfer_status"],
16
- businessRules: {
17
- delete: "Only draft and void goods received notes can be deleted. Ready or pending approval goods received notes cannot be deleted — use update-goods-received-note-status to void a ready goods received note instead.",
18
- statusTransitions: "Valid transitions: draft -> pending_approval, draft -> ready, pending_approval -> ready, ready -> void. A void goods received note is final and cannot be changed. There is no way to revert from ready, pending_approval, or void back to draft.",
19
- },
20
- };
@@ -1,14 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Journal Entry Entity Configuration
4
- *
5
- * API: /journal_entries
6
- * Response keys: transaction (singular), transactions (plural)
7
- * Operations: list, get, delete ONLY
8
- * - Create and update are handled by custom tools (journal-entry-tools.ts)
9
- * because they require double-entry validation (debits == credits)
10
- * - Status updates use standard factory pattern (hasStatusUpdate: true)
11
- * Status lifecycle: draft -> ready (posted), ready -> void (final)
12
- * Delete constraint: Only draft and void entries can be deleted
13
- */
14
- export declare const journalEntryConfig: CrudEntityConfig;
@@ -1,26 +0,0 @@
1
- /**
2
- * Journal Entry Entity Configuration
3
- *
4
- * API: /journal_entries
5
- * Response keys: transaction (singular), transactions (plural)
6
- * Operations: list, get, delete ONLY
7
- * - Create and update are handled by custom tools (journal-entry-tools.ts)
8
- * because they require double-entry validation (debits == credits)
9
- * - Status updates use standard factory pattern (hasStatusUpdate: true)
10
- * Status lifecycle: draft -> ready (posted), ready -> void (final)
11
- * Delete constraint: Only draft and void entries can be deleted
12
- */
13
- export const journalEntryConfig = {
14
- entity: "journal-entry",
15
- apiBasePath: "/journal_entries",
16
- singularKey: "transaction",
17
- pluralKey: "transactions",
18
- description: "journal entry",
19
- operations: ["list", "get", "delete"],
20
- hasStatusUpdate: true,
21
- listFilters: [],
22
- businessRules: {
23
- delete: "Only draft and void journal entries can be deleted. Ready journal entries cannot be deleted -- use update-journal-entry-status to void a ready entry instead.",
24
- statusTransitions: "Valid transitions: draft -> ready, ready -> void. A void entry is final and cannot be changed.",
25
- },
26
- };
@@ -1,20 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Location Entity Configuration
4
- *
5
- * API: /locations (list, create) and /location/{id} (get, update, delete)
6
- * Response keys: location (singular), locations (plural)
7
- *
8
- * API PATH INCONSISTENCY:
9
- * - List/create use /locations (plural)
10
- * - Get/update/delete use /location/{id} (singular)
11
- *
12
- * The factory generates tools based on apiBasePath, which would produce:
13
- * - /locations for list/create ✓
14
- * - /locations/{id} for get/update/delete ✗ (incorrect)
15
- *
16
- * Therefore, this config only enables list and create operations.
17
- * Get/update/delete operations are handled by custom tools in location-tools.ts
18
- * which use the correct /location/{id} singular path.
19
- */
20
- export declare const locationConfig: CrudEntityConfig;
@@ -1,28 +0,0 @@
1
- /**
2
- * Location Entity Configuration
3
- *
4
- * API: /locations (list, create) and /location/{id} (get, update, delete)
5
- * Response keys: location (singular), locations (plural)
6
- *
7
- * API PATH INCONSISTENCY:
8
- * - List/create use /locations (plural)
9
- * - Get/update/delete use /location/{id} (singular)
10
- *
11
- * The factory generates tools based on apiBasePath, which would produce:
12
- * - /locations for list/create ✓
13
- * - /locations/{id} for get/update/delete ✗ (incorrect)
14
- *
15
- * Therefore, this config only enables list and create operations.
16
- * Get/update/delete operations are handled by custom tools in location-tools.ts
17
- * which use the correct /location/{id} singular path.
18
- */
19
- export const locationConfig = {
20
- entity: "location",
21
- apiBasePath: "/locations",
22
- singularKey: "location",
23
- pluralKey: "locations",
24
- description: "location for multi-branch accounting. Use locations to track which branch or office a transaction belongs to.",
25
- operations: ["list", "create"],
26
- hasStatusUpdate: false,
27
- listFilters: ["include_archived"],
28
- };
@@ -1,18 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Product Bundle Entity Configuration
4
- *
5
- * API: /products/bundles
6
- * Response keys: bundle (singular), bundles (plural) — custom wrapper keys
7
- * Bundles aggregate multiple products with optional discounts.
8
- * Archive/unarchive is handled by separate custom tools (product-archive.ts),
9
- * NOT the factory status tool, because the API expects { is_archived: boolean }
10
- * instead of { status: string }.
11
- *
12
- * Note: Bukku API has no GET /products/bundles endpoint.
13
- * To list bundles, use GET /products?type=bundle (the list-products tool with type=bundle filter).
14
- *
15
- * Cross-references:
16
- * - Use list-products to find product IDs for bundle items
17
- */
18
- export declare const productBundleConfig: CrudEntityConfig;
@@ -1,29 +0,0 @@
1
- /**
2
- * Product Bundle Entity Configuration
3
- *
4
- * API: /products/bundles
5
- * Response keys: bundle (singular), bundles (plural) — custom wrapper keys
6
- * Bundles aggregate multiple products with optional discounts.
7
- * Archive/unarchive is handled by separate custom tools (product-archive.ts),
8
- * NOT the factory status tool, because the API expects { is_archived: boolean }
9
- * instead of { status: string }.
10
- *
11
- * Note: Bukku API has no GET /products/bundles endpoint.
12
- * To list bundles, use GET /products?type=bundle (the list-products tool with type=bundle filter).
13
- *
14
- * Cross-references:
15
- * - Use list-products to find product IDs for bundle items
16
- */
17
- export const productBundleConfig = {
18
- entity: "product-bundle",
19
- apiBasePath: "/products/bundles",
20
- singularKey: "bundle",
21
- pluralKey: "bundles",
22
- description: "product bundle. Bundles aggregate multiple products with optional discounts. To list bundles, use list-products with type=bundle. Use list-products to find product IDs for bundle items.",
23
- operations: ["get", "create", "update", "delete"],
24
- hasStatusUpdate: false,
25
- listFilters: [],
26
- businessRules: {
27
- delete: "Only bundles that are not used in any transactions can be deleted.",
28
- },
29
- };
@@ -1,14 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Product Group Entity Configuration
4
- *
5
- * API: /products/groups
6
- * Response keys: group (singular), groups (plural)
7
- * Groups organize products into categories.
8
- * Simplest entity config — no status operations, no entity-specific filters,
9
- * no business rules. Factory provides base pagination parameters.
10
- *
11
- * Cross-references:
12
- * - Use list-products to find product IDs for the product_ids array
13
- */
14
- export declare const productGroupConfig: CrudEntityConfig;
@@ -1,22 +0,0 @@
1
- /**
2
- * Product Group Entity Configuration
3
- *
4
- * API: /products/groups
5
- * Response keys: group (singular), groups (plural)
6
- * Groups organize products into categories.
7
- * Simplest entity config — no status operations, no entity-specific filters,
8
- * no business rules. Factory provides base pagination parameters.
9
- *
10
- * Cross-references:
11
- * - Use list-products to find product IDs for the product_ids array
12
- */
13
- export const productGroupConfig = {
14
- entity: "product-group",
15
- apiBasePath: "/products/groups",
16
- singularKey: "group",
17
- pluralKey: "groups",
18
- description: "product group. Groups organize products into categories. Use list-products to find product IDs for the product_ids array.",
19
- operations: ["list", "get", "create", "update", "delete"],
20
- hasStatusUpdate: false,
21
- listFilters: [],
22
- };
@@ -1,24 +0,0 @@
1
- import type { CrudEntityConfig } from "../../types/bukku.js";
2
- /**
3
- * Product Entity Configuration
4
- *
5
- * API: /products
6
- * Response keys: product (singular), products (plural) — NOT transaction/transactions
7
- * Products are non-transaction entities with custom wrapper keys.
8
- * Archive/unarchive is handled by separate custom tools (product-archive.ts),
9
- * NOT the factory status tool, because the API expects { is_archived: boolean }
10
- * instead of { status: string }.
11
- *
12
- * List filters:
13
- * - search: Text search across product name/code
14
- * - stock_level: Filter by stock level (low, medium, high)
15
- * - mode: Filter by product mode (sale, purchase, both)
16
- * - type: Filter by product type (tracked, untracked, service)
17
- * - include_archived: Boolean to include archived products in results
18
- *
19
- * Cross-references:
20
- * - Use list-tax-codes to find valid tax code IDs for sale_tax_code_id and purchase_tax_code_id
21
- * - Use list-accounts to find valid account IDs for sale_account_id, purchase_account_id, and inventory_account_id
22
- * - Use list-product-groups to find group IDs for group_ids array
23
- */
24
- export declare const productConfig: CrudEntityConfig;