@enfyra/mcp-server 0.1.69 → 0.1.70
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/lib/config-local-adapters.d.ts +18 -0
- package/dist/lib/config-local-adapters.js +270 -0
- package/dist/lib/config-local-adapters.js.map +1 -0
- package/dist/lib/config-local-contracts.d.ts +28 -0
- package/dist/lib/config-local-contracts.js +200 -0
- package/dist/lib/config-local-contracts.js.map +1 -0
- package/dist/lib/config-local-prompts.d.ts +10 -0
- package/dist/lib/config-local-prompts.js +185 -0
- package/dist/lib/config-local-prompts.js.map +1 -0
- package/dist/lib/config-local-types.d.ts +23 -0
- package/dist/lib/config-local-types.js +2 -0
- package/dist/lib/config-local-types.js.map +1 -0
- package/dist/lib/config-local.js +3 -649
- package/dist/lib/config-local.js.map +1 -1
- package/dist/lib/discovery-tools.d.ts +4 -0
- package/dist/lib/discovery-tools.js +546 -0
- package/dist/lib/discovery-tools.js.map +1 -0
- package/dist/lib/dynamic-repository-builder.d.ts +1 -1
- package/dist/lib/dynamic-script-context-contract.d.ts +100 -0
- package/dist/lib/dynamic-script-context-contract.js +163 -0
- package/dist/lib/dynamic-script-context-contract.js.map +1 -0
- package/dist/lib/enfyra-mcp-server.d.ts +3 -0
- package/dist/lib/enfyra-mcp-server.js +79 -0
- package/dist/lib/enfyra-mcp-server.js.map +1 -0
- package/dist/lib/enfyra-tool-logic.d.ts +7 -0
- package/dist/lib/enfyra-tool-logic.js +8 -0
- package/dist/lib/enfyra-tool-logic.js.map +1 -0
- package/dist/lib/enfyra-tool-types.d.ts +27 -0
- package/dist/lib/enfyra-tool-types.js +2 -0
- package/dist/lib/enfyra-tool-types.js.map +1 -0
- package/dist/lib/extension-api-builders.d.ts +17 -0
- package/dist/lib/extension-api-builders.js +235 -0
- package/dist/lib/extension-api-builders.js.map +1 -0
- package/dist/lib/extension-component-builders.d.ts +87 -0
- package/dist/lib/extension-component-builders.js +623 -0
- package/dist/lib/extension-component-builders.js.map +1 -0
- package/dist/lib/extension-contract-review.d.ts +26 -0
- package/dist/lib/extension-contract-review.js +187 -0
- package/dist/lib/extension-contract-review.js.map +1 -0
- package/dist/lib/extension-theme-contract.d.ts +63 -0
- package/dist/lib/extension-theme-contract.js +417 -0
- package/dist/lib/extension-theme-contract.js.map +1 -0
- package/dist/lib/identity-tools.d.ts +4 -0
- package/dist/lib/identity-tools.js +46 -0
- package/dist/lib/identity-tools.js.map +1 -0
- package/dist/lib/log-tools.d.ts +4 -0
- package/dist/lib/log-tools.js +65 -0
- package/dist/lib/log-tools.js.map +1 -0
- package/dist/lib/mcp-example-connect.d.ts +9 -0
- package/dist/lib/mcp-example-connect.js +442 -0
- package/dist/lib/mcp-example-connect.js.map +1 -0
- package/dist/lib/mcp-example-extensions.d.ts +9 -0
- package/dist/lib/mcp-example-extensions.js +729 -0
- package/dist/lib/mcp-example-extensions.js.map +1 -0
- package/dist/lib/mcp-example-files.d.ts +9 -0
- package/dist/lib/mcp-example-files.js +51 -0
- package/dist/lib/mcp-example-files.js.map +1 -0
- package/dist/lib/mcp-example-flows.d.ts +9 -0
- package/dist/lib/mcp-example-flows.js +76 -0
- package/dist/lib/mcp-example-flows.js.map +1 -0
- package/dist/lib/mcp-example-graphql.d.ts +9 -0
- package/dist/lib/mcp-example-graphql.js +57 -0
- package/dist/lib/mcp-example-graphql.js.map +1 -0
- package/dist/lib/mcp-example-handlers-hooks.d.ts +9 -0
- package/dist/lib/mcp-example-handlers-hooks.js +328 -0
- package/dist/lib/mcp-example-handlers-hooks.js.map +1 -0
- package/dist/lib/mcp-example-oauth-setup.d.ts +9 -0
- package/dist/lib/mcp-example-oauth-setup.js +41 -0
- package/dist/lib/mcp-example-oauth-setup.js.map +1 -0
- package/dist/lib/mcp-example-permissions-rls.d.ts +9 -0
- package/dist/lib/mcp-example-permissions-rls.js +210 -0
- package/dist/lib/mcp-example-permissions-rls.js.map +1 -0
- package/dist/lib/mcp-example-queries-deep.d.ts +9 -0
- package/dist/lib/mcp-example-queries-deep.js +220 -0
- package/dist/lib/mcp-example-queries-deep.js.map +1 -0
- package/dist/lib/mcp-example-schema-relations.d.ts +9 -0
- package/dist/lib/mcp-example-schema-relations.js +148 -0
- package/dist/lib/mcp-example-schema-relations.js.map +1 -0
- package/dist/lib/mcp-example-websocket.d.ts +9 -0
- package/dist/lib/mcp-example-websocket.js +103 -0
- package/dist/lib/mcp-example-websocket.js.map +1 -0
- package/dist/lib/mcp-examples.d.ts +5 -5
- package/dist/lib/mcp-examples.js +22 -2394
- package/dist/lib/mcp-examples.js.map +1 -1
- package/dist/lib/method-tools.d.ts +4 -0
- package/dist/lib/method-tools.js +217 -0
- package/dist/lib/method-tools.js.map +1 -0
- package/dist/lib/package-tools.d.ts +4 -0
- package/dist/lib/package-tools.js +98 -0
- package/dist/lib/package-tools.js.map +1 -0
- package/dist/lib/platform-data-operations.d.ts +24 -0
- package/dist/lib/platform-data-operations.js +71 -0
- package/dist/lib/platform-data-operations.js.map +1 -0
- package/dist/lib/platform-endpoint-workflow.d.ts +42 -0
- package/dist/lib/platform-endpoint-workflow.js +382 -0
- package/dist/lib/platform-endpoint-workflow.js.map +1 -0
- package/dist/lib/platform-extension-source.d.ts +487 -0
- package/dist/lib/platform-extension-source.js +524 -0
- package/dist/lib/platform-extension-source.js.map +1 -0
- package/dist/lib/platform-extension-tools.d.ts +1 -0
- package/dist/lib/platform-extension-tools.js +416 -0
- package/dist/lib/platform-extension-tools.js.map +1 -0
- package/dist/lib/platform-extension-ui.d.ts +4 -0
- package/dist/lib/platform-extension-ui.js +5 -0
- package/dist/lib/platform-extension-ui.js.map +1 -0
- package/dist/lib/platform-extension-workflow.d.ts +54 -0
- package/dist/lib/platform-extension-workflow.js +194 -0
- package/dist/lib/platform-extension-workflow.js.map +1 -0
- package/dist/lib/platform-flow-operations.d.ts +554 -0
- package/dist/lib/platform-flow-operations.js +317 -0
- package/dist/lib/platform-flow-operations.js.map +1 -0
- package/dist/lib/platform-flow-tools.d.ts +1 -0
- package/dist/lib/platform-flow-tools.js +248 -0
- package/dist/lib/platform-flow-tools.js.map +1 -0
- package/dist/lib/platform-operation-logic.d.ts +10 -0
- package/dist/lib/platform-operation-logic.js +11 -0
- package/dist/lib/platform-operation-logic.js.map +1 -0
- package/dist/lib/platform-operation-tools.d.ts +1 -324
- package/dist/lib/platform-operation-tools.js +13 -4620
- package/dist/lib/platform-operation-tools.js.map +1 -1
- package/dist/lib/platform-operation-types.d.ts +46 -0
- package/dist/lib/platform-operation-types.js +2 -0
- package/dist/lib/platform-operation-types.js.map +1 -0
- package/dist/lib/platform-policy-tools.d.ts +1 -0
- package/dist/lib/platform-policy-tools.js +248 -0
- package/dist/lib/platform-policy-tools.js.map +1 -0
- package/dist/lib/platform-resource-operations.d.ts +124 -0
- package/dist/lib/platform-resource-operations.js +109 -0
- package/dist/lib/platform-resource-operations.js.map +1 -0
- package/dist/lib/platform-resource-tools.d.ts +1 -0
- package/dist/lib/platform-resource-tools.js +70 -0
- package/dist/lib/platform-resource-tools.js.map +1 -0
- package/dist/lib/platform-route-operations.d.ts +222 -0
- package/dist/lib/platform-route-operations.js +290 -0
- package/dist/lib/platform-route-operations.js.map +1 -0
- package/dist/lib/platform-route-tools.d.ts +1 -0
- package/dist/lib/platform-route-tools.js +307 -0
- package/dist/lib/platform-route-tools.js.map +1 -0
- package/dist/lib/platform-shared-operations.d.ts +7 -0
- package/dist/lib/platform-shared-operations.js +4 -0
- package/dist/lib/platform-shared-operations.js.map +1 -0
- package/dist/lib/platform-websocket-tools.d.ts +1 -0
- package/dist/lib/platform-websocket-tools.js +70 -0
- package/dist/lib/platform-websocket-tools.js.map +1 -0
- package/dist/lib/record-tools.d.ts +4 -0
- package/dist/lib/record-tools.js +418 -0
- package/dist/lib/record-tools.js.map +1 -0
- package/dist/lib/required-knowledge.d.ts +1 -1
- package/dist/lib/required-knowledge.js +3 -2
- package/dist/lib/required-knowledge.js.map +1 -1
- package/dist/lib/route-access-tools.d.ts +4 -0
- package/dist/lib/route-access-tools.js +172 -0
- package/dist/lib/route-access-tools.js.map +1 -0
- package/dist/lib/route-definition-tools.d.ts +4 -0
- package/dist/lib/route-definition-tools.js +285 -0
- package/dist/lib/route-definition-tools.js.map +1 -0
- package/dist/lib/route-inspection-tools.d.ts +4 -0
- package/dist/lib/route-inspection-tools.js +319 -0
- package/dist/lib/route-inspection-tools.js.map +1 -0
- package/dist/lib/route-tools.d.ts +1 -0
- package/dist/lib/route-tools.js +9 -0
- package/dist/lib/route-tools.js.map +1 -0
- package/dist/lib/runtime-zone-registry.d.ts +27 -0
- package/dist/lib/runtime-zone-registry.js +81 -0
- package/dist/lib/runtime-zone-registry.js.map +1 -0
- package/dist/lib/runtime-zone-search.d.ts +303 -0
- package/dist/lib/runtime-zone-search.js +596 -0
- package/dist/lib/runtime-zone-search.js.map +1 -0
- package/dist/lib/runtime-zone-tools.d.ts +2 -307
- package/dist/lib/runtime-zone-tools.js +2 -674
- package/dist/lib/runtime-zone-tools.js.map +1 -1
- package/dist/lib/schema-column-tools.d.ts +3 -0
- package/dist/lib/schema-column-tools.js +80 -0
- package/dist/lib/schema-column-tools.js.map +1 -0
- package/dist/lib/schema-mutation-coordinator.d.ts +28 -0
- package/dist/lib/schema-mutation-coordinator.js +154 -0
- package/dist/lib/schema-mutation-coordinator.js.map +1 -0
- package/dist/lib/schema-relation-contracts.d.ts +39 -0
- package/dist/lib/schema-relation-contracts.js +160 -0
- package/dist/lib/schema-relation-contracts.js.map +1 -0
- package/dist/lib/schema-relation-tools.d.ts +3 -0
- package/dist/lib/schema-relation-tools.js +61 -0
- package/dist/lib/schema-relation-tools.js.map +1 -0
- package/dist/lib/schema-table-contracts.d.ts +28 -0
- package/dist/lib/schema-table-contracts.js +263 -0
- package/dist/lib/schema-table-contracts.js.map +1 -0
- package/dist/lib/schema-table-tools.d.ts +3 -0
- package/dist/lib/schema-table-tools.js +297 -0
- package/dist/lib/schema-table-tools.js.map +1 -0
- package/dist/lib/schema-tool-operations.d.ts +150 -0
- package/dist/lib/schema-tool-operations.js +468 -0
- package/dist/lib/schema-tool-operations.js.map +1 -0
- package/dist/lib/schema-tool-types.d.ts +38 -0
- package/dist/lib/schema-tool-types.js +2 -0
- package/dist/lib/schema-tool-types.js.map +1 -0
- package/dist/lib/schema-verification.d.ts +14 -0
- package/dist/lib/schema-verification.js +105 -0
- package/dist/lib/schema-verification.js.map +1 -0
- package/dist/lib/script-tools.d.ts +4 -0
- package/dist/lib/script-tools.js +127 -0
- package/dist/lib/script-tools.js.map +1 -0
- package/dist/lib/system-tools.d.ts +4 -0
- package/dist/lib/system-tools.js +41 -0
- package/dist/lib/system-tools.js.map +1 -0
- package/dist/lib/table-tool-logic.d.ts +5 -0
- package/dist/lib/table-tool-logic.js +6 -0
- package/dist/lib/table-tool-logic.js.map +1 -0
- package/dist/lib/table-tools.d.ts +1 -84
- package/dist/lib/table-tools.js +7 -1522
- package/dist/lib/table-tools.js.map +1 -1
- package/dist/lib/tool-metadata-operations.d.ts +27 -0
- package/dist/lib/tool-metadata-operations.js +93 -0
- package/dist/lib/tool-metadata-operations.js.map +1 -0
- package/dist/lib/tool-permission-profile.d.ts +37 -0
- package/dist/lib/tool-permission-profile.js +106 -0
- package/dist/lib/tool-permission-profile.js.map +1 -0
- package/dist/lib/tool-record-operations.d.ts +102 -0
- package/dist/lib/tool-record-operations.js +260 -0
- package/dist/lib/tool-record-operations.js.map +1 -0
- package/dist/lib/tool-route-inspection.d.ts +47 -0
- package/dist/lib/tool-route-inspection.js +168 -0
- package/dist/lib/tool-route-inspection.js.map +1 -0
- package/dist/lib/tool-routing.d.ts +3 -417
- package/dist/lib/tool-routing.js +3 -1038
- package/dist/lib/tool-routing.js.map +1 -1
- package/dist/lib/tool-runtime-config.d.ts +33 -0
- package/dist/lib/tool-runtime-config.js +237 -0
- package/dist/lib/tool-runtime-config.js.map +1 -0
- package/dist/lib/tool-script-operations.d.ts +34 -0
- package/dist/lib/tool-script-operations.js +153 -0
- package/dist/lib/tool-script-operations.js.map +1 -0
- package/dist/lib/workflow-definitions.d.ts +366 -0
- package/dist/lib/workflow-definitions.js +703 -0
- package/dist/lib/workflow-definitions.js.map +1 -0
- package/dist/lib/workflow-planner.d.ts +45 -0
- package/dist/lib/workflow-planner.js +338 -0
- package/dist/lib/workflow-planner.js.map +1 -0
- package/dist/lib/workflow-types.d.ts +39 -0
- package/dist/lib/workflow-types.js +2 -0
- package/dist/lib/workflow-types.js.map +1 -0
- package/dist/mcp-server-entry.d.ts +0 -3
- package/dist/mcp-server-entry.js +2 -3249
- package/dist/mcp-server-entry.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { quoteJsString, } from './extension-component-builders.js';
|
|
2
|
+
function toPascalIdentifier(value, fallback = 'Items') {
|
|
3
|
+
const raw = String(value || fallback)
|
|
4
|
+
.replace(/[^a-zA-Z0-9]+/g, ' ')
|
|
5
|
+
.trim()
|
|
6
|
+
.split(/\s+/)
|
|
7
|
+
.filter(Boolean)
|
|
8
|
+
.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
|
|
9
|
+
.join('');
|
|
10
|
+
return raw || fallback;
|
|
11
|
+
}
|
|
12
|
+
function buildExtensionSort(sort) {
|
|
13
|
+
if (!Array.isArray(sort) || sort.length === 0)
|
|
14
|
+
return undefined;
|
|
15
|
+
const fields = sort.map((entry) => {
|
|
16
|
+
const field = String(entry?.field || '').trim();
|
|
17
|
+
if (!field)
|
|
18
|
+
throw new Error('Each extension sort entry requires a field.');
|
|
19
|
+
return String(entry?.direction || 'asc').toLowerCase() === 'desc'
|
|
20
|
+
? `-${field}`
|
|
21
|
+
: field;
|
|
22
|
+
});
|
|
23
|
+
return fields.join(',');
|
|
24
|
+
}
|
|
25
|
+
export function buildExtensionApiUsageSnippet(input = {}) {
|
|
26
|
+
const resource = String(input.resource || input.name || 'items');
|
|
27
|
+
const pascal = toPascalIdentifier(resource, 'Items');
|
|
28
|
+
const operation = String(input.operation || input.mode || input.intent || '').toLowerCase() || String(input.method || 'GET').toLowerCase();
|
|
29
|
+
const normalizedOperation = {
|
|
30
|
+
get: 'list',
|
|
31
|
+
read: 'list',
|
|
32
|
+
load: 'list',
|
|
33
|
+
post: 'create',
|
|
34
|
+
patch: 'update',
|
|
35
|
+
put: 'update',
|
|
36
|
+
del: 'delete',
|
|
37
|
+
remove: 'delete',
|
|
38
|
+
destroy: 'delete',
|
|
39
|
+
}[operation] || operation;
|
|
40
|
+
const defaultMethodByOperation = {
|
|
41
|
+
list: 'GET',
|
|
42
|
+
find_one: 'GET',
|
|
43
|
+
create: 'POST',
|
|
44
|
+
update: 'PATCH',
|
|
45
|
+
delete: 'DELETE',
|
|
46
|
+
batch_update: 'PATCH',
|
|
47
|
+
batch_delete: 'DELETE',
|
|
48
|
+
};
|
|
49
|
+
const method = String(input.method || defaultMethodByOperation[normalizedOperation] || 'GET').toUpperCase();
|
|
50
|
+
const rawPath = String(input.path || `/${resource}`);
|
|
51
|
+
const path = rawPath.replace(/\/:id\/?$/, '');
|
|
52
|
+
const responseName = input.responseName || `${resource}Response`;
|
|
53
|
+
const pendingName = input.pendingName || `${resource}Pending`;
|
|
54
|
+
const errorName = input.errorName || `${resource}Error`;
|
|
55
|
+
const executeName = input.executeName || (method === 'GET' ? `load${pascal}` : `${normalizedOperation.replace(/(^|_)([a-z])/g, (_m, _p, ch) => ch.toUpperCase()).replace(/^./, (ch) => ch.toLowerCase())}${pascal}Api`);
|
|
56
|
+
const refreshName = input.refreshName || `refresh${pascal}`;
|
|
57
|
+
const sort = buildExtensionSort(input.sort);
|
|
58
|
+
const rawQuery = input.query && typeof input.query === 'object' && !Array.isArray(input.query)
|
|
59
|
+
? input.query
|
|
60
|
+
: null;
|
|
61
|
+
if (rawQuery?.sort !== undefined && !sort) {
|
|
62
|
+
throw new Error('Pass extension sort through the structured sort input, not query.sort.');
|
|
63
|
+
}
|
|
64
|
+
const structuredQuery = rawQuery || sort
|
|
65
|
+
? { ...(rawQuery || {}), ...(sort ? { sort } : {}) }
|
|
66
|
+
: null;
|
|
67
|
+
if (structuredQuery && input.queryExpression) {
|
|
68
|
+
throw new Error('Pass either query or queryExpression to build_extension_api_usage, not both. Use structured query plus sort for Enfyra REST ordering.');
|
|
69
|
+
}
|
|
70
|
+
const queryName = input.queryName || `${resource}Query`;
|
|
71
|
+
const queryExpression = structuredQuery ? queryName : input.queryExpression;
|
|
72
|
+
const options = [];
|
|
73
|
+
if (method !== 'GET')
|
|
74
|
+
options.push(`method: ${quoteJsString(method)}`);
|
|
75
|
+
if (queryExpression)
|
|
76
|
+
options.push(`query: ${queryExpression}`);
|
|
77
|
+
if (input.bodyExpression)
|
|
78
|
+
options.push(`body: ${input.bodyExpression}`);
|
|
79
|
+
if (input.errorContext)
|
|
80
|
+
options.push(`errorContext: ${quoteJsString(input.errorContext)}`);
|
|
81
|
+
if (input.onErrorExpression)
|
|
82
|
+
options.push(`onError: ${input.onErrorExpression}`);
|
|
83
|
+
const optionsLiteral = options.length ? `, {\n ${options.join(',\n ')}\n}` : '';
|
|
84
|
+
const lines = [
|
|
85
|
+
...(structuredQuery ? [`const ${queryName} = computed(() => (${JSON.stringify(structuredQuery, null, 2)}));`, ''] : []),
|
|
86
|
+
`const { data: ${responseName}, pending: ${pendingName}, error: ${errorName}, execute: ${executeName}, refresh: ${refreshName} } = useApi(${quoteJsString(path)}${optionsLiteral});`,
|
|
87
|
+
];
|
|
88
|
+
if (method === 'GET') {
|
|
89
|
+
const rowsName = input.rowsName || resource;
|
|
90
|
+
lines.push(`const ${rowsName} = computed(() => ${responseName}.value?.data || []);`);
|
|
91
|
+
if (input.autoLoad !== false) {
|
|
92
|
+
lines.push(`onMounted(() => { ${executeName}(); });`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else if (normalizedOperation === 'create') {
|
|
96
|
+
const handlerName = input.handlerName || `create${pascal.replace(/s$/, '')}`;
|
|
97
|
+
const payloadName = input.payloadName || 'payload';
|
|
98
|
+
lines.push(...[
|
|
99
|
+
'',
|
|
100
|
+
`async function ${handlerName}(${payloadName}) {`,
|
|
101
|
+
` const response = await ${executeName}({ body: ${payloadName} });`,
|
|
102
|
+
' if (!response) return null;',
|
|
103
|
+
' return response;',
|
|
104
|
+
'}',
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
else if (normalizedOperation === 'update') {
|
|
108
|
+
const handlerName = input.handlerName || `update${pascal.replace(/s$/, '')}`;
|
|
109
|
+
const recordName = input.recordName || 'record';
|
|
110
|
+
const bodyName = input.bodyName || 'body';
|
|
111
|
+
const idExpression = input.idExpression || `${recordName}.id`;
|
|
112
|
+
const bodyArg = bodyName === 'body' ? 'body' : `body: ${bodyName}`;
|
|
113
|
+
lines.push(...[
|
|
114
|
+
'',
|
|
115
|
+
`async function ${handlerName}(${recordName}, ${bodyName}) {`,
|
|
116
|
+
` const response = await ${executeName}({ id: ${idExpression}, ${bodyArg} });`,
|
|
117
|
+
' if (!response) return null;',
|
|
118
|
+
' return response;',
|
|
119
|
+
'}',
|
|
120
|
+
]);
|
|
121
|
+
}
|
|
122
|
+
else if (normalizedOperation === 'delete') {
|
|
123
|
+
const handlerName = input.handlerName || `delete${pascal.replace(/s$/, '')}`;
|
|
124
|
+
const recordName = input.recordName || 'record';
|
|
125
|
+
const idExpression = input.idExpression || `${recordName}.id`;
|
|
126
|
+
lines.push(...[
|
|
127
|
+
'',
|
|
128
|
+
`async function ${handlerName}(${recordName}) {`,
|
|
129
|
+
` const response = await ${executeName}({ id: ${idExpression} });`,
|
|
130
|
+
' if (!response) return null;',
|
|
131
|
+
' return response;',
|
|
132
|
+
'}',
|
|
133
|
+
]);
|
|
134
|
+
}
|
|
135
|
+
else if (normalizedOperation === 'batch_update' || normalizedOperation === 'batch_delete') {
|
|
136
|
+
const handlerName = input.handlerName || `${normalizedOperation === 'batch_update' ? 'update' : 'delete'}${pascal}Batch`;
|
|
137
|
+
const idsName = input.idsName || 'ids';
|
|
138
|
+
const bodyName = input.bodyName || 'body';
|
|
139
|
+
const args = normalizedOperation === 'batch_update' ? `{ ids: ${idsName}, body: ${bodyName} }` : `{ ids: ${idsName} }`;
|
|
140
|
+
lines.push(...[
|
|
141
|
+
'',
|
|
142
|
+
`async function ${handlerName}(${normalizedOperation === 'batch_update' ? `${idsName}, ${bodyName}` : idsName}) {`,
|
|
143
|
+
` const response = await ${executeName}(${args});`,
|
|
144
|
+
' if (!response) return null;',
|
|
145
|
+
' return response;',
|
|
146
|
+
'}',
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
const handlerName = input.handlerName || `${method.toLowerCase()}${pascal}Record`;
|
|
151
|
+
lines.push(...[
|
|
152
|
+
'',
|
|
153
|
+
`async function ${handlerName}(payload) {`,
|
|
154
|
+
` const response = await ${executeName}({ body: payload });`,
|
|
155
|
+
' if (!response) return null;',
|
|
156
|
+
' return response;',
|
|
157
|
+
'}',
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
action: 'extension_api_usage_built',
|
|
162
|
+
operation: normalizedOperation,
|
|
163
|
+
snippet: lines.join('\n'),
|
|
164
|
+
contract: [
|
|
165
|
+
'useApi returns refs plus execute/refresh; it does not auto-run.',
|
|
166
|
+
'The useApi path is the base route string or a () => string getter; do not pass computed refs and do not put :id placeholders in the path.',
|
|
167
|
+
'Pass query/body as objects or computed objects, not JSON.stringify strings.',
|
|
168
|
+
'For Enfyra REST ordering, use structured sort entries with field and direction; the generated query always emits one comma-separated sort string such as "-isPinned,-updatedAt", never sort arrays or field:DESC tokens.',
|
|
169
|
+
'Read normal list rows from data.value?.data or from the direct execute() response.',
|
|
170
|
+
'For mutations, call execute({ body }), execute({ id, body }), execute({ id }), or execute({ ids }) from a user action.',
|
|
171
|
+
],
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export function buildExtensionNotifySnippet(input = {}) {
|
|
175
|
+
const kind = ['success', 'error', 'warning', 'info'].includes(input.kind) ? input.kind : 'success';
|
|
176
|
+
const title = input.title || (kind === 'success' ? 'Saved' : 'Notice');
|
|
177
|
+
const description = input.description || '';
|
|
178
|
+
const args = description ? `${quoteJsString(title)}, ${quoteJsString(description)}` : quoteJsString(title);
|
|
179
|
+
return {
|
|
180
|
+
action: 'extension_notify_usage_built',
|
|
181
|
+
snippet: [
|
|
182
|
+
'const notify = useNotify();',
|
|
183
|
+
`await notify.${kind}(${args});`,
|
|
184
|
+
].join('\n'),
|
|
185
|
+
contract: [
|
|
186
|
+
'useNotify exposes success/error/warning/info(title, description?) helpers.',
|
|
187
|
+
'Do not pass Nuxt toast object payloads and do not call notify.add().',
|
|
188
|
+
'The helpers are async; await them inside submit/mutation handlers when ordering matters.',
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export function buildExtensionConfirmSnippet(input = {}) {
|
|
193
|
+
const resource = String(input.resource || 'items');
|
|
194
|
+
const singular = resource.replace(/s$/i, '') || 'item';
|
|
195
|
+
const pascal = toPascalIdentifier(resource, 'Items');
|
|
196
|
+
const recordName = input.recordName || singular;
|
|
197
|
+
const handlerName = input.handlerName || `confirmDelete${toPascalIdentifier(singular, 'Item')}`;
|
|
198
|
+
const executeName = input.executeName || `delete${pascal}Api`;
|
|
199
|
+
const refreshName = input.refreshName || `refresh${pascal}`;
|
|
200
|
+
const idExpression = input.idExpression || `${recordName}.id`;
|
|
201
|
+
const title = input.title || `Delete ${singular}`;
|
|
202
|
+
const contentExpression = input.contentExpression || `\`Delete "\${${recordName}.title || 'this ${singular}'}"?\``;
|
|
203
|
+
const confirmText = input.confirmText || 'Delete';
|
|
204
|
+
const cancelText = input.cancelText || 'Cancel';
|
|
205
|
+
const mutationExpression = input.mutationExpression || `${executeName}({ id: ${idExpression} })`;
|
|
206
|
+
const refresh = input.refresh === false ? null : input.refreshExpression || refreshName;
|
|
207
|
+
return {
|
|
208
|
+
action: 'extension_confirm_workflow_built',
|
|
209
|
+
snippet: [
|
|
210
|
+
'const { confirm } = useConfirm();',
|
|
211
|
+
'',
|
|
212
|
+
`async function ${handlerName}(${recordName}) {`,
|
|
213
|
+
' const confirmed = await confirm({',
|
|
214
|
+
` title: ${quoteJsString(title)},`,
|
|
215
|
+
` content: ${contentExpression},`,
|
|
216
|
+
` confirmText: ${quoteJsString(confirmText)},`,
|
|
217
|
+
` cancelText: ${quoteJsString(cancelText)},`,
|
|
218
|
+
' });',
|
|
219
|
+
' if (!confirmed) return null;',
|
|
220
|
+
'',
|
|
221
|
+
` const response = await ${mutationExpression};`,
|
|
222
|
+
' if (!response) return null;',
|
|
223
|
+
...(refresh ? ['', ` await ${refresh}();`] : []),
|
|
224
|
+
' return response;',
|
|
225
|
+
'}',
|
|
226
|
+
].join('\n'),
|
|
227
|
+
contract: [
|
|
228
|
+
'useConfirm() opens the eApp GlobalConfirm/CommonModal and resolves true only after the user accepts.',
|
|
229
|
+
'Run the destructive mutation only after confirmed is true, then refresh the affected resource list when needed.',
|
|
230
|
+
'Never use window.confirm, window.alert, alert, or prompt in an extension.',
|
|
231
|
+
'Use CommonModal directly only when the confirmation needs form fields, richer detail, or a custom destructive workflow that useConfirm cannot express.',
|
|
232
|
+
],
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=extension-api-builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-api-builders.js","sourceRoot":"","sources":["../../src/lib/extension-api-builders.ts"],"names":[],"mappings":"AAqCA,OAAO,EACL,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C,SAAS,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,IAAI,QAAQ,CAAC;SAClC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,IAAI,EAAE;SACN,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,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CAAC;IACjG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,IAAI,WAAW,CAAC;IAExF,OAAO;QACL,MAAM,EAAE,kCAAkC;QAC1C,OAAO,EAAE;YACP,mCAAmC;YACnC,EAAE;YACF,kBAAkB,WAAW,IAAI,UAAU,KAAK;YAChD,qCAAqC;YACrC,cAAc,aAAa,CAAC,KAAK,CAAC,GAAG;YACrC,gBAAgB,iBAAiB,GAAG;YACpC,oBAAoB,aAAa,CAAC,WAAW,CAAC,GAAG;YACjD,mBAAmB,aAAa,CAAC,UAAU,CAAC,GAAG;YAC/C,OAAO;YACP,gCAAgC;YAChC,EAAE;YACF,4BAA4B,kBAAkB,GAAG;YACjD,+BAA+B;YAC/B,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,WAAW,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACjD,oBAAoB;YACpB,GAAG;SACJ,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ,QAAQ,EAAE;YACR,sGAAsG;YACtG,iHAAiH;YACjH,2EAA2E;YAC3E,wJAAwJ;SACzJ;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const AUTO_INJECTED_EXTENSION_COMPONENT_BY_LOWERCASE: Map<string, string>;
|
|
2
|
+
export declare const FULL_WIDTH_EXTENSION_FIELD_TAGS: string[];
|
|
3
|
+
export declare function quoteJsString(value: any): string;
|
|
4
|
+
export declare function buildExtensionDrawerSnippet(input: any): {
|
|
5
|
+
action: string;
|
|
6
|
+
component: string;
|
|
7
|
+
snippet: string;
|
|
8
|
+
normalizedBodyChanges: string[];
|
|
9
|
+
warnings: string[];
|
|
10
|
+
contract: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare function buildExtensionModalSnippet(input: any): {
|
|
13
|
+
action: string;
|
|
14
|
+
component: string;
|
|
15
|
+
snippet: string;
|
|
16
|
+
normalizedBodyChanges: string[];
|
|
17
|
+
warnings: string[];
|
|
18
|
+
contract: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare function buildExtensionPageShellSnippet(input: any): {
|
|
21
|
+
action: string;
|
|
22
|
+
snippet: string;
|
|
23
|
+
contract: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare function buildExtensionPermissionGateSnippet(input: any): {
|
|
26
|
+
action: string;
|
|
27
|
+
component: string;
|
|
28
|
+
snippet: string;
|
|
29
|
+
normalizedBodyChanges: string[];
|
|
30
|
+
warnings: string[];
|
|
31
|
+
contract: string[];
|
|
32
|
+
};
|
|
33
|
+
export declare function buildExtensionEmptyStateSnippet(input: any): {
|
|
34
|
+
action: string;
|
|
35
|
+
component: string;
|
|
36
|
+
snippet: string;
|
|
37
|
+
contract: string[];
|
|
38
|
+
};
|
|
39
|
+
export declare function buildExtensionResourceListSnippet(input: any): {
|
|
40
|
+
action: string;
|
|
41
|
+
components: string[];
|
|
42
|
+
snippet: string;
|
|
43
|
+
contract: string[];
|
|
44
|
+
};
|
|
45
|
+
export declare function buildExtensionResourceGridSnippet(input: any): {
|
|
46
|
+
action: string;
|
|
47
|
+
component: string;
|
|
48
|
+
snippet: string;
|
|
49
|
+
normalizedBodyChanges: string[];
|
|
50
|
+
contract: string[];
|
|
51
|
+
};
|
|
52
|
+
export declare function buildExtensionFormEditorSnippet(input: any): {
|
|
53
|
+
action: string;
|
|
54
|
+
component: string;
|
|
55
|
+
snippet: string;
|
|
56
|
+
contract: string[];
|
|
57
|
+
};
|
|
58
|
+
export declare function buildExtensionWidgetSnippet(input: any): {
|
|
59
|
+
action: string;
|
|
60
|
+
component: string;
|
|
61
|
+
snippet: string;
|
|
62
|
+
warnings: string[];
|
|
63
|
+
contract: string[];
|
|
64
|
+
};
|
|
65
|
+
export declare function buildExtensionMenuNotificationSnippet(input: any): {
|
|
66
|
+
action: string;
|
|
67
|
+
snippet: string;
|
|
68
|
+
contract: string[];
|
|
69
|
+
};
|
|
70
|
+
export declare function buildExtensionAccountPanelSnippet(input: any): {
|
|
71
|
+
action: string;
|
|
72
|
+
snippet: string;
|
|
73
|
+
contract: string[];
|
|
74
|
+
};
|
|
75
|
+
export declare function buildExtensionTabsSnippet(input: any): {
|
|
76
|
+
action: string;
|
|
77
|
+
component: string;
|
|
78
|
+
snippet: string;
|
|
79
|
+
contract: string[];
|
|
80
|
+
};
|
|
81
|
+
export declare function buildExtensionUploadModalSnippet(input: any): {
|
|
82
|
+
action: string;
|
|
83
|
+
component: string;
|
|
84
|
+
snippet: string;
|
|
85
|
+
companionSnippet: string;
|
|
86
|
+
contract: string[];
|
|
87
|
+
};
|