servicem8 0.9.0 → 0.9.2
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/README.md +10 -0
- package/api.json +1092 -627
- package/bin/mcp-server.js +1366 -532
- package/bin/mcp-server.js.map +27 -11
- package/dist/commonjs/funcs/jobTemplatesCreateJobFromTemplate.d.ts +3 -0
- package/dist/commonjs/funcs/jobTemplatesCreateJobFromTemplate.d.ts.map +1 -1
- package/dist/commonjs/funcs/jobTemplatesCreateJobFromTemplate.js +3 -0
- package/dist/commonjs/funcs/jobTemplatesCreateJobFromTemplate.js.map +1 -1
- package/dist/commonjs/funcs/jobTemplatesCreateJobTemplates.d.ts +24 -0
- package/dist/commonjs/funcs/jobTemplatesCreateJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesCreateJobTemplates.js +138 -0
- package/dist/commonjs/funcs/jobTemplatesCreateJobTemplates.js.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesDeleteJobTemplates.d.ts +22 -0
- package/dist/commonjs/funcs/jobTemplatesDeleteJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesDeleteJobTemplates.js +136 -0
- package/dist/commonjs/funcs/jobTemplatesDeleteJobTemplates.js.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesGetJobTemplates.d.ts +20 -0
- package/dist/commonjs/funcs/jobTemplatesGetJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesGetJobTemplates.js +134 -0
- package/dist/commonjs/funcs/jobTemplatesGetJobTemplates.js.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesListJobTemplates.d.ts +23 -0
- package/dist/commonjs/funcs/jobTemplatesListJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesListJobTemplates.js +122 -0
- package/dist/commonjs/funcs/jobTemplatesListJobTemplates.js.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesUpdateJobTemplates.d.ts +20 -0
- package/dist/commonjs/funcs/jobTemplatesUpdateJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/funcs/jobTemplatesUpdateJobTemplates.js +135 -0
- package/dist/commonjs/funcs/jobTemplatesUpdateJobTemplates.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +20 -10
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobFromTemplate.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobFromTemplate.js +3 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobFromTemplate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobTemplates.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobTemplates.js +74 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesCreateJobTemplates.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesDeleteJobTemplates.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesDeleteJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesDeleteJobTemplates.js +73 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesDeleteJobTemplates.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesGetJobTemplates.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesGetJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesGetJobTemplates.js +69 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesGetJobTemplates.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesListJobTemplates.d.ts +3 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesListJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesListJobTemplates.js +35 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesListJobTemplates.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesUpdateJobTemplates.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesUpdateJobTemplates.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesUpdateJobTemplates.js +69 -0
- package/dist/commonjs/mcp-server/tools/jobTemplatesUpdateJobTemplates.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/jobtemplate.d.ts +111 -0
- package/dist/commonjs/models/components/jobtemplate.d.ts.map +1 -0
- package/dist/commonjs/models/components/jobtemplate.js +137 -0
- package/dist/commonjs/models/components/jobtemplate.js.map +1 -0
- package/dist/commonjs/models/components/jobtemplateoverrides.d.ts +7 -2
- package/dist/commonjs/models/components/jobtemplateoverrides.d.ts.map +1 -1
- package/dist/commonjs/models/components/jobtemplateoverrides.js +4 -0
- package/dist/commonjs/models/components/jobtemplateoverrides.js.map +1 -1
- package/dist/commonjs/models/operations/createjobtemplates.d.ts +57 -0
- package/dist/commonjs/models/operations/createjobtemplates.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createjobtemplates.js +115 -0
- package/dist/commonjs/models/operations/createjobtemplates.js.map +1 -0
- package/dist/commonjs/models/operations/deletejobtemplates.d.ts +54 -0
- package/dist/commonjs/models/operations/deletejobtemplates.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletejobtemplates.js +96 -0
- package/dist/commonjs/models/operations/deletejobtemplates.js.map +1 -0
- package/dist/commonjs/models/operations/getjobtemplates.d.ts +54 -0
- package/dist/commonjs/models/operations/getjobtemplates.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getjobtemplates.js +99 -0
- package/dist/commonjs/models/operations/getjobtemplates.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +5 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +5 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listjobtemplates.d.ts +26 -0
- package/dist/commonjs/models/operations/listjobtemplates.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listjobtemplates.js +72 -0
- package/dist/commonjs/models/operations/listjobtemplates.js.map +1 -0
- package/dist/commonjs/models/operations/updatejobtemplates.d.ts +59 -0
- package/dist/commonjs/models/operations/updatejobtemplates.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatejobtemplates.js +107 -0
- package/dist/commonjs/models/operations/updatejobtemplates.js.map +1 -0
- package/dist/commonjs/sdk/jobtemplates.d.ts +57 -0
- package/dist/commonjs/sdk/jobtemplates.d.ts.map +1 -1
- package/dist/commonjs/sdk/jobtemplates.js +71 -0
- package/dist/commonjs/sdk/jobtemplates.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +4 -4
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +6 -6
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/jobTemplatesCreateJobFromTemplate.d.ts +3 -0
- package/dist/esm/funcs/jobTemplatesCreateJobFromTemplate.d.ts.map +1 -1
- package/dist/esm/funcs/jobTemplatesCreateJobFromTemplate.js +3 -0
- package/dist/esm/funcs/jobTemplatesCreateJobFromTemplate.js.map +1 -1
- package/dist/esm/funcs/jobTemplatesCreateJobTemplates.d.ts +24 -0
- package/dist/esm/funcs/jobTemplatesCreateJobTemplates.d.ts.map +1 -0
- package/dist/esm/funcs/jobTemplatesCreateJobTemplates.js +102 -0
- package/dist/esm/funcs/jobTemplatesCreateJobTemplates.js.map +1 -0
- package/dist/esm/funcs/jobTemplatesDeleteJobTemplates.d.ts +22 -0
- package/dist/esm/funcs/jobTemplatesDeleteJobTemplates.d.ts.map +1 -0
- package/dist/esm/funcs/jobTemplatesDeleteJobTemplates.js +100 -0
- package/dist/esm/funcs/jobTemplatesDeleteJobTemplates.js.map +1 -0
- package/dist/esm/funcs/jobTemplatesGetJobTemplates.d.ts +20 -0
- package/dist/esm/funcs/jobTemplatesGetJobTemplates.d.ts.map +1 -0
- package/dist/esm/funcs/jobTemplatesGetJobTemplates.js +98 -0
- package/dist/esm/funcs/jobTemplatesGetJobTemplates.js.map +1 -0
- package/dist/esm/funcs/jobTemplatesListJobTemplates.d.ts +23 -0
- package/dist/esm/funcs/jobTemplatesListJobTemplates.d.ts.map +1 -0
- package/dist/esm/funcs/jobTemplatesListJobTemplates.js +86 -0
- package/dist/esm/funcs/jobTemplatesListJobTemplates.js.map +1 -0
- package/dist/esm/funcs/jobTemplatesUpdateJobTemplates.d.ts +20 -0
- package/dist/esm/funcs/jobTemplatesUpdateJobTemplates.d.ts.map +1 -0
- package/dist/esm/funcs/jobTemplatesUpdateJobTemplates.js +99 -0
- package/dist/esm/funcs/jobTemplatesUpdateJobTemplates.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +20 -10
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobFromTemplate.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobFromTemplate.js +3 -0
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobFromTemplate.js.map +1 -1
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobTemplates.d.ts +8 -0
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobTemplates.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobTemplates.js +38 -0
- package/dist/esm/mcp-server/tools/jobTemplatesCreateJobTemplates.js.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesDeleteJobTemplates.d.ts +8 -0
- package/dist/esm/mcp-server/tools/jobTemplatesDeleteJobTemplates.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesDeleteJobTemplates.js +37 -0
- package/dist/esm/mcp-server/tools/jobTemplatesDeleteJobTemplates.js.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesGetJobTemplates.d.ts +8 -0
- package/dist/esm/mcp-server/tools/jobTemplatesGetJobTemplates.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesGetJobTemplates.js +33 -0
- package/dist/esm/mcp-server/tools/jobTemplatesGetJobTemplates.js.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesListJobTemplates.d.ts +3 -0
- package/dist/esm/mcp-server/tools/jobTemplatesListJobTemplates.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesListJobTemplates.js +32 -0
- package/dist/esm/mcp-server/tools/jobTemplatesListJobTemplates.js.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesUpdateJobTemplates.d.ts +8 -0
- package/dist/esm/mcp-server/tools/jobTemplatesUpdateJobTemplates.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/jobTemplatesUpdateJobTemplates.js +33 -0
- package/dist/esm/mcp-server/tools/jobTemplatesUpdateJobTemplates.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/jobtemplate.d.ts +111 -0
- package/dist/esm/models/components/jobtemplate.d.ts.map +1 -0
- package/dist/esm/models/components/jobtemplate.js +97 -0
- package/dist/esm/models/components/jobtemplate.js.map +1 -0
- package/dist/esm/models/components/jobtemplateoverrides.d.ts +7 -2
- package/dist/esm/models/components/jobtemplateoverrides.d.ts.map +1 -1
- package/dist/esm/models/components/jobtemplateoverrides.js +4 -0
- package/dist/esm/models/components/jobtemplateoverrides.js.map +1 -1
- package/dist/esm/models/operations/createjobtemplates.d.ts +57 -0
- package/dist/esm/models/operations/createjobtemplates.d.ts.map +1 -0
- package/dist/esm/models/operations/createjobtemplates.js +75 -0
- package/dist/esm/models/operations/createjobtemplates.js.map +1 -0
- package/dist/esm/models/operations/deletejobtemplates.d.ts +54 -0
- package/dist/esm/models/operations/deletejobtemplates.d.ts.map +1 -0
- package/dist/esm/models/operations/deletejobtemplates.js +56 -0
- package/dist/esm/models/operations/deletejobtemplates.js.map +1 -0
- package/dist/esm/models/operations/getjobtemplates.d.ts +54 -0
- package/dist/esm/models/operations/getjobtemplates.d.ts.map +1 -0
- package/dist/esm/models/operations/getjobtemplates.js +59 -0
- package/dist/esm/models/operations/getjobtemplates.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +5 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +5 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listjobtemplates.d.ts +26 -0
- package/dist/esm/models/operations/listjobtemplates.d.ts.map +1 -0
- package/dist/esm/models/operations/listjobtemplates.js +34 -0
- package/dist/esm/models/operations/listjobtemplates.js.map +1 -0
- package/dist/esm/models/operations/updatejobtemplates.d.ts +59 -0
- package/dist/esm/models/operations/updatejobtemplates.d.ts.map +1 -0
- package/dist/esm/models/operations/updatejobtemplates.js +67 -0
- package/dist/esm/models/operations/updatejobtemplates.js.map +1 -0
- package/dist/esm/sdk/jobtemplates.d.ts +57 -0
- package/dist/esm/sdk/jobtemplates.d.ts.map +1 -1
- package/dist/esm/sdk/jobtemplates.js +71 -0
- package/dist/esm/sdk/jobtemplates.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +4 -4
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +6 -6
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/allocationwindows/README.md +4 -4
- package/docs/sdks/assets/README.md +6 -6
- package/docs/sdks/assettypefields/README.md +8 -8
- package/docs/sdks/assettypes/README.md +4 -4
- package/docs/sdks/attachments/README.md +12 -12
- package/docs/sdks/badges/README.md +12 -12
- package/docs/sdks/bundles/README.md +4 -4
- package/docs/sdks/categories/README.md +4 -4
- package/docs/sdks/clients/README.md +8 -8
- package/docs/sdks/companycontacts/README.md +8 -8
- package/docs/sdks/emailtemplates/README.md +4 -4
- package/docs/sdks/feedback/README.md +8 -8
- package/docs/sdks/formfields/README.md +8 -8
- package/docs/sdks/formresponses/README.md +28 -28
- package/docs/sdks/forms/README.md +8 -8
- package/docs/sdks/jobactivities/README.md +20 -20
- package/docs/sdks/joballocations/README.md +24 -24
- package/docs/sdks/jobchecklists/README.md +32 -32
- package/docs/sdks/jobcontacts/README.md +8 -8
- package/docs/sdks/jobmaterialbundles/README.md +12 -12
- package/docs/sdks/jobmaterials/README.md +20 -20
- package/docs/sdks/jobpayments/README.md +16 -16
- package/docs/sdks/jobqueues/README.md +4 -4
- package/docs/sdks/jobs/README.md +32 -32
- package/docs/sdks/jobtemplates/README.md +434 -0
- package/docs/sdks/knowledgearticles/README.md +4 -4
- package/docs/sdks/locations/README.md +4 -4
- package/docs/sdks/materials/README.md +8 -8
- package/docs/sdks/notes/README.md +12 -12
- package/docs/sdks/securityroles/README.md +4 -4
- package/docs/sdks/smstemplates/README.md +4 -4
- package/docs/sdks/staffmembers/README.md +12 -12
- package/docs/sdks/staffmessages/README.md +16 -16
- package/docs/sdks/tasks/README.md +20 -20
- package/docs/sdks/taxrates/README.md +4 -4
- package/docs/sdks/vendors/README.md +2 -2
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/jobTemplatesCreateJobFromTemplate.ts +3 -0
- package/src/funcs/jobTemplatesCreateJobTemplates.ts +190 -0
- package/src/funcs/jobTemplatesDeleteJobTemplates.ts +189 -0
- package/src/funcs/jobTemplatesGetJobTemplates.ts +187 -0
- package/src/funcs/jobTemplatesListJobTemplates.ts +166 -0
- package/src/funcs/jobTemplatesUpdateJobTemplates.ts +188 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +20 -10
- package/src/mcp-server/tools/jobTemplatesCreateJobFromTemplate.ts +3 -0
- package/src/mcp-server/tools/jobTemplatesCreateJobTemplates.ts +48 -0
- package/src/mcp-server/tools/jobTemplatesDeleteJobTemplates.ts +47 -0
- package/src/mcp-server/tools/jobTemplatesGetJobTemplates.ts +42 -0
- package/src/mcp-server/tools/jobTemplatesListJobTemplates.ts +39 -0
- package/src/mcp-server/tools/jobTemplatesUpdateJobTemplates.ts +43 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/jobtemplate.ts +198 -0
- package/src/models/components/jobtemplateoverrides.ts +11 -2
- package/src/models/operations/createjobtemplates.ts +147 -0
- package/src/models/operations/deletejobtemplates.ts +125 -0
- package/src/models/operations/getjobtemplates.ts +130 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listjobtemplates.ts +69 -0
- package/src/models/operations/updatejobtemplates.ts +141 -0
- package/src/sdk/jobtemplates.ts +110 -0
- package/src/sdk/sdk.ts +10 -10
package/bin/mcp-server.js
CHANGED
|
@@ -34205,9 +34205,9 @@ var init_config = __esm(() => {
|
|
|
34205
34205
|
SDK_METADATA = {
|
|
34206
34206
|
language: "typescript",
|
|
34207
34207
|
openapiDocVersion: "1.0.0",
|
|
34208
|
-
sdkVersion: "0.9.
|
|
34209
|
-
genVersion: "2.656.
|
|
34210
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
34208
|
+
sdkVersion: "0.9.2",
|
|
34209
|
+
genVersion: "2.656.9",
|
|
34210
|
+
userAgent: "speakeasy-sdk/typescript 0.9.2 2.656.9 1.0.0 servicem8"
|
|
34211
34211
|
};
|
|
34212
34212
|
});
|
|
34213
34213
|
|
|
@@ -39146,6 +39146,61 @@ var init_jobpayment = __esm(() => {
|
|
|
39146
39146
|
})(JobPaymentInput$ ||= {});
|
|
39147
39147
|
});
|
|
39148
39148
|
|
|
39149
|
+
// src/models/components/jobtemplate.ts
|
|
39150
|
+
var JobTemplateActive, JobTemplateActive$inboundSchema, JobTemplateActive$outboundSchema, JobTemplateActive$, JobTemplate$inboundSchema, JobTemplate$outboundSchema, JobTemplate$, JobTemplateInput$inboundSchema, JobTemplateInput$outboundSchema, JobTemplateInput$;
|
|
39151
|
+
var init_jobtemplate = __esm(() => {
|
|
39152
|
+
init_esm();
|
|
39153
|
+
init_primitives();
|
|
39154
|
+
JobTemplateActive = {
|
|
39155
|
+
Zero: 0,
|
|
39156
|
+
One: 1
|
|
39157
|
+
};
|
|
39158
|
+
JobTemplateActive$inboundSchema = nativeEnumType(JobTemplateActive);
|
|
39159
|
+
JobTemplateActive$outboundSchema = JobTemplateActive$inboundSchema;
|
|
39160
|
+
((JobTemplateActive$) => {
|
|
39161
|
+
JobTemplateActive$.inboundSchema = JobTemplateActive$inboundSchema;
|
|
39162
|
+
JobTemplateActive$.outboundSchema = JobTemplateActive$outboundSchema;
|
|
39163
|
+
})(JobTemplateActive$ ||= {});
|
|
39164
|
+
JobTemplate$inboundSchema = objectType({
|
|
39165
|
+
uuid: stringType().optional(),
|
|
39166
|
+
active: JobTemplateActive$inboundSchema.default(1),
|
|
39167
|
+
edit_date: anyType().optional(),
|
|
39168
|
+
name: stringType().optional()
|
|
39169
|
+
}).transform((v2) => {
|
|
39170
|
+
return remap(v2, {
|
|
39171
|
+
edit_date: "editDate"
|
|
39172
|
+
});
|
|
39173
|
+
});
|
|
39174
|
+
JobTemplate$outboundSchema = objectType({
|
|
39175
|
+
uuid: stringType().optional(),
|
|
39176
|
+
active: JobTemplateActive$outboundSchema.default(1),
|
|
39177
|
+
editDate: anyType().optional(),
|
|
39178
|
+
name: stringType().optional()
|
|
39179
|
+
}).transform((v2) => {
|
|
39180
|
+
return remap(v2, {
|
|
39181
|
+
editDate: "edit_date"
|
|
39182
|
+
});
|
|
39183
|
+
});
|
|
39184
|
+
((JobTemplate$) => {
|
|
39185
|
+
JobTemplate$.inboundSchema = JobTemplate$inboundSchema;
|
|
39186
|
+
JobTemplate$.outboundSchema = JobTemplate$outboundSchema;
|
|
39187
|
+
})(JobTemplate$ ||= {});
|
|
39188
|
+
JobTemplateInput$inboundSchema = objectType({
|
|
39189
|
+
uuid: stringType().optional(),
|
|
39190
|
+
active: JobTemplateActive$inboundSchema.default(1),
|
|
39191
|
+
name: stringType().optional()
|
|
39192
|
+
});
|
|
39193
|
+
JobTemplateInput$outboundSchema = objectType({
|
|
39194
|
+
uuid: stringType().optional(),
|
|
39195
|
+
active: JobTemplateActive$outboundSchema.default(1),
|
|
39196
|
+
name: stringType().optional()
|
|
39197
|
+
});
|
|
39198
|
+
((JobTemplateInput$) => {
|
|
39199
|
+
JobTemplateInput$.inboundSchema = JobTemplateInput$inboundSchema;
|
|
39200
|
+
JobTemplateInput$.outboundSchema = JobTemplateInput$outboundSchema;
|
|
39201
|
+
})(JobTemplateInput$ ||= {});
|
|
39202
|
+
});
|
|
39203
|
+
|
|
39149
39204
|
// src/models/components/jobtemplateoverrides.ts
|
|
39150
39205
|
var JobTemplateOverrides$inboundSchema, JobTemplateOverrides$outboundSchema, JobTemplateOverrides$;
|
|
39151
39206
|
var init_jobtemplateoverrides = __esm(() => {
|
|
@@ -39154,22 +39209,26 @@ var init_jobtemplateoverrides = __esm(() => {
|
|
|
39154
39209
|
JobTemplateOverrides$inboundSchema = objectType({
|
|
39155
39210
|
job_description: stringType().optional(),
|
|
39156
39211
|
company_uuid: stringType().optional(),
|
|
39212
|
+
company_name: stringType().optional(),
|
|
39157
39213
|
job_address: stringType().optional()
|
|
39158
39214
|
}).transform((v2) => {
|
|
39159
39215
|
return remap(v2, {
|
|
39160
39216
|
job_description: "jobDescription",
|
|
39161
39217
|
company_uuid: "companyUuid",
|
|
39218
|
+
company_name: "companyName",
|
|
39162
39219
|
job_address: "jobAddress"
|
|
39163
39220
|
});
|
|
39164
39221
|
});
|
|
39165
39222
|
JobTemplateOverrides$outboundSchema = objectType({
|
|
39166
39223
|
jobDescription: stringType().optional(),
|
|
39167
39224
|
companyUuid: stringType().optional(),
|
|
39225
|
+
companyName: stringType().optional(),
|
|
39168
39226
|
jobAddress: stringType().optional()
|
|
39169
39227
|
}).transform((v2) => {
|
|
39170
39228
|
return remap(v2, {
|
|
39171
39229
|
jobDescription: "job_description",
|
|
39172
39230
|
companyUuid: "company_uuid",
|
|
39231
|
+
companyName: "company_name",
|
|
39173
39232
|
jobAddress: "job_address"
|
|
39174
39233
|
});
|
|
39175
39234
|
});
|
|
@@ -40947,6 +41006,7 @@ var init_components = __esm(() => {
|
|
|
40947
41006
|
init_jobmaterial();
|
|
40948
41007
|
init_jobmaterialbundle();
|
|
40949
41008
|
init_jobpayment();
|
|
41009
|
+
init_jobtemplate();
|
|
40950
41010
|
init_jobtemplateoverrides();
|
|
40951
41011
|
init_knowledgearticle();
|
|
40952
41012
|
init_location();
|
|
@@ -42230,6 +42290,51 @@ var init_createjobs = __esm(() => {
|
|
|
42230
42290
|
})(CreateJobsResponse$ ||= {});
|
|
42231
42291
|
});
|
|
42232
42292
|
|
|
42293
|
+
// src/models/operations/createjobtemplates.ts
|
|
42294
|
+
var CreateJobTemplatesResponseResult$inboundSchema, CreateJobTemplatesResponseResult$outboundSchema, CreateJobTemplatesResponseResult$, CreateJobTemplatesResponse$inboundSchema, CreateJobTemplatesResponse$outboundSchema, CreateJobTemplatesResponse$;
|
|
42295
|
+
var init_createjobtemplates = __esm(() => {
|
|
42296
|
+
init_esm();
|
|
42297
|
+
init_primitives();
|
|
42298
|
+
init_components();
|
|
42299
|
+
CreateJobTemplatesResponseResult$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
42300
|
+
CreateJobTemplatesResponseResult$outboundSchema = unionType([
|
|
42301
|
+
Result$outboundSchema,
|
|
42302
|
+
ErrorT$outboundSchema
|
|
42303
|
+
]);
|
|
42304
|
+
((CreateJobTemplatesResponseResult$) => {
|
|
42305
|
+
CreateJobTemplatesResponseResult$.inboundSchema = CreateJobTemplatesResponseResult$inboundSchema;
|
|
42306
|
+
CreateJobTemplatesResponseResult$.outboundSchema = CreateJobTemplatesResponseResult$outboundSchema;
|
|
42307
|
+
})(CreateJobTemplatesResponseResult$ ||= {});
|
|
42308
|
+
CreateJobTemplatesResponse$inboundSchema = objectType({
|
|
42309
|
+
Headers: recordType(arrayType(stringType())),
|
|
42310
|
+
Result: unionType([
|
|
42311
|
+
Result$inboundSchema,
|
|
42312
|
+
ErrorT$inboundSchema
|
|
42313
|
+
])
|
|
42314
|
+
}).transform((v2) => {
|
|
42315
|
+
return remap(v2, {
|
|
42316
|
+
Headers: "headers",
|
|
42317
|
+
Result: "result"
|
|
42318
|
+
});
|
|
42319
|
+
});
|
|
42320
|
+
CreateJobTemplatesResponse$outboundSchema = objectType({
|
|
42321
|
+
headers: recordType(arrayType(stringType())),
|
|
42322
|
+
result: unionType([
|
|
42323
|
+
Result$outboundSchema,
|
|
42324
|
+
ErrorT$outboundSchema
|
|
42325
|
+
])
|
|
42326
|
+
}).transform((v2) => {
|
|
42327
|
+
return remap(v2, {
|
|
42328
|
+
headers: "Headers",
|
|
42329
|
+
result: "Result"
|
|
42330
|
+
});
|
|
42331
|
+
});
|
|
42332
|
+
((CreateJobTemplatesResponse$) => {
|
|
42333
|
+
CreateJobTemplatesResponse$.inboundSchema = CreateJobTemplatesResponse$inboundSchema;
|
|
42334
|
+
CreateJobTemplatesResponse$.outboundSchema = CreateJobTemplatesResponse$outboundSchema;
|
|
42335
|
+
})(CreateJobTemplatesResponse$ ||= {});
|
|
42336
|
+
});
|
|
42337
|
+
|
|
42233
42338
|
// src/models/operations/createknowledgearticles.ts
|
|
42234
42339
|
var CreateKnowledgeArticlesResponseResult$inboundSchema, CreateKnowledgeArticlesResponseResult$outboundSchema, CreateKnowledgeArticlesResponseResult$, CreateKnowledgeArticlesResponse$inboundSchema, CreateKnowledgeArticlesResponse$outboundSchema, CreateKnowledgeArticlesResponse$;
|
|
42235
42340
|
var init_createknowledgearticles = __esm(() => {
|
|
@@ -43304,6 +43409,32 @@ var init_deletejobs = __esm(() => {
|
|
|
43304
43409
|
})(DeleteJobsResponse$ ||= {});
|
|
43305
43410
|
});
|
|
43306
43411
|
|
|
43412
|
+
// src/models/operations/deletejobtemplates.ts
|
|
43413
|
+
var DeleteJobTemplatesRequest$inboundSchema, DeleteJobTemplatesRequest$outboundSchema, DeleteJobTemplatesRequest$, DeleteJobTemplatesResponse$inboundSchema, DeleteJobTemplatesResponse$outboundSchema, DeleteJobTemplatesResponse$;
|
|
43414
|
+
var init_deletejobtemplates = __esm(() => {
|
|
43415
|
+
init_esm();
|
|
43416
|
+
init_components();
|
|
43417
|
+
DeleteJobTemplatesRequest$inboundSchema = objectType({
|
|
43418
|
+
uuid: stringType()
|
|
43419
|
+
});
|
|
43420
|
+
DeleteJobTemplatesRequest$outboundSchema = objectType({
|
|
43421
|
+
uuid: stringType()
|
|
43422
|
+
});
|
|
43423
|
+
((DeleteJobTemplatesRequest$) => {
|
|
43424
|
+
DeleteJobTemplatesRequest$.inboundSchema = DeleteJobTemplatesRequest$inboundSchema;
|
|
43425
|
+
DeleteJobTemplatesRequest$.outboundSchema = DeleteJobTemplatesRequest$outboundSchema;
|
|
43426
|
+
})(DeleteJobTemplatesRequest$ ||= {});
|
|
43427
|
+
DeleteJobTemplatesResponse$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
43428
|
+
DeleteJobTemplatesResponse$outboundSchema = unionType([
|
|
43429
|
+
Result$outboundSchema,
|
|
43430
|
+
ErrorT$outboundSchema
|
|
43431
|
+
]);
|
|
43432
|
+
((DeleteJobTemplatesResponse$) => {
|
|
43433
|
+
DeleteJobTemplatesResponse$.inboundSchema = DeleteJobTemplatesResponse$inboundSchema;
|
|
43434
|
+
DeleteJobTemplatesResponse$.outboundSchema = DeleteJobTemplatesResponse$outboundSchema;
|
|
43435
|
+
})(DeleteJobTemplatesResponse$ ||= {});
|
|
43436
|
+
});
|
|
43437
|
+
|
|
43307
43438
|
// src/models/operations/deleteknowledgearticles.ts
|
|
43308
43439
|
var DeleteKnowledgeArticlesRequest$inboundSchema, DeleteKnowledgeArticlesRequest$outboundSchema, DeleteKnowledgeArticlesRequest$, DeleteKnowledgeArticlesResponse$inboundSchema, DeleteKnowledgeArticlesResponse$outboundSchema, DeleteKnowledgeArticlesResponse$;
|
|
43309
43440
|
var init_deleteknowledgearticles = __esm(() => {
|
|
@@ -44273,6 +44404,35 @@ var init_getjobs = __esm(() => {
|
|
|
44273
44404
|
})(GetJobsResponse$ ||= {});
|
|
44274
44405
|
});
|
|
44275
44406
|
|
|
44407
|
+
// src/models/operations/getjobtemplates.ts
|
|
44408
|
+
var GetJobTemplatesRequest$inboundSchema, GetJobTemplatesRequest$outboundSchema, GetJobTemplatesRequest$, GetJobTemplatesResponse$inboundSchema, GetJobTemplatesResponse$outboundSchema, GetJobTemplatesResponse$;
|
|
44409
|
+
var init_getjobtemplates = __esm(() => {
|
|
44410
|
+
init_esm();
|
|
44411
|
+
init_components();
|
|
44412
|
+
GetJobTemplatesRequest$inboundSchema = objectType({
|
|
44413
|
+
uuid: stringType()
|
|
44414
|
+
});
|
|
44415
|
+
GetJobTemplatesRequest$outboundSchema = objectType({
|
|
44416
|
+
uuid: stringType()
|
|
44417
|
+
});
|
|
44418
|
+
((GetJobTemplatesRequest$) => {
|
|
44419
|
+
GetJobTemplatesRequest$.inboundSchema = GetJobTemplatesRequest$inboundSchema;
|
|
44420
|
+
GetJobTemplatesRequest$.outboundSchema = GetJobTemplatesRequest$outboundSchema;
|
|
44421
|
+
})(GetJobTemplatesRequest$ ||= {});
|
|
44422
|
+
GetJobTemplatesResponse$inboundSchema = unionType([
|
|
44423
|
+
JobTemplate$inboundSchema,
|
|
44424
|
+
ErrorT$inboundSchema
|
|
44425
|
+
]);
|
|
44426
|
+
GetJobTemplatesResponse$outboundSchema = unionType([
|
|
44427
|
+
JobTemplate$outboundSchema,
|
|
44428
|
+
ErrorT$outboundSchema
|
|
44429
|
+
]);
|
|
44430
|
+
((GetJobTemplatesResponse$) => {
|
|
44431
|
+
GetJobTemplatesResponse$.inboundSchema = GetJobTemplatesResponse$inboundSchema;
|
|
44432
|
+
GetJobTemplatesResponse$.outboundSchema = GetJobTemplatesResponse$outboundSchema;
|
|
44433
|
+
})(GetJobTemplatesResponse$ ||= {});
|
|
44434
|
+
});
|
|
44435
|
+
|
|
44276
44436
|
// src/models/operations/getknowledgearticles.ts
|
|
44277
44437
|
var GetKnowledgeArticlesRequest$inboundSchema, GetKnowledgeArticlesRequest$outboundSchema, GetKnowledgeArticlesRequest$, GetKnowledgeArticlesResponse$inboundSchema, GetKnowledgeArticlesResponse$outboundSchema, GetKnowledgeArticlesResponse$;
|
|
44278
44438
|
var init_getknowledgearticles = __esm(() => {
|
|
@@ -45093,6 +45253,25 @@ var init_listjobs = __esm(() => {
|
|
|
45093
45253
|
})(ListJobsResponse$ ||= {});
|
|
45094
45254
|
});
|
|
45095
45255
|
|
|
45256
|
+
// src/models/operations/listjobtemplates.ts
|
|
45257
|
+
var ListJobTemplatesResponse$inboundSchema, ListJobTemplatesResponse$outboundSchema, ListJobTemplatesResponse$;
|
|
45258
|
+
var init_listjobtemplates = __esm(() => {
|
|
45259
|
+
init_esm();
|
|
45260
|
+
init_components();
|
|
45261
|
+
ListJobTemplatesResponse$inboundSchema = unionType([
|
|
45262
|
+
ErrorT$inboundSchema,
|
|
45263
|
+
arrayType(JobTemplate$inboundSchema)
|
|
45264
|
+
]);
|
|
45265
|
+
ListJobTemplatesResponse$outboundSchema = unionType([
|
|
45266
|
+
ErrorT$outboundSchema,
|
|
45267
|
+
arrayType(JobTemplate$outboundSchema)
|
|
45268
|
+
]);
|
|
45269
|
+
((ListJobTemplatesResponse$) => {
|
|
45270
|
+
ListJobTemplatesResponse$.inboundSchema = ListJobTemplatesResponse$inboundSchema;
|
|
45271
|
+
ListJobTemplatesResponse$.outboundSchema = ListJobTemplatesResponse$outboundSchema;
|
|
45272
|
+
})(ListJobTemplatesResponse$ ||= {});
|
|
45273
|
+
});
|
|
45274
|
+
|
|
45096
45275
|
// src/models/operations/listknowledgearticles.ts
|
|
45097
45276
|
var ListKnowledgeArticlesResponse$inboundSchema, ListKnowledgeArticlesResponse$outboundSchema, ListKnowledgeArticlesResponse$;
|
|
45098
45277
|
var init_listknowledgearticles = __esm(() => {
|
|
@@ -46270,6 +46449,43 @@ var init_updatejobs = __esm(() => {
|
|
|
46270
46449
|
})(UpdateJobsResponse$ ||= {});
|
|
46271
46450
|
});
|
|
46272
46451
|
|
|
46452
|
+
// src/models/operations/updatejobtemplates.ts
|
|
46453
|
+
var UpdateJobTemplatesRequest$inboundSchema, UpdateJobTemplatesRequest$outboundSchema, UpdateJobTemplatesRequest$, UpdateJobTemplatesResponse$inboundSchema, UpdateJobTemplatesResponse$outboundSchema, UpdateJobTemplatesResponse$;
|
|
46454
|
+
var init_updatejobtemplates = __esm(() => {
|
|
46455
|
+
init_esm();
|
|
46456
|
+
init_primitives();
|
|
46457
|
+
init_components();
|
|
46458
|
+
UpdateJobTemplatesRequest$inboundSchema = objectType({
|
|
46459
|
+
uuid: stringType(),
|
|
46460
|
+
JobTemplate: JobTemplateInput$inboundSchema
|
|
46461
|
+
}).transform((v2) => {
|
|
46462
|
+
return remap(v2, {
|
|
46463
|
+
JobTemplate: "jobTemplate"
|
|
46464
|
+
});
|
|
46465
|
+
});
|
|
46466
|
+
UpdateJobTemplatesRequest$outboundSchema = objectType({
|
|
46467
|
+
uuid: stringType(),
|
|
46468
|
+
jobTemplate: JobTemplateInput$outboundSchema
|
|
46469
|
+
}).transform((v2) => {
|
|
46470
|
+
return remap(v2, {
|
|
46471
|
+
jobTemplate: "JobTemplate"
|
|
46472
|
+
});
|
|
46473
|
+
});
|
|
46474
|
+
((UpdateJobTemplatesRequest$) => {
|
|
46475
|
+
UpdateJobTemplatesRequest$.inboundSchema = UpdateJobTemplatesRequest$inboundSchema;
|
|
46476
|
+
UpdateJobTemplatesRequest$.outboundSchema = UpdateJobTemplatesRequest$outboundSchema;
|
|
46477
|
+
})(UpdateJobTemplatesRequest$ ||= {});
|
|
46478
|
+
UpdateJobTemplatesResponse$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
46479
|
+
UpdateJobTemplatesResponse$outboundSchema = unionType([
|
|
46480
|
+
Result$outboundSchema,
|
|
46481
|
+
ErrorT$outboundSchema
|
|
46482
|
+
]);
|
|
46483
|
+
((UpdateJobTemplatesResponse$) => {
|
|
46484
|
+
UpdateJobTemplatesResponse$.inboundSchema = UpdateJobTemplatesResponse$inboundSchema;
|
|
46485
|
+
UpdateJobTemplatesResponse$.outboundSchema = UpdateJobTemplatesResponse$outboundSchema;
|
|
46486
|
+
})(UpdateJobTemplatesResponse$ ||= {});
|
|
46487
|
+
});
|
|
46488
|
+
|
|
46273
46489
|
// src/models/operations/updateknowledgearticles.ts
|
|
46274
46490
|
var UpdateKnowledgeArticlesRequest$inboundSchema, UpdateKnowledgeArticlesRequest$outboundSchema, UpdateKnowledgeArticlesRequest$, UpdateKnowledgeArticlesResponse$inboundSchema, UpdateKnowledgeArticlesResponse$outboundSchema, UpdateKnowledgeArticlesResponse$;
|
|
46275
46491
|
var init_updateknowledgearticles = __esm(() => {
|
|
@@ -46707,6 +46923,7 @@ var init_operations = __esm(() => {
|
|
|
46707
46923
|
init_createjobpayments();
|
|
46708
46924
|
init_createjobqueues();
|
|
46709
46925
|
init_createjobs();
|
|
46926
|
+
init_createjobtemplates();
|
|
46710
46927
|
init_createknowledgearticles();
|
|
46711
46928
|
init_createlocations();
|
|
46712
46929
|
init_creatematerials();
|
|
@@ -46741,6 +46958,7 @@ var init_operations = __esm(() => {
|
|
|
46741
46958
|
init_deletejobpayments();
|
|
46742
46959
|
init_deletejobqueues();
|
|
46743
46960
|
init_deletejobs();
|
|
46961
|
+
init_deletejobtemplates();
|
|
46744
46962
|
init_deleteknowledgearticles();
|
|
46745
46963
|
init_deletelocations();
|
|
46746
46964
|
init_deletematerials();
|
|
@@ -46777,6 +46995,7 @@ var init_operations = __esm(() => {
|
|
|
46777
46995
|
init_getjobpayments();
|
|
46778
46996
|
init_getjobqueues();
|
|
46779
46997
|
init_getjobs();
|
|
46998
|
+
init_getjobtemplates();
|
|
46780
46999
|
init_getknowledgearticles();
|
|
46781
47000
|
init_getlocations();
|
|
46782
47001
|
init_getmaterials();
|
|
@@ -46814,6 +47033,7 @@ var init_operations = __esm(() => {
|
|
|
46814
47033
|
init_listjobpayments();
|
|
46815
47034
|
init_listjobqueues();
|
|
46816
47035
|
init_listjobs();
|
|
47036
|
+
init_listjobtemplates();
|
|
46817
47037
|
init_listknowledgearticles();
|
|
46818
47038
|
init_listlocations();
|
|
46819
47039
|
init_listmaterials();
|
|
@@ -46852,6 +47072,7 @@ var init_operations = __esm(() => {
|
|
|
46852
47072
|
init_updatejobpayments();
|
|
46853
47073
|
init_updatejobqueues();
|
|
46854
47074
|
init_updatejobs();
|
|
47075
|
+
init_updatejobtemplates();
|
|
46855
47076
|
init_updateknowledgearticles();
|
|
46856
47077
|
init_updatelocations();
|
|
46857
47078
|
init_updatematerials();
|
|
@@ -61890,8 +62111,11 @@ Creates a new job by cloning an existing job template. All template entities (ta
|
|
|
61890
62111
|
Only the following fields can be overridden when creating a job from a template:
|
|
61891
62112
|
- \`job_description\` - Job description
|
|
61892
62113
|
- \`company_uuid\` - UUID of the company/client
|
|
62114
|
+
- \`company_name\` - Name of the company/client (will lookup existing or create new)
|
|
61893
62115
|
- \`job_address\` - Street address for the job
|
|
61894
62116
|
|
|
62117
|
+
**Note:** You cannot specify both \`company_uuid\` and \`company_name\`. If \`company_name\` is provided, the system will first search for an existing company with that name. If found, it will use that company's UUID. If not found, a new company will be created.
|
|
62118
|
+
|
|
61895
62119
|
Any other fields in the request body will be ignored.
|
|
61896
62120
|
|
|
61897
62121
|
#### OAuth Scope
|
|
@@ -61911,18 +62135,18 @@ This endpoint requires the following OAuth scope **manage_jobs**.`,
|
|
|
61911
62135
|
};
|
|
61912
62136
|
});
|
|
61913
62137
|
|
|
61914
|
-
// src/funcs/
|
|
61915
|
-
function
|
|
62138
|
+
// src/funcs/jobTemplatesCreateJobTemplates.ts
|
|
62139
|
+
function jobTemplatesCreateJobTemplates(client, request, options) {
|
|
61916
62140
|
return new APIPromise($do129(client, request, options));
|
|
61917
62141
|
}
|
|
61918
62142
|
async function $do129(client, request, options) {
|
|
61919
|
-
const parsed = safeParse(request, (value) =>
|
|
62143
|
+
const parsed = safeParse(request, (value) => JobTemplateInput$outboundSchema.parse(value), "Input validation failed");
|
|
61920
62144
|
if (!parsed.ok) {
|
|
61921
62145
|
return [parsed, { status: "invalid" }];
|
|
61922
62146
|
}
|
|
61923
62147
|
const payload = parsed.value;
|
|
61924
62148
|
const body = encodeJSON("body", payload, { explode: true });
|
|
61925
|
-
const path = pathToFunc("/
|
|
62149
|
+
const path = pathToFunc("/jobtemplate.json")();
|
|
61926
62150
|
const headers = new Headers(compactMap({
|
|
61927
62151
|
"Content-Type": "application/json",
|
|
61928
62152
|
Accept: "application/json"
|
|
@@ -61932,7 +62156,7 @@ async function $do129(client, request, options) {
|
|
|
61932
62156
|
const context = {
|
|
61933
62157
|
options: client._options,
|
|
61934
62158
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
61935
|
-
operationID: "
|
|
62159
|
+
operationID: "createJobTemplates",
|
|
61936
62160
|
oAuth2Scopes: [],
|
|
61937
62161
|
resolvedSecurity: requestSecurity,
|
|
61938
62162
|
securitySource: client._options.security,
|
|
@@ -61975,16 +62199,18 @@ async function $do129(client, request, options) {
|
|
|
61975
62199
|
const responseFields = {
|
|
61976
62200
|
HttpMeta: { Response: response, Request: req }
|
|
61977
62201
|
};
|
|
61978
|
-
const [result2] = await match(json(200,
|
|
62202
|
+
const [result2] = await match(json(200, CreateJobTemplatesResponse$inboundSchema, {
|
|
61979
62203
|
hdrs: true,
|
|
61980
62204
|
key: "Result"
|
|
61981
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
62205
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateJobTemplatesResponse$inboundSchema, {
|
|
62206
|
+
key: "Result"
|
|
62207
|
+
}))(response, req, { extraFields: responseFields });
|
|
61982
62208
|
if (!result2.ok) {
|
|
61983
62209
|
return [result2, { status: "complete", request: req, response }];
|
|
61984
62210
|
}
|
|
61985
62211
|
return [result2, { status: "complete", request: req, response }];
|
|
61986
62212
|
}
|
|
61987
|
-
var
|
|
62213
|
+
var init_jobTemplatesCreateJobTemplates = __esm(() => {
|
|
61988
62214
|
init_encodings();
|
|
61989
62215
|
init_matchers();
|
|
61990
62216
|
init_primitives();
|
|
@@ -61997,23 +62223,23 @@ var init_knowledgeArticlesCreateKnowledgeArticles = __esm(() => {
|
|
|
61997
62223
|
init_async();
|
|
61998
62224
|
});
|
|
61999
62225
|
|
|
62000
|
-
// src/mcp-server/tools/
|
|
62001
|
-
var args105, tool$
|
|
62002
|
-
var
|
|
62003
|
-
|
|
62226
|
+
// src/mcp-server/tools/jobTemplatesCreateJobTemplates.ts
|
|
62227
|
+
var args105, tool$jobTemplatesCreateJobTemplates;
|
|
62228
|
+
var init_jobTemplatesCreateJobTemplates2 = __esm(() => {
|
|
62229
|
+
init_jobTemplatesCreateJobTemplates();
|
|
62004
62230
|
init_components();
|
|
62005
62231
|
init_tools();
|
|
62006
62232
|
args105 = {
|
|
62007
|
-
request:
|
|
62233
|
+
request: JobTemplateInput$inboundSchema
|
|
62008
62234
|
};
|
|
62009
|
-
tool$
|
|
62010
|
-
name: "
|
|
62011
|
-
description: `Create a new
|
|
62235
|
+
tool$jobTemplatesCreateJobTemplates = {
|
|
62236
|
+
name: "job-templates-create-job-templates",
|
|
62237
|
+
description: `Create a new Job Template
|
|
62012
62238
|
|
|
62013
62239
|
|
|
62014
62240
|
|
|
62015
62241
|
#### OAuth Scope
|
|
62016
|
-
This endpoint requires the following OAuth scope **
|
|
62242
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62017
62243
|
|
|
62018
62244
|
|
|
62019
62245
|
|
|
@@ -62023,7 +62249,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62023
62249
|
`,
|
|
62024
62250
|
args: args105,
|
|
62025
62251
|
tool: async (client, args106, ctx) => {
|
|
62026
|
-
const [result2, apiCall] = await
|
|
62252
|
+
const [result2, apiCall] = await jobTemplatesCreateJobTemplates(client, args106.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62027
62253
|
if (!result2.ok) {
|
|
62028
62254
|
return {
|
|
62029
62255
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62036,12 +62262,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62036
62262
|
};
|
|
62037
62263
|
});
|
|
62038
62264
|
|
|
62039
|
-
// src/funcs/
|
|
62040
|
-
function
|
|
62265
|
+
// src/funcs/jobTemplatesDeleteJobTemplates.ts
|
|
62266
|
+
function jobTemplatesDeleteJobTemplates(client, request, options) {
|
|
62041
62267
|
return new APIPromise($do130(client, request, options));
|
|
62042
62268
|
}
|
|
62043
62269
|
async function $do130(client, request, options) {
|
|
62044
|
-
const parsed = safeParse(request, (value) =>
|
|
62270
|
+
const parsed = safeParse(request, (value) => DeleteJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62045
62271
|
if (!parsed.ok) {
|
|
62046
62272
|
return [parsed, { status: "invalid" }];
|
|
62047
62273
|
}
|
|
@@ -62053,7 +62279,7 @@ async function $do130(client, request, options) {
|
|
|
62053
62279
|
charEncoding: "percent"
|
|
62054
62280
|
})
|
|
62055
62281
|
};
|
|
62056
|
-
const path = pathToFunc("/
|
|
62282
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62057
62283
|
const headers = new Headers(compactMap({
|
|
62058
62284
|
Accept: "application/json"
|
|
62059
62285
|
}));
|
|
@@ -62062,7 +62288,7 @@ async function $do130(client, request, options) {
|
|
|
62062
62288
|
const context = {
|
|
62063
62289
|
options: client._options,
|
|
62064
62290
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62065
|
-
operationID: "
|
|
62291
|
+
operationID: "deleteJobTemplates",
|
|
62066
62292
|
oAuth2Scopes: [],
|
|
62067
62293
|
resolvedSecurity: requestSecurity,
|
|
62068
62294
|
securitySource: client._options.security,
|
|
@@ -62105,13 +62331,13 @@ async function $do130(client, request, options) {
|
|
|
62105
62331
|
const responseFields = {
|
|
62106
62332
|
HttpMeta: { Response: response, Request: req }
|
|
62107
62333
|
};
|
|
62108
|
-
const [result2] = await match(json(200,
|
|
62334
|
+
const [result2] = await match(json(200, DeleteJobTemplatesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", DeleteJobTemplatesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62109
62335
|
if (!result2.ok) {
|
|
62110
62336
|
return [result2, { status: "complete", request: req, response }];
|
|
62111
62337
|
}
|
|
62112
62338
|
return [result2, { status: "complete", request: req, response }];
|
|
62113
62339
|
}
|
|
62114
|
-
var
|
|
62340
|
+
var init_jobTemplatesDeleteJobTemplates = __esm(() => {
|
|
62115
62341
|
init_encodings();
|
|
62116
62342
|
init_matchers();
|
|
62117
62343
|
init_primitives();
|
|
@@ -62123,18 +62349,18 @@ var init_knowledgeArticlesDeleteKnowledgeArticles = __esm(() => {
|
|
|
62123
62349
|
init_async();
|
|
62124
62350
|
});
|
|
62125
62351
|
|
|
62126
|
-
// src/mcp-server/tools/
|
|
62127
|
-
var args106, tool$
|
|
62128
|
-
var
|
|
62129
|
-
|
|
62352
|
+
// src/mcp-server/tools/jobTemplatesDeleteJobTemplates.ts
|
|
62353
|
+
var args106, tool$jobTemplatesDeleteJobTemplates;
|
|
62354
|
+
var init_jobTemplatesDeleteJobTemplates2 = __esm(() => {
|
|
62355
|
+
init_jobTemplatesDeleteJobTemplates();
|
|
62130
62356
|
init_operations();
|
|
62131
62357
|
init_tools();
|
|
62132
62358
|
args106 = {
|
|
62133
|
-
request:
|
|
62359
|
+
request: DeleteJobTemplatesRequest$inboundSchema
|
|
62134
62360
|
};
|
|
62135
|
-
tool$
|
|
62136
|
-
name: "
|
|
62137
|
-
description: `Delete a
|
|
62361
|
+
tool$jobTemplatesDeleteJobTemplates = {
|
|
62362
|
+
name: "job-templates-delete-job-templates",
|
|
62363
|
+
description: `Delete a Job Template
|
|
62138
62364
|
|
|
62139
62365
|
|
|
62140
62366
|
|
|
@@ -62143,12 +62369,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
62143
62369
|
|
|
62144
62370
|
|
|
62145
62371
|
#### OAuth Scope
|
|
62146
|
-
This endpoint requires the following OAuth scope **
|
|
62372
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62147
62373
|
|
|
62148
62374
|
`,
|
|
62149
62375
|
args: args106,
|
|
62150
62376
|
tool: async (client, args107, ctx) => {
|
|
62151
|
-
const [result2, apiCall] = await
|
|
62377
|
+
const [result2, apiCall] = await jobTemplatesDeleteJobTemplates(client, args107.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62152
62378
|
if (!result2.ok) {
|
|
62153
62379
|
return {
|
|
62154
62380
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62161,12 +62387,12 @@ This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
|
62161
62387
|
};
|
|
62162
62388
|
});
|
|
62163
62389
|
|
|
62164
|
-
// src/funcs/
|
|
62165
|
-
function
|
|
62390
|
+
// src/funcs/jobTemplatesGetJobTemplates.ts
|
|
62391
|
+
function jobTemplatesGetJobTemplates(client, request, options) {
|
|
62166
62392
|
return new APIPromise($do131(client, request, options));
|
|
62167
62393
|
}
|
|
62168
62394
|
async function $do131(client, request, options) {
|
|
62169
|
-
const parsed = safeParse(request, (value) =>
|
|
62395
|
+
const parsed = safeParse(request, (value) => GetJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62170
62396
|
if (!parsed.ok) {
|
|
62171
62397
|
return [parsed, { status: "invalid" }];
|
|
62172
62398
|
}
|
|
@@ -62178,7 +62404,7 @@ async function $do131(client, request, options) {
|
|
|
62178
62404
|
charEncoding: "percent"
|
|
62179
62405
|
})
|
|
62180
62406
|
};
|
|
62181
|
-
const path = pathToFunc("/
|
|
62407
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62182
62408
|
const headers = new Headers(compactMap({
|
|
62183
62409
|
Accept: "application/json"
|
|
62184
62410
|
}));
|
|
@@ -62187,7 +62413,7 @@ async function $do131(client, request, options) {
|
|
|
62187
62413
|
const context = {
|
|
62188
62414
|
options: client._options,
|
|
62189
62415
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62190
|
-
operationID: "
|
|
62416
|
+
operationID: "getJobTemplates",
|
|
62191
62417
|
oAuth2Scopes: [],
|
|
62192
62418
|
resolvedSecurity: requestSecurity,
|
|
62193
62419
|
securitySource: client._options.security,
|
|
@@ -62230,13 +62456,13 @@ async function $do131(client, request, options) {
|
|
|
62230
62456
|
const responseFields = {
|
|
62231
62457
|
HttpMeta: { Response: response, Request: req }
|
|
62232
62458
|
};
|
|
62233
|
-
const [result2] = await match(json(200,
|
|
62459
|
+
const [result2] = await match(json(200, GetJobTemplatesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", GetJobTemplatesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62234
62460
|
if (!result2.ok) {
|
|
62235
62461
|
return [result2, { status: "complete", request: req, response }];
|
|
62236
62462
|
}
|
|
62237
62463
|
return [result2, { status: "complete", request: req, response }];
|
|
62238
62464
|
}
|
|
62239
|
-
var
|
|
62465
|
+
var init_jobTemplatesGetJobTemplates = __esm(() => {
|
|
62240
62466
|
init_encodings();
|
|
62241
62467
|
init_matchers();
|
|
62242
62468
|
init_primitives();
|
|
@@ -62248,28 +62474,28 @@ var init_knowledgeArticlesGetKnowledgeArticles = __esm(() => {
|
|
|
62248
62474
|
init_async();
|
|
62249
62475
|
});
|
|
62250
62476
|
|
|
62251
|
-
// src/mcp-server/tools/
|
|
62252
|
-
var args107, tool$
|
|
62253
|
-
var
|
|
62254
|
-
|
|
62477
|
+
// src/mcp-server/tools/jobTemplatesGetJobTemplates.ts
|
|
62478
|
+
var args107, tool$jobTemplatesGetJobTemplates;
|
|
62479
|
+
var init_jobTemplatesGetJobTemplates2 = __esm(() => {
|
|
62480
|
+
init_jobTemplatesGetJobTemplates();
|
|
62255
62481
|
init_operations();
|
|
62256
62482
|
init_tools();
|
|
62257
62483
|
args107 = {
|
|
62258
|
-
request:
|
|
62484
|
+
request: GetJobTemplatesRequest$inboundSchema
|
|
62259
62485
|
};
|
|
62260
|
-
tool$
|
|
62261
|
-
name: "
|
|
62262
|
-
description: `Retrieve a
|
|
62486
|
+
tool$jobTemplatesGetJobTemplates = {
|
|
62487
|
+
name: "job-templates-get-job-templates",
|
|
62488
|
+
description: `Retrieve a Job Template
|
|
62263
62489
|
|
|
62264
62490
|
|
|
62265
62491
|
|
|
62266
62492
|
#### OAuth Scope
|
|
62267
|
-
This endpoint requires the following OAuth scope **
|
|
62493
|
+
This endpoint requires the following OAuth scope **read_jobs**.
|
|
62268
62494
|
|
|
62269
62495
|
`,
|
|
62270
62496
|
args: args107,
|
|
62271
62497
|
tool: async (client, args108, ctx) => {
|
|
62272
|
-
const [result2, apiCall] = await
|
|
62498
|
+
const [result2, apiCall] = await jobTemplatesGetJobTemplates(client, args108.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62273
62499
|
if (!result2.ok) {
|
|
62274
62500
|
return {
|
|
62275
62501
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62282,12 +62508,12 @@ This endpoint requires the following OAuth scope **read_knowledge**.
|
|
|
62282
62508
|
};
|
|
62283
62509
|
});
|
|
62284
62510
|
|
|
62285
|
-
// src/funcs/
|
|
62286
|
-
function
|
|
62511
|
+
// src/funcs/jobTemplatesListJobTemplates.ts
|
|
62512
|
+
function jobTemplatesListJobTemplates(client, options) {
|
|
62287
62513
|
return new APIPromise($do132(client, options));
|
|
62288
62514
|
}
|
|
62289
62515
|
async function $do132(client, options) {
|
|
62290
|
-
const path = pathToFunc("/
|
|
62516
|
+
const path = pathToFunc("/jobtemplate.json")();
|
|
62291
62517
|
const headers = new Headers(compactMap({
|
|
62292
62518
|
Accept: "application/json"
|
|
62293
62519
|
}));
|
|
@@ -62296,7 +62522,7 @@ async function $do132(client, options) {
|
|
|
62296
62522
|
const context = {
|
|
62297
62523
|
options: client._options,
|
|
62298
62524
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62299
|
-
operationID: "
|
|
62525
|
+
operationID: "listJobTemplates",
|
|
62300
62526
|
oAuth2Scopes: [],
|
|
62301
62527
|
resolvedSecurity: requestSecurity,
|
|
62302
62528
|
securitySource: client._options.security,
|
|
@@ -62338,13 +62564,13 @@ async function $do132(client, options) {
|
|
|
62338
62564
|
const responseFields = {
|
|
62339
62565
|
HttpMeta: { Response: response, Request: req }
|
|
62340
62566
|
};
|
|
62341
|
-
const [result2] = await match(json(200,
|
|
62567
|
+
const [result2] = await match(json(200, ListJobTemplatesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", ListJobTemplatesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62342
62568
|
if (!result2.ok) {
|
|
62343
62569
|
return [result2, { status: "complete", request: req, response }];
|
|
62344
62570
|
}
|
|
62345
62571
|
return [result2, { status: "complete", request: req, response }];
|
|
62346
62572
|
}
|
|
62347
|
-
var
|
|
62573
|
+
var init_jobTemplatesListJobTemplates = __esm(() => {
|
|
62348
62574
|
init_matchers();
|
|
62349
62575
|
init_primitives();
|
|
62350
62576
|
init_security();
|
|
@@ -62354,14 +62580,14 @@ var init_knowledgeArticlesListKnowledgeArticles = __esm(() => {
|
|
|
62354
62580
|
init_async();
|
|
62355
62581
|
});
|
|
62356
62582
|
|
|
62357
|
-
// src/mcp-server/tools/
|
|
62358
|
-
var tool$
|
|
62359
|
-
var
|
|
62360
|
-
|
|
62583
|
+
// src/mcp-server/tools/jobTemplatesListJobTemplates.ts
|
|
62584
|
+
var tool$jobTemplatesListJobTemplates;
|
|
62585
|
+
var init_jobTemplatesListJobTemplates2 = __esm(() => {
|
|
62586
|
+
init_jobTemplatesListJobTemplates();
|
|
62361
62587
|
init_tools();
|
|
62362
|
-
tool$
|
|
62363
|
-
name: "
|
|
62364
|
-
description: `List all
|
|
62588
|
+
tool$jobTemplatesListJobTemplates = {
|
|
62589
|
+
name: "job-templates-list-job-templates",
|
|
62590
|
+
description: `List all Job Templates
|
|
62365
62591
|
|
|
62366
62592
|
|
|
62367
62593
|
|
|
@@ -62370,11 +62596,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
62370
62596
|
|
|
62371
62597
|
|
|
62372
62598
|
#### OAuth Scope
|
|
62373
|
-
This endpoint requires the following OAuth scope **
|
|
62599
|
+
This endpoint requires the following OAuth scope **read_jobs**.
|
|
62374
62600
|
|
|
62375
62601
|
`,
|
|
62376
62602
|
tool: async (client, ctx) => {
|
|
62377
|
-
const [result2, apiCall] = await
|
|
62603
|
+
const [result2, apiCall] = await jobTemplatesListJobTemplates(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62378
62604
|
if (!result2.ok) {
|
|
62379
62605
|
return {
|
|
62380
62606
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62387,24 +62613,24 @@ This endpoint requires the following OAuth scope **read_knowledge**.
|
|
|
62387
62613
|
};
|
|
62388
62614
|
});
|
|
62389
62615
|
|
|
62390
|
-
// src/funcs/
|
|
62391
|
-
function
|
|
62616
|
+
// src/funcs/jobTemplatesUpdateJobTemplates.ts
|
|
62617
|
+
function jobTemplatesUpdateJobTemplates(client, request, options) {
|
|
62392
62618
|
return new APIPromise($do133(client, request, options));
|
|
62393
62619
|
}
|
|
62394
62620
|
async function $do133(client, request, options) {
|
|
62395
|
-
const parsed = safeParse(request, (value) =>
|
|
62621
|
+
const parsed = safeParse(request, (value) => UpdateJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62396
62622
|
if (!parsed.ok) {
|
|
62397
62623
|
return [parsed, { status: "invalid" }];
|
|
62398
62624
|
}
|
|
62399
62625
|
const payload = parsed.value;
|
|
62400
|
-
const body = encodeJSON("body", payload.
|
|
62626
|
+
const body = encodeJSON("body", payload.JobTemplate, { explode: true });
|
|
62401
62627
|
const pathParams = {
|
|
62402
62628
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
62403
62629
|
explode: false,
|
|
62404
62630
|
charEncoding: "percent"
|
|
62405
62631
|
})
|
|
62406
62632
|
};
|
|
62407
|
-
const path = pathToFunc("/
|
|
62633
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62408
62634
|
const headers = new Headers(compactMap({
|
|
62409
62635
|
"Content-Type": "application/json",
|
|
62410
62636
|
Accept: "application/json"
|
|
@@ -62414,7 +62640,7 @@ async function $do133(client, request, options) {
|
|
|
62414
62640
|
const context = {
|
|
62415
62641
|
options: client._options,
|
|
62416
62642
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62417
|
-
operationID: "
|
|
62643
|
+
operationID: "updateJobTemplates",
|
|
62418
62644
|
oAuth2Scopes: [],
|
|
62419
62645
|
resolvedSecurity: requestSecurity,
|
|
62420
62646
|
securitySource: client._options.security,
|
|
@@ -62457,13 +62683,13 @@ async function $do133(client, request, options) {
|
|
|
62457
62683
|
const responseFields = {
|
|
62458
62684
|
HttpMeta: { Response: response, Request: req }
|
|
62459
62685
|
};
|
|
62460
|
-
const [result2] = await match(json(200,
|
|
62686
|
+
const [result2] = await match(json(200, UpdateJobTemplatesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", UpdateJobTemplatesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62461
62687
|
if (!result2.ok) {
|
|
62462
62688
|
return [result2, { status: "complete", request: req, response }];
|
|
62463
62689
|
}
|
|
62464
62690
|
return [result2, { status: "complete", request: req, response }];
|
|
62465
62691
|
}
|
|
62466
|
-
var
|
|
62692
|
+
var init_jobTemplatesUpdateJobTemplates = __esm(() => {
|
|
62467
62693
|
init_encodings();
|
|
62468
62694
|
init_matchers();
|
|
62469
62695
|
init_primitives();
|
|
@@ -62475,28 +62701,28 @@ var init_knowledgeArticlesUpdateKnowledgeArticles = __esm(() => {
|
|
|
62475
62701
|
init_async();
|
|
62476
62702
|
});
|
|
62477
62703
|
|
|
62478
|
-
// src/mcp-server/tools/
|
|
62479
|
-
var args108, tool$
|
|
62480
|
-
var
|
|
62481
|
-
|
|
62704
|
+
// src/mcp-server/tools/jobTemplatesUpdateJobTemplates.ts
|
|
62705
|
+
var args108, tool$jobTemplatesUpdateJobTemplates;
|
|
62706
|
+
var init_jobTemplatesUpdateJobTemplates2 = __esm(() => {
|
|
62707
|
+
init_jobTemplatesUpdateJobTemplates();
|
|
62482
62708
|
init_operations();
|
|
62483
62709
|
init_tools();
|
|
62484
62710
|
args108 = {
|
|
62485
|
-
request:
|
|
62711
|
+
request: UpdateJobTemplatesRequest$inboundSchema
|
|
62486
62712
|
};
|
|
62487
|
-
tool$
|
|
62488
|
-
name: "
|
|
62489
|
-
description: `Update a
|
|
62713
|
+
tool$jobTemplatesUpdateJobTemplates = {
|
|
62714
|
+
name: "job-templates-update-job-templates",
|
|
62715
|
+
description: `Update a Job Template
|
|
62490
62716
|
|
|
62491
62717
|
|
|
62492
62718
|
|
|
62493
62719
|
#### OAuth Scope
|
|
62494
|
-
This endpoint requires the following OAuth scope **
|
|
62720
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62495
62721
|
|
|
62496
62722
|
`,
|
|
62497
62723
|
args: args108,
|
|
62498
62724
|
tool: async (client, args109, ctx) => {
|
|
62499
|
-
const [result2, apiCall] = await
|
|
62725
|
+
const [result2, apiCall] = await jobTemplatesUpdateJobTemplates(client, args109.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62500
62726
|
if (!result2.ok) {
|
|
62501
62727
|
return {
|
|
62502
62728
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62509,18 +62735,18 @@ This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
|
62509
62735
|
};
|
|
62510
62736
|
});
|
|
62511
62737
|
|
|
62512
|
-
// src/funcs/
|
|
62513
|
-
function
|
|
62738
|
+
// src/funcs/knowledgeArticlesCreateKnowledgeArticles.ts
|
|
62739
|
+
function knowledgeArticlesCreateKnowledgeArticles(client, request, options) {
|
|
62514
62740
|
return new APIPromise($do134(client, request, options));
|
|
62515
62741
|
}
|
|
62516
62742
|
async function $do134(client, request, options) {
|
|
62517
|
-
const parsed = safeParse(request, (value) =>
|
|
62743
|
+
const parsed = safeParse(request, (value) => KnowledgeArticleInput$outboundSchema.parse(value), "Input validation failed");
|
|
62518
62744
|
if (!parsed.ok) {
|
|
62519
62745
|
return [parsed, { status: "invalid" }];
|
|
62520
62746
|
}
|
|
62521
62747
|
const payload = parsed.value;
|
|
62522
62748
|
const body = encodeJSON("body", payload, { explode: true });
|
|
62523
|
-
const path = pathToFunc("/
|
|
62749
|
+
const path = pathToFunc("/knowledgearticle.json")();
|
|
62524
62750
|
const headers = new Headers(compactMap({
|
|
62525
62751
|
"Content-Type": "application/json",
|
|
62526
62752
|
Accept: "application/json"
|
|
@@ -62530,7 +62756,7 @@ async function $do134(client, request, options) {
|
|
|
62530
62756
|
const context = {
|
|
62531
62757
|
options: client._options,
|
|
62532
62758
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62533
|
-
operationID: "
|
|
62759
|
+
operationID: "createKnowledgeArticles",
|
|
62534
62760
|
oAuth2Scopes: [],
|
|
62535
62761
|
resolvedSecurity: requestSecurity,
|
|
62536
62762
|
securitySource: client._options.security,
|
|
@@ -62573,18 +62799,16 @@ async function $do134(client, request, options) {
|
|
|
62573
62799
|
const responseFields = {
|
|
62574
62800
|
HttpMeta: { Response: response, Request: req }
|
|
62575
62801
|
};
|
|
62576
|
-
const [result2] = await match(json(200,
|
|
62802
|
+
const [result2] = await match(json(200, CreateKnowledgeArticlesResponse$inboundSchema, {
|
|
62577
62803
|
hdrs: true,
|
|
62578
62804
|
key: "Result"
|
|
62579
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
62580
|
-
key: "Result"
|
|
62581
|
-
}))(response, req, { extraFields: responseFields });
|
|
62805
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateKnowledgeArticlesResponse$inboundSchema, { key: "Result" }))(response, req, { extraFields: responseFields });
|
|
62582
62806
|
if (!result2.ok) {
|
|
62583
62807
|
return [result2, { status: "complete", request: req, response }];
|
|
62584
62808
|
}
|
|
62585
62809
|
return [result2, { status: "complete", request: req, response }];
|
|
62586
62810
|
}
|
|
62587
|
-
var
|
|
62811
|
+
var init_knowledgeArticlesCreateKnowledgeArticles = __esm(() => {
|
|
62588
62812
|
init_encodings();
|
|
62589
62813
|
init_matchers();
|
|
62590
62814
|
init_primitives();
|
|
@@ -62597,23 +62821,23 @@ var init_locationsCreateLocations = __esm(() => {
|
|
|
62597
62821
|
init_async();
|
|
62598
62822
|
});
|
|
62599
62823
|
|
|
62600
|
-
// src/mcp-server/tools/
|
|
62601
|
-
var args109, tool$
|
|
62602
|
-
var
|
|
62603
|
-
|
|
62824
|
+
// src/mcp-server/tools/knowledgeArticlesCreateKnowledgeArticles.ts
|
|
62825
|
+
var args109, tool$knowledgeArticlesCreateKnowledgeArticles;
|
|
62826
|
+
var init_knowledgeArticlesCreateKnowledgeArticles2 = __esm(() => {
|
|
62827
|
+
init_knowledgeArticlesCreateKnowledgeArticles();
|
|
62604
62828
|
init_components();
|
|
62605
62829
|
init_tools();
|
|
62606
62830
|
args109 = {
|
|
62607
|
-
request:
|
|
62831
|
+
request: KnowledgeArticleInput$inboundSchema
|
|
62608
62832
|
};
|
|
62609
|
-
tool$
|
|
62610
|
-
name: "
|
|
62611
|
-
description: `Create a new
|
|
62833
|
+
tool$knowledgeArticlesCreateKnowledgeArticles = {
|
|
62834
|
+
name: "knowledge-articles-create-knowledge-articles",
|
|
62835
|
+
description: `Create a new Knowledge Article
|
|
62612
62836
|
|
|
62613
62837
|
|
|
62614
62838
|
|
|
62615
62839
|
#### OAuth Scope
|
|
62616
|
-
This endpoint requires the following OAuth scope **
|
|
62840
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
62617
62841
|
|
|
62618
62842
|
|
|
62619
62843
|
|
|
@@ -62623,7 +62847,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62623
62847
|
`,
|
|
62624
62848
|
args: args109,
|
|
62625
62849
|
tool: async (client, args110, ctx) => {
|
|
62626
|
-
const [result2, apiCall] = await
|
|
62850
|
+
const [result2, apiCall] = await knowledgeArticlesCreateKnowledgeArticles(client, args110.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62627
62851
|
if (!result2.ok) {
|
|
62628
62852
|
return {
|
|
62629
62853
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62636,12 +62860,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62636
62860
|
};
|
|
62637
62861
|
});
|
|
62638
62862
|
|
|
62639
|
-
// src/funcs/
|
|
62640
|
-
function
|
|
62863
|
+
// src/funcs/knowledgeArticlesDeleteKnowledgeArticles.ts
|
|
62864
|
+
function knowledgeArticlesDeleteKnowledgeArticles(client, request, options) {
|
|
62641
62865
|
return new APIPromise($do135(client, request, options));
|
|
62642
62866
|
}
|
|
62643
62867
|
async function $do135(client, request, options) {
|
|
62644
|
-
const parsed = safeParse(request, (value) =>
|
|
62868
|
+
const parsed = safeParse(request, (value) => DeleteKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62645
62869
|
if (!parsed.ok) {
|
|
62646
62870
|
return [parsed, { status: "invalid" }];
|
|
62647
62871
|
}
|
|
@@ -62653,7 +62877,7 @@ async function $do135(client, request, options) {
|
|
|
62653
62877
|
charEncoding: "percent"
|
|
62654
62878
|
})
|
|
62655
62879
|
};
|
|
62656
|
-
const path = pathToFunc("/
|
|
62880
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
62657
62881
|
const headers = new Headers(compactMap({
|
|
62658
62882
|
Accept: "application/json"
|
|
62659
62883
|
}));
|
|
@@ -62662,7 +62886,7 @@ async function $do135(client, request, options) {
|
|
|
62662
62886
|
const context = {
|
|
62663
62887
|
options: client._options,
|
|
62664
62888
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62665
|
-
operationID: "
|
|
62889
|
+
operationID: "deleteKnowledgeArticles",
|
|
62666
62890
|
oAuth2Scopes: [],
|
|
62667
62891
|
resolvedSecurity: requestSecurity,
|
|
62668
62892
|
securitySource: client._options.security,
|
|
@@ -62705,13 +62929,13 @@ async function $do135(client, request, options) {
|
|
|
62705
62929
|
const responseFields = {
|
|
62706
62930
|
HttpMeta: { Response: response, Request: req }
|
|
62707
62931
|
};
|
|
62708
|
-
const [result2] = await match(json(200,
|
|
62932
|
+
const [result2] = await match(json(200, DeleteKnowledgeArticlesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", DeleteKnowledgeArticlesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62709
62933
|
if (!result2.ok) {
|
|
62710
62934
|
return [result2, { status: "complete", request: req, response }];
|
|
62711
62935
|
}
|
|
62712
62936
|
return [result2, { status: "complete", request: req, response }];
|
|
62713
62937
|
}
|
|
62714
|
-
var
|
|
62938
|
+
var init_knowledgeArticlesDeleteKnowledgeArticles = __esm(() => {
|
|
62715
62939
|
init_encodings();
|
|
62716
62940
|
init_matchers();
|
|
62717
62941
|
init_primitives();
|
|
@@ -62723,18 +62947,18 @@ var init_locationsDeleteLocations = __esm(() => {
|
|
|
62723
62947
|
init_async();
|
|
62724
62948
|
});
|
|
62725
62949
|
|
|
62726
|
-
// src/mcp-server/tools/
|
|
62727
|
-
var args110, tool$
|
|
62728
|
-
var
|
|
62729
|
-
|
|
62950
|
+
// src/mcp-server/tools/knowledgeArticlesDeleteKnowledgeArticles.ts
|
|
62951
|
+
var args110, tool$knowledgeArticlesDeleteKnowledgeArticles;
|
|
62952
|
+
var init_knowledgeArticlesDeleteKnowledgeArticles2 = __esm(() => {
|
|
62953
|
+
init_knowledgeArticlesDeleteKnowledgeArticles();
|
|
62730
62954
|
init_operations();
|
|
62731
62955
|
init_tools();
|
|
62732
62956
|
args110 = {
|
|
62733
|
-
request:
|
|
62957
|
+
request: DeleteKnowledgeArticlesRequest$inboundSchema
|
|
62734
62958
|
};
|
|
62735
|
-
tool$
|
|
62736
|
-
name: "
|
|
62737
|
-
description: `Delete a
|
|
62959
|
+
tool$knowledgeArticlesDeleteKnowledgeArticles = {
|
|
62960
|
+
name: "knowledge-articles-delete-knowledge-articles",
|
|
62961
|
+
description: `Delete a Knowledge Article
|
|
62738
62962
|
|
|
62739
62963
|
|
|
62740
62964
|
|
|
@@ -62743,12 +62967,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
62743
62967
|
|
|
62744
62968
|
|
|
62745
62969
|
#### OAuth Scope
|
|
62746
|
-
This endpoint requires the following OAuth scope **
|
|
62970
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
62747
62971
|
|
|
62748
62972
|
`,
|
|
62749
62973
|
args: args110,
|
|
62750
62974
|
tool: async (client, args111, ctx) => {
|
|
62751
|
-
const [result2, apiCall] = await
|
|
62975
|
+
const [result2, apiCall] = await knowledgeArticlesDeleteKnowledgeArticles(client, args111.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62752
62976
|
if (!result2.ok) {
|
|
62753
62977
|
return {
|
|
62754
62978
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62761,12 +62985,12 @@ This endpoint requires the following OAuth scope **manage_locations**.
|
|
|
62761
62985
|
};
|
|
62762
62986
|
});
|
|
62763
62987
|
|
|
62764
|
-
// src/funcs/
|
|
62765
|
-
function
|
|
62988
|
+
// src/funcs/knowledgeArticlesGetKnowledgeArticles.ts
|
|
62989
|
+
function knowledgeArticlesGetKnowledgeArticles(client, request, options) {
|
|
62766
62990
|
return new APIPromise($do136(client, request, options));
|
|
62767
62991
|
}
|
|
62768
62992
|
async function $do136(client, request, options) {
|
|
62769
|
-
const parsed = safeParse(request, (value) =>
|
|
62993
|
+
const parsed = safeParse(request, (value) => GetKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62770
62994
|
if (!parsed.ok) {
|
|
62771
62995
|
return [parsed, { status: "invalid" }];
|
|
62772
62996
|
}
|
|
@@ -62778,7 +63002,7 @@ async function $do136(client, request, options) {
|
|
|
62778
63002
|
charEncoding: "percent"
|
|
62779
63003
|
})
|
|
62780
63004
|
};
|
|
62781
|
-
const path = pathToFunc("/
|
|
63005
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
62782
63006
|
const headers = new Headers(compactMap({
|
|
62783
63007
|
Accept: "application/json"
|
|
62784
63008
|
}));
|
|
@@ -62787,7 +63011,7 @@ async function $do136(client, request, options) {
|
|
|
62787
63011
|
const context = {
|
|
62788
63012
|
options: client._options,
|
|
62789
63013
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62790
|
-
operationID: "
|
|
63014
|
+
operationID: "getKnowledgeArticles",
|
|
62791
63015
|
oAuth2Scopes: [],
|
|
62792
63016
|
resolvedSecurity: requestSecurity,
|
|
62793
63017
|
securitySource: client._options.security,
|
|
@@ -62830,13 +63054,13 @@ async function $do136(client, request, options) {
|
|
|
62830
63054
|
const responseFields = {
|
|
62831
63055
|
HttpMeta: { Response: response, Request: req }
|
|
62832
63056
|
};
|
|
62833
|
-
const [result2] = await match(json(200,
|
|
63057
|
+
const [result2] = await match(json(200, GetKnowledgeArticlesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", GetKnowledgeArticlesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62834
63058
|
if (!result2.ok) {
|
|
62835
63059
|
return [result2, { status: "complete", request: req, response }];
|
|
62836
63060
|
}
|
|
62837
63061
|
return [result2, { status: "complete", request: req, response }];
|
|
62838
63062
|
}
|
|
62839
|
-
var
|
|
63063
|
+
var init_knowledgeArticlesGetKnowledgeArticles = __esm(() => {
|
|
62840
63064
|
init_encodings();
|
|
62841
63065
|
init_matchers();
|
|
62842
63066
|
init_primitives();
|
|
@@ -62848,28 +63072,28 @@ var init_locationsGetLocations = __esm(() => {
|
|
|
62848
63072
|
init_async();
|
|
62849
63073
|
});
|
|
62850
63074
|
|
|
62851
|
-
// src/mcp-server/tools/
|
|
62852
|
-
var args111, tool$
|
|
62853
|
-
var
|
|
62854
|
-
|
|
63075
|
+
// src/mcp-server/tools/knowledgeArticlesGetKnowledgeArticles.ts
|
|
63076
|
+
var args111, tool$knowledgeArticlesGetKnowledgeArticles;
|
|
63077
|
+
var init_knowledgeArticlesGetKnowledgeArticles2 = __esm(() => {
|
|
63078
|
+
init_knowledgeArticlesGetKnowledgeArticles();
|
|
62855
63079
|
init_operations();
|
|
62856
63080
|
init_tools();
|
|
62857
63081
|
args111 = {
|
|
62858
|
-
request:
|
|
63082
|
+
request: GetKnowledgeArticlesRequest$inboundSchema
|
|
62859
63083
|
};
|
|
62860
|
-
tool$
|
|
62861
|
-
name: "
|
|
62862
|
-
description: `Retrieve a
|
|
63084
|
+
tool$knowledgeArticlesGetKnowledgeArticles = {
|
|
63085
|
+
name: "knowledge-articles-get-knowledge-articles",
|
|
63086
|
+
description: `Retrieve a Knowledge Article
|
|
62863
63087
|
|
|
62864
63088
|
|
|
62865
63089
|
|
|
62866
63090
|
#### OAuth Scope
|
|
62867
|
-
This endpoint requires the following OAuth scope **
|
|
63091
|
+
This endpoint requires the following OAuth scope **read_knowledge**.
|
|
62868
63092
|
|
|
62869
63093
|
`,
|
|
62870
63094
|
args: args111,
|
|
62871
63095
|
tool: async (client, args112, ctx) => {
|
|
62872
|
-
const [result2, apiCall] = await
|
|
63096
|
+
const [result2, apiCall] = await knowledgeArticlesGetKnowledgeArticles(client, args112.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62873
63097
|
if (!result2.ok) {
|
|
62874
63098
|
return {
|
|
62875
63099
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62882,12 +63106,12 @@ This endpoint requires the following OAuth scope **read_locations**.
|
|
|
62882
63106
|
};
|
|
62883
63107
|
});
|
|
62884
63108
|
|
|
62885
|
-
// src/funcs/
|
|
62886
|
-
function
|
|
63109
|
+
// src/funcs/knowledgeArticlesListKnowledgeArticles.ts
|
|
63110
|
+
function knowledgeArticlesListKnowledgeArticles(client, options) {
|
|
62887
63111
|
return new APIPromise($do137(client, options));
|
|
62888
63112
|
}
|
|
62889
63113
|
async function $do137(client, options) {
|
|
62890
|
-
const path = pathToFunc("/
|
|
63114
|
+
const path = pathToFunc("/knowledgearticle.json")();
|
|
62891
63115
|
const headers = new Headers(compactMap({
|
|
62892
63116
|
Accept: "application/json"
|
|
62893
63117
|
}));
|
|
@@ -62896,7 +63120,7 @@ async function $do137(client, options) {
|
|
|
62896
63120
|
const context = {
|
|
62897
63121
|
options: client._options,
|
|
62898
63122
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62899
|
-
operationID: "
|
|
63123
|
+
operationID: "listKnowledgeArticles",
|
|
62900
63124
|
oAuth2Scopes: [],
|
|
62901
63125
|
resolvedSecurity: requestSecurity,
|
|
62902
63126
|
securitySource: client._options.security,
|
|
@@ -62938,13 +63162,13 @@ async function $do137(client, options) {
|
|
|
62938
63162
|
const responseFields = {
|
|
62939
63163
|
HttpMeta: { Response: response, Request: req }
|
|
62940
63164
|
};
|
|
62941
|
-
const [result2] = await match(json(200,
|
|
63165
|
+
const [result2] = await match(json(200, ListKnowledgeArticlesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", ListKnowledgeArticlesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
62942
63166
|
if (!result2.ok) {
|
|
62943
63167
|
return [result2, { status: "complete", request: req, response }];
|
|
62944
63168
|
}
|
|
62945
63169
|
return [result2, { status: "complete", request: req, response }];
|
|
62946
63170
|
}
|
|
62947
|
-
var
|
|
63171
|
+
var init_knowledgeArticlesListKnowledgeArticles = __esm(() => {
|
|
62948
63172
|
init_matchers();
|
|
62949
63173
|
init_primitives();
|
|
62950
63174
|
init_security();
|
|
@@ -62954,14 +63178,14 @@ var init_locationsListLocations = __esm(() => {
|
|
|
62954
63178
|
init_async();
|
|
62955
63179
|
});
|
|
62956
63180
|
|
|
62957
|
-
// src/mcp-server/tools/
|
|
62958
|
-
var tool$
|
|
62959
|
-
var
|
|
62960
|
-
|
|
63181
|
+
// src/mcp-server/tools/knowledgeArticlesListKnowledgeArticles.ts
|
|
63182
|
+
var tool$knowledgeArticlesListKnowledgeArticles;
|
|
63183
|
+
var init_knowledgeArticlesListKnowledgeArticles2 = __esm(() => {
|
|
63184
|
+
init_knowledgeArticlesListKnowledgeArticles();
|
|
62961
63185
|
init_tools();
|
|
62962
|
-
tool$
|
|
62963
|
-
name: "
|
|
62964
|
-
description: `List all
|
|
63186
|
+
tool$knowledgeArticlesListKnowledgeArticles = {
|
|
63187
|
+
name: "knowledge-articles-list-knowledge-articles",
|
|
63188
|
+
description: `List all Knowledge Articles
|
|
62965
63189
|
|
|
62966
63190
|
|
|
62967
63191
|
|
|
@@ -62970,11 +63194,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
62970
63194
|
|
|
62971
63195
|
|
|
62972
63196
|
#### OAuth Scope
|
|
62973
|
-
This endpoint requires the following OAuth scope **
|
|
63197
|
+
This endpoint requires the following OAuth scope **read_knowledge**.
|
|
62974
63198
|
|
|
62975
63199
|
`,
|
|
62976
63200
|
tool: async (client, ctx) => {
|
|
62977
|
-
const [result2, apiCall] = await
|
|
63201
|
+
const [result2, apiCall] = await knowledgeArticlesListKnowledgeArticles(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62978
63202
|
if (!result2.ok) {
|
|
62979
63203
|
return {
|
|
62980
63204
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62987,24 +63211,24 @@ This endpoint requires the following OAuth scope **read_locations**.
|
|
|
62987
63211
|
};
|
|
62988
63212
|
});
|
|
62989
63213
|
|
|
62990
|
-
// src/funcs/
|
|
62991
|
-
function
|
|
63214
|
+
// src/funcs/knowledgeArticlesUpdateKnowledgeArticles.ts
|
|
63215
|
+
function knowledgeArticlesUpdateKnowledgeArticles(client, request, options) {
|
|
62992
63216
|
return new APIPromise($do138(client, request, options));
|
|
62993
63217
|
}
|
|
62994
63218
|
async function $do138(client, request, options) {
|
|
62995
|
-
const parsed = safeParse(request, (value) =>
|
|
63219
|
+
const parsed = safeParse(request, (value) => UpdateKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62996
63220
|
if (!parsed.ok) {
|
|
62997
63221
|
return [parsed, { status: "invalid" }];
|
|
62998
63222
|
}
|
|
62999
63223
|
const payload = parsed.value;
|
|
63000
|
-
const body = encodeJSON("body", payload.
|
|
63224
|
+
const body = encodeJSON("body", payload.KnowledgeArticle, { explode: true });
|
|
63001
63225
|
const pathParams = {
|
|
63002
63226
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
63003
63227
|
explode: false,
|
|
63004
63228
|
charEncoding: "percent"
|
|
63005
63229
|
})
|
|
63006
63230
|
};
|
|
63007
|
-
const path = pathToFunc("/
|
|
63231
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
63008
63232
|
const headers = new Headers(compactMap({
|
|
63009
63233
|
"Content-Type": "application/json",
|
|
63010
63234
|
Accept: "application/json"
|
|
@@ -63014,7 +63238,7 @@ async function $do138(client, request, options) {
|
|
|
63014
63238
|
const context = {
|
|
63015
63239
|
options: client._options,
|
|
63016
63240
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63017
|
-
operationID: "
|
|
63241
|
+
operationID: "updateKnowledgeArticles",
|
|
63018
63242
|
oAuth2Scopes: [],
|
|
63019
63243
|
resolvedSecurity: requestSecurity,
|
|
63020
63244
|
securitySource: client._options.security,
|
|
@@ -63057,13 +63281,13 @@ async function $do138(client, request, options) {
|
|
|
63057
63281
|
const responseFields = {
|
|
63058
63282
|
HttpMeta: { Response: response, Request: req }
|
|
63059
63283
|
};
|
|
63060
|
-
const [result2] = await match(json(200,
|
|
63284
|
+
const [result2] = await match(json(200, UpdateKnowledgeArticlesResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", UpdateKnowledgeArticlesResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
63061
63285
|
if (!result2.ok) {
|
|
63062
63286
|
return [result2, { status: "complete", request: req, response }];
|
|
63063
63287
|
}
|
|
63064
63288
|
return [result2, { status: "complete", request: req, response }];
|
|
63065
63289
|
}
|
|
63066
|
-
var
|
|
63290
|
+
var init_knowledgeArticlesUpdateKnowledgeArticles = __esm(() => {
|
|
63067
63291
|
init_encodings();
|
|
63068
63292
|
init_matchers();
|
|
63069
63293
|
init_primitives();
|
|
@@ -63075,28 +63299,28 @@ var init_locationsUpdateLocations = __esm(() => {
|
|
|
63075
63299
|
init_async();
|
|
63076
63300
|
});
|
|
63077
63301
|
|
|
63078
|
-
// src/mcp-server/tools/
|
|
63079
|
-
var args112, tool$
|
|
63080
|
-
var
|
|
63081
|
-
|
|
63302
|
+
// src/mcp-server/tools/knowledgeArticlesUpdateKnowledgeArticles.ts
|
|
63303
|
+
var args112, tool$knowledgeArticlesUpdateKnowledgeArticles;
|
|
63304
|
+
var init_knowledgeArticlesUpdateKnowledgeArticles2 = __esm(() => {
|
|
63305
|
+
init_knowledgeArticlesUpdateKnowledgeArticles();
|
|
63082
63306
|
init_operations();
|
|
63083
63307
|
init_tools();
|
|
63084
63308
|
args112 = {
|
|
63085
|
-
request:
|
|
63309
|
+
request: UpdateKnowledgeArticlesRequest$inboundSchema
|
|
63086
63310
|
};
|
|
63087
|
-
tool$
|
|
63088
|
-
name: "
|
|
63089
|
-
description: `Update a
|
|
63311
|
+
tool$knowledgeArticlesUpdateKnowledgeArticles = {
|
|
63312
|
+
name: "knowledge-articles-update-knowledge-articles",
|
|
63313
|
+
description: `Update a Knowledge Article
|
|
63090
63314
|
|
|
63091
63315
|
|
|
63092
63316
|
|
|
63093
63317
|
#### OAuth Scope
|
|
63094
|
-
This endpoint requires the following OAuth scope **
|
|
63318
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
63095
63319
|
|
|
63096
63320
|
`,
|
|
63097
63321
|
args: args112,
|
|
63098
63322
|
tool: async (client, args113, ctx) => {
|
|
63099
|
-
const [result2, apiCall] = await
|
|
63323
|
+
const [result2, apiCall] = await knowledgeArticlesUpdateKnowledgeArticles(client, args113.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63100
63324
|
if (!result2.ok) {
|
|
63101
63325
|
return {
|
|
63102
63326
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63109,18 +63333,18 @@ This endpoint requires the following OAuth scope **manage_locations**.
|
|
|
63109
63333
|
};
|
|
63110
63334
|
});
|
|
63111
63335
|
|
|
63112
|
-
// src/funcs/
|
|
63113
|
-
function
|
|
63336
|
+
// src/funcs/locationsCreateLocations.ts
|
|
63337
|
+
function locationsCreateLocations(client, request, options) {
|
|
63114
63338
|
return new APIPromise($do139(client, request, options));
|
|
63115
63339
|
}
|
|
63116
63340
|
async function $do139(client, request, options) {
|
|
63117
|
-
const parsed = safeParse(request, (value) =>
|
|
63341
|
+
const parsed = safeParse(request, (value) => LocationInput$outboundSchema.parse(value), "Input validation failed");
|
|
63118
63342
|
if (!parsed.ok) {
|
|
63119
63343
|
return [parsed, { status: "invalid" }];
|
|
63120
63344
|
}
|
|
63121
63345
|
const payload = parsed.value;
|
|
63122
63346
|
const body = encodeJSON("body", payload, { explode: true });
|
|
63123
|
-
const path = pathToFunc("/
|
|
63347
|
+
const path = pathToFunc("/location.json")();
|
|
63124
63348
|
const headers = new Headers(compactMap({
|
|
63125
63349
|
"Content-Type": "application/json",
|
|
63126
63350
|
Accept: "application/json"
|
|
@@ -63130,7 +63354,7 @@ async function $do139(client, request, options) {
|
|
|
63130
63354
|
const context = {
|
|
63131
63355
|
options: client._options,
|
|
63132
63356
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63133
|
-
operationID: "
|
|
63357
|
+
operationID: "createLocations",
|
|
63134
63358
|
oAuth2Scopes: [],
|
|
63135
63359
|
resolvedSecurity: requestSecurity,
|
|
63136
63360
|
securitySource: client._options.security,
|
|
@@ -63173,10 +63397,10 @@ async function $do139(client, request, options) {
|
|
|
63173
63397
|
const responseFields = {
|
|
63174
63398
|
HttpMeta: { Response: response, Request: req }
|
|
63175
63399
|
};
|
|
63176
|
-
const [result2] = await match(json(200,
|
|
63400
|
+
const [result2] = await match(json(200, CreateLocationsResponse$inboundSchema, {
|
|
63177
63401
|
hdrs: true,
|
|
63178
63402
|
key: "Result"
|
|
63179
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
63403
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateLocationsResponse$inboundSchema, {
|
|
63180
63404
|
key: "Result"
|
|
63181
63405
|
}))(response, req, { extraFields: responseFields });
|
|
63182
63406
|
if (!result2.ok) {
|
|
@@ -63184,7 +63408,7 @@ async function $do139(client, request, options) {
|
|
|
63184
63408
|
}
|
|
63185
63409
|
return [result2, { status: "complete", request: req, response }];
|
|
63186
63410
|
}
|
|
63187
|
-
var
|
|
63411
|
+
var init_locationsCreateLocations = __esm(() => {
|
|
63188
63412
|
init_encodings();
|
|
63189
63413
|
init_matchers();
|
|
63190
63414
|
init_primitives();
|
|
@@ -63197,23 +63421,23 @@ var init_materialsCreateMaterials = __esm(() => {
|
|
|
63197
63421
|
init_async();
|
|
63198
63422
|
});
|
|
63199
63423
|
|
|
63200
|
-
// src/mcp-server/tools/
|
|
63201
|
-
var args113, tool$
|
|
63202
|
-
var
|
|
63203
|
-
|
|
63424
|
+
// src/mcp-server/tools/locationsCreateLocations.ts
|
|
63425
|
+
var args113, tool$locationsCreateLocations;
|
|
63426
|
+
var init_locationsCreateLocations2 = __esm(() => {
|
|
63427
|
+
init_locationsCreateLocations();
|
|
63204
63428
|
init_components();
|
|
63205
63429
|
init_tools();
|
|
63206
63430
|
args113 = {
|
|
63207
|
-
request:
|
|
63431
|
+
request: LocationInput$inboundSchema
|
|
63208
63432
|
};
|
|
63209
|
-
tool$
|
|
63210
|
-
name: "
|
|
63211
|
-
description: `Create a new
|
|
63433
|
+
tool$locationsCreateLocations = {
|
|
63434
|
+
name: "locations-create-locations",
|
|
63435
|
+
description: `Create a new Location
|
|
63212
63436
|
|
|
63213
63437
|
|
|
63214
63438
|
|
|
63215
63439
|
#### OAuth Scope
|
|
63216
|
-
This endpoint requires the following OAuth scope **
|
|
63440
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63217
63441
|
|
|
63218
63442
|
|
|
63219
63443
|
|
|
@@ -63223,7 +63447,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63223
63447
|
`,
|
|
63224
63448
|
args: args113,
|
|
63225
63449
|
tool: async (client, args114, ctx) => {
|
|
63226
|
-
const [result2, apiCall] = await
|
|
63450
|
+
const [result2, apiCall] = await locationsCreateLocations(client, args114.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63227
63451
|
if (!result2.ok) {
|
|
63228
63452
|
return {
|
|
63229
63453
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63236,12 +63460,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63236
63460
|
};
|
|
63237
63461
|
});
|
|
63238
63462
|
|
|
63239
|
-
// src/funcs/
|
|
63240
|
-
function
|
|
63463
|
+
// src/funcs/locationsDeleteLocations.ts
|
|
63464
|
+
function locationsDeleteLocations(client, request, options) {
|
|
63241
63465
|
return new APIPromise($do140(client, request, options));
|
|
63242
63466
|
}
|
|
63243
63467
|
async function $do140(client, request, options) {
|
|
63244
|
-
const parsed = safeParse(request, (value) =>
|
|
63468
|
+
const parsed = safeParse(request, (value) => DeleteLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63245
63469
|
if (!parsed.ok) {
|
|
63246
63470
|
return [parsed, { status: "invalid" }];
|
|
63247
63471
|
}
|
|
@@ -63253,7 +63477,7 @@ async function $do140(client, request, options) {
|
|
|
63253
63477
|
charEncoding: "percent"
|
|
63254
63478
|
})
|
|
63255
63479
|
};
|
|
63256
|
-
const path = pathToFunc("/
|
|
63480
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63257
63481
|
const headers = new Headers(compactMap({
|
|
63258
63482
|
Accept: "application/json"
|
|
63259
63483
|
}));
|
|
@@ -63262,7 +63486,7 @@ async function $do140(client, request, options) {
|
|
|
63262
63486
|
const context = {
|
|
63263
63487
|
options: client._options,
|
|
63264
63488
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63265
|
-
operationID: "
|
|
63489
|
+
operationID: "deleteLocations",
|
|
63266
63490
|
oAuth2Scopes: [],
|
|
63267
63491
|
resolvedSecurity: requestSecurity,
|
|
63268
63492
|
securitySource: client._options.security,
|
|
@@ -63305,13 +63529,13 @@ async function $do140(client, request, options) {
|
|
|
63305
63529
|
const responseFields = {
|
|
63306
63530
|
HttpMeta: { Response: response, Request: req }
|
|
63307
63531
|
};
|
|
63308
|
-
const [result2] = await match(json(200,
|
|
63532
|
+
const [result2] = await match(json(200, DeleteLocationsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", DeleteLocationsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
63309
63533
|
if (!result2.ok) {
|
|
63310
63534
|
return [result2, { status: "complete", request: req, response }];
|
|
63311
63535
|
}
|
|
63312
63536
|
return [result2, { status: "complete", request: req, response }];
|
|
63313
63537
|
}
|
|
63314
|
-
var
|
|
63538
|
+
var init_locationsDeleteLocations = __esm(() => {
|
|
63315
63539
|
init_encodings();
|
|
63316
63540
|
init_matchers();
|
|
63317
63541
|
init_primitives();
|
|
@@ -63323,18 +63547,18 @@ var init_materialsDeleteMaterials = __esm(() => {
|
|
|
63323
63547
|
init_async();
|
|
63324
63548
|
});
|
|
63325
63549
|
|
|
63326
|
-
// src/mcp-server/tools/
|
|
63327
|
-
var args114, tool$
|
|
63328
|
-
var
|
|
63329
|
-
|
|
63550
|
+
// src/mcp-server/tools/locationsDeleteLocations.ts
|
|
63551
|
+
var args114, tool$locationsDeleteLocations;
|
|
63552
|
+
var init_locationsDeleteLocations2 = __esm(() => {
|
|
63553
|
+
init_locationsDeleteLocations();
|
|
63330
63554
|
init_operations();
|
|
63331
63555
|
init_tools();
|
|
63332
63556
|
args114 = {
|
|
63333
|
-
request:
|
|
63557
|
+
request: DeleteLocationsRequest$inboundSchema
|
|
63334
63558
|
};
|
|
63335
|
-
tool$
|
|
63336
|
-
name: "
|
|
63337
|
-
description: `Delete a
|
|
63559
|
+
tool$locationsDeleteLocations = {
|
|
63560
|
+
name: "locations-delete-locations",
|
|
63561
|
+
description: `Delete a Location
|
|
63338
63562
|
|
|
63339
63563
|
|
|
63340
63564
|
|
|
@@ -63343,12 +63567,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
63343
63567
|
|
|
63344
63568
|
|
|
63345
63569
|
#### OAuth Scope
|
|
63346
|
-
This endpoint requires the following OAuth scope **
|
|
63570
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63347
63571
|
|
|
63348
63572
|
`,
|
|
63349
63573
|
args: args114,
|
|
63350
63574
|
tool: async (client, args115, ctx) => {
|
|
63351
|
-
const [result2, apiCall] = await
|
|
63575
|
+
const [result2, apiCall] = await locationsDeleteLocations(client, args115.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63352
63576
|
if (!result2.ok) {
|
|
63353
63577
|
return {
|
|
63354
63578
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63361,12 +63585,12 @@ This endpoint requires the following OAuth scope **manage_inventory**.
|
|
|
63361
63585
|
};
|
|
63362
63586
|
});
|
|
63363
63587
|
|
|
63364
|
-
// src/funcs/
|
|
63365
|
-
function
|
|
63588
|
+
// src/funcs/locationsGetLocations.ts
|
|
63589
|
+
function locationsGetLocations(client, request, options) {
|
|
63366
63590
|
return new APIPromise($do141(client, request, options));
|
|
63367
63591
|
}
|
|
63368
63592
|
async function $do141(client, request, options) {
|
|
63369
|
-
const parsed = safeParse(request, (value) =>
|
|
63593
|
+
const parsed = safeParse(request, (value) => GetLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63370
63594
|
if (!parsed.ok) {
|
|
63371
63595
|
return [parsed, { status: "invalid" }];
|
|
63372
63596
|
}
|
|
@@ -63378,7 +63602,7 @@ async function $do141(client, request, options) {
|
|
|
63378
63602
|
charEncoding: "percent"
|
|
63379
63603
|
})
|
|
63380
63604
|
};
|
|
63381
|
-
const path = pathToFunc("/
|
|
63605
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63382
63606
|
const headers = new Headers(compactMap({
|
|
63383
63607
|
Accept: "application/json"
|
|
63384
63608
|
}));
|
|
@@ -63387,7 +63611,7 @@ async function $do141(client, request, options) {
|
|
|
63387
63611
|
const context = {
|
|
63388
63612
|
options: client._options,
|
|
63389
63613
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63390
|
-
operationID: "
|
|
63614
|
+
operationID: "getLocations",
|
|
63391
63615
|
oAuth2Scopes: [],
|
|
63392
63616
|
resolvedSecurity: requestSecurity,
|
|
63393
63617
|
securitySource: client._options.security,
|
|
@@ -63430,13 +63654,13 @@ async function $do141(client, request, options) {
|
|
|
63430
63654
|
const responseFields = {
|
|
63431
63655
|
HttpMeta: { Response: response, Request: req }
|
|
63432
63656
|
};
|
|
63433
|
-
const [result2] = await match(json(200,
|
|
63657
|
+
const [result2] = await match(json(200, GetLocationsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", GetLocationsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
63434
63658
|
if (!result2.ok) {
|
|
63435
63659
|
return [result2, { status: "complete", request: req, response }];
|
|
63436
63660
|
}
|
|
63437
63661
|
return [result2, { status: "complete", request: req, response }];
|
|
63438
63662
|
}
|
|
63439
|
-
var
|
|
63663
|
+
var init_locationsGetLocations = __esm(() => {
|
|
63440
63664
|
init_encodings();
|
|
63441
63665
|
init_matchers();
|
|
63442
63666
|
init_primitives();
|
|
@@ -63448,28 +63672,28 @@ var init_materialsGetMaterials = __esm(() => {
|
|
|
63448
63672
|
init_async();
|
|
63449
63673
|
});
|
|
63450
63674
|
|
|
63451
|
-
// src/mcp-server/tools/
|
|
63452
|
-
var args115, tool$
|
|
63453
|
-
var
|
|
63454
|
-
|
|
63675
|
+
// src/mcp-server/tools/locationsGetLocations.ts
|
|
63676
|
+
var args115, tool$locationsGetLocations;
|
|
63677
|
+
var init_locationsGetLocations2 = __esm(() => {
|
|
63678
|
+
init_locationsGetLocations();
|
|
63455
63679
|
init_operations();
|
|
63456
63680
|
init_tools();
|
|
63457
63681
|
args115 = {
|
|
63458
|
-
request:
|
|
63682
|
+
request: GetLocationsRequest$inboundSchema
|
|
63459
63683
|
};
|
|
63460
|
-
tool$
|
|
63461
|
-
name: "
|
|
63462
|
-
description: `Retrieve a
|
|
63684
|
+
tool$locationsGetLocations = {
|
|
63685
|
+
name: "locations-get-locations",
|
|
63686
|
+
description: `Retrieve a Location
|
|
63463
63687
|
|
|
63464
63688
|
|
|
63465
63689
|
|
|
63466
63690
|
#### OAuth Scope
|
|
63467
|
-
This endpoint requires the following OAuth scope **
|
|
63691
|
+
This endpoint requires the following OAuth scope **read_locations**.
|
|
63468
63692
|
|
|
63469
63693
|
`,
|
|
63470
63694
|
args: args115,
|
|
63471
63695
|
tool: async (client, args116, ctx) => {
|
|
63472
|
-
const [result2, apiCall] = await
|
|
63696
|
+
const [result2, apiCall] = await locationsGetLocations(client, args116.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63473
63697
|
if (!result2.ok) {
|
|
63474
63698
|
return {
|
|
63475
63699
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63482,12 +63706,12 @@ This endpoint requires the following OAuth scope **read_inventory**.
|
|
|
63482
63706
|
};
|
|
63483
63707
|
});
|
|
63484
63708
|
|
|
63485
|
-
// src/funcs/
|
|
63486
|
-
function
|
|
63709
|
+
// src/funcs/locationsListLocations.ts
|
|
63710
|
+
function locationsListLocations(client, options) {
|
|
63487
63711
|
return new APIPromise($do142(client, options));
|
|
63488
63712
|
}
|
|
63489
63713
|
async function $do142(client, options) {
|
|
63490
|
-
const path = pathToFunc("/
|
|
63714
|
+
const path = pathToFunc("/location.json")();
|
|
63491
63715
|
const headers = new Headers(compactMap({
|
|
63492
63716
|
Accept: "application/json"
|
|
63493
63717
|
}));
|
|
@@ -63496,7 +63720,7 @@ async function $do142(client, options) {
|
|
|
63496
63720
|
const context = {
|
|
63497
63721
|
options: client._options,
|
|
63498
63722
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63499
|
-
operationID: "
|
|
63723
|
+
operationID: "listLocations",
|
|
63500
63724
|
oAuth2Scopes: [],
|
|
63501
63725
|
resolvedSecurity: requestSecurity,
|
|
63502
63726
|
securitySource: client._options.security,
|
|
@@ -63538,13 +63762,13 @@ async function $do142(client, options) {
|
|
|
63538
63762
|
const responseFields = {
|
|
63539
63763
|
HttpMeta: { Response: response, Request: req }
|
|
63540
63764
|
};
|
|
63541
|
-
const [result2] = await match(json(200,
|
|
63765
|
+
const [result2] = await match(json(200, ListLocationsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", ListLocationsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
63542
63766
|
if (!result2.ok) {
|
|
63543
63767
|
return [result2, { status: "complete", request: req, response }];
|
|
63544
63768
|
}
|
|
63545
63769
|
return [result2, { status: "complete", request: req, response }];
|
|
63546
63770
|
}
|
|
63547
|
-
var
|
|
63771
|
+
var init_locationsListLocations = __esm(() => {
|
|
63548
63772
|
init_matchers();
|
|
63549
63773
|
init_primitives();
|
|
63550
63774
|
init_security();
|
|
@@ -63554,14 +63778,14 @@ var init_materialsListMaterials = __esm(() => {
|
|
|
63554
63778
|
init_async();
|
|
63555
63779
|
});
|
|
63556
63780
|
|
|
63557
|
-
// src/mcp-server/tools/
|
|
63558
|
-
var tool$
|
|
63559
|
-
var
|
|
63560
|
-
|
|
63781
|
+
// src/mcp-server/tools/locationsListLocations.ts
|
|
63782
|
+
var tool$locationsListLocations;
|
|
63783
|
+
var init_locationsListLocations2 = __esm(() => {
|
|
63784
|
+
init_locationsListLocations();
|
|
63561
63785
|
init_tools();
|
|
63562
|
-
tool$
|
|
63563
|
-
name: "
|
|
63564
|
-
description: `List all
|
|
63786
|
+
tool$locationsListLocations = {
|
|
63787
|
+
name: "locations-list-locations",
|
|
63788
|
+
description: `List all Locations
|
|
63565
63789
|
|
|
63566
63790
|
|
|
63567
63791
|
|
|
@@ -63570,11 +63794,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
63570
63794
|
|
|
63571
63795
|
|
|
63572
63796
|
#### OAuth Scope
|
|
63573
|
-
This endpoint requires the following OAuth scope **
|
|
63797
|
+
This endpoint requires the following OAuth scope **read_locations**.
|
|
63574
63798
|
|
|
63575
63799
|
`,
|
|
63576
63800
|
tool: async (client, ctx) => {
|
|
63577
|
-
const [result2, apiCall] = await
|
|
63801
|
+
const [result2, apiCall] = await locationsListLocations(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63578
63802
|
if (!result2.ok) {
|
|
63579
63803
|
return {
|
|
63580
63804
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63587,24 +63811,24 @@ This endpoint requires the following OAuth scope **read_inventory**.
|
|
|
63587
63811
|
};
|
|
63588
63812
|
});
|
|
63589
63813
|
|
|
63590
|
-
// src/funcs/
|
|
63591
|
-
function
|
|
63814
|
+
// src/funcs/locationsUpdateLocations.ts
|
|
63815
|
+
function locationsUpdateLocations(client, request, options) {
|
|
63592
63816
|
return new APIPromise($do143(client, request, options));
|
|
63593
63817
|
}
|
|
63594
63818
|
async function $do143(client, request, options) {
|
|
63595
|
-
const parsed = safeParse(request, (value) =>
|
|
63819
|
+
const parsed = safeParse(request, (value) => UpdateLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63596
63820
|
if (!parsed.ok) {
|
|
63597
63821
|
return [parsed, { status: "invalid" }];
|
|
63598
63822
|
}
|
|
63599
63823
|
const payload = parsed.value;
|
|
63600
|
-
const body = encodeJSON("body", payload.
|
|
63824
|
+
const body = encodeJSON("body", payload.Location, { explode: true });
|
|
63601
63825
|
const pathParams = {
|
|
63602
63826
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
63603
63827
|
explode: false,
|
|
63604
63828
|
charEncoding: "percent"
|
|
63605
63829
|
})
|
|
63606
63830
|
};
|
|
63607
|
-
const path = pathToFunc("/
|
|
63831
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63608
63832
|
const headers = new Headers(compactMap({
|
|
63609
63833
|
"Content-Type": "application/json",
|
|
63610
63834
|
Accept: "application/json"
|
|
@@ -63614,7 +63838,7 @@ async function $do143(client, request, options) {
|
|
|
63614
63838
|
const context = {
|
|
63615
63839
|
options: client._options,
|
|
63616
63840
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63617
|
-
operationID: "
|
|
63841
|
+
operationID: "updateLocations",
|
|
63618
63842
|
oAuth2Scopes: [],
|
|
63619
63843
|
resolvedSecurity: requestSecurity,
|
|
63620
63844
|
securitySource: client._options.security,
|
|
@@ -63657,13 +63881,13 @@ async function $do143(client, request, options) {
|
|
|
63657
63881
|
const responseFields = {
|
|
63658
63882
|
HttpMeta: { Response: response, Request: req }
|
|
63659
63883
|
};
|
|
63660
|
-
const [result2] = await match(json(200,
|
|
63884
|
+
const [result2] = await match(json(200, UpdateLocationsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", UpdateLocationsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
63661
63885
|
if (!result2.ok) {
|
|
63662
63886
|
return [result2, { status: "complete", request: req, response }];
|
|
63663
63887
|
}
|
|
63664
63888
|
return [result2, { status: "complete", request: req, response }];
|
|
63665
63889
|
}
|
|
63666
|
-
var
|
|
63890
|
+
var init_locationsUpdateLocations = __esm(() => {
|
|
63667
63891
|
init_encodings();
|
|
63668
63892
|
init_matchers();
|
|
63669
63893
|
init_primitives();
|
|
@@ -63675,28 +63899,28 @@ var init_materialsUpdateMaterials = __esm(() => {
|
|
|
63675
63899
|
init_async();
|
|
63676
63900
|
});
|
|
63677
63901
|
|
|
63678
|
-
// src/mcp-server/tools/
|
|
63679
|
-
var args116, tool$
|
|
63680
|
-
var
|
|
63681
|
-
|
|
63902
|
+
// src/mcp-server/tools/locationsUpdateLocations.ts
|
|
63903
|
+
var args116, tool$locationsUpdateLocations;
|
|
63904
|
+
var init_locationsUpdateLocations2 = __esm(() => {
|
|
63905
|
+
init_locationsUpdateLocations();
|
|
63682
63906
|
init_operations();
|
|
63683
63907
|
init_tools();
|
|
63684
63908
|
args116 = {
|
|
63685
|
-
request:
|
|
63909
|
+
request: UpdateLocationsRequest$inboundSchema
|
|
63686
63910
|
};
|
|
63687
|
-
tool$
|
|
63688
|
-
name: "
|
|
63689
|
-
description: `Update a
|
|
63911
|
+
tool$locationsUpdateLocations = {
|
|
63912
|
+
name: "locations-update-locations",
|
|
63913
|
+
description: `Update a Location
|
|
63690
63914
|
|
|
63691
63915
|
|
|
63692
63916
|
|
|
63693
63917
|
#### OAuth Scope
|
|
63694
|
-
This endpoint requires the following OAuth scope **
|
|
63918
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63695
63919
|
|
|
63696
63920
|
`,
|
|
63697
63921
|
args: args116,
|
|
63698
63922
|
tool: async (client, args117, ctx) => {
|
|
63699
|
-
const [result2, apiCall] = await
|
|
63923
|
+
const [result2, apiCall] = await locationsUpdateLocations(client, args117.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63700
63924
|
if (!result2.ok) {
|
|
63701
63925
|
return {
|
|
63702
63926
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63709,18 +63933,18 @@ This endpoint requires the following OAuth scope **manage_inventory**.
|
|
|
63709
63933
|
};
|
|
63710
63934
|
});
|
|
63711
63935
|
|
|
63712
|
-
// src/funcs/
|
|
63713
|
-
function
|
|
63936
|
+
// src/funcs/materialsCreateMaterials.ts
|
|
63937
|
+
function materialsCreateMaterials(client, request, options) {
|
|
63714
63938
|
return new APIPromise($do144(client, request, options));
|
|
63715
63939
|
}
|
|
63716
63940
|
async function $do144(client, request, options) {
|
|
63717
|
-
const parsed = safeParse(request, (value) =>
|
|
63941
|
+
const parsed = safeParse(request, (value) => MaterialInput$outboundSchema.parse(value), "Input validation failed");
|
|
63718
63942
|
if (!parsed.ok) {
|
|
63719
63943
|
return [parsed, { status: "invalid" }];
|
|
63720
63944
|
}
|
|
63721
63945
|
const payload = parsed.value;
|
|
63722
63946
|
const body = encodeJSON("body", payload, { explode: true });
|
|
63723
|
-
const path = pathToFunc("/
|
|
63947
|
+
const path = pathToFunc("/material.json")();
|
|
63724
63948
|
const headers = new Headers(compactMap({
|
|
63725
63949
|
"Content-Type": "application/json",
|
|
63726
63950
|
Accept: "application/json"
|
|
@@ -63730,7 +63954,7 @@ async function $do144(client, request, options) {
|
|
|
63730
63954
|
const context = {
|
|
63731
63955
|
options: client._options,
|
|
63732
63956
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63733
|
-
operationID: "
|
|
63957
|
+
operationID: "createMaterials",
|
|
63734
63958
|
oAuth2Scopes: [],
|
|
63735
63959
|
resolvedSecurity: requestSecurity,
|
|
63736
63960
|
securitySource: client._options.security,
|
|
@@ -63773,10 +63997,10 @@ async function $do144(client, request, options) {
|
|
|
63773
63997
|
const responseFields = {
|
|
63774
63998
|
HttpMeta: { Response: response, Request: req }
|
|
63775
63999
|
};
|
|
63776
|
-
const [result2] = await match(json(200,
|
|
64000
|
+
const [result2] = await match(json(200, CreateMaterialsResponse$inboundSchema, {
|
|
63777
64001
|
hdrs: true,
|
|
63778
64002
|
key: "Result"
|
|
63779
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
64003
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateMaterialsResponse$inboundSchema, {
|
|
63780
64004
|
key: "Result"
|
|
63781
64005
|
}))(response, req, { extraFields: responseFields });
|
|
63782
64006
|
if (!result2.ok) {
|
|
@@ -63784,7 +64008,7 @@ async function $do144(client, request, options) {
|
|
|
63784
64008
|
}
|
|
63785
64009
|
return [result2, { status: "complete", request: req, response }];
|
|
63786
64010
|
}
|
|
63787
|
-
var
|
|
64011
|
+
var init_materialsCreateMaterials = __esm(() => {
|
|
63788
64012
|
init_encodings();
|
|
63789
64013
|
init_matchers();
|
|
63790
64014
|
init_primitives();
|
|
@@ -63797,28 +64021,33 @@ var init_notesCreateNotes = __esm(() => {
|
|
|
63797
64021
|
init_async();
|
|
63798
64022
|
});
|
|
63799
64023
|
|
|
63800
|
-
// src/mcp-server/tools/
|
|
63801
|
-
var args117, tool$
|
|
63802
|
-
var
|
|
63803
|
-
|
|
64024
|
+
// src/mcp-server/tools/materialsCreateMaterials.ts
|
|
64025
|
+
var args117, tool$materialsCreateMaterials;
|
|
64026
|
+
var init_materialsCreateMaterials2 = __esm(() => {
|
|
64027
|
+
init_materialsCreateMaterials();
|
|
63804
64028
|
init_components();
|
|
63805
64029
|
init_tools();
|
|
63806
64030
|
args117 = {
|
|
63807
|
-
request:
|
|
64031
|
+
request: MaterialInput$inboundSchema
|
|
63808
64032
|
};
|
|
63809
|
-
tool$
|
|
63810
|
-
name: "
|
|
63811
|
-
description: `Create a new
|
|
64033
|
+
tool$materialsCreateMaterials = {
|
|
64034
|
+
name: "materials-create-materials",
|
|
64035
|
+
description: `Create a new Material
|
|
63812
64036
|
|
|
63813
64037
|
|
|
63814
64038
|
|
|
64039
|
+
#### OAuth Scope
|
|
64040
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64041
|
+
|
|
64042
|
+
|
|
64043
|
+
|
|
63815
64044
|
#### Record UUID
|
|
63816
64045
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
63817
64046
|
|
|
63818
64047
|
`,
|
|
63819
64048
|
args: args117,
|
|
63820
64049
|
tool: async (client, args118, ctx) => {
|
|
63821
|
-
const [result2, apiCall] = await
|
|
64050
|
+
const [result2, apiCall] = await materialsCreateMaterials(client, args118.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63822
64051
|
if (!result2.ok) {
|
|
63823
64052
|
return {
|
|
63824
64053
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63831,12 +64060,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63831
64060
|
};
|
|
63832
64061
|
});
|
|
63833
64062
|
|
|
63834
|
-
// src/funcs/
|
|
63835
|
-
function
|
|
64063
|
+
// src/funcs/materialsDeleteMaterials.ts
|
|
64064
|
+
function materialsDeleteMaterials(client, request, options) {
|
|
63836
64065
|
return new APIPromise($do145(client, request, options));
|
|
63837
64066
|
}
|
|
63838
64067
|
async function $do145(client, request, options) {
|
|
63839
|
-
const parsed = safeParse(request, (value) =>
|
|
64068
|
+
const parsed = safeParse(request, (value) => DeleteMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63840
64069
|
if (!parsed.ok) {
|
|
63841
64070
|
return [parsed, { status: "invalid" }];
|
|
63842
64071
|
}
|
|
@@ -63848,7 +64077,7 @@ async function $do145(client, request, options) {
|
|
|
63848
64077
|
charEncoding: "percent"
|
|
63849
64078
|
})
|
|
63850
64079
|
};
|
|
63851
|
-
const path = pathToFunc("/
|
|
64080
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
63852
64081
|
const headers = new Headers(compactMap({
|
|
63853
64082
|
Accept: "application/json"
|
|
63854
64083
|
}));
|
|
@@ -63857,7 +64086,602 @@ async function $do145(client, request, options) {
|
|
|
63857
64086
|
const context = {
|
|
63858
64087
|
options: client._options,
|
|
63859
64088
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63860
|
-
operationID: "
|
|
64089
|
+
operationID: "deleteMaterials",
|
|
64090
|
+
oAuth2Scopes: [],
|
|
64091
|
+
resolvedSecurity: requestSecurity,
|
|
64092
|
+
securitySource: client._options.security,
|
|
64093
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64094
|
+
strategy: "backoff",
|
|
64095
|
+
backoff: {
|
|
64096
|
+
initialInterval: 500,
|
|
64097
|
+
maxInterval: 60000,
|
|
64098
|
+
exponent: 1.5,
|
|
64099
|
+
maxElapsedTime: 3600000
|
|
64100
|
+
},
|
|
64101
|
+
retryConnectionErrors: true
|
|
64102
|
+
},
|
|
64103
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64104
|
+
};
|
|
64105
|
+
const requestRes = client._createRequest(context, {
|
|
64106
|
+
security: requestSecurity,
|
|
64107
|
+
method: "DELETE",
|
|
64108
|
+
baseURL: options?.serverURL,
|
|
64109
|
+
path,
|
|
64110
|
+
headers,
|
|
64111
|
+
body,
|
|
64112
|
+
userAgent: client._options.userAgent,
|
|
64113
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64114
|
+
}, options);
|
|
64115
|
+
if (!requestRes.ok) {
|
|
64116
|
+
return [requestRes, { status: "invalid" }];
|
|
64117
|
+
}
|
|
64118
|
+
const req = requestRes.value;
|
|
64119
|
+
const doResult = await client._do(req, {
|
|
64120
|
+
context,
|
|
64121
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64122
|
+
retryConfig: context.retryConfig,
|
|
64123
|
+
retryCodes: context.retryCodes
|
|
64124
|
+
});
|
|
64125
|
+
if (!doResult.ok) {
|
|
64126
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64127
|
+
}
|
|
64128
|
+
const response = doResult.value;
|
|
64129
|
+
const responseFields = {
|
|
64130
|
+
HttpMeta: { Response: response, Request: req }
|
|
64131
|
+
};
|
|
64132
|
+
const [result2] = await match(json(200, DeleteMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", DeleteMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64133
|
+
if (!result2.ok) {
|
|
64134
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64135
|
+
}
|
|
64136
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64137
|
+
}
|
|
64138
|
+
var init_materialsDeleteMaterials = __esm(() => {
|
|
64139
|
+
init_encodings();
|
|
64140
|
+
init_matchers();
|
|
64141
|
+
init_primitives();
|
|
64142
|
+
init_schemas();
|
|
64143
|
+
init_security();
|
|
64144
|
+
init_url();
|
|
64145
|
+
init_errors2();
|
|
64146
|
+
init_operations();
|
|
64147
|
+
init_async();
|
|
64148
|
+
});
|
|
64149
|
+
|
|
64150
|
+
// src/mcp-server/tools/materialsDeleteMaterials.ts
|
|
64151
|
+
var args118, tool$materialsDeleteMaterials;
|
|
64152
|
+
var init_materialsDeleteMaterials2 = __esm(() => {
|
|
64153
|
+
init_materialsDeleteMaterials();
|
|
64154
|
+
init_operations();
|
|
64155
|
+
init_tools();
|
|
64156
|
+
args118 = {
|
|
64157
|
+
request: DeleteMaterialsRequest$inboundSchema
|
|
64158
|
+
};
|
|
64159
|
+
tool$materialsDeleteMaterials = {
|
|
64160
|
+
name: "materials-delete-materials",
|
|
64161
|
+
description: `Delete a Material
|
|
64162
|
+
|
|
64163
|
+
|
|
64164
|
+
|
|
64165
|
+
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
64166
|
+
|
|
64167
|
+
|
|
64168
|
+
|
|
64169
|
+
#### OAuth Scope
|
|
64170
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64171
|
+
|
|
64172
|
+
`,
|
|
64173
|
+
args: args118,
|
|
64174
|
+
tool: async (client, args119, ctx) => {
|
|
64175
|
+
const [result2, apiCall] = await materialsDeleteMaterials(client, args119.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64176
|
+
if (!result2.ok) {
|
|
64177
|
+
return {
|
|
64178
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64179
|
+
isError: true
|
|
64180
|
+
};
|
|
64181
|
+
}
|
|
64182
|
+
const value = result2.value;
|
|
64183
|
+
return formatResult(value, apiCall);
|
|
64184
|
+
}
|
|
64185
|
+
};
|
|
64186
|
+
});
|
|
64187
|
+
|
|
64188
|
+
// src/funcs/materialsGetMaterials.ts
|
|
64189
|
+
function materialsGetMaterials(client, request, options) {
|
|
64190
|
+
return new APIPromise($do146(client, request, options));
|
|
64191
|
+
}
|
|
64192
|
+
async function $do146(client, request, options) {
|
|
64193
|
+
const parsed = safeParse(request, (value) => GetMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64194
|
+
if (!parsed.ok) {
|
|
64195
|
+
return [parsed, { status: "invalid" }];
|
|
64196
|
+
}
|
|
64197
|
+
const payload = parsed.value;
|
|
64198
|
+
const body = null;
|
|
64199
|
+
const pathParams = {
|
|
64200
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64201
|
+
explode: false,
|
|
64202
|
+
charEncoding: "percent"
|
|
64203
|
+
})
|
|
64204
|
+
};
|
|
64205
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
64206
|
+
const headers = new Headers(compactMap({
|
|
64207
|
+
Accept: "application/json"
|
|
64208
|
+
}));
|
|
64209
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64210
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64211
|
+
const context = {
|
|
64212
|
+
options: client._options,
|
|
64213
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64214
|
+
operationID: "getMaterials",
|
|
64215
|
+
oAuth2Scopes: [],
|
|
64216
|
+
resolvedSecurity: requestSecurity,
|
|
64217
|
+
securitySource: client._options.security,
|
|
64218
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64219
|
+
strategy: "backoff",
|
|
64220
|
+
backoff: {
|
|
64221
|
+
initialInterval: 500,
|
|
64222
|
+
maxInterval: 60000,
|
|
64223
|
+
exponent: 1.5,
|
|
64224
|
+
maxElapsedTime: 3600000
|
|
64225
|
+
},
|
|
64226
|
+
retryConnectionErrors: true
|
|
64227
|
+
},
|
|
64228
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64229
|
+
};
|
|
64230
|
+
const requestRes = client._createRequest(context, {
|
|
64231
|
+
security: requestSecurity,
|
|
64232
|
+
method: "GET",
|
|
64233
|
+
baseURL: options?.serverURL,
|
|
64234
|
+
path,
|
|
64235
|
+
headers,
|
|
64236
|
+
body,
|
|
64237
|
+
userAgent: client._options.userAgent,
|
|
64238
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64239
|
+
}, options);
|
|
64240
|
+
if (!requestRes.ok) {
|
|
64241
|
+
return [requestRes, { status: "invalid" }];
|
|
64242
|
+
}
|
|
64243
|
+
const req = requestRes.value;
|
|
64244
|
+
const doResult = await client._do(req, {
|
|
64245
|
+
context,
|
|
64246
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64247
|
+
retryConfig: context.retryConfig,
|
|
64248
|
+
retryCodes: context.retryCodes
|
|
64249
|
+
});
|
|
64250
|
+
if (!doResult.ok) {
|
|
64251
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64252
|
+
}
|
|
64253
|
+
const response = doResult.value;
|
|
64254
|
+
const responseFields = {
|
|
64255
|
+
HttpMeta: { Response: response, Request: req }
|
|
64256
|
+
};
|
|
64257
|
+
const [result2] = await match(json(200, GetMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", GetMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64258
|
+
if (!result2.ok) {
|
|
64259
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64260
|
+
}
|
|
64261
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64262
|
+
}
|
|
64263
|
+
var init_materialsGetMaterials = __esm(() => {
|
|
64264
|
+
init_encodings();
|
|
64265
|
+
init_matchers();
|
|
64266
|
+
init_primitives();
|
|
64267
|
+
init_schemas();
|
|
64268
|
+
init_security();
|
|
64269
|
+
init_url();
|
|
64270
|
+
init_errors2();
|
|
64271
|
+
init_operations();
|
|
64272
|
+
init_async();
|
|
64273
|
+
});
|
|
64274
|
+
|
|
64275
|
+
// src/mcp-server/tools/materialsGetMaterials.ts
|
|
64276
|
+
var args119, tool$materialsGetMaterials;
|
|
64277
|
+
var init_materialsGetMaterials2 = __esm(() => {
|
|
64278
|
+
init_materialsGetMaterials();
|
|
64279
|
+
init_operations();
|
|
64280
|
+
init_tools();
|
|
64281
|
+
args119 = {
|
|
64282
|
+
request: GetMaterialsRequest$inboundSchema
|
|
64283
|
+
};
|
|
64284
|
+
tool$materialsGetMaterials = {
|
|
64285
|
+
name: "materials-get-materials",
|
|
64286
|
+
description: `Retrieve a Material
|
|
64287
|
+
|
|
64288
|
+
|
|
64289
|
+
|
|
64290
|
+
#### OAuth Scope
|
|
64291
|
+
This endpoint requires the following OAuth scope **read_inventory**.
|
|
64292
|
+
|
|
64293
|
+
`,
|
|
64294
|
+
args: args119,
|
|
64295
|
+
tool: async (client, args120, ctx) => {
|
|
64296
|
+
const [result2, apiCall] = await materialsGetMaterials(client, args120.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64297
|
+
if (!result2.ok) {
|
|
64298
|
+
return {
|
|
64299
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64300
|
+
isError: true
|
|
64301
|
+
};
|
|
64302
|
+
}
|
|
64303
|
+
const value = result2.value;
|
|
64304
|
+
return formatResult(value, apiCall);
|
|
64305
|
+
}
|
|
64306
|
+
};
|
|
64307
|
+
});
|
|
64308
|
+
|
|
64309
|
+
// src/funcs/materialsListMaterials.ts
|
|
64310
|
+
function materialsListMaterials(client, options) {
|
|
64311
|
+
return new APIPromise($do147(client, options));
|
|
64312
|
+
}
|
|
64313
|
+
async function $do147(client, options) {
|
|
64314
|
+
const path = pathToFunc("/material.json")();
|
|
64315
|
+
const headers = new Headers(compactMap({
|
|
64316
|
+
Accept: "application/json"
|
|
64317
|
+
}));
|
|
64318
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64319
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64320
|
+
const context = {
|
|
64321
|
+
options: client._options,
|
|
64322
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64323
|
+
operationID: "listMaterials",
|
|
64324
|
+
oAuth2Scopes: [],
|
|
64325
|
+
resolvedSecurity: requestSecurity,
|
|
64326
|
+
securitySource: client._options.security,
|
|
64327
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64328
|
+
strategy: "backoff",
|
|
64329
|
+
backoff: {
|
|
64330
|
+
initialInterval: 500,
|
|
64331
|
+
maxInterval: 60000,
|
|
64332
|
+
exponent: 1.5,
|
|
64333
|
+
maxElapsedTime: 3600000
|
|
64334
|
+
},
|
|
64335
|
+
retryConnectionErrors: true
|
|
64336
|
+
},
|
|
64337
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64338
|
+
};
|
|
64339
|
+
const requestRes = client._createRequest(context, {
|
|
64340
|
+
security: requestSecurity,
|
|
64341
|
+
method: "GET",
|
|
64342
|
+
baseURL: options?.serverURL,
|
|
64343
|
+
path,
|
|
64344
|
+
headers,
|
|
64345
|
+
userAgent: client._options.userAgent,
|
|
64346
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64347
|
+
}, options);
|
|
64348
|
+
if (!requestRes.ok) {
|
|
64349
|
+
return [requestRes, { status: "invalid" }];
|
|
64350
|
+
}
|
|
64351
|
+
const req = requestRes.value;
|
|
64352
|
+
const doResult = await client._do(req, {
|
|
64353
|
+
context,
|
|
64354
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64355
|
+
retryConfig: context.retryConfig,
|
|
64356
|
+
retryCodes: context.retryCodes
|
|
64357
|
+
});
|
|
64358
|
+
if (!doResult.ok) {
|
|
64359
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64360
|
+
}
|
|
64361
|
+
const response = doResult.value;
|
|
64362
|
+
const responseFields = {
|
|
64363
|
+
HttpMeta: { Response: response, Request: req }
|
|
64364
|
+
};
|
|
64365
|
+
const [result2] = await match(json(200, ListMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", ListMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64366
|
+
if (!result2.ok) {
|
|
64367
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64368
|
+
}
|
|
64369
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64370
|
+
}
|
|
64371
|
+
var init_materialsListMaterials = __esm(() => {
|
|
64372
|
+
init_matchers();
|
|
64373
|
+
init_primitives();
|
|
64374
|
+
init_security();
|
|
64375
|
+
init_url();
|
|
64376
|
+
init_errors2();
|
|
64377
|
+
init_operations();
|
|
64378
|
+
init_async();
|
|
64379
|
+
});
|
|
64380
|
+
|
|
64381
|
+
// src/mcp-server/tools/materialsListMaterials.ts
|
|
64382
|
+
var tool$materialsListMaterials;
|
|
64383
|
+
var init_materialsListMaterials2 = __esm(() => {
|
|
64384
|
+
init_materialsListMaterials();
|
|
64385
|
+
init_tools();
|
|
64386
|
+
tool$materialsListMaterials = {
|
|
64387
|
+
name: "materials-list-materials",
|
|
64388
|
+
description: `List all Materials
|
|
64389
|
+
|
|
64390
|
+
|
|
64391
|
+
|
|
64392
|
+
#### Filtering
|
|
64393
|
+
This endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).
|
|
64394
|
+
|
|
64395
|
+
|
|
64396
|
+
#### OAuth Scope
|
|
64397
|
+
This endpoint requires the following OAuth scope **read_inventory**.
|
|
64398
|
+
|
|
64399
|
+
`,
|
|
64400
|
+
tool: async (client, ctx) => {
|
|
64401
|
+
const [result2, apiCall] = await materialsListMaterials(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64402
|
+
if (!result2.ok) {
|
|
64403
|
+
return {
|
|
64404
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64405
|
+
isError: true
|
|
64406
|
+
};
|
|
64407
|
+
}
|
|
64408
|
+
const value = result2.value;
|
|
64409
|
+
return formatResult(value, apiCall);
|
|
64410
|
+
}
|
|
64411
|
+
};
|
|
64412
|
+
});
|
|
64413
|
+
|
|
64414
|
+
// src/funcs/materialsUpdateMaterials.ts
|
|
64415
|
+
function materialsUpdateMaterials(client, request, options) {
|
|
64416
|
+
return new APIPromise($do148(client, request, options));
|
|
64417
|
+
}
|
|
64418
|
+
async function $do148(client, request, options) {
|
|
64419
|
+
const parsed = safeParse(request, (value) => UpdateMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64420
|
+
if (!parsed.ok) {
|
|
64421
|
+
return [parsed, { status: "invalid" }];
|
|
64422
|
+
}
|
|
64423
|
+
const payload = parsed.value;
|
|
64424
|
+
const body = encodeJSON("body", payload.Material, { explode: true });
|
|
64425
|
+
const pathParams = {
|
|
64426
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64427
|
+
explode: false,
|
|
64428
|
+
charEncoding: "percent"
|
|
64429
|
+
})
|
|
64430
|
+
};
|
|
64431
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
64432
|
+
const headers = new Headers(compactMap({
|
|
64433
|
+
"Content-Type": "application/json",
|
|
64434
|
+
Accept: "application/json"
|
|
64435
|
+
}));
|
|
64436
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64437
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64438
|
+
const context = {
|
|
64439
|
+
options: client._options,
|
|
64440
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64441
|
+
operationID: "updateMaterials",
|
|
64442
|
+
oAuth2Scopes: [],
|
|
64443
|
+
resolvedSecurity: requestSecurity,
|
|
64444
|
+
securitySource: client._options.security,
|
|
64445
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64446
|
+
strategy: "backoff",
|
|
64447
|
+
backoff: {
|
|
64448
|
+
initialInterval: 500,
|
|
64449
|
+
maxInterval: 60000,
|
|
64450
|
+
exponent: 1.5,
|
|
64451
|
+
maxElapsedTime: 3600000
|
|
64452
|
+
},
|
|
64453
|
+
retryConnectionErrors: true
|
|
64454
|
+
},
|
|
64455
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64456
|
+
};
|
|
64457
|
+
const requestRes = client._createRequest(context, {
|
|
64458
|
+
security: requestSecurity,
|
|
64459
|
+
method: "POST",
|
|
64460
|
+
baseURL: options?.serverURL,
|
|
64461
|
+
path,
|
|
64462
|
+
headers,
|
|
64463
|
+
body,
|
|
64464
|
+
userAgent: client._options.userAgent,
|
|
64465
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64466
|
+
}, options);
|
|
64467
|
+
if (!requestRes.ok) {
|
|
64468
|
+
return [requestRes, { status: "invalid" }];
|
|
64469
|
+
}
|
|
64470
|
+
const req = requestRes.value;
|
|
64471
|
+
const doResult = await client._do(req, {
|
|
64472
|
+
context,
|
|
64473
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64474
|
+
retryConfig: context.retryConfig,
|
|
64475
|
+
retryCodes: context.retryCodes
|
|
64476
|
+
});
|
|
64477
|
+
if (!doResult.ok) {
|
|
64478
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64479
|
+
}
|
|
64480
|
+
const response = doResult.value;
|
|
64481
|
+
const responseFields = {
|
|
64482
|
+
HttpMeta: { Response: response, Request: req }
|
|
64483
|
+
};
|
|
64484
|
+
const [result2] = await match(json(200, UpdateMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", UpdateMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64485
|
+
if (!result2.ok) {
|
|
64486
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64487
|
+
}
|
|
64488
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64489
|
+
}
|
|
64490
|
+
var init_materialsUpdateMaterials = __esm(() => {
|
|
64491
|
+
init_encodings();
|
|
64492
|
+
init_matchers();
|
|
64493
|
+
init_primitives();
|
|
64494
|
+
init_schemas();
|
|
64495
|
+
init_security();
|
|
64496
|
+
init_url();
|
|
64497
|
+
init_errors2();
|
|
64498
|
+
init_operations();
|
|
64499
|
+
init_async();
|
|
64500
|
+
});
|
|
64501
|
+
|
|
64502
|
+
// src/mcp-server/tools/materialsUpdateMaterials.ts
|
|
64503
|
+
var args120, tool$materialsUpdateMaterials;
|
|
64504
|
+
var init_materialsUpdateMaterials2 = __esm(() => {
|
|
64505
|
+
init_materialsUpdateMaterials();
|
|
64506
|
+
init_operations();
|
|
64507
|
+
init_tools();
|
|
64508
|
+
args120 = {
|
|
64509
|
+
request: UpdateMaterialsRequest$inboundSchema
|
|
64510
|
+
};
|
|
64511
|
+
tool$materialsUpdateMaterials = {
|
|
64512
|
+
name: "materials-update-materials",
|
|
64513
|
+
description: `Update a Material
|
|
64514
|
+
|
|
64515
|
+
|
|
64516
|
+
|
|
64517
|
+
#### OAuth Scope
|
|
64518
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64519
|
+
|
|
64520
|
+
`,
|
|
64521
|
+
args: args120,
|
|
64522
|
+
tool: async (client, args121, ctx) => {
|
|
64523
|
+
const [result2, apiCall] = await materialsUpdateMaterials(client, args121.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64524
|
+
if (!result2.ok) {
|
|
64525
|
+
return {
|
|
64526
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64527
|
+
isError: true
|
|
64528
|
+
};
|
|
64529
|
+
}
|
|
64530
|
+
const value = result2.value;
|
|
64531
|
+
return formatResult(value, apiCall);
|
|
64532
|
+
}
|
|
64533
|
+
};
|
|
64534
|
+
});
|
|
64535
|
+
|
|
64536
|
+
// src/funcs/notesCreateNotes.ts
|
|
64537
|
+
function notesCreateNotes(client, request, options) {
|
|
64538
|
+
return new APIPromise($do149(client, request, options));
|
|
64539
|
+
}
|
|
64540
|
+
async function $do149(client, request, options) {
|
|
64541
|
+
const parsed = safeParse(request, (value) => NoteInput$outboundSchema.parse(value), "Input validation failed");
|
|
64542
|
+
if (!parsed.ok) {
|
|
64543
|
+
return [parsed, { status: "invalid" }];
|
|
64544
|
+
}
|
|
64545
|
+
const payload = parsed.value;
|
|
64546
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
64547
|
+
const path = pathToFunc("/note.json")();
|
|
64548
|
+
const headers = new Headers(compactMap({
|
|
64549
|
+
"Content-Type": "application/json",
|
|
64550
|
+
Accept: "application/json"
|
|
64551
|
+
}));
|
|
64552
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64553
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64554
|
+
const context = {
|
|
64555
|
+
options: client._options,
|
|
64556
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64557
|
+
operationID: "createNotes",
|
|
64558
|
+
oAuth2Scopes: [],
|
|
64559
|
+
resolvedSecurity: requestSecurity,
|
|
64560
|
+
securitySource: client._options.security,
|
|
64561
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64562
|
+
strategy: "backoff",
|
|
64563
|
+
backoff: {
|
|
64564
|
+
initialInterval: 500,
|
|
64565
|
+
maxInterval: 60000,
|
|
64566
|
+
exponent: 1.5,
|
|
64567
|
+
maxElapsedTime: 3600000
|
|
64568
|
+
},
|
|
64569
|
+
retryConnectionErrors: true
|
|
64570
|
+
},
|
|
64571
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64572
|
+
};
|
|
64573
|
+
const requestRes = client._createRequest(context, {
|
|
64574
|
+
security: requestSecurity,
|
|
64575
|
+
method: "POST",
|
|
64576
|
+
baseURL: options?.serverURL,
|
|
64577
|
+
path,
|
|
64578
|
+
headers,
|
|
64579
|
+
body,
|
|
64580
|
+
userAgent: client._options.userAgent,
|
|
64581
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64582
|
+
}, options);
|
|
64583
|
+
if (!requestRes.ok) {
|
|
64584
|
+
return [requestRes, { status: "invalid" }];
|
|
64585
|
+
}
|
|
64586
|
+
const req = requestRes.value;
|
|
64587
|
+
const doResult = await client._do(req, {
|
|
64588
|
+
context,
|
|
64589
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64590
|
+
retryConfig: context.retryConfig,
|
|
64591
|
+
retryCodes: context.retryCodes
|
|
64592
|
+
});
|
|
64593
|
+
if (!doResult.ok) {
|
|
64594
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64595
|
+
}
|
|
64596
|
+
const response = doResult.value;
|
|
64597
|
+
const responseFields = {
|
|
64598
|
+
HttpMeta: { Response: response, Request: req }
|
|
64599
|
+
};
|
|
64600
|
+
const [result2] = await match(json(200, CreateNotesResponse$inboundSchema, {
|
|
64601
|
+
hdrs: true,
|
|
64602
|
+
key: "Result"
|
|
64603
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateNotesResponse$inboundSchema, {
|
|
64604
|
+
key: "Result"
|
|
64605
|
+
}))(response, req, { extraFields: responseFields });
|
|
64606
|
+
if (!result2.ok) {
|
|
64607
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64608
|
+
}
|
|
64609
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64610
|
+
}
|
|
64611
|
+
var init_notesCreateNotes = __esm(() => {
|
|
64612
|
+
init_encodings();
|
|
64613
|
+
init_matchers();
|
|
64614
|
+
init_primitives();
|
|
64615
|
+
init_schemas();
|
|
64616
|
+
init_security();
|
|
64617
|
+
init_url();
|
|
64618
|
+
init_components();
|
|
64619
|
+
init_errors2();
|
|
64620
|
+
init_operations();
|
|
64621
|
+
init_async();
|
|
64622
|
+
});
|
|
64623
|
+
|
|
64624
|
+
// src/mcp-server/tools/notesCreateNotes.ts
|
|
64625
|
+
var args121, tool$notesCreateNotes;
|
|
64626
|
+
var init_notesCreateNotes2 = __esm(() => {
|
|
64627
|
+
init_notesCreateNotes();
|
|
64628
|
+
init_components();
|
|
64629
|
+
init_tools();
|
|
64630
|
+
args121 = {
|
|
64631
|
+
request: NoteInput$inboundSchema
|
|
64632
|
+
};
|
|
64633
|
+
tool$notesCreateNotes = {
|
|
64634
|
+
name: "notes-create-notes",
|
|
64635
|
+
description: `Create a new Note
|
|
64636
|
+
|
|
64637
|
+
|
|
64638
|
+
|
|
64639
|
+
#### Record UUID
|
|
64640
|
+
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
64641
|
+
|
|
64642
|
+
`,
|
|
64643
|
+
args: args121,
|
|
64644
|
+
tool: async (client, args122, ctx) => {
|
|
64645
|
+
const [result2, apiCall] = await notesCreateNotes(client, args122.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64646
|
+
if (!result2.ok) {
|
|
64647
|
+
return {
|
|
64648
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64649
|
+
isError: true
|
|
64650
|
+
};
|
|
64651
|
+
}
|
|
64652
|
+
const value = result2.value.result;
|
|
64653
|
+
return formatResult(value, apiCall);
|
|
64654
|
+
}
|
|
64655
|
+
};
|
|
64656
|
+
});
|
|
64657
|
+
|
|
64658
|
+
// src/funcs/notesDeleteNotes.ts
|
|
64659
|
+
function notesDeleteNotes(client, request, options) {
|
|
64660
|
+
return new APIPromise($do150(client, request, options));
|
|
64661
|
+
}
|
|
64662
|
+
async function $do150(client, request, options) {
|
|
64663
|
+
const parsed = safeParse(request, (value) => DeleteNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64664
|
+
if (!parsed.ok) {
|
|
64665
|
+
return [parsed, { status: "invalid" }];
|
|
64666
|
+
}
|
|
64667
|
+
const payload = parsed.value;
|
|
64668
|
+
const body = null;
|
|
64669
|
+
const pathParams = {
|
|
64670
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64671
|
+
explode: false,
|
|
64672
|
+
charEncoding: "percent"
|
|
64673
|
+
})
|
|
64674
|
+
};
|
|
64675
|
+
const path = pathToFunc("/note/{uuid}.json")(pathParams);
|
|
64676
|
+
const headers = new Headers(compactMap({
|
|
64677
|
+
Accept: "application/json"
|
|
64678
|
+
}));
|
|
64679
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64680
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64681
|
+
const context = {
|
|
64682
|
+
options: client._options,
|
|
64683
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64684
|
+
operationID: "deleteNotes",
|
|
63861
64685
|
oAuth2Scopes: [],
|
|
63862
64686
|
resolvedSecurity: requestSecurity,
|
|
63863
64687
|
securitySource: client._options.security,
|
|
@@ -63919,12 +64743,12 @@ var init_notesDeleteNotes = __esm(() => {
|
|
|
63919
64743
|
});
|
|
63920
64744
|
|
|
63921
64745
|
// src/mcp-server/tools/notesDeleteNotes.ts
|
|
63922
|
-
var
|
|
64746
|
+
var args122, tool$notesDeleteNotes;
|
|
63923
64747
|
var init_notesDeleteNotes2 = __esm(() => {
|
|
63924
64748
|
init_notesDeleteNotes();
|
|
63925
64749
|
init_operations();
|
|
63926
64750
|
init_tools();
|
|
63927
|
-
|
|
64751
|
+
args122 = {
|
|
63928
64752
|
request: DeleteNotesRequest$inboundSchema
|
|
63929
64753
|
};
|
|
63930
64754
|
tool$notesDeleteNotes = {
|
|
@@ -63936,9 +64760,9 @@ var init_notesDeleteNotes2 = __esm(() => {
|
|
|
63936
64760
|
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
63937
64761
|
|
|
63938
64762
|
`,
|
|
63939
|
-
args:
|
|
63940
|
-
tool: async (client,
|
|
63941
|
-
const [result2, apiCall] = await notesDeleteNotes(client,
|
|
64763
|
+
args: args122,
|
|
64764
|
+
tool: async (client, args123, ctx) => {
|
|
64765
|
+
const [result2, apiCall] = await notesDeleteNotes(client, args123.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63942
64766
|
if (!result2.ok) {
|
|
63943
64767
|
return {
|
|
63944
64768
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63953,9 +64777,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
63953
64777
|
|
|
63954
64778
|
// src/funcs/notesGetNotes.ts
|
|
63955
64779
|
function notesGetNotes(client, request, options) {
|
|
63956
|
-
return new APIPromise($
|
|
64780
|
+
return new APIPromise($do151(client, request, options));
|
|
63957
64781
|
}
|
|
63958
|
-
async function $
|
|
64782
|
+
async function $do151(client, request, options) {
|
|
63959
64783
|
const parsed = safeParse(request, (value) => GetNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63960
64784
|
if (!parsed.ok) {
|
|
63961
64785
|
return [parsed, { status: "invalid" }];
|
|
@@ -64039,20 +64863,20 @@ var init_notesGetNotes = __esm(() => {
|
|
|
64039
64863
|
});
|
|
64040
64864
|
|
|
64041
64865
|
// src/mcp-server/tools/notesGetNotes.ts
|
|
64042
|
-
var
|
|
64866
|
+
var args123, tool$notesGetNotes;
|
|
64043
64867
|
var init_notesGetNotes2 = __esm(() => {
|
|
64044
64868
|
init_notesGetNotes();
|
|
64045
64869
|
init_operations();
|
|
64046
64870
|
init_tools();
|
|
64047
|
-
|
|
64871
|
+
args123 = {
|
|
64048
64872
|
request: GetNotesRequest$inboundSchema
|
|
64049
64873
|
};
|
|
64050
64874
|
tool$notesGetNotes = {
|
|
64051
64875
|
name: "notes-get-notes",
|
|
64052
64876
|
description: `Retrieve a Note`,
|
|
64053
|
-
args:
|
|
64054
|
-
tool: async (client,
|
|
64055
|
-
const [result2, apiCall] = await notesGetNotes(client,
|
|
64877
|
+
args: args123,
|
|
64878
|
+
tool: async (client, args124, ctx) => {
|
|
64879
|
+
const [result2, apiCall] = await notesGetNotes(client, args124.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64056
64880
|
if (!result2.ok) {
|
|
64057
64881
|
return {
|
|
64058
64882
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64067,9 +64891,9 @@ var init_notesGetNotes2 = __esm(() => {
|
|
|
64067
64891
|
|
|
64068
64892
|
// src/funcs/notesListNotes.ts
|
|
64069
64893
|
function notesListNotes(client, options) {
|
|
64070
|
-
return new APIPromise($
|
|
64894
|
+
return new APIPromise($do152(client, options));
|
|
64071
64895
|
}
|
|
64072
|
-
async function $
|
|
64896
|
+
async function $do152(client, options) {
|
|
64073
64897
|
const path = pathToFunc("/note.json")();
|
|
64074
64898
|
const headers = new Headers(compactMap({
|
|
64075
64899
|
Accept: "application/json"
|
|
@@ -64167,9 +64991,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
64167
64991
|
|
|
64168
64992
|
// src/funcs/notesUpdateNotes.ts
|
|
64169
64993
|
function notesUpdateNotes(client, request, options) {
|
|
64170
|
-
return new APIPromise($
|
|
64994
|
+
return new APIPromise($do153(client, request, options));
|
|
64171
64995
|
}
|
|
64172
|
-
async function $
|
|
64996
|
+
async function $do153(client, request, options) {
|
|
64173
64997
|
const parsed = safeParse(request, (value) => UpdateNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64174
64998
|
if (!parsed.ok) {
|
|
64175
64999
|
return [parsed, { status: "invalid" }];
|
|
@@ -64254,20 +65078,20 @@ var init_notesUpdateNotes = __esm(() => {
|
|
|
64254
65078
|
});
|
|
64255
65079
|
|
|
64256
65080
|
// src/mcp-server/tools/notesUpdateNotes.ts
|
|
64257
|
-
var
|
|
65081
|
+
var args124, tool$notesUpdateNotes;
|
|
64258
65082
|
var init_notesUpdateNotes2 = __esm(() => {
|
|
64259
65083
|
init_notesUpdateNotes();
|
|
64260
65084
|
init_operations();
|
|
64261
65085
|
init_tools();
|
|
64262
|
-
|
|
65086
|
+
args124 = {
|
|
64263
65087
|
request: UpdateNotesRequest$inboundSchema
|
|
64264
65088
|
};
|
|
64265
65089
|
tool$notesUpdateNotes = {
|
|
64266
65090
|
name: "notes-update-notes",
|
|
64267
65091
|
description: `Update a Note`,
|
|
64268
|
-
args:
|
|
64269
|
-
tool: async (client,
|
|
64270
|
-
const [result2, apiCall] = await notesUpdateNotes(client,
|
|
65092
|
+
args: args124,
|
|
65093
|
+
tool: async (client, args125, ctx) => {
|
|
65094
|
+
const [result2, apiCall] = await notesUpdateNotes(client, args125.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64271
65095
|
if (!result2.ok) {
|
|
64272
65096
|
return {
|
|
64273
65097
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64282,9 +65106,9 @@ var init_notesUpdateNotes2 = __esm(() => {
|
|
|
64282
65106
|
|
|
64283
65107
|
// src/funcs/searchGeneralSearch.ts
|
|
64284
65108
|
function searchGeneralSearch(client, request, options) {
|
|
64285
|
-
return new APIPromise($
|
|
65109
|
+
return new APIPromise($do154(client, request, options));
|
|
64286
65110
|
}
|
|
64287
|
-
async function $
|
|
65111
|
+
async function $do154(client, request, options) {
|
|
64288
65112
|
const parsed = safeParse(request, (value) => GeneralSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64289
65113
|
if (!parsed.ok) {
|
|
64290
65114
|
return [parsed, { status: "invalid" }];
|
|
@@ -64368,12 +65192,12 @@ var init_searchGeneralSearch = __esm(() => {
|
|
|
64368
65192
|
});
|
|
64369
65193
|
|
|
64370
65194
|
// src/mcp-server/tools/searchGeneralSearch.ts
|
|
64371
|
-
var
|
|
65195
|
+
var args125, tool$searchGeneralSearch;
|
|
64372
65196
|
var init_searchGeneralSearch2 = __esm(() => {
|
|
64373
65197
|
init_searchGeneralSearch();
|
|
64374
65198
|
init_operations();
|
|
64375
65199
|
init_tools();
|
|
64376
|
-
|
|
65200
|
+
args125 = {
|
|
64377
65201
|
request: GeneralSearchRequest$inboundSchema
|
|
64378
65202
|
};
|
|
64379
65203
|
tool$searchGeneralSearch = {
|
|
@@ -64381,9 +65205,9 @@ var init_searchGeneralSearch2 = __esm(() => {
|
|
|
64381
65205
|
description: `Search across multiple object types
|
|
64382
65206
|
|
|
64383
65207
|
Performs a text search across jobs, companies, and materials. Returns combined results sorted by relevance.`,
|
|
64384
|
-
args:
|
|
64385
|
-
tool: async (client,
|
|
64386
|
-
const [result2, apiCall] = await searchGeneralSearch(client,
|
|
65208
|
+
args: args125,
|
|
65209
|
+
tool: async (client, args126, ctx) => {
|
|
65210
|
+
const [result2, apiCall] = await searchGeneralSearch(client, args126.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64387
65211
|
if (!result2.ok) {
|
|
64388
65212
|
return {
|
|
64389
65213
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64398,9 +65222,9 @@ Performs a text search across jobs, companies, and materials. Returns combined r
|
|
|
64398
65222
|
|
|
64399
65223
|
// src/funcs/searchJobEmbeddingSearch.ts
|
|
64400
65224
|
function searchJobEmbeddingSearch(client, request, options) {
|
|
64401
|
-
return new APIPromise($
|
|
65225
|
+
return new APIPromise($do155(client, request, options));
|
|
64402
65226
|
}
|
|
64403
|
-
async function $
|
|
65227
|
+
async function $do155(client, request, options) {
|
|
64404
65228
|
const parsed = safeParse(request, (value) => JobEmbeddingSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64405
65229
|
if (!parsed.ok) {
|
|
64406
65230
|
return [parsed, { status: "invalid" }];
|
|
@@ -64485,12 +65309,12 @@ var init_searchJobEmbeddingSearch = __esm(() => {
|
|
|
64485
65309
|
});
|
|
64486
65310
|
|
|
64487
65311
|
// src/mcp-server/tools/searchJobEmbeddingSearch.ts
|
|
64488
|
-
var
|
|
65312
|
+
var args126, tool$searchJobEmbeddingSearch;
|
|
64489
65313
|
var init_searchJobEmbeddingSearch2 = __esm(() => {
|
|
64490
65314
|
init_searchJobEmbeddingSearch();
|
|
64491
65315
|
init_operations();
|
|
64492
65316
|
init_tools();
|
|
64493
|
-
|
|
65317
|
+
args126 = {
|
|
64494
65318
|
request: JobEmbeddingSearchRequest$inboundSchema
|
|
64495
65319
|
};
|
|
64496
65320
|
tool$searchJobEmbeddingSearch = {
|
|
@@ -64498,9 +65322,9 @@ var init_searchJobEmbeddingSearch2 = __esm(() => {
|
|
|
64498
65322
|
description: `Semantic search for jobs
|
|
64499
65323
|
|
|
64500
65324
|
Performs semantic/embedding-based search on job content. This uses AI to find jobs with similar meaning, not just exact text matches.`,
|
|
64501
|
-
args:
|
|
64502
|
-
tool: async (client,
|
|
64503
|
-
const [result2, apiCall] = await searchJobEmbeddingSearch(client,
|
|
65325
|
+
args: args126,
|
|
65326
|
+
tool: async (client, args127, ctx) => {
|
|
65327
|
+
const [result2, apiCall] = await searchJobEmbeddingSearch(client, args127.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64504
65328
|
if (!result2.ok) {
|
|
64505
65329
|
return {
|
|
64506
65330
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64515,9 +65339,9 @@ Performs semantic/embedding-based search on job content. This uses AI to find jo
|
|
|
64515
65339
|
|
|
64516
65340
|
// src/funcs/searchObjectSearch.ts
|
|
64517
65341
|
function searchObjectSearch(client, request, options) {
|
|
64518
|
-
return new APIPromise($
|
|
65342
|
+
return new APIPromise($do156(client, request, options));
|
|
64519
65343
|
}
|
|
64520
|
-
async function $
|
|
65344
|
+
async function $do156(client, request, options) {
|
|
64521
65345
|
const parsed = safeParse(request, (value) => ObjectSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64522
65346
|
if (!parsed.ok) {
|
|
64523
65347
|
return [parsed, { status: "invalid" }];
|
|
@@ -64607,12 +65431,12 @@ var init_searchObjectSearch = __esm(() => {
|
|
|
64607
65431
|
});
|
|
64608
65432
|
|
|
64609
65433
|
// src/mcp-server/tools/searchObjectSearch.ts
|
|
64610
|
-
var
|
|
65434
|
+
var args127, tool$searchObjectSearch;
|
|
64611
65435
|
var init_searchObjectSearch2 = __esm(() => {
|
|
64612
65436
|
init_searchObjectSearch();
|
|
64613
65437
|
init_operations();
|
|
64614
65438
|
init_tools();
|
|
64615
|
-
|
|
65439
|
+
args127 = {
|
|
64616
65440
|
request: ObjectSearchRequest$inboundSchema
|
|
64617
65441
|
};
|
|
64618
65442
|
tool$searchObjectSearch = {
|
|
@@ -64620,9 +65444,9 @@ var init_searchObjectSearch2 = __esm(() => {
|
|
|
64620
65444
|
description: `Search within a specific object type
|
|
64621
65445
|
|
|
64622
65446
|
Performs a text search within a specific object type. Supported types: job, company, material, knowledgearticle, attachment, formresponse, asset, materialbundle`,
|
|
64623
|
-
args:
|
|
64624
|
-
tool: async (client,
|
|
64625
|
-
const [result2, apiCall] = await searchObjectSearch(client,
|
|
65447
|
+
args: args127,
|
|
65448
|
+
tool: async (client, args128, ctx) => {
|
|
65449
|
+
const [result2, apiCall] = await searchObjectSearch(client, args128.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64626
65450
|
if (!result2.ok) {
|
|
64627
65451
|
return {
|
|
64628
65452
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64637,9 +65461,9 @@ Performs a text search within a specific object type. Supported types: job, comp
|
|
|
64637
65461
|
|
|
64638
65462
|
// src/funcs/securityRolesCreateSecurityRoles.ts
|
|
64639
65463
|
function securityRolesCreateSecurityRoles(client, request, options) {
|
|
64640
|
-
return new APIPromise($
|
|
65464
|
+
return new APIPromise($do157(client, request, options));
|
|
64641
65465
|
}
|
|
64642
|
-
async function $
|
|
65466
|
+
async function $do157(client, request, options) {
|
|
64643
65467
|
const parsed = safeParse(request, (value) => SecurityRoleInput$outboundSchema.parse(value), "Input validation failed");
|
|
64644
65468
|
if (!parsed.ok) {
|
|
64645
65469
|
return [parsed, { status: "invalid" }];
|
|
@@ -64724,12 +65548,12 @@ var init_securityRolesCreateSecurityRoles = __esm(() => {
|
|
|
64724
65548
|
});
|
|
64725
65549
|
|
|
64726
65550
|
// src/mcp-server/tools/securityRolesCreateSecurityRoles.ts
|
|
64727
|
-
var
|
|
65551
|
+
var args128, tool$securityRolesCreateSecurityRoles;
|
|
64728
65552
|
var init_securityRolesCreateSecurityRoles2 = __esm(() => {
|
|
64729
65553
|
init_securityRolesCreateSecurityRoles();
|
|
64730
65554
|
init_components();
|
|
64731
65555
|
init_tools();
|
|
64732
|
-
|
|
65556
|
+
args128 = {
|
|
64733
65557
|
request: SecurityRoleInput$inboundSchema
|
|
64734
65558
|
};
|
|
64735
65559
|
tool$securityRolesCreateSecurityRoles = {
|
|
@@ -64742,9 +65566,9 @@ var init_securityRolesCreateSecurityRoles2 = __esm(() => {
|
|
|
64742
65566
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
64743
65567
|
|
|
64744
65568
|
`,
|
|
64745
|
-
args:
|
|
64746
|
-
tool: async (client,
|
|
64747
|
-
const [result2, apiCall] = await securityRolesCreateSecurityRoles(client,
|
|
65569
|
+
args: args128,
|
|
65570
|
+
tool: async (client, args129, ctx) => {
|
|
65571
|
+
const [result2, apiCall] = await securityRolesCreateSecurityRoles(client, args129.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64748
65572
|
if (!result2.ok) {
|
|
64749
65573
|
return {
|
|
64750
65574
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64759,9 +65583,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
64759
65583
|
|
|
64760
65584
|
// src/funcs/securityRolesDeleteSecurityRoles.ts
|
|
64761
65585
|
function securityRolesDeleteSecurityRoles(client, request, options) {
|
|
64762
|
-
return new APIPromise($
|
|
65586
|
+
return new APIPromise($do158(client, request, options));
|
|
64763
65587
|
}
|
|
64764
|
-
async function $
|
|
65588
|
+
async function $do158(client, request, options) {
|
|
64765
65589
|
const parsed = safeParse(request, (value) => DeleteSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64766
65590
|
if (!parsed.ok) {
|
|
64767
65591
|
return [parsed, { status: "invalid" }];
|
|
@@ -64845,12 +65669,12 @@ var init_securityRolesDeleteSecurityRoles = __esm(() => {
|
|
|
64845
65669
|
});
|
|
64846
65670
|
|
|
64847
65671
|
// src/mcp-server/tools/securityRolesDeleteSecurityRoles.ts
|
|
64848
|
-
var
|
|
65672
|
+
var args129, tool$securityRolesDeleteSecurityRoles;
|
|
64849
65673
|
var init_securityRolesDeleteSecurityRoles2 = __esm(() => {
|
|
64850
65674
|
init_securityRolesDeleteSecurityRoles();
|
|
64851
65675
|
init_operations();
|
|
64852
65676
|
init_tools();
|
|
64853
|
-
|
|
65677
|
+
args129 = {
|
|
64854
65678
|
request: DeleteSecurityRolesRequest$inboundSchema
|
|
64855
65679
|
};
|
|
64856
65680
|
tool$securityRolesDeleteSecurityRoles = {
|
|
@@ -64862,9 +65686,9 @@ var init_securityRolesDeleteSecurityRoles2 = __esm(() => {
|
|
|
64862
65686
|
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
64863
65687
|
|
|
64864
65688
|
`,
|
|
64865
|
-
args:
|
|
64866
|
-
tool: async (client,
|
|
64867
|
-
const [result2, apiCall] = await securityRolesDeleteSecurityRoles(client,
|
|
65689
|
+
args: args129,
|
|
65690
|
+
tool: async (client, args130, ctx) => {
|
|
65691
|
+
const [result2, apiCall] = await securityRolesDeleteSecurityRoles(client, args130.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64868
65692
|
if (!result2.ok) {
|
|
64869
65693
|
return {
|
|
64870
65694
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64879,9 +65703,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
64879
65703
|
|
|
64880
65704
|
// src/funcs/securityRolesGetSecurityRoles.ts
|
|
64881
65705
|
function securityRolesGetSecurityRoles(client, request, options) {
|
|
64882
|
-
return new APIPromise($
|
|
65706
|
+
return new APIPromise($do159(client, request, options));
|
|
64883
65707
|
}
|
|
64884
|
-
async function $
|
|
65708
|
+
async function $do159(client, request, options) {
|
|
64885
65709
|
const parsed = safeParse(request, (value) => GetSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64886
65710
|
if (!parsed.ok) {
|
|
64887
65711
|
return [parsed, { status: "invalid" }];
|
|
@@ -64965,20 +65789,20 @@ var init_securityRolesGetSecurityRoles = __esm(() => {
|
|
|
64965
65789
|
});
|
|
64966
65790
|
|
|
64967
65791
|
// src/mcp-server/tools/securityRolesGetSecurityRoles.ts
|
|
64968
|
-
var
|
|
65792
|
+
var args130, tool$securityRolesGetSecurityRoles;
|
|
64969
65793
|
var init_securityRolesGetSecurityRoles2 = __esm(() => {
|
|
64970
65794
|
init_securityRolesGetSecurityRoles();
|
|
64971
65795
|
init_operations();
|
|
64972
65796
|
init_tools();
|
|
64973
|
-
|
|
65797
|
+
args130 = {
|
|
64974
65798
|
request: GetSecurityRolesRequest$inboundSchema
|
|
64975
65799
|
};
|
|
64976
65800
|
tool$securityRolesGetSecurityRoles = {
|
|
64977
65801
|
name: "security-roles-get-security-roles",
|
|
64978
65802
|
description: `Retrieve a Security Role`,
|
|
64979
|
-
args:
|
|
64980
|
-
tool: async (client,
|
|
64981
|
-
const [result2, apiCall] = await securityRolesGetSecurityRoles(client,
|
|
65803
|
+
args: args130,
|
|
65804
|
+
tool: async (client, args131, ctx) => {
|
|
65805
|
+
const [result2, apiCall] = await securityRolesGetSecurityRoles(client, args131.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64982
65806
|
if (!result2.ok) {
|
|
64983
65807
|
return {
|
|
64984
65808
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64993,9 +65817,9 @@ var init_securityRolesGetSecurityRoles2 = __esm(() => {
|
|
|
64993
65817
|
|
|
64994
65818
|
// src/funcs/securityRolesListSecurityRoles.ts
|
|
64995
65819
|
function securityRolesListSecurityRoles(client, options) {
|
|
64996
|
-
return new APIPromise($
|
|
65820
|
+
return new APIPromise($do160(client, options));
|
|
64997
65821
|
}
|
|
64998
|
-
async function $
|
|
65822
|
+
async function $do160(client, options) {
|
|
64999
65823
|
const path = pathToFunc("/securityrole.json")();
|
|
65000
65824
|
const headers = new Headers(compactMap({
|
|
65001
65825
|
Accept: "application/json"
|
|
@@ -65093,9 +65917,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
65093
65917
|
|
|
65094
65918
|
// src/funcs/securityRolesUpdateSecurityRoles.ts
|
|
65095
65919
|
function securityRolesUpdateSecurityRoles(client, request, options) {
|
|
65096
|
-
return new APIPromise($
|
|
65920
|
+
return new APIPromise($do161(client, request, options));
|
|
65097
65921
|
}
|
|
65098
|
-
async function $
|
|
65922
|
+
async function $do161(client, request, options) {
|
|
65099
65923
|
const parsed = safeParse(request, (value) => UpdateSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65100
65924
|
if (!parsed.ok) {
|
|
65101
65925
|
return [parsed, { status: "invalid" }];
|
|
@@ -65180,20 +66004,20 @@ var init_securityRolesUpdateSecurityRoles = __esm(() => {
|
|
|
65180
66004
|
});
|
|
65181
66005
|
|
|
65182
66006
|
// src/mcp-server/tools/securityRolesUpdateSecurityRoles.ts
|
|
65183
|
-
var
|
|
66007
|
+
var args131, tool$securityRolesUpdateSecurityRoles;
|
|
65184
66008
|
var init_securityRolesUpdateSecurityRoles2 = __esm(() => {
|
|
65185
66009
|
init_securityRolesUpdateSecurityRoles();
|
|
65186
66010
|
init_operations();
|
|
65187
66011
|
init_tools();
|
|
65188
|
-
|
|
66012
|
+
args131 = {
|
|
65189
66013
|
request: UpdateSecurityRolesRequest$inboundSchema
|
|
65190
66014
|
};
|
|
65191
66015
|
tool$securityRolesUpdateSecurityRoles = {
|
|
65192
66016
|
name: "security-roles-update-security-roles",
|
|
65193
66017
|
description: `Update a Security Role`,
|
|
65194
|
-
args:
|
|
65195
|
-
tool: async (client,
|
|
65196
|
-
const [result2, apiCall] = await securityRolesUpdateSecurityRoles(client,
|
|
66018
|
+
args: args131,
|
|
66019
|
+
tool: async (client, args132, ctx) => {
|
|
66020
|
+
const [result2, apiCall] = await securityRolesUpdateSecurityRoles(client, args132.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65197
66021
|
if (!result2.ok) {
|
|
65198
66022
|
return {
|
|
65199
66023
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65208,9 +66032,9 @@ var init_securityRolesUpdateSecurityRoles2 = __esm(() => {
|
|
|
65208
66032
|
|
|
65209
66033
|
// src/funcs/smsTemplatesCreateSMSTemplates.ts
|
|
65210
66034
|
function smsTemplatesCreateSMSTemplates(client, request, options) {
|
|
65211
|
-
return new APIPromise($
|
|
66035
|
+
return new APIPromise($do162(client, request, options));
|
|
65212
66036
|
}
|
|
65213
|
-
async function $
|
|
66037
|
+
async function $do162(client, request, options) {
|
|
65214
66038
|
const parsed = safeParse(request, (value) => SmsTemplateInput$outboundSchema.parse(value), "Input validation failed");
|
|
65215
66039
|
if (!parsed.ok) {
|
|
65216
66040
|
return [parsed, { status: "invalid" }];
|
|
@@ -65295,12 +66119,12 @@ var init_smsTemplatesCreateSMSTemplates = __esm(() => {
|
|
|
65295
66119
|
});
|
|
65296
66120
|
|
|
65297
66121
|
// src/mcp-server/tools/smsTemplatesCreateSMSTemplates.ts
|
|
65298
|
-
var
|
|
66122
|
+
var args132, tool$smsTemplatesCreateSMSTemplates;
|
|
65299
66123
|
var init_smsTemplatesCreateSMSTemplates2 = __esm(() => {
|
|
65300
66124
|
init_smsTemplatesCreateSMSTemplates();
|
|
65301
66125
|
init_components();
|
|
65302
66126
|
init_tools();
|
|
65303
|
-
|
|
66127
|
+
args132 = {
|
|
65304
66128
|
request: SmsTemplateInput$inboundSchema
|
|
65305
66129
|
};
|
|
65306
66130
|
tool$smsTemplatesCreateSMSTemplates = {
|
|
@@ -65313,9 +66137,9 @@ var init_smsTemplatesCreateSMSTemplates2 = __esm(() => {
|
|
|
65313
66137
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
65314
66138
|
|
|
65315
66139
|
`,
|
|
65316
|
-
args:
|
|
65317
|
-
tool: async (client,
|
|
65318
|
-
const [result2, apiCall] = await smsTemplatesCreateSMSTemplates(client,
|
|
66140
|
+
args: args132,
|
|
66141
|
+
tool: async (client, args133, ctx) => {
|
|
66142
|
+
const [result2, apiCall] = await smsTemplatesCreateSMSTemplates(client, args133.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65319
66143
|
if (!result2.ok) {
|
|
65320
66144
|
return {
|
|
65321
66145
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65330,9 +66154,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
65330
66154
|
|
|
65331
66155
|
// src/funcs/smsTemplatesDeleteSMSTemplates.ts
|
|
65332
66156
|
function smsTemplatesDeleteSMSTemplates(client, request, options) {
|
|
65333
|
-
return new APIPromise($
|
|
66157
|
+
return new APIPromise($do163(client, request, options));
|
|
65334
66158
|
}
|
|
65335
|
-
async function $
|
|
66159
|
+
async function $do163(client, request, options) {
|
|
65336
66160
|
const parsed = safeParse(request, (value) => DeleteSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65337
66161
|
if (!parsed.ok) {
|
|
65338
66162
|
return [parsed, { status: "invalid" }];
|
|
@@ -65416,12 +66240,12 @@ var init_smsTemplatesDeleteSMSTemplates = __esm(() => {
|
|
|
65416
66240
|
});
|
|
65417
66241
|
|
|
65418
66242
|
// src/mcp-server/tools/smsTemplatesDeleteSMSTemplates.ts
|
|
65419
|
-
var
|
|
66243
|
+
var args133, tool$smsTemplatesDeleteSMSTemplates;
|
|
65420
66244
|
var init_smsTemplatesDeleteSMSTemplates2 = __esm(() => {
|
|
65421
66245
|
init_smsTemplatesDeleteSMSTemplates();
|
|
65422
66246
|
init_operations();
|
|
65423
66247
|
init_tools();
|
|
65424
|
-
|
|
66248
|
+
args133 = {
|
|
65425
66249
|
request: DeleteSMSTemplatesRequest$inboundSchema
|
|
65426
66250
|
};
|
|
65427
66251
|
tool$smsTemplatesDeleteSMSTemplates = {
|
|
@@ -65433,9 +66257,9 @@ var init_smsTemplatesDeleteSMSTemplates2 = __esm(() => {
|
|
|
65433
66257
|
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
65434
66258
|
|
|
65435
66259
|
`,
|
|
65436
|
-
args:
|
|
65437
|
-
tool: async (client,
|
|
65438
|
-
const [result2, apiCall] = await smsTemplatesDeleteSMSTemplates(client,
|
|
66260
|
+
args: args133,
|
|
66261
|
+
tool: async (client, args134, ctx) => {
|
|
66262
|
+
const [result2, apiCall] = await smsTemplatesDeleteSMSTemplates(client, args134.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65439
66263
|
if (!result2.ok) {
|
|
65440
66264
|
return {
|
|
65441
66265
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65450,9 +66274,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
65450
66274
|
|
|
65451
66275
|
// src/funcs/smsTemplatesGetSMSTemplates.ts
|
|
65452
66276
|
function smsTemplatesGetSMSTemplates(client, request, options) {
|
|
65453
|
-
return new APIPromise($
|
|
66277
|
+
return new APIPromise($do164(client, request, options));
|
|
65454
66278
|
}
|
|
65455
|
-
async function $
|
|
66279
|
+
async function $do164(client, request, options) {
|
|
65456
66280
|
const parsed = safeParse(request, (value) => GetSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65457
66281
|
if (!parsed.ok) {
|
|
65458
66282
|
return [parsed, { status: "invalid" }];
|
|
@@ -65536,20 +66360,20 @@ var init_smsTemplatesGetSMSTemplates = __esm(() => {
|
|
|
65536
66360
|
});
|
|
65537
66361
|
|
|
65538
66362
|
// src/mcp-server/tools/smsTemplatesGetSMSTemplates.ts
|
|
65539
|
-
var
|
|
66363
|
+
var args134, tool$smsTemplatesGetSMSTemplates;
|
|
65540
66364
|
var init_smsTemplatesGetSMSTemplates2 = __esm(() => {
|
|
65541
66365
|
init_smsTemplatesGetSMSTemplates();
|
|
65542
66366
|
init_operations();
|
|
65543
66367
|
init_tools();
|
|
65544
|
-
|
|
66368
|
+
args134 = {
|
|
65545
66369
|
request: GetSMSTemplatesRequest$inboundSchema
|
|
65546
66370
|
};
|
|
65547
66371
|
tool$smsTemplatesGetSMSTemplates = {
|
|
65548
66372
|
name: "SMS-templates-get-SMS-templates",
|
|
65549
66373
|
description: `Retrieve a SMS Template`,
|
|
65550
|
-
args:
|
|
65551
|
-
tool: async (client,
|
|
65552
|
-
const [result2, apiCall] = await smsTemplatesGetSMSTemplates(client,
|
|
66374
|
+
args: args134,
|
|
66375
|
+
tool: async (client, args135, ctx) => {
|
|
66376
|
+
const [result2, apiCall] = await smsTemplatesGetSMSTemplates(client, args135.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65553
66377
|
if (!result2.ok) {
|
|
65554
66378
|
return {
|
|
65555
66379
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65564,9 +66388,9 @@ var init_smsTemplatesGetSMSTemplates2 = __esm(() => {
|
|
|
65564
66388
|
|
|
65565
66389
|
// src/funcs/smsTemplatesListSMSTemplates.ts
|
|
65566
66390
|
function smsTemplatesListSMSTemplates(client, options) {
|
|
65567
|
-
return new APIPromise($
|
|
66391
|
+
return new APIPromise($do165(client, options));
|
|
65568
66392
|
}
|
|
65569
|
-
async function $
|
|
66393
|
+
async function $do165(client, options) {
|
|
65570
66394
|
const path = pathToFunc("/smstemplate.json")();
|
|
65571
66395
|
const headers = new Headers(compactMap({
|
|
65572
66396
|
Accept: "application/json"
|
|
@@ -65664,9 +66488,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
65664
66488
|
|
|
65665
66489
|
// src/funcs/smsTemplatesUpdateSMSTemplates.ts
|
|
65666
66490
|
function smsTemplatesUpdateSMSTemplates(client, request, options) {
|
|
65667
|
-
return new APIPromise($
|
|
66491
|
+
return new APIPromise($do166(client, request, options));
|
|
65668
66492
|
}
|
|
65669
|
-
async function $
|
|
66493
|
+
async function $do166(client, request, options) {
|
|
65670
66494
|
const parsed = safeParse(request, (value) => UpdateSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65671
66495
|
if (!parsed.ok) {
|
|
65672
66496
|
return [parsed, { status: "invalid" }];
|
|
@@ -65751,20 +66575,20 @@ var init_smsTemplatesUpdateSMSTemplates = __esm(() => {
|
|
|
65751
66575
|
});
|
|
65752
66576
|
|
|
65753
66577
|
// src/mcp-server/tools/smsTemplatesUpdateSMSTemplates.ts
|
|
65754
|
-
var
|
|
66578
|
+
var args135, tool$smsTemplatesUpdateSMSTemplates;
|
|
65755
66579
|
var init_smsTemplatesUpdateSMSTemplates2 = __esm(() => {
|
|
65756
66580
|
init_smsTemplatesUpdateSMSTemplates();
|
|
65757
66581
|
init_operations();
|
|
65758
66582
|
init_tools();
|
|
65759
|
-
|
|
66583
|
+
args135 = {
|
|
65760
66584
|
request: UpdateSMSTemplatesRequest$inboundSchema
|
|
65761
66585
|
};
|
|
65762
66586
|
tool$smsTemplatesUpdateSMSTemplates = {
|
|
65763
66587
|
name: "SMS-templates-update-SMS-templates",
|
|
65764
66588
|
description: `Update a SMS Template`,
|
|
65765
|
-
args:
|
|
65766
|
-
tool: async (client,
|
|
65767
|
-
const [result2, apiCall] = await smsTemplatesUpdateSMSTemplates(client,
|
|
66589
|
+
args: args135,
|
|
66590
|
+
tool: async (client, args136, ctx) => {
|
|
66591
|
+
const [result2, apiCall] = await smsTemplatesUpdateSMSTemplates(client, args136.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65768
66592
|
if (!result2.ok) {
|
|
65769
66593
|
return {
|
|
65770
66594
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65779,9 +66603,9 @@ var init_smsTemplatesUpdateSMSTemplates2 = __esm(() => {
|
|
|
65779
66603
|
|
|
65780
66604
|
// src/funcs/staffMembersCreateStaffMembers.ts
|
|
65781
66605
|
function staffMembersCreateStaffMembers(client, request, options) {
|
|
65782
|
-
return new APIPromise($
|
|
66606
|
+
return new APIPromise($do167(client, request, options));
|
|
65783
66607
|
}
|
|
65784
|
-
async function $
|
|
66608
|
+
async function $do167(client, request, options) {
|
|
65785
66609
|
const parsed = safeParse(request, (value) => StaffInput$outboundSchema.parse(value), "Input validation failed");
|
|
65786
66610
|
if (!parsed.ok) {
|
|
65787
66611
|
return [parsed, { status: "invalid" }];
|
|
@@ -65866,12 +66690,12 @@ var init_staffMembersCreateStaffMembers = __esm(() => {
|
|
|
65866
66690
|
});
|
|
65867
66691
|
|
|
65868
66692
|
// src/mcp-server/tools/staffMembersCreateStaffMembers.ts
|
|
65869
|
-
var
|
|
66693
|
+
var args136, tool$staffMembersCreateStaffMembers;
|
|
65870
66694
|
var init_staffMembersCreateStaffMembers2 = __esm(() => {
|
|
65871
66695
|
init_staffMembersCreateStaffMembers();
|
|
65872
66696
|
init_components();
|
|
65873
66697
|
init_tools();
|
|
65874
|
-
|
|
66698
|
+
args136 = {
|
|
65875
66699
|
request: StaffInput$inboundSchema
|
|
65876
66700
|
};
|
|
65877
66701
|
tool$staffMembersCreateStaffMembers = {
|
|
@@ -65889,9 +66713,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
65889
66713
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
65890
66714
|
|
|
65891
66715
|
`,
|
|
65892
|
-
args:
|
|
65893
|
-
tool: async (client,
|
|
65894
|
-
const [result2, apiCall] = await staffMembersCreateStaffMembers(client,
|
|
66716
|
+
args: args136,
|
|
66717
|
+
tool: async (client, args137, ctx) => {
|
|
66718
|
+
const [result2, apiCall] = await staffMembersCreateStaffMembers(client, args137.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65895
66719
|
if (!result2.ok) {
|
|
65896
66720
|
return {
|
|
65897
66721
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65906,9 +66730,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
65906
66730
|
|
|
65907
66731
|
// src/funcs/staffMembersDeleteStaffMembers.ts
|
|
65908
66732
|
function staffMembersDeleteStaffMembers(client, request, options) {
|
|
65909
|
-
return new APIPromise($
|
|
66733
|
+
return new APIPromise($do168(client, request, options));
|
|
65910
66734
|
}
|
|
65911
|
-
async function $
|
|
66735
|
+
async function $do168(client, request, options) {
|
|
65912
66736
|
const parsed = safeParse(request, (value) => DeleteStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65913
66737
|
if (!parsed.ok) {
|
|
65914
66738
|
return [parsed, { status: "invalid" }];
|
|
@@ -65992,12 +66816,12 @@ var init_staffMembersDeleteStaffMembers = __esm(() => {
|
|
|
65992
66816
|
});
|
|
65993
66817
|
|
|
65994
66818
|
// src/mcp-server/tools/staffMembersDeleteStaffMembers.ts
|
|
65995
|
-
var
|
|
66819
|
+
var args137, tool$staffMembersDeleteStaffMembers;
|
|
65996
66820
|
var init_staffMembersDeleteStaffMembers2 = __esm(() => {
|
|
65997
66821
|
init_staffMembersDeleteStaffMembers();
|
|
65998
66822
|
init_operations();
|
|
65999
66823
|
init_tools();
|
|
66000
|
-
|
|
66824
|
+
args137 = {
|
|
66001
66825
|
request: DeleteStaffMembersRequest$inboundSchema
|
|
66002
66826
|
};
|
|
66003
66827
|
tool$staffMembersDeleteStaffMembers = {
|
|
@@ -66014,9 +66838,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
66014
66838
|
This endpoint requires the following OAuth scope **manage_staff**.
|
|
66015
66839
|
|
|
66016
66840
|
`,
|
|
66017
|
-
args:
|
|
66018
|
-
tool: async (client,
|
|
66019
|
-
const [result2, apiCall] = await staffMembersDeleteStaffMembers(client,
|
|
66841
|
+
args: args137,
|
|
66842
|
+
tool: async (client, args138, ctx) => {
|
|
66843
|
+
const [result2, apiCall] = await staffMembersDeleteStaffMembers(client, args138.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66020
66844
|
if (!result2.ok) {
|
|
66021
66845
|
return {
|
|
66022
66846
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66031,9 +66855,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
66031
66855
|
|
|
66032
66856
|
// src/funcs/staffMembersGetStaffMembers.ts
|
|
66033
66857
|
function staffMembersGetStaffMembers(client, request, options) {
|
|
66034
|
-
return new APIPromise($
|
|
66858
|
+
return new APIPromise($do169(client, request, options));
|
|
66035
66859
|
}
|
|
66036
|
-
async function $
|
|
66860
|
+
async function $do169(client, request, options) {
|
|
66037
66861
|
const parsed = safeParse(request, (value) => GetStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66038
66862
|
if (!parsed.ok) {
|
|
66039
66863
|
return [parsed, { status: "invalid" }];
|
|
@@ -66117,12 +66941,12 @@ var init_staffMembersGetStaffMembers = __esm(() => {
|
|
|
66117
66941
|
});
|
|
66118
66942
|
|
|
66119
66943
|
// src/mcp-server/tools/staffMembersGetStaffMembers.ts
|
|
66120
|
-
var
|
|
66944
|
+
var args138, tool$staffMembersGetStaffMembers;
|
|
66121
66945
|
var init_staffMembersGetStaffMembers2 = __esm(() => {
|
|
66122
66946
|
init_staffMembersGetStaffMembers();
|
|
66123
66947
|
init_operations();
|
|
66124
66948
|
init_tools();
|
|
66125
|
-
|
|
66949
|
+
args138 = {
|
|
66126
66950
|
request: GetStaffMembersRequest$inboundSchema
|
|
66127
66951
|
};
|
|
66128
66952
|
tool$staffMembersGetStaffMembers = {
|
|
@@ -66135,9 +66959,9 @@ var init_staffMembersGetStaffMembers2 = __esm(() => {
|
|
|
66135
66959
|
This endpoint requires the following OAuth scope **read_staff**.
|
|
66136
66960
|
|
|
66137
66961
|
`,
|
|
66138
|
-
args:
|
|
66139
|
-
tool: async (client,
|
|
66140
|
-
const [result2, apiCall] = await staffMembersGetStaffMembers(client,
|
|
66962
|
+
args: args138,
|
|
66963
|
+
tool: async (client, args139, ctx) => {
|
|
66964
|
+
const [result2, apiCall] = await staffMembersGetStaffMembers(client, args139.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66141
66965
|
if (!result2.ok) {
|
|
66142
66966
|
return {
|
|
66143
66967
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66152,9 +66976,9 @@ This endpoint requires the following OAuth scope **read_staff**.
|
|
|
66152
66976
|
|
|
66153
66977
|
// src/funcs/staffMembersListStaffMembers.ts
|
|
66154
66978
|
function staffMembersListStaffMembers(client, options) {
|
|
66155
|
-
return new APIPromise($
|
|
66979
|
+
return new APIPromise($do170(client, options));
|
|
66156
66980
|
}
|
|
66157
|
-
async function $
|
|
66981
|
+
async function $do170(client, options) {
|
|
66158
66982
|
const path = pathToFunc("/staff.json")();
|
|
66159
66983
|
const headers = new Headers(compactMap({
|
|
66160
66984
|
Accept: "application/json"
|
|
@@ -66257,9 +67081,9 @@ This endpoint requires the following OAuth scope **read_staff**.
|
|
|
66257
67081
|
|
|
66258
67082
|
// src/funcs/staffMembersUpdateStaffMembers.ts
|
|
66259
67083
|
function staffMembersUpdateStaffMembers(client, request, options) {
|
|
66260
|
-
return new APIPromise($
|
|
67084
|
+
return new APIPromise($do171(client, request, options));
|
|
66261
67085
|
}
|
|
66262
|
-
async function $
|
|
67086
|
+
async function $do171(client, request, options) {
|
|
66263
67087
|
const parsed = safeParse(request, (value) => UpdateStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66264
67088
|
if (!parsed.ok) {
|
|
66265
67089
|
return [parsed, { status: "invalid" }];
|
|
@@ -66344,12 +67168,12 @@ var init_staffMembersUpdateStaffMembers = __esm(() => {
|
|
|
66344
67168
|
});
|
|
66345
67169
|
|
|
66346
67170
|
// src/mcp-server/tools/staffMembersUpdateStaffMembers.ts
|
|
66347
|
-
var
|
|
67171
|
+
var args139, tool$staffMembersUpdateStaffMembers;
|
|
66348
67172
|
var init_staffMembersUpdateStaffMembers2 = __esm(() => {
|
|
66349
67173
|
init_staffMembersUpdateStaffMembers();
|
|
66350
67174
|
init_operations();
|
|
66351
67175
|
init_tools();
|
|
66352
|
-
|
|
67176
|
+
args139 = {
|
|
66353
67177
|
request: UpdateStaffMembersRequest$inboundSchema
|
|
66354
67178
|
};
|
|
66355
67179
|
tool$staffMembersUpdateStaffMembers = {
|
|
@@ -66362,9 +67186,9 @@ var init_staffMembersUpdateStaffMembers2 = __esm(() => {
|
|
|
66362
67186
|
This endpoint requires the following OAuth scope **manage_staff**.
|
|
66363
67187
|
|
|
66364
67188
|
`,
|
|
66365
|
-
args:
|
|
66366
|
-
tool: async (client,
|
|
66367
|
-
const [result2, apiCall] = await staffMembersUpdateStaffMembers(client,
|
|
67189
|
+
args: args139,
|
|
67190
|
+
tool: async (client, args140, ctx) => {
|
|
67191
|
+
const [result2, apiCall] = await staffMembersUpdateStaffMembers(client, args140.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66368
67192
|
if (!result2.ok) {
|
|
66369
67193
|
return {
|
|
66370
67194
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66379,9 +67203,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
66379
67203
|
|
|
66380
67204
|
// src/funcs/staffMessagesCreateStaffMessages.ts
|
|
66381
67205
|
function staffMessagesCreateStaffMessages(client, request, options) {
|
|
66382
|
-
return new APIPromise($
|
|
67206
|
+
return new APIPromise($do172(client, request, options));
|
|
66383
67207
|
}
|
|
66384
|
-
async function $
|
|
67208
|
+
async function $do172(client, request, options) {
|
|
66385
67209
|
const parsed = safeParse(request, (value) => StaffMessageInput$outboundSchema.parse(value), "Input validation failed");
|
|
66386
67210
|
if (!parsed.ok) {
|
|
66387
67211
|
return [parsed, { status: "invalid" }];
|
|
@@ -66466,12 +67290,12 @@ var init_staffMessagesCreateStaffMessages = __esm(() => {
|
|
|
66466
67290
|
});
|
|
66467
67291
|
|
|
66468
67292
|
// src/mcp-server/tools/staffMessagesCreateStaffMessages.ts
|
|
66469
|
-
var
|
|
67293
|
+
var args140, tool$staffMessagesCreateStaffMessages;
|
|
66470
67294
|
var init_staffMessagesCreateStaffMessages2 = __esm(() => {
|
|
66471
67295
|
init_staffMessagesCreateStaffMessages();
|
|
66472
67296
|
init_components();
|
|
66473
67297
|
init_tools();
|
|
66474
|
-
|
|
67298
|
+
args140 = {
|
|
66475
67299
|
request: StaffMessageInput$inboundSchema
|
|
66476
67300
|
};
|
|
66477
67301
|
tool$staffMessagesCreateStaffMessages = {
|
|
@@ -66484,9 +67308,9 @@ var init_staffMessagesCreateStaffMessages2 = __esm(() => {
|
|
|
66484
67308
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
66485
67309
|
|
|
66486
67310
|
`,
|
|
66487
|
-
args:
|
|
66488
|
-
tool: async (client,
|
|
66489
|
-
const [result2, apiCall] = await staffMessagesCreateStaffMessages(client,
|
|
67311
|
+
args: args140,
|
|
67312
|
+
tool: async (client, args141, ctx) => {
|
|
67313
|
+
const [result2, apiCall] = await staffMessagesCreateStaffMessages(client, args141.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66490
67314
|
if (!result2.ok) {
|
|
66491
67315
|
return {
|
|
66492
67316
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66501,9 +67325,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
66501
67325
|
|
|
66502
67326
|
// src/funcs/staffMessagesDeleteStaffMessages.ts
|
|
66503
67327
|
function staffMessagesDeleteStaffMessages(client, request, options) {
|
|
66504
|
-
return new APIPromise($
|
|
67328
|
+
return new APIPromise($do173(client, request, options));
|
|
66505
67329
|
}
|
|
66506
|
-
async function $
|
|
67330
|
+
async function $do173(client, request, options) {
|
|
66507
67331
|
const parsed = safeParse(request, (value) => DeleteStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66508
67332
|
if (!parsed.ok) {
|
|
66509
67333
|
return [parsed, { status: "invalid" }];
|
|
@@ -66587,12 +67411,12 @@ var init_staffMessagesDeleteStaffMessages = __esm(() => {
|
|
|
66587
67411
|
});
|
|
66588
67412
|
|
|
66589
67413
|
// src/mcp-server/tools/staffMessagesDeleteStaffMessages.ts
|
|
66590
|
-
var
|
|
67414
|
+
var args141, tool$staffMessagesDeleteStaffMessages;
|
|
66591
67415
|
var init_staffMessagesDeleteStaffMessages2 = __esm(() => {
|
|
66592
67416
|
init_staffMessagesDeleteStaffMessages();
|
|
66593
67417
|
init_operations();
|
|
66594
67418
|
init_tools();
|
|
66595
|
-
|
|
67419
|
+
args141 = {
|
|
66596
67420
|
request: DeleteStaffMessagesRequest$inboundSchema
|
|
66597
67421
|
};
|
|
66598
67422
|
tool$staffMessagesDeleteStaffMessages = {
|
|
@@ -66604,9 +67428,9 @@ var init_staffMessagesDeleteStaffMessages2 = __esm(() => {
|
|
|
66604
67428
|
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
66605
67429
|
|
|
66606
67430
|
`,
|
|
66607
|
-
args:
|
|
66608
|
-
tool: async (client,
|
|
66609
|
-
const [result2, apiCall] = await staffMessagesDeleteStaffMessages(client,
|
|
67431
|
+
args: args141,
|
|
67432
|
+
tool: async (client, args142, ctx) => {
|
|
67433
|
+
const [result2, apiCall] = await staffMessagesDeleteStaffMessages(client, args142.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66610
67434
|
if (!result2.ok) {
|
|
66611
67435
|
return {
|
|
66612
67436
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66621,9 +67445,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
66621
67445
|
|
|
66622
67446
|
// src/funcs/staffMessagesGetStaffMessages.ts
|
|
66623
67447
|
function staffMessagesGetStaffMessages(client, request, options) {
|
|
66624
|
-
return new APIPromise($
|
|
67448
|
+
return new APIPromise($do174(client, request, options));
|
|
66625
67449
|
}
|
|
66626
|
-
async function $
|
|
67450
|
+
async function $do174(client, request, options) {
|
|
66627
67451
|
const parsed = safeParse(request, (value) => GetStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66628
67452
|
if (!parsed.ok) {
|
|
66629
67453
|
return [parsed, { status: "invalid" }];
|
|
@@ -66707,20 +67531,20 @@ var init_staffMessagesGetStaffMessages = __esm(() => {
|
|
|
66707
67531
|
});
|
|
66708
67532
|
|
|
66709
67533
|
// src/mcp-server/tools/staffMessagesGetStaffMessages.ts
|
|
66710
|
-
var
|
|
67534
|
+
var args142, tool$staffMessagesGetStaffMessages;
|
|
66711
67535
|
var init_staffMessagesGetStaffMessages2 = __esm(() => {
|
|
66712
67536
|
init_staffMessagesGetStaffMessages();
|
|
66713
67537
|
init_operations();
|
|
66714
67538
|
init_tools();
|
|
66715
|
-
|
|
67539
|
+
args142 = {
|
|
66716
67540
|
request: GetStaffMessagesRequest$inboundSchema
|
|
66717
67541
|
};
|
|
66718
67542
|
tool$staffMessagesGetStaffMessages = {
|
|
66719
67543
|
name: "staff-messages-get-staff-messages",
|
|
66720
67544
|
description: `Retrieve a Staff Message`,
|
|
66721
|
-
args:
|
|
66722
|
-
tool: async (client,
|
|
66723
|
-
const [result2, apiCall] = await staffMessagesGetStaffMessages(client,
|
|
67545
|
+
args: args142,
|
|
67546
|
+
tool: async (client, args143, ctx) => {
|
|
67547
|
+
const [result2, apiCall] = await staffMessagesGetStaffMessages(client, args143.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66724
67548
|
if (!result2.ok) {
|
|
66725
67549
|
return {
|
|
66726
67550
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66735,9 +67559,9 @@ var init_staffMessagesGetStaffMessages2 = __esm(() => {
|
|
|
66735
67559
|
|
|
66736
67560
|
// src/funcs/staffMessagesListStaffMessages.ts
|
|
66737
67561
|
function staffMessagesListStaffMessages(client, options) {
|
|
66738
|
-
return new APIPromise($
|
|
67562
|
+
return new APIPromise($do175(client, options));
|
|
66739
67563
|
}
|
|
66740
|
-
async function $
|
|
67564
|
+
async function $do175(client, options) {
|
|
66741
67565
|
const path = pathToFunc("/staffmessage.json")();
|
|
66742
67566
|
const headers = new Headers(compactMap({
|
|
66743
67567
|
Accept: "application/json"
|
|
@@ -66835,9 +67659,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
66835
67659
|
|
|
66836
67660
|
// src/funcs/staffMessagesUpdateStaffMessages.ts
|
|
66837
67661
|
function staffMessagesUpdateStaffMessages(client, request, options) {
|
|
66838
|
-
return new APIPromise($
|
|
67662
|
+
return new APIPromise($do176(client, request, options));
|
|
66839
67663
|
}
|
|
66840
|
-
async function $
|
|
67664
|
+
async function $do176(client, request, options) {
|
|
66841
67665
|
const parsed = safeParse(request, (value) => UpdateStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66842
67666
|
if (!parsed.ok) {
|
|
66843
67667
|
return [parsed, { status: "invalid" }];
|
|
@@ -66922,20 +67746,20 @@ var init_staffMessagesUpdateStaffMessages = __esm(() => {
|
|
|
66922
67746
|
});
|
|
66923
67747
|
|
|
66924
67748
|
// src/mcp-server/tools/staffMessagesUpdateStaffMessages.ts
|
|
66925
|
-
var
|
|
67749
|
+
var args143, tool$staffMessagesUpdateStaffMessages;
|
|
66926
67750
|
var init_staffMessagesUpdateStaffMessages2 = __esm(() => {
|
|
66927
67751
|
init_staffMessagesUpdateStaffMessages();
|
|
66928
67752
|
init_operations();
|
|
66929
67753
|
init_tools();
|
|
66930
|
-
|
|
67754
|
+
args143 = {
|
|
66931
67755
|
request: UpdateStaffMessagesRequest$inboundSchema
|
|
66932
67756
|
};
|
|
66933
67757
|
tool$staffMessagesUpdateStaffMessages = {
|
|
66934
67758
|
name: "staff-messages-update-staff-messages",
|
|
66935
67759
|
description: `Update a Staff Message`,
|
|
66936
|
-
args:
|
|
66937
|
-
tool: async (client,
|
|
66938
|
-
const [result2, apiCall] = await staffMessagesUpdateStaffMessages(client,
|
|
67760
|
+
args: args143,
|
|
67761
|
+
tool: async (client, args144, ctx) => {
|
|
67762
|
+
const [result2, apiCall] = await staffMessagesUpdateStaffMessages(client, args144.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66939
67763
|
if (!result2.ok) {
|
|
66940
67764
|
return {
|
|
66941
67765
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66950,9 +67774,9 @@ var init_staffMessagesUpdateStaffMessages2 = __esm(() => {
|
|
|
66950
67774
|
|
|
66951
67775
|
// src/funcs/tasksCreateTasks.ts
|
|
66952
67776
|
function tasksCreateTasks(client, request, options) {
|
|
66953
|
-
return new APIPromise($
|
|
67777
|
+
return new APIPromise($do177(client, request, options));
|
|
66954
67778
|
}
|
|
66955
|
-
async function $
|
|
67779
|
+
async function $do177(client, request, options) {
|
|
66956
67780
|
const parsed = safeParse(request, (value) => TaskInput$outboundSchema.parse(value), "Input validation failed");
|
|
66957
67781
|
if (!parsed.ok) {
|
|
66958
67782
|
return [parsed, { status: "invalid" }];
|
|
@@ -67037,12 +67861,12 @@ var init_tasksCreateTasks = __esm(() => {
|
|
|
67037
67861
|
});
|
|
67038
67862
|
|
|
67039
67863
|
// src/mcp-server/tools/tasksCreateTasks.ts
|
|
67040
|
-
var
|
|
67864
|
+
var args144, tool$tasksCreateTasks;
|
|
67041
67865
|
var init_tasksCreateTasks2 = __esm(() => {
|
|
67042
67866
|
init_tasksCreateTasks();
|
|
67043
67867
|
init_components();
|
|
67044
67868
|
init_tools();
|
|
67045
|
-
|
|
67869
|
+
args144 = {
|
|
67046
67870
|
request: TaskInput$inboundSchema
|
|
67047
67871
|
};
|
|
67048
67872
|
tool$tasksCreateTasks = {
|
|
@@ -67060,9 +67884,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67060
67884
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
67061
67885
|
|
|
67062
67886
|
`,
|
|
67063
|
-
args:
|
|
67064
|
-
tool: async (client,
|
|
67065
|
-
const [result2, apiCall] = await tasksCreateTasks(client,
|
|
67887
|
+
args: args144,
|
|
67888
|
+
tool: async (client, args145, ctx) => {
|
|
67889
|
+
const [result2, apiCall] = await tasksCreateTasks(client, args145.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67066
67890
|
if (!result2.ok) {
|
|
67067
67891
|
return {
|
|
67068
67892
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67077,9 +67901,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
67077
67901
|
|
|
67078
67902
|
// src/funcs/tasksDeleteTasks.ts
|
|
67079
67903
|
function tasksDeleteTasks(client, request, options) {
|
|
67080
|
-
return new APIPromise($
|
|
67904
|
+
return new APIPromise($do178(client, request, options));
|
|
67081
67905
|
}
|
|
67082
|
-
async function $
|
|
67906
|
+
async function $do178(client, request, options) {
|
|
67083
67907
|
const parsed = safeParse(request, (value) => DeleteTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67084
67908
|
if (!parsed.ok) {
|
|
67085
67909
|
return [parsed, { status: "invalid" }];
|
|
@@ -67163,12 +67987,12 @@ var init_tasksDeleteTasks = __esm(() => {
|
|
|
67163
67987
|
});
|
|
67164
67988
|
|
|
67165
67989
|
// src/mcp-server/tools/tasksDeleteTasks.ts
|
|
67166
|
-
var
|
|
67990
|
+
var args145, tool$tasksDeleteTasks;
|
|
67167
67991
|
var init_tasksDeleteTasks2 = __esm(() => {
|
|
67168
67992
|
init_tasksDeleteTasks();
|
|
67169
67993
|
init_operations();
|
|
67170
67994
|
init_tools();
|
|
67171
|
-
|
|
67995
|
+
args145 = {
|
|
67172
67996
|
request: DeleteTasksRequest$inboundSchema
|
|
67173
67997
|
};
|
|
67174
67998
|
tool$tasksDeleteTasks = {
|
|
@@ -67185,9 +68009,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
67185
68009
|
This endpoint requires the following OAuth scope **manage_tasks**.
|
|
67186
68010
|
|
|
67187
68011
|
`,
|
|
67188
|
-
args:
|
|
67189
|
-
tool: async (client,
|
|
67190
|
-
const [result2, apiCall] = await tasksDeleteTasks(client,
|
|
68012
|
+
args: args145,
|
|
68013
|
+
tool: async (client, args146, ctx) => {
|
|
68014
|
+
const [result2, apiCall] = await tasksDeleteTasks(client, args146.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67191
68015
|
if (!result2.ok) {
|
|
67192
68016
|
return {
|
|
67193
68017
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67202,9 +68026,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67202
68026
|
|
|
67203
68027
|
// src/funcs/tasksGetTasks.ts
|
|
67204
68028
|
function tasksGetTasks(client, request, options) {
|
|
67205
|
-
return new APIPromise($
|
|
68029
|
+
return new APIPromise($do179(client, request, options));
|
|
67206
68030
|
}
|
|
67207
|
-
async function $
|
|
68031
|
+
async function $do179(client, request, options) {
|
|
67208
68032
|
const parsed = safeParse(request, (value) => GetTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67209
68033
|
if (!parsed.ok) {
|
|
67210
68034
|
return [parsed, { status: "invalid" }];
|
|
@@ -67288,12 +68112,12 @@ var init_tasksGetTasks = __esm(() => {
|
|
|
67288
68112
|
});
|
|
67289
68113
|
|
|
67290
68114
|
// src/mcp-server/tools/tasksGetTasks.ts
|
|
67291
|
-
var
|
|
68115
|
+
var args146, tool$tasksGetTasks;
|
|
67292
68116
|
var init_tasksGetTasks2 = __esm(() => {
|
|
67293
68117
|
init_tasksGetTasks();
|
|
67294
68118
|
init_operations();
|
|
67295
68119
|
init_tools();
|
|
67296
|
-
|
|
68120
|
+
args146 = {
|
|
67297
68121
|
request: GetTasksRequest$inboundSchema
|
|
67298
68122
|
};
|
|
67299
68123
|
tool$tasksGetTasks = {
|
|
@@ -67306,9 +68130,9 @@ var init_tasksGetTasks2 = __esm(() => {
|
|
|
67306
68130
|
This endpoint requires the following OAuth scope **read_tasks**.
|
|
67307
68131
|
|
|
67308
68132
|
`,
|
|
67309
|
-
args:
|
|
67310
|
-
tool: async (client,
|
|
67311
|
-
const [result2, apiCall] = await tasksGetTasks(client,
|
|
68133
|
+
args: args146,
|
|
68134
|
+
tool: async (client, args147, ctx) => {
|
|
68135
|
+
const [result2, apiCall] = await tasksGetTasks(client, args147.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67312
68136
|
if (!result2.ok) {
|
|
67313
68137
|
return {
|
|
67314
68138
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67323,9 +68147,9 @@ This endpoint requires the following OAuth scope **read_tasks**.
|
|
|
67323
68147
|
|
|
67324
68148
|
// src/funcs/tasksListTasks.ts
|
|
67325
68149
|
function tasksListTasks(client, options) {
|
|
67326
|
-
return new APIPromise($
|
|
68150
|
+
return new APIPromise($do180(client, options));
|
|
67327
68151
|
}
|
|
67328
|
-
async function $
|
|
68152
|
+
async function $do180(client, options) {
|
|
67329
68153
|
const path = pathToFunc("/task.json")();
|
|
67330
68154
|
const headers = new Headers(compactMap({
|
|
67331
68155
|
Accept: "application/json"
|
|
@@ -67428,9 +68252,9 @@ This endpoint requires the following OAuth scope **read_tasks**.
|
|
|
67428
68252
|
|
|
67429
68253
|
// src/funcs/tasksUpdateTasks.ts
|
|
67430
68254
|
function tasksUpdateTasks(client, request, options) {
|
|
67431
|
-
return new APIPromise($
|
|
68255
|
+
return new APIPromise($do181(client, request, options));
|
|
67432
68256
|
}
|
|
67433
|
-
async function $
|
|
68257
|
+
async function $do181(client, request, options) {
|
|
67434
68258
|
const parsed = safeParse(request, (value) => UpdateTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67435
68259
|
if (!parsed.ok) {
|
|
67436
68260
|
return [parsed, { status: "invalid" }];
|
|
@@ -67515,12 +68339,12 @@ var init_tasksUpdateTasks = __esm(() => {
|
|
|
67515
68339
|
});
|
|
67516
68340
|
|
|
67517
68341
|
// src/mcp-server/tools/tasksUpdateTasks.ts
|
|
67518
|
-
var
|
|
68342
|
+
var args147, tool$tasksUpdateTasks;
|
|
67519
68343
|
var init_tasksUpdateTasks2 = __esm(() => {
|
|
67520
68344
|
init_tasksUpdateTasks();
|
|
67521
68345
|
init_operations();
|
|
67522
68346
|
init_tools();
|
|
67523
|
-
|
|
68347
|
+
args147 = {
|
|
67524
68348
|
request: UpdateTasksRequest$inboundSchema
|
|
67525
68349
|
};
|
|
67526
68350
|
tool$tasksUpdateTasks = {
|
|
@@ -67533,9 +68357,9 @@ var init_tasksUpdateTasks2 = __esm(() => {
|
|
|
67533
68357
|
This endpoint requires the following OAuth scope **manage_tasks**.
|
|
67534
68358
|
|
|
67535
68359
|
`,
|
|
67536
|
-
args:
|
|
67537
|
-
tool: async (client,
|
|
67538
|
-
const [result2, apiCall] = await tasksUpdateTasks(client,
|
|
68360
|
+
args: args147,
|
|
68361
|
+
tool: async (client, args148, ctx) => {
|
|
68362
|
+
const [result2, apiCall] = await tasksUpdateTasks(client, args148.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67539
68363
|
if (!result2.ok) {
|
|
67540
68364
|
return {
|
|
67541
68365
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67550,9 +68374,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67550
68374
|
|
|
67551
68375
|
// src/funcs/taxRatesCreateTaxRates.ts
|
|
67552
68376
|
function taxRatesCreateTaxRates(client, request, options) {
|
|
67553
|
-
return new APIPromise($
|
|
68377
|
+
return new APIPromise($do182(client, request, options));
|
|
67554
68378
|
}
|
|
67555
|
-
async function $
|
|
68379
|
+
async function $do182(client, request, options) {
|
|
67556
68380
|
const parsed = safeParse(request, (value) => TaxRateInput$outboundSchema.parse(value), "Input validation failed");
|
|
67557
68381
|
if (!parsed.ok) {
|
|
67558
68382
|
return [parsed, { status: "invalid" }];
|
|
@@ -67637,12 +68461,12 @@ var init_taxRatesCreateTaxRates = __esm(() => {
|
|
|
67637
68461
|
});
|
|
67638
68462
|
|
|
67639
68463
|
// src/mcp-server/tools/taxRatesCreateTaxRates.ts
|
|
67640
|
-
var
|
|
68464
|
+
var args148, tool$taxRatesCreateTaxRates;
|
|
67641
68465
|
var init_taxRatesCreateTaxRates2 = __esm(() => {
|
|
67642
68466
|
init_taxRatesCreateTaxRates();
|
|
67643
68467
|
init_components();
|
|
67644
68468
|
init_tools();
|
|
67645
|
-
|
|
68469
|
+
args148 = {
|
|
67646
68470
|
request: TaxRateInput$inboundSchema
|
|
67647
68471
|
};
|
|
67648
68472
|
tool$taxRatesCreateTaxRates = {
|
|
@@ -67655,9 +68479,9 @@ var init_taxRatesCreateTaxRates2 = __esm(() => {
|
|
|
67655
68479
|
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the \`x-record-uuid\` response header.
|
|
67656
68480
|
|
|
67657
68481
|
`,
|
|
67658
|
-
args:
|
|
67659
|
-
tool: async (client,
|
|
67660
|
-
const [result2, apiCall] = await taxRatesCreateTaxRates(client,
|
|
68482
|
+
args: args148,
|
|
68483
|
+
tool: async (client, args149, ctx) => {
|
|
68484
|
+
const [result2, apiCall] = await taxRatesCreateTaxRates(client, args149.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67661
68485
|
if (!result2.ok) {
|
|
67662
68486
|
return {
|
|
67663
68487
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67672,9 +68496,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
67672
68496
|
|
|
67673
68497
|
// src/funcs/taxRatesDeleteTaxRates.ts
|
|
67674
68498
|
function taxRatesDeleteTaxRates(client, request, options) {
|
|
67675
|
-
return new APIPromise($
|
|
68499
|
+
return new APIPromise($do183(client, request, options));
|
|
67676
68500
|
}
|
|
67677
|
-
async function $
|
|
68501
|
+
async function $do183(client, request, options) {
|
|
67678
68502
|
const parsed = safeParse(request, (value) => DeleteTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67679
68503
|
if (!parsed.ok) {
|
|
67680
68504
|
return [parsed, { status: "invalid" }];
|
|
@@ -67758,12 +68582,12 @@ var init_taxRatesDeleteTaxRates = __esm(() => {
|
|
|
67758
68582
|
});
|
|
67759
68583
|
|
|
67760
68584
|
// src/mcp-server/tools/taxRatesDeleteTaxRates.ts
|
|
67761
|
-
var
|
|
68585
|
+
var args149, tool$taxRatesDeleteTaxRates;
|
|
67762
68586
|
var init_taxRatesDeleteTaxRates2 = __esm(() => {
|
|
67763
68587
|
init_taxRatesDeleteTaxRates();
|
|
67764
68588
|
init_operations();
|
|
67765
68589
|
init_tools();
|
|
67766
|
-
|
|
68590
|
+
args149 = {
|
|
67767
68591
|
request: DeleteTaxRatesRequest$inboundSchema
|
|
67768
68592
|
};
|
|
67769
68593
|
tool$taxRatesDeleteTaxRates = {
|
|
@@ -67775,9 +68599,9 @@ var init_taxRatesDeleteTaxRates2 = __esm(() => {
|
|
|
67775
68599
|
In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their \`active\` field to \`1\`.
|
|
67776
68600
|
|
|
67777
68601
|
`,
|
|
67778
|
-
args:
|
|
67779
|
-
tool: async (client,
|
|
67780
|
-
const [result2, apiCall] = await taxRatesDeleteTaxRates(client,
|
|
68602
|
+
args: args149,
|
|
68603
|
+
tool: async (client, args150, ctx) => {
|
|
68604
|
+
const [result2, apiCall] = await taxRatesDeleteTaxRates(client, args150.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67781
68605
|
if (!result2.ok) {
|
|
67782
68606
|
return {
|
|
67783
68607
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67792,9 +68616,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
67792
68616
|
|
|
67793
68617
|
// src/funcs/taxRatesGetTaxRates.ts
|
|
67794
68618
|
function taxRatesGetTaxRates(client, request, options) {
|
|
67795
|
-
return new APIPromise($
|
|
68619
|
+
return new APIPromise($do184(client, request, options));
|
|
67796
68620
|
}
|
|
67797
|
-
async function $
|
|
68621
|
+
async function $do184(client, request, options) {
|
|
67798
68622
|
const parsed = safeParse(request, (value) => GetTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67799
68623
|
if (!parsed.ok) {
|
|
67800
68624
|
return [parsed, { status: "invalid" }];
|
|
@@ -67878,20 +68702,20 @@ var init_taxRatesGetTaxRates = __esm(() => {
|
|
|
67878
68702
|
});
|
|
67879
68703
|
|
|
67880
68704
|
// src/mcp-server/tools/taxRatesGetTaxRates.ts
|
|
67881
|
-
var
|
|
68705
|
+
var args150, tool$taxRatesGetTaxRates;
|
|
67882
68706
|
var init_taxRatesGetTaxRates2 = __esm(() => {
|
|
67883
68707
|
init_taxRatesGetTaxRates();
|
|
67884
68708
|
init_operations();
|
|
67885
68709
|
init_tools();
|
|
67886
|
-
|
|
68710
|
+
args150 = {
|
|
67887
68711
|
request: GetTaxRatesRequest$inboundSchema
|
|
67888
68712
|
};
|
|
67889
68713
|
tool$taxRatesGetTaxRates = {
|
|
67890
68714
|
name: "tax-rates-get-tax-rates",
|
|
67891
68715
|
description: `Retrieve a Tax Rate`,
|
|
67892
|
-
args:
|
|
67893
|
-
tool: async (client,
|
|
67894
|
-
const [result2, apiCall] = await taxRatesGetTaxRates(client,
|
|
68716
|
+
args: args150,
|
|
68717
|
+
tool: async (client, args151, ctx) => {
|
|
68718
|
+
const [result2, apiCall] = await taxRatesGetTaxRates(client, args151.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67895
68719
|
if (!result2.ok) {
|
|
67896
68720
|
return {
|
|
67897
68721
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67906,9 +68730,9 @@ var init_taxRatesGetTaxRates2 = __esm(() => {
|
|
|
67906
68730
|
|
|
67907
68731
|
// src/funcs/taxRatesListTaxRates.ts
|
|
67908
68732
|
function taxRatesListTaxRates(client, options) {
|
|
67909
|
-
return new APIPromise($
|
|
68733
|
+
return new APIPromise($do185(client, options));
|
|
67910
68734
|
}
|
|
67911
|
-
async function $
|
|
68735
|
+
async function $do185(client, options) {
|
|
67912
68736
|
const path = pathToFunc("/taxrate.json")();
|
|
67913
68737
|
const headers = new Headers(compactMap({
|
|
67914
68738
|
Accept: "application/json"
|
|
@@ -68006,9 +68830,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
68006
68830
|
|
|
68007
68831
|
// src/funcs/taxRatesUpdateTaxRates.ts
|
|
68008
68832
|
function taxRatesUpdateTaxRates(client, request, options) {
|
|
68009
|
-
return new APIPromise($
|
|
68833
|
+
return new APIPromise($do186(client, request, options));
|
|
68010
68834
|
}
|
|
68011
|
-
async function $
|
|
68835
|
+
async function $do186(client, request, options) {
|
|
68012
68836
|
const parsed = safeParse(request, (value) => UpdateTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68013
68837
|
if (!parsed.ok) {
|
|
68014
68838
|
return [parsed, { status: "invalid" }];
|
|
@@ -68093,20 +68917,20 @@ var init_taxRatesUpdateTaxRates = __esm(() => {
|
|
|
68093
68917
|
});
|
|
68094
68918
|
|
|
68095
68919
|
// src/mcp-server/tools/taxRatesUpdateTaxRates.ts
|
|
68096
|
-
var
|
|
68920
|
+
var args151, tool$taxRatesUpdateTaxRates;
|
|
68097
68921
|
var init_taxRatesUpdateTaxRates2 = __esm(() => {
|
|
68098
68922
|
init_taxRatesUpdateTaxRates();
|
|
68099
68923
|
init_operations();
|
|
68100
68924
|
init_tools();
|
|
68101
|
-
|
|
68925
|
+
args151 = {
|
|
68102
68926
|
request: UpdateTaxRatesRequest$inboundSchema
|
|
68103
68927
|
};
|
|
68104
68928
|
tool$taxRatesUpdateTaxRates = {
|
|
68105
68929
|
name: "tax-rates-update-tax-rates",
|
|
68106
68930
|
description: `Update a Tax Rate`,
|
|
68107
|
-
args:
|
|
68108
|
-
tool: async (client,
|
|
68109
|
-
const [result2, apiCall] = await taxRatesUpdateTaxRates(client,
|
|
68931
|
+
args: args151,
|
|
68932
|
+
tool: async (client, args152, ctx) => {
|
|
68933
|
+
const [result2, apiCall] = await taxRatesUpdateTaxRates(client, args152.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68110
68934
|
if (!result2.ok) {
|
|
68111
68935
|
return {
|
|
68112
68936
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68121,9 +68945,9 @@ var init_taxRatesUpdateTaxRates2 = __esm(() => {
|
|
|
68121
68945
|
|
|
68122
68946
|
// src/funcs/vendorsGetVendors.ts
|
|
68123
68947
|
function vendorsGetVendors(client, request, options) {
|
|
68124
|
-
return new APIPromise($
|
|
68948
|
+
return new APIPromise($do187(client, request, options));
|
|
68125
68949
|
}
|
|
68126
|
-
async function $
|
|
68950
|
+
async function $do187(client, request, options) {
|
|
68127
68951
|
const parsed = safeParse(request, (value) => GetVendorsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68128
68952
|
if (!parsed.ok) {
|
|
68129
68953
|
return [parsed, { status: "invalid" }];
|
|
@@ -68207,12 +69031,12 @@ var init_vendorsGetVendors = __esm(() => {
|
|
|
68207
69031
|
});
|
|
68208
69032
|
|
|
68209
69033
|
// src/mcp-server/tools/vendorsGetVendors.ts
|
|
68210
|
-
var
|
|
69034
|
+
var args152, tool$vendorsGetVendors;
|
|
68211
69035
|
var init_vendorsGetVendors2 = __esm(() => {
|
|
68212
69036
|
init_vendorsGetVendors();
|
|
68213
69037
|
init_operations();
|
|
68214
69038
|
init_tools();
|
|
68215
|
-
|
|
69039
|
+
args152 = {
|
|
68216
69040
|
request: GetVendorsRequest$inboundSchema
|
|
68217
69041
|
};
|
|
68218
69042
|
tool$vendorsGetVendors = {
|
|
@@ -68227,9 +69051,9 @@ Vendor account information
|
|
|
68227
69051
|
This endpoint requires the following OAuth scope **vendor**.
|
|
68228
69052
|
|
|
68229
69053
|
`,
|
|
68230
|
-
args:
|
|
68231
|
-
tool: async (client,
|
|
68232
|
-
const [result2, apiCall] = await vendorsGetVendors(client,
|
|
69054
|
+
args: args152,
|
|
69055
|
+
tool: async (client, args153, ctx) => {
|
|
69056
|
+
const [result2, apiCall] = await vendorsGetVendors(client, args153.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68233
69057
|
if (!result2.ok) {
|
|
68234
69058
|
return {
|
|
68235
69059
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68244,9 +69068,9 @@ This endpoint requires the following OAuth scope **vendor**.
|
|
|
68244
69068
|
|
|
68245
69069
|
// src/funcs/vendorsListVendors.ts
|
|
68246
69070
|
function vendorsListVendors(client, options) {
|
|
68247
|
-
return new APIPromise($
|
|
69071
|
+
return new APIPromise($do188(client, options));
|
|
68248
69072
|
}
|
|
68249
|
-
async function $
|
|
69073
|
+
async function $do188(client, options) {
|
|
68250
69074
|
const path = pathToFunc("/vendor.json")();
|
|
68251
69075
|
const headers = new Headers(compactMap({
|
|
68252
69076
|
Accept: "application/json"
|
|
@@ -68351,9 +69175,9 @@ This endpoint requires the following OAuth scope **vendor**.
|
|
|
68351
69175
|
|
|
68352
69176
|
// src/funcs/vendorsUpdateVendors.ts
|
|
68353
69177
|
function vendorsUpdateVendors(client, request, options) {
|
|
68354
|
-
return new APIPromise($
|
|
69178
|
+
return new APIPromise($do189(client, request, options));
|
|
68355
69179
|
}
|
|
68356
|
-
async function $
|
|
69180
|
+
async function $do189(client, request, options) {
|
|
68357
69181
|
const parsed = safeParse(request, (value) => UpdateVendorsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68358
69182
|
if (!parsed.ok) {
|
|
68359
69183
|
return [parsed, { status: "invalid" }];
|
|
@@ -68438,12 +69262,12 @@ var init_vendorsUpdateVendors = __esm(() => {
|
|
|
68438
69262
|
});
|
|
68439
69263
|
|
|
68440
69264
|
// src/mcp-server/tools/vendorsUpdateVendors.ts
|
|
68441
|
-
var
|
|
69265
|
+
var args153, tool$vendorsUpdateVendors;
|
|
68442
69266
|
var init_vendorsUpdateVendors2 = __esm(() => {
|
|
68443
69267
|
init_vendorsUpdateVendors();
|
|
68444
69268
|
init_operations();
|
|
68445
69269
|
init_tools();
|
|
68446
|
-
|
|
69270
|
+
args153 = {
|
|
68447
69271
|
request: UpdateVendorsRequest$inboundSchema
|
|
68448
69272
|
};
|
|
68449
69273
|
tool$vendorsUpdateVendors = {
|
|
@@ -68453,9 +69277,9 @@ var init_vendorsUpdateVendors2 = __esm(() => {
|
|
|
68453
69277
|
Vendor account information
|
|
68454
69278
|
|
|
68455
69279
|
`,
|
|
68456
|
-
args:
|
|
68457
|
-
tool: async (client,
|
|
68458
|
-
const [result2, apiCall] = await vendorsUpdateVendors(client,
|
|
69280
|
+
args: args153,
|
|
69281
|
+
tool: async (client, args154, ctx) => {
|
|
69282
|
+
const [result2, apiCall] = await vendorsUpdateVendors(client, args154.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68459
69283
|
if (!result2.ok) {
|
|
68460
69284
|
return {
|
|
68461
69285
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68472,7 +69296,7 @@ Vendor account information
|
|
|
68472
69296
|
function createMCPServer(deps) {
|
|
68473
69297
|
const server = new McpServer({
|
|
68474
69298
|
name: "ServiceM8",
|
|
68475
|
-
version: "0.9.
|
|
69299
|
+
version: "0.9.2"
|
|
68476
69300
|
});
|
|
68477
69301
|
const client = new ServiceM8Core({
|
|
68478
69302
|
security: deps.security,
|
|
@@ -68555,6 +69379,14 @@ function createMCPServer(deps) {
|
|
|
68555
69379
|
tool(tool$formResponsesGetFormResponses);
|
|
68556
69380
|
tool(tool$formResponsesUpdateFormResponses);
|
|
68557
69381
|
tool(tool$formResponsesDeleteFormResponses);
|
|
69382
|
+
tool(tool$inboxListInboxMessages);
|
|
69383
|
+
tool(tool$inboxGetInboxMessage);
|
|
69384
|
+
tool(tool$inboxMarkInboxMessageAsRead);
|
|
69385
|
+
tool(tool$inboxArchiveInboxMessage);
|
|
69386
|
+
tool(tool$inboxSnoozeInboxMessage);
|
|
69387
|
+
tool(tool$inboxConvertInboxMessageToJob);
|
|
69388
|
+
tool(tool$inboxAttachInboxMessageToJob);
|
|
69389
|
+
tool(tool$inboxAddNoteToInboxMessage);
|
|
68558
69390
|
tool(tool$jobsListJobs);
|
|
68559
69391
|
tool(tool$jobsCreateJobs);
|
|
68560
69392
|
tool(tool$jobsGetJobs);
|
|
@@ -68595,6 +69427,12 @@ function createMCPServer(deps) {
|
|
|
68595
69427
|
tool(tool$jobPaymentsGetJobPayments);
|
|
68596
69428
|
tool(tool$jobPaymentsUpdateJobPayments);
|
|
68597
69429
|
tool(tool$jobPaymentsDeleteJobPayments);
|
|
69430
|
+
tool(tool$jobTemplatesListJobTemplates);
|
|
69431
|
+
tool(tool$jobTemplatesCreateJobTemplates);
|
|
69432
|
+
tool(tool$jobTemplatesGetJobTemplates);
|
|
69433
|
+
tool(tool$jobTemplatesUpdateJobTemplates);
|
|
69434
|
+
tool(tool$jobTemplatesDeleteJobTemplates);
|
|
69435
|
+
tool(tool$jobTemplatesCreateJobFromTemplate);
|
|
68598
69436
|
tool(tool$knowledgeArticlesListKnowledgeArticles);
|
|
68599
69437
|
tool(tool$knowledgeArticlesCreateKnowledgeArticles);
|
|
68600
69438
|
tool(tool$knowledgeArticlesGetKnowledgeArticles);
|
|
@@ -68658,15 +69496,6 @@ function createMCPServer(deps) {
|
|
|
68658
69496
|
tool(tool$vendorsListVendors);
|
|
68659
69497
|
tool(tool$vendorsGetVendors);
|
|
68660
69498
|
tool(tool$vendorsUpdateVendors);
|
|
68661
|
-
tool(tool$inboxListInboxMessages);
|
|
68662
|
-
tool(tool$inboxGetInboxMessage);
|
|
68663
|
-
tool(tool$inboxMarkInboxMessageAsRead);
|
|
68664
|
-
tool(tool$inboxArchiveInboxMessage);
|
|
68665
|
-
tool(tool$inboxSnoozeInboxMessage);
|
|
68666
|
-
tool(tool$inboxConvertInboxMessageToJob);
|
|
68667
|
-
tool(tool$inboxAttachInboxMessageToJob);
|
|
68668
|
-
tool(tool$inboxAddNoteToInboxMessage);
|
|
68669
|
-
tool(tool$jobTemplatesCreateJobFromTemplate);
|
|
68670
69499
|
tool(tool$searchGeneralSearch);
|
|
68671
69500
|
tool(tool$searchObjectSearch);
|
|
68672
69501
|
tool(tool$searchJobEmbeddingSearch);
|
|
@@ -68805,6 +69634,11 @@ var init_server2 = __esm(() => {
|
|
|
68805
69634
|
init_jobsListJobs2();
|
|
68806
69635
|
init_jobsUpdateJobs2();
|
|
68807
69636
|
init_jobTemplatesCreateJobFromTemplate2();
|
|
69637
|
+
init_jobTemplatesCreateJobTemplates2();
|
|
69638
|
+
init_jobTemplatesDeleteJobTemplates2();
|
|
69639
|
+
init_jobTemplatesGetJobTemplates2();
|
|
69640
|
+
init_jobTemplatesListJobTemplates2();
|
|
69641
|
+
init_jobTemplatesUpdateJobTemplates2();
|
|
68808
69642
|
init_knowledgeArticlesCreateKnowledgeArticles2();
|
|
68809
69643
|
init_knowledgeArticlesDeleteKnowledgeArticles2();
|
|
68810
69644
|
init_knowledgeArticlesGetKnowledgeArticles2();
|
|
@@ -70043,7 +70877,7 @@ var routes = an({
|
|
|
70043
70877
|
var app = He(routes, {
|
|
70044
70878
|
name: "mcp",
|
|
70045
70879
|
versionInfo: {
|
|
70046
|
-
currentVersion: "0.9.
|
|
70880
|
+
currentVersion: "0.9.2"
|
|
70047
70881
|
}
|
|
70048
70882
|
});
|
|
70049
70883
|
zt(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -70051,5 +70885,5 @@ export {
|
|
|
70051
70885
|
app
|
|
70052
70886
|
};
|
|
70053
70887
|
|
|
70054
|
-
//# debugId=
|
|
70888
|
+
//# debugId=A1E311C36A833DCF64756E2164756E21
|
|
70055
70889
|
//# sourceMappingURL=mcp-server.js.map
|