@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.
- package/build/config/env.d.ts +1 -0
- package/build/config/env.d.ts.map +1 -0
- package/build/config/env.js +2 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +1813 -44
- package/build/tools/custom/account-tools.d.ts +2 -1
- package/build/tools/custom/account-tools.d.ts.map +1 -0
- package/build/tools/custom/account-tools.js +2 -2
- package/build/tools/custom/contact-archive.d.ts +2 -1
- package/build/tools/custom/contact-archive.d.ts.map +1 -0
- package/build/tools/custom/contact-archive.js +2 -2
- package/build/tools/custom/control-panel-archive.d.ts +2 -1
- package/build/tools/custom/control-panel-archive.d.ts.map +1 -0
- package/build/tools/custom/control-panel-archive.js +2 -2
- package/build/tools/custom/file-upload.d.ts +2 -1
- package/build/tools/custom/file-upload.d.ts.map +1 -0
- package/build/tools/custom/file-upload.js +2 -2
- package/build/tools/custom/journal-entry-tools.d.ts +2 -1
- package/build/tools/custom/journal-entry-tools.d.ts.map +1 -0
- package/build/tools/custom/journal-entry-tools.js +2 -3
- package/build/tools/custom/location-tools.d.ts +2 -1
- package/build/tools/custom/location-tools.d.ts.map +1 -0
- package/build/tools/custom/location-tools.js +2 -2
- package/build/tools/custom/product-archive.d.ts +2 -1
- package/build/tools/custom/product-archive.d.ts.map +1 -0
- package/build/tools/custom/product-archive.js +2 -2
- package/build/tools/custom/reference-data.d.ts +3 -2
- package/build/tools/custom/reference-data.d.ts.map +1 -0
- package/build/tools/custom/reference-data.js +2 -2
- package/build/tools/factory.d.ts +2 -2
- package/build/tools/factory.d.ts.map +1 -0
- package/build/tools/factory.js +2 -2
- package/build/tools/registry.d.ts +2 -1
- package/build/tools/registry.d.ts.map +1 -0
- package/build/tools/registry.js +3 -41
- package/package.json +9 -22
- package/LICENSE +0 -21
- package/README.md +0 -269
- package/build/client/bukku-client.d.ts +0 -62
- package/build/client/bukku-client.js +0 -195
- package/build/errors/transform.d.ts +0 -14
- package/build/errors/transform.js +0 -141
- package/build/tools/cache/reference-cache.d.ts +0 -42
- package/build/tools/cache/reference-cache.js +0 -63
- package/build/tools/configs/account.d.ts +0 -17
- package/build/tools/configs/account.js +0 -28
- package/build/tools/configs/bank-money-in.d.ts +0 -10
- package/build/tools/configs/bank-money-in.js +0 -22
- package/build/tools/configs/bank-money-out.d.ts +0 -10
- package/build/tools/configs/bank-money-out.js +0 -22
- package/build/tools/configs/bank-transfer.d.ts +0 -11
- package/build/tools/configs/bank-transfer.js +0 -23
- package/build/tools/configs/contact-group.d.ts +0 -11
- package/build/tools/configs/contact-group.js +0 -19
- package/build/tools/configs/contact.d.ts +0 -14
- package/build/tools/configs/contact.js +0 -25
- package/build/tools/configs/delivery-order.d.ts +0 -8
- package/build/tools/configs/delivery-order.js +0 -20
- package/build/tools/configs/file.d.ts +0 -18
- package/build/tools/configs/file.js +0 -26
- package/build/tools/configs/goods-received-note.d.ts +0 -8
- package/build/tools/configs/goods-received-note.js +0 -20
- package/build/tools/configs/journal-entry.d.ts +0 -14
- package/build/tools/configs/journal-entry.js +0 -26
- package/build/tools/configs/location.d.ts +0 -20
- package/build/tools/configs/location.js +0 -28
- package/build/tools/configs/product-bundle.d.ts +0 -18
- package/build/tools/configs/product-bundle.js +0 -29
- package/build/tools/configs/product-group.d.ts +0 -14
- package/build/tools/configs/product-group.js +0 -22
- package/build/tools/configs/product.d.ts +0 -24
- package/build/tools/configs/product.js +0 -35
- package/build/tools/configs/purchase-bill.d.ts +0 -9
- package/build/tools/configs/purchase-bill.js +0 -21
- package/build/tools/configs/purchase-credit-note.d.ts +0 -8
- package/build/tools/configs/purchase-credit-note.js +0 -20
- package/build/tools/configs/purchase-order.d.ts +0 -8
- package/build/tools/configs/purchase-order.js +0 -20
- package/build/tools/configs/purchase-payment.d.ts +0 -8
- package/build/tools/configs/purchase-payment.js +0 -20
- package/build/tools/configs/purchase-refund.d.ts +0 -8
- package/build/tools/configs/purchase-refund.js +0 -20
- package/build/tools/configs/sales-credit-note.d.ts +0 -8
- package/build/tools/configs/sales-credit-note.js +0 -20
- package/build/tools/configs/sales-invoice.d.ts +0 -8
- package/build/tools/configs/sales-invoice.js +0 -20
- package/build/tools/configs/sales-order.d.ts +0 -8
- package/build/tools/configs/sales-order.js +0 -20
- package/build/tools/configs/sales-payment.d.ts +0 -8
- package/build/tools/configs/sales-payment.js +0 -20
- package/build/tools/configs/sales-quote.d.ts +0 -8
- package/build/tools/configs/sales-quote.js +0 -20
- package/build/tools/configs/sales-refund.d.ts +0 -8
- package/build/tools/configs/sales-refund.js +0 -20
- package/build/tools/configs/tag-group.d.ts +0 -11
- package/build/tools/configs/tag-group.js +0 -22
- package/build/tools/configs/tag.d.ts +0 -11
- package/build/tools/configs/tag.js +0 -22
- package/build/tools/validation/double-entry.d.ts +0 -46
- package/build/tools/validation/double-entry.js +0 -66
- package/build/types/api-responses.d.ts +0 -21
- package/build/types/api-responses.js +0 -6
- package/build/types/bukku.d.ts +0 -93
- package/build/types/bukku.js +0 -11
- package/build/utils/logger.d.ts +0 -6
- package/build/utils/logger.js +0 -8
package/build/types/bukku.d.ts
DELETED
|
@@ -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
|
-
}
|
package/build/types/bukku.js
DELETED
|
@@ -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 {};
|
package/build/utils/logger.d.ts
DELETED
package/build/utils/logger.js
DELETED
|
@@ -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
|
-
}
|