@studiometa/productive-mcp 0.10.7 → 0.10.8
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/formatters.d.ts +4 -0
- package/dist/formatters.d.ts.map +1 -1
- package/dist/handlers/custom-fields.d.ts +26 -0
- package/dist/handlers/custom-fields.d.ts.map +1 -0
- package/dist/handlers/help.d.ts.map +1 -1
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/schema.d.ts.map +1 -1
- package/dist/handlers/valid-includes.d.ts.map +1 -1
- package/dist/{handlers-CzOijI7B.js → handlers-t95fhdps.js} +159 -3
- package/dist/handlers-t95fhdps.js.map +1 -0
- package/dist/handlers.js +1 -1
- package/dist/hints.d.ts +4 -0
- package/dist/hints.d.ts.map +1 -1
- package/dist/http.js +2 -3
- package/dist/http.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/schema.d.ts +2 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/{handlers-Cha6_ulB.js → stdio-Bi1Lvp8O.js} +97 -2
- package/dist/stdio-Bi1Lvp8O.js.map +1 -0
- package/dist/stdio.js +2 -99
- package/dist/{version-zLvx5_bN.js → version-DpBFJ7eV.js} +3 -3
- package/dist/{version-zLvx5_bN.js.map → version-DpBFJ7eV.js.map} +1 -1
- package/package.json +3 -3
- package/skills/SKILL.md +36 -18
- package/dist/handlers-Cha6_ulB.js.map +0 -1
- package/dist/handlers-CzOijI7B.js.map +0 -1
- package/dist/stdio.js.map +0 -1
package/dist/formatters.d.ts
CHANGED
|
@@ -70,6 +70,10 @@ export declare function formatPage(page: JsonApiResource, options?: McpFormatOpt
|
|
|
70
70
|
*/
|
|
71
71
|
export declare function formatDiscussion(discussion: JsonApiResource, options?: McpFormatOptions): Record<string, unknown>;
|
|
72
72
|
export declare function formatActivity(activity: JsonApiResource, options?: McpFormatOptions): Record<string, unknown>;
|
|
73
|
+
/**
|
|
74
|
+
* Format custom field for agent consumption
|
|
75
|
+
*/
|
|
76
|
+
export declare function formatCustomField(field: JsonApiResource, options?: McpFormatOptions): Record<string, unknown>;
|
|
73
77
|
/**
|
|
74
78
|
* Format list response with pagination
|
|
75
79
|
*
|
package/dist/formatters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../src/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../src/formatters.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom Fields MCP handler.
|
|
3
|
+
*
|
|
4
|
+
* Uses the createResourceHandler factory for list/get.
|
|
5
|
+
* Custom fields are read-only — only `list` and `get` are supported.
|
|
6
|
+
*/
|
|
7
|
+
import type { CommonArgs } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Args for custom field requests.
|
|
10
|
+
*/
|
|
11
|
+
export interface CustomFieldArgs extends CommonArgs {
|
|
12
|
+
/** Filter by customizable type (e.g. 'Task', 'Deal', 'Company') */
|
|
13
|
+
customizable_type?: string;
|
|
14
|
+
/** Filter by archived status */
|
|
15
|
+
archived?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Handle custom_fields resource.
|
|
19
|
+
*
|
|
20
|
+
* Supports: list, get
|
|
21
|
+
*/
|
|
22
|
+
export declare const handleCustomFields: (action: string, args: CustomFieldArgs & {
|
|
23
|
+
query?: string;
|
|
24
|
+
type?: import("@studiometa/productive-core").ResolvableResourceType;
|
|
25
|
+
}, ctx: import("./types.js").HandlerContext) => Promise<import("./types.js").ToolResult>;
|
|
26
|
+
//# sourceMappingURL=custom-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-fields.d.ts","sourceRoot":"","sources":["../../src/handlers/custom-fields.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM7C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;wFAiB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/handlers/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/handlers/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAi/B7C;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAevD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,UAAU,CAY/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AAgC7D,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA2I7C;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,qBAAqB,GACjC,OAAO,CAAC,UAAU,CAAC,CA0IrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/handlers/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/handlers/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AA6UD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAazD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,CAUjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valid-includes.d.ts","sourceRoot":"","sources":["../../src/handlers/valid-includes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"valid-includes.d.ts","sourceRoot":"","sources":["../../src/handlers/valid-includes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAgBnD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAmBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,sBAAsB,GAAG,IAAI,CA0B/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductiveApi, formatActivity, formatAttachment, formatBooking, formatComment, formatCompany, formatDeal, formatDiscussion, formatListResponse, formatPage, formatPerson, formatProject, formatService, formatTask, formatTimeEntry, formatTimer } from "@studiometa/productive-api";
|
|
2
|
-
import { RESOURCES, ResolveError, VALID_REPORT_TYPES, completeTask, createBooking, createComment, createCompany, createDeal, createDiscussion, createPage, createTask, createTimeEntry, deleteAttachment, deleteDiscussion, deletePage, deleteTimeEntry, fromHandlerContext, getAttachment, getBooking, getComment, getCompany, getDeal, getDealContext, getDiscussion, getMyDaySummary, getPage, getPerson, getProject, getProjectContext, getProjectHealthSummary, getReport, getTask, getTaskContext, getTeamPulseSummary, getTimeEntry, getTimer, listActivities, listAttachments, listBookings, listComments, listCompanies, listDeals, listDiscussions, listPages, listPeople, listProjects, listServices, listTasks, listTimeEntries, listTimers, logDay, reopenDiscussion, resolveDiscussion, resolveResource, startTimer, stopTimer, updateBooking, updateComment, updateCompany, updateDeal, updateDiscussion, updatePage, updateTask, updateTimeEntry, weeklyStandup } from "@studiometa/productive-core";
|
|
1
|
+
import { ProductiveApi, formatActivity, formatAttachment, formatBooking, formatComment, formatCompany, formatCustomField, formatDeal, formatDiscussion, formatListResponse, formatPage, formatPerson, formatProject, formatService, formatTask, formatTimeEntry, formatTimer } from "@studiometa/productive-api";
|
|
2
|
+
import { RESOURCES, ResolveError, VALID_REPORT_TYPES, completeTask, createBooking, createComment, createCompany, createDeal, createDiscussion, createPage, createTask, createTimeEntry, deleteAttachment, deleteDiscussion, deletePage, deleteTimeEntry, fromHandlerContext, getAttachment, getBooking, getComment, getCompany, getCustomField, getDeal, getDealContext, getDiscussion, getMyDaySummary, getPage, getPerson, getProject, getProjectContext, getProjectHealthSummary, getReport, getTask, getTaskContext, getTeamPulseSummary, getTimeEntry, getTimer, listActivities, listAttachments, listBookings, listComments, listCompanies, listCustomFields, listDeals, listDiscussions, listPages, listPeople, listProjects, listServices, listTasks, listTimeEntries, listTimers, logDay, reopenDiscussion, resolveDiscussion, resolveResource, startTimer, stopTimer, updateBooking, updateComment, updateCompany, updateDeal, updateDiscussion, updatePage, updateTask, updateTimeEntry, weeklyStandup } from "@studiometa/productive-core";
|
|
3
3
|
/**
|
|
4
4
|
* Custom error classes for MCP server
|
|
5
5
|
*
|
|
@@ -240,6 +240,15 @@ function formatActivity$1(activity, options) {
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
+
* Format custom field for agent consumption
|
|
244
|
+
*/
|
|
245
|
+
function formatCustomField$1(field, options) {
|
|
246
|
+
return formatCustomField(field, {
|
|
247
|
+
...MCP_FORMAT_OPTIONS,
|
|
248
|
+
included: options?.included
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
243
252
|
* Format list response with pagination
|
|
244
253
|
*
|
|
245
254
|
* @param data - Array of JSON:API resources
|
|
@@ -288,6 +297,15 @@ function getTaskHints(taskId, serviceId) {
|
|
|
288
297
|
action: "list",
|
|
289
298
|
filter: { parent_task_id: taskId }
|
|
290
299
|
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
resource: "custom_fields",
|
|
303
|
+
description: "List custom field definitions for tasks (to resolve custom_fields values)",
|
|
304
|
+
example: {
|
|
305
|
+
resource: "custom_fields",
|
|
306
|
+
action: "list",
|
|
307
|
+
filter: { customizable_type: "Task" }
|
|
308
|
+
}
|
|
291
309
|
}
|
|
292
310
|
],
|
|
293
311
|
common_actions: [{
|
|
@@ -419,6 +437,15 @@ function getDealHints(dealId) {
|
|
|
419
437
|
action: "list",
|
|
420
438
|
filter: { deal_id: dealId }
|
|
421
439
|
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
resource: "custom_fields",
|
|
443
|
+
description: "List custom field definitions for deals (to resolve custom_fields values)",
|
|
444
|
+
example: {
|
|
445
|
+
resource: "custom_fields",
|
|
446
|
+
action: "list",
|
|
447
|
+
filter: { customizable_type: "Deal" }
|
|
448
|
+
}
|
|
422
449
|
}
|
|
423
450
|
],
|
|
424
451
|
common_actions: [{
|
|
@@ -534,6 +561,15 @@ function getCompanyHints(companyId) {
|
|
|
534
561
|
action: "list",
|
|
535
562
|
filter: { company_id: companyId }
|
|
536
563
|
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
resource: "custom_fields",
|
|
567
|
+
description: "List custom field definitions for companies (to resolve custom_fields values)",
|
|
568
|
+
example: {
|
|
569
|
+
resource: "custom_fields",
|
|
570
|
+
action: "list",
|
|
571
|
+
filter: { customizable_type: "Company" }
|
|
572
|
+
}
|
|
537
573
|
}
|
|
538
574
|
] };
|
|
539
575
|
}
|
|
@@ -755,6 +791,31 @@ function getDiscussionHints(discussionId, pageId) {
|
|
|
755
791
|
return hints;
|
|
756
792
|
}
|
|
757
793
|
/**
|
|
794
|
+
* Generate hints for a custom field definition
|
|
795
|
+
*/
|
|
796
|
+
function getCustomFieldHints(fieldId) {
|
|
797
|
+
return {
|
|
798
|
+
related_resources: [{
|
|
799
|
+
resource: "custom_fields",
|
|
800
|
+
description: "List all custom field definitions for a resource type",
|
|
801
|
+
example: {
|
|
802
|
+
resource: "custom_fields",
|
|
803
|
+
action: "list",
|
|
804
|
+
filter: { customizable_type: "Task" }
|
|
805
|
+
}
|
|
806
|
+
}],
|
|
807
|
+
common_actions: [{
|
|
808
|
+
action: "Get this custom field with its options",
|
|
809
|
+
example: {
|
|
810
|
+
resource: "custom_fields",
|
|
811
|
+
action: "get",
|
|
812
|
+
id: fieldId,
|
|
813
|
+
include: ["options"]
|
|
814
|
+
}
|
|
815
|
+
}]
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
758
819
|
* Generate hints for a timer
|
|
759
820
|
*/
|
|
760
821
|
function getTimerHints(timerId, serviceId) {
|
|
@@ -1664,6 +1725,17 @@ var RESOURCE_SCHEMAS = {
|
|
|
1664
1725
|
}
|
|
1665
1726
|
}
|
|
1666
1727
|
},
|
|
1728
|
+
custom_fields: {
|
|
1729
|
+
actions: ["list", "get"],
|
|
1730
|
+
filters: {
|
|
1731
|
+
customizable_type: "string — Task, Deal, Company, Project, Booking, Service, etc.",
|
|
1732
|
+
archived: "boolean",
|
|
1733
|
+
name: "string",
|
|
1734
|
+
project_id: "string",
|
|
1735
|
+
global: "boolean"
|
|
1736
|
+
},
|
|
1737
|
+
includes: ["options"]
|
|
1738
|
+
},
|
|
1667
1739
|
activities: {
|
|
1668
1740
|
actions: ["list"],
|
|
1669
1741
|
filters: {
|
|
@@ -2216,6 +2288,35 @@ const handleCompanies = createResourceHandler({
|
|
|
2216
2288
|
}
|
|
2217
2289
|
});
|
|
2218
2290
|
/**
|
|
2291
|
+
* Custom Fields MCP handler.
|
|
2292
|
+
*
|
|
2293
|
+
* Uses the createResourceHandler factory for list/get.
|
|
2294
|
+
* Custom fields are read-only — only `list` and `get` are supported.
|
|
2295
|
+
*/
|
|
2296
|
+
/**
|
|
2297
|
+
* Handle custom_fields resource.
|
|
2298
|
+
*
|
|
2299
|
+
* Supports: list, get
|
|
2300
|
+
*/
|
|
2301
|
+
const handleCustomFields = createResourceHandler({
|
|
2302
|
+
resource: "custom_fields",
|
|
2303
|
+
displayName: "custom field",
|
|
2304
|
+
actions: ["list", "get"],
|
|
2305
|
+
formatter: formatCustomField$1,
|
|
2306
|
+
hints: (_data, id) => getCustomFieldHints(id),
|
|
2307
|
+
executors: {
|
|
2308
|
+
list: listCustomFields,
|
|
2309
|
+
get: getCustomField
|
|
2310
|
+
},
|
|
2311
|
+
defaultInclude: { get: ["options"] },
|
|
2312
|
+
listFilterFromArgs: (args) => {
|
|
2313
|
+
const filter = {};
|
|
2314
|
+
if (args.customizable_type) filter.customizable_type = args.customizable_type;
|
|
2315
|
+
if (args.archived) filter.archived = args.archived;
|
|
2316
|
+
return filter;
|
|
2317
|
+
}
|
|
2318
|
+
});
|
|
2319
|
+
/**
|
|
2219
2320
|
* Discussions MCP handler.
|
|
2220
2321
|
*/
|
|
2221
2322
|
var STATUS_MAP = {
|
|
@@ -3258,6 +3359,59 @@ var RESOURCE_HELP = {
|
|
|
3258
3359
|
}
|
|
3259
3360
|
]
|
|
3260
3361
|
},
|
|
3362
|
+
custom_fields: {
|
|
3363
|
+
description: "Custom field definitions — list and inspect custom fields configured in your organization. Custom fields appear as raw ID hashes on tasks, deals, companies, etc. Use this resource to discover field names, data types, and option values for resolution.",
|
|
3364
|
+
actions: {
|
|
3365
|
+
list: "List custom field definitions (filter by customizable_type to scope to a resource)",
|
|
3366
|
+
get: "Get a single custom field definition with its options (include: options)"
|
|
3367
|
+
},
|
|
3368
|
+
filters: {
|
|
3369
|
+
customizable_type: "Filter by resource type: Task, Deal, Company, Project, Booking, Service, etc.",
|
|
3370
|
+
archived: "Filter by archived status (boolean)",
|
|
3371
|
+
name: "Filter by field name",
|
|
3372
|
+
project_id: "Filter by project ID",
|
|
3373
|
+
global: "Filter global custom fields (boolean)"
|
|
3374
|
+
},
|
|
3375
|
+
includes: ["options"],
|
|
3376
|
+
fields: {
|
|
3377
|
+
id: "Unique custom field identifier (used as key in custom_fields hash)",
|
|
3378
|
+
name: "Human-readable field name",
|
|
3379
|
+
data_type: "Field type: text, number, select, date, multi-select, person, attachment",
|
|
3380
|
+
data_type_id: "Numeric type: 1=Text, 2=Number, 3=Select, 4=Date, 5=Multi-select, 6=Person, 7=Attachment",
|
|
3381
|
+
customizable_type: "Resource type this field applies to (e.g. Task, Deal)",
|
|
3382
|
+
archived: "Whether the field is archived",
|
|
3383
|
+
required: "Whether the field is required",
|
|
3384
|
+
description: "Optional description of the field",
|
|
3385
|
+
options: "For select/multi-select: array of {id, value, archived} (when include=options)"
|
|
3386
|
+
},
|
|
3387
|
+
examples: [
|
|
3388
|
+
{
|
|
3389
|
+
description: "List custom fields for tasks",
|
|
3390
|
+
params: {
|
|
3391
|
+
resource: "custom_fields",
|
|
3392
|
+
action: "list",
|
|
3393
|
+
filter: { customizable_type: "Task" }
|
|
3394
|
+
}
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
description: "Get a custom field with its options",
|
|
3398
|
+
params: {
|
|
3399
|
+
resource: "custom_fields",
|
|
3400
|
+
action: "get",
|
|
3401
|
+
id: "42236",
|
|
3402
|
+
include: ["options"]
|
|
3403
|
+
}
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
description: "List all non-archived custom fields",
|
|
3407
|
+
params: {
|
|
3408
|
+
resource: "custom_fields",
|
|
3409
|
+
action: "list",
|
|
3410
|
+
filter: { archived: "false" }
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
]
|
|
3414
|
+
},
|
|
3261
3415
|
activities: {
|
|
3262
3416
|
description: "Read-only activity feed — audit log of create/update/delete events across the organization",
|
|
3263
3417
|
actions: { list: "List recent activities with optional filters" },
|
|
@@ -3766,6 +3920,7 @@ const handleTimers = createResourceHandler({
|
|
|
3766
3920
|
*/
|
|
3767
3921
|
const VALID_INCLUDES = {
|
|
3768
3922
|
activities: ["creator"],
|
|
3923
|
+
custom_fields: ["options"],
|
|
3769
3924
|
tasks: [
|
|
3770
3925
|
"project",
|
|
3771
3926
|
"project.company",
|
|
@@ -3992,6 +4147,7 @@ async function routeToHandler(resource, action, restArgs, resolveArgs, ctx, cred
|
|
|
3992
4147
|
case "pages": return await handlePages(action, restArgs, ctx);
|
|
3993
4148
|
case "discussions": return await handleDiscussions(action, restArgs, ctx);
|
|
3994
4149
|
case "activities": return await handleActivities(action, restArgs, ctx);
|
|
4150
|
+
case "custom_fields": return await handleCustomFields(action, restArgs, ctx);
|
|
3995
4151
|
case "reports": return await handleReports(action, restArgs, ctx);
|
|
3996
4152
|
case "summaries": return await handleSummaries(action, restArgs, ctx);
|
|
3997
4153
|
case "workflows": return await handleWorkflows(action, restArgs, ctx);
|
|
@@ -4066,4 +4222,4 @@ async function executeToolWithCredentials(name, args, credentials) {
|
|
|
4066
4222
|
}
|
|
4067
4223
|
export { handleSchemaOverview as a, handleDeals as c, handleServices as i, handleTasks as n, handleProjects as o, handleSummaries as r, handlePeople as s, executeToolWithCredentials as t };
|
|
4068
4224
|
|
|
4069
|
-
//# sourceMappingURL=handlers-
|
|
4225
|
+
//# sourceMappingURL=handlers-t95fhdps.js.map
|