@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,93 +0,0 @@
1
- /**
2
- * Core Bukku API Type Definitions
3
- *
4
- * Hand-crafted from OpenAPI specs in .api-specs/
5
- * These types define the common patterns used across all Bukku API endpoints:
6
- * - Pagination response structure
7
- * - Error response format
8
- * - List query parameters
9
- * - CRUD entity configuration for the factory pattern
10
- */
11
- /**
12
- * Pagination metadata returned by Bukku list endpoints
13
- * Derived from resPaging schema in sales.yaml
14
- */
15
- export interface BukkuPaging {
16
- current_page: number;
17
- per_page: number;
18
- total: number;
19
- }
20
- /**
21
- * Paginated list response wrapper
22
- * All list endpoints return { paging: {...}, [pluralKey]: [...] }
23
- * e.g., { paging: {...}, transactions: [...] }
24
- */
25
- export interface BukkuPaginatedResponse<T> {
26
- paging: BukkuPaging;
27
- [key: string]: T[] | BukkuPaging;
28
- }
29
- /**
30
- * Single item response wrapper
31
- * All get/create/update endpoints return { [singularKey]: {...} }
32
- * e.g., { transaction: {...} }
33
- */
34
- export interface BukkuSingleResponse<T> {
35
- [key: string]: T;
36
- }
37
- /**
38
- * Error response structure
39
- * Derived from general-error.yaml pattern
40
- * - message: Human-readable error message
41
- * - errors: Optional validation errors (field -> error messages[])
42
- */
43
- export interface BukkuErrorResponse {
44
- message: string;
45
- errors?: Record<string, string[]>;
46
- }
47
- /**
48
- * Common list query parameters shared across all list endpoints
49
- * Derived from parameters/query/* in OpenAPI specs
50
- */
51
- export interface BukkuListParams {
52
- page?: number;
53
- page_size?: number;
54
- sort_by?: string;
55
- sort_dir?: 'asc' | 'desc';
56
- search?: string;
57
- date_from?: string;
58
- date_to?: string;
59
- status?: string;
60
- }
61
- /**
62
- * CRUD operations supported by the factory pattern
63
- */
64
- export type CrudOperation = 'list' | 'get' | 'create' | 'update' | 'delete';
65
- /**
66
- * Entity configuration for the CRUD factory pattern
67
- * Defines all the metadata needed to generate MCP tools for a Bukku entity
68
- */
69
- export interface CrudEntityConfig {
70
- /** Entity identifier (e.g., "sales-invoice") */
71
- entity: string;
72
- /** API base path (e.g., "/sales/invoices") */
73
- apiBasePath: string;
74
- /** Response wrapper key for single item (e.g., "transaction") */
75
- singularKey: string;
76
- /** Response wrapper key for list items (e.g., "transactions") */
77
- pluralKey: string;
78
- /** Human-readable description for tool metadata (e.g., "sales invoice") */
79
- description: string;
80
- /** Which CRUD operations this entity supports */
81
- operations: CrudOperation[];
82
- /** Whether this entity supports status updates (e.g., draft -> posted) */
83
- hasStatusUpdate?: boolean;
84
- /** Additional list filter parameters beyond the common ones */
85
- listFilters?: string[];
86
- /** Optional business-rule context surfaced in tool descriptions to guide LLM behavior */
87
- businessRules?: {
88
- /** Constraints on when delete is allowed and what to do instead (appended to delete tool description) */
89
- delete?: string;
90
- /** Valid status transitions and lifecycle rules (appended to update-status tool description) */
91
- statusTransitions?: string;
92
- };
93
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Core Bukku API Type Definitions
3
- *
4
- * Hand-crafted from OpenAPI specs in .api-specs/
5
- * These types define the common patterns used across all Bukku API endpoints:
6
- * - Pagination response structure
7
- * - Error response format
8
- * - List query parameters
9
- * - CRUD entity configuration for the factory pattern
10
- */
11
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * Logger utility for MCP server.
3
- * CRITICAL: All logs must go to stderr, NEVER stdout.
4
- * MCP servers communicate via stdio - stdout is reserved for protocol messages.
5
- */
6
- export declare function log(message: string, ...args: unknown[]): void;
@@ -1,8 +0,0 @@
1
- /**
2
- * Logger utility for MCP server.
3
- * CRITICAL: All logs must go to stderr, NEVER stdout.
4
- * MCP servers communicate via stdio - stdout is reserved for protocol messages.
5
- */
6
- export function log(message, ...args) {
7
- console.error(`[bukku-mcp] ${message}`, ...args);
8
- }