mcp-quickbase 2.0.1

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 (135) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/LICENSE +21 -0
  3. package/README.md +301 -0
  4. package/dist/client/quickbase.d.ts +28 -0
  5. package/dist/client/quickbase.js +235 -0
  6. package/dist/client/quickbase.js.map +1 -0
  7. package/dist/mcp/index.d.ts +4 -0
  8. package/dist/mcp/index.js +21 -0
  9. package/dist/mcp/index.js.map +1 -0
  10. package/dist/mcp/server.d.ts +19 -0
  11. package/dist/mcp/server.js +102 -0
  12. package/dist/mcp/server.js.map +1 -0
  13. package/dist/mcp-stdio-server.d.ts +2 -0
  14. package/dist/mcp-stdio-server.js +168 -0
  15. package/dist/mcp-stdio-server.js.map +1 -0
  16. package/dist/server.d.ts +2 -0
  17. package/dist/server.js +318 -0
  18. package/dist/server.js.map +1 -0
  19. package/dist/tools/apps/create_app.d.ts +87 -0
  20. package/dist/tools/apps/create_app.js +87 -0
  21. package/dist/tools/apps/create_app.js.map +1 -0
  22. package/dist/tools/apps/index.d.ts +9 -0
  23. package/dist/tools/apps/index.js +40 -0
  24. package/dist/tools/apps/index.js.map +1 -0
  25. package/dist/tools/apps/list_tables.d.ts +108 -0
  26. package/dist/tools/apps/list_tables.js +100 -0
  27. package/dist/tools/apps/list_tables.js.map +1 -0
  28. package/dist/tools/apps/update_app.d.ts +91 -0
  29. package/dist/tools/apps/update_app.js +99 -0
  30. package/dist/tools/apps/update_app.js.map +1 -0
  31. package/dist/tools/base.d.ts +47 -0
  32. package/dist/tools/base.js +63 -0
  33. package/dist/tools/base.js.map +1 -0
  34. package/dist/tools/configure_cache.d.ts +81 -0
  35. package/dist/tools/configure_cache.js +77 -0
  36. package/dist/tools/configure_cache.js.map +1 -0
  37. package/dist/tools/fields/create_field.d.ts +121 -0
  38. package/dist/tools/fields/create_field.js +102 -0
  39. package/dist/tools/fields/create_field.js.map +1 -0
  40. package/dist/tools/fields/index.d.ts +8 -0
  41. package/dist/tools/fields/index.js +37 -0
  42. package/dist/tools/fields/index.js.map +1 -0
  43. package/dist/tools/fields/update_field.d.ts +112 -0
  44. package/dist/tools/fields/update_field.js +114 -0
  45. package/dist/tools/fields/update_field.js.map +1 -0
  46. package/dist/tools/files/download_file.d.ts +111 -0
  47. package/dist/tools/files/download_file.js +173 -0
  48. package/dist/tools/files/download_file.js.map +1 -0
  49. package/dist/tools/files/index.d.ts +8 -0
  50. package/dist/tools/files/index.js +37 -0
  51. package/dist/tools/files/index.js.map +1 -0
  52. package/dist/tools/files/upload_file.d.ts +107 -0
  53. package/dist/tools/files/upload_file.js +211 -0
  54. package/dist/tools/files/upload_file.js.map +1 -0
  55. package/dist/tools/index.d.ts +18 -0
  56. package/dist/tools/index.js +65 -0
  57. package/dist/tools/index.js.map +1 -0
  58. package/dist/tools/records/bulk_create_records.d.ts +75 -0
  59. package/dist/tools/records/bulk_create_records.js +104 -0
  60. package/dist/tools/records/bulk_create_records.js.map +1 -0
  61. package/dist/tools/records/bulk_update_records.d.ts +77 -0
  62. package/dist/tools/records/bulk_update_records.js +102 -0
  63. package/dist/tools/records/bulk_update_records.js.map +1 -0
  64. package/dist/tools/records/create_record.d.ts +68 -0
  65. package/dist/tools/records/create_record.js +123 -0
  66. package/dist/tools/records/create_record.js.map +1 -0
  67. package/dist/tools/records/index.d.ts +11 -0
  68. package/dist/tools/records/index.js +46 -0
  69. package/dist/tools/records/index.js.map +1 -0
  70. package/dist/tools/records/query_records.d.ts +164 -0
  71. package/dist/tools/records/query_records.js +261 -0
  72. package/dist/tools/records/query_records.js.map +1 -0
  73. package/dist/tools/records/update_record.d.ts +81 -0
  74. package/dist/tools/records/update_record.js +99 -0
  75. package/dist/tools/records/update_record.js.map +1 -0
  76. package/dist/tools/registry.d.ts +41 -0
  77. package/dist/tools/registry.js +66 -0
  78. package/dist/tools/registry.js.map +1 -0
  79. package/dist/tools/reports/index.d.ts +6 -0
  80. package/dist/tools/reports/index.js +31 -0
  81. package/dist/tools/reports/index.js.map +1 -0
  82. package/dist/tools/reports/run_report.d.ts +70 -0
  83. package/dist/tools/reports/run_report.js +72 -0
  84. package/dist/tools/reports/run_report.js.map +1 -0
  85. package/dist/tools/tables/create_table.d.ts +142 -0
  86. package/dist/tools/tables/create_table.js +119 -0
  87. package/dist/tools/tables/create_table.js.map +1 -0
  88. package/dist/tools/tables/get_table_fields.d.ts +108 -0
  89. package/dist/tools/tables/get_table_fields.js +96 -0
  90. package/dist/tools/tables/get_table_fields.js.map +1 -0
  91. package/dist/tools/tables/index.d.ts +9 -0
  92. package/dist/tools/tables/index.js +40 -0
  93. package/dist/tools/tables/index.js.map +1 -0
  94. package/dist/tools/tables/update_table.d.ts +91 -0
  95. package/dist/tools/tables/update_table.js +99 -0
  96. package/dist/tools/tables/update_table.js.map +1 -0
  97. package/dist/tools/test_connection.d.ts +51 -0
  98. package/dist/tools/test_connection.js +101 -0
  99. package/dist/tools/test_connection.js.map +1 -0
  100. package/dist/types/api.d.ts +70 -0
  101. package/dist/types/api.js +6 -0
  102. package/dist/types/api.js.map +1 -0
  103. package/dist/types/config.d.ts +49 -0
  104. package/dist/types/config.js +3 -0
  105. package/dist/types/config.js.map +1 -0
  106. package/dist/types/mcp.d.ts +55 -0
  107. package/dist/types/mcp.js +3 -0
  108. package/dist/types/mcp.js.map +1 -0
  109. package/dist/utils/cache.d.ts +87 -0
  110. package/dist/utils/cache.js +211 -0
  111. package/dist/utils/cache.js.map +1 -0
  112. package/dist/utils/file.d.ts +40 -0
  113. package/dist/utils/file.js +167 -0
  114. package/dist/utils/file.js.map +1 -0
  115. package/dist/utils/logger.d.ts +37 -0
  116. package/dist/utils/logger.js +144 -0
  117. package/dist/utils/logger.js.map +1 -0
  118. package/dist/utils/retry.d.ts +39 -0
  119. package/dist/utils/retry.js +88 -0
  120. package/dist/utils/retry.js.map +1 -0
  121. package/dist/utils/validation.d.ts +32 -0
  122. package/dist/utils/validation.js +227 -0
  123. package/dist/utils/validation.js.map +1 -0
  124. package/docs/README.md +41 -0
  125. package/docs/architecture.md +94 -0
  126. package/docs/claude-prompts.md +218 -0
  127. package/docs/deployment.md +244 -0
  128. package/docs/developer-guide.md +537 -0
  129. package/docs/final-qa-report.md +243 -0
  130. package/docs/performance-benchmarks.md +306 -0
  131. package/docs/quick-reference.md +109 -0
  132. package/docs/quickstart.md +183 -0
  133. package/docs/security-review.md +263 -0
  134. package/docs/tools.md +269 -0
  135. package/package.json +68 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk_update_records.js","sourceRoot":"","sources":["../../../src/tools/records/bulk_update_records.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,uBAAuB,CAAC,CAAC;AA0CrD;;GAEG;AACH,MAAa,qBAAsB,SAAQ,eAA0D;IA0BnG;;;OAGG;IACH,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAC;QA9BT,SAAI,GAAG,qBAAqB,CAAC;QAC7B,gBAAW,GAAG,+CAA+C,CAAC;QAErE;;WAEG;QACI,gBAAW,GAAG;YACnB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,0DAA0D;oBACvE,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,oBAAoB,EAAE,IAAI;qBAC3B;iBACF;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;SAClC,CAAC;IAQF,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,GAAG,CAAC,MAA+B;QACjD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAErC,MAAM,CAAC,IAAI,CAAC,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C,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE;gBAC5C,KAAK,EAAE,QAAQ,CAAC,KAAK;gBACrB,OAAO,EAAE,QAAQ;aAClB,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,+BAA+B,CAAC,CAAC;QAC9E,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEnD,MAAM,CAAC,IAAI,CAAC,wBAAwB,SAAS,CAAC,MAAM,UAAU,EAAE;YAC9D,WAAW,EAAE,SAAS,CAAC,MAAM;YAC7B,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,OAAO;YACL,SAAS;YACT,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE,SAAS,CAAC,MAAM;YAC9B,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AAzGD,sDAyGC"}
@@ -0,0 +1,68 @@
1
+ import { BaseTool } from '../base';
2
+ import { QuickbaseClient } from '../../client/quickbase';
3
+ /**
4
+ * Parameters for create_record tool
5
+ */
6
+ export interface CreateRecordParams {
7
+ /**
8
+ * The ID of the table to create the record in
9
+ */
10
+ table_id: string;
11
+ /**
12
+ * The data for the new record, formatted as a JSON object
13
+ * with field IDs or field names as keys
14
+ */
15
+ data: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Response from creating a record
19
+ */
20
+ export interface CreateRecordResult {
21
+ /**
22
+ * The ID of the created record
23
+ */
24
+ recordId: string;
25
+ /**
26
+ * The ID of the table the record was created in
27
+ */
28
+ tableId: string;
29
+ /**
30
+ * Creation timestamp
31
+ */
32
+ createdTime?: string;
33
+ }
34
+ /**
35
+ * Tool for creating a new record in a Quickbase table
36
+ */
37
+ export declare class CreateRecordTool extends BaseTool<CreateRecordParams, CreateRecordResult> {
38
+ name: string;
39
+ description: string;
40
+ /**
41
+ * Parameter schema for create_record
42
+ */
43
+ paramSchema: {
44
+ type: string;
45
+ properties: {
46
+ table_id: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ data: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ };
55
+ required: string[];
56
+ };
57
+ /**
58
+ * Constructor
59
+ * @param client Quickbase client
60
+ */
61
+ constructor(client: QuickbaseClient);
62
+ /**
63
+ * Run the create_record tool
64
+ * @param params Tool parameters
65
+ * @returns Created record information
66
+ */
67
+ protected run(params: CreateRecordParams): Promise<CreateRecordResult>;
68
+ }
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateRecordTool = void 0;
4
+ const base_1 = require("../base");
5
+ const logger_1 = require("../../utils/logger");
6
+ const logger = (0, logger_1.createLogger)('CreateRecordTool');
7
+ /**
8
+ * Tool for creating a new record in a Quickbase table
9
+ */
10
+ class CreateRecordTool extends base_1.BaseTool {
11
+ /**
12
+ * Constructor
13
+ * @param client Quickbase client
14
+ */
15
+ constructor(client) {
16
+ super(client);
17
+ this.name = 'create_record';
18
+ this.description = 'Creates a new record in a Quickbase table';
19
+ /**
20
+ * Parameter schema for create_record
21
+ */
22
+ this.paramSchema = {
23
+ type: 'object',
24
+ properties: {
25
+ table_id: {
26
+ type: 'string',
27
+ description: 'The ID of the Quickbase table'
28
+ },
29
+ data: {
30
+ type: 'object',
31
+ description: 'The data for the new record, as field ID/value pairs'
32
+ }
33
+ },
34
+ required: ['table_id', 'data']
35
+ };
36
+ }
37
+ /**
38
+ * Run the create_record tool
39
+ * @param params Tool parameters
40
+ * @returns Created record information
41
+ */
42
+ async run(params) {
43
+ const { table_id, data } = params;
44
+ logger.info('Creating new record in Quickbase table', {
45
+ tableId: table_id
46
+ });
47
+ // Validate data
48
+ if (!data || typeof data !== 'object' || Object.keys(data).length === 0) {
49
+ throw new Error('Record data is required and must be a non-empty object');
50
+ }
51
+ // Prepare record data
52
+ // Convert data to { [fieldId]: { value: fieldValue } } format expected by the API
53
+ const recordData = {};
54
+ for (const [field, value] of Object.entries(data)) {
55
+ recordData[field] = { value };
56
+ }
57
+ // Prepare request body
58
+ const body = {
59
+ to: table_id,
60
+ data: [recordData]
61
+ };
62
+ // Create the record
63
+ const response = await this.client.request({
64
+ method: 'POST',
65
+ path: '/records',
66
+ body
67
+ });
68
+ if (!response.success || !response.data) {
69
+ logger.error('Failed to create record', {
70
+ error: response.error,
71
+ tableId: table_id
72
+ });
73
+ throw new Error(response.error?.message || 'Failed to create record');
74
+ }
75
+ // Safely validate response structure
76
+ if (typeof response.data !== 'object' || response.data === null) {
77
+ throw new Error('Invalid API response: data is not an object');
78
+ }
79
+ const result = response.data;
80
+ // Validate metadata exists and is an object
81
+ if (typeof result.metadata !== 'object' || result.metadata === null) {
82
+ logger.error('Record creation response missing metadata', {
83
+ response: result
84
+ });
85
+ throw new Error('Record created but response metadata is missing');
86
+ }
87
+ const metadata = result.metadata;
88
+ // Validate createdRecordIds exists and is an array
89
+ if (!Array.isArray(metadata.createdRecordIds)) {
90
+ logger.error('Record creation response missing createdRecordIds array', {
91
+ metadata
92
+ });
93
+ throw new Error('Record created but no record IDs array was returned');
94
+ }
95
+ const createdRecordIds = metadata.createdRecordIds;
96
+ if (createdRecordIds.length === 0) {
97
+ logger.error('Record creation response has empty createdRecordIds array', {
98
+ metadata
99
+ });
100
+ throw new Error('Record created but no record ID was returned');
101
+ }
102
+ // Validate first record ID is a string
103
+ const recordId = createdRecordIds[0];
104
+ if (typeof recordId !== 'string') {
105
+ logger.error('Record creation response has invalid record ID type', {
106
+ recordId,
107
+ type: typeof recordId
108
+ });
109
+ throw new Error('Record created but returned record ID is not a string');
110
+ }
111
+ logger.info('Successfully created record', {
112
+ recordId,
113
+ tableId: table_id
114
+ });
115
+ return {
116
+ recordId,
117
+ tableId: table_id,
118
+ createdTime: new Date().toISOString()
119
+ };
120
+ }
121
+ }
122
+ exports.CreateRecordTool = CreateRecordTool;
123
+ //# sourceMappingURL=create_record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_record.js","sourceRoot":"","sources":["../../../src/tools/records/create_record.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,kBAAkB,CAAC,CAAC;AAsChD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,eAAgD;IAsBpF;;;OAGG;IACH,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAC;QA1BT,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,2CAA2C,CAAC;QAEjE;;WAEG;QACI,gBAAW,GAAG;YACnB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sDAAsD;iBACpE;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;SAC/B,CAAC;IAQF,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,GAAG,CAAC,MAA0B;QAC5C,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QAElC,MAAM,CAAC,IAAI,CAAC,wCAAwC,EAAE;YACpD,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,gBAAgB;QAChB,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxE,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;QAED,sBAAsB;QACtB,kFAA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AAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAmC,CAAC;QAE5D,mDAAmD;QACnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC9C,MAAM,CAAC,KAAK,CAAC,yDAAyD,EAAE;gBACtE,QAAQ;aACT,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,gBAAgB,GAAG,QAAQ,CAAC,gBAA6B,CAAC;QAChE,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,MAAM,CAAC,KAAK,CAAC,2DAA2D,EAAE;gBACxE,QAAQ;aACT,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,uCAAuC;QACvC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;QACrC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,CAAC,KAAK,CAAC,qDAAqD,EAAE;gBAClE,QAAQ;gBACR,IAAI,EAAE,OAAO,QAAQ;aACtB,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE;YACzC,QAAQ;YACR,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,OAAO;YACL,QAAQ;YACR,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AAlID,4CAkIC"}
@@ -0,0 +1,11 @@
1
+ import { QuickbaseClient } from '../../client/quickbase';
2
+ /**
3
+ * Register all record operation tools with the registry
4
+ * @param client Quickbase client
5
+ */
6
+ export declare function registerRecordTools(client: QuickbaseClient): void;
7
+ export * from './query_records';
8
+ export * from './create_record';
9
+ export * from './update_record';
10
+ export * from './bulk_create_records';
11
+ export * from './bulk_update_records';
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.registerRecordTools = registerRecordTools;
18
+ const registry_1 = require("../registry");
19
+ const query_records_1 = require("./query_records");
20
+ const create_record_1 = require("./create_record");
21
+ const update_record_1 = require("./update_record");
22
+ const bulk_create_records_1 = require("./bulk_create_records");
23
+ const bulk_update_records_1 = require("./bulk_update_records");
24
+ const logger_1 = require("../../utils/logger");
25
+ const logger = (0, logger_1.createLogger)('RecordTools');
26
+ /**
27
+ * Register all record operation tools with the registry
28
+ * @param client Quickbase client
29
+ */
30
+ function registerRecordTools(client) {
31
+ logger.info('Registering record operation tools');
32
+ // Register individual tools
33
+ registry_1.toolRegistry.registerTool(new query_records_1.QueryRecordsTool(client));
34
+ registry_1.toolRegistry.registerTool(new create_record_1.CreateRecordTool(client));
35
+ registry_1.toolRegistry.registerTool(new update_record_1.UpdateRecordTool(client));
36
+ registry_1.toolRegistry.registerTool(new bulk_create_records_1.BulkCreateRecordsTool(client));
37
+ registry_1.toolRegistry.registerTool(new bulk_update_records_1.BulkUpdateRecordsTool(client));
38
+ logger.info('Record operation tools registered');
39
+ }
40
+ // Export all tools
41
+ __exportStar(require("./query_records"), exports);
42
+ __exportStar(require("./create_record"), exports);
43
+ __exportStar(require("./update_record"), exports);
44
+ __exportStar(require("./bulk_create_records"), exports);
45
+ __exportStar(require("./bulk_update_records"), exports);
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/records/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,kDAWC;AAzBD,0CAA2C;AAC3C,mDAAmD;AACnD,mDAAmD;AACnD,mDAAmD;AACnD,+DAA8D;AAC9D,+DAA8D;AAC9D,+CAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,aAAa,CAAC,CAAC;AAE3C;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,MAAuB;IACzD,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAElD,4BAA4B;IAC5B,uBAAY,CAAC,YAAY,CAAC,IAAI,gCAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,uBAAY,CAAC,YAAY,CAAC,IAAI,gCAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,uBAAY,CAAC,YAAY,CAAC,IAAI,gCAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,uBAAY,CAAC,YAAY,CAAC,IAAI,2CAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,uBAAY,CAAC,YAAY,CAAC,IAAI,2CAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;AACnD,CAAC;AAED,mBAAmB;AACnB,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC"}
@@ -0,0 +1,164 @@
1
+ import { BaseTool } from '../base';
2
+ import { QuickbaseClient } from '../../client/quickbase';
3
+ /**
4
+ * Order by configuration for query
5
+ */
6
+ export interface OrderBy {
7
+ /**
8
+ * Field ID to order by
9
+ */
10
+ fieldId: string;
11
+ /**
12
+ * Ordering direction: ASC or DESC
13
+ */
14
+ order: 'ASC' | 'DESC';
15
+ }
16
+ /**
17
+ * Parameters for query_records tool
18
+ */
19
+ export interface QueryRecordsParams {
20
+ /**
21
+ * The ID of the table to query
22
+ */
23
+ table_id: string;
24
+ /**
25
+ * WHERE clause for filtering records
26
+ */
27
+ where?: string;
28
+ /**
29
+ * Fields to select (field IDs)
30
+ */
31
+ select?: string[];
32
+ /**
33
+ * Fields to order by
34
+ */
35
+ orderBy?: OrderBy[];
36
+ /**
37
+ * Maximum number of records to return
38
+ */
39
+ max_records?: number;
40
+ /**
41
+ * Number of records to skip
42
+ */
43
+ skip?: number;
44
+ /**
45
+ * Whether to automatically handle pagination for large result sets
46
+ */
47
+ paginate?: boolean;
48
+ /**
49
+ * Additional query options
50
+ */
51
+ options?: Record<string, unknown>;
52
+ }
53
+ /**
54
+ * Response from querying records
55
+ */
56
+ export interface QueryRecordsResult {
57
+ /**
58
+ * Array of records
59
+ */
60
+ records: Record<string, any>[];
61
+ /**
62
+ * Total number of records matching the query
63
+ */
64
+ totalRecords?: number;
65
+ /**
66
+ * Whether this is a partial result set (more records available)
67
+ */
68
+ hasMore?: boolean;
69
+ /**
70
+ * Metadata about the query
71
+ */
72
+ metadata?: {
73
+ /**
74
+ * Fields included in the result
75
+ */
76
+ fields?: Record<string, unknown>[];
77
+ /**
78
+ * Table ID that was queried
79
+ */
80
+ tableId: string;
81
+ /**
82
+ * Number of records returned
83
+ */
84
+ numRecords: number;
85
+ /**
86
+ * Number of records skipped
87
+ */
88
+ skip?: number;
89
+ };
90
+ }
91
+ /**
92
+ * Tool for querying records from a Quickbase table
93
+ */
94
+ export declare class QueryRecordsTool extends BaseTool<QueryRecordsParams, QueryRecordsResult> {
95
+ name: string;
96
+ description: string;
97
+ /**
98
+ * Parameter schema for query_records
99
+ */
100
+ paramSchema: {
101
+ type: string;
102
+ properties: {
103
+ table_id: {
104
+ type: string;
105
+ description: string;
106
+ };
107
+ where: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ select: {
112
+ type: string;
113
+ description: string;
114
+ items: {
115
+ type: string;
116
+ };
117
+ };
118
+ orderBy: {
119
+ type: string;
120
+ description: string;
121
+ items: {
122
+ type: string;
123
+ properties: {
124
+ fieldId: {
125
+ type: string;
126
+ };
127
+ order: {
128
+ type: string;
129
+ enum: string[];
130
+ };
131
+ };
132
+ };
133
+ };
134
+ max_records: {
135
+ type: string;
136
+ description: string;
137
+ };
138
+ skip: {
139
+ type: string;
140
+ description: string;
141
+ };
142
+ paginate: {
143
+ type: string;
144
+ description: string;
145
+ };
146
+ options: {
147
+ type: string;
148
+ description: string;
149
+ };
150
+ };
151
+ required: string[];
152
+ };
153
+ /**
154
+ * Constructor
155
+ * @param client Quickbase client
156
+ */
157
+ constructor(client: QuickbaseClient);
158
+ /**
159
+ * Run the query_records tool
160
+ * @param params Tool parameters
161
+ * @returns Queried records
162
+ */
163
+ protected run(params: QueryRecordsParams): Promise<QueryRecordsResult>;
164
+ }